about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/box64context.c39
-rw-r--r--src/build_info.h2
-rw-r--r--src/custommem.c161
-rw-r--r--src/dynarec/arm64/arm64_emitter.h39
-rw-r--r--src/dynarec/arm64/arm64_printer.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_00.c492
-rw-r--r--src/dynarec/arm64/dynarec_arm64_0f.c64
-rw-r--r--src/dynarec/arm64/dynarec_arm64_64.c139
-rw-r--r--src/dynarec/arm64/dynarec_arm64_66.c235
-rw-r--r--src/dynarec/arm64/dynarec_arm64_660f.c58
-rw-r--r--src/dynarec/arm64/dynarec_arm64_6664.c10
-rw-r--r--src/dynarec/arm64/dynarec_arm64_66f0.c15
-rw-r--r--src/dynarec/arm64/dynarec_arm64_67.c184
-rw-r--r--src/dynarec/arm64/dynarec_arm64_d8.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_d9.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_db.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_dc.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_dd.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_de.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_df.c138
-rw-r--r--src/dynarec/arm64/dynarec_arm64_emit_logic.c2
-rw-r--r--src/dynarec/arm64/dynarec_arm64_emit_math.c2
-rw-r--r--src/dynarec/arm64/dynarec_arm64_emit_shift.c4
-rw-r--r--src/dynarec/arm64/dynarec_arm64_emit_tests.c2
-rw-r--r--src/dynarec/arm64/dynarec_arm64_f0.c47
-rw-r--r--src/dynarec/arm64/dynarec_arm64_f20f.c1
-rw-r--r--src/dynarec/arm64/dynarec_arm64_f30f.c37
-rw-r--r--src/dynarec/arm64/dynarec_arm64_functions.c68
-rw-r--r--src/dynarec/arm64/dynarec_arm64_functions.h10
-rw-r--r--src/dynarec/arm64/dynarec_arm64_helper.c309
-rw-r--r--src/dynarec/arm64/dynarec_arm64_helper.h78
-rw-r--r--src/dynarec/arm64/dynarec_arm64_pass0.h9
-rw-r--r--src/dynarec/arm64/dynarec_arm64_pass2.h4
-rw-r--r--src/dynarec/arm64/dynarec_arm64_pass3.h2
-rw-r--r--src/dynarec/arm64/dynarec_arm64_private.h17
-rw-r--r--src/dynarec/dynablock.c27
-rw-r--r--src/dynarec/dynarec.c148
-rw-r--r--src/dynarec/dynarec_native.c78
-rw-r--r--src/dynarec/dynarec_native_functions.c43
-rw-r--r--src/dynarec/dynarec_native_functions.h1
-rw-r--r--src/dynarec/dynarec_native_pass.c17
-rw-r--r--src/dynarec/dynarec_next.h6
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00.c3
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00_0.c14
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00_1.c125
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00_2.c192
-rw-r--r--src/dynarec/rv64/dynarec_rv64_00_3.c187
-rw-r--r--src/dynarec/rv64/dynarec_rv64_0f.c748
-rw-r--r--src/dynarec/rv64/dynarec_rv64_64.c346
-rw-r--r--src/dynarec/rv64/dynarec_rv64_66.c188
-rw-r--r--src/dynarec/rv64/dynarec_rv64_660f.c1442
-rw-r--r--src/dynarec/rv64/dynarec_rv64_6664.c77
-rw-r--r--src/dynarec/rv64/dynarec_rv64_66f0.c129
-rw-r--r--src/dynarec/rv64/dynarec_rv64_67.c574
-rw-r--r--src/dynarec/rv64/dynarec_rv64_d8.c67
-rw-r--r--src/dynarec/rv64/dynarec_rv64_d9.c53
-rw-r--r--src/dynarec/rv64/dynarec_rv64_db.c60
-rw-r--r--src/dynarec/rv64/dynarec_rv64_dc.c119
-rw-r--r--src/dynarec/rv64/dynarec_rv64_dd.c179
-rw-r--r--src/dynarec/rv64/dynarec_rv64_de.c1
-rw-r--r--src/dynarec/rv64/dynarec_rv64_df.c106
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_logic.c10
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_math.c212
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_shift.c50
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_tests.c5
-rw-r--r--src/dynarec/rv64/dynarec_rv64_f0.c178
-rw-r--r--src/dynarec/rv64/dynarec_rv64_f20f.c45
-rw-r--r--src/dynarec/rv64/dynarec_rv64_f30f.c216
-rw-r--r--src/dynarec/rv64/dynarec_rv64_functions.c48
-rw-r--r--src/dynarec/rv64/dynarec_rv64_functions.h2
-rw-r--r--src/dynarec/rv64/dynarec_rv64_helper.c517
-rw-r--r--src/dynarec/rv64/dynarec_rv64_helper.h238
-rw-r--r--src/dynarec/rv64/dynarec_rv64_pass0.h10
-rw-r--r--src/dynarec/rv64/dynarec_rv64_pass1.h1
-rw-r--r--src/dynarec/rv64/dynarec_rv64_pass2.h4
-rw-r--r--src/dynarec/rv64/dynarec_rv64_pass3.h6
-rw-r--r--src/dynarec/rv64/dynarec_rv64_private.h12
-rw-r--r--src/dynarec/rv64/rv64_emitter.h145
-rw-r--r--src/dynarec/rv64/rv64_epilog.S43
-rw-r--r--src/dynarec/rv64/rv64_printer.c17
-rw-r--r--src/dynarec/rv64/rv64_prolog.S43
-rw-r--r--src/elfs/elfloader.c56
-rw-r--r--src/elfs/elfloader_private.h2
-rw-r--r--src/elfs/elfparser.c52
-rw-r--r--src/emu/modrm.h3
-rw-r--r--src/emu/x64emu.c112
-rw-r--r--src/emu/x64emu_private.h1
-rw-r--r--src/emu/x64int3.c26
-rw-r--r--src/emu/x64run.c468
-rw-r--r--src/emu/x64run0f.c50
-rw-r--r--src/emu/x64run64.c170
-rw-r--r--src/emu/x64run66.c116
-rw-r--r--src/emu/x64run660f.c8
-rw-r--r--src/emu/x64run6664.c25
-rw-r--r--src/emu/x64run66f0.c224
-rw-r--r--src/emu/x64run67.c20
-rw-r--r--src/emu/x64run670f.c33
-rw-r--r--src/emu/x64run6764_32.c67
-rw-r--r--src/emu/x64run6766.c19
-rw-r--r--src/emu/x64run67_32.c100
-rw-r--r--src/emu/x64run_private.c95
-rw-r--r--src/emu/x64run_private.h76
-rw-r--r--src/emu/x64rundb.c6
-rw-r--r--src/emu/x64rundd.c9
-rw-r--r--src/emu/x64rundf.c2
-rw-r--r--src/emu/x64runf0.c9
-rw-r--r--src/emu/x64syscall.c15
-rw-r--r--src/emu/x64test.c8
-rw-r--r--src/emu/x64tls.c148
-rw-r--r--src/emu/x64trace.c19
-rwxr-xr-xsrc/emu/x86syscall.c284
-rw-r--r--src/emu/x87emu_private.c4
-rw-r--r--src/include/box64context.h34
-rw-r--r--src/include/box64stack.h9
-rw-r--r--src/include/bridge.h10
-rw-r--r--src/include/callback.h7
-rw-r--r--src/include/custommem.h6
-rw-r--r--src/include/debug.h9
-rw-r--r--src/include/dictionnary.h2
-rw-r--r--src/include/dynablock.h6
-rw-r--r--src/include/dynarec_native.h15
-rw-r--r--src/include/dynarec_rv64.h2
-rw-r--r--src/include/elfloader.h3
-rw-r--r--src/include/fileutils.h4
-rw-r--r--src/include/globalsymbols.h16
-rw-r--r--src/include/gtkclass.h20
-rw-r--r--src/include/librarian.h6
-rw-r--r--src/include/library.h2
-rw-r--r--src/include/myalign.h2
-rw-r--r--src/include/rcfile.h2
-rw-r--r--src/include/regs.h2
-rw-r--r--src/include/sdl1rwops.h2
-rw-r--r--src/include/sdl2rwops.h2
-rw-r--r--src/include/signals.h2
-rw-r--r--src/include/symbols.h7
-rw-r--r--src/include/threads.h12
-rw-r--r--src/include/wine_tools.h4
-rw-r--r--src/include/x64emu.h14
-rw-r--r--src/include/x64run.h2
-rw-r--r--src/include/x64tls.h3
-rw-r--r--src/include/x64trace.h5
-rw-r--r--src/librarian/librarian.c49
-rw-r--r--src/librarian/library.c57
-rw-r--r--src/librarian/symbols.c13
-rw-r--r--src/library_list.h5
-rw-r--r--src/libtools/myalign.c6
-rw-r--r--src/libtools/obstack.c6
-rw-r--r--src/libtools/sdl1rwops.c10
-rw-r--r--src/libtools/sdl2rwops.c18
-rw-r--r--src/libtools/signals.c199
-rw-r--r--src/libtools/threads.c46
-rw-r--r--src/main.c70
-rw-r--r--src/mallochook.c202
-rw-r--r--src/rv64detect.c70
-rw-r--r--src/tools/box64stack.c99
-rw-r--r--src/tools/bridge.c6
-rw-r--r--src/tools/callback.c104
-rw-r--r--src/tools/gtkclass.c1122
-rw-r--r--src/tools/my_cpuid.c6
-rw-r--r--src/tools/rcfile.c9
-rw-r--r--src/wrapped/generated/functions_list.txt252
-rw-r--r--src/wrapped/generated/wrappedaluredefs.h2
-rw-r--r--src/wrapped/generated/wrappedaluretypes.h2
-rw-r--r--src/wrapped/generated/wrappedalureundefs.h2
-rw-r--r--src/wrapped/generated/wrappedalutdefs.h2
-rw-r--r--src/wrapped/generated/wrappedaluttypes.h2
-rw-r--r--src/wrapped/generated/wrappedalutundefs.h2
-rw-r--r--src/wrapped/generated/wrappedatkbridgedefs.h2
-rw-r--r--src/wrapped/generated/wrappedatkbridgetypes.h2
-rw-r--r--src/wrapped/generated/wrappedatkbridgeundefs.h2
-rw-r--r--src/wrapped/generated/wrappedatkdefs.h2
-rw-r--r--src/wrapped/generated/wrappedatktypes.h2
-rw-r--r--src/wrapped/generated/wrappedatkundefs.h2
-rw-r--r--src/wrapped/generated/wrappedatomicdefs.h2
-rw-r--r--src/wrapped/generated/wrappedatomictypes.h2
-rw-r--r--src/wrapped/generated/wrappedatomicundefs.h2
-rw-r--r--src/wrapped/generated/wrappedatspidefs.h2
-rw-r--r--src/wrapped/generated/wrappedatspitypes.h2
-rw-r--r--src/wrapped/generated/wrappedatspiundefs.h2
-rw-r--r--src/wrapped/generated/wrappedbz2defs.h2
-rw-r--r--src/wrapped/generated/wrappedbz2types.h2
-rw-r--r--src/wrapped/generated/wrappedbz2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedcairodefs.h2
-rw-r--r--src/wrapped/generated/wrappedcairogobjectdefs.h2
-rw-r--r--src/wrapped/generated/wrappedcairogobjecttypes.h2
-rw-r--r--src/wrapped/generated/wrappedcairogobjectundefs.h2
-rw-r--r--src/wrapped/generated/wrappedcairotypes.h2
-rw-r--r--src/wrapped/generated/wrappedcairoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedcapdefs.h8
-rw-r--r--src/wrapped/generated/wrappedcaptypes.h17
-rw-r--r--src/wrapped/generated/wrappedcapundefs.h8
-rw-r--r--src/wrapped/generated/wrappedcrashhandlerdefs.h2
-rw-r--r--src/wrapped/generated/wrappedcrashhandlertypes.h2
-rw-r--r--src/wrapped/generated/wrappedcrashhandlerundefs.h2
-rw-r--r--src/wrapped/generated/wrappedcrypto3defs.h2
-rw-r--r--src/wrapped/generated/wrappedcrypto3types.h6
-rw-r--r--src/wrapped/generated/wrappedcrypto3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedcryptodefs.h2
-rw-r--r--src/wrapped/generated/wrappedcryptotypes.h15
-rw-r--r--src/wrapped/generated/wrappedcryptoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedcurldefs.h2
-rw-r--r--src/wrapped/generated/wrappedcurltypes.h2
-rw-r--r--src/wrapped/generated/wrappedcurlundefs.h2
-rw-r--r--src/wrapped/generated/wrappedd3dadapter9defs.h2
-rw-r--r--src/wrapped/generated/wrappedd3dadapter9types.h2
-rw-r--r--src/wrapped/generated/wrappedd3dadapter9undefs.h2
-rw-r--r--src/wrapped/generated/wrappeddbusdefs.h2
-rw-r--r--src/wrapped/generated/wrappeddbusglib1defs.h2
-rw-r--r--src/wrapped/generated/wrappeddbusglib1types.h2
-rw-r--r--src/wrapped/generated/wrappeddbusglib1undefs.h2
-rw-r--r--src/wrapped/generated/wrappeddbustypes.h3
-rw-r--r--src/wrapped/generated/wrappeddbusundefs.h2
-rw-r--r--src/wrapped/generated/wrappedexpatdefs.h2
-rw-r--r--src/wrapped/generated/wrappedexpattypes.h2
-rw-r--r--src/wrapped/generated/wrappedexpatundefs.h2
-rw-r--r--src/wrapped/generated/wrappedfaudiodefs.h2
-rw-r--r--src/wrapped/generated/wrappedfaudiotypes.h2
-rw-r--r--src/wrapped/generated/wrappedfaudioundefs.h2
-rw-r--r--src/wrapped/generated/wrappedflacdefs.h2
-rw-r--r--src/wrapped/generated/wrappedflactypes.h2
-rw-r--r--src/wrapped/generated/wrappedflacundefs.h2
-rw-r--r--src/wrapped/generated/wrappedfontconfigdefs.h2
-rw-r--r--src/wrapped/generated/wrappedfontconfigtypes.h2
-rw-r--r--src/wrapped/generated/wrappedfontconfigundefs.h2
-rw-r--r--src/wrapped/generated/wrappedfreebl3defs.h2
-rw-r--r--src/wrapped/generated/wrappedfreebl3types.h2
-rw-r--r--src/wrapped/generated/wrappedfreebl3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedfreetypedefs.h2
-rw-r--r--src/wrapped/generated/wrappedfreetypetypes.h2
-rw-r--r--src/wrapped/generated/wrappedfreetypeundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgbmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgbmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedgbmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgconf2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgconf2types.h2
-rw-r--r--src/wrapped/generated/wrappedgconf2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgcryptdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgcrypttypes.h2
-rw-r--r--src/wrapped/generated/wrappedgcryptundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgdk3defs.h2
-rw-r--r--src/wrapped/generated/wrappedgdk3types.h4
-rw-r--r--src/wrapped/generated/wrappedgdk3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgdkpixbuf2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgdkpixbuf2types.h2
-rw-r--r--src/wrapped/generated/wrappedgdkpixbuf2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgdkx112defs.h2
-rw-r--r--src/wrapped/generated/wrappedgdkx112types.h2
-rw-r--r--src/wrapped/generated/wrappedgdkx112undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgio2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgio2types.h6
-rw-r--r--src/wrapped/generated/wrappedgio2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedglib2defs.h2
-rw-r--r--src/wrapped/generated/wrappedglib2types.h2
-rw-r--r--src/wrapped/generated/wrappedglib2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgmodule2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgmodule2types.h2
-rw-r--r--src/wrapped/generated/wrappedgmodule2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgmpdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgmptypes.h2
-rw-r--r--src/wrapped/generated/wrappedgmpundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgnutlsdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgnutlstypes.h2
-rw-r--r--src/wrapped/generated/wrappedgnutlsundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgobject2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgobject2types.h6
-rw-r--r--src/wrapped/generated/wrappedgobject2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgompdefs.h8
-rw-r--r--src/wrapped/generated/wrappedgomptypes.h17
-rw-r--r--src/wrapped/generated/wrappedgompundefs.h8
-rw-r--r--src/wrapped/generated/wrappedgssapidefs.h2
-rw-r--r--src/wrapped/generated/wrappedgssapikrb5defs.h2
-rw-r--r--src/wrapped/generated/wrappedgssapikrb5types.h2
-rw-r--r--src/wrapped/generated/wrappedgssapikrb5undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgssapitypes.h2
-rw-r--r--src/wrapped/generated/wrappedgssapiundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstappdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstapptypes.h2
-rw-r--r--src/wrapped/generated/wrappedgstappundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstaudiodefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstaudiotypes.h2
-rw-r--r--src/wrapped/generated/wrappedgstaudioundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstbasedefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstbasetypes.h2
-rw-r--r--src/wrapped/generated/wrappedgstbaseundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstgldefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstgltypes.h2
-rw-r--r--src/wrapped/generated/wrappedgstglundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstreamerdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstreamertypes.h4
-rw-r--r--src/wrapped/generated/wrappedgstreamerundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgsttagdefs.h2
-rw-r--r--src/wrapped/generated/wrappedgsttagtypes.h2
-rw-r--r--src/wrapped/generated/wrappedgsttagundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstvideodefs.h2
-rw-r--r--src/wrapped/generated/wrappedgstvideotypes.h2
-rw-r--r--src/wrapped/generated/wrappedgstvideoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedgthread2defs.h2
-rw-r--r--src/wrapped/generated/wrappedgthread2types.h2
-rw-r--r--src/wrapped/generated/wrappedgthread2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgtk3defs.h2
-rw-r--r--src/wrapped/generated/wrappedgtk3types.h3
-rw-r--r--src/wrapped/generated/wrappedgtk3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedgtkx112defs.h2
-rw-r--r--src/wrapped/generated/wrappedgtkx112types.h2
-rw-r--r--src/wrapped/generated/wrappedgtkx112undefs.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n67defs.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n67types.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n67undefs.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n72defs.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n72types.h2
-rw-r--r--src/wrapped/generated/wrappedicui18n72undefs.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc67defs.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc67types.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc67undefs.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc72defs.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc72types.h2
-rw-r--r--src/wrapped/generated/wrappedicuuc72undefs.h2
-rw-r--r--src/wrapped/generated/wrappedkrb5defs.h2
-rw-r--r--src/wrapped/generated/wrappedkrb5types.h2
-rw-r--r--src/wrapped/generated/wrappedkrb5undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlberdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlbertypes.h2
-rw-r--r--src/wrapped/generated/wrappedlberundefs.h2
-rw-r--r--src/wrapped/generated/wrappedldaprdefs.h2
-rw-r--r--src/wrapped/generated/wrappedldaprtypes.h2
-rw-r--r--src/wrapped/generated/wrappedldaprundefs.h2
-rw-r--r--src/wrapped/generated/wrappedldlinuxdefs.h2
-rw-r--r--src/wrapped/generated/wrappedldlinuxtypes.h2
-rw-r--r--src/wrapped/generated/wrappedldlinuxundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibasounddefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibasoundtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibasoundundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcmusldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcmusltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibcmuslundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcryptdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcrypttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibcryptundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibctypes.h14
-rw-r--r--src/wrapped/generated/wrappedlibcundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcupsdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibcupstypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibcupsundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibdldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibdltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibdlundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibdrmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibdrmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibdrmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibegldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibegltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibeglundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibformdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibformtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibformundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibformwdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibformwtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibformwundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibfusedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibfusetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibfuseundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibgldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibgltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibgludefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibglundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibglutypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibgluundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibglxdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibglxtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibglxundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibharfbuzzdefs.h8
-rw-r--r--src/wrapped/generated/wrappedlibharfbuzztypes.h71
-rw-r--r--src/wrapped/generated/wrappedlibharfbuzzundefs.h8
-rw-r--r--src/wrapped/generated/wrappedlibibusdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibibustypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibibusundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibicedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibicetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibiceundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurses6defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurses6types.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurses6undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursesdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursestypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursesundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursesw6defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursesw6types.h2
-rw-r--r--src/wrapped/generated/wrappedlibncursesw6undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurseswdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurseswtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibncurseswundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibnumadefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibnumatypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibnumaundefs.h2
-rw-r--r--src/wrapped/generated/wrappedliboggdefs.h2
-rw-r--r--src/wrapped/generated/wrappedliboggtypes.h2
-rw-r--r--src/wrapped/generated/wrappedliboggundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpaneldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpaneltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibpanelundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpcidefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpcitypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibpciundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpcredefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpcretypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibpcreundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpthreaddefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibpthreadtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibpthreadundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibresolvdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibresolvtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibresolvundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibrtdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibrttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibrtundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibsmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibsmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibsmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibsndfiledefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibsndfiletypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibsndfileundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibssl3defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibssl3types.h3
-rw-r--r--src/wrapped/generated/wrappedlibssl3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibssldefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibssltypes.h7
-rw-r--r--src/wrapped/generated/wrappedlibsslundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfo6defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfo6types.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfo6undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfodefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfotypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibtinfoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibusb1defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibusb1types.h2
-rw-r--r--src/wrapped/generated/wrappedlibusb1undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibuuiddefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibuuidtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibuuidundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvadefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvadrmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvadrmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibvadrmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvatypes.h7
-rw-r--r--src/wrapped/generated/wrappedlibvaundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvawaylanddefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvawaylandtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibvawaylandundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvax11defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvax11types.h2
-rw-r--r--src/wrapped/generated/wrappedlibvax11undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvdpaudefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvdpautypes.h6
-rw-r--r--src/wrapped/generated/wrappedlibvdpauundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvorbisdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibvorbistypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibvorbisundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11types.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11xcbdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11xcbtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibx11xcbundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxaudefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxautypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxauundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri2defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri2types.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri3defs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri3types.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbdri3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbglxdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbglxtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbglxundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbicccmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbicccmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbicccmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbimagedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbimagetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbimageundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbkeysymsdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbkeysymstypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbkeysymsundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbpresentdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbpresenttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbpresentundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrandrdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrandrtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrandrundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrenderdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrendertypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrenderundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrenderutildefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrenderutiltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbrenderutilundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshapedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshapetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshapeundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbshmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbsyncdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbsynctypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbsyncundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbutildefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbutiltypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbutilundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxfixesdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxfixestypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxfixesundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxineramadefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxineramatypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxineramaundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxkbdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxkbtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxkbundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxtestdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxtesttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcbxtestundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcompositedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcompositetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcompositeundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcursordefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcursortypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxcursorundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdamagedefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdamagetypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdamageundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdmcpdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdmcptypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxdmcpundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxextdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxexttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxextundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxfixesdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxfixestypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxfixesundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxftdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxfttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxftundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxidefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxitypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxiundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxmudefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxmutypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxmuundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpresentdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpresenttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxpresentundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrandrdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrandrtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrandrundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrenderdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrendertypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxrenderundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxssdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxsstypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxssundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxtdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxtstdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxtsttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxtstundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxttypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxtundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxxf86vmdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibxxf86vmtypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibxxf86vmundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibzdefs.h2
-rw-r--r--src/wrapped/generated/wrappedlibztypes.h2
-rw-r--r--src/wrapped/generated/wrappedlibzundefs.h2
-rw-r--r--src/wrapped/generated/wrappedlzmadefs.h2
-rw-r--r--src/wrapped/generated/wrappedlzmatypes.h6
-rw-r--r--src/wrapped/generated/wrappedlzmaundefs.h2
-rw-r--r--src/wrapped/generated/wrappedmpg123defs.h2
-rw-r--r--src/wrapped/generated/wrappedmpg123types.h2
-rw-r--r--src/wrapped/generated/wrappedmpg123undefs.h2
-rw-r--r--src/wrapped/generated/wrappednotifydefs.h2
-rw-r--r--src/wrapped/generated/wrappednotifytypes.h2
-rw-r--r--src/wrapped/generated/wrappednotifyundefs.h2
-rw-r--r--src/wrapped/generated/wrappednsldefs.h2
-rw-r--r--src/wrapped/generated/wrappednsltypes.h2
-rw-r--r--src/wrapped/generated/wrappednslundefs.h2
-rw-r--r--src/wrapped/generated/wrappednspr4defs.h2
-rw-r--r--src/wrapped/generated/wrappednspr4types.h2
-rw-r--r--src/wrapped/generated/wrappednspr4undefs.h2
-rw-r--r--src/wrapped/generated/wrappednss3defs.h2
-rw-r--r--src/wrapped/generated/wrappednss3types.h2
-rw-r--r--src/wrapped/generated/wrappednss3undefs.h2
-rw-r--r--src/wrapped/generated/wrappednssutil3defs.h2
-rw-r--r--src/wrapped/generated/wrappednssutil3types.h2
-rw-r--r--src/wrapped/generated/wrappednssutil3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedopenaldefs.h2
-rw-r--r--src/wrapped/generated/wrappedopenaltypes.h2
-rw-r--r--src/wrapped/generated/wrappedopenalundefs.h2
-rw-r--r--src/wrapped/generated/wrappedpangocairodefs.h2
-rw-r--r--src/wrapped/generated/wrappedpangocairotypes.h2
-rw-r--r--src/wrapped/generated/wrappedpangocairoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedpangodefs.h2
-rw-r--r--src/wrapped/generated/wrappedpangoft2defs.h2
-rw-r--r--src/wrapped/generated/wrappedpangoft2types.h2
-rw-r--r--src/wrapped/generated/wrappedpangoft2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedpangotypes.h2
-rw-r--r--src/wrapped/generated/wrappedpangoundefs.h2
-rw-r--r--src/wrapped/generated/wrappedplc4defs.h2
-rw-r--r--src/wrapped/generated/wrappedplc4types.h2
-rw-r--r--src/wrapped/generated/wrappedplc4undefs.h2
-rw-r--r--src/wrapped/generated/wrappedplds4defs.h2
-rw-r--r--src/wrapped/generated/wrappedplds4types.h2
-rw-r--r--src/wrapped/generated/wrappedplds4undefs.h2
-rw-r--r--src/wrapped/generated/wrappedpng16defs.h2
-rw-r--r--src/wrapped/generated/wrappedpng16types.h2
-rw-r--r--src/wrapped/generated/wrappedpng16undefs.h2
-rw-r--r--src/wrapped/generated/wrappedpulsedefs.h2
-rw-r--r--src/wrapped/generated/wrappedpulsesimpledefs.h2
-rw-r--r--src/wrapped/generated/wrappedpulsesimpletypes.h2
-rw-r--r--src/wrapped/generated/wrappedpulsesimpleundefs.h2
-rw-r--r--src/wrapped/generated/wrappedpulsetypes.h2
-rw-r--r--src/wrapped/generated/wrappedpulseundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1defs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1imagedefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1imagetypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1imageundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1mixerdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1mixertypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1mixerundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1netdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1nettypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1netundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1sounddefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1soundtypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1soundundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1ttfdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1ttftypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1ttfundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1types.h2
-rw-r--r--src/wrapped/generated/wrappedsdl1undefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2defs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2imagedefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2imagetypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2imageundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2mixerdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2mixertypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2mixerundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2netdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2nettypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2netundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2ttfdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2ttftypes.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2ttfundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2types.h2
-rw-r--r--src/wrapped/generated/wrappedsdl2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedsecret1defs.h2
-rw-r--r--src/wrapped/generated/wrappedsecret1types.h2
-rw-r--r--src/wrapped/generated/wrappedsecret1undefs.h2
-rw-r--r--src/wrapped/generated/wrappedselinuxdefs.h2
-rw-r--r--src/wrapped/generated/wrappedselinuxtypes.h2
-rw-r--r--src/wrapped/generated/wrappedselinuxundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsmime3defs.h2
-rw-r--r--src/wrapped/generated/wrappedsmime3types.h2
-rw-r--r--src/wrapped/generated/wrappedsmime3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedsmpeg2defs.h2
-rw-r--r--src/wrapped/generated/wrappedsmpeg2types.h2
-rw-r--r--src/wrapped/generated/wrappedsmpeg2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedsmpegdefs.h2
-rw-r--r--src/wrapped/generated/wrappedsmpegtypes.h2
-rw-r--r--src/wrapped/generated/wrappedsmpegundefs.h2
-rw-r--r--src/wrapped/generated/wrappedsoftokn3defs.h2
-rw-r--r--src/wrapped/generated/wrappedsoftokn3types.h2
-rw-r--r--src/wrapped/generated/wrappedsoftokn3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedssl3defs.h2
-rw-r--r--src/wrapped/generated/wrappedssl3types.h2
-rw-r--r--src/wrapped/generated/wrappedssl3undefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbbinddefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbbindtypes.h2
-rw-r--r--src/wrapped/generated/wrappedtbbbindundefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmallocdefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmallocproxydefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmallocproxytypes.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmallocproxyundefs.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmalloctypes.h2
-rw-r--r--src/wrapped/generated/wrappedtbbmallocundefs.h2
-rw-r--r--src/wrapped/generated/wrappedtcmallocminimaldefs.h2
-rw-r--r--src/wrapped/generated/wrappedtcmallocminimaltypes.h2
-rw-r--r--src/wrapped/generated/wrappedtcmallocminimalundefs.h2
-rw-r--r--src/wrapped/generated/wrappedudev0defs.h2
-rw-r--r--src/wrapped/generated/wrappedudev0types.h2
-rw-r--r--src/wrapped/generated/wrappedudev0undefs.h2
-rw-r--r--src/wrapped/generated/wrappedudev1defs.h2
-rw-r--r--src/wrapped/generated/wrappedudev1types.h2
-rw-r--r--src/wrapped/generated/wrappedudev1undefs.h2
-rw-r--r--src/wrapped/generated/wrappedunwinddefs.h2
-rw-r--r--src/wrapped/generated/wrappedunwindtypes.h2
-rw-r--r--src/wrapped/generated/wrappedunwindundefs.h2
-rw-r--r--src/wrapped/generated/wrappedutildefs.h2
-rw-r--r--src/wrapped/generated/wrappedutiltypes.h2
-rw-r--r--src/wrapped/generated/wrappedutilundefs.h2
-rw-r--r--src/wrapped/generated/wrappedvorbisfiledefs.h2
-rw-r--r--src/wrapped/generated/wrappedvorbisfiletypes.h2
-rw-r--r--src/wrapped/generated/wrappedvorbisfileundefs.h2
-rw-r--r--src/wrapped/generated/wrappedvulkandefs.h2
-rw-r--r--src/wrapped/generated/wrappedvulkantypes.h2
-rw-r--r--src/wrapped/generated/wrappedvulkanundefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandclientdefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandclienttypes.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandclientundefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandcursordefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandcursortypes.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandcursorundefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandegldefs.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandegltypes.h2
-rw-r--r--src/wrapped/generated/wrappedwaylandeglundefs.h2
-rw-r--r--src/wrapped/generated/wrappedxineramadefs.h2
-rw-r--r--src/wrapped/generated/wrappedxineramatypes.h2
-rw-r--r--src/wrapped/generated/wrappedxineramaundefs.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommondefs.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommontypes.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommonundefs.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommonx11defs.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommonx11types.h2
-rw-r--r--src/wrapped/generated/wrappedxkbcommonx11undefs.h2
-rw-r--r--src/wrapped/generated/wrappedxml2defs.h2
-rw-r--r--src/wrapped/generated/wrappedxml2types.h2
-rw-r--r--src/wrapped/generated/wrappedxml2undefs.h2
-rw-r--r--src/wrapped/generated/wrappedxshmfencedefs.h2
-rw-r--r--src/wrapped/generated/wrappedxshmfencetypes.h2
-rw-r--r--src/wrapped/generated/wrappedxshmfenceundefs.h2
-rw-r--r--src/wrapped/generated/wrappedxsltdefs.h2
-rw-r--r--src/wrapped/generated/wrappedxslttypes.h2
-rw-r--r--src/wrapped/generated/wrappedxsltundefs.h2
-rw-r--r--src/wrapped/generated/wrapper.c385
-rw-r--r--src/wrapped/generated/wrapper.h141
-rw-r--r--src/wrapped/wrappedatk.c8
-rw-r--r--src/wrapped/wrappedatomic_private.h2
-rw-r--r--src/wrapped/wrappedatspi.c4
-rw-r--r--src/wrapped/wrappedbz2.c4
-rw-r--r--src/wrapped/wrappedcap.c18
-rw-r--r--src/wrapped/wrappedcap_private.h62
-rw-r--r--src/wrapped/wrappedcrypto.c292
-rw-r--r--src/wrapped/wrappedcrypto3.c55
-rw-r--r--src/wrapped/wrappedcrypto3_private.h88
-rw-r--r--src/wrapped/wrappedcrypto_private.h92
-rw-r--r--src/wrapped/wrappedcurl.c22
-rw-r--r--src/wrapped/wrappedd3dadapter9.c10
-rw-r--r--src/wrapped/wrappeddbus.c46
-rw-r--r--src/wrapped/wrappeddbus_private.h2
-rw-r--r--src/wrapped/wrappeddbusglib1.c48
-rw-r--r--src/wrapped/wrappedexpat.c188
-rw-r--r--src/wrapped/wrappedfaudio.c120
-rw-r--r--src/wrapped/wrappedflac.c118
-rw-r--r--src/wrapped/wrappedfreetype.c86
-rw-r--r--src/wrapped/wrappedgconf2.c16
-rw-r--r--src/wrapped/wrappedgcrypt_private.h2
-rw-r--r--src/wrapped/wrappedgdk3.c67
-rw-r--r--src/wrapped/wrappedgdk3_private.h10
-rw-r--r--src/wrapped/wrappedgdkpixbuf2.c8
-rw-r--r--src/wrapped/wrappedgdkx112.c14
-rw-r--r--src/wrapped/wrappedgio2.c164
-rw-r--r--src/wrapped/wrappedgio2_private.h14
-rw-r--r--src/wrapped/wrappedglib2.c248
-rw-r--r--src/wrapped/wrappedglib2_private.h4
-rw-r--r--src/wrapped/wrappedgnutls.c24
-rw-r--r--src/wrapped/wrappedgnutls_private.h7
-rw-r--r--src/wrapped/wrappedgobject2.c164
-rw-r--r--src/wrapped/wrappedgobject2_private.h2
-rw-r--r--src/wrapped/wrappedgomp.c18
-rw-r--r--src/wrapped/wrappedgomp_private.h477
-rw-r--r--src/wrapped/wrappedgstbase_private.h2
-rw-r--r--src/wrapped/wrappedgstreamer.c95
-rw-r--r--src/wrapped/wrappedgstreamer_private.h24
-rw-r--r--src/wrapped/wrappedgtk3.c155
-rw-r--r--src/wrapped/wrappedgtk3_private.h12
-rw-r--r--src/wrapped/wrappedgtkx112.c194
-rw-r--r--src/wrapped/wrappedicui18n67_private.h44
-rw-r--r--src/wrapped/wrappedicui18n72_private.h47
-rw-r--r--src/wrapped/wrappedicuuc67_private.h28
-rw-r--r--src/wrapped/wrappedicuuc72_private.h28
-rw-r--r--src/wrapped/wrappedkrb5.c8
-rw-r--r--src/wrapped/wrappedldapr.c8
-rw-r--r--src/wrapped/wrappedldlinux.c9
-rw-r--r--src/wrapped/wrappedldlinux_private.h2
-rw-r--r--src/wrapped/wrappedlibasound.c16
-rw-r--r--src/wrapped/wrappedlibc.c314
-rw-r--r--src/wrapped/wrappedlibc_private.h30
-rw-r--r--src/wrapped/wrappedlibcups.c8
-rw-r--r--src/wrapped/wrappedlibdl.c19
-rw-r--r--src/wrapped/wrappedlibfuse.c294
-rw-r--r--src/wrapped/wrappedlibgl.c12
-rw-r--r--src/wrapped/wrappedlibglu.c6
-rw-r--r--src/wrapped/wrappedlibharfbuzz.c1217
-rw-r--r--src/wrapped/wrappedlibharfbuzz_private.h443
-rw-r--r--src/wrapped/wrappedlibibus.c2
-rw-r--r--src/wrapped/wrappedlibpcre.c2
-rw-r--r--src/wrapped/wrappedlibrt.c2
-rw-r--r--src/wrapped/wrappedlibsm.c10
-rw-r--r--src/wrapped/wrappedlibsndfile.c10
-rw-r--r--src/wrapped/wrappedlibssl.c173
-rw-r--r--src/wrapped/wrappedlibssl3.c47
-rw-r--r--src/wrapped/wrappedlibssl3_private.h21
-rw-r--r--src/wrapped/wrappedlibssl_private.h43
-rw-r--r--src/wrapped/wrappedlibtinfo.c2
-rw-r--r--src/wrapped/wrappedlibtinfo6.c2
-rw-r--r--src/wrapped/wrappedlibusb1.c6
-rw-r--r--src/wrapped/wrappedlibva.c69
-rw-r--r--src/wrapped/wrappedlibva_private.h4
-rw-r--r--src/wrapped/wrappedlibvdpau.c24
-rw-r--r--src/wrapped/wrappedlibvdpau_private.h2
-rw-r--r--src/wrapped/wrappedlibx11.c46
-rw-r--r--src/wrapped/wrappedlibx11_private.h8
-rw-r--r--src/wrapped/wrappedlibxcb_private.h4
-rw-r--r--src/wrapped/wrappedlibxext.c317
-rw-r--r--src/wrapped/wrappedlibxft_private.h16
-rw-r--r--src/wrapped/wrappedlibxi_private.h4
-rw-r--r--src/wrapped/wrappedlibxt.c6
-rw-r--r--src/wrapped/wrappedlibxtst.c2
-rw-r--r--src/wrapped/wrappedlibz.c71
-rw-r--r--src/wrapped/wrappedlzma.c148
-rw-r--r--src/wrapped/wrappedlzma_private.h4
-rw-r--r--src/wrapped/wrappedmpg123.c6
-rw-r--r--src/wrapped/wrappedmpg123_private.h25
-rw-r--r--src/wrapped/wrappednspr4_private.h304
-rw-r--r--src/wrapped/wrappednss3.c8
-rw-r--r--src/wrapped/wrappednss3_private.h944
-rw-r--r--src/wrapped/wrappedopenal.c12
-rw-r--r--src/wrapped/wrappedpango.c6
-rw-r--r--src/wrapped/wrappedpng16.c22
-rw-r--r--src/wrapped/wrappedpng16_private.h1
-rw-r--r--src/wrapped/wrappedpulse.c96
-rw-r--r--src/wrapped/wrappedsdl1.c8
-rw-r--r--src/wrapped/wrappedsdl1image.c2
-rw-r--r--src/wrapped/wrappedsdl1mixer.c10
-rw-r--r--src/wrapped/wrappedsdl2.c22
-rw-r--r--src/wrapped/wrappedsdl2image.c2
-rw-r--r--src/wrapped/wrappedsdl2mixer.c10
-rw-r--r--src/wrapped/wrappedsmime3.c28
-rw-r--r--src/wrapped/wrappedsmpeg.c2
-rw-r--r--src/wrapped/wrappedsmpeg2.c2
-rw-r--r--src/wrapped/wrappedudev0.c4
-rw-r--r--src/wrapped/wrappedudev1.c4
-rw-r--r--src/wrapped/wrappedvorbisfile.c10
-rw-r--r--src/wrapped/wrappedvulkan.c65
-rw-r--r--src/wrapped/wrappedvulkan_private.h11
-rw-r--r--src/wrapped/wrappedwaylandclient_private.h26
-rw-r--r--src/wrapped/wrappedxkbcommon_private.h2
-rw-r--r--src/wrapped/wrappedxml2.c394
-rw-r--r--src/wrapped/wrappedxslt.c32
856 files changed, 17848 insertions, 6348 deletions
diff --git a/src/box64context.c b/src/box64context.c
index 1fd4588a..234657ca 100644
--- a/src/box64context.c
+++ b/src/box64context.c
@@ -76,7 +76,7 @@ int unlockMutex()
 {
     int ret = unlockCustommemMutex();
     int i;
-    #ifdef DYNAREC
+    #ifdef USE_CUSTOM_MUTEX
     uint32_t tid = (uint32_t)GetTID();
     #define GO(A, B)                    \
         i = (native_lock_storeifref2_d(&A, 0, tid)==tid); \
@@ -138,11 +138,23 @@ static void init_mutexes(box64context_t* context)
 
     pthread_mutexattr_destroy(&attr);
 #else
+    #ifdef USE_CUSTOM_MUTEX
     native_lock_store(&context->mutex_trace, 0);
     native_lock_store(&context->mutex_tls, 0);
     native_lock_store(&context->mutex_thread, 0);
     native_lock_store(&context->mutex_bridge, 0);
     native_lock_store(&context->mutex_dyndump, 0);
+    #else
+    pthread_mutexattr_t attr;
+    pthread_mutexattr_init(&attr);
+    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
+    pthread_mutex_init(&context->mutex_trace, &attr);
+    pthread_mutex_init(&context->mutex_tls, &attr);
+    pthread_mutex_init(&context->mutex_thread, &attr);
+    pthread_mutex_init(&context->mutex_bridge, &attr);
+    pthread_mutex_init(&context->mutex_dyndump, &attr);
+    pthread_mutexattr_destroy(&attr);
+    #endif
     pthread_mutex_init(&context->mutex_lock, NULL);
 #endif
 }
@@ -201,6 +213,7 @@ box64context_t *NewBox64Context(int argc)
     context->local_maplib = NewLibrarian(context, 1);
     context->versym = NewDictionnary();
     context->system = NewBridge();
+    // Cannot use Bridge name as the map is not initialized yet
     // create vsyscall
     context->vsyscall = AddBridge(context->system, vFEv, x64Syscall, 0, NULL);
     // create the vsyscalls
@@ -211,6 +224,8 @@ box64context_t *NewBox64Context(int argc)
     addAlternate((void*)0xffffffffff600000, (void*)context->vsyscalls[0]);
     addAlternate((void*)0xffffffffff600400, (void*)context->vsyscalls[1]);
     addAlternate((void*)0xffffffffff600800, (void*)context->vsyscalls[2]);
+    // create exit bridge
+    context->exit_bridge = AddBridge(context->system, NULL, NULL, 0, NULL);
     // get handle to box64 itself
     context->box64lib = dlopen(NULL, RTLD_NOW|RTLD_GLOBAL);
     context->dlprivate = NewDLPrivate();
@@ -228,6 +243,24 @@ box64context_t *NewBox64Context(int argc)
     context->canary[getrand(4)] = 0;
     printf_log(LOG_DEBUG, "Setting up canary (for Stack protector) at FS:0x28, value:%08X\n", *(uint32_t*)context->canary);
 
+    // init segments
+    for(int i=0; i<16; i++) {
+        context->segtls[i].limit = (uintptr_t)-1LL;
+    }
+    context->segtls[10].key_init = 0;    // 0x53 selector
+    context->segtls[10].present = 1;
+    context->segtls[8].key_init = 0;    // 0x43 selector
+    context->segtls[8].present = 1;
+    context->segtls[6].key_init = 0;    // 0x33 selector
+    context->segtls[6].present = 1;
+    context->segtls[5].key_init = 0;    // 0x2b selector
+    context->segtls[5].present = 1;
+    context->segtls[4].key_init = 0;    // 0x23 selector
+    context->segtls[4].present = 1;
+    context->segtls[4].is32bits = 1;
+
+    context->globdata = NewMapSymbols();
+
     initAllHelpers(context);
 
     return context;
@@ -262,6 +295,8 @@ void FreeBox64Context(box64context_t** context)
     // stop trace now
     if(ctx->dec)
         DeleteX64TraceDecoder(&ctx->dec);
+    if(ctx->dec32)
+        DeleteX86TraceDecoder(&ctx->dec32);
     if(ctx->zydis)
         DeleteX64Trace(ctx);
 
@@ -320,6 +355,8 @@ void FreeBox64Context(box64context_t** context)
     if(ctx->emu_sig)
         FreeX64Emu(&ctx->emu_sig);
 
+    FreeMapSymbols(&ctx->globdata);
+
     finiAllHelpers(ctx);
 
 #ifdef DYNAREC
diff --git a/src/build_info.h b/src/build_info.h
index 45182a02..18456a4b 100644
--- a/src/build_info.h
+++ b/src/build_info.h
@@ -1,6 +1,6 @@
 #ifndef __BUILD_INFO_H__
 #define __BUILD_INFO_H__
 
-void PrintBox64Version();
+void PrintBox64Version(void);
 
 #endif //__BUILD_INFO_H__
\ No newline at end of file
diff --git a/src/custommem.c b/src/custommem.c
index f77b005c..d2b752c0 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -42,12 +42,17 @@ static uintptr_t           box64_jmptbldefault0[1<<JMPTABL_SHIFT0];
 // lock addresses
 KHASH_SET_INIT_INT64(lockaddress)
 static kh_lockaddress_t    *lockaddress = NULL;
+#ifdef USE_CUSTOM_MUTEX
 static uint32_t            mutex_prot;
 static uint32_t            mutex_blocks;
 #else
 static pthread_mutex_t     mutex_prot;
 static pthread_mutex_t     mutex_blocks;
 #endif
+#else
+static pthread_mutex_t     mutex_prot;
+static pthread_mutex_t     mutex_blocks;
+#endif
 #if defined(PAGE64K)
 #define MEMPROT_SHIFT 16
 #define MEMPROT_SHIFT2 (16+16)
@@ -111,14 +116,14 @@ typedef struct blockmark_s {
 #define PREV_BLOCK(b) (blockmark_t*)(((uintptr_t)(b) - (b)->prev.size) - sizeof(blockmark_t))
 #define LAST_BLOCK(b, s) (blockmark_t*)(((uintptr_t)(b)+(s))-sizeof(blockmark_t))
 
-static void printBlock(blockmark_t* b, void* start)
+void printBlock(blockmark_t* b, void* start)
 {
-    printf_log(LOG_INFO, "========== Block is:\n");
+    printf_log(LOG_NONE, "========== Block is:\n");
     do {
-        printf_log(LOG_INFO, "%c%p, fill=%d, size=0x%x (prev=%d/0x%x)\n", b==start?'*':' ', b, b->next.fill, b->next.size, b->prev.fill, b->prev.size);
+        printf_log(LOG_NONE, "%c%p, fill=%d, size=0x%x (prev=%d/0x%x)\n", b==start?'*':' ', b, b->next.fill, b->next.size, b->prev.fill, b->prev.size);
         b = NEXT_BLOCK(b);
     } while(b->next.x32);
-    printf_log(LOG_INFO, "===================\n");
+    printf_log(LOG_NONE, "===================\n");
 }
 
 // get first subblock free in block. Return NULL if no block, else first subblock free (mark included), filling size
@@ -182,6 +187,8 @@ static size_t getMaxFreeBlock(void* block, size_t block_size, void* start)
     }
 }
 
+#define THRESHOLD   (128-2*sizeof(blockmark_t))
+
 static void* allocBlock(void* block, void *sub, size_t size, void** pstart)
 {
     (void)block;
@@ -191,25 +198,26 @@ static void* allocBlock(void* block, void *sub, size_t size, void** pstart)
 
     s->next.fill = 1;
     // check if a new mark is worth it
-    if(s->next.size>size+2*sizeof(blockmark_t))
+    if(s->next.size>size+2*sizeof(blockmark_t)+THRESHOLD) {
+        size_t old_size = s->next.size;
         s->next.size = size;
-    blockmark_t *m = NEXT_BLOCK(s);   // this is new n
-    m->prev.fill = 1;
-    if(n!=m) {
-        // new mark
+        blockmark_t *m = NEXT_BLOCK(s);
+        m->prev.fill = 1;
         m->prev.size = s->next.size;
         m->next.fill = 0;
-        m->next.size = ((uintptr_t)n - (uintptr_t)m) - sizeof(blockmark_t);
+        m->next.size = old_size - (size + sizeof(blockmark_t));
         n->prev.fill = 0;
         n->prev.size = m->next.size;
+        n = m;
+    } else {
+        n->prev.fill = 1;
     }
 
     if(pstart && sub==*pstart) {
         // get the next free block
-        m = (blockmark_t*)*pstart;
-        while(m->next.fill)
-            m = NEXT_BLOCK(m);
-        *pstart = (void*)m;
+        while(n->next.fill)
+            n = NEXT_BLOCK(n);
+        *pstart = (void*)n;
     }
     return (void*)((uintptr_t)sub + sizeof(blockmark_t));
 }
@@ -223,7 +231,7 @@ static size_t freeBlock(void *block, void* sub, void** pstart)
     s->next.fill = 0;
     n->prev.fill = 0;
     // check if merge with previous
-    if (s->prev.x32 && !s->prev.fill) {
+    if (m!=s && s->prev.x32 && !s->prev.fill) {
         // remove s...
         m->next.size += s->next.size + sizeof(blockmark_t);
         n->prev.size = m->next.size;
@@ -236,7 +244,7 @@ static size_t freeBlock(void *block, void* sub, void** pstart)
         s->next.size += n->next.size + sizeof(blockmark_t);
         n2->prev.size = s->next.size;
     }
-    if(pstart && (uintptr_t)*pstart>(uintptr_t)sub) {
+    if(pstart && (uintptr_t)*pstart>(uintptr_t)s) {
         *pstart = (void*)s;
     }
     // return free size at current block (might be bigger)
@@ -259,7 +267,7 @@ static int expandBlock(void* block, void* sub, size_t newsize)
     if((size_t)(s->next.size + n->next.size + sizeof(blockmark_t)) < newsize)
         return 0;   // free space too short
     // ok, doing the alloc!
-    if((s->next.size+n->next.size+sizeof(blockmark_t))-newsize<2*sizeof(blockmark_t))
+    if((s->next.size+n->next.size+sizeof(blockmark_t))-newsize<THRESHOLD+2*sizeof(blockmark_t))
         s->next.size += n->next.size+sizeof(blockmark_t);
     else
         s->next.size = newsize+sizeof(blockmark_t);
@@ -284,7 +292,61 @@ static size_t sizeBlock(void* sub)
     return s->next.size;
 }
 
-#define THRESHOLD   (128-2*sizeof(blockmark_t))
+// return 1 if block is coherent, 0 if not (and printf the issues)
+int printBlockCoherent(int i)
+{
+    if(i<0 || i>=n_blocks) {
+        printf_log(LOG_NONE, "Error, %d should be between 0 and %d\n", i, n_blocks);
+        return 0;
+    }
+    int ret = 1;
+    blockmark_t* m = (blockmark_t*)p_blocks[i].block;
+    // check if first is correct
+    blockmark_t* first = getNextFreeBlock(m);
+    if(p_blocks[i].first && p_blocks[i].first!=first) {printf_log(LOG_NONE, "First %p and stored first %p differs for block %d\n", first, p_blocks[i].first, i); ret = 0;}
+    // check if maxfree is correct, with no hint
+    size_t maxfree = getMaxFreeBlock(m, p_blocks[i].size, NULL);
+    if(maxfree != p_blocks[i].maxfree) {printf_log(LOG_NONE, "Maxfree without hint %zd and stored maxfree %zd differs for block %d\n", maxfree, p_blocks[i].maxfree, i); ret = 0;}
+    // check if maxfree from first is correct
+    maxfree = getMaxFreeBlock(m, p_blocks[i].size, p_blocks[i].first);
+    if(maxfree != p_blocks[i].maxfree) {printf_log(LOG_NONE, "Maxfree with hint %zd and stored maxfree %zd differs for block %d\n", maxfree, p_blocks[i].maxfree, i); ret = 0;}
+    // check chain
+    blockmark_t* last = (blockmark_t*)(((uintptr_t)m)+p_blocks[i].size-sizeof(blockmark_t));
+    while(m<last) {
+        blockmark_t* n = NEXT_BLOCK(m);
+        if(!m->next.fill && !n->next.fill && n!=last) {
+            printf_log(LOG_NONE, "Chain contains 2 subsequent free blocks %p (%d) and %p (%d) for block %d\n", m, m->next.size, n, n->next.size, i);
+            ret = 0;
+        }
+        m = n;
+    }
+    if(m!=last) {
+        printf_log(LOG_NONE, "Last block %p is behond expexted block %p for block %d\n", m, last, i);
+        ret = 0;
+    }
+
+    return ret;
+}
+
+void testAllBlocks()
+{
+    size_t total = 0;
+    size_t fragmented_free = 0;
+    size_t max_free = 0;
+    for(int i=0; i<n_blocks; ++i) {
+        printBlockCoherent(i);
+        total += p_blocks[i].size;
+        if(max_free<p_blocks[i].maxfree)
+            max_free = p_blocks[i].maxfree;
+        blockmark_t* m = (blockmark_t*)p_blocks[i].block;
+        while(m->next.x32) {
+            if(!m->next.fill)
+                fragmented_free += m->next.size;
+            m = NEXT_BLOCK(m);
+        }
+    }
+    printf_log(LOG_NONE, "Total %d blocks, for %zd allocated memory, max_free %zd, toatal fragmented free %zd\n", n_blocks, total, max_free, fragmented_free);
+}
 
 static size_t roundSize(size_t size)
 {
@@ -315,9 +377,7 @@ void* customMalloc(size_t size)
             if(sub) {
                 if(rsize-size<THRESHOLD)
                     size = rsize;
-                void* ret = allocBlock(p_blocks[i].block, sub, size, NULL);
-                if(sub==p_blocks[i].first)
-                    p_blocks[i].first = getNextFreeBlock(sub);
+                void* ret = allocBlock(p_blocks[i].block, sub, size, &p_blocks[i].first);
                 if(rsize==p_blocks[i].maxfree)
                     p_blocks[i].maxfree = getMaxFreeBlock(p_blocks[i].block, p_blocks[i].size, p_blocks[i].first);
                 mutex_unlock(&mutex_blocks);
@@ -354,8 +414,8 @@ void* customMalloc(size_t size)
     n->prev.fill = 0;
     n->prev.size = m->next.size;
     // alloc 1st block
-    void* ret  = allocBlock(p_blocks[i].block, p, size, NULL);
-    p_blocks[i].maxfree = getMaxFreeBlock(p_blocks[i].block, p_blocks[i].size, NULL);
+    void* ret  = allocBlock(p_blocks[i].block, p, size, &p_blocks[i].first);
+    p_blocks[i].maxfree = getMaxFreeBlock(p_blocks[i].block, p_blocks[i].size, p_blocks[i].first);
     mutex_unlock(&mutex_blocks);
     return ret;
 }
@@ -378,7 +438,7 @@ void* customRealloc(void* p, size_t size)
          && (addr<((uintptr_t)p_blocks[i].block+p_blocks[i].size))) {
             void* sub = (void*)(addr-sizeof(blockmark_t));
             if(expandBlock(p_blocks[i].block, sub, size)) {
-                if(sub<p_blocks[i].first && p+size<p_blocks[i].first)
+                if(sub<p_blocks[i].first && p+size>=p_blocks[i].first)
                     p_blocks[i].first = getNextFreeBlock(sub);
                 p_blocks[i].maxfree = getMaxFreeBlock(p_blocks[i].block, p_blocks[i].size, p_blocks[i].first);
                 mutex_unlock(&mutex_blocks);
@@ -406,10 +466,7 @@ void customFree(void* p)
         if ((addr>(uintptr_t)p_blocks[i].block) 
          && (addr<((uintptr_t)p_blocks[i].block+p_blocks[i].size))) {
             void* sub = (void*)(addr-sizeof(blockmark_t));
-            void* n = NEXT_BLOCK((blockmark_t*)sub);
-            size_t newfree = freeBlock(p_blocks[i].block, sub, NULL);
-            if(sub<=p_blocks[i].first)
-                p_blocks[i].first = getPrevFreeBlock(n);
+            size_t newfree = freeBlock(p_blocks[i].block, sub, &p_blocks[i].first);
             if(p_blocks[i].maxfree < newfree) p_blocks[i].maxfree = newfree;
             mutex_unlock(&mutex_blocks);
             return;
@@ -558,10 +615,7 @@ void FreeDynarecMap(uintptr_t addr)
         if ((addr>(uintptr_t)list->chunks[i].block) 
          && (addr<((uintptr_t)list->chunks[i].block+list->chunks[i].size))) {
             void* sub = (void*)(addr-sizeof(blockmark_t));
-            void* n = NEXT_BLOCK((blockmark_t*)sub);
-            size_t newfree = freeBlock(list->chunks[i].block, sub, NULL);
-            if(sub<=list->chunks[i].first)
-                list->chunks[i].first = getPrevFreeBlock(n);
+            size_t newfree = freeBlock(list->chunks[i].block, sub, &list->chunks[i].first);
             if(list->chunks[i].maxfree < newfree)
                 list->chunks[i].maxfree = newfree;
             return;
@@ -1047,7 +1101,13 @@ void setProtection(uintptr_t addr, size_t size, uint32_t prot)
 
 void setProtection_mmap(uintptr_t addr, size_t size, uint32_t prot)
 {
-    setProtection(addr, size, prot|PROT_MMAP);
+    if(prot)
+        setProtection(addr, size, prot|PROT_MMAP);
+    else {
+        mutex_lock(&mutex_prot);
+        addMapMem(addr, addr+size-1);
+        mutex_unlock(&mutex_prot);
+    }
 }
 
 void refreshProtection(uintptr_t addr)
@@ -1311,7 +1371,7 @@ int unlockCustommemMutex()
 {
     int ret = 0;
     int i = 0;
-    #ifdef DYNAREC
+    #ifdef USE_CUSTOM_MUTEX
     uint32_t tid = (uint32_t)GetTID();
     #define GO(A, B)                    \
         i = (native_lock_storeifref2_d(&A, 0, tid)==tid); \
@@ -1344,7 +1404,7 @@ void relockCustommemMutex(int locks)
 
 static void init_mutexes(void)
 {
-    #ifdef DYNAREC
+    #ifdef USE_CUSTOM_MUTEX
     native_lock_store(&mutex_blocks, 0);
     native_lock_store(&mutex_prot, 0);
     #else
@@ -1364,6 +1424,34 @@ static void atfork_child_custommem(void)
     init_mutexes();
 }
 
+void reserveHighMem()
+{
+    char* p = getenv("BOX64_RESERVE_HIGH");
+    if(!p || p[0]=='0')
+        return; // don't reserve by default
+    intptr_t cur = 1LL<<47;
+    mapmem_t* m = mapmem;
+    while(m && (m->end<cur)) {
+        m = m->next;
+    }
+    while (m) {
+        uintptr_t addr = 0, end = 0;
+        if(m->begin>cur) {
+            void* ret = mmap64((void*)cur, m->begin-cur, 0, MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
+            printf_log(LOG_DEBUG, "Reserve %p-%p => %p (%s)\n", (void*)cur, m->begin, ret, strerror(errno));
+            printf_log(LOG_DEBUG, "mmap %p-%p\n", m->begin, m->end);
+            if(ret!=(void*)-1) {
+                addr = cur;
+                end = m->begin;
+            }
+        }
+        cur = m->end + 1;
+        m = m->next;
+        if(addr)
+            addMapMem(addr, end);
+    }
+}
+
 void init_custommem_helper(box64context_t* ctx)
 {
     (void)ctx;
@@ -1392,6 +1480,7 @@ void init_custommem_helper(box64context_t* ctx)
     mapmem->begin = 0x0;
     mapmem->end = (uintptr_t)LOWEST - 1;
     loadProtectionFromMap();
+    reserveHighMem();
     // check if PageSize is correctly defined
     if(box64_pagesize != (1<<MEMPROT_SHIFT)) {
         printf_log(LOG_NONE, "Error: PageSize configuration is wrong: configured with %d, but got %zd\n", 1<<MEMPROT_SHIFT, box64_pagesize);
@@ -1478,7 +1567,7 @@ void fini_custommem_helper(box64context_t *ctx)
         box_free(p_blocks[i].block);
         #endif
     box_free(p_blocks);
-    #ifndef DYNAREC
+    #ifndef USE_CUSTOM_MUTEX
     pthread_mutex_destroy(&mutex_prot);
     pthread_mutex_destroy(&mutex_blocks);
     #endif
diff --git a/src/dynarec/arm64/arm64_emitter.h b/src/dynarec/arm64/arm64_emitter.h
index 2d552874..7ebc0208 100644
--- a/src/dynarec/arm64/arm64_emitter.h
+++ b/src/dynarec/arm64/arm64_emitter.h
@@ -130,6 +130,7 @@
     }
 
 #define MOV64xw(Rd, imm64)   if(rex.w) {MOV64x(Rd, imm64);} else {MOV32w(Rd, imm64);}
+#define MOV64z(Rd, imm64)    if(rex.is32bits) {MOV32w(Rd, imm64);} else {MOV64x(Rd, imm64);}
 
 
 // ADD / SUB
@@ -141,6 +142,7 @@
 #define ADDSw_REG(Rd, Rn, Rm)               EMIT(ADDSUB_REG_gen(0, 0, 1, 0b00, Rm, 0, Rn, Rd))
 #define ADDw_REG_LSL(Rd, Rn, Rm, lsl)       EMIT(ADDSUB_REG_gen(0, 0, 0, 0b00, Rm, lsl, Rn, Rd))
 #define ADDxw_REG(Rd, Rn, Rm)               EMIT(ADDSUB_REG_gen(rex.w, 0, 0, 0b00, Rm, 0, Rn, Rd))
+#define ADDz_REG(Rd, Rn, Rm)                EMIT(ADDSUB_REG_gen(rex.is32bits?0:1, 0, 0, 0b00, Rm, 0, Rn, Rd))
 #define ADDSxw_REG(Rd, Rn, Rm)              EMIT(ADDSUB_REG_gen(rex.w, 0, 1, 0b00, Rm, 0, Rn, Rd))
 #define ADDxw_REG_LSR(Rd, Rn, Rm, lsr)      EMIT(ADDSUB_REG_gen(rex.w, 0, 0, 0b01, Rm, lsr, Rn, Rd))
 
@@ -151,6 +153,7 @@
 #define ADDSw_U12(Rd, Rn, imm12)    EMIT(ADDSUB_IMM_gen(0, 0, 1, 0b00, (imm12)&0xfff, Rn, Rd))
 #define ADDxw_U12(Rd, Rn, imm12)    EMIT(ADDSUB_IMM_gen(rex.w, 0, 0, 0b00, (imm12)&0xfff, Rn, Rd))
 #define ADDSxw_U12(Rd, Rn, imm12)   EMIT(ADDSUB_IMM_gen(rex.w, 0, 1, 0b00, (imm12)&0xfff, Rn, Rd))
+#define ADDz_U12(Rd, Rn, imm12)     EMIT(ADDSUB_IMM_gen(rex.is32bits?0:1, 0, 0, 0b00, (imm12)&0xfff, Rn, Rd))
 
 #define SUBx_REG(Rd, Rn, Rm)                EMIT(ADDSUB_REG_gen(1, 1, 0, 0b00, Rm, 0, Rn, Rd))
 #define SUBSx_REG(Rd, Rn, Rm)               EMIT(ADDSUB_REG_gen(1, 1, 1, 0b00, Rm, 0, Rn, Rd))
@@ -160,6 +163,7 @@
 #define SUBSw_REG(Rd, Rn, Rm)               EMIT(ADDSUB_REG_gen(0, 1, 1, 0b00, Rm, 0, Rn, Rd))
 #define SUBSw_REG_LSL(Rd, Rn, Rm, lsl)      EMIT(ADDSUB_REG_gen(0, 1, 1, 0b00, Rm, lsl, Rn, Rd))
 #define SUBxw_REG(Rd, Rn, Rm)               EMIT(ADDSUB_REG_gen(rex.w, 1, 0, 0b00, Rm, 0, Rn, Rd))
+#define SUBz_REG(Rd, Rn, Rm)                EMIT(ADDSUB_REG_gen(rex.is32bits?0:1, 1, 0, 0b00, Rm, 0, Rn, Rd))
 #define SUBSxw_REG(Rd, Rn, Rm)              EMIT(ADDSUB_REG_gen(rex.w, 1, 1, 0b00, Rm, 0, Rn, Rd))
 #define CMPSx_REG(Rn, Rm)                   SUBSx_REG(xZR, Rn, Rm)
 #define CMPSw_REG(Rn, Rm)                   SUBSw_REG(wZR, Rn, Rm)
@@ -176,6 +180,7 @@
 #define SUBw_U12(Rd, Rn, imm12)     EMIT(ADDSUB_IMM_gen(0, 1, 0, 0b00, (imm12)&0xfff, Rn, Rd))
 #define SUBSw_U12(Rd, Rn, imm12)    EMIT(ADDSUB_IMM_gen(0, 1, 1, 0b00, (imm12)&0xfff, Rn, Rd))
 #define SUBxw_U12(Rd, Rn, imm12)    EMIT(ADDSUB_IMM_gen(rex.w, 1, 0, 0b00, (imm12)&0xfff, Rn, Rd))
+#define SUBz_U12(Rd, Rn, imm12)     EMIT(ADDSUB_IMM_gen(rex.is32bits?0:1, 1, 0, 0b00, (imm12)&0xfff, Rn, Rd))
 #define SUBSxw_U12(Rd, Rn, imm12)   EMIT(ADDSUB_IMM_gen(rex.w, 1, 1, 0b00, (imm12)&0xfff, Rn, Rd))
 #define CMPSx_U12(Rn, imm12)        SUBSx_U12(xZR, Rn, imm12)
 #define CMPSw_U12(Rn, imm12)        SUBSw_U12(wZR, Rn, imm12)
@@ -221,6 +226,7 @@
 #define LDRB_U12(Rt, Rn, imm12)           EMIT(LD_gen(0b00, 0b01, ((uint32_t)((imm12)))&0xfff, Rn, Rt))
 #define LDRH_U12(Rt, Rn, imm12)           EMIT(LD_gen(0b01, 0b01, ((uint32_t)((imm12)>>1))&0xfff, Rn, Rt))
 #define LDRxw_U12(Rt, Rn, imm12)          EMIT(LD_gen((rex.w)?0b11:0b10, 0b01, ((uint32_t)((imm12)>>(2+rex.w)))&0xfff, Rn, Rt))
+#define LDRz_U12(Rt, Rn, imm12)           EMIT(LD_gen((rex.is32bits)?0b10:0b11, 0b01, ((uint32_t)((imm12)>>(rex.is32bits?2:3)))&0xfff, Rn, Rt))
 
 #define LDS_gen(size, op1, imm12, Rn, Rt)       ((size)<<30 | 0b111<<27 | (op1)<<24 | 0b10<<22 | (imm12)<<10 | (Rn)<<5 | (Rt))
 #define LDRSW_U12(Rt, Rn, imm12)          EMIT(LDS_gen(0b10, 0b01, ((uint32_t)((imm12)>>2))&0xfff, Rn, Rt))
@@ -232,6 +238,7 @@
 #define LDRw_REG(Rt, Rn, Rm)            EMIT(LDR_REG_gen(0b10, Rm, 0b011, 0, Rn, Rt))
 #define LDRw_REG_LSL2(Rt, Rn, Rm)       EMIT(LDR_REG_gen(0b10, Rm, 0b011, 1, Rn, Rt))
 #define LDRxw_REG(Rt, Rn, Rm)           EMIT(LDR_REG_gen(0b10+rex.w, Rm, 0b011, 0, Rn, Rt))
+#define LDRz_REG(Rt, Rn, Rm)            EMIT(LDR_REG_gen(rex.is32bits?0b10:0b11, Rm, 0b011, 0, Rn, Rt))
 #define LDRB_REG(Rt, Rn, Rm)            EMIT(LDR_REG_gen(0b00, Rm, 0b011, 0, Rn, Rt))
 #define LDRH_REG(Rt, Rn, Rm)            EMIT(LDR_REG_gen(0b01, Rm, 0b011, 0, Rn, Rt))
 
@@ -253,6 +260,7 @@
 #define LDURx_I9(Rt, Rn, imm9)            EMIT(LDU_gen(0b11, 0b01, imm9, Rn, Rt))
 #define LDURw_I9(Rt, Rn, imm9)            EMIT(LDU_gen(0b10, 0b01, imm9, Rn, Rt))
 #define LDURxw_I9(Rt, Rn, imm9)           EMIT(LDU_gen((rex.w)?0b11:0b10, 0b01, imm9, Rn, Rt))
+#define LDURz_I9(Rt, Rn, imm9)            EMIT(LDU_gen((rex.is32bits)?0b10:0b11, 0b01, imm9, Rn, Rt))
 #define LDURH_I9(Rt, Rn, imm9)            EMIT(LDU_gen(0b01, 0b01, imm9, Rn, Rt))
 #define LDURB_I9(Rt, Rn, imm9)            EMIT(LDU_gen(0b00, 0b01, imm9, Rn, Rt))
 #define LDURSW_I9(Rt, Rn, imm9)           EMIT(LDU_gen(0b10, 0b10, imm9, Rn, Rt))
@@ -264,6 +272,7 @@
 #define LDURSBxw_I9(Rt, Rn, imm9)         EMIT(LDU_gen(0b00, (rex.w)?0b10:0b11, imm9, Rn, Rt))
 
 #define LDxw(A, B, C)   if(unscaled) {LDURxw_I9(A, B, C);} else {LDRxw_U12(A, B, C);}
+#define LDz(A, B, C)    if(unscaled) {LDURz_I9(A, B, C);} else {LDRz_U12(A, B, C);}
 #define LDx(A, B, C)    if(unscaled) {LDURx_I9(A, B, C);} else {LDRx_U12(A, B, C);}
 #define LDW(A, B, C)    if(unscaled) {LDURw_I9(A, B, C);} else {LDRw_U12(A, B, C);}
 #define LDH(A, B, C)    if(unscaled) {LDURH_I9(A, B, C);} else {LDRH_U12(A, B, C);}
@@ -276,6 +285,7 @@
 #define LDSBx(A, B, C)  if(unscaled) {LDURSBx_I9(A, B, C);} else {LDRSBx_U12(A, B, C);}
 #define LDSBw(A, B, C)  if(unscaled) {LDURSBw_I9(A, B, C);} else {LDRSBw_U12(A, B, C);}
 #define STxw(A, B, C)   if(unscaled) {STURxw_I9(A, B, C);} else {STRxw_U12(A, B, C);}
+#define STz(A, B, C)    if(unscaled) {STURz_I9(A, B, C);} else {STRz_U12(A, B, C);}
 #define STx(A, B, C)    if(unscaled) {STURx_I9(A, B, C);} else {STRx_U12(A, B, C);}
 #define STW(A, B, C)    if(unscaled) {STURw_I9(A, B, C);} else {STRw_U12(A, B, C);}
 #define STH(A, B, C)    if(unscaled) {STURH_I9(A, B, C);} else {STRH_U12(A, B, C);}
@@ -289,6 +299,7 @@
 #define STRw_S9_preindex(Rt, Rn, imm9)    EMIT(STR_gen(0b10, 0b00, (imm9)&0x1ff, 0b11, Rn, Rt))
 #define STRxw_S9_postindex(Rt, Rn, imm9)  EMIT(STR_gen(rex.w?0b11:0b10, 0b00, (imm9)&0x1ff, 0b01, Rn, Rt))
 #define STRB_S9_postindex(Rt, Rn, imm9)   EMIT(STR_gen(0b00, 0b00, (imm9)&0x1ff, 0b01, Rn, Rt))
+#define STRH_S9_preindex(Rt, Rn, imm9)    EMIT(STR_gen(0b01, 0b00, (imm9)&0x1ff, 0b11, Rn, Rt))
 #define STRH_S9_postindex(Rt, Rn, imm9)   EMIT(STR_gen(0b01, 0b00, (imm9)&0x1ff, 0b01, Rn, Rt))
 
 #define ST_gen(size, op1, imm12, Rn, Rt)        ((size)<<30 | 0b111<<27 | (op1)<<24 | 0b00<<22 | (imm12)<<10 | (Rn)<<5 | (Rt))
@@ -297,11 +308,13 @@
 #define STRB_U12(Rt, Rn, imm12)           EMIT(ST_gen(0b00, 0b01, ((uint32_t)((imm12)))&0xfff, Rn, Rt))
 #define STRH_U12(Rt, Rn, imm12)           EMIT(ST_gen(0b01, 0b01, ((uint32_t)((imm12)>>1))&0xfff, Rn, Rt))
 #define STRxw_U12(Rt, Rn, imm12)          EMIT(ST_gen((rex.w)?0b11:0b10, 0b01, ((uint32_t)((imm12)>>(2+rex.w)))&0xfff, Rn, Rt))
+#define STRz_U12(Rt, Rn, imm12)           EMIT(ST_gen((rex.is32bits)?0b10:0b11, 0b01, ((uint32_t)((imm12)>>(rex.is32bits?2:3)))&0xfff, Rn, Rt))
 
 #define STU_gen(size, opc, imm9, Rn, Rt)  ((size)<<30 | 0b111<<27 | (opc)<<22 | ((imm9)&0x1ff)<<12 | (Rn)<<5 | (Rt))
 #define STURx_I9(Rt, Rn, imm9)            EMIT(STU_gen(0b11, 0b00, imm9, Rn, Rt))
 #define STURw_I9(Rt, Rn, imm9)            EMIT(STU_gen(0b10, 0b00, imm9, Rn, Rt))
 #define STURxw_I9(Rt, Rn, imm9)           EMIT(STU_gen((rex.w)?0b11:0b10, 0b00, imm9, Rn, Rt))
+#define STURz_I9(Rt, Rn, imm9)            EMIT(STU_gen((rex.is32bits)?0b10:0b11, 0b00, imm9, Rn, Rt))
 #define STURH_I9(Rt, Rn, imm9)            EMIT(STU_gen(0b01, 0b00, imm9, Rn, Rt))
 #define STURB_I9(Rt, Rn, imm9)            EMIT(STU_gen(0b00, 0b00, imm9, Rn, Rt))
 
@@ -314,6 +327,7 @@
 #define STRB_REG(Rt, Rn, Rm)            EMIT(STR_REG_gen(0b00, Rm, 0b011, 0, Rn, Rt))
 #define STRH_REG(Rt, Rn, Rm)            EMIT(STR_REG_gen(0b01, Rm, 0b011, 0, Rn, Rt))
 #define STRxw_REG(Rt, Rn, Rm)           EMIT(STR_REG_gen(rex.w?0b11:0b10, Rm, 0b011, 0, Rn, Rt))
+#define STRz_REG(Rt, Rn, Rm)            EMIT(STR_REG_gen(rex.is32bits?0b10:0b11, Rm, 0b011, 0, Rn, Rt))
 
 // LOAD/STORE PAIR
 #define MEMPAIR_gen(size, L, op2, imm7, Rt2, Rn, Rt)    ((size)<<31 | 0b101<<27 | (op2)<<23 | (L)<<22 | (imm7)<<15 | (Rt2)<<10 | (Rn)<<5 | (Rt))
@@ -344,6 +358,19 @@
 #define POP2(reg1, reg2)       LDPx_S7_postindex(reg1, reg2, xRSP, 16)
 #define PUSH2(reg1, reg2)      STPx_S7_preindex(reg2, reg1, xRSP, -16)
 
+#define POP1_32(reg)            LDRw_S9_postindex(reg, xRSP, 4)
+#define PUSH1_32(reg)           STRw_S9_preindex(reg, xRSP, -4)
+#define POP2_32(reg1, reg2)     LDPw_S7_postindex(reg1, reg2, xRSP, 8)
+#define PUSH2_32(reg1, reg2)    STPw_S7_preindex(reg2, reg1, xRSP, -8)
+
+#define POP1_16(reg)            LDRH_S9_postindex(reg, xRSP, 2)
+#define PUSH1_16(reg)           STRH_S9_preindex(reg, xRSP, -2)
+
+#define POP1z(reg)              if(rex.is32bits) {POP1_32(reg);} else {POP1(reg);}
+#define PUSH1z(reg)             if(rex.is32bits) {PUSH1_32(reg);} else {PUSH1(reg);}
+#define POP2z(reg1, reg2)       if(rex.is32bits) {POP2_32(reg1, reg2);} else {POP2(reg1, reg2);}
+#define PUSH2z(reg1, reg2)      if(rex.is32bits) {PUSH2_32(reg1, reg2);} else {PUSH2(reg1, reg2);}
+
 // LOAD/STORE Acquire Exclusive
 #define MEMAX_gen(size, L, Rs, Rn, Rt)      ((size)<<30 | 0b001000<<24 | (L)<<22 | (Rs)<<16 | 1<<15 | 0b11111<<10 | (Rn)<<5 | (Rt))
 #define LDAXRB(Rt, Rn)                  EMIT(MEMAX_gen(0b00, 1, 31, Rn, Rt))
@@ -414,9 +441,11 @@
 #define CBNZx(Rt, imm19)                EMIT(CB_gen(1, 1, ((imm19)>>2)&0x7FFFF, Rt))
 #define CBNZw(Rt, imm19)                EMIT(CB_gen(0, 1, ((imm19)>>2)&0x7FFFF, Rt))
 #define CBNZxw(Rt, imm19)               EMIT(CB_gen(rex.w, 1, ((imm19)>>2)&0x7FFFF, Rt))
+#define CBNZz(Rt, imm19)                EMIT(CB_gen(rex.is32bits?0:1, 1, ((imm19)>>2)&0x7FFFF, Rt))
 #define CBZx(Rt, imm19)                 EMIT(CB_gen(1, 0, ((imm19)>>2)&0x7FFFF, Rt))
 #define CBZw(Rt, imm19)                 EMIT(CB_gen(0, 0, ((imm19)>>2)&0x7FFFF, Rt))
 #define CBZxw(Rt, imm19)                EMIT(CB_gen(rex.w, 0, ((imm19)>>2)&0x7FFFF, Rt))
+#define CBZz(Rt, imm19)                 EMIT(CB_gen(rex.is32bits?0:1, 0, ((imm19)>>2)&0x7FFFF, Rt))
 
 #define TB_gen(b5, op, b40, imm14, Rt)  ((b5)<<31 | 0b011011<<25 | (op)<<24  | (b40)<<19 | (imm14)<<5 | (Rt))
 #define TBZ(Rt, bit, imm16)             EMIT(TB_gen(((bit)>>5)&1, 0, (bit)&0x1f, ((imm16)>>2)&0x3FFF, Rt))
@@ -511,6 +540,7 @@
 #define MOVx_REG(Rd, Rm)                ORRx_REG(Rd, xZR, Rm)
 #define MOVw_REG(Rd, Rm)                ORRw_REG(Rd, xZR, Rm)
 #define MOVxw_REG(Rd, Rm)               ORRxw_REG(Rd, xZR, Rm)
+#define MOVz_REG(Rd, Rm)                if(rex.is32bits) {MOVw_REG(Rd, Rm);} else {MOVx_REG(Rd, Rm);}
 #define LSLw_IMM(Rd, Rm, lsl)           ORRw_REG_LSL(Rd, xZR, Rm, lsl)
 #define LSLx_IMM(Rd, Rm, lsl)           ORRx_REG_LSL(Rd, xZR, Rm, lsl)
 #define LSLxw_IMM(Rd, Rm, lsl)          ORRxw_REG_LSL(Rd, xZR, Rm, lsl)
@@ -923,6 +953,10 @@
 #define VSUB_16(Vd, Vn, Vm)                 EMIT(ADDSUB_vector(0, 1, 0b01, Vm, Vn, Vd))
 #define VSUB_32(Vd, Vn, Vm)                 EMIT(ADDSUB_vector(0, 1, 0b10, Vm, Vn, Vd))
 
+#define ADDSUB_scalar(U, size, Rm, Rn, Rd)  (01<<30 | (U)<<29 | 0b11110<<24 | (size)<<22 | 1<<21 | (Rm)<<16 | 0b10000<<11 | 1<<10 | (Rn)<<5 | (Rd))
+#define ADD_64(Vd, Vn, Vm)                  EMIT(ADDSUB_scalar(0, 0b11, Vm, Vn, Vd))
+#define SUB_64(Vd, Vn, Vm)                  EMIT(ADDSUB_scalar(1, 0b11, Vm, Vn, Vd))
+
 #define NEGABS_vector(Q, U, size, Rn, Rd)   ((Q)<<30 | (U)<<29 | 0b01110<<24 | (size)<<22 | 0b10000<<17 | 0b01011<<12 | 0b10<<10 | (Rn)<<5 | (Rd))
 #define NEG_8(Vd, Vn)                       EMIT(NEGABS_vector(0, 1, 0b00, Vn, Vd))
 #define NEG_16(Vd, Vn)                      EMIT(NEGABS_vector(0, 1, 0b01, Vn, Vd))
@@ -1691,6 +1725,11 @@
 #define UADDLV_16(Rd, Rn)           EMIT(ADDLV_vector(0, 1, 0b01, Rn, Rd))
 #define UADDLV_32(Rd, Rn)           EMIT(ADDLV_vector(0, 1, 0b10, Rn, Rd))
 
+// Population Count per byte
+#define CNT_vector(Q, size, Rn, Rd)     ((Q)<<30 | 0b01110<<24 | (size)<<22 | 0b10000<<17 | 0b00101<<12 | 0b10<<10 | (Rn)<<5 | (Rd))
+#define CNT_8(Rd, Rn)               EMIT(CNT_vector(0, 0b00, Rn, Rd))
+#define CNTQ_8(Rd, Rn)              EMIT(CNT_vector(1, 0b00, Rn, Rd))
+
 // MOV Immediate
 #define MOVI_vector(Q, op, abc, cmode, defgh, Rd)   ((Q)<<30 | (op)<<29 | 0b0111100000<<19 | (abc)<<16 | (cmode)<<12 | 1<<10 | (defgh)<<5 | (Rd))
 #define MOVIQ_8(Rd, imm8)           EMIT(MOVI_vector(1, 0, (((imm8)>>5)&0b111), 0b1110, ((imm8)&0b11111), Rd))
diff --git a/src/dynarec/arm64/arm64_printer.c b/src/dynarec/arm64/arm64_printer.c
index 5bace025..ead54a61 100644
--- a/src/dynarec/arm64/arm64_printer.c
+++ b/src/dynarec/arm64/arm64_printer.c
@@ -1523,6 +1523,7 @@ const char* arm64_print(uint32_t opcode, uintptr_t addr)
     // DMB ISH

     if(isMask(opcode, "11010101000000110011nnnn10111111", &a)) {

         snprintf(buff, sizeof(buff), "DMB %s", (Rn==0b1011)?"ISH":"???");

+        return buff;

     }

 

 

diff --git a/src/dynarec/arm64/dynarec_arm64_00.c b/src/dynarec/arm64/dynarec_arm64_00.c
index 7696a6ec..0e4dee33 100644
--- a/src/dynarec/arm64/dynarec_arm64_00.c
+++ b/src/dynarec/arm64/dynarec_arm64_00.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 
@@ -26,6 +25,7 @@
 #include "dynarec_arm64_helper.h"
 
 int isSimpleWrapper(wrapper_t fun);
+int isRetX87Wrapper(wrapper_t fun);
 
 uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
 {
@@ -102,7 +102,25 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             i64 = F32S;
             emit_add32c(dyn, ninst, rex, xRAX, i64, x3, x4, x5);
             break;
-
+        case 0x06:
+            if(rex.is32bits) {
+                INST_NAME("PUSH ES");
+                LDRH_U12(x1, xEmu, offsetof(x64emu_t, segs[_ES]));
+                PUSH1_32(x1);
+            } else {
+                DEFAULT;
+            }
+            break;
+        case 0x07:
+            if(rex.is32bits) {
+                INST_NAME("POP ES");
+                POP1_32(x1);
+                STRH_U12(x1, xEmu, offsetof(x64emu_t, segs[_ES]));
+                STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_ES]));
+            } else {
+                DEFAULT;
+            }
+            break;
         case 0x08:
             INST_NAME("OR Eb, Gb");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -278,7 +296,25 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             MOV64xw(x2, i64);
             emit_sbb32(dyn, ninst, rex, xRAX, x2, x3, x4);
             break;
-
+        case 0x1E:
+            if(rex.is32bits) {
+                INST_NAME("PUSH DS");
+                LDRH_U12(x1, xEmu, offsetof(x64emu_t, segs[_DS]));
+                PUSH1_32(x1);
+            } else {
+                DEFAULT;
+            }
+            break;
+        case 0x1F:
+            if(rex.is32bits) {
+                INST_NAME("POP DS");
+                POP1_32(x1);
+                STRH_U12(x1, xEmu, offsetof(x64emu_t, segs[_DS]));
+                STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_DS]));
+            } else {
+                DEFAULT;
+            }
+            break;
         case 0x20:
             INST_NAME("AND Eb, Gb");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -490,6 +526,32 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 emit_cmp32_0(dyn, ninst, rex, xRAX, x3, x4);
             break;
 
+        case 0x40:
+        case 0x41:
+        case 0x42:
+        case 0x43:
+        case 0x44:
+        case 0x45:
+        case 0x46:
+        case 0x47:
+            INST_NAME("INC Reg (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            emit_inc32(dyn, ninst, rex, gd, x1, x2);
+            break;
+        case 0x48:
+        case 0x49:
+        case 0x4A:
+        case 0x4B:
+        case 0x4C:
+        case 0x4D:
+        case 0x4E:
+        case 0x4F:
+            INST_NAME("DEC Reg (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            emit_dec32(dyn, ninst, rex, gd, x1, x2);
+            break;
         case 0x50:
         case 0x51:
         case 0x52:
@@ -504,31 +566,33 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 dyn->doublepush = 0;
             } else {
                 gd = xRAX+(opcode&0x07)+(rex.b<<3);
-                if(gd==xRSP) {
-                    MOVx_REG(x1, gd);
-                    gd = x1;
-                }
-                u32 = 0;
-                i32 = 0;
-                do {
-                    rex.rex = u32;
-                    u32 = PK(i32);
-                    i32++;
-                } while(u32>=0x40 && u32<=0x4f);
-                if(!box64_dynarec_test && u32>=0x50 && u32<=0x57 && (dyn->size>(ninst+1) && dyn->insts[ninst+1].pred_sz==1)) {
-                    // double push!
+                u32 = PK(0);
+                i32 = 1;
+                rex.rex = 0;
+                if(!rex.is32bits)
+                    while(u32>=0x40 && u32<=0x4f) {
+                        rex.rex = u32;
+                        u32 = PK(i32);
+                        i32++;
+                    }
+                if(!box64_dynarec_test && u32>=0x50 && u32<=0x57 && (dyn->size>(ninst+1) && dyn->insts[ninst+1].pred_sz==1) && gd != xRSP) {
                     u32= xRAX+(u32&0x07)+(rex.b<<3);
-                    MESSAGE(LOG_DUMP, "DOUBLE PUSH\n");
                     if(u32==xRSP) {
-                        MOVx_REG(x1, u32);
-                        u32 = x1;
+                        PUSH1z(gd);
+                    } else {
+                        // double push!
+                        MESSAGE(LOG_DUMP, "DOUBLE PUSH\n");
+                        PUSH2z(gd, u32);
+                        dyn->doublepush = 1;
                     }
-                    PUSH2(gd, u32);
-                    dyn->doublepush = 1;
-                    SKIPTEST(x1);  // disable test for this OP
                 } else {
-                    PUSH1(gd);
-                }   
+                    if (gd == xRSP) {
+                        MOVz_REG(x1, xRSP);
+                        PUSH1z(x1);
+                    } else {
+                        PUSH1z(gd);
+                    }
+                }
             }
             break;
         case 0x58:
@@ -545,58 +609,88 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 dyn->doublepop = 0;
             } else {
                 gd = xRAX+(opcode&0x07)+(rex.b<<3);
-                u32 = 0;
-                i32 = 0;
-                do {
-                    rex.rex = u32;
-                    u32 = PK(i32);
-                    i32++;
-                } while(u32>=0x40 && u32<=0x4f);
+                u32 = PK(0);
+                i32 = 1;
+                rex.rex = 0;
+                if(!rex.is32bits)
+                    while(u32>=0x40 && u32<=0x4f) {
+                        rex.rex = u32;
+                        u32 = PK(i32);
+                        i32++;
+                    }
                 if(!box64_dynarec_test && (gd!=xRSP) && u32>=0x58 && u32<=0x5f && (dyn->size>(ninst+1) && dyn->insts[ninst+1].pred_sz==1)) {
                     // double pop!
                     u32= xRAX+(u32&0x07)+(rex.b<<3);
                     MESSAGE(LOG_DUMP, "DOUBLE POP\n");
                     if(gd==u32) {
-                        ADDx_U12(xRSP, xRSP, 0x8);
-                        POP1(gd);
+                        ADDz_U12(xRSP, xRSP, rex.is32bits?0x4:0x8);
+                        POP1z(gd);
                     } else {
-                        POP2(gd, (u32==xRSP)?x1:u32);
+                        POP2z(gd, (u32==xRSP)?x1:u32);
                         if(u32==xRSP) {
-                            MOVx_REG(u32, x1);
+                            MOVz_REG(u32, x1);
                         }
                     }
                     dyn->doublepop = 1;
                     SKIPTEST(x1);  // disable test for this OP
                 } else {
                     if(gd == xRSP) {
-                        POP1(x1);
-                        MOVx_REG(gd, x1);
+                        POP1z(x1);
+                        MOVz_REG(gd, x1);
                     } else {
-                        POP1(gd);
+                        POP1z(gd);
                     }
                 }
             }
             break;
+        case 0x60:
+            if(rex.is32bits) {
+                INST_NAME("PUSHAD");
+                MOVw_REG(x1, xRSP);
+                PUSH2_32(xRAX, xRCX);
+                PUSH2_32(xRDX, xRBX);
+                PUSH2_32(x1, xRBP);
+                PUSH2_32(xRSI, xRDI);
+            } else {
+                DEFAULT;
+            }
+            break;
+        case 0x61:
+            if(rex.is32bits) {
+                INST_NAME("POPAD");
+                POP2_32(xRDI, xRSI);
+                POP2_32(xRBP, x1);
+                POP2_32(xRBX, xRDX);
+                POP2_32(xRCX, xRAX);
+            } else {
+                DEFAULT;
+            }
+            break;
 
         case 0x63:
-            INST_NAME("MOVSXD Gd, Ed");
-            nextop = F8;
-            GETGD;
-            if(rex.w) {
-                if(MODREG) {   // reg <= reg
-                    SXTWx(gd, xRAX+(nextop&7)+(rex.b<<3));
-                } else {                    // mem <= reg
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);
-                    LDSW(gd, ed, fixedaddress);
-                }
+            if(rex.is32bits) {
+                // ARPL here
+                DEFAULT;                
             } else {
-                if(MODREG) {   // reg <= reg
-                    MOVw_REG(gd, xRAX+(nextop&7)+(rex.b<<3));
-                } else {                    // mem <= reg
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);
-                    LDW(gd, ed, fixedaddress);
+                INST_NAME("MOVSXD Gd, Ed");
+                nextop = F8;
+                GETGD;
+                if(rex.w) {
+                    if(MODREG) {   // reg <= reg
+                        SXTWx(gd, xRAX+(nextop&7)+(rex.b<<3));
+                    } else {                    // mem <= reg
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);
+                        LDSW(gd, ed, fixedaddress);
+                    }
+                } else {
+                    if(MODREG) {   // reg <= reg
+                        MOVw_REG(gd, xRAX+(nextop&7)+(rex.b<<3));
+                    } else {                    // mem <= reg
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);
+                        LDW(gd, ed, fixedaddress);
+                    }
                 }
             }
             break;
@@ -619,10 +713,10 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 MESSAGE(LOG_DUMP, "PUSH then RET, using indirect\n");
                 TABLE64(x3, addr-4);
                 LDRSW_U12(x1, x3, 0);
-                PUSH1(x1);
+                PUSH1z(x1);
             } else {
-                MOV64x(x3, i64);
-                PUSH1(x3);
+                MOV64z(x3, i64);
+                PUSH1z(x3);
             }
             break;
         case 0x69:
@@ -661,8 +755,8 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         case 0x6A:
             INST_NAME("PUSH Ib");
             i64 = F8S;
-            MOV64x(x3, i64);
-            PUSH1(x3);
+            MOV64z(x3, i64);
+            PUSH1z(x3);
             break;
         case 0x6B:
             INST_NAME("IMUL Gd, Ed, Ib");
@@ -698,6 +792,18 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }
             break;
 
+        case 0x6D:
+            INST_NAME("INSD");
+            SETFLAGS(X_ALL, SF_SET);    // Hack to set flags in "don't care" state
+            GETIP(ip);
+            STORE_XEMU_CALL(xRIP);
+            CALL(native_priv, -1);
+            LOAD_XEMU_CALL(xRIP);
+            jump_to_epilog(dyn, 0, xRIP, ninst);
+            *need_epilog = 0;
+            *ok = 0;
+            break;
+
         #define GO(GETFLAGS, NO, YES, F)                                \
             READFLAGS(F);                                               \
             i8 = F8S;                                                   \
@@ -727,7 +833,13 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         GOCOND(0x70, "J", "ib");
 
         #undef GO
-        
+
+        case 0x82:
+            if(!rex.is32bits) {
+                DEFAULT;
+                return ip;
+            }
+            // fallthru
         case 0x80:
             nextop = F8;
             switch((nextop>>3)&7) {
@@ -1053,12 +1165,13 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         case 0x8C:
             INST_NAME("MOV Ed, Seg");
             nextop=F8;
+            u8 = (nextop&0x38)>>3;
             if((nextop&0xC0)==0xC0) {   // reg <= seg
-                LDRH_U12(xRAX+(nextop&7)+(rex.b<<3), xEmu, offsetof(x64emu_t, segs[(nextop&0x38)>>3]));
+                LDRw_U12(xRAX+(nextop&7)+(rex.b<<3), xEmu, offsetof(x64emu_t, segs[u8]));
             } else {                    // mem <= seg
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, NULL, 0, 0);
-                LDRH_U12(x3, xEmu, offsetof(x64emu_t, segs[(nextop&0x38)>>3]));
-                STH(x3, ed, fixedaddress);
+                LDRw_U12(x3, xEmu, offsetof(x64emu_t, segs[u8]));
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, NULL, 0, 0);
+                STH(x3, wback, fixedaddress);
                 SMWRITE2();
             }
             break;
@@ -1073,7 +1186,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 if(gd!=ed) {    // it's sometimes used as a 3 bytes NOP
                     MOVxw_REG(gd, ed);
                 }
-                else if(!rex.w) {
+                else if(!rex.w && !rex.is32bits) {
                     MOVw_REG(gd, gd);   //truncate the higher 32bits as asked
                 }
             }
@@ -1081,32 +1194,33 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         case 0x8E:
             INST_NAME("MOV Seg,Ew");
             nextop = F8;
+            u8 = (nextop&0x38)>>3;
             if((nextop&0xC0)==0xC0) {
                 ed = xRAX+(nextop&7)+(rex.b<<3);
             } else {
                 SMREAD();
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 1, rex, NULL, 0, 0);
-                LDH(x1, ed, fixedaddress);
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, NULL, 0, 0);
+                LDH(x1, wback, fixedaddress);
                 ed = x1;
             }
-            STRw_U12(ed, xEmu, offsetof(x64emu_t, segs[(nextop&0x38)>>3]));
-            STRw_U12(wZR, xEmu, offsetof(x64emu_t, segs_serial[(nextop&0x38)>>3]));
+            STRw_U12(ed, xEmu, offsetof(x64emu_t, segs[u8]));
+            STRw_U12(wZR, xEmu, offsetof(x64emu_t, segs_serial[u8]));
             break;
         case 0x8F:
             INST_NAME("POP Ed");
             nextop = F8;
             if(MODREG) {
-                POP1(xRAX+(nextop&7)+(rex.b<<3));
+                POP1z(xRAX+(nextop&7)+(rex.b<<3));
             } else {
-                POP1(x2); // so this can handle POP [ESP] and maybe some variant too
+                POP1z(x2); // so this can handle POP [ESP] and maybe some variant too
                 addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<3, 7, rex, NULL, 0, 0);
                 if(ed==xRSP) {
-                    STx(x2, ed, fixedaddress);
+                    STz(x2, ed, fixedaddress);
                 } else {
                     // complicated to just allow a segfault that can be recovered correctly
-                    SUBx_U12(xRSP, xRSP, 8);
-                    STx(x2, ed, fixedaddress);
-                    ADDx_U12(xRSP, xRSP, 8);
+                    SUBz_U12(xRSP, xRSP, rex.is32bits?4:8);
+                    STz(x2, ed, fixedaddress);
+                    ADDz_U12(xRSP, xRSP, rex.is32bits?4:8);
                 }
             }
             break;
@@ -1148,27 +1262,33 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         case 0x9C:
             INST_NAME("PUSHF");
             READFLAGS(X_ALL);
-            
-            PUSH1(xFlags);
+            PUSH1z(xFlags);
             break;
         case 0x9D:
             INST_NAME("POPF");
             SETFLAGS(X_ALL, SF_SET);
-            POP1(xFlags);
+            POP1z(xFlags);
             MOV32w(x1, 0x3F7FD7);
             ANDw_REG(xFlags, xFlags, x1);
             ORRw_mask(xFlags, xFlags, 0b011111, 0);   //mask=0x00000002
             SET_DFNONE(x1);
+            if(box64_wine) {    // should this be done all the time?
+                TBZ_NEXT(xFlags, F_TF);
+                MOV64x(x1, addr);
+                STORE_XEMU_CALL(x1);
+                CALL(native_singlestep, -1);
+                BFCw(xFlags, F_TF, 1);
+            }
             break;
         case 0x9E:
             INST_NAME("SAHF");
             SETFLAGS(X_CF|X_PF|X_AF|X_ZF|X_SF, SF_SUBSET);
             MOV32w(x2, 0b11010101);
             BICw_REG(xFlags, xFlags, x2);
-            UBFXx(x1, xRAX, 8, 8);
+            UBFXw(x1, xRAX, 8, 8);
             ANDw_REG(x1, x1, x2);
             ORRw_REG(xFlags, xFlags, x1);
-            SET_DFNONE(x1);	
+            SET_DFNONE(x1);
             break;
         case 0x9F:
             INST_NAME("LAHF");
@@ -1177,28 +1297,40 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             break;
         case 0xA0:
             INST_NAME("MOV AL,Ob");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
             LDRB_U12(x2, x1, 0);
             BFIx(xRAX, x2, 0, 8);
             break;
         case 0xA1:
             INST_NAME("MOV EAX,Od");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
             LDRxw_U12(xRAX, x1, 0);
             break;
         case 0xA2:
             INST_NAME("MOV Ob,AL");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
             STRB_U12(xRAX, x1, 0);
             SMWRITE();
             break;
         case 0xA3:
             INST_NAME("MOV Od,EAX");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
             STRxw_U12(xRAX, x1, 0);
             SMWRITE();
             break;
@@ -1449,7 +1581,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 break;
             }
             break;
-        
+
 
         case 0xB0:
         case 0xB1:
@@ -1679,7 +1811,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }
             BARRIER(BARRIER_FLOAT);
             i32 = F16;
-            retn_to_epilog(dyn, ninst, i32);
+            retn_to_epilog(dyn, ninst, rex, i32);
             *need_epilog = 0;
             *ok = 0;
             break;
@@ -1690,7 +1822,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 READFLAGS(X_PEND);  // so instead, force the deferred flags, so it's not too slow, and flags are not lost
             }
             BARRIER(BARRIER_FLOAT);
-            ret_to_epilog(dyn, ninst);
+            ret_to_epilog(dyn, ninst, rex);
             *need_epilog = 0;
             *ok = 0;
             break;
@@ -1706,7 +1838,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     eb2 = (ed&4)>>2;    // L or H
                 } else {
                     eb1 = xRAX+(nextop&7)+(rex.b<<3);
-                    eb2 = 0;            
+                    eb2 = 0;
                 }
                 MOV32w(x3, u8);
                 BFIx(eb1, x3, eb2*8, 8);
@@ -1716,7 +1848,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 if(u8) {
                     MOV32w(x3, u8);
                     ed = x3;
-                } else 
+                } else
                     ed = xZR;
                 STB(ed, wback, fixedaddress);
                 SMWRITELOCK(lock);
@@ -1744,8 +1876,8 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
 
         case 0xC9:
             INST_NAME("LEAVE");
-            MOVx_REG(xRSP, xRBP);
-            POP1(xRBP);
+            MOVz_REG(xRSP, xRBP);
+            POP1z(xRBP);
             break;
 
         case 0xCC:
@@ -1770,6 +1902,9 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     x87_forget(dyn, ninst, x3, x4, 0);
                     sse_purge07cache(dyn, ninst, x3);
                     tmp = isSimpleWrapper(*(wrapper_t*)(addr));
+                    if(isRetX87Wrapper(*(wrapper_t*)(addr)))
+                        // return value will be on the stack, so the stack depth needs to be updated
+                        x87_purgecache(dyn, ninst, 0, x3, x1, x4);
                     if((box64_log<2 && !cycle_log) && tmp) {
                         //GETIP(ip+3+8+8); // read the 0xCC
                         call_n(dyn, ninst, *(void**)(addr+8), tmp);
@@ -1808,6 +1943,48 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 #endif
             }
             break;
+        case 0xCD:
+            u8 = F8;
+            if(box64_wine && u8==0x2D) {
+                INST_NAME("INT 2D");
+                // lets do nothing
+                MESSAGE(LOG_INFO, "INT 2D Windows anti-debug hack\n");
+            } else if (u8==0x80) {
+                INST_NAME("32bits SYSCALL");
+                NOTEST(x1);
+                SMEND();
+                GETIP(addr);
+                STORE_XEMU_CALL(xRIP);
+                CALL_S(x86Syscall, -1);
+                LOAD_XEMU_CALL(xRIP);
+                TABLE64(x3, addr); // expected return address
+                CMPSx_REG(xRIP, x3);
+                B_MARK(cNE);
+                LDRw_U12(w1, xEmu, offsetof(x64emu_t, quit));
+                CBZw_NEXT(w1);
+                MARK;
+                LOAD_XEMU_REM();
+                jump_to_epilog(dyn, 0, xRIP, ninst);
+            } else if(box64_wine && u8==0x29) {
+                INST_NAME("INT 0x29");
+                // __fastfail ignored!
+                MOV32w(x1, 1);
+                STRw_U12(x1, xEmu, offsetof(x64emu_t, quit));
+                jump_to_epilog(dyn, 0, xRIP, ninst);
+                *need_epilog = 0;
+                *ok = 0;
+            } else {
+                INST_NAME("INT n");
+                SETFLAGS(X_ALL, SF_SET);    // Hack to set flags in "don't care" state
+                GETIP(ip);
+                STORE_XEMU_CALL(xRIP);
+                CALL(native_priv, -1);
+                LOAD_XEMU_CALL(xRIP);
+                jump_to_epilog(dyn, 0, xRIP, ninst);
+                *need_epilog = 0;
+                *ok = 0;
+            }
+            break;
 
         case 0xCF:
             INST_NAME("IRET");
@@ -1995,7 +2172,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     MOV64xw(x4, (rex.w?64:32));
                     SUBx_REG(x3, x4, x3);
                     GETED(0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     RORxw_REG(ed, ed, x3);
                     WBACK;
@@ -2019,7 +2196,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x3, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETED(0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     RORxw_REG(ed, ed, x3);
                     WBACK;
@@ -2046,7 +2223,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x2, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETEDW(x4, x1, 0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     CALL_(rex.w?((void*)rcl64):((void*)rcl32), ed, x4);
                     WBACK;
@@ -2062,7 +2239,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x2, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETEDW(x4, x1, 0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     CALL_(rex.w?((void*)rcr64):((void*)rcr32), ed, x4);
                     WBACK;
@@ -2077,7 +2254,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x3, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETED(0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     emit_shl32(dyn, ninst, rex, ed, x3, x5, x4);
                     WBACK;
@@ -2091,7 +2268,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x3, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETED(0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     emit_shr32(dyn, ninst, rex, ed, x3, x5, x4);
                     WBACK;
@@ -2105,7 +2282,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         ANDSw_mask(x3, xRCX, 0, 0b00100);  //mask=0x00000001f
                     }
                     GETED(0);
-                    if(!rex.w && MODREG) {MOVw_REG(ed, ed);}
+                    if(!rex.w && !rex.is32bits && MODREG) {MOVw_REG(ed, ed);}
                     B_NEXT(cEQ);
                     UFLAG_OP12(ed, x3);
                     ASRxw_REG(ed, ed, x3);
@@ -2145,7 +2322,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 CHECK_CACHE()) {                                        \
                 /* out of the block */                                  \
                 i32 = dyn->insts[ninst].epilog-(dyn->native_size);      \
-                if(Z) {CBNZx(xRCX, i32);} else {CBZx(xRCX, i32);};      \
+                if(Z) {CBNZz(xRCX, i32);} else {CBZz(xRCX, i32);};      \
                 if(dyn->insts[ninst].x64.jmp_insts==-1) {               \
                     if(!(dyn->insts[ninst].x64.barrier&BARRIER_FLOAT))  \
                         fpu_purgecache(dyn, ninst, 1, x1, x2, x3);      \
@@ -2158,13 +2335,13 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             } else {                                                    \
                 /* inside the block */                                  \
                 i32 = dyn->insts[dyn->insts[ninst].x64.jmp_insts].address-(dyn->native_size);    \
-                if(Z) {CBZx(xRCX, i32);} else {CBNZx(xRCX, i32);};      \
+                if(Z) {CBZz(xRCX, i32);} else {CBNZz(xRCX, i32);};      \
             }
         case 0xE0:
             INST_NAME("LOOPNZ");
             READFLAGS(X_ZF);
             i8 = F8S;
-            SUBx_U12(xRCX, xRCX, 1);
+            SUBz_U12(xRCX, xRCX, 1);
             TBNZ_NEXT(xFlags, 1<<F_ZF);
             GO(0);
             break;
@@ -2172,14 +2349,14 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             INST_NAME("LOOPZ");
             READFLAGS(X_ZF);
             i8 = F8S;
-            SUBx_U12(xRCX, xRCX, 1);
+            SUBz_U12(xRCX, xRCX, 1);
             TBZ_NEXT(xFlags, 1<<F_ZF);
             GO(0);
             break;
         case 0xE2:
             INST_NAME("LOOP");
             i8 = F8S;
-            SUBx_U12(xRCX, xRCX, 1);
+            SUBz_U12(xRCX, xRCX, 1);
             GO(0);
             break;
         case 0xE3:
@@ -2198,9 +2375,9 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 #endif
             }
             #if STEP < 2
-            if(isNativeCall(dyn, addr+i32, &dyn->insts[ninst].natcall, &dyn->insts[ninst].retn))
+            if(!rex.is32bits && isNativeCall(dyn, addr+i32, &dyn->insts[ninst].natcall, &dyn->insts[ninst].retn))
                 tmp = dyn->insts[ninst].pass2choice = 3;
-            else 
+            else
                 tmp = dyn->insts[ninst].pass2choice = 0;
             #else
                 tmp = dyn->insts[ninst].pass2choice;
@@ -2219,10 +2396,13 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     SKIPTEST(x1);    // disable test as this hack dos 2 instructions for 1
                     // calling a native function
                     sse_purge07cache(dyn, ninst, x3);
-                    if((box64_log<2 && !cycle_log) && dyn->insts[ninst].natcall)
+                    if((box64_log<2 && !cycle_log) && dyn->insts[ninst].natcall) {
                         tmp=isSimpleWrapper(*(wrapper_t*)(dyn->insts[ninst].natcall+2));
-                    else
+                    } else
                         tmp=0;
+                    if(dyn->insts[ninst].natcall && isRetX87Wrapper(*(wrapper_t*)(dyn->insts[ninst].natcall+2)))
+                    // return value will be on the stack, so the stack depth needs to be updated
+                        x87_purgecache(dyn, ninst, 0, x3, x1, x4);
                     if((box64_log<2 && !cycle_log) && dyn->insts[ninst].natcall && tmp) {
                         //GETIP(ip+3+8+8); // read the 0xCC
                         call_n(dyn, ninst, *(void**)(dyn->insts[ninst].natcall+2+8), tmp);
@@ -2268,8 +2448,12 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         *need_epilog = 0;
                         *ok = 0;
                     }
-                    TABLE64(x2, addr);
-                    PUSH1(x2);
+                    if(rex.is32bits) {
+                        MOV32w(x2, addr);
+                    } else {
+                        TABLE64(x2, addr);
+                    }
+                    PUSH1z(x2);
                     if(box64_dynarec_callret) {
                         // Push actual return address
                         if(addr < (dyn->start+dyn->isize)) {
@@ -2286,12 +2470,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         *ok = 0;
                         *need_epilog = 0;
                     }
-                    if(addr+i32==0) {   // self modifying code maybe? so use indirect address fetching
-                        TABLE64(x4, addr-4);
-                        LDRx_U12(x4, x4, 0);
-                        jump_to_next(dyn, 0, x4, ninst);
-                    } else
-                        jump_to_next(dyn, addr+i32, 0, ninst);
+                    jump_to_next(dyn, addr+i32, 0, ninst);
                     break;
             }
             break;
@@ -2305,11 +2484,11 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 INST_NAME("JMP Ib");
                 i32 = F8S;
             }
-            JUMP(addr+i32, 0);
+            JUMP((uintptr_t)getAlternate((void*)(addr+i32)), 0);
             if(dyn->insts[ninst].x64.jmp_insts==-1) {
                 // out of the block
                 fpu_purgecache(dyn, ninst, 1, x1, x2, x3);
-                jump_to_next(dyn, addr+i32, 0, ninst);
+                jump_to_next(dyn, (uintptr_t)getAlternate((void*)(addr+i32)), 0, ninst);
             } else {
                 // inside the block
                 CacheTransform(dyn, ninst, CHECK_CACHE(), x1, x2, x3);
@@ -2324,6 +2503,21 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             *ok = 0;
             break;
 
+        case 0xEC:                      /* IN AL, DX */
+        case 0xED:                      /* IN EAX, DX */
+        case 0xEE:                      /* OUT DX, AL */
+        case 0xEF:                      /* OUT DX, EAX */
+            INST_NAME(opcode==0xEC?"IN AL, DX":(opcode==0xED?"IN EAX, DX":(opcode==0xEE?"OUT DX? AL":"OUT DX, EAX")));
+            SETFLAGS(X_ALL, SF_SET);    // Hack to set flags in "don't care" state
+            GETIP(ip);
+            STORE_XEMU_CALL(xRIP);
+            CALL(native_priv, -1);
+            LOAD_XEMU_CALL(xRIP);
+            jump_to_epilog(dyn, 0, xRIP, ninst);
+            *need_epilog = 0;
+            *ok = 0;
+            break;
+
         case 0xF0:
             addr = dynarec64_F0(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
             break;
@@ -2485,9 +2679,9 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRAX, x2);
                         MOVw_REG(xRDX, x4);
                     } else {
-                        if(ninst 
-                           && dyn->insts[ninst-1].x64.addr 
-                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31 
+                        if(ninst
+                           && dyn->insts[ninst-1].x64.addr
+                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0xD2) {
                             SET_DFNONE(x2);
                             GETED(0);
@@ -2523,7 +2717,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRDX, x4);
                     } else {
                         if(ninst && dyn->insts
-                           &&  dyn->insts[ninst-1].x64.addr 
+                           &&  dyn->insts[ninst-1].x64.addr
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x48
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0x99) {
                             SET_DFNONE(x2)
@@ -2567,7 +2761,18 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             SET_DFNONE(x1);
             ORRx_mask(xFlags, xFlags, 1, 0, 0); // xFlags | 1
             break;
-        
+        case 0xFA:                      /* STI */
+        case 0xFB:                      /* CLI */
+            INST_NAME(opcode==0xFA?"CLI":"STI");
+            SETFLAGS(X_ALL, SF_SET);    // Hack to set flags in "don't care" state
+            GETIP(ip);
+            STORE_XEMU_CALL(xRIP);
+            CALL(native_priv, -1);
+            LOAD_XEMU_CALL(xRIP);
+            jump_to_epilog(dyn, 0, xRIP, ninst);
+            *need_epilog = 0;
+            *ok = 0;
+            break;
         case 0xFC:
             INST_NAME("CLD");
             BFCw(xFlags, F_DF, 1);
@@ -2617,7 +2822,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;
                 case 2: // CALL Ed
                     INST_NAME("CALL Ed");
-                    PASS2IF((box64_dynarec_safeflags>1) || 
+                    PASS2IF((box64_dynarec_safeflags>1) ||
                         ((ninst && dyn->insts[ninst-1].x64.set_flags)
                         || ((ninst>1) && dyn->insts[ninst-2].x64.set_flags)), 1)
                     {
@@ -2625,7 +2830,7 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     } else {
                         SETFLAGS(X_ALL, SF_SET);    //Hack to put flag in "don't care" state
                     }
-                    GETEDx(0);
+                    GETEDz(0);
                     if(box64_dynarec_callret && box64_dynarec_bigblock>1) {
                         BARRIER(BARRIER_FULL);
                     } else {
@@ -2647,22 +2852,41 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         }
                         STPx_S7_preindex(x4, xRIP, xSP, -16);
                     }
-                    PUSH1(xRIP);
+                    PUSH1z(xRIP);
                     jump_to_next(dyn, 0, ed, ninst);
                     break;
                 case 4: // JMP Ed
                     INST_NAME("JMP Ed");
                     READFLAGS(X_PEND);
                     BARRIER(BARRIER_FLOAT);
-                    GETEDx(0);
+                    GETEDz(0);
                     jump_to_next(dyn, 0, ed, ninst);
                     *need_epilog = 0;
                     *ok = 0;
                     break;
+                case 5: // JMP FAR Ed
+                    if(MODREG) {
+                        DEFAULT;
+                    } else {
+                        INST_NAME("JMP FAR Ed");
+                        READFLAGS(X_PEND);
+                        BARRIER(BARRIER_FLOAT);
+                        SMREAD()
+                        addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0, 0, rex, NULL, 0, 0);
+                        LDxw(x1, wback, 0);
+                        ed = x1;
+                        LDH(x3, wback, rex.w?8:4);
+                        STW(x3, xEmu, offsetof(x64emu_t, segs[_CS]));
+                        STW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
+                        jump_to_epilog(dyn, 0, ed, ninst);
+                        *need_epilog = 0;
+                        *ok = 0;
+                    }
+                    break;
                 case 6: // Push Ed
                     INST_NAME("PUSH Ed");
-                    GETEDx(0);
-                    PUSH1(ed);
+                    GETEDz(0);
+                    PUSH1z(ed);
                     break;
 
                 default:
@@ -2673,6 +2897,6 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         default:
             DEFAULT;
     }
- 
+
      return addr;
 }
diff --git a/src/dynarec/arm64/dynarec_arm64_0f.c b/src/dynarec/arm64/dynarec_arm64_0f.c
index 4272e743..00aa61be 100644
--- a/src/dynarec/arm64/dynarec_arm64_0f.c
+++ b/src/dynarec/arm64/dynarec_arm64_0f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

@@ -332,9 +331,9 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             INST_NAME("RDTSC");

             NOTEST(x1);

             MESSAGE(LOG_DUMP, "Need Optimization\n");

-            CALL(ReadTSC, xRAX);   // will return the u64 in xEAX

-            LSRx(xRDX, xRAX, 32);

-            MOVw_REG(xRAX, xRAX);   // wipe upper part

+            CALL(ReadTSC, x3);    // will return the u64 in x3

+            LSRx(xRDX, x3, 32);

+            MOVw_REG(xRAX, x3);   // wipe upper part

             break;

 

         case 0x38:

@@ -416,7 +415,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     GETEM(q1, 1);

                     u8 = F8;

                     if(u8>15) {

-                        VEOR(q0, q0, q0);    

+                        VEOR(q0, q0, q0);

                     } else if(u8>7) {

                         d0 = fpu_get_scratch(dyn);

                         VEOR(d0, d0, d0);

@@ -498,7 +497,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             // more precise

             if(q1==q0)

                 v1 = fpu_get_scratch(dyn);

-            else 

+            else

                 v1 = q1;

             VFRSQRTEQS(v0, q0);

             VFMULQS(v1, v0, q0);

@@ -747,7 +746,6 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     FMOVSw(v0, ed);

                 }

             } else {

-                v0 = mmx_get_reg_empty(dyn, ninst, x1, x2, x3, gd);

                 addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<(2+rex.w), (1<<(2+rex.w))-1, rex, NULL, 0, 0);

                 if(rex.w) {

                     VLD64(v0, ed, fixedaddress);

@@ -1088,7 +1086,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
 

         GOCOND(0x90, "SET", "Eb");

         #undef GO

-            

+

         case 0xA2:

             INST_NAME("CPUID");

             NOTEST(x1);

@@ -1243,7 +1241,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                             CALL(rex.w?((void*)fpu_fxrstor64):((void*)fpu_fxrstor32), -1);

                         }

                         break;

-                    case 2:                 

+                    case 2:

                         INST_NAME("LDMXCSR Md");

                         GETED(0);

                         STRw_U12(ed, xEmu, offsetof(x64emu_t, mxcsr));

@@ -1594,21 +1592,21 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 case 0: VFCMEQQS(v0, v0, v1); break;   // Equal

                 case 1: VFCMGTQS(v0, v1, v0); break;   // Less than

                 case 2: VFCMGEQS(v0, v1, v0); break;   // Less or equal

-                case 3: VFCMEQQS(v0, v0, v0); 

+                case 3: VFCMEQQS(v0, v0, v0);

                         if(v0!=v1) {

-                            q0 = fpu_get_scratch(dyn); 

-                            VFCMEQQS(q0, v1, v1); 

+                            q0 = fpu_get_scratch(dyn);

+                            VFCMEQQS(q0, v1, v1);

                             VANDQ(v0, v0, q0);

                         }

-                        VMVNQ(v0, v0); 

+                        VMVNQ(v0, v0);

                         break;   // NaN (NaN is not equal to himself)

                 case 4: VFCMEQQS(v0, v0, v1); VMVNQ(v0, v0); break;   // Not Equal (or unordered on ARM, not on X86...)

                 case 5: VFCMGTQS(v0, v1, v0); VMVNQ(v0, v0); break;   // Greater or equal or unordered

                 case 6: VFCMGEQS(v0, v1, v0); VMVNQ(v0, v0); break;   // Greater or unordered

-                case 7: VFCMEQQS(v0, v0, v0); 

+                case 7: VFCMEQQS(v0, v0, v0);

                         if(v0!=v1) {

-                            q0 = fpu_get_scratch(dyn); 

-                            VFCMEQQS(q0, v1, v1); 

+                            q0 = fpu_get_scratch(dyn);

+                            VFCMEQQS(q0, v1, v1);

                             VANDQ(v0, v0, q0);

                         }

                         break;   // not NaN

@@ -1716,7 +1714,13 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             NEG_64(q0, d1);

             USHL_R_64(d0, d0, q0);

             break;

-

+        case 0xD4:

+            INST_NAME("PADDQ Gm,Em");

+            nextop = F8;

+            GETGM(v0);

+            GETEM(q0, 0);

+            ADD_64(v0, v0, q0);

+            break;

         case 0xD5:

             INST_NAME("PMULLW Gm, Em");

             nextop = F8;

@@ -1740,7 +1744,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             USHL_8(q1, q1, v0); // shift

             UADDLV_8(q1, q1);   // accumalte

             VMOVBto(gd, q1, 0);

-            break;        

+            break;

         case 0xD8:

             INST_NAME("PSUBUSB Gm, Em");

             nextop = F8;

@@ -1849,7 +1853,13 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             GETEM(q0, 0);

             SQSUB_16(v0, v0, q0);

             break;

-

+        case 0xEA:

+            INST_NAME("PMINSW Gx,Ex");

+            nextop = F8;

+            GETGM(v0);

+            GETEM(q0, 0);

+            SMIN_16(v0, v0, q0);

+            break;

         case 0xEB:

             INST_NAME("POR Gm, Em");

             nextop = F8;

@@ -1871,7 +1881,13 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             GETEM(d1, 0);

             SQADD_16(d0, d0, d1);

             break;

-        

+        case 0xEE:

+            INST_NAME("PMAXSW Gx,Ex");

+            nextop = F8;

+            GETGM(v0);

+            GETEM(q0, 0);

+            SMAX_16(v0, v0, q0);

+            break;

         case 0xEF:

             INST_NAME("PXOR Gm,Em");

             nextop = F8;

@@ -1898,7 +1914,13 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             SQXTN_32(v0, v0); // 2*q1 in 32bits now

             SSHL_32(d0, d0, v0);

             break;

-

+        case 0xF4:

+            INST_NAME("PMULUDQ Gx,Ex");

+            nextop = F8;

+            GETGX(v0, 1);

+            GETEX(v1, 0, 0);

+            VUMULL_32(v0, v0, v1);

+            break;

         case 0xF5:

             INST_NAME("PMADDWD Gm, Em");

             nextop = F8;

diff --git a/src/dynarec/arm64/dynarec_arm64_64.c b/src/dynarec/arm64/dynarec_arm64_64.c
index da2c8c4a..540ab50e 100644
--- a/src/dynarec/arm64/dynarec_arm64_64.c
+++ b/src/dynarec/arm64/dynarec_arm64_64.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -23,8 +22,6 @@
 #include "dynarec_arm64_helper.h"
 #include "dynarec_arm64_functions.h"
 
-#define GETG        gd = ((nextop&0x38)>>3)+(rex.r<<3)
-
 uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int seg, int* ok, int* need_epilog)
 {
     (void)ip; (void)rep; (void)need_epilog;
@@ -35,6 +32,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
     uint8_t gd, ed, eb1, eb2, gb1, gb2;
     uint8_t wback, wb1, wb2, wb;
     int64_t i64, j64;
+    uint64_t u64;
     int v0, v1;
     int q0;
     int d0;
@@ -56,12 +54,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the F0 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+    GETREX();
 
     switch(opcode) {
 
@@ -294,7 +287,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             GETEDO(x4, 0);
             emit_xor32(dyn, ninst, rex, gd, ed, x3, x4);
             break;
-                    
+
         case 0x39:
             INST_NAME("CMP Seg:Ed, Gd");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -316,26 +309,31 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             break;
 
         case 0x63:
-            INST_NAME("MOVSXD Gd, Ed");
-            nextop = F8;
-            GETGD;
-            if(rex.w) {
-                if(MODREG) {   // reg <= reg
-                    SXTWx(gd, xRAX+(nextop&7)+(rex.b<<3));
-                } else {                    // mem <= reg
-                    grab_segdata(dyn, addr, ninst, x4, seg);
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, NULL, 0, 0, rex, NULL, 0, 0);
-                    LDRSW_REG(gd, ed, x4);
-                }
+            if(rex.is32bits) {
+                // ARPL here
+                DEFAULT;
             } else {
-                if(MODREG) {   // reg <= reg
-                    MOVw_REG(gd, xRAX+(nextop&7)+(rex.b<<3));
-                } else {                    // mem <= reg
-                    grab_segdata(dyn, addr, ninst, x4, seg);
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, NULL, 0, 0, rex, NULL, 0, 0);
-                    LDRw_REG(gd, ed, x4);
+                INST_NAME("MOVSXD Gd, Ed");
+                nextop = F8;
+                GETGD;
+                if(rex.w) {
+                    if(MODREG) {   // reg <= reg
+                        SXTWx(gd, xRAX+(nextop&7)+(rex.b<<3));
+                    } else {                    // mem <= reg
+                        grab_segdata(dyn, addr, ninst, x4, seg);
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, NULL, 0, 0, rex, NULL, 0, 0);
+                        LDRSW_REG(gd, ed, x4);
+                    }
+                } else {
+                    if(MODREG) {   // reg <= reg
+                        MOVw_REG(gd, xRAX+(nextop&7)+(rex.b<<3));
+                    } else {                    // mem <= reg
+                        grab_segdata(dyn, addr, ninst, x4, seg);
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, NULL, 0, 0, rex, NULL, 0, 0);
+                        LDRw_REG(gd, ed, x4);
+                    }
                 }
             }
             break;
@@ -570,6 +568,66 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }
             break;
 
+        case 0x8D:
+            INST_NAME("LEA Gd, Ed");
+            nextop=F8;
+            GETGD;
+            if(MODREG) {   // reg <= reg? that's an invalid operation
+                DEFAULT;
+            } else {                    // mem <= reg
+                addr = geted(dyn, addr, ninst, nextop, &ed, gd, &fixedaddress, NULL, 0, 0, rex, NULL, 0, 0);
+                if(gd!=ed) {    // it's sometimes used as a 3 bytes NOP
+                    MOVxw_REG(gd, ed);
+                }
+                else if(!rex.w && !rex.is32bits) {
+                    MOVw_REG(gd, gd);   //truncate the higher 32bits as asked
+                }
+            }
+            break;
+
+        case 0x8F:
+            INST_NAME("POP FS:Ed");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            nextop = F8;
+            if(MODREG) {
+                POP1z(xRAX+(nextop&7)+(rex.b<<3));
+            } else {
+                POP1z(x2); // so this can handle POP [ESP] and maybe some variant too
+                addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0, 0, rex, NULL, 0, 0);
+                if(ed==xRSP) {
+                    STRz_REG(x2, ed, x4);
+                } else {
+                    // complicated to just allow a segfault that can be recovered correctly
+                    SUBz_U12(xRSP, xRSP, rex.is32bits?4:8);
+                    STRz_REG(x2, ed, x4);
+                    ADDz_U12(xRSP, xRSP, rex.is32bits?4:8);
+                }
+            }
+            break;
+
+        case 0xA1:
+            INST_NAME("MOV EAX,FS:Od");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
+            LDRxw_REG(xRAX, x1, x4);
+            break;
+
+        case 0xA3:
+            INST_NAME("MOV FS:Od,EAX");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            MOV64z(x1, u64);
+            STRxw_REG(xRAX, x1, x4);
+            SMWRITE2();
+            break;
+
         case 0xC6:
             INST_NAME("MOV Seg:Eb, Ib");
             grab_segdata(dyn, addr, ninst, x4, seg);
@@ -582,7 +640,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     eb2 = (ed&4)>>2;    // L or H
                 } else {
                     eb1 = xRAX+(nextop&7)+(rex.b<<3);
-                    eb2 = 0;            
+                    eb2 = 0;
                 }
                 MOV32w(x3, u8);
                 BFIx(eb1, x3, eb2*8, 8);
@@ -814,9 +872,10 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;
             }
             break;
-            
+
         case 0xF7:
             nextop = F8;
+            grab_segdata(dyn, addr, ninst, x6, seg);
             switch((nextop>>3)&7) {
                 case 0:
                 case 1:
@@ -894,8 +953,8 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRDX, x4);
                     } else {
                         if(ninst
-                           && dyn->insts[ninst-1].x64.addr 
-                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31 
+                           && dyn->insts[ninst-1].x64.addr
+                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0xD2) {
                             SET_DFNONE(x2);
                             GETEDO(x6, 0);
@@ -931,7 +990,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRDX, x4);
                     } else {
                         if(ninst && dyn->insts
-                           &&  dyn->insts[ninst-1].x64.addr 
+                           &&  dyn->insts[ninst-1].x64.addr
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x48
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0x99) {
                             SET_DFNONE(x2)
@@ -957,7 +1016,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;
             }
             break;
-            
+
         case 0xFF:
             nextop = F8;
             grab_segdata(dyn, addr, ninst, x6, seg);
@@ -986,7 +1045,7 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     } else {
                         SETFLAGS(X_ALL, SF_SET);    //Hack to put flag in "don't care" state
                     }
-                    GETEDOx(x6, 0);
+                    GETEDOz(x6, 0);
                     if(box64_dynarec_callret && box64_dynarec_bigblock>1) {
                         BARRIER(BARRIER_FULL);
                     } else {
@@ -1008,22 +1067,22 @@ uintptr_t dynarec64_64(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         }
                         STPx_S7_preindex(x4, xRIP, xSP, -16);
                     }
-                    PUSH1(xRIP);
+                    PUSH1z(xRIP);
                     jump_to_next(dyn, 0, ed, ninst);
                     break;
                 case 4: // JMP Ed
                     INST_NAME("JMP Ed");
                     READFLAGS(X_PEND);
                     BARRIER(BARRIER_FLOAT);
-                    GETEDOx(x6, 0);
+                    GETEDOz(x6, 0);
                     jump_to_next(dyn, 0, ed, ninst);
                     *need_epilog = 0;
                     *ok = 0;
                     break;
                 case 6: // Push Ed
                     INST_NAME("PUSH Ed");
-                    GETEDOx(x6, 0);
-                    PUSH1(ed);
+                    GETEDOz(x6, 0);
+                    PUSH1z(ed);
                     break;
 
                 default:
diff --git a/src/dynarec/arm64/dynarec_arm64_66.c b/src/dynarec/arm64/dynarec_arm64_66.c
index fa69a836..ff269cf2 100644
--- a/src/dynarec/arm64/dynarec_arm64_66.c
+++ b/src/dynarec/arm64/dynarec_arm64_66.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

@@ -50,14 +49,9 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         rep = opcode-0xF1;

         opcode = F8;

     }

-    // REX prefix before the 66 are ignored

-    rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    GETREX();

 

-    if(rex.w && opcode!=0x0f)   // rex.w cancels "66", but not for 66 0f type of prefix

+    if(rex.w && !(opcode==0x0f || opcode==0xf0 || opcode==0x64 || opcode==0x65))   // rex.w cancels "66", but not for 66 0f type of prefix

         return dynarec64_00(dyn, addr-1, ip, ninst, rex, rep, ok, need_epilog); // addr-1, to "put back" opcode

 

     switch(opcode) {

@@ -88,7 +82,7 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             emit_add16(dyn, ninst, x1, x2, x3, x4);

             BFIx(xRAX, x1, 0, 16);

             break;

-                

+

         case 0x09:

             INST_NAME("OR Ew, Gw");

             SETFLAGS(X_ALL, SF_SET_PENDING);

@@ -295,6 +289,70 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }

             break;

 

+        case 0x40:

+        case 0x41:

+        case 0x42:

+        case 0x43:

+        case 0x44:

+        case 0x45:

+        case 0x46:

+        case 0x47:

+            INST_NAME("INC Reg16 (32bits)");

+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);

+            gd = xRAX + (opcode&7);

+            UXTHw(x1, gd);

+            emit_inc16(dyn, ninst, x1, x2, x3);

+            BFIw(gd, x1, 0, 16);

+            break;

+        case 0x48:

+        case 0x49:

+        case 0x4A:

+        case 0x4B:

+        case 0x4C:

+        case 0x4D:

+        case 0x4E:

+        case 0x4F:

+            INST_NAME("DEC Reg16 (32bits)");

+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);

+            gd = xRAX + (opcode&7);

+            UXTHw(x1, gd);

+            emit_dec16(dyn, ninst, x1, x2, x3);

+            BFIw(gd, x1, 0, 16);

+            break;

+

+        case 0x60:

+            if(rex.is32bits) {

+                INST_NAME("PUSHA 16 (32bits)");

+                MOVw_REG(x1, xRSP);

+                STRH_S9_preindex(xRAX, xRSP, -2);

+                STRH_S9_preindex(xRCX, xRSP, -2);

+                STRH_S9_preindex(xRDX, xRSP, -2);

+                STRH_S9_preindex(xRBX, xRSP, -2);

+                STRH_S9_preindex(x1, xRSP, -2);

+                STRH_S9_preindex(xRBP, xRSP, -2);

+                STRH_S9_preindex(xRSI, xRSP, -2);

+                STRH_S9_preindex(xRDI, xRSP, -2);

+            } else {

+                DEFAULT;

+            }

+            break;

+        case 0x61:

+            if(rex.is32bits) {

+                INST_NAME("POPA 16 (32bits)");

+                MOVw_REG(x1, xRSP);

+                LDRH_S9_postindex(xRDI, xRSP, 2);

+                LDRH_S9_postindex(xRSI, xRSP, 2);

+                LDRH_S9_postindex(xRBP, xRSP, 2);

+                LDRH_S9_postindex(x1, xRSP, 2);

+                LDRH_S9_postindex(xRBX, xRSP, 2);

+                LDRH_S9_postindex(xRDX, xRSP, 2);

+                LDRH_S9_postindex(xRCX, xRSP, 2);

+                LDRH_S9_postindex(xRAX, xRSP, 2);

+            } else {

+                DEFAULT;

+            }

+            break;

+

         case 0x64:

             addr = dynarec64_6664(dyn, addr, ip, ninst, rex, _FS, ok, need_epilog);

             break;

@@ -425,7 +483,7 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;

             }

             break;

-            

+

         case 0x85:

             INST_NAME("TEST Ew, Gw");

             SETFLAGS(X_ALL, SF_SET_PENDING);

@@ -463,7 +521,7 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 BFIx(gd, x1, 0, 16);

             }

             break;

-            

+

         case 0x89:

             INST_NAME("MOV Ew, Gw");

             nextop = F8;

@@ -495,6 +553,19 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 BFIx(gd, x1, 0, 16);

             }

             break;

+        case 0x8C:

+            INST_NAME("MOV EW, Seg");

+            nextop=F8;

+            u8 = (nextop&0x38)>>3;

+            LDRw_U12(x3, xEmu, offsetof(x64emu_t, segs[u8]));

+            if((nextop&0xC0)==0xC0) {   // reg <= seg

+                UXTHw(xRAX+(nextop&7)+(rex.b<<3), x3);

+            } else {                    // mem <= seg

+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, NULL, 0, 0);

+                STH(x3, wback, fixedaddress);

+                SMWRITE2();

+            }

+            break;

 

             case 0x90:

             case 0x91:

@@ -521,18 +592,47 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             BFIw(xRAX, x1, 0, 16);

             break;

 

+        case 0x9C:

+            INST_NAME("PUSHF");

+            READFLAGS(X_ALL);

+            PUSH1_16(xFlags);

+            break;

+        case 0x9D:

+            INST_NAME("POPF");

+            SETFLAGS(X_ALL, SF_SET);

+            POP1_16(x1);    // probably not usefull...

+            BFIw(xFlags, x1, 0, 16);

+            MOV32w(x1, 0x3F7FD7);

+            ANDw_REG(xFlags, xFlags, x1);

+            ORRw_mask(xFlags, xFlags, 0b011111, 0);   //mask=0x00000002

+            SET_DFNONE(x1);

+            if(box64_wine) {    // should this be done all the time?

+                TBZ_NEXT(xFlags, F_TF);

+                MOV64x(x1, addr);

+                STORE_XEMU_CALL(x1);

+                CALL(native_singlestep, -1);

+                BFCw(xFlags, F_TF, 1);

+            }

+            break;

+

         case 0xA1:

             INST_NAME("MOV EAX,Od");

-            u64 = F64;

-            MOV64x(x1, u64);

+            if(rex.is32bits)

+                u64 = F32;

+            else

+                u64 = F64;

+            MOV64z(x1, u64);

             LDRH_U12(x2, x1, 0);

             BFIx(xRAX, x2, 0, 16);

             break;

 

         case 0xA3:

             INST_NAME("MOV Od,EAX");

-            u64 = F64;

-            MOV64x(x1, u64);

+            if(rex.is32bits)

+                u64 = F32;

+            else

+                u64 = F64;

+            MOV64z(x1, u64);

             STRH_U12(xRAX, x1, 0);

             SMWRITE();

             break;

@@ -564,6 +664,46 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }

             break;

 

+        case 0xA7:

+            switch(rep) {

+            case 1:

+            case 2:

+                if(rep==1) {INST_NAME("REPNZ CMPSW");} else {INST_NAME("REPZ CMPSW");}

+                MAYSETFLAGS();

+                SETFLAGS(X_ALL, SF_SET_PENDING);

+                CBZx_NEXT(xRCX);

+                TBNZ_MARK2(xFlags, F_DF);

+                MARK;   // Part with DF==0

+                LDRH_S9_postindex(x1, xRSI, 2);

+                LDRH_S9_postindex(x2, xRDI, 2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CMPSw_REG(x1, x2);

+                B_MARK3((rep==1)?cEQ:cNE);

+                CBNZx_MARK(xRCX);

+                B_MARK3_nocond;

+                MARK2;  // Part with DF==1

+                LDRH_S9_postindex(x1, xRSI, -2);

+                LDRH_S9_postindex(x2, xRDI, -2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CMPSw_REG(x1, x2);

+                B_MARK3((rep==1)?cEQ:cNE);

+                CBNZx_MARK2(xRCX);

+                MARK3;  // end

+                emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5);

+                break;

+            default:

+                INST_NAME("CMPSW");

+                SETFLAGS(X_ALL, SF_SET_PENDING);

+                GETDIR(x3, 2);

+                LDRH_U12(x1, xRSI, 0);

+                LDRH_U12(x2, xRDI, 0);

+                ADDx_REG(xRSI, xRSI, x3);

+                ADDx_REG(xRDI, xRDI, x3);

+                emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5);

+                break;

+            }

+            break;

+

         case 0xA9:

             INST_NAME("TEST AX,Iw");

             SETFLAGS(X_ALL, SF_SET_PENDING);

@@ -596,6 +736,67 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }

             break;

 

+        case 0xAD:

+            if(rep) {

+                INST_NAME("REP LODSW");

+                CBZx_NEXT(xRCX);

+                TBNZ_MARK2(xFlags, F_DF);

+                MARK;   // Part with DF==0

+                LDRH_S9_postindex(xRAX, xRSI, 2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CBNZx_MARK(xRCX);

+                B_NEXT_nocond;

+                MARK2;  // Part with DF==1

+                LDRH_S9_postindex(xRAX, xRSI, -2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CBNZx_MARK2(xRCX);

+                // done

+            } else {

+                INST_NAME("STOSW");

+                GETDIR(x3, 2);

+                LDRH_U12(xRAX, xRSI, 0);

+                ADDx_REG(xRSI, xRSI, x3);

+            }

+            break;

+

+        case 0xAF:

+            switch(rep) {

+            case 1:

+            case 2:

+                if(rep==1) {INST_NAME("REPNZ SCASW");} else {INST_NAME("REPZ SCASW");}

+                MAYSETFLAGS();

+                SETFLAGS(X_ALL, SF_SET_PENDING);

+                CBZx_NEXT(xRCX);

+                UXTHw(x1, xRAX);

+                TBNZ_MARK2(xFlags, F_DF);

+                MARK;   // Part with DF==0

+                LDRH_S9_postindex(x2, xRDI, 2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CMPSw_REG(x1, x2);

+                B_MARK3((rep==1)?cEQ:cNE);

+                CBNZx_MARK(xRCX);

+                B_MARK3_nocond;

+                MARK2;  // Part with DF==1

+                LDRH_S9_postindex(x2, xRDI, -2);

+                SUBx_U12(xRCX, xRCX, 1);

+                CMPSw_REG(x1, x2);

+                B_MARK3((rep==1)?cEQ:cNE);

+                CBNZx_MARK2(xRCX);

+                MARK3;  // end

+                emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5);

+                break;

+            default:

+                INST_NAME("SCASW");

+                SETFLAGS(X_ALL, SF_SET_PENDING);

+                GETDIR(x3, 2);

+                UXTHw(x1, xRAX);

+                LDRH_U12(x2, xRDI, 0);

+                ADDx_REG(xRDI, xRDI, x3);

+                emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5);

+                break;

+            }

+            break;

+

         case 0xB8:

         case 0xB9:

         case 0xBA:

@@ -822,7 +1023,7 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;

             }

             break;

-            

+

         case 0xF0:

             return dynarec64_66F0(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);

 

@@ -898,7 +1099,7 @@ uintptr_t dynarec64_66(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;

             }

             break;

-            

+

         case 0xFF:

             nextop = F8;

             switch((nextop>>3)&7) {

diff --git a/src/dynarec/arm64/dynarec_arm64_660f.c b/src/dynarec/arm64/dynarec_arm64_660f.c
index 8e6ebe28..509263fb 100644
--- a/src/dynarec/arm64/dynarec_arm64_660f.c
+++ b/src/dynarec/arm64/dynarec_arm64_660f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

@@ -1917,6 +1916,63 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
             break;

 

 

+        case 0xBA:

+            nextop = F8;

+            switch((nextop>>3)&7) {

+                case 4:

+                    INST_NAME("BT Ew, Ib");

+                    SETFLAGS(X_CF, SF_SUBSET);

+                    SET_DFNONE(x1);

+                    gd = x2;

+                    GETEW(x1, 1);

+                    u8 = F8;

+                    u8&=rex.w?0x3f:0x0f;

+                    BFXILxw(xFlags, ed, u8, 1);  // inject 1 bit from u8 to F_CF (i.e. pos 0)

+                    break;

+                case 5:

+                    INST_NAME("BTS Ew, Ib");

+                    SETFLAGS(X_CF, SF_SUBSET);

+                    SET_DFNONE(x1);

+                    GETEW(x1, 1);

+                    u8 = F8;

+                    u8&=(rex.w?0x3f:0x0f);

+                    BFXILxw(xFlags, ed, u8, 1);  // inject 1 bit from u8 to F_CF (i.e. pos 0)

+                    TBNZ_MARK3(xFlags, 0); // bit already set, jump to next instruction

+                    MOV32w(x4, 1);

+                    EORxw_REG_LSL(ed, ed, x4, u8);

+                    EWBACK(x1);

+                    MARK3;

+                    break;

+                case 6:

+                    INST_NAME("BTR Ew, Ib");

+                    SETFLAGS(X_CF, SF_SUBSET);

+                    SET_DFNONE(x1);

+                    GETEW(x1, 1);

+                    u8 = F8;

+                    u8&=(rex.w?0x3f:0x0f);

+                    BFXILxw(xFlags, ed, u8, 1);  // inject 1 bit from u8 to F_CF (i.e. pos 0)

+                    TBZ_MARK3(xFlags, 0); // bit already clear, jump to next instruction

+                    MOV32w(x4, 1);

+                    EORxw_REG_LSL(ed, ed, x4, u8);

+                    EWBACK(x1);

+                    MARK3;

+                    break;

+                case 7:

+                    INST_NAME("BTC Ew, Ib");

+                    SETFLAGS(X_CF, SF_SUBSET);

+                    SET_DFNONE(x1);

+                    GETEW(x1, 1);

+                    u8 = F8;

+                    u8&=(rex.w?0x3f:0x0f);

+                    BFXILxw(xFlags, ed, u8, 1);  // inject 1 bit from u8 to F_CF (i.e. pos 0)

+                    MOV32w(x4, 1);

+                    EORxw_REG_LSL(ed, ed, x4, u8);

+                    EWBACK(x1);

+                    break;

+                default:

+                    DEFAULT;

+            }

+            break;

         case 0xBB:

             INST_NAME("BTC Ew, Gw");

             SETFLAGS(X_CF, SF_SUBSET);

diff --git a/src/dynarec/arm64/dynarec_arm64_6664.c b/src/dynarec/arm64/dynarec_arm64_6664.c
index 29997ae7..0fe59473 100644
--- a/src/dynarec/arm64/dynarec_arm64_6664.c
+++ b/src/dynarec/arm64/dynarec_arm64_6664.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -22,8 +21,6 @@
 #include "dynarec_arm64_helper.h"
 #include "dynarec_arm64_functions.h"
 
-#define GETG        gd = ((nextop&0x38)>>3)+(rex.r<<3)
-
 uintptr_t dynarec64_6664(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int seg, int* ok, int* need_epilog)
 {
     (void)ip; (void)need_epilog;
@@ -37,12 +34,7 @@ uintptr_t dynarec64_6664(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
     int unscaled;
     MAYUSE(j64);
 
-    // REX prefix before the 66 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+    GETREX();
 
     /*if(rex.w && opcode!=0x0f) {   // rex.w cancels "66", but not for 66 0f type of prefix
         MESSAGE(LOG_DUMP, "Here!\n");
diff --git a/src/dynarec/arm64/dynarec_arm64_66f0.c b/src/dynarec/arm64/dynarec_arm64_66f0.c
index 40462452..3f606799 100644
--- a/src/dynarec/arm64/dynarec_arm64_66f0.c
+++ b/src/dynarec/arm64/dynarec_arm64_66f0.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -45,12 +44,8 @@ uintptr_t dynarec64_66F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the F0/66 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+
+    GETREX();
 
     switch(opcode) {
         case 0x09:
@@ -124,7 +119,7 @@ uintptr_t dynarec64_66F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                     BFIx(xRAX, x1, 0, 16);
                     SMDMB();
                     break;
-                    
+
                 case 0xC1:
                     INST_NAME("LOCK XADD Gw, Ew");
                     SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -189,7 +184,7 @@ uintptr_t dynarec64_66F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         STLXRH(x3, x1, wback);
                         CBNZx_MARKLOCK(x3);
                         B_NEXT_nocond;
-                        MARK;   // unaligned! also, not enough 
+                        MARK;   // unaligned! also, not enough
                         LDRH_U12(x1, wback, 0);
                         LDAXRB(x4, wback);
                         BFIw(x1, x4, 0, 8); // re-inject
@@ -307,7 +302,7 @@ uintptr_t dynarec64_66F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         STLXRH(x3, x1, wback);
                         CBNZx_MARKLOCK(x3);
                         B_NEXT_nocond;
-                        MARK;   // unaligned! also, not enough 
+                        MARK;   // unaligned! also, not enough
                         LDRH_U12(x1, wback, 0);
                         LDAXRB(x4, wback);
                         BFIw(x1, x4, 0, 8); // re-inject
diff --git a/src/dynarec/arm64/dynarec_arm64_67.c b/src/dynarec/arm64/dynarec_arm64_67.c
index c50e5013..04065e7a 100644
--- a/src/dynarec/arm64/dynarec_arm64_67.c
+++ b/src/dynarec/arm64/dynarec_arm64_67.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

@@ -22,14 +21,6 @@
 #include "dynarec_arm64_helper.h"

 #include "dynarec_arm64_functions.h"

 

-#define GETGX(a, w)                     \

-    gd = ((nextop&0x38)>>3)+(rex.r<<3); \

-    a = sse_get_reg(dyn, ninst, x1, gd, w)

-

-#define GETGM(a)                        \

-    gd = ((nextop&0x38)>>3);            \

-    a = mmx_get_reg(dyn, ninst, x1, x2, x3, gd)

-

 #define GETGm   gd = ((nextop&0x38)>>3)

 

 uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)

@@ -38,7 +29,7 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
 

     uint8_t opcode = F8;

     uint8_t nextop;

-    uint8_t gd, ed, wback, wb, wb1, wb2, gb1, gb2;

+    uint8_t gd, ed, wback, wb, wb1, wb2, gb1, gb2, eb1, eb2;

     int64_t fixedaddress;

     int unscaled;

     int8_t  i8;

@@ -56,12 +47,14 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
     MAYUSE(lock);

     MAYUSE(cacheupd);

 

-    // REX prefix before the 67 are ignored

-    rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

+    if(rex.is32bits) {

+        // should do a different file

+        DEFAULT;

+        return addr;

     }

+

+    GETREX();

+

     rep = 0;

     while((opcode==0xF2) || (opcode==0xF3)) {

         rep = opcode-0xF1;

@@ -173,6 +166,28 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             opcode=F8;

             switch(opcode) {

 

+                case 0x11:

+                    switch(rep) {

+                        case 0:

+                            INST_NAME("MOVUPS Ex,Gx");

+                            nextop = F8;

+                            GETG;

+                            v0 = sse_get_reg(dyn, ninst, x1, gd, 0);

+                            if(MODREG) {

+                                ed = (nextop&7)+(rex.b<<3);

+                                v1 = sse_get_reg_empty(dyn, ninst, x1, ed);

+                                VMOVQ(v1, v0);

+                            } else {

+                                addr = geted32(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0);

+                                VST128(v0, ed, fixedaddress);

+                                SMWRITE2();

+                            }

+                            break;

+                        default:

+                            DEFAULT;

+                    }

+                    break;

+

                 case 0x2E:

                     // no special check...

                 case 0x2F:

@@ -215,6 +230,20 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                                 VLD64(v0, ed, fixedaddress);

                             }

                             break;

+                        case 2:

+                            INST_NAME("MOVDQU Gx,Ex");

+                            nextop = F8;

+                            if(MODREG) {

+                                v1 = sse_get_reg(dyn, ninst, x1, (nextop&7)+(rex.b<<3), 0);

+                                GETGX_empty(v0);

+                                VMOVQ(v0, v1);

+                            } else {

+                                GETGX_empty(v0);

+                                SMREAD();

+                                addr = geted32(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0);

+                                VLD128(v0, ed, fixedaddress);

+                            }

+                            break;

                         default:

                             DEFAULT;

                     }

@@ -240,6 +269,40 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     }

                     break;

 

+                case 0xB6:

+                    INST_NAME("MOVZX Gd, Eb");

+                    nextop = F8;

+                    GETGD;

+                    if(MODREG) {

+                        if(rex.rex) {

+                            eb1 = xRAX+(nextop&7)+(rex.b<<3);

+                            eb2 = 0;                \

+                        } else {

+                            ed = (nextop&7);

+                            eb1 = xRAX+(ed&3);  // Ax, Cx, Dx or Bx

+                            eb2 = (ed&4)>>2;    // L or H

+                        }

+                        UBFXxw(gd, eb1, eb2*8, 8);

+                    } else {

+                        SMREAD();

+                        addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff, 0, rex, NULL, 0, 0);

+                        LDB(gd, ed, fixedaddress);

+                    }

+                    break;

+                case 0xB7:

+                    INST_NAME("MOVZX Gd, Ew");

+                    nextop = F8;

+                    GETGD;

+                    if(MODREG) {

+                        ed = xRAX+(nextop&7)+(rex.b<<3);

+                        UBFXxw(gd, ed, 0, 16);

+                    } else {

+                        SMREAD();

+                        addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, NULL, 0, 0);

+                        LDH(gd, ed, fixedaddress);

+                    }

+                    break;

+

                 default:

                     DEFAULT;

             }

@@ -564,6 +627,54 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 emit_cmp32_0(dyn, ninst, rex, xRAX, x3, x4);

             break;

 

+        case 0x63:

+            INST_NAME("MOVSXD Gd, Ed");

+            nextop = F8;

+            GETGD;

+            if(rex.w) {

+                if(MODREG) {   // reg <= reg

+                    SXTWx(gd, xRAX+(nextop&7)+(rex.b<<3));

+                } else {                    // mem <= reg

+                    SMREAD();

+                    addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);

+                    LDSW(gd, ed, fixedaddress);

+                }

+            } else {

+                if(MODREG) {   // reg <= reg

+                    MOVw_REG(gd, xRAX+(nextop&7)+(rex.b<<3));

+                } else {                    // mem <= reg

+                    SMREAD();

+                    addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<2, 3, rex, NULL, 0, 0);

+                    LDW(gd, ed, fixedaddress);

+                }

+            }

+            break;

+

+        case 0x66:

+            opcode=F8;

+            switch(opcode) {

+

+                case 0x89:

+                    INST_NAME("MOV Ew, Gw");

+                    nextop = F8;

+                    GETGD;  // don't need GETGW here

+                    if(MODREG) {

+                        ed = xRAX+(nextop&7)+(rex.b<<3);

+                        if(ed!=gd) {

+                            BFIx(ed, gd, 0, 16);

+                        }

+                    } else {

+                        addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff<<1, 1, rex, &lock, 0, 0);

+                        STH(gd, ed, fixedaddress);

+                        SMWRITELOCK(lock);

+                    }

+                    break;

+

+                default:

+                    DEFAULT;

+            }

+            break;

+

         case 0x81:

         case 0x83:

             nextop = F8;

@@ -641,7 +752,40 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;

             }

             break;

-            

+

+        case 0x88:

+            INST_NAME("MOV Eb, Gb");

+            nextop = F8;

+            gd = ((nextop&0x38)>>3)+(rex.r<<3);

+            if(rex.rex) {

+                gb2 = 0;

+                gb1 = xRAX + gd;

+            } else {

+                gb2 = ((gd&4)>>2);

+                gb1 = xRAX+(gd&3);

+            }

+            if(gb2) {

+                gd = x4;

+                UBFXw(gd, gb1, gb2*8, 8);

+            } else {

+                gd = gb1;   // no need to extract

+            }

+            if(MODREG) {

+                ed = (nextop&7) + (rex.b<<3);

+                if(rex.rex) {

+                    eb1 = xRAX+ed;

+                    eb2 = 0;

+                } else {

+                    eb1 = xRAX+(ed&3);  // Ax, Cx, Dx or Bx

+                    eb2 = ((ed&4)>>2);    // L or H

+                }

+                BFIx(eb1, gd, eb2*8, 8);

+            } else {

+                addr = geted32(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, &unscaled, 0xfff, 0, rex, &lock, 0, 0);

+                STB(gd, ed, fixedaddress);

+                SMWRITELOCK(lock);

+            }

+            break;

         case 0x89:

             INST_NAME("MOV Ed, Gd");

             nextop=F8;

@@ -914,9 +1058,9 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRAX, x2);

                         MOVw_REG(xRDX, x4);

                     } else {

-                        if(ninst && dyn->insts 

-                           && dyn->insts[ninst-1].x64.addr 

-                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31 

+                        if(ninst && dyn->insts

+                           && dyn->insts[ninst-1].x64.addr

+                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31

                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0xD2) {

                             SET_DFNONE(x2);

                             GETED32(0);

@@ -952,7 +1096,7 @@ uintptr_t dynarec64_67(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         MOVw_REG(xRDX, x4);

                     } else {

                         if(ninst && dyn->insts

-                           &&  dyn->insts[ninst-1].x64.addr 

+                           &&  dyn->insts[ninst-1].x64.addr

                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x48

                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0x99) {

                             SET_DFNONE(x2)

diff --git a/src/dynarec/arm64/dynarec_arm64_d8.c b/src/dynarec/arm64/dynarec_arm64_d8.c
index 8cd4b738..a363945e 100644
--- a/src/dynarec/arm64/dynarec_arm64_d8.c
+++ b/src/dynarec/arm64/dynarec_arm64_d8.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_d9.c b/src/dynarec/arm64/dynarec_arm64_d9.c
index 051f82ed..fcb44d15 100644
--- a/src/dynarec/arm64/dynarec_arm64_d9.c
+++ b/src/dynarec/arm64/dynarec_arm64_d9.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_db.c b/src/dynarec/arm64/dynarec_arm64_db.c
index 51a759fd..89743516 100644
--- a/src/dynarec/arm64/dynarec_arm64_db.c
+++ b/src/dynarec/arm64/dynarec_arm64_db.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_dc.c b/src/dynarec/arm64/dynarec_arm64_dc.c
index 4883534e..bd6c98d1 100644
--- a/src/dynarec/arm64/dynarec_arm64_dc.c
+++ b/src/dynarec/arm64/dynarec_arm64_dc.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_dd.c b/src/dynarec/arm64/dynarec_arm64_dd.c
index 38fa7d46..b2697912 100644
--- a/src/dynarec/arm64/dynarec_arm64_dd.c
+++ b/src/dynarec/arm64/dynarec_arm64_dd.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_de.c b/src/dynarec/arm64/dynarec_arm64_de.c
index 175cb38e..99d22c02 100644
--- a/src/dynarec/arm64/dynarec_arm64_de.c
+++ b/src/dynarec/arm64/dynarec_arm64_de.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_df.c b/src/dynarec/arm64/dynarec_arm64_df.c
index c9a6a9f6..c1ae66a3 100644
--- a/src/dynarec/arm64/dynarec_arm64_df.c
+++ b/src/dynarec/arm64/dynarec_arm64_df.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -178,6 +177,7 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     #else
                     MRS_fpsr(x5);
                     BFCw(x5, FPSR_IOC, 1);   // reset IOC bit
+                    BFCw(x5, FPSR_QC, 1);   // reset QC bit
                     MSR_fpsr(x5);
                     if(ST_IS_F(0)) {
                         VFCVTZSs(s0, v1);
@@ -185,13 +185,16 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         VFCVTZSd(s0, v1);
                         SQXTN_S_D(s0, s0);
                     }
-                    SQXTN_H_S(s0, s0);
-                    VST16(s0, wback, fixedaddress);
+                    VMOVSto(x3, s0, 0);
                     MRS_fpsr(x5);   // get back FPSR to check the IOC bit
-                    TBZ_MARK3(x5, FPSR_IOC);
-                    MOV32w(x5, 0x8000);
-                    STH(x5, wback, fixedaddress);
+                    TBNZ_MARK2(x5, FPSR_IOC);
+                    SXTHw(x5, x3);  // check if 16bits value is fine
+                    SUBw_REG(x5, x5, x3);
+                    CBZw_MARK3(x5);
+                    MARK2;
+                    MOV32w(x3, 0x8000);
                     MARK3;
+                    STH(x3, wback, fixedaddress);
                     #endif
                     x87_do_pop(dyn, ninst, x3);
                     break;
@@ -212,6 +215,7 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     #else
                     MRS_fpsr(x5);
                     BFCw(x5, FPSR_IOC, 1);   // reset IOC bit
+                    BFCw(x5, FPSR_QC, 1);   // reset QC bit
                     MSR_fpsr(x5);
                     if(ST_IS_F(0)) {
                         FRINTXS(s0, v1);
@@ -221,13 +225,16 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         VFCVTZSd(s0, s0);
                         SQXTN_S_D(s0, s0);
                     }
-                    SQXTN_H_S(s0, s0);
-                    VST16(s0, wback, fixedaddress);
+                    VMOVSto(x3, s0, 0);
                     MRS_fpsr(x5);   // get back FPSR to check the IOC bit
-                    TBZ_MARK3(x5, FPSR_IOC);
-                    MOV32w(x5, 0x8000);
-                    STH(x5, wback, fixedaddress);
+                    TBNZ_MARK2(x5, FPSR_IOC);
+                    SXTHw(x5, x3);  // check if 16bits value is fine
+                    SUBw_REG(x5, x5, x3);
+                    CBZw_MARK3(x5);
+                    MARK2;
+                    MOV32w(x3, 0x8000);
                     MARK3;
+                    STH(x3, wback, fixedaddress);
                     #endif
                     x87_restoreround(dyn, ninst, u8);
                     break;
@@ -257,13 +264,16 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         VFCVTZSd(s0, s0);
                         SQXTN_S_D(s0, s0);
                     }
-                    SQXTN_H_S(s0, s0);
-                    VST16(s0, wback, fixedaddress);
+                    VMOVSto(x3, s0, 0);
                     MRS_fpsr(x5);   // get back FPSR to check the IOC bit
-                    TBZ_MARK3(x5, FPSR_IOC);
-                    MOV32w(x5, 0x8000);
-                    STH(x5, wback, fixedaddress);
+                    TBNZ_MARK2(x5, FPSR_IOC);
+                    SXTHw(x5, x3);  // check if 16bits value is fine
+                    SUBw_REG(x5, x5, x3);
+                    CBZw_MARK3(x5);
+                    MARK2;
+                    MOV32w(x3, 0x8000);
                     MARK3;
+                    STH(x3, wback, fixedaddress);
                     #endif
                     x87_do_pop(dyn, ninst, x3);
                     x87_restoreround(dyn, ninst, u8);
@@ -277,10 +287,31 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;
                 case 5:
                     INST_NAME("FILD ST0, i64");
-                    v1 = x87_do_push(dyn, ninst, x1, NEON_CACHE_ST_D);
+                    v1 = x87_do_push(dyn, ninst, x1, NEON_CACHE_ST_I64);
                     addr = geted(dyn, addr, ninst, nextop, &wback, x3, &fixedaddress, &unscaled, 0xfff<<3, 7, rex, NULL, 0, 0);
-                    LDx(x1, wback, fixedaddress);
-                    SCVTFDx(v1, x1);
+                    VLD64(v1, wback, fixedaddress);
+                    if(!ST_IS_I64(0)) {
+                        if(rex.is32bits) {
+                            // need to also feed the STll stuff...
+                            ADDx_U12(x4, xEmu, offsetof(x64emu_t, fpu_ll));
+                            LDRw_U12(x1, xEmu, offsetof(x64emu_t, top));
+                            int a = 0 - dyn->n.x87stack;
+                            if(a) {
+                                if(a<0) {
+                                    SUBw_U12(x1, x1, -a);
+                                } else {
+                                    ADDw_U12(x1, x1, a);
+                                }
+                                ANDw_mask(x1, x1, 0, 2); //mask=7
+                            }
+                            ADDx_REG_LSL(x1, x4, x1, 4);    // fpu_ll is 2 i64
+                            VSTR64_U12(v1, x1, 8);  // ll
+                        }
+                        SCVTFDD(v1, v1);
+                        if(rex.is32bits) {
+                            VSTR64_U12(v1, x1, 0);  // ref
+                        }
+                    }
                     break;
                 case 6:
                     INST_NAME("FBSTP tbytes, ST0");
@@ -292,29 +323,58 @@ uintptr_t dynarec64_DF(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     break;
                 case 7:
                     INST_NAME("FISTP i64, ST0");
-                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, NEON_CACHE_ST_D);
-                    u8 = x87_setround(dyn, ninst, x1, x2, x4);
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, NEON_CACHE_ST_I64);
+                    if(!ST_IS_I64(0)) {
+                        u8 = x87_setround(dyn, ninst, x1, x2, x4);
+                    }
                     addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0xfff<<3, 7, rex, NULL, 0, 0);
                     ed = x1;
                     s0 = fpu_get_scratch(dyn);
-                    #if 0
-                    FRINT64XD(s0, v1);
-                    VFCVTZSd(s0, s0);
-                    VSTR64_U12(s0, wback, fixedaddress);
-                    #else
-                    MRS_fpsr(x5);
-                    BFCw(x5, FPSR_IOC, 1);   // reset IOC bit
-                    MSR_fpsr(x5);
-                    FRINTXD(s0, v1);
-                    VFCVTZSd(s0, s0);
-                    VST64(s0, wback, fixedaddress);
-                    MRS_fpsr(x5);   // get back FPSR to check the IOC bit
-                    TBZ_MARK3(x5, FPSR_IOC);
-                    ORRx_mask(x5, xZR, 1, 1, 0);    //0x8000000000000000
-                    STx(x5, wback, fixedaddress);
-                    MARK3;
-                    #endif
-                    x87_restoreround(dyn, ninst, u8);
+                    if(ST_IS_I64(0)) {
+                        VST64(v1, wback, fixedaddress);
+                    } else {
+                        #if 0
+                        FRINT64XD(s0, v1);
+                        VFCVTZSd(s0, s0);
+                        VSTR64_U12(s0, wback, fixedaddress);
+                        #else
+                        if(rex.is32bits) {
+                            // need to check STll first...
+                            ADDx_U12(x5, xEmu, offsetof(x64emu_t, fpu_ll));
+                            LDRw_U12(x1, xEmu, offsetof(x64emu_t, top));
+                            VMOVQDto(x3, v1, 0);
+                            int a = 0 - dyn->n.x87stack;
+                            if(a) {
+                                if(a<0) {
+                                    SUBw_U12(x1, x1, -a);
+                                } else {
+                                    ADDw_U12(x1, x1, a);
+                                }
+                                ANDw_mask(x1, x1, 0, 2); //mask=7
+                            }
+                            ADDx_REG_LSL(x1, x5, x1, 4);    // fpu_ll is 2 i64
+                            LDRx_U12(x5, x1, 0);  // ref
+                            SUBx_REG(x5, x5, x3);
+                            CBNZx_MARK2(x5);
+                            LDRx_U12(x5, x1, 8);  // ll
+                            STx(x5, wback, fixedaddress);
+                            B_MARK3(c__);
+                            MARK2;
+                        }
+                        MRS_fpsr(x5);
+                        BFCw(x5, FPSR_IOC, 1);   // reset IOC bit
+                        MSR_fpsr(x5);
+                        FRINTXD(s0, v1);
+                        VFCVTZSd(s0, s0);
+                        VST64(s0, wback, fixedaddress);
+                        MRS_fpsr(x5);   // get back FPSR to check the IOC bit
+                        TBZ_MARK3(x5, FPSR_IOC);
+                        ORRx_mask(x5, xZR, 1, 1, 0);    //0x8000000000000000
+                        STx(x5, wback, fixedaddress);
+                        MARK3;
+                        #endif
+                        x87_restoreround(dyn, ninst, u8);
+                    }
                     x87_do_pop(dyn, ninst, x3);
                     break;
                 default:
diff --git a/src/dynarec/arm64/dynarec_arm64_emit_logic.c b/src/dynarec/arm64/dynarec_arm64_emit_logic.c
index 668713a6..e8af51f5 100644
--- a/src/dynarec/arm64/dynarec_arm64_emit_logic.c
+++ b/src/dynarec/arm64/dynarec_arm64_emit_logic.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "arm64_printer.h"
 #include "dynarec_arm64_private.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_emit_math.c b/src/dynarec/arm64/dynarec_arm64_emit_math.c
index 96b1127f..f391f3a5 100644
--- a/src/dynarec/arm64/dynarec_arm64_emit_math.c
+++ b/src/dynarec/arm64/dynarec_arm64_emit_math.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "arm64_printer.h"
 #include "dynarec_arm64_private.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_emit_shift.c b/src/dynarec/arm64/dynarec_arm64_emit_shift.c
index 45add1f2..007002f0 100644
--- a/src/dynarec/arm64/dynarec_arm64_emit_shift.c
+++ b/src/dynarec/arm64/dynarec_arm64_emit_shift.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "arm64_printer.h"
 #include "dynarec_arm64_private.h"
@@ -327,7 +325,7 @@ void emit_ror32c(dynarec_arm_t* dyn, int ninst, rex_t rex, int s1, uint32_t c, i
         if(c==1) {
             LSRxw(s3, s1, rex.w?62:30);
             EORxw_REG_LSR(s3, s3, s3, 1);
-            BFIw(xFlags, s4, F_OF, 1);
+            BFIw(xFlags, s3, F_OF, 1);
         }
     }
 }
diff --git a/src/dynarec/arm64/dynarec_arm64_emit_tests.c b/src/dynarec/arm64/dynarec_arm64_emit_tests.c
index 4d032e02..447ce8c7 100644
--- a/src/dynarec/arm64/dynarec_arm64_emit_tests.c
+++ b/src/dynarec/arm64/dynarec_arm64_emit_tests.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "arm64_printer.h"
 #include "dynarec_arm64_private.h"
diff --git a/src/dynarec/arm64/dynarec_arm64_f0.c b/src/dynarec/arm64/dynarec_arm64_f0.c
index 85c17edc..4a1421cc 100644
--- a/src/dynarec/arm64/dynarec_arm64_f0.c
+++ b/src/dynarec/arm64/dynarec_arm64_f0.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -47,12 +46,8 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the F0 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+
+    GETREX();
 
     switch(opcode) {
         case 0x00:
@@ -66,14 +61,14 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     wback = xRAX + (nextop&7) + (rex.b<<3);
                     wb2 = 0;
                 } else {
-                    wback = (nextop&7);    
-                    wb2 = (wback>>2);      
+                    wback = (nextop&7);
+                    wb2 = (wback>>2);
                     wback = xRAX+(wback&3);
                 }
-                UBFXw(x1, wback, wb2*8, 8);   
+                UBFXw(x1, wback, wb2*8, 8);
                 emit_add8(dyn, ninst, x1, x2, x4, x3);
                 BFIx(wback, x1, wb2*8, 8);
-            } else {                   
+            } else {
                 addr = geted(dyn, addr, ninst, nextop, &wback, x3, &fixedaddress, NULL, 0, 0, rex, LOCK_LOCK, 0, 0);
                 MARKLOCK;
                 LDAXRB(x1, wback);
@@ -114,14 +109,14 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     wback = xRAX + (nextop&7) + (rex.b<<3);
                     wb2 = 0;
                 } else {
-                    wback = (nextop&7);    
-                    wb2 = (wback>>2);      
+                    wback = (nextop&7);
+                    wb2 = (wback>>2);
                     wback = xRAX+(wback&3);
                 }
-                UBFXw(x1, wback, wb2*8, 8);   
+                UBFXw(x1, wback, wb2*8, 8);
                 emit_or8(dyn, ninst, x1, x2, x4, x3);
                 BFIx(wback, x1, wb2*8, 8);
-            } else {                   
+            } else {
                 addr = geted(dyn, addr, ninst, nextop, &wback, x3, &fixedaddress, NULL, 0, 0, rex, LOCK_LOCK, 0, 0);
                 MARKLOCK;
                 LDAXRB(x1, wback);
@@ -220,11 +215,11 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                                 if(rex.rex) {
                                     wback = xRAX+(nextop&7)+(rex.b<<3);
                                     wb2 = 0;
-                                } else { 
+                                } else {
                                     wback = (nextop&7);
                                     wb2 = (wback>>2)*8;
                                     wback = xRAX+(wback&3);
-                                } 
+                                }
                                 UBFXx(x2, wback, wb2, 8);
                                 wb1 = 0;
                                 ed = x2;
@@ -247,7 +242,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                                 CBNZx_MARKLOCK(x4);
                                 // done
                                 MARK;
-                                UFLAG_IF {emit_cmp32(dyn, ninst, rex, x6, x2, x3, x4, x5);}
+                                UFLAG_IF {emit_cmp8(dyn, ninst, x6, x2, x3, x4, x5);}
                                 BFIx(xRAX, x2, 0, 8);
                             }
                             SMDMB();
@@ -445,7 +440,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     DEFAULT;
             }
             break;
-                    
+
         case 0x21:
             INST_NAME("LOCK AND Ed, Gd");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -465,7 +460,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }
             SMDMB();
             break;
-            
+
         case 0x29:
             INST_NAME("LOCK SUB Ed, Gd");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -681,7 +676,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         CBNZx_MARKLOCK(x3);
                         SMDMB();
                         B_NEXT_nocond;
-                        MARK;   // unaligned! also, not enough 
+                        MARK;   // unaligned! also, not enough
                         LDRxw_U12(x1, wback, 0);
                         LDAXRB(x4, wback);
                         BFIxw(x1, x4, 0, 8); // re-inject
@@ -789,7 +784,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                         CBNZx_MARKLOCK(x3);
                         SMDMB();
                         B_NEXT_nocond;
-                        MARK;   // unaligned! also, not enough 
+                        MARK;   // unaligned! also, not enough
                         LDRxw_U12(x1, wback, 0);
                         LDAXRB(x4, wback);
                         BFIxw(x1, x4, 0, 8); // re-inject
@@ -834,7 +829,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }
             SMDMB();
             break;
-            
+
         case 0x86:
             INST_NAME("LOCK XCHG Eb, Gb");
             // Do the swap
@@ -896,7 +891,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 MOVxw_REG(gd, x1);
             }
             break;
-            
+
         case 0xF6:
             nextop = F8;
             switch((nextop>>3)&7) {
@@ -931,7 +926,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     DEFAULT;
             }
             break;
-        
+
         case 0xFE:
             nextop = F8;
             switch((nextop>>3)&7)
@@ -1042,7 +1037,7 @@ uintptr_t dynarec64_F0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                     DEFAULT;
             }
             break;
-            
+
         default:
             DEFAULT;
     }
diff --git a/src/dynarec/arm64/dynarec_arm64_f20f.c b/src/dynarec/arm64/dynarec_arm64_f20f.c
index 17f95f4c..c2d8a46e 100644
--- a/src/dynarec/arm64/dynarec_arm64_f20f.c
+++ b/src/dynarec/arm64/dynarec_arm64_f20f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

diff --git a/src/dynarec/arm64/dynarec_arm64_f30f.c b/src/dynarec/arm64/dynarec_arm64_f30f.c
index ca5ef767..d57d3c8b 100644
--- a/src/dynarec/arm64/dynarec_arm64_f30f.c
+++ b/src/dynarec/arm64/dynarec_arm64_f30f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>

 #include <stdlib.h>

 #include <stddef.h>

-#include <pthread.h>

 #include <errno.h>

 

 #include "debug.h"

@@ -378,6 +377,42 @@ uintptr_t dynarec64_F30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
             }

             break;

 

+        case 0xB8:

+            INST_NAME("POPCNT Gd, Ed");

+            SETFLAGS(X_ALL, SF_SET);

+            SET_DFNONE(x1);

+            nextop = F8;

+            v1 = fpu_get_scratch(dyn);

+            GETGD;

+            if(MODREG) {

+                GETED(0);

+                if(rex.w)

+                    VMOVQDfrom(v1, 0, ed);

+                else {

+                    MOVxw_REG(x1, ed);  // need to clear uper part

+                    VMOVQDfrom(v1, 0, x1);

+                }

+            } else {

+                if(rex.w) {

+                    SMREAD();

+                    addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<3, 7, rex, NULL, 0, 0);

+                    VLD64(v1, ed, fixedaddress);

+                } else {

+                    GETED(0);   // just load and clear the upper part

+                    VMOVQDfrom(v1, 0, ed);

+                }

+            }

+            CNT_8(v1, v1);

+            UADDLV_8(v1, v1);

+            VMOVQDto(gd, v1, 0);

+            IFX(X_ALL) {

+                MOV32w(x1, (1<<F_OF) | (1<<F_SF) | (1<<F_ZF) | (1<<F_AF) | (1<<F_CF) | (1<<F_PF));

+                BICw(xFlags, xFlags, x1);

+                CBNZx(gd, 4+4);

+                BFIw(xFlags, xFlags, F_ZF, 1);

+            }

+            break;

+

         case 0xBC:

             INST_NAME("TZCNT Gd, Ed");

             SETFLAGS(X_CF|X_ZF, SF_SUBSET);

diff --git a/src/dynarec/arm64/dynarec_arm64_functions.c b/src/dynarec/arm64/dynarec_arm64_functions.c
index 2a7c9b34..6944b785 100644
--- a/src/dynarec/arm64/dynarec_arm64_functions.c
+++ b/src/dynarec/arm64/dynarec_arm64_functions.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <string.h>
 #include <math.h>
@@ -13,7 +12,6 @@
 #include "box64context.h"
 #include "dynarec.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -60,7 +58,7 @@ void fpu_free_reg(dynarec_arm_t* dyn, int reg)
 {
     // TODO: check upper limit?
     dyn->n.fpuused[reg] = 0;
-    if(dyn->n.neoncache[reg].t!=NEON_CACHE_ST_F && dyn->n.neoncache[reg].t!=NEON_CACHE_ST_D)
+    if(dyn->n.neoncache[reg].t!=NEON_CACHE_ST_F && dyn->n.neoncache[reg].t!=NEON_CACHE_ST_D && dyn->n.neoncache[reg].t!=NEON_CACHE_ST_I64)
         dyn->n.neoncache[reg].v = 0;
 }
 // Get an MMX double reg
@@ -108,7 +106,8 @@ int neoncache_get_st(dynarec_arm_t* dyn, int ninst, int a)
     }
     for(int i=0; i<24; ++i)
         if((dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F
-         || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D)
+         || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D
+         || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_I64)
          && dyn->insts[ninst].n.neoncache[i].n==a)
             return dyn->insts[ninst].n.neoncache[i].t;
     // not in the cache yet, so will be fetched...
@@ -122,7 +121,8 @@ int neoncache_get_current_st(dynarec_arm_t* dyn, int ninst, int a)
         return NEON_CACHE_ST_D;
     for(int i=0; i<24; ++i)
         if((dyn->n.neoncache[i].t==NEON_CACHE_ST_F
-         || dyn->n.neoncache[i].t==NEON_CACHE_ST_D)
+         || dyn->n.neoncache[i].t==NEON_CACHE_ST_D
+         || dyn->n.neoncache[i].t==NEON_CACHE_ST_I64)
          && dyn->n.neoncache[i].n==a)
             return dyn->n.neoncache[i].t;
     // not in the cache yet, so will be fetched...
@@ -140,6 +140,17 @@ int neoncache_get_st_f(dynarec_arm_t* dyn, int ninst, int a)
             return i;
     return -1;
 } 
+int neoncache_get_st_f_i64(dynarec_arm_t* dyn, int ninst, int a)
+{
+    /*if(a+dyn->insts[ninst].n.stack_next-st<0)
+        // The STx has been pushed at the end of instructon, so stop going back
+        return -1;*/
+    for(int i=0; i<24; ++i)
+        if((dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_I64 || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F)
+         && dyn->insts[ninst].n.neoncache[i].n==a)
+            return i;
+    return -1;
+} 
 int neoncache_get_st_f_noback(dynarec_arm_t* dyn, int ninst, int a)
 {
     for(int i=0; i<24; ++i)
@@ -148,6 +159,14 @@ int neoncache_get_st_f_noback(dynarec_arm_t* dyn, int ninst, int a)
             return i;
     return -1;
 } 
+int neoncache_get_st_f_i64_noback(dynarec_arm_t* dyn, int ninst, int a)
+{
+    for(int i=0; i<24; ++i)
+        if((dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_I64 || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F)
+         && dyn->insts[ninst].n.neoncache[i].n==a)
+            return i;
+    return -1;
+} 
 int neoncache_get_current_st_f(dynarec_arm_t* dyn, int a)
 {
     for(int i=0; i<24; ++i)
@@ -156,6 +175,14 @@ int neoncache_get_current_st_f(dynarec_arm_t* dyn, int a)
             return i;
     return -1;
 } 
+int neoncache_get_current_st_f_i64(dynarec_arm_t* dyn, int a)
+{
+    for(int i=0; i<24; ++i)
+        if((dyn->n.neoncache[i].t==NEON_CACHE_ST_I64 || dyn->n.neoncache[i].t==NEON_CACHE_ST_F)
+         && dyn->n.neoncache[i].n==a)
+            return i;
+    return -1;
+} 
 static void neoncache_promote_double_forward(dynarec_arm_t* dyn, int ninst, int maxinst, int a);
 static void neoncache_promote_double_internal(dynarec_arm_t* dyn, int ninst, int maxinst, int a);
 static void neoncache_promote_double_combined(dynarec_arm_t* dyn, int ninst, int maxinst, int a)
@@ -165,7 +192,7 @@ static void neoncache_promote_double_combined(dynarec_arm_t* dyn, int ninst, int
             a = dyn->insts[ninst].n.combined2;
         } else 
             a = dyn->insts[ninst].n.combined1;
-        int i = neoncache_get_st_f_noback(dyn, ninst, a);
+        int i = neoncache_get_st_f_i64_noback(dyn, ninst, a);
         //if(box64_dynarec_dump) dynarec_log(LOG_NONE, "neoncache_promote_double_combined, ninst=%d combined%c %d i=%d (stack:%d/%d)\n", ninst, (a == dyn->insts[ninst].n.combined2)?'2':'1', a ,i, dyn->insts[ninst].n.stack_push, -dyn->insts[ninst].n.stack_pop);
         if(i>=0) {
             dyn->insts[ninst].n.neoncache[i].t = NEON_CACHE_ST_D;
@@ -184,7 +211,7 @@ static void neoncache_promote_double_internal(dynarec_arm_t* dyn, int ninst, int
         return;
     while(ninst>=0) {
         a+=dyn->insts[ninst].n.stack_pop;    // adjust Stack depth: add pop'd ST (going backward)
-        int i = neoncache_get_st_f(dyn, ninst, a);
+        int i = neoncache_get_st_f_i64(dyn, ninst, a);
         //if(box64_dynarec_dump) dynarec_log(LOG_NONE, "neoncache_promote_double_internal, ninst=%d, a=%d st=%d:%d, i=%d\n", ninst, a, dyn->insts[ninst].n.stack, dyn->insts[ninst].n.stack_next, i);
         if(i<0) return;
         dyn->insts[ninst].n.neoncache[i].t = NEON_CACHE_ST_D;
@@ -219,7 +246,7 @@ static void neoncache_promote_double_forward(dynarec_arm_t* dyn, int ninst, int
             else if (a==dyn->insts[ninst].n.combined2)
                 a = dyn->insts[ninst].n.combined1;
         }
-        int i = neoncache_get_st_f_noback(dyn, ninst, a);
+        int i = neoncache_get_st_f_i64_noback(dyn, ninst, a);
         //if(box64_dynarec_dump) dynarec_log(LOG_NONE, "neoncache_promote_double_forward, ninst=%d, a=%d st=%d:%d(%d/%d), i=%d\n", ninst, a, dyn->insts[ninst].n.stack, dyn->insts[ninst].n.stack_next, dyn->insts[ninst].n.stack_push, -dyn->insts[ninst].n.stack_pop, i);
         if(i<0) return;
         dyn->insts[ninst].n.neoncache[i].t = NEON_CACHE_ST_D;
@@ -240,7 +267,7 @@ static void neoncache_promote_double_forward(dynarec_arm_t* dyn, int ninst, int
 
 void neoncache_promote_double(dynarec_arm_t* dyn, int ninst, int a)
 {
-    int i = neoncache_get_current_st_f(dyn, a);
+    int i = neoncache_get_current_st_f_i64(dyn, a);
     //if(box64_dynarec_dump) dynarec_log(LOG_NONE, "neoncache_promote_double, ninst=%d a=%d st=%d i=%d\n", ninst, a, dyn->n.stack, i);
     if(i<0) return;
     dyn->n.neoncache[i].t = NEON_CACHE_ST_D;
@@ -273,6 +300,10 @@ int neoncache_combine_st(dynarec_arm_t* dyn, int ninst, int a, int b)
     if( neoncache_get_current_st(dyn, ninst, a)==NEON_CACHE_ST_F
      && neoncache_get_current_st(dyn, ninst, b)==NEON_CACHE_ST_F )
         return NEON_CACHE_ST_F;
+    // don't combine i64, it's only for load/store
+    /*if( neoncache_get_current_st(dyn, ninst, a)==NEON_CACHE_ST_I64
+     && neoncache_get_current_st(dyn, ninst, b)==NEON_CACHE_ST_I64 )
+        return NEON_CACHE_ST_I64;*/
     return NEON_CACHE_ST_D;
 }
 
@@ -283,7 +314,9 @@ static int isCacheEmpty(dynarec_native_t* dyn, int ninst) {
     for(int i=0; i<24; ++i)
         if(dyn->insts[ninst].n.neoncache[i].v) {       // there is something at ninst for i
             if(!(
-            (dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D)
+            (dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F 
+             || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D
+             || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_I64)
             && dyn->insts[ninst].n.neoncache[i].n<dyn->insts[ninst].n.stack_pop))
                 return 0;
         }
@@ -306,7 +339,9 @@ int fpuCacheNeedsTransform(dynarec_arm_t* dyn, int ninst) {
         for(int i=0; i<24 && !ret; ++i)
             if(dyn->insts[ninst].n.neoncache[i].v) {       // there is something at ninst for i
                 if(!(
-                (dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D)
+                (dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_F 
+                || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_D
+                || dyn->insts[ninst].n.neoncache[i].t==NEON_CACHE_ST_I64)
                 && dyn->insts[ninst].n.neoncache[i].n<dyn->insts[ninst].n.stack_pop))
                     ret = 1;
             }
@@ -345,7 +380,7 @@ void neoncacheUnwind(neoncache_t* cache)
         int a = -1; 
         int b = -1;
         for(int j=0; j<24 && ((a==-1) || (b==-1)); ++j)
-            if((cache->neoncache[j].t == NEON_CACHE_ST_D || cache->neoncache[j].t == NEON_CACHE_ST_F)) {
+            if((cache->neoncache[j].t == NEON_CACHE_ST_D || cache->neoncache[j].t == NEON_CACHE_ST_F || cache->neoncache[j].t == NEON_CACHE_ST_I64)) {
                 if(cache->neoncache[j].n == cache->combined1)
                     a = j;
                 else if(cache->neoncache[j].n == cache->combined2)
@@ -369,7 +404,7 @@ void neoncacheUnwind(neoncache_t* cache)
     if(cache->stack_push) {
         // unpush
         for(int j=0; j<24; ++j) {
-            if((cache->neoncache[j].t == NEON_CACHE_ST_D || cache->neoncache[j].t == NEON_CACHE_ST_F)) {
+            if((cache->neoncache[j].t == NEON_CACHE_ST_D || cache->neoncache[j].t == NEON_CACHE_ST_F || cache->neoncache[j].t == NEON_CACHE_ST_I64)) {
                 if(cache->neoncache[j].n<cache->stack_push)
                     cache->neoncache[j].v = 0;
                 else
@@ -414,6 +449,7 @@ void neoncacheUnwind(neoncache_t* cache)
                     break;
                 case NEON_CACHE_ST_F:
                 case NEON_CACHE_ST_D:
+                case NEON_CACHE_ST_I64:
                     cache->x87cache[x87reg] = cache->neoncache[i].n;
                     cache->x87reg[x87reg] = i;
                     ++x87reg;
@@ -479,6 +515,7 @@ const char* getCacheName(int t, int n)
     switch(t) {
         case NEON_CACHE_ST_D: sprintf(buff, "ST%d", n); break;
         case NEON_CACHE_ST_F: sprintf(buff, "st%d", n); break;
+        case NEON_CACHE_ST_I64: sprintf(buff, "STi%d", n); break;
         case NEON_CACHE_MM: sprintf(buff, "MM%d", n); break;
         case NEON_CACHE_XMMW: sprintf(buff, "XMM%d", n); break;
         case NEON_CACHE_XMMR: sprintf(buff, "xmm%d", n); break;
@@ -488,10 +525,10 @@ const char* getCacheName(int t, int n)
     return buff;
 }
 
-void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name)
+void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name, rex_t rex)
 {
     if(box64_dynarec_dump) {
-        printf_x64_instruction(my_context->dec, &dyn->insts[ninst].x64, name);
+        printf_x64_instruction(rex.is32bits?my_context->dec32:my_context->dec, &dyn->insts[ninst].x64, name);
         dynarec_log(LOG_NONE, "%s%p: %d emitted opcodes, inst=%d, barrier=%d state=%d/%d(%d), %s=%X/%X, use=%X, need=%X/%X, sm=%d/%d",
             (box64_dynarec_dump>1)?"\e[32m":"",
             (void*)(dyn->native_start+dyn->insts[ninst].address),
@@ -523,6 +560,7 @@ void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name)
             switch(dyn->insts[ninst].n.neoncache[ii].t) {
                 case NEON_CACHE_ST_D: dynarec_log(LOG_NONE, " D%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
                 case NEON_CACHE_ST_F: dynarec_log(LOG_NONE, " S%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
+                case NEON_CACHE_ST_I64: dynarec_log(LOG_NONE, " D%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
                 case NEON_CACHE_MM: dynarec_log(LOG_NONE, " D%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
                 case NEON_CACHE_XMMW: dynarec_log(LOG_NONE, " Q%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
                 case NEON_CACHE_XMMR: dynarec_log(LOG_NONE, " Q%d:%s", ii, getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n)); break;
diff --git a/src/dynarec/arm64/dynarec_arm64_functions.h b/src/dynarec/arm64/dynarec_arm64_functions.h
index 86cd0440..201cfcea 100644
--- a/src/dynarec/arm64/dynarec_arm64_functions.h
+++ b/src/dynarec/arm64/dynarec_arm64_functions.h
@@ -21,12 +21,16 @@ void fpu_reset_reg(dynarec_arm_t* dyn);
 // ---- Neon cache functions
 // Get type for STx
 int neoncache_get_st(dynarec_arm_t* dyn, int ninst, int a);
-// Get if STx is FLOAT or DOUBLE
+// Get if STx is FLOAT
 int neoncache_get_st_f(dynarec_arm_t* dyn, int ninst, int a);
+// Get if STx is FLOAT or I64
+int neoncache_get_st_f_i64(dynarec_arm_t* dyn, int ninst, int a);
 // Get actual type for STx
 int neoncache_get_current_st(dynarec_arm_t* dyn, int ninst, int a);
-// Get actual STx is FLOAT or DOUBLE
+// Get actual STx is FLOAT
 int neoncache_get_current_st_f(dynarec_arm_t* dyn, int a);
+// Get actual STx is FLOAT or I64
+int neoncache_get_current_st_f_i64(dynarec_arm_t* dyn, int a);
 // Back-propagate a change float->double
 void neoncache_promote_double(dynarec_arm_t* dyn, int ninst, int a);
 // Combine and propagate if needed (pass 1 only)
@@ -43,6 +47,6 @@ int getedparity(dynarec_native_t* dyn, int ninst, uintptr_t addr, uint8_t nextop
 
 const char* getCacheName(int t, int n);
 
-void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name);
+void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name, rex_t rex);
 void print_opcode(dynarec_native_t* dyn, int ninst, uint32_t opcode);
 #endif //__DYNAREC_ARM_FUNCTIONS_H__
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.c b/src/dynarec/arm64/dynarec_arm64_helper.c
index 7aaf098e..13b58359 100644
--- a/src/dynarec/arm64/dynarec_arm64_helper.c
+++ b/src/dynarec/arm64/dynarec_arm64_helper.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <assert.h>
 #include <string.h>
@@ -19,7 +18,6 @@
 #include "x64trace.h"
 #include "dynarec_native.h"
 #include "../dynablock_private.h"
-#include "../tools/bridge_private.h"
 #include "custommem.h"
 
 #include "arm64_printer.h"
@@ -27,11 +25,16 @@
 #include "dynarec_arm64_functions.h"
 #include "dynarec_arm64_helper.h"
 
+static uintptr_t geted_32(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int* unscaled, int absmax, uint32_t mask, int* l, int s);
+
 /* setup r2 to address pointed by ED, also fixaddress is an optionnal delta in the range [-absmax, +absmax], with delta&mask==0 to be added to ed for LDR/STR */
 uintptr_t geted(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int* unscaled, int absmax, uint32_t mask, rex_t rex, int *l, int s, int delta)
 {
     MAYUSE(dyn); MAYUSE(ninst); MAYUSE(delta);
 
+    if(rex.is32bits)
+        return geted_32(dyn, addr, ninst, nextop, ed, hint, fixaddress, unscaled, absmax, mask, l, s);
+
     int lock = l?((l==LOCK_LOCK)?1:2):0;
     if(unscaled)
         *unscaled = 0;
@@ -119,7 +122,7 @@ uintptr_t geted(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, u
         }
         if(nextop&0x80)
             i64 = F32S;
-        else 
+        else
             i64 = F8S;
         if(i64==0 || ((i64>=absmin) && (i64<=absmax)  && !(i64&mask)) || (unscaled && (i64>-256) && (i64<256))) {
             *fixaddress = i64;
@@ -183,6 +186,141 @@ uintptr_t geted(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, u
     return addr;
 }
 
+static uintptr_t geted_32(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int* unscaled, int absmax, uint32_t mask, int* l, int s)
+{
+    MAYUSE(dyn); MAYUSE(ninst);
+
+    int lock = l?((l==LOCK_LOCK)?1:2):0;
+    if(unscaled)
+        *unscaled = 0;
+    if(lock==2)
+        *l = 0;
+    uint8_t ret = x2;
+    uint8_t scratch = x2;
+    *fixaddress = 0;
+    if(hint>0) ret = hint;
+    if(hint>0 && hint<xRAX) scratch = hint;
+    int absmin = 0;
+    if(s) absmin=-absmax;
+    MAYUSE(scratch);
+    if(!(nextop&0xC0)) {
+        if((nextop&7)==4) {
+            uint8_t sib = F8;
+            int sib_reg = (sib>>3)&7;
+            if((sib&0x7)==5) {
+                int64_t tmp = F32S;
+                if (sib_reg!=4) {
+                    if(tmp && (!((tmp>=absmin) && (tmp<=absmax) && !(tmp&mask))) || !(unscaled && (tmp>-256) && (tmp<256))) {
+                        MOV32w(scratch, tmp);
+                        ADDw_REG_LSL(ret, scratch, xRAX+sib_reg, (sib>>6));
+                    } else {
+                        LSLw(ret, xRAX+sib_reg, (sib>>6));
+                        *fixaddress = tmp;
+                        if(unscaled && (tmp>-256) && (tmp<256))
+                            *unscaled = 1;
+                    }
+                } else {
+                    switch(lock) {
+                        case 1: addLockAddress((int32_t)tmp); break;
+                        case 2: if(isLockAddress((int32_t)tmp)) *l=1; break;
+                    }
+                    MOV32w(ret, tmp);
+                }
+            } else {
+                if (sib_reg!=4) {
+                    ADDw_REG_LSL(ret, xRAX+(sib&0x7), xRAX+sib_reg, (sib>>6));
+                } else {
+                    ret = xRAX+(sib&0x7);
+                }
+            }
+        } else if((nextop&7)==5) {
+            uint64_t tmp = F32;
+            MOV32w(ret, tmp);
+            switch(lock) {
+                case 1: addLockAddress(tmp); break;
+                case 2: if(isLockAddress(tmp)) *l=1; break;
+            }
+        } else {
+            ret = xRAX+(nextop&7);
+            if(ret==hint) {
+                MOVw_REG(hint, ret);    //to clear upper part
+            }
+        }
+    } else {
+        int64_t i32;
+        uint8_t sib = 0;
+        int sib_reg = 0;
+        if((nextop&7)==4) {
+            sib = F8;
+            sib_reg = (sib>>3)&7;
+        }
+        if(nextop&0x80)
+            i32 = F32S;
+        else 
+            i32 = F8S;
+        if(i32==0 || ((i32>=absmin) && (i32<=absmax)  && !(i32&mask)) || (unscaled && (i32>-256) && (i32<256))) {
+            *fixaddress = i32;
+            if(unscaled && (i32>-256) && (i32<256))
+                *unscaled = 1;
+            if((nextop&7)==4) {
+                if (sib_reg!=4) {
+                    ADDw_REG_LSL(ret, xRAX+(sib&0x07), xRAX+sib_reg, (sib>>6));
+                } else {
+                    ret = xRAX+(sib&0x07);
+                }
+            } else {
+                ret = xRAX+(nextop&0x07);
+            }
+        } else {
+            int64_t sub = (i32<0)?1:0;
+            if(sub) i32 = -i32;
+            if(i32<0x1000) {
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        ADDw_REG_LSL(scratch, xRAX+(sib&0x07), xRAX+sib_reg, (sib>>6));
+                    } else {
+                        scratch = xRAX+(sib&0x07);
+                    }
+                } else
+                    scratch = xRAX+(nextop&0x07);
+                if(sub) {
+                    SUBw_U12(ret, scratch, i32);
+                } else {
+                    ADDw_U12(ret, scratch, i32);
+                }
+            } else {
+                MOV32w(scratch, i32);
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        if(sub) {
+                            SUBw_REG(scratch, xRAX+(sib&0x07), scratch);
+                        } else {
+                            ADDw_REG(scratch, scratch, xRAX+(sib&0x07));
+                        }
+                        ADDw_REG_LSL(ret, scratch, xRAX+sib_reg, (sib>>6));
+                    } else {
+                        PASS3(int tmp = xRAX+(sib&0x07));
+                        if(sub) {
+                            SUBw_REG(ret, tmp, scratch);
+                        } else {
+                            ADDw_REG(ret, tmp, scratch);
+                        }
+                    }
+                } else {
+                    PASS3(int tmp = xRAX+(nextop&0x07));
+                    if(sub) {
+                        SUBw_REG(ret, tmp, scratch);
+                    } else {
+                        ADDw_REG(ret, tmp, scratch);
+                    }
+                }
+            }
+        }
+    }
+    *ed = ret;
+    return addr;
+}
+
 /* setup r2 to address pointed by ED, also fixaddress is an optionnal delta in the range [-absmax, +absmax], with delta&mask==0 to be added to ed for LDR/STR */
 uintptr_t geted32(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int* unscaled, int absmax, uint32_t mask, rex_t rex, int* l, int s, int delta)
 {
@@ -256,9 +394,9 @@ uintptr_t geted32(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
         }
         if(nextop&0x80)
             i64 = F32S;
-        else 
+        else
             i64 = F8S;
-        if(i64==0 || ((i64>=absmin) && (i64<=absmax)  && !(i64&mask)) || (unscaled && (i64>-256) && (i64>256))) {
+        if(i64==0 || ((i64>=absmin) && (i64<=absmax)  && !(i64&mask)) || (unscaled && (i64>-256) && (i64<256))) {
             *fixaddress = i64;
             if(unscaled && (i64>-256) && (i64<256))
                 *unscaled = 1;
@@ -339,8 +477,8 @@ uintptr_t geted16(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
     int64_t offset = 0;
     int absmin = 0;
     if(s) absmin = -absmax;
-    if(!n && m==6) {
-        offset = F16;
+    if(!n && (m&7)==6) {
+        offset = F16S;
         MOVZw(ret, offset);
     } else {
         switch(n) {
@@ -458,18 +596,18 @@ void jump_to_next(dynarec_arm_t* dyn, uintptr_t ip, int reg, int ninst)
     }
     CLEARIP();
     #ifdef HAVE_TRACE
-    //MOVx(x3, 15);    no access to PC reg 
+    //MOVx(x3, 15);    no access to PC reg
     #endif
     SMEND();
     BLR(x2); // save LR...
 }
 
-void ret_to_epilog(dynarec_arm_t* dyn, int ninst)
+void ret_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex)
 {
     MAYUSE(dyn); MAYUSE(ninst);
     MESSAGE(LOG_DUMP, "Ret to epilog\n");
-    POP1(xRIP);
-    MOVx_REG(x1, xRIP);
+    POP1z(xRIP);
+    MOVz_REG(x1, xRIP);
     SMEND();
     if(box64_dynarec_callret) {
         // pop the actual return address for ARM stack
@@ -496,18 +634,18 @@ void ret_to_epilog(dynarec_arm_t* dyn, int ninst)
     CLEARIP();
 }
 
-void retn_to_epilog(dynarec_arm_t* dyn, int ninst, int n)
+void retn_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex, int n)
 {
     MAYUSE(dyn); MAYUSE(ninst);
     MESSAGE(LOG_DUMP, "Retn to epilog\n");
-    POP1(xRIP);
+    POP1z(xRIP);
     if(n>0xfff) {
         MOV32w(w1, n);
-        ADDx_REG(xRSP, xRSP, x1);
+        ADDz_REG(xRSP, xRSP, x1);
     } else {
-        ADDx_U12(xRSP, xRSP, n);
+        ADDz_U12(xRSP, xRSP, n);
     }
-    MOVx_REG(x1, xRIP);
+    MOVz_REG(x1, xRIP);
     SMEND();
     if(box64_dynarec_callret) {
         // pop the actual return address for ARM stack
@@ -541,24 +679,34 @@ void iret_to_epilog(dynarec_arm_t* dyn, int ninst, int is64bits)
     MESSAGE(LOG_DUMP, "IRet to epilog\n");
     // POP IP
     NOTEST(x2);
-    POP1(xRIP);
-    // POP CS
-    POP1(x2);
+    if(is64bits) {
+        POP1(xRIP);
+        POP1(x2);
+        POP1(xFlags);
+    } else {
+        POP1_32(xRIP);
+        POP1_32(x2);
+        POP1_32(xFlags);
+    }
+    // x2 is CS
     STRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_CS]));
-    MOVZw(x1, 0);
-    STRx_U12(x1, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
-    STRx_U12(x1, xEmu, offsetof(x64emu_t, segs_serial[_SS]));
-    // POP EFLAGS
-    POP1(xFlags);
+    STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
+    // clean EFLAGS
     MOV32w(x1, 0x3F7FD7);
     ANDx_REG(xFlags, xFlags, x1);
-    ORRx_mask(xFlags, xFlags, 1, 0b111111, 0);
+    ORRx_mask(xFlags, xFlags, 1, 0b111111, 0); // xFlags | 0b10
     SET_DFNONE(x1);
     // POP RSP
-    POP1(x3);
+    if(is64bits) {
+        POP1(x3);   //rsp
+        POP1(x2);   //ss
+    } else {
+        POP1_32(x3);   //rsp
+        POP1_32(x2);   //ss
+    }
     // POP SS
-    POP1(x2);
     STRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_SS]));
+    STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_SS]));
     // set new RSP
     MOVx_REG(xRSP, x3);
     // Ret....
@@ -698,7 +846,9 @@ static void x87_reset(dynarec_arm_t* dyn)
     dyn->n.swapped = 0;
     dyn->n.barrier = 0;
     for(int i=0; i<24; ++i)
-        if(dyn->n.neoncache[i].t == NEON_CACHE_ST_F || dyn->n.neoncache[i].t == NEON_CACHE_ST_D)
+        if(dyn->n.neoncache[i].t == NEON_CACHE_ST_F
+         || dyn->n.neoncache[i].t == NEON_CACHE_ST_D
+         || dyn->n.neoncache[i].t == NEON_CACHE_ST_I64)
             dyn->n.neoncache[i].v = 0;
 }
 
@@ -759,7 +909,9 @@ int x87_do_push(dynarec_arm_t* dyn, int ninst, int s1, int t)
     dyn->n.stack_push+=1;
     // move all regs in cache, and find a free one
     for(int j=0; j<24; ++j)
-        if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D) || (dyn->n.neoncache[j].t == NEON_CACHE_ST_F))
+        if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D)
+         ||(dyn->n.neoncache[j].t == NEON_CACHE_ST_F)
+         ||(dyn->n.neoncache[j].t == NEON_CACHE_ST_I64))
             ++dyn->n.neoncache[j].n;
     int ret = -1;
     for(int i=0; i<8; ++i)
@@ -768,13 +920,7 @@ int x87_do_push(dynarec_arm_t* dyn, int ninst, int s1, int t)
         else if(ret==-1) {
             dyn->n.x87cache[i] = 0;
             ret=dyn->n.x87reg[i]=fpu_get_reg_x87(dyn, t, 0);
-            #if STEP == 1
-            // need to check if reg is compatible with float
-            if((ret>15) && (t == NEON_CACHE_ST_F))
-                dyn->n.neoncache[ret].t = NEON_CACHE_ST_D;
-            #else
             dyn->n.neoncache[ret].t = X87_ST0;
-            #endif
         }
     return ret;
 }
@@ -788,7 +934,9 @@ void x87_do_push_empty(dynarec_arm_t* dyn, int ninst, int s1)
     dyn->n.stack_push+=1;
     // move all regs in cache
     for(int j=0; j<24; ++j)
-        if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D) || (dyn->n.neoncache[j].t == NEON_CACHE_ST_F))
+        if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D)
+         ||(dyn->n.neoncache[j].t == NEON_CACHE_ST_F)
+         ||(dyn->n.neoncache[j].t == NEON_CACHE_ST_I64))
             ++dyn->n.neoncache[j].n;
     for(int i=0; i<8; ++i)
         if(dyn->n.x87cache[i]!=-1)
@@ -985,7 +1133,9 @@ int x87_get_current_cache(dynarec_arm_t* dyn, int ninst, int st, int t)
     for (int i=0; i<8; ++i) {
         if(dyn->n.x87cache[i]==st) {
             #if STEP == 1
-            if(t==NEON_CACHE_ST_D && (dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_F))
+            if(t==NEON_CACHE_ST_D && (dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_F || dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_I64))
+                neoncache_promote_double(dyn, ninst, st);
+            else if(t==NEON_CACHE_ST_F && (dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_I64))
                 neoncache_promote_double(dyn, ninst, st);
             #endif
             return i;
@@ -1031,7 +1181,9 @@ int x87_get_cache(dynarec_arm_t* dyn, int ninst, int populate, int s1, int s2, i
 int x87_get_neoncache(dynarec_arm_t* dyn, int ninst, int s1, int s2, int st)
 {
     for(int ii=0; ii<24; ++ii)
-        if((dyn->n.neoncache[ii].t == NEON_CACHE_ST_F || dyn->n.neoncache[ii].t == NEON_CACHE_ST_D)
+        if((dyn->n.neoncache[ii].t == NEON_CACHE_ST_F
+         || dyn->n.neoncache[ii].t == NEON_CACHE_ST_D
+         || dyn->n.neoncache[ii].t == NEON_CACHE_ST_I64)
          && dyn->n.neoncache[ii].n==st)
             return ii;
     assert(0);
@@ -1069,6 +1221,9 @@ void x87_refresh(dynarec_arm_t* dyn, int ninst, int s1, int s2, int st)
     if(dyn->n.neoncache[dyn->n.x87reg[ret]].t==NEON_CACHE_ST_F) {
         FCVT_D_S(31, dyn->n.x87reg[ret]);
         VSTR64_REG_LSL3(31, s1, s2);
+    } else if(dyn->n.neoncache[dyn->n.x87reg[ret]].t==NEON_CACHE_ST_I64) {
+        SCVTFDD(31, dyn->n.x87reg[ret]);
+        VSTR64_REG_LSL3(31, s1, s2);
     } else {
         VSTR64_REG_LSL3(dyn->n.x87reg[ret], s1, s2);
     }
@@ -1086,7 +1241,7 @@ void x87_forget(dynarec_arm_t* dyn, int ninst, int s1, int s2, int st)
         return;
     MESSAGE(LOG_DUMP, "\tForget x87 Cache for ST%d\n", st);
     #if STEP == 1
-    if(dyn->n.neoncache[dyn->n.x87reg[ret]].t==NEON_CACHE_ST_F)
+    if(dyn->n.neoncache[dyn->n.x87reg[ret]].t==NEON_CACHE_ST_F || dyn->n.neoncache[dyn->n.x87reg[ret]].t==NEON_CACHE_ST_I64)
         neoncache_promote_double(dyn, ninst, st);
     #endif
     // prepare offset to fpu => s1
@@ -1117,7 +1272,7 @@ void x87_reget_st(dynarec_arm_t* dyn, int ninst, int s1, int s2, int st)
             // refresh the value
             MESSAGE(LOG_DUMP, "\tRefresh x87 Cache for ST%d\n", st);
             #if STEP == 1
-            if(dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_F)
+            if(dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_F || dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_I64)
                 neoncache_promote_double(dyn, ninst, st);
             #endif
             ADDx_U12(s1, xEmu, offsetof(x64emu_t, x87));
@@ -1443,10 +1598,20 @@ static int findCacheSlot(dynarec_arm_t* dyn, int ninst, int t, int n, neoncache_
                 case NEON_CACHE_ST_F:
                     if (t==NEON_CACHE_ST_D)
                         return i;
+                    if (t==NEON_CACHE_ST_I64)
+                        return i;
                     break;
                 case NEON_CACHE_ST_D:
                     if (t==NEON_CACHE_ST_F)
                         return i;
+                    if (t==NEON_CACHE_ST_I64)
+                        return i;
+                    break;
+                case NEON_CACHE_ST_I64:
+                    if (t==NEON_CACHE_ST_F)
+                        return i;
+                    if (t==NEON_CACHE_ST_D)
+                        return i;
                     break;
                 case NEON_CACHE_XMMR:
                     if(t==NEON_CACHE_XMMW)
@@ -1471,7 +1636,7 @@ static void swapCache(dynarec_arm_t* dyn, int ninst, int i, int j, neoncache_t *
         quad =1;
     if(cache->neoncache[j].t==NEON_CACHE_XMMR || cache->neoncache[j].t==NEON_CACHE_XMMW)
         quad =1;
-    
+
     if(!cache->neoncache[i].v) {
         // a mov is enough, no need to swap
         MESSAGE(LOG_DUMP, "\t  - Moving %d <- %d\n", i, j);
@@ -1531,12 +1696,13 @@ static void loadCache(dynarec_arm_t* dyn, int ninst, int stack_cnt, int s1, int
             VLDR128_U12(i, xEmu, offsetof(x64emu_t, xmm[n]));
             break;
         case NEON_CACHE_MM:
-            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));
             VLDR64_U12(i, xEmu, offsetof(x64emu_t, mmx[i]));
             break;
         case NEON_CACHE_ST_D:
         case NEON_CACHE_ST_F:
-            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));                    
+        case NEON_CACHE_ST_I64:
+            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));
             if((*s3_top) == 0xffff) {
                 LDRw_U12(s3, xEmu, offsetof(x64emu_t, top));
                 *s3_top = 0;
@@ -1557,12 +1723,15 @@ static void loadCache(dynarec_arm_t* dyn, int ninst, int stack_cnt, int s1, int
             if(t==NEON_CACHE_ST_F) {
                 FCVT_S_D(i, i);
             }
-            break;                    
+            if(t==NEON_CACHE_ST_I64) {
+                VFCVTZSQD(i, i);
+            }
+            break;
         case NEON_CACHE_NONE:
         case NEON_CACHE_SCR:
         default:    /* nothing done */
             MESSAGE(LOG_DUMP, "\t  - ignoring %s\n", getCacheName(t, n));
-            break; 
+            break;
     }
     cache->neoncache[i].n = n;
     cache->neoncache[i].t = t;
@@ -1579,12 +1748,13 @@ static void unloadCache(dynarec_arm_t* dyn, int ninst, int stack_cnt, int s1, in
             VSTR128_U12(i, xEmu, offsetof(x64emu_t, xmm[n]));
             break;
         case NEON_CACHE_MM:
-            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));
             VSTR64_U12(i, xEmu, offsetof(x64emu_t, mmx[n]));
             break;
         case NEON_CACHE_ST_D:
         case NEON_CACHE_ST_F:
-            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));                    
+        case NEON_CACHE_ST_I64:
+            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));
             if((*s3_top)==0xffff) {
                 LDRw_U12(s3, xEmu, offsetof(x64emu_t, top));
                 *s3_top = 0;
@@ -1603,14 +1773,16 @@ static void unloadCache(dynarec_arm_t* dyn, int ninst, int stack_cnt, int s1, in
             *s2_val = 0;
             if(t==NEON_CACHE_ST_F) {
                 FCVT_D_S(i, i);
+            } else if (t==NEON_CACHE_ST_I64) {
+                SCVTFDD(i, i);
             }
             VSTR64_U12(i, s2, offsetof(x64emu_t, x87));
-            break;                    
+            break;
         case NEON_CACHE_NONE:
         case NEON_CACHE_SCR:
         default:    /* nothing done */
             MESSAGE(LOG_DUMP, "\t  - ignoring %s\n", getCacheName(t, n));
-            break; 
+            break;
     }
     cache->neoncache[i].v = 0;
 }
@@ -1732,6 +1904,23 @@ static void fpuCacheTransform(dynarec_arm_t* dyn, int ninst, int s1, int s2, int
                     MESSAGE(LOG_DUMP, "\t  - Convert %s\n", getCacheName(cache.neoncache[i].t, cache.neoncache[i].n));
                     FCVT_D_S(i, i);
                     cache.neoncache[i].t = NEON_CACHE_ST_D;
+                } else if(cache.neoncache[i].t == NEON_CACHE_ST_D && cache_i2.neoncache[i].t == NEON_CACHE_ST_I64) {
+                    MESSAGE(LOG_DUMP, "\t  - Convert %s\n", getCacheName(cache.neoncache[i].t, cache.neoncache[i].n));
+                    VFCVTZSQD(i, i);
+                    cache.neoncache[i].t = NEON_CACHE_ST_I64;
+                } else if(cache.neoncache[i].t == NEON_CACHE_ST_F && cache_i2.neoncache[i].t == NEON_CACHE_ST_I64) {
+                    MESSAGE(LOG_DUMP, "\t  - Convert %s\n", getCacheName(cache.neoncache[i].t, cache.neoncache[i].n));
+                    VFCVTZSQS(i, i);
+                    cache.neoncache[i].t = NEON_CACHE_ST_D;
+                } else if(cache.neoncache[i].t == NEON_CACHE_ST_I64 && cache_i2.neoncache[i].t == NEON_CACHE_ST_F) {
+                    MESSAGE(LOG_DUMP, "\t  - Convert %s\n", getCacheName(cache.neoncache[i].t, cache.neoncache[i].n));
+                    SCVTFDD(i, i);
+                    FCVT_S_D(i, i);
+                    cache.neoncache[i].t = NEON_CACHE_ST_F;
+                } else if(cache.neoncache[i].t == NEON_CACHE_ST_I64 && cache_i2.neoncache[i].t == NEON_CACHE_ST_D) {
+                    MESSAGE(LOG_DUMP, "\t  - Convert %s\n", getCacheName(cache.neoncache[i].t, cache.neoncache[i].n));
+                    SCVTFDD(i, i);
+                    cache.neoncache[i].t = NEON_CACHE_ST_D;
                 } else if(cache.neoncache[i].t == NEON_CACHE_XMMR && cache_i2.neoncache[i].t == NEON_CACHE_XMMW)
                     { cache.neoncache[i].t = NEON_CACHE_XMMW; }
                 else if(cache.neoncache[i].t == NEON_CACHE_XMMW && cache_i2.neoncache[i].t == NEON_CACHE_XMMR) {
@@ -1759,18 +1948,18 @@ static void flagsCacheTransform(dynarec_arm_t* dyn, int ninst, int s1)
     int go = 0;
     switch (dyn->insts[jmp].f_entry.pending) {
         case SF_UNKNOWN: break;
-        case SF_SET: 
-            if(dyn->f.pending!=SF_SET && dyn->f.pending!=SF_SET_PENDING) 
-                go = 1; 
+        case SF_SET:
+            if(dyn->f.pending!=SF_SET && dyn->f.pending!=SF_SET_PENDING)
+                go = 1;
             break;
         case SF_SET_PENDING:
-            if(dyn->f.pending!=SF_SET 
+            if(dyn->f.pending!=SF_SET
             && dyn->f.pending!=SF_SET_PENDING
-            && dyn->f.pending!=SF_PENDING) 
-                go = 1; 
+            && dyn->f.pending!=SF_PENDING)
+                go = 1;
             break;
         case SF_PENDING:
-            if(dyn->f.pending!=SF_SET 
+            if(dyn->f.pending!=SF_SET
             && dyn->f.pending!=SF_SET_PENDING
             && dyn->f.pending!=SF_PENDING)
                 go = 1;
@@ -1783,11 +1972,11 @@ static void flagsCacheTransform(dynarec_arm_t* dyn, int ninst, int s1)
     if(go) {
         if(dyn->f.pending!=SF_PENDING) {
             LDRw_U12(s1, xEmu, offsetof(x64emu_t, df));
-            j64 = (GETMARK3)-(dyn->native_size);
+            j64 = (GETMARKF2)-(dyn->native_size);
             CBZw(s1, j64);
         }
         CALL_(UpdateFlags, -1, 0);
-        MARK3;
+        MARKF2;
     }
 #endif
 }
@@ -1883,7 +2072,9 @@ void fpu_propagate_stack(dynarec_arm_t* dyn, int ninst)
 {
     if(dyn->n.stack_pop) {
         for(int j=0; j<24; ++j)
-            if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D || dyn->n.neoncache[j].t == NEON_CACHE_ST_F)) {
+            if((dyn->n.neoncache[j].t == NEON_CACHE_ST_D
+             || dyn->n.neoncache[j].t == NEON_CACHE_ST_F
+             || dyn->n.neoncache[j].t == NEON_CACHE_ST_I64)) {
                 if(dyn->n.neoncache[j].n<dyn->n.stack_pop)
                     dyn->n.neoncache[j].v = 0;
                 else
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.h b/src/dynarec/arm64/dynarec_arm64_helper.h
index 84346f84..bcb9c8b3 100644
--- a/src/dynarec/arm64/dynarec_arm64_helper.h
+++ b/src/dynarec/arm64/dynarec_arm64_helper.h
@@ -80,6 +80,15 @@
                     LDx(x1, wback, fixedaddress);       \
                     ed = x1;                            \
                 }
+#define GETEDz(D)  if(MODREG) {                         \
+                    ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                    wback = 0;                          \
+                } else {                                \
+                    SMREAD();                           \
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, &unscaled, 0xfff<<3, 7, rex, NULL, 0, D); \
+                    LDz(x1, wback, fixedaddress);       \
+                    ed = x1;                            \
+                }
 #define GETEDw(D)  if((nextop&0xC0)==0xC0) {            \
                     ed = xEAX+(nextop&7)+(rex.b<<3);    \
                     wback = 0;                          \
@@ -187,6 +196,16 @@
                     LDRx_REG(x1, wback, O);             \
                     ed = x1;                            \
                 }
+//GETEDOz can use r1 for ed, and r2 for wback. wback is 0 if ed is xEAX..xEDI
+#define GETEDOz(O, D)  if(MODREG) {                     \
+                    ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                    wback = 0;                          \
+                } else {                                \
+                    SMREAD();                           \
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, &fixedaddress, NULL, 0, 0, rex, NULL, 0, D); \
+                    LDRz_REG(x1, wback, O);             \
+                    ed = x1;                            \
+                }
 #define GETSEDOw(O, D)  if((nextop&0xC0)==0xC0) {       \
                     ed = xRAX+(nextop&7)+(rex.b<<3);    \
                     SXTWx(x1, ed);                      \
@@ -341,18 +360,18 @@
                         gb2 = 0;                \
                     } else {                    \
                         gd = (nextop&0x38)>>3;  \
-                        gb2 = ((gd&4)>>2);      \
+                        gb2 = ((gd&4)<<1);      \
                         gb1 = xRAX+(gd&3);      \
                     }                           \
                     gd = i;                     \
-                    UBFXx(gd, gb1, gb2*8, 8);
+                    UBFXx(gd, gb1, gb2, 8);
 //GETSGB signe extend GB, will use i for gd
 #define GETSGB(i)   if(rex.rex) {               \
                         gb1 = xRAX+((nextop&0x38)>>3)+(rex.r<<3);     \
                         gb2 = 0;                \
                     } else {                    \
                         gd = (nextop&0x38)>>3;  \
-                        gb2 = ((gd&4)>>2);      \
+                        gb2 = ((gd&4)<<1);      \
                         gb1 = xRAX+(gd&3);      \
                     }                           \
                     gd = i;                     \
@@ -455,17 +474,19 @@
 // R0 will not be pushed/popd if ret is -2. Flags are not save/restored
 #define CALL_S(F, ret) call_c(dyn, ninst, F, x7, ret, 0, 0)
 
-#define MARK    dyn->insts[ninst].mark = dyn->native_size
-#define GETMARK dyn->insts[ninst].mark
-#define MARK2   dyn->insts[ninst].mark2 = dyn->native_size
-#define GETMARK2 dyn->insts[ninst].mark2
-#define MARK3   dyn->insts[ninst].mark3 = dyn->native_size
-#define GETMARK3 dyn->insts[ninst].mark3
-#define MARKF   dyn->insts[ninst].markf = dyn->native_size
-#define GETMARKF dyn->insts[ninst].markf
-#define MARKSEG dyn->insts[ninst].markseg = dyn->native_size
-#define GETMARKSEG dyn->insts[ninst].markseg
-#define MARKLOCK dyn->insts[ninst].marklock = dyn->native_size
+#define MARK        dyn->insts[ninst].mark = dyn->native_size
+#define GETMARK     dyn->insts[ninst].mark
+#define MARK2       dyn->insts[ninst].mark2 = dyn->native_size
+#define GETMARK2    dyn->insts[ninst].mark2
+#define MARK3       dyn->insts[ninst].mark3 = dyn->native_size
+#define GETMARK3    dyn->insts[ninst].mark3
+#define MARKF       dyn->insts[ninst].markf = dyn->native_size
+#define GETMARKF    dyn->insts[ninst].markf
+#define MARKF2      dyn->insts[ninst].markf2 = dyn->native_size
+#define GETMARKF2   dyn->insts[ninst].markf2
+#define MARKSEG     dyn->insts[ninst].markseg = dyn->native_size
+#define GETMARKSEG  dyn->insts[ninst].markseg
+#define MARKLOCK    dyn->insts[ninst].marklock = dyn->native_size
 #define GETMARKLOCK dyn->insts[ninst].marklock
 
 // Branch to MARK if cond (use j64)
@@ -504,6 +525,10 @@
 #define B_MARK2_nocond              \
     j64 = GETMARK2-(dyn->native_size); \
     B(j64)
+// Branch to MARK2 if reg is 0 (use j64)
+#define CBZx_MARK2(reg)             \
+    j64 = GETMARK2-(dyn->native_size); \
+    CBZx(reg, j64)
 // Branch to MARK2 if reg is not 0 (use j64)
 #define CBNZx_MARK2(reg)            \
     j64 = GETMARK2-(dyn->native_size); \
@@ -717,7 +742,7 @@
     LDP_REGS(R12, R13);     \
     LDP_REGS(R14, R15)
 
-#define SET_DFNONE(S)    if(!dyn->f.dfnone) {MOVZw(S, d_none); STRw_U12(S, xEmu, offsetof(x64emu_t, df)); dyn->f.dfnone=1;}
+#define SET_DFNONE(S)    if(!dyn->f.dfnone) {STRw_U12(wZR, xEmu, offsetof(x64emu_t, df)); dyn->f.dfnone=1;}
 #define SET_DF(S, N)     if((N)!=d_none) {MOVZw(S, (N)); STRw_U12(S, xEmu, offsetof(x64emu_t, df)); dyn->f.dfnone=0;} else SET_DFNONE(S)
 #define SET_NODF()          dyn->f.dfnone = 0
 #define SET_DFOK()          dyn->f.dfnone = 1
@@ -759,10 +784,10 @@
     } else dyn->f.pending = SF_SET
 #endif
 #ifndef JUMP
-#define JUMP(A, C) 
+#define JUMP(A, C)
 #endif
 #ifndef BARRIER
-#define BARRIER(A) 
+#define BARRIER(A)
 #endif
 #ifndef BARRIER_NEXT
 #define BARRIER_NEXT(A)
@@ -832,7 +857,7 @@
 
 #define MODREG  ((nextop&0xC0)==0xC0)
 
-void arm64_epilog();
+void arm64_epilog(void);
 void* arm64_next(x64emu_t* emu, uintptr_t addr);
 
 #ifndef STEPNAME
@@ -996,8 +1021,8 @@ uintptr_t geted16(dynarec_arm_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
 // generic x64 helper
 void jump_to_epilog(dynarec_arm_t* dyn, uintptr_t ip, int reg, int ninst);
 void jump_to_next(dynarec_arm_t* dyn, uintptr_t ip, int reg, int ninst);
-void ret_to_epilog(dynarec_arm_t* dyn, int ninst);
-void retn_to_epilog(dynarec_arm_t* dyn, int ninst, int n);
+void ret_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex);
+void retn_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex, int n);
 void iret_to_epilog(dynarec_arm_t* dyn, int ninst, int is64bits);
 void call_c(dynarec_arm_t* dyn, int ninst, void* fnc, int reg, int ret, int saveflags, int save_reg);
 void call_n(dynarec_arm_t* dyn, int ninst, void* fnc, int w);
@@ -1121,16 +1146,19 @@ int neoncache_st_coherency(dynarec_arm_t* dyn, int ninst, int a, int b);
 
 #if STEP == 0
 #define ST_IS_F(A)          0
+#define ST_IS_I64(A)        0
 #define X87_COMBINE(A, B)   NEON_CACHE_ST_D
 #define X87_ST0             NEON_CACHE_ST_D
 #define X87_ST(A)           NEON_CACHE_ST_D
 #elif STEP == 1
 #define ST_IS_F(A) (neoncache_get_current_st(dyn, ninst, A)==NEON_CACHE_ST_F)
+#define ST_IS_I64(A) (neoncache_get_current_st(dyn, ninst, A)==NEON_CACHE_ST_I64)
 #define X87_COMBINE(A, B) neoncache_combine_st(dyn, ninst, A, B)
 #define X87_ST0     neoncache_get_current_st(dyn, ninst, 0)
 #define X87_ST(A)   neoncache_get_current_st(dyn, ninst, A)
 #else
 #define ST_IS_F(A) (neoncache_get_st(dyn, ninst, A)==NEON_CACHE_ST_F)
+#define ST_IS_I64(A) (neoncache_get_st(dyn, ninst, A)==NEON_CACHE_ST_I64)
 #if STEP == 3
 #define X87_COMBINE(A, B) neoncache_st_coherency(dyn, ninst, A, B)
 #else
@@ -1210,7 +1238,7 @@ uintptr_t dynarec64_F30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
 #if STEP < 3
 #define MAYUSE(A)   (void)A
 #else
-#define MAYUSE(A)   
+#define MAYUSE(A)
 #endif
 
 #define GOCOND(B, T1, T2)                                   \
@@ -1318,4 +1346,12 @@ uintptr_t dynarec64_F30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
         STRw_U12(s2, xEmu, offsetof(x64emu_t, test.test));  \
     }
 
+#define GETREX()                                \
+    rex.rex = 0;                                \
+    if(!rex.is32bits)                           \
+        while(opcode>=0x40 && opcode<=0x4f) {   \
+            rex.rex = opcode;                   \
+            opcode = F8;                        \
+        }
+
 #endif //__DYNAREC_ARM64_HELPER_H__
diff --git a/src/dynarec/arm64/dynarec_arm64_pass0.h b/src/dynarec/arm64/dynarec_arm64_pass0.h
index 61eb1bcd..774d13d9 100644
--- a/src/dynarec/arm64/dynarec_arm64_pass0.h
+++ b/src/dynarec/arm64/dynarec_arm64_pass0.h
@@ -22,7 +22,7 @@
 #define NEW_INST \
         ++dyn->size;                            \
         if(dyn->size+3>=dyn->cap) {             \
-                dyn->insts = (instruction_native_t*)customRealloc(dyn->insts, sizeof(instruction_native_t)*dyn->cap*2);\
+                dyn->insts = (instruction_native_t*)dynaRealloc(dyn->insts, sizeof(instruction_native_t)*dyn->cap*2);\
                 memset(&dyn->insts[dyn->cap], 0, sizeof(instruction_native_t)*dyn->cap);   \
                 dyn->cap *= 2;                  \
         }                                       \
@@ -40,9 +40,10 @@
 #define DEFAULT                         \
         --dyn->size;                    \
         *ok = -1;                       \
-        if(box64_dynarec_log>=LOG_INFO) {\
-        dynarec_log(LOG_NONE, "%p: Dynarec stopped because of Opcode %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", \
-        (void*)ip, PKip(0),             \
+        if(box64_dynarec_log>=LOG_INFO || box64_dynarec_dump || box64_dynarec_missing) {\
+        dynarec_log(LOG_NONE, "%p: Dynarec stopped because of %sOpcode %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", \
+        (void*)ip, rex.is32bits?"32bits ":"",\
+        PKip(0),                        \
         PKip(1), PKip(2), PKip(3),      \
         PKip(4), PKip(5), PKip(6),      \
         PKip(7), PKip(8), PKip(9),      \
diff --git a/src/dynarec/arm64/dynarec_arm64_pass2.h b/src/dynarec/arm64/dynarec_arm64_pass2.h
index 86692795..512e4416 100644
--- a/src/dynarec/arm64/dynarec_arm64_pass2.h
+++ b/src/dynarec/arm64/dynarec_arm64_pass2.h
@@ -2,7 +2,7 @@
 #define FINI                                                                                            \
         if(ninst) {                                                                                     \
                 dyn->insts[ninst].address = (dyn->insts[ninst-1].address+dyn->insts[ninst-1].size);     \
-                dyn->insts_size += 1+((dyn->insts[ninst].x64.size>dyn->insts[ninst].size)?dyn->insts[ninst].x64.size:dyn->insts[ninst].size)/15; \
+                dyn->insts_size += 1+((dyn->insts[ninst].x64.size>(dyn->insts[ninst].size/4))?dyn->insts[ninst].x64.size:(dyn->insts[ninst].size/4))/15; \
         }
 
 #define MESSAGE(A, ...)  
@@ -10,7 +10,7 @@
 #define NEW_INST                                                                                        \
         if(ninst) {                                                                                     \
                 dyn->insts[ninst].address = (dyn->insts[ninst-1].address+dyn->insts[ninst-1].size);     \
-                dyn->insts_size += 1+((dyn->insts[ninst-1].x64.size>dyn->insts[ninst-1].size)?dyn->insts[ninst-1].x64.size:dyn->insts[ninst-1].size)/15; \
+                dyn->insts_size += 1+((dyn->insts[ninst-1].x64.size>(dyn->insts[ninst-1].size/4))?dyn->insts[ninst-1].x64.size:(dyn->insts[ninst-1].size/4))/15; \
         }
 #define INST_EPILOG dyn->insts[ninst].epilog = dyn->native_size; 
 #define INST_NAME(name) 
diff --git a/src/dynarec/arm64/dynarec_arm64_pass3.h b/src/dynarec/arm64/dynarec_arm64_pass3.h
index bdc41db9..875e8af9 100644
--- a/src/dynarec/arm64/dynarec_arm64_pass3.h
+++ b/src/dynarec/arm64/dynarec_arm64_pass3.h
@@ -17,6 +17,6 @@
     if(ninst)                                                   \
         addInst(dyn->instsize, &dyn->insts_size, dyn->insts[ninst-1].x64.size, dyn->insts[ninst-1].size/4);
 #define INST_EPILOG     
-#define INST_NAME(name) inst_name_pass3(dyn, ninst, name)
+#define INST_NAME(name) inst_name_pass3(dyn, ninst, name, rex)
 #define TABLE64(A, V)   {int val64offset = Table64(dyn, (V), 3); MESSAGE(LOG_DUMP, "  Table64: 0x%lx\n", (V)); LDRx_literal(A, val64offset);}
 #define FTABLE64(A, V)  {mmx87_regs_t v = {.d = V}; int val64offset = Table64(dyn, v.q, 3); MESSAGE(LOG_DUMP, "  FTable64: %g\n", v.d); VLDR64_literal(A, val64offset);}
diff --git a/src/dynarec/arm64/dynarec_arm64_private.h b/src/dynarec/arm64/dynarec_arm64_private.h
index be57a790..ba802217 100644
--- a/src/dynarec/arm64/dynarec_arm64_private.h
+++ b/src/dynarec/arm64/dynarec_arm64_private.h
@@ -9,13 +9,14 @@ typedef struct instsize_s instsize_t;
 
 #define BARRIER_MAYBE   8
 
-#define NEON_CACHE_NONE 0
-#define NEON_CACHE_ST_D 1
-#define NEON_CACHE_ST_F 2
-#define NEON_CACHE_MM   3
-#define NEON_CACHE_XMMW 4
-#define NEON_CACHE_XMMR 5
-#define NEON_CACHE_SCR  6
+#define NEON_CACHE_NONE     0
+#define NEON_CACHE_ST_D     1
+#define NEON_CACHE_ST_F     2
+#define NEON_CACHE_ST_I64   3
+#define NEON_CACHE_MM       4
+#define NEON_CACHE_XMMW     5
+#define NEON_CACHE_XMMR     6
+#define NEON_CACHE_SCR      7
 typedef union neon_cache_s {
     int8_t           v;
     struct {
@@ -69,7 +70,7 @@ typedef struct instruction_arm64_s {
     int                 pred_sz;    // size of predecessor list
     int                 *pred;      // predecessor array
     uintptr_t           mark, mark2, mark3;
-    uintptr_t           markf;
+    uintptr_t           markf, markf2;
     uintptr_t           markseg;
     uintptr_t           marklock;
     int                 pass2choice;// value for choices that are fixed on pass2 for pass3
diff --git a/src/dynarec/dynablock.c b/src/dynarec/dynablock.c
index d5c95111..787a387c 100644
--- a/src/dynarec/dynablock.c
+++ b/src/dynarec/dynablock.c
@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <setjmp.h>
 #include <sys/mman.h>
@@ -9,7 +8,6 @@
 #include "box64context.h"
 #include "dynarec.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -184,7 +182,7 @@ void cancelFillBlock()
     return NULL if block is not found / cannot be created. 
     Don't create if create==0
 */
-static dynablock_t* internalDBGetBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr, int create, int need_lock)
+static dynablock_t* internalDBGetBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr, int create, int need_lock, int is32bits)
 {
     if(hasAlternate((void*)addr))
         return NULL;
@@ -212,18 +210,19 @@ static dynablock_t* internalDBGetBlock(x64emu_t* emu, uintptr_t addr, uintptr_t
     block->x64_addr = (void*)addr;
     if(sigsetjmp(&dynarec_jmpbuf, 1)) {
         printf_log(LOG_INFO, "FillBlock at %p triggered a segfault, cancelling\n", (void*)addr);
+        FreeDynablock(block, 0);
         if(need_lock)
             mutex_unlock(&my_context->mutex_dyndump);
         return NULL;
     }
-    void* ret = FillBlock64(block, filladdr);
+    void* ret = FillBlock64(block, filladdr, (addr==filladdr)?0:1, is32bits);
     if(!ret) {
         dynarec_log(LOG_DEBUG, "Fillblock of block %p for %p returned an error\n", block, (void*)addr);
         customFree(block);
         block = NULL;
     }
     // check size
-    if(block && (block->x64_size || (!block->x64_size && !block->done))) {
+    if(block) {
         int blocksz = block->x64_size;
         if(blocksz>my_context->max_db_size)
             my_context->max_db_size = blocksz;
@@ -245,9 +244,9 @@ static dynablock_t* internalDBGetBlock(x64emu_t* emu, uintptr_t addr, uintptr_t
     return block;
 }
 
-dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create)
+dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create, int is32bits)
 {
-    dynablock_t *db = internalDBGetBlock(emu, addr, addr, create, 1);
+    dynablock_t *db = internalDBGetBlock(emu, addr, addr, create, 1, is32bits);
     if(db && db->done && db->block && getNeedTest(addr)) {
         if(db->always_test)
             sched_yield();  // just calm down...
@@ -255,8 +254,10 @@ dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create)
             emu->test.test = 0;
             if(box64_dynarec_fastpage) {
                 uint32_t hash = X31_hash_code(db->x64_addr, db->x64_size);
-                if(hash==db->hash)  // seems ok, run it without reprotecting it
+                if(hash==db->hash) { // seems ok, run it without reprotecting it
+                    setJumpTableIfRef64(db->x64_addr, db->block, db->jmpnext);
                     return db;
+                }
                 db->done = 0;   // invalidating the block, it's already not good
                 dynarec_log(LOG_DEBUG, "Invalidating block %p from %p:%p (hash:%X/%X) for %p\n", db, db->x64_addr, db->x64_addr+db->x64_size-1, hash, db->hash, (void*)addr);
                 // Free db, it's now invalid!
@@ -275,7 +276,7 @@ dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create)
             // Free db, it's now invalid!
             dynablock_t* old = InvalidDynablock(db, need_lock);
             // start again... (will create a new block)
-            db = internalDBGetBlock(emu, addr, addr, create, need_lock);
+            db = internalDBGetBlock(emu, addr, addr, create, need_lock, is32bits);
             if(db) {
                 if(db->previous)
                     FreeInvalidDynablock(db->previous, need_lock);
@@ -298,11 +299,11 @@ dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create)
     return db;
 }
 
-dynablock_t* DBAlternateBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr)
+dynablock_t* DBAlternateBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr, int is32bits)
 {
-    dynarec_log(LOG_DEBUG, "Creating AlternateBlock at %p for %p\n", (void*)addr, (void*)filladdr);
+    dynarec_log(LOG_DEBUG, "Creating AlternateBlock at %p for %p%s\n", (void*)addr, (void*)filladdr, is32bits?" 32bits":"");
     int create = 1;
-    dynablock_t *db = internalDBGetBlock(emu, addr, filladdr, create, 1);
+    dynablock_t *db = internalDBGetBlock(emu, addr, filladdr, create, 1, is32bits);
     if(db && db->done && db->block && getNeedTest(filladdr)) {
         if(db->always_test)
             sched_yield();  // just calm down...
@@ -314,7 +315,7 @@ dynablock_t* DBAlternateBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr)
             // Free db, it's now invalid!
             dynablock_t* old = InvalidDynablock(db, need_lock);
             // start again... (will create a new block)
-            db = internalDBGetBlock(emu, addr, filladdr, create, need_lock);
+            db = internalDBGetBlock(emu, addr, filladdr, create, need_lock, is32bits);
             if(db) {
                 if(db->previous)
                     FreeInvalidDynablock(db->previous, need_lock);
diff --git a/src/dynarec/dynarec.c b/src/dynarec/dynarec.c
index f0b0eeb5..ab7a21ae 100644
--- a/src/dynarec/dynarec.c
+++ b/src/dynarec/dynarec.c
@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <setjmp.h>
 
@@ -8,7 +7,6 @@
 #include "box64context.h"
 #include "dynarec.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -31,6 +29,7 @@ uintptr_t getX64Address(dynablock_t* db, uintptr_t arm_addr);
 
 void* LinkNext(x64emu_t* emu, uintptr_t addr, void* x2, uintptr_t* x3)
 {
+    int is32bits = (R_CS == 0x23);
     #ifdef HAVE_TRACE
     if(!addr) {
         dynablock_t* db = FindDynablockFromNativeAddress(x2-4);
@@ -38,29 +37,28 @@ void* LinkNext(x64emu_t* emu, uintptr_t addr, void* x2, uintptr_t* x3)
     }
     #endif
     void * jblock;
-    dynablock_t* block = DBGetBlock(emu, addr, 1);
+    dynablock_t* block = NULL;
+    if(hasAlternate((void*)addr)) {
+        printf_log(LOG_DEBUG, "Jmp address has alternate: %p", (void*)addr);
+        if(box64_log<LOG_DEBUG) dynarec_log(LOG_INFO, "Jmp address has alternate: %p", (void*)addr);
+        uintptr_t old_addr = addr;
+        addr = (uintptr_t)getAlternate((void*)addr);    // set new address
+        R_RIP = addr;   // but also new RIP!
+        *x3 = addr; // and the RIP in x27 register
+        printf_log(LOG_DEBUG, " -> %p\n", (void*)addr);
+        block = DBAlternateBlock(emu, old_addr, addr, is32bits);
+    } else
+        block = DBGetBlock(emu, addr, 1, is32bits);
     if(!block) {
-        // no block, let link table as is...
-        if(hasAlternate((void*)addr)) {
-            printf_log(LOG_DEBUG, "Jmp address has alternate: %p", (void*)addr);
-            if(box64_log<LOG_DEBUG) dynarec_log(LOG_INFO, "Jmp address has alternate: %p", (void*)addr);
-            addr = (uintptr_t)getAlternate((void*)addr);    // set new address
-            R_RIP = addr;   // but also new RIP!
-            *x3 = addr; // and the RIP in x27 register
-            printf_log(LOG_DEBUG, " -> %p\n", (void*)addr);
-            block = DBGetBlock(emu, addr, 1);
-        }
-        if(!block) {
-            #ifdef HAVE_TRACE
-            if(LOG_INFO<=box64_dynarec_log) {
-                dynablock_t* db = FindDynablockFromNativeAddress(x2-4);
-                elfheader_t* h = FindElfAddress(my_context, (uintptr_t)x2-4);
-                dynarec_log(LOG_INFO, "Warning, jumping to a no-block address %p from %p (db=%p, x64addr=%p(elf=%s))\n", (void*)addr, x2-4, db, db?(void*)getX64Address(db, (uintptr_t)x2-4):NULL, h?ElfName(h):"(none)");
-            }
-            #endif
-            //tableupdate(native_epilog, addr, table);
-            return native_epilog;
+        #ifdef HAVE_TRACE
+        if(LOG_INFO<=box64_dynarec_log) {
+            dynablock_t* db = FindDynablockFromNativeAddress(x2-4);
+            elfheader_t* h = FindElfAddress(my_context, (uintptr_t)x2-4);
+            dynarec_log(LOG_INFO, "Warning, jumping to a no-block address %p from %p (db=%p, x64addr=%p(elf=%s))\n", (void*)addr, x2-4, db, db?(void*)getX64Address(db, (uintptr_t)x2-4):NULL, h?ElfName(h):"(none)");
         }
+        #endif
+        //tableupdate(native_epilog, addr, table);
+        return native_epilog;
     }
     if(!block->done) {
         // not finished yet... leave linker
@@ -83,26 +81,21 @@ void* LinkNext(x64emu_t* emu, uintptr_t addr, void* x2, uintptr_t* x3)
 void DynaCall(x64emu_t* emu, uintptr_t addr)
 {
     // prepare setjump for signal handling
-    emu_jmpbuf_t *ejb = NULL;
-    int jmpbuf_reset = 0;
-    if(emu->type == EMUTYPE_MAIN) {
-        ejb = GetJmpBuf();
-        if(!ejb->jmpbuf_ok) {
-            ejb->emu = emu;
-            ejb->jmpbuf_ok = 1;
-            jmpbuf_reset = 1;
-            if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1)) {
-                printf_log(LOG_DEBUG, "Setjmp DynaCall, fs=0x%x\n", ejb->emu->segs[_FS]);
-                addr = R_RIP;   // not sure if it should still be inside DynaCall!
-                #ifdef DYNAREC
-                if(box64_dynarec_test) {
-                    if(emu->test.clean)
-                        x64test_check(emu, R_RIP);
-                    emu->test.clean = 0;
-                }
-                #endif
-            }
+    struct __jmp_buf_tag jmpbuf[1] = {0};
+    int skip = 0;
+    struct __jmp_buf_tag *old_jmpbuf = emu->jmpbuf;
+    emu->jmpbuf = jmpbuf;
+
+    if((skip = sigsetjmp(emu->jmpbuf, 1))) {
+        printf_log(LOG_DEBUG, "Setjmp DynaCall, fs=0x%x\n", emu->segs[_FS]);
+        addr = R_RIP;   // not sure if it should still be inside DynaCall!
+        #ifdef DYNAREC
+        if(box64_dynarec_test) {
+            if(emu->test.clean)
+                x64test_check(emu, R_RIP);
+            emu->test.clean = 0;
         }
+        #endif
     }
 #ifdef DYNAREC
     if(!box64_dynarec)
@@ -120,8 +113,10 @@ void DynaCall(x64emu_t* emu, uintptr_t addr)
         R_RIP = addr;
         emu->df = d_none;
         while(!emu->quit) {
-            dynablock_t* block = DBGetBlock(emu, R_RIP, 1);
+            int is32bits = (emu->segs[_CS]==0x23);
+            dynablock_t* block = (skip)?NULL:DBGetBlock(emu, R_RIP, 1, is32bits);
             if(!block || !block->block || !block->done) {
+                skip = 0;
                 // no block, of block doesn't have DynaRec content (yet, temp is not null)
                 // Use interpreter (should use single instruction step...)
                 dynarec_log(LOG_DEBUG, "%04d|Calling Interpreter @%p, emu=%p\n", GetTID(), (void*)R_RIP, emu);
@@ -129,7 +124,7 @@ void DynaCall(x64emu_t* emu, uintptr_t addr)
                     emu->test.clean = 0;
                 Run(emu, 1);
             } else {
-                dynarec_log(LOG_DEBUG, "%04d|Calling DynaRec Block @%p (%p) of %d x64 instructions emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize ,emu);
+                dynarec_log(LOG_DEBUG, "%04d|Calling DynaRec Block @%p (%p) of %d x64 instructions (hash=0x%x) emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize ,block->hash, emu);
                 CHECK_FLAGS(emu);
                 // block is here, let's run it!
                 native_prolog(emu, block->block);
@@ -139,16 +134,6 @@ void DynaCall(x64emu_t* emu, uintptr_t addr)
                 emu->quit = 0;
                 emu->fork = 0;
                 emu = x64emu_fork(emu, forktype);
-                if(emu->type == EMUTYPE_MAIN) {
-                    ejb = GetJmpBuf();
-                    ejb->emu = emu;
-                    ejb->jmpbuf_ok = 1;
-                    jmpbuf_reset = 1;
-                    if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1)) {
-                        printf_log(LOG_DEBUG, "Setjmp inner DynaCall, fs=0x%x\n", ejb->emu->segs[_FS]);
-                        addr = R_RIP;
-                    }
-                }
             }
         }
         emu->quit = 0;  // reset Quit flags...
@@ -167,36 +152,28 @@ void DynaCall(x64emu_t* emu, uintptr_t addr)
     }
 #endif
     // clear the setjmp
-    if(ejb && jmpbuf_reset)
-        ejb->jmpbuf_ok = 0;
+    emu->jmpbuf = old_jmpbuf;
 }
 
 int DynaRun(x64emu_t* emu)
 {
     // prepare setjump for signal handling
-    emu_jmpbuf_t *ejb = NULL;
-#ifdef DYNAREC
-    int jmpbuf_reset = 1;
-#endif
-    if(emu->type == EMUTYPE_MAIN) {
-        ejb = GetJmpBuf();
-        if(!ejb->jmpbuf_ok) {
-            ejb->emu = emu;
-            ejb->jmpbuf_ok = 1;
-#ifdef DYNAREC
-            jmpbuf_reset = 1;
-#endif
-            if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1))
-                printf_log(LOG_DEBUG, "Setjmp DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]);
-                #ifdef DYNAREC
-                if(box64_dynarec_test) {
-                    if(emu->test.clean)
-                        x64test_check(emu, R_RIP);
-                    emu->test.clean = 0;
-                }
-                #endif
+    struct __jmp_buf_tag jmpbuf[1] = {0};
+    int skip = 0;
+    struct __jmp_buf_tag *old_jmpbuf = emu->jmpbuf;
+    emu->jmpbuf = jmpbuf;
+
+    if((skip=sigsetjmp(emu->jmpbuf, 1))) {
+        printf_log(LOG_DEBUG, "Setjmp DynaRun, fs=0x%x\n", emu->segs[_FS]);
+        #ifdef DYNAREC
+        if(box64_dynarec_test) {
+            if(emu->test.clean)
+                x64test_check(emu, R_RIP);
+            emu->test.clean = 0;
         }
+        #endif
     }
+
 #ifdef DYNAREC
     if(!box64_dynarec)
 #endif
@@ -204,8 +181,10 @@ int DynaRun(x64emu_t* emu)
 #ifdef DYNAREC
     else {
         while(!emu->quit) {
-            dynablock_t* block = DBGetBlock(emu, R_RIP, 1);
+            int is32bits = (emu->segs[_CS]==0x23);
+            dynablock_t* block = (skip)?NULL:DBGetBlock(emu, R_RIP, 1, is32bits);
             if(!block || !block->block || !block->done) {
+                skip = 0;
                 // no block, of block doesn't have DynaRec content (yet, temp is not null)
                 // Use interpreter (should use single instruction step...)
                 dynarec_log(LOG_DEBUG, "%04d|Running Interpreter @%p, emu=%p\n", GetTID(), (void*)R_RIP, emu);
@@ -213,7 +192,7 @@ int DynaRun(x64emu_t* emu)
                     emu->test.clean = 0;
                 Run(emu, 1);
             } else {
-                dynarec_log(LOG_DEBUG, "%04d|Running DynaRec Block @%p (%p) of %d x64 insts emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize, emu);
+                dynarec_log(LOG_DEBUG, "%04d|Running DynaRec Block @%p (%p) of %d x64 insts (hash=0x%x) emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize, block->hash, emu);
                 // block is here, let's run it!
                 native_prolog(emu, block->block);
             }
@@ -222,20 +201,11 @@ int DynaRun(x64emu_t* emu)
                 emu->quit = 0;
                 emu->fork = 0;
                 emu = x64emu_fork(emu, forktype);
-                if(emu->type == EMUTYPE_MAIN) {
-                    ejb = GetJmpBuf();
-                    ejb->emu = emu;
-                    ejb->jmpbuf_ok = 1;
-                    jmpbuf_reset = 1;
-                    if(sigsetjmp((struct __jmp_buf_tag*)ejb->jmpbuf, 1))
-                        printf_log(LOG_DEBUG, "Setjmp inner DynaRun, fs=0x%x\n", ejb->emu->segs[_FS]);
-                }
             }
         }
     }
     // clear the setjmp
-    if(ejb && jmpbuf_reset)
-        ejb->jmpbuf_ok = 0;
+    emu->jmpbuf = old_jmpbuf;
     return 0;
 #endif
 }
diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c
index 64d28342..dde23b49 100644
--- a/src/dynarec/dynarec_native.c
+++ b/src/dynarec/dynarec_native.c
@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <string.h>
 #include <assert.h>
@@ -10,7 +9,6 @@
 #include "custommem.h"
 #include "dynarec.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -75,7 +73,7 @@ void add_next(dynarec_native_t *dyn, uintptr_t addr) {
     // add slots
     if(dyn->next_sz == dyn->next_cap) {
         dyn->next_cap += 64;
-        dyn->next = (uintptr_t*)customRealloc(dyn->next, dyn->next_cap*sizeof(uintptr_t));
+        dyn->next = (uintptr_t*)dynaRealloc(dyn->next, dyn->next_cap*sizeof(uintptr_t));
     }
     dyn->next[dyn->next_sz++] = addr;
 }
@@ -279,11 +277,13 @@ int Table64(dynarec_native_t *dyn, uint64_t val, int pass)
         if(dyn->table64size == dyn->table64cap) {
             dyn->table64cap+=16;
             if(pass<3)  // do not resize on pass3, it's not the same type of memory anymore
-                dyn->table64 = (uint64_t*)customRealloc(dyn->table64, dyn->table64cap * sizeof(uint64_t));
+                dyn->table64 = (uint64_t*)dynaRealloc(dyn->table64, dyn->table64cap * sizeof(uint64_t));
         }
         idx = dyn->table64size++;
-        if(dyn->table64size <= dyn->table64cap)
+        if(idx < dyn->table64cap)
             dyn->table64[idx] = val;
+        else
+            printf_log(LOG_NONE, "Warning, table64 bigger than expected %d vs %d\n", idx, dyn->table64cap);
     }
     // calculate offset
     int delta = dyn->tablestart + idx*sizeof(uint64_t) - (uintptr_t)dyn->block;
@@ -301,6 +301,13 @@ static void fillPredecessors(dynarec_native_t* dyn)
             dyn->insts[dyn->insts[i].x64.jmp_insts].pred_sz++;
         }
     }
+    // remove "has_next" from orphean branch
+    for(int i=0; i<dyn->size-1; ++i) {
+        if(!dyn->insts[i].x64.has_next) {
+            if(dyn->insts[i+1].x64.has_next && !dyn->insts[i+1].pred_sz)
+                dyn->insts[i+1].x64.has_next = 0;
+        }
+    }
     // second the "has_next"
     for(int i=0; i<dyn->size-1; ++i) {
         if(dyn->insts[i].x64.has_next) {
@@ -308,7 +315,8 @@ static void fillPredecessors(dynarec_native_t* dyn)
             dyn->insts[i+1].pred_sz++;
         }
     }
-    dyn->predecessor = (int*)customMalloc(pred_sz*sizeof(int));
+    int alloc_size = pred_sz;
+    dyn->predecessor = (int*)dynaMalloc(pred_sz*sizeof(int));
     // fill pred pointer
     int* p = dyn->predecessor;
     for(int i=0; i<dyn->size; ++i) {
@@ -325,7 +333,6 @@ static void fillPredecessors(dynarec_native_t* dyn)
             dyn->insts[j].pred[dyn->insts[j].pred_sz++] = i;
         }
     }
-
 }
 
 // updateNeed goes backward, from last intruction to top
@@ -368,9 +375,9 @@ static int updateNeed(dynarec_native_t* dyn, int ninst, uint8_t need) {
             else
                 updateNeed(dyn, dyn->insts[ninst].pred[i], need);
         }
-        if(!ok)
-            return ninst - 1;
         --ninst;
+        if(!ok)
+            return ninst;
     }
     return ninst;
 }
@@ -384,11 +391,11 @@ void CancelBlock64(int need_lock)
     dynarec_native_t* helper = (dynarec_native_t*)current_helper;
     current_helper = NULL;
     if(helper) {
-        customFree(helper->next);
-        customFree(helper->insts);
-        customFree(helper->predecessor);
+        dynaFree(helper->next);
+        dynaFree(helper->insts);
+        dynaFree(helper->predecessor);
         if(helper->table64 && (helper->table64!=(uint64_t*)helper->tablestart))
-            customFree(helper->table64);
+            dynaFree(helper->table64);
         if(helper->dynablock && helper->dynablock->actual_block) {
             FreeDynarecMap((uintptr_t)helper->dynablock->actual_block);
             helper->dynablock->actual_block = NULL;
@@ -398,10 +405,10 @@ void CancelBlock64(int need_lock)
         mutex_unlock(&my_context->mutex_dyndump);
 }
 
-uintptr_t native_pass0(dynarec_native_t* dyn, uintptr_t addr);
-uintptr_t native_pass1(dynarec_native_t* dyn, uintptr_t addr);
-uintptr_t native_pass2(dynarec_native_t* dyn, uintptr_t addr);
-uintptr_t native_pass3(dynarec_native_t* dyn, uintptr_t addr);
+uintptr_t native_pass0(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits);
+uintptr_t native_pass1(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits);
+uintptr_t native_pass2(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits);
+uintptr_t native_pass3(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits);
 
 void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr) {
     block->isize = 0;
@@ -426,7 +433,7 @@ void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr) {
     return block;
 }
 
-void* FillBlock64(dynablock_t* block, uintptr_t addr) {
+void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bits) {
     /*
         A Block must have this layout:
 
@@ -461,18 +468,18 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr) {
     helper.start = addr;
     uintptr_t start = addr;
     helper.cap = 128;
-    helper.insts = (instruction_native_t*)customCalloc(helper.cap, sizeof(instruction_native_t));
+    helper.insts = (instruction_native_t*)dynaCalloc(helper.cap, sizeof(instruction_native_t));
     // pass 0, addresses, x64 jump addresses, overall size of the block
-    uintptr_t end = native_pass0(&helper, addr);
+    uintptr_t end = native_pass0(&helper, addr, alternate, is32bits);
     // no need for next anymore
-    customFree(helper.next);
+    dynaFree(helper.next);
     helper.next_sz = helper.next_cap = 0;
     helper.next = NULL;
     // basic checks
     if(!helper.size) {
         dynarec_log(LOG_INFO, "Warning, null-sized dynarec block (%p)\n", (void*)addr);
         CancelBlock64(0);
-        return CreateEmptyBlock(block, addr);;
+        return CreateEmptyBlock(block, addr);
     }
     if(!isprotectedDB(addr, 1)) {
         dynarec_log(LOG_INFO, "Warning, write on current page on pass0, aborting dynablock creation (%p)\n", (void*)addr);
@@ -514,20 +521,21 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr) {
         pos = updateNeed(&helper, pos, 0);
 
     // pass 1, float optimisations, first pass for flags
-    native_pass1(&helper, addr);
+    native_pass1(&helper, addr, alternate, is32bits);
     
     // pass 2, instruction size
-    native_pass2(&helper, addr);
+    native_pass2(&helper, addr, alternate, is32bits);
     // keep size of instructions for signal handling
     size_t insts_rsize = (helper.insts_size+2)*sizeof(instsize_t);
     insts_rsize = (insts_rsize+7)&~7;   // round the size...
     size_t native_size = (helper.native_size+7)&~7;   // round the size...
     // ok, now allocate mapped memory, with executable flag on
     size_t sz = sizeof(void*) + native_size + helper.table64size*sizeof(uint64_t) + 4*sizeof(void*) + insts_rsize;
-    //           dynablock_t*     block (arm insts)            table64                       jmpnext code       instsize
+    //           dynablock_t*     block (arm insts)            table64               jmpnext code       instsize
     void* actual_p = (void*)AllocDynarecMap(sz);
     void* p = (void*)(((uintptr_t)actual_p) + sizeof(void*));
-    void* next = p + native_size + helper.table64size*sizeof(uint64_t);
+    void* tablestart = p + native_size;
+    void* next = tablestart + helper.table64size*sizeof(uint64_t);
     void* instsize = next + 4*sizeof(void*);
     if(actual_p==NULL) {
         dynarec_log(LOG_INFO, "AllocDynarecMap(%p, %zu) failed, cancelling block\n", block, sz);
@@ -537,33 +545,34 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr) {
     helper.block = p;
     block->actual_block = actual_p;
     helper.native_start = (uintptr_t)p;
-    helper.tablestart = helper.native_start + native_size;
+    helper.tablestart = (uintptr_t)tablestart;
     helper.jmp_next = (uintptr_t)next+sizeof(void*);
-    helper.insts_size = 0;  // reset
     helper.instsize = (instsize_t*)instsize;
     *(dynablock_t**)actual_p = block;
     helper.table64cap = helper.table64size;
-    customFree(helper.table64);
+    dynaFree(helper.table64);
     helper.table64 = (uint64_t*)helper.tablestart;
     // pass 3, emit (log emit native opcode)
     if(box64_dynarec_dump) {
-        dynarec_log(LOG_NONE, "%s%04d|Emitting %zu bytes for %u x64 bytes", (box64_dynarec_dump>1)?"\e[01;36m":"", GetTID(), helper.native_size, helper.isize); 
+        dynarec_log(LOG_NONE, "%s%04d|Emitting %zu bytes for %u %s bytes", (box64_dynarec_dump>1)?"\e[01;36m":"", GetTID(), helper.native_size, helper.isize, is32bits?"x86":"x64"); 
         printFunctionAddr(helper.start, " => ");
         dynarec_log(LOG_NONE, "%s\n", (box64_dynarec_dump>1)?"\e[m":"");
     }
     int oldtable64size = helper.table64size;
     size_t oldnativesize = helper.native_size;
+    size_t oldinstsize = helper.insts_size;
     helper.native_size = 0;
     helper.table64size = 0; // reset table64 (but not the cap)
-    native_pass3(&helper, addr);
+    helper.insts_size = 0;  // reset
+    native_pass3(&helper, addr, alternate, is32bits);
     // keep size of instructions for signal handling
     block->instsize = instsize;
     // ok, free the helper now
-    customFree(helper.insts);
+    dynaFree(helper.insts);
     helper.insts = NULL;
     helper.table64 = NULL;
     helper.instsize = NULL;
-    customFree(helper.predecessor);
+    dynaFree(helper.predecessor);
     helper.predecessor = NULL;
     block->size = sz;
     block->isize = helper.size;
@@ -601,6 +610,9 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr) {
         CancelBlock64(0);
         return NULL;
     }
+    if(insts_rsize/sizeof(instsize_t)<helper.insts_size) {
+        printf_log(LOG_NONE, "BOX64: Warning, ists_size difference in block between pass2 (%zu) and pass3 (%zu), allocated: %zu\n", oldinstsize, helper.insts_size, insts_rsize/sizeof(instsize_t));
+    }
     if(!isprotectedDB(addr, end-addr)) {
         dynarec_log(LOG_DEBUG, "Warning, block unprotected while being processed %p:%ld, marking as need_test\n", block->x64_addr, block->x64_size);
         AddHotPage(addr);
diff --git a/src/dynarec/dynarec_native_functions.c b/src/dynarec/dynarec_native_functions.c
index 42c7fba8..4cd26db8 100644
--- a/src/dynarec/dynarec_native_functions.c
+++ b/src/dynarec/dynarec_native_functions.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <string.h>
 #include <math.h>
@@ -70,9 +69,9 @@ void native_fprem(x64emu_t* emu)
     int32_t tmp32s = ST0.d / ST1.d;
     ST0.d -= ST1.d * tmp32s;
     emu->sw.f.F87_C2 = 0;
-    emu->sw.f.F87_C0 = (tmp32s&1);
+    emu->sw.f.F87_C1 = (tmp32s&1);
     emu->sw.f.F87_C3 = ((tmp32s>>1)&1);
-    emu->sw.f.F87_C1 = ((tmp32s>>2)&1);
+    emu->sw.f.F87_C0 = ((tmp32s>>2)&1);
 }
 void native_fyl2xp1(x64emu_t* emu)
 {
@@ -160,9 +159,15 @@ void native_ud(x64emu_t* emu)
 
 void native_priv(x64emu_t* emu)
 {
+    emu->test.test = 0;
     emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
 }
 
+void native_singlestep(x64emu_t* emu)
+{
+    emit_signal(emu, SIGTRAP, (void*)R_RIP, 1);
+}
+
 void native_fsave(x64emu_t* emu, uint8_t* ed)
 {
     fpu_savenv(emu, (char*)ed, 0);
@@ -193,9 +198,9 @@ void native_fprem1(x64emu_t* emu)
     int32_t tmp32s = round(ST0.d / ST1.d);
     ST0.d -= ST1.d*tmp32s;
     emu->sw.f.F87_C2 = 0;
-    emu->sw.f.F87_C0 = (tmp32s&1);
+    emu->sw.f.F87_C1 = (tmp32s&1);
     emu->sw.f.F87_C3 = ((tmp32s>>1)&1);
-    emu->sw.f.F87_C1 = ((tmp32s>>2)&1);
+    emu->sw.f.F87_C0 = ((tmp32s>>2)&1);
 }
 
 static uint8_t ff_mult(uint8_t a, uint8_t b)
@@ -203,19 +208,19 @@ static uint8_t ff_mult(uint8_t a, uint8_t b)
 	int retval = 0;
 
 	for(int i = 0; i < 8; i++) {
-		if((b & 1) == 1) 
+		if((b & 1) == 1)
 			retval ^= a;
-		
+
 		if((a & 0x80)) {
 			a <<= 1;
 			a  ^= 0x1b;
 		} else {
 			a <<= 1;
 		}
-		
+
 		b >>= 1;
 	}
-	
+
 	return retval;
 }
 
@@ -365,20 +370,20 @@ static int flagsCacheNeedsTransform(dynarec_native_t* dyn, int ninst) {
         if(dyn->f.pending!=SF_PENDING) {*/
     switch (dyn->insts[jmp].f_entry.pending) {
         case SF_UNKNOWN: return 0;
-        case SF_SET: 
-            if(dyn->insts[ninst].f_exit.pending!=SF_SET && dyn->insts[ninst].f_exit.pending!=SF_SET_PENDING) 
-                return 1; 
-            else 
+        case SF_SET:
+            if(dyn->insts[ninst].f_exit.pending!=SF_SET && dyn->insts[ninst].f_exit.pending!=SF_SET_PENDING)
+                return 1;
+            else
                 return 0;
         case SF_SET_PENDING:
-            if(dyn->insts[ninst].f_exit.pending!=SF_SET 
+            if(dyn->insts[ninst].f_exit.pending!=SF_SET
             && dyn->insts[ninst].f_exit.pending!=SF_SET_PENDING
-            && dyn->insts[ninst].f_exit.pending!=SF_PENDING) 
-                return 1; 
-            else 
+            && dyn->insts[ninst].f_exit.pending!=SF_PENDING)
+                return 1;
+            else
                 return 0;
         case SF_PENDING:
-            if(dyn->insts[ninst].f_exit.pending!=SF_SET 
+            if(dyn->insts[ninst].f_exit.pending!=SF_SET
             && dyn->insts[ninst].f_exit.pending!=SF_SET_PENDING
             && dyn->insts[ninst].f_exit.pending!=SF_PENDING)
                 return 1;
@@ -413,7 +418,7 @@ int getNominalPred(dynarec_native_t* dyn, int ninst) {
 
 #define F8      *(uint8_t*)(addr++)
 // Do the GETED, but don't emit anything...
-uintptr_t fakeed(dynarec_native_t* dyn, uintptr_t addr, int ninst, uint8_t nextop) 
+uintptr_t fakeed(dynarec_native_t* dyn, uintptr_t addr, int ninst, uint8_t nextop)
 {
     (void)dyn; (void)addr; (void)ninst;
 
diff --git a/src/dynarec/dynarec_native_functions.h b/src/dynarec/dynarec_native_functions.h
index 2733cd5a..e9862598 100644
--- a/src/dynarec/dynarec_native_functions.h
+++ b/src/dynarec/dynarec_native_functions.h
@@ -45,6 +45,7 @@ void native_clflush(x64emu_t* emu, void* p);
 
 void native_ud(x64emu_t* emu);
 void native_priv(x64emu_t* emu);
+void native_singlestep(x64emu_t* emu);
 
 // Caches transformation (for loops) // Specific, need to be written par backend
 int CacheNeedsTransform(dynarec_native_t* dyn, int i1);
diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c
index 1e8ba3aa..8ce3540b 100644
--- a/src/dynarec/dynarec_native_pass.c
+++ b/src/dynarec/dynarec_native_pass.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <string.h>
 
@@ -27,7 +26,7 @@
 #error No STEP defined
 #endif
 
-uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr)
+uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits)
 {
     int ok = 1;
     int ninst = 0;
@@ -47,7 +46,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr)
     fpu_reset(dyn);
     ARCH_INIT();
     int reset_n = -1;
-    dyn->last_ip = (dyn->insts && dyn->insts[0].pred_sz)?0:ip;  // RIP is always set at start of block unless there is a predecessor!
+    dyn->last_ip = (alternate || (dyn->insts && dyn->insts[0].pred_sz))?0:ip;  // RIP is always set at start of block unless there is a predecessor!
     int stopblock = 2+(FindElfAddress(my_context, addr)?0:1); // if block is in elf_memory, it can be extended with bligblocks==2, else it needs 3
     // ok, go now
     INIT;
@@ -118,11 +117,13 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr)
             pk = PK(0);
         }
         rex.rex = 0;
-        while(pk>=0x40 && pk<=0x4f) {
-            rex.rex = pk;
-            ++addr;
-            pk = PK(0);
-        }
+        rex.is32bits = is32bits;
+        if(!rex.is32bits)
+            while(pk>=0x40 && pk<=0x4f) {
+                rex.rex = pk;
+                ++addr;
+                pk = PK(0);
+            }
 
         addr = dynarec64_00(dyn, addr, ip, ninst, rex, rep, &ok, &need_epilog);
 
diff --git a/src/dynarec/dynarec_next.h b/src/dynarec/dynarec_next.h
index 0ad6c18d..dc37aadb 100644
--- a/src/dynarec/dynarec_next.h
+++ b/src/dynarec/dynarec_next.h
@@ -4,21 +4,21 @@
 #ifdef ARM64
 void arm64_next(void) EXPORTDYN;
 void arm64_prolog(x64emu_t* emu, void* addr) EXPORTDYN;
-void arm64_epilog() EXPORTDYN;
+void arm64_epilog(void) EXPORTDYN;
 #define native_next         arm64_next
 #define native_prolog       arm64_prolog
 #define native_epilog       arm64_epilog
 #elif defined(LA464)
 void la464_next(void) EXPORTDYN;
 void la464_prolog(x64emu_t* emu, void* addr) EXPORTDYN;
-void la464_epilog() EXPORTDYN;
+void la464_epilog(void) EXPORTDYN;
 #define native_next         la464_next
 #define native_prolog       la464_prolog
 #define native_epilog       la464_epilog
 #elif defined(RV64)
 void rv64_next(void) EXPORTDYN;
 void rv64_prolog(x64emu_t* emu, void* addr) EXPORTDYN;
-void rv64_epilog() EXPORTDYN;
+void rv64_epilog(void) EXPORTDYN;
 #define native_next         rv64_next
 #define native_prolog       rv64_prolog
 #define native_epilog       rv64_epilog
diff --git a/src/dynarec/rv64/dynarec_rv64_00.c b/src/dynarec/rv64/dynarec_rv64_00.c
index f5bd8af7..5f529fb7 100644
--- a/src/dynarec/rv64/dynarec_rv64_00.c
+++ b/src/dynarec/rv64/dynarec_rv64_00.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
@@ -26,8 +25,6 @@
 #include "dynarec_rv64_functions.h"
 #include "dynarec_rv64_helper.h"
 
-int isSimpleWrapper(wrapper_t fun);
-
 uintptr_t dynarec64_00(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
 {
     uint8_t opcode;
diff --git a/src/dynarec/rv64/dynarec_rv64_00_0.c b/src/dynarec/rv64/dynarec_rv64_00_0.c
index 0320107d..a0ff3746 100644
--- a/src/dynarec/rv64/dynarec_rv64_00_0.c
+++ b/src/dynarec/rv64/dynarec_rv64_00_0.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
@@ -26,8 +25,6 @@
 #include "dynarec_rv64_functions.h"
 #include "dynarec_rv64_helper.h"
 
-int isSimpleWrapper(wrapper_t fun);
-
 uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
 {
     uint8_t nextop, opcode;
@@ -178,7 +175,7 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             nextop = F8;
             GETGD;
             GETED(0);
-            emit_adc32(dyn, ninst, rex, ed, gd, x3, x4, x5);
+            emit_adc32(dyn, ninst, rex, ed, gd, x3, x4, x5, x6);
             WBACK;
             break;
 
@@ -231,6 +228,15 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             ANDI(xRAX, xRAX, ~0xff);
             OR(xRAX, xRAX, x1);
             break;
+        case 0x1D:
+            INST_NAME("SBB EAX, Id");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            MOV64xw(x2, i64);
+            emit_sbb32(dyn, ninst, rex, xRAX, x2, x3, x4, x5);
+            break;
+
         case 0x20:
             INST_NAME("AND Eb, Gb");
             SETFLAGS(X_ALL, SF_SET_PENDING);
diff --git a/src/dynarec/rv64/dynarec_rv64_00_1.c b/src/dynarec/rv64/dynarec_rv64_00_1.c
index 3abb0444..54ca28f5 100644
--- a/src/dynarec/rv64/dynarec_rv64_00_1.c
+++ b/src/dynarec/rv64/dynarec_rv64_00_1.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
@@ -53,7 +52,32 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     MAYUSE(cacheupd);
 
     switch(opcode) {
-
+        case 0x40:
+        case 0x41:
+        case 0x42:
+        case 0x43:
+        case 0x44:
+        case 0x45:
+        case 0x46:
+        case 0x47:
+            INST_NAME("INC Reg (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            emit_inc32(dyn, ninst, rex, gd, x1, x2, x3, x4);
+            break;
+        case 0x48:
+        case 0x49:
+        case 0x4A:
+        case 0x4B:
+        case 0x4C:
+        case 0x4D:
+        case 0x4E:
+        case 0x4F:
+            INST_NAME("DEC Reg (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            emit_dec32(dyn, ninst, rex, gd, x1, x2, x3, x4);
+            break;
         case 0x50:
         case 0x51:
         case 0x52:
@@ -64,8 +88,7 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x57:
             INST_NAME("PUSH reg");
             gd = xRAX+(opcode&0x07)+(rex.b<<3);
-            SD(gd, xRSP, -8);
-            SUBI(xRSP, xRSP, 8);
+            PUSH1z(gd);
             break;
         case 0x58:
         case 0x59:
@@ -77,31 +100,65 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x5F:
             INST_NAME("POP reg");
             gd = xRAX+(opcode&0x07)+(rex.b<<3);
-            LD(gd, xRSP, 0);
-            if(gd!=xRSP) {
-                ADDI(xRSP, xRSP, 8);
+            POP1z(gd);
+            break;
+
+        case 0x60:
+            if(rex.is32bits) {
+                INST_NAME("PUSHAD");
+                AND(x1, xRSP, xMASK);
+                PUSH1_32(xRAX);
+                PUSH1_32(xRCX);
+                PUSH1_32(xRDX);
+                PUSH1_32(xRBX);
+                PUSH1_32(x1);
+                PUSH1_32(xRBP);
+                PUSH1_32(xRSI);
+                PUSH1_32(xRDI);
+            } else {
+                DEFAULT;
+            }
+            break;
+        case 0x61:
+            if(rex.is32bits) {
+                INST_NAME("POPAD");
+                POP1_32(xRDI);
+                POP1_32(xRSI);
+                POP1_32(xRBP);
+                POP1_32(x1);
+                POP1_32(xRBX);
+                POP1_32(xRDX);
+                POP1_32(xRCX);
+                POP1_32(xRAX);
+            } else {
+                DEFAULT;
             }
             break;
 
         case 0x63:
-            INST_NAME("MOVSXD Gd, Ed");
-            nextop = F8;
-            GETGD;
-            if(rex.w) {
-                if(MODREG) {   // reg <= reg
-                    ADDIW(gd, xRAX+(nextop&7)+(rex.b<<3), 0);
-                } else {                    // mem <= reg
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
-                    LW(gd, ed, fixedaddress);
-                }
+            if(rex.is32bits) {
+                // this is ARPL opcode
+                DEFAULT;
             } else {
-                if(MODREG) {   // reg <= reg
-                    AND(gd, xRAX+(nextop&7)+(rex.b<<3), xMASK);
-                } else {                    // mem <= reg
-                    SMREAD();
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
-                    LWU(gd, ed, fixedaddress);
+                INST_NAME("MOVSXD Gd, Ed");
+                nextop = F8;
+                GETGD;
+                if(rex.w) {
+                    if(MODREG) {   // reg <= reg
+                        ADDIW(gd, xRAX+(nextop&7)+(rex.b<<3), 0);
+                    } else {                    // mem <= reg
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                        LW(gd, ed, fixedaddress);
+                    }
+                } else {
+                    if(MODREG) {   // reg <= reg
+                        AND(gd, xRAX+(nextop&7)+(rex.b<<3), xMASK);
+                    } else {                    // mem <= reg
+                        SMREAD();
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                        LWU(gd, ed, fixedaddress);
+                    }
                 }
             }
             break;
@@ -114,7 +171,9 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x66:
             addr = dynarec64_66(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
             break;
-
+        case 0x67:
+            addr = dynarec64_67(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
+            break;
         case 0x68:
             INST_NAME("PUSH Id");
             i64 = F32S;
@@ -122,10 +181,10 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 MESSAGE(LOG_DUMP, "PUSH then RET, using indirect\n");
                 TABLE64(x3, addr-4);
                 LW(x1, x3, 0);
-                PUSH1(x1);
+                PUSH1z(x1);
             } else {
-                MOV64x(x3, i64);
-                PUSH1(x3);
+                MOV64z(x3, i64);
+                PUSH1z(x3);
             }
             break;
         case 0x69:
@@ -164,8 +223,8 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x6A:
             INST_NAME("PUSH Ib");
             i64 = F8S;
-            MOV64x(x3, i64);
-            PUSH1(x3);
+            MOV64z(x3, i64);
+            PUSH1z(x3);
             break;
         case 0x6B:
             INST_NAME("IMUL Gd, Ed, Ib");
@@ -179,12 +238,12 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 // 64bits imul
                 UFLAG_IF {
                     MULH(x3, ed, x4);
-                    MULW(gd, ed, x4);
+                    MUL(gd, ed, x4);
                     UFLAG_OP1(x3);
                     UFLAG_RES(gd);
                     UFLAG_DF(x3, d_imul64);
                 } else {
-                    MULxw(gd, ed, x4);
+                    MUL(gd, ed, x4);
                 }
             } else {
                 // 32bits imul
@@ -195,7 +254,7 @@ uintptr_t dynarec64_00_1(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     UFLAG_OP1(x3);
                     UFLAG_DF(x3, d_imul32);
                 } else {
-                    MULxw(gd, ed, x4);
+                    MULW(gd, ed, x4);
                 }
                 ZEROUP(gd);
             }
diff --git a/src/dynarec/rv64/dynarec_rv64_00_2.c b/src/dynarec/rv64/dynarec_rv64_00_2.c
index 6f0ef03e..20333f96 100644
--- a/src/dynarec/rv64/dynarec_rv64_00_2.c
+++ b/src/dynarec/rv64/dynarec_rv64_00_2.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
@@ -26,8 +25,6 @@
 #include "dynarec_rv64_functions.h"
 #include "dynarec_rv64_helper.h"
 
-int isSimpleWrapper(wrapper_t fun);
-
 uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
 {
     uint8_t nextop, opcode;
@@ -72,6 +69,15 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     emit_or8c(dyn, ninst, x1, u8, x2, x4, x5);
                     EBBACK(x5, 0);
                     break;
+                case 2: // ADC
+                    INST_NAME("ADC Eb, Ib");
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEB(x1, 1);
+                    u8 = F8;
+                    emit_adc8c(dyn, ninst, x1, u8, x2, x4, x5, x6);
+                    EBBACK(x5, 0);
+                    break;
                 case 3: // SBB
                     INST_NAME("SBB Eb, Ib");
                     READFLAGS(X_CF);
@@ -148,7 +154,7 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     GETED((opcode==0x81)?4:1);
                     if(opcode==0x81) i64 = F32S; else i64 = F8S;
                     MOV64xw(x5, i64);
-                    emit_adc32(dyn, ninst, rex, ed, x5, x3, x4, x6);
+                    emit_adc32(dyn, ninst, rex, ed, x5, x3, x4, x6, x9);
                     WBACK;
                     break;
                 case 3: // SBB
@@ -297,7 +303,7 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 ANDI(gd, gb1, 0xff);
                 if(eb2) {
                     MOV64x(x1, 0xffffffffffff00ffLL);
-                    ANDI(x1, eb1, x1);
+                    AND(x1, eb1, x1);
                     SLLI(gd, gd, 8);
                     OR(eb1, x1, gd);
                 } else {
@@ -316,7 +322,7 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETGD;
             if(MODREG) {   // reg <= reg
                 MVxw(xRAX+(nextop&7)+(rex.b<<3), gd);
-            } else {                    // mem <= reg
+            } else {       // mem <= reg
                 addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0);
                 SDxw(gd, ed, fixedaddress);
                 SMWRITELOCK(lock);
@@ -391,15 +397,13 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("LEA Gd, Ed");
             nextop=F8;
             GETGD;
-            if(MODREG) {   // reg <= reg? that's an invalid operation
+            if(MODREG) { // reg <= reg? that's an invalid operation
                 DEFAULT;
-            } else {                    // mem <= reg
-                addr = geted(dyn, addr, ninst, nextop, &ed, gd, x1, &fixedaddress, rex, NULL, 0, 0);
-                if(gd!=ed) {    // it's sometimes used as a 3 bytes NOP
-                    MV(gd, ed);
-                }
-                if(!rex.w) {
-                    ZEROUP(gd);   //truncate the higher 32bits as asked
+            } else {     // mem <= reg
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 0, 0);
+                MV(gd, ed);
+                if(!rex.w || rex.is32bits) {
+                    ZEROUP(gd); // truncate the higher 32bits as asked
                 }
             }
             break;
@@ -421,17 +425,17 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("POP Ed");
             nextop = F8;
             if(MODREG) {
-                POP1(xRAX+(nextop&7)+(rex.b<<3));
+                POP1z(xRAX+(nextop&7)+(rex.b<<3));
             } else {
-                POP1(x2); // so this can handle POP [ESP] and maybe some variant too
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0);
+                POP1z(x2); // so this can handle POP [ESP] and maybe some variant too
+                addr = geted(dyn, addr, ninst, nextop, &ed, x3, x1, &fixedaddress, rex, &lock, 1, 0);
                 if(ed==xRSP) {
-                    SD(x2, ed, fixedaddress);
+                    SDz(x2, ed, fixedaddress);
                 } else {
                     // complicated to just allow a segfault that can be recovered correctly
-                    SUB(xRSP, xRSP, 8);
-                    SD(x2, ed, fixedaddress);
-                    ADD(xRSP, xRSP, 8);
+                    ADDIz(xRSP, xRSP, rex.is32bits?-4:-8);
+                    SDz(x2, ed, fixedaddress);
+                    ADDIz(xRSP, xRSP, rex.is32bits?4:8);
                 }
             }
             break;
@@ -473,39 +477,68 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 ZEROUP(xRDX);
             }
             break;
+        case 0x9B:
+            INST_NAME("FWAIT");
+            break;
         case 0x9C:
             INST_NAME("PUSHF");
+            NOTEST(x1);
             READFLAGS(X_ALL);
             FLAGS_ADJUST_TO11(x3, xFlags, x2);
-            PUSH1(x3);
+            PUSH1z(x3);
             break;
         case 0x9D:
             INST_NAME("POPF");
             SETFLAGS(X_ALL, SF_SET);
-            POP1(xFlags);
+            POP1z(xFlags);
             FLAGS_ADJUST_FROM11(xFlags, x2);
             MOV32w(x1, 0x3F7FD7);
             AND(xFlags, xFlags, x1);
             ORI(xFlags, xFlags, 0x2);
             SET_DFNONE();
+            if(box64_wine) {    // should this be done all the time?
+                ANDI(x1, xFlags, 1 << F_TF);
+                CBZ_NEXT(x1);
+                MOV64x(xRIP, addr);
+                STORE_XEMU_CALL();
+                CALL(native_singlestep, -1);
+                ANDI(xFlags, xFlags, ~(1 << F_TF));
+            }
+            break;
+        case 0x9F:
+            INST_NAME("LAHF");
+            READFLAGS(X_CF|X_PF|X_AF|X_ZF|X_SF);
+            ANDI(x1, xFlags, 0xFF);
+            SLLI(x1, x1, 8);
+            MOV64x(x2, 0xffffffffffff00ffLL);
+            AND(xRAX, xRAX, x2);
+            OR(xRAX, xRAX, x1);
+            break;
+        case 0xA0:
+            INST_NAME("MOV AL,Ob");
+            if(rex.is32bits) u64 = F32; else u64 = F64;
+            MOV64z(x1, u64);
+            LBU(x1, x1, 0);
+            ANDI(xRAX, xRAX, ~0xff);
+            OR(xRAX, xRAX, x1);
             break;
         case 0xA1:
             INST_NAME("MOV EAX,Od");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits) u64 = F32; else u64 = F64;
+            MOV64z(x1, u64);
             LDxw(xRAX, x1, 0);
             break;
         case 0xA2:
             INST_NAME("MOV Ob,AL");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits) u64 = F32; else u64 = F64;
+            MOV64z(x1, u64);
             SB(xRAX, x1, 0);
             SMWRITE();
             break;
         case 0xA3:
             INST_NAME("MOV Od,EAX");
-            u64 = F64;
-            MOV64x(x1, u64);
+            if(rex.is32bits) u64 = F32; else u64 = F64;
+            MOV64z(x1, u64);
             SDxw(xRAX, x1, 0);
             SMWRITE();
             break;
@@ -628,6 +661,31 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             MOV64xw(x2, i64);
             emit_test32(dyn, ninst, rex, xRAX, x2, x3, x4, x5);
             break;
+        case 0xAA:
+            if(rep) {
+                INST_NAME("REP STOSB");
+                CBZ_NEXT(xRCX);
+                ANDI(x1, xFlags, 1<<F_DF);
+                BNEZ_MARK2(x1);
+                MARK;   // Part with DF==0
+                SB(xRAX, xRDI, 0);
+                ADDI(xRDI, xRDI, 1);
+                ADDI(xRCX, xRCX, -1);
+                BNEZ_MARK(xRCX);
+                B_NEXT_nocond;
+                MARK2;  // Part with DF==1
+                SB(xRAX, xRDI, 0);
+                ADDI(xRDI, xRDI, -1);
+                ADDI(xRCX, xRCX, -1);
+                BNEZ_MARK2(xRCX);
+                // done
+            } else {
+                INST_NAME("STOSB");
+                GETDIR(x3, x1, 1);
+                SB(xRAX, xRDI, 0);
+                ADD(xRDI, xRDI, x3);
+            }
+            break;
         case 0xAB:
             if(rep) {
                 INST_NAME("REP STOSD");
@@ -653,6 +711,82 @@ uintptr_t dynarec64_00_2(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 ADD(xRDI, xRDI, x3);
             }
             break;
+        case 0xAE:
+            switch (rep) {
+            case 1:
+            case 2:
+                if (rep==1) {INST_NAME("REPNZ SCASB");} else {INST_NAME("REPZ SCASB");}
+                MAYSETFLAGS();
+                SETFLAGS(X_ALL, SF_SET_PENDING);
+                CBZ_NEXT(xRCX);
+                ANDI(x1, xRAX, 0xff);
+                ANDI(x2, xFlags, 1<<F_DF);
+                BNEZ_MARK2(x2);
+                MARK;   // Part with DF==0
+                LBU(x2, xRDI, 0);
+                ADDI(xRDI, xRDI, 1);
+                SUBI(xRCX, xRCX, 1);
+                if (rep==1) {BEQ_MARK3(x1, x2);} else {BNE_MARK3(x1, x2);}
+                BNE_MARK(xRCX, xZR);
+                B_MARK3_nocond;
+                MARK2;  // Part with DF==1
+                LBU(x2, xRDI, 0);
+                SUBI(xRDI, xRDI, 1);
+                SUBI(xRCX, xRCX, 1);
+                if (rep==1) {BEQ_MARK3(x1, x2);} else {BNE_MARK3(x1, x2);}
+                BNE_MARK2(xRCX, xZR);
+                MARK3; // end
+                emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+                break;
+            default:
+                INST_NAME("SCASB");
+                SETFLAGS(X_ALL, SF_SET_PENDING);
+                GETDIR(x3, x1, 1);
+                ANDI(x1, xRAX, 0xff);
+                LBU(x2, xRDI, 0);
+                ADD(xRDI, xRDI, x3);
+                emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+                break;
+            }
+            break;
+        case 0xAF:
+            switch (rep) {
+            case 1:
+            case 2:
+                if (rep==1) {INST_NAME("REPNZ SCASD");} else {INST_NAME("REPZ SCASD");}
+                MAYSETFLAGS();
+                SETFLAGS(X_ALL, SF_SET_PENDING);
+                CBZ_NEXT(xRCX);
+                if (rex.w) {MV(x1, xRAX);} else {AND(x1, xRAX, xMASK);}
+                ANDI(x2, xFlags, 1<<F_DF);
+                BNEZ_MARK2(x2);
+                MARK;   // Part with DF==0
+                LDxw(x2, xRDI, 0);
+                ADDI(xRDI, xRDI, rex.w?8:4);
+                SUBI(xRCX, xRCX, 1);
+                if (rep==1) {BEQ_MARK3(x1, x2);} else {BNE_MARK3(x1, x2);}
+                BNE_MARK(xRCX, xZR);
+                B_MARK3_nocond;
+                MARK2;  // Part with DF==1
+                LDxw(x2, xRDI, 0);
+                SUBI(xRDI, xRDI, rex.w?8:4);
+                SUBI(xRCX, xRCX, 1);
+                if (rep==1) {BEQ_MARK3(x1, x2);} else {BNE_MARK3(x1, x2);}
+                BNE_MARK2(xRCX, xZR);
+                MARK3; // end
+                emit_cmp32(dyn, ninst, rex, x1, x2, x3, x4, x5, x6);
+                break;
+            default:
+                INST_NAME("SCASD");
+                SETFLAGS(X_ALL, SF_SET_PENDING);
+                GETDIR(x3, x1, rex.w?8:4);
+                AND(x1, xRAX, xMASK);
+                LDxw(x2, xRDI, 0);
+                ADD(xRDI, xRDI, x3);
+                emit_cmp32(dyn, ninst, rex, x1, x2, x3, x4, x5, x6);
+                break;
+            }
+            break;
         case 0xB0:
         case 0xB1:
         case 0xB2:
diff --git a/src/dynarec/rv64/dynarec_rv64_00_3.c b/src/dynarec/rv64/dynarec_rv64_00_3.c
index a19f3f68..2be53fc8 100644
--- a/src/dynarec/rv64/dynarec_rv64_00_3.c
+++ b/src/dynarec/rv64/dynarec_rv64_00_3.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
@@ -27,6 +26,7 @@
 #include "dynarec_rv64_helper.h"
 
 int isSimpleWrapper(wrapper_t fun);
+int isRetX87Wrapper(wrapper_t fun);
 
 uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
 {
@@ -66,6 +66,16 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     CALL_(rol8, ed, x3);
                     EBBACK(x5, 0);
                     break;
+                case 1:
+                    INST_NAME("ROR Eb, Ib");
+                    MESSAGE(LOG_DUMP, "Need Optimization\n");
+                    SETFLAGS(X_OF|X_CF, SF_SET);
+                    GETEB(x1, 1);
+                    u8 = F8;
+                    MOV32w(x2, u8);
+                    CALL_(ror8, ed, x3);
+                    EBBACK(x5, 0);
+                    break;
                 case 4:
                 case 6:
                     INST_NAME("SHL Eb, Ib");
@@ -187,7 +197,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             }
             BARRIER(BARRIER_FLOAT);
             i32 = F16;
-            retn_to_epilog(dyn, ninst, i32);
+            retn_to_epilog(dyn, ninst, rex, i32);
             *need_epilog = 0;
             *ok = 0;
             break;
@@ -198,7 +208,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 READFLAGS(X_PEND);  // so instead, force the deferred flags, so it's not too slow, and flags are not lost
             }
             BARRIER(BARRIER_FLOAT);
-            ret_to_epilog(dyn, ninst);
+            ret_to_epilog(dyn, ninst, rex);
             *need_epilog = 0;
             *ok = 0;
             break;
@@ -219,7 +229,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
 
                 if (eb2) {
                     // load a mask to x3 (ffffffffffff00ff)
-                    LUI(x3, 0xffffffffffff0);
+                    LUI(x3, 0xffff0);
                     ORI(x3, x3, 0xff);
                     // apply mask
                     AND(eb1, eb1, x3);
@@ -270,8 +280,8 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
 
         case 0xC9:
             INST_NAME("LEAVE");
-            MV(xRSP, xRBP);
-            POP1(xRBP);
+            MVz(xRSP, xRBP);
+            POP1z(xRBP);
             break;
 
         case 0xCC:
@@ -298,6 +308,9 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     // disabling isSimpleWrapper because all signed value less than 64bits needs to be sign extended
                     // and return value needs to be cleanned up
                     tmp = 0;//isSimpleWrapper(*(wrapper_t*)(addr));
+                    if(isRetX87Wrapper(*(wrapper_t*)(addr)))
+                        // return value will be on the stack, so the stack depth needs to be updated
+                        x87_purgecache(dyn, ninst, 0, x3, x1, x4);
                     if(tmp<0 || tmp>1)
                         tmp=0;  //TODO: removed when FP is in place
                     if((box64_log<2 && !cycle_log) && tmp) {
@@ -336,6 +349,39 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 #endif
             }
             break;
+        case 0xCD:
+            u8 = F8;
+            if (box64_wine && u8 == 0x2D) {
+                INST_NAME("INT 2D");
+                // lets do nothing
+                MESSAGE(LOG_INFO, "INT 2D Windows anti-debug hack\n");
+            } else if (u8 == 0x80) {
+                INST_NAME("32bits SYSCALL");
+                NOTEST(x1);
+                SMEND();
+                GETIP(addr);
+                STORE_XEMU_CALL();
+                CALL_S(x86Syscall, -1);
+                LOAD_XEMU_CALL();
+                TABLE64(x3, addr); // expected return address
+                BNE_MARK(xRIP, x3);
+                LW(x1, xEmu, offsetof(x64emu_t, quit));
+                BEQ_NEXT(x1, xZR);
+                MARK;
+                LOAD_XEMU_REM();
+                jump_to_epilog(dyn, 0, xRIP, ninst);
+            } else {
+                INST_NAME("INT n");
+                SETFLAGS(X_ALL, SF_SET); // Hack to set flags in "don't care" state
+                GETIP(ip);
+                STORE_XEMU_CALL();
+                CALL(native_priv, -1);
+                LOAD_XEMU_CALL();
+                jump_to_epilog(dyn, 0, xRIP, ninst);
+                *need_epilog = 0;
+                *ok = 0;
+            }
+            break;
         case 0xCF:
             INST_NAME("IRET");
             SETFLAGS(X_ALL, SF_SET);    // Not a hack, EFLAGS are restored
@@ -348,6 +394,24 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xD2:  // TODO: Jump if CL is 0
             nextop = F8;
             switch((nextop>>3)&7) {
+                case 0:
+                    if(opcode==0xD0) {
+                        INST_NAME("ROL Eb, 1");
+                        MOV32w(x2, 1);
+                    } else {
+                        INST_NAME("ROL Eb, CL");
+                        ANDI(x2, xRCX, 7);
+                    }
+                    SETFLAGS(X_OF|X_CF, SF_PENDING);
+                    GETEB(x1, 0);
+                    UFLAG_OP12(ed, x2);
+                    SLL(x3, ed, x2);
+                    SRLI(x4, x3, 8);
+                    OR(ed, x3, x4);
+                    EBBACK(x5, 1);
+                    UFLAG_RES(ed);
+                    UFLAG_DF(x3, d_rol8);
+                    break;
                 case 1:
                     if(opcode==0xD0) {
                         INST_NAME("ROR Eb, 1");
@@ -367,6 +431,23 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     UFLAG_RES(ed);
                     UFLAG_DF(x3, d_ror8);
                     break;
+                case 4:
+                case 6:
+                    if(opcode==0xD0) {
+                        INST_NAME("SHL Eb, 1");
+                        MOV32w(x2, 1);
+                    } else {
+                        INST_NAME("SHL Eb, CL");
+                        ANDI(x2, xRCX, 7);
+                    }
+                    SETFLAGS(X_ALL, SF_PENDING);
+                    GETEB(x1, 0);
+                    UFLAG_OP12(ed, x2)
+                    SLL(ed, ed, x2);
+                    EBBACK(x5, 1);
+                    UFLAG_RES(ed);
+                    UFLAG_DF(x3, d_shl8);
+                    break;
                 case 5:
                     if(opcode==0xD0) {
                         INST_NAME("SHR Eb, 1");
@@ -422,6 +503,16 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     WBACK;
                     if(!wback && !rex.w) ZEROUP(ed);
                     break;
+                case 3:
+                    INST_NAME("RCR Ed, 1");
+                    MESSAGE(LOG_DUMP, "Need Optimization\n");
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_OF|X_CF, SF_SET);
+                    MOV32w(x2, 1);
+                    GETEDW(x4, x1, 0);
+                    CALL_(rex.w?((void*)rcr64):((void*)rcr32), ed, x4);
+                    WBACK;
+                    break;
                 case 4:
                 case 6:
                     INST_NAME("SHL Ed, 1");
@@ -517,6 +608,12 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xDB:
             addr = dynarec64_DB(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
             break;
+        case 0xDC:
+            addr = dynarec64_DC(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
+            break;
+        case 0xDD:
+            addr = dynarec64_DD(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
+            break;
 
         case 0xDE:
             addr = dynarec64_DE(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
@@ -534,7 +631,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 #endif
             }
             #if STEP < 2
-            if(isNativeCall(dyn, addr+i32, &dyn->insts[ninst].natcall, &dyn->insts[ninst].retn))
+            if(!rex.is32bits && isNativeCall(dyn, addr+i32, &dyn->insts[ninst].natcall, &dyn->insts[ninst].retn))
                 tmp = dyn->insts[ninst].pass2choice = 3;
             else
                 tmp = dyn->insts[ninst].pass2choice = 0;
@@ -564,6 +661,9 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                             tmp=0;  // float paramters not ready!
                     } else
                         tmp=0;
+                    if(dyn->insts[ninst].natcall && isRetX87Wrapper(*(wrapper_t*)(dyn->insts[ninst].natcall+2)))
+                        // return value will be on the stack, so the stack depth needs to be updated
+                        x87_purgecache(dyn, ninst, 0, x3, x1, x4);
                     if((box64_log<2 && !cycle_log) && dyn->insts[ninst].natcall && tmp) {
                         //GETIP(ip+3+8+8); // read the 0xCC
                         call_n(dyn, ninst, *(void**)(dyn->insts[ninst].natcall+2+8), tmp);
@@ -611,12 +711,13 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         *need_epilog = 0;
                         *ok = 0;
                     }
-                    if(addr<0x100000000LL) {
-                        MOV64x(x2, addr);
+
+                    if(rex.is32bits) {
+                        MOV32w(x2, addr);
                     } else {
                         TABLE64(x2, addr);
                     }
-                    PUSH1(x2);
+                    PUSH1z(x2);
                     // TODO: Add support for CALLRET optim
                     /*if(box64_dynarec_callret) {
                         // Push actual return address
@@ -636,16 +737,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         *ok = 0;
                         *need_epilog = 0;
                     }
-                    if(addr+i32==0) {   // self modifying code maybe? so use indirect address fetching
-                        if(addr-4<0x100000000LL) {
-                            MOV64x(x4, addr-4);
-                        } else {
-                            TABLE64(x4, addr-4);
-                        }
-                        LD(x4, x4, 0);
-                        jump_to_next(dyn, 0, x4, ninst);
-                    } else
-                        jump_to_next(dyn, addr+i32, 0, ninst);
+                    jump_to_next(dyn, addr+i32, 0, ninst);
                     break;
             }
             break;
@@ -659,11 +751,11 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 INST_NAME("JMP Ib");
                 i32 = F8S;
             }
-            JUMP(addr+i32, 0);
+            JUMP((uintptr_t)getAlternate((void*)(addr+i32)), 0);
             if(dyn->insts[ninst].x64.jmp_insts==-1) {
                 // out of the block
                 fpu_purgecache(dyn, ninst, 1, x1, x2, x3);
-                jump_to_next(dyn, addr+i32, 0, ninst);
+                jump_to_next(dyn, (uintptr_t)getAlternate((void*)(addr+i32)), 0, ninst);
             } else {
                 // inside the block
                 CacheTransform(dyn, ninst, CHECK_CACHE(), x1, x2, x3);
@@ -681,6 +773,12 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xF0:
             addr = dynarec64_F0(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
             break;
+        case 0xF5:
+            INST_NAME("CMC");
+            READFLAGS(X_CF);
+            SETFLAGS(X_CF, SF_SUBSET);
+            XORI(xFlags, xFlags, 1<<F_CF);
+            break;
         case 0xF6:
             nextop = F8;
             switch((nextop>>3)&7) {
@@ -716,8 +814,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     UFLAG_RES(x1);
                     LUI(x2, 0xffff0);
                     AND(xRAX, xRAX, x2);
-                    SLLI(x1, x1, 48);
-                    SRLI(x1, x1, 48);
+                    ZEXTH(x1, x1);
                     OR(xRAX, xRAX, x1);
                     break;
                 case 5:
@@ -731,8 +828,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     UFLAG_RES(x1);
                     LUI(x2, 0xffff0);
                     AND(xRAX, xRAX, x2);
-                    SLLI(x1, x1, 48);
-                    SRLI(x1, x1, 48);
+                    ZEXTH(x1, x1);
                     OR(xRAX, xRAX, x1);
                     break;
                 case 6:
@@ -840,9 +936,9 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         AND(xRAX, x2, xMASK);
                         ZEROUP(xRDX);
                     } else {
-                        if(ninst 
-                           && dyn->insts[ninst-1].x64.addr 
-                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31 
+                        if(ninst
+                           && dyn->insts[ninst-1].x64.addr
+                           && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x31
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0xD2) {
                             SET_DFNONE();
                             GETED(0);
@@ -879,7 +975,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         ZEROUP(xRDX);
                     } else {
                         if(ninst && dyn->insts
-                           &&  dyn->insts[ninst-1].x64.addr 
+                           &&  dyn->insts[ninst-1].x64.addr
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr)==0x48
                            && *(uint8_t*)(dyn->insts[ninst-1].x64.addr+1)==0x99) {
                             SET_DFNONE()
@@ -970,7 +1066,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     break;
                 case 2: // CALL Ed
                     INST_NAME("CALL Ed");
-                    PASS2IF((box64_dynarec_safeflags>1) || 
+                    PASS2IF((box64_dynarec_safeflags>1) ||
                         ((ninst && dyn->insts[ninst-1].x64.set_flags)
                         || ((ninst>1) && dyn->insts[ninst-2].x64.set_flags)), 1)
                     {
@@ -978,7 +1074,7 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     } else {
                         SETFLAGS(X_ALL, SF_SET);    //Hack to put flag in "don't care" state
                     }
-                    GETEDx(0);
+                    GETEDz(0);
                     if(box64_dynarec_callret && box64_dynarec_bigblock>1) {
                         BARRIER(BARRIER_FULL);
                     } else {
@@ -1001,22 +1097,41 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         }
                         STPx_S7_preindex(x4, xRIP, xSP, -16);
                     }*/
-                    PUSH1(xRIP);
+                    PUSH1z(xRIP);
                     jump_to_next(dyn, 0, ed, ninst);
                     break;
                 case 4: // JMP Ed
                     INST_NAME("JMP Ed");
                     READFLAGS(X_PEND);
                     BARRIER(BARRIER_FLOAT);
-                    GETEDx(0);
+                    GETEDz(0);
                     jump_to_next(dyn, 0, ed, ninst);
                     *need_epilog = 0;
                     *ok = 0;
                     break;
+                case 5: // JMP FAR Ed
+                    if(MODREG) {
+                        DEFAULT;
+                    } else {
+                        INST_NAME("JMP FAR Ed");
+                        READFLAGS(X_PEND);
+                        BARRIER(BARRIER_FLOAT);
+                        SMREAD()
+                        addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 0, 0);
+                        LDxw(x1, wback, 0);
+                        ed = x1;
+                        LHU(x3, wback, rex.w?8:4);
+                        SW(x3, xEmu, offsetof(x64emu_t, segs[_CS]));
+                        SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
+                        jump_to_epilog(dyn, 0, ed, ninst);
+                        *need_epilog = 0;
+                        *ok = 0;
+                    }
+                    break;
                 case 6: // Push Ed
                     INST_NAME("PUSH Ed");
-                    GETEDx(0);
-                    PUSH1(ed);
+                    GETEDz(0);
+                    PUSH1z(ed);
                     break;
 
                 default:
diff --git a/src/dynarec/rv64/dynarec_rv64_0f.c b/src/dynarec/rv64/dynarec_rv64_0f.c
index a3d9efc1..5c8d7b81 100644
--- a/src/dynarec/rv64/dynarec_rv64_0f.c
+++ b/src/dynarec/rv64/dynarec_rv64_0f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -42,7 +41,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
     int s0, s1;
     uint64_t tmp64u;
     int64_t j64;
-    int64_t fixedaddress;
+    int64_t fixedaddress, gdoffset;
     int unscaled;
     MAYUSE(wb2);
     MAYUSE(gback);
@@ -113,24 +112,36 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             *ok = 0;
             break;
 
+        case 0x0D:
+            nextop = F8;
+            switch((nextop>>3)&7) {
+                case 1:
+                    INST_NAME("PREFETCHW");
+                    // nop without Zicbom, Zicbop, Zicboz extensions
+                    FAKEED;
+                    break;
+                default:    //???
+                    DEFAULT;
+            }
+            break;
 
         case 0x10:
             INST_NAME("MOVUPS Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x3, wback, fixedaddress+0);
             LD(x4, wback, fixedaddress+8);
-            SD(x3, gback, 0);
-            SD(x4, gback, 8);
+            SD(x3, gback, gdoffset+0);
+            SD(x4, gback, gdoffset+8);
             break;
         case 0x11:
             INST_NAME("MOVUPS Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LD(x3, gback, 0);
-            LD(x4, gback, 8);
+            LD(x3, gback, gdoffset+0);
+            LD(x4, gback, gdoffset+8);
             SD(x3, wback, fixedaddress+0);
             SD(x4, wback, fixedaddress+8);
             if(!MODREG)
@@ -140,10 +151,10 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             nextop = F8;
             if(MODREG) {
                 INST_NAME("MOVHLPS Gx,Ex");
-                GETGX(x1);
+                GETGX();
                 GETEX(x2, 0);
                 LD(x3, wback, fixedaddress+8);
-                SD(x3, gback, 0);
+                SD(x3, gback, gdoffset+0);
             } else {
                 INST_NAME("MOVLPS Gx,Ex");
                 GETEXSD(v0, 0);
@@ -154,9 +165,9 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x13:
             INST_NAME("MOVLPS Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LD(x3, gback, 0);
+            LD(x3, gback, gdoffset+0);
             SD(x3, wback, fixedaddress+0);
             if(!MODREG)
                 SMWRITE2();
@@ -164,28 +175,28 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x14:
             INST_NAME("UNPCKLPS Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LWU(x5, gback, 1*4);
+            LWU(x5, gback, gdoffset+1*4);
             LWU(x3, wback, fixedaddress+0);
             LWU(x4, wback, fixedaddress+4);
-            SW(x4, gback, 3*4);
-            SW(x5, gback, 2*4);
-            SW(x3, gback, 1*4);
+            SW(x4, gback, gdoffset+3*4);
+            SW(x5, gback, gdoffset+2*4);
+            SW(x3, gback, gdoffset+1*4);
             break;
         case 0x15:
             INST_NAME("UNPCKHPS Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LWU(x3, wback, fixedaddress+2*4);
             LWU(x4, wback, fixedaddress+3*4);
-            LWU(x5, gback, 2*4);
-            LWU(x6, gback, 3*4);
-            SW(x5, gback, 0*4);
-            SW(x3, gback, 1*4);
-            SW(x6, gback, 2*4);
-            SW(x4, gback, 3*4);
+            LWU(x5, gback, gdoffset+2*4);
+            LWU(x6, gback, gdoffset+3*4);
+            SW(x5, gback, gdoffset+0*4);
+            SW(x3, gback, gdoffset+1*4);
+            SW(x6, gback, gdoffset+2*4);
+            SW(x4, gback, gdoffset+3*4);
             break;
         case 0x16:
             nextop = F8;
@@ -195,17 +206,17 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 INST_NAME("MOVHPS Gx,Ex");
                 SMREAD();
             }
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x4, wback, fixedaddress+0);
-            SD(x4, gback, 8);
+            SD(x4, gback, gdoffset+8);
             break;
         case 0x17:
             INST_NAME("MOVHPS Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LD(x4, gback, 8);
+            LD(x4, gback, gdoffset+8);
             SD(x4, wback, fixedaddress+0);
             if(!MODREG)
                 SMWRITE2();
@@ -217,16 +228,11 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             } else
             switch((nextop>>3)&7) {
                 case 0:
-                    DEFAULT;
-                    break;
                 case 1:
-                    DEFAULT;
-                    break;
                 case 2:
-                    DEFAULT;
-                    break;
                 case 3:
-                    DEFAULT;
+                    INST_NAME("PREFETCHh Ed");
+                    FAKEED;
                     break;
                 default:
                     INST_NAME("NOP (multibyte)");
@@ -243,14 +249,14 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x28:
             INST_NAME("MOVAPS Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q(x3);
             break;
         case 0x29:
             INST_NAME("MOVAPS Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q2(x3);
             if(!MODREG)
@@ -260,10 +266,10 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x2B:
             INST_NAME("MOVNTPS Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LD(x3, gback, 0);
-            LD(x4, gback, 8);
+            LD(x3, gback, gdoffset+0);
+            LD(x4, gback, gdoffset+8);
             SD(x3, wback, fixedaddress+0);
             SD(x4, wback, fixedaddress+8);
             break;
@@ -304,10 +310,11 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             break;
         case 0x31:
             INST_NAME("RDTSC");
+            NOTEST(x1);
             MESSAGE(LOG_DUMP, "Need Optimization\n");
-            CALL(ReadTSC, xRAX);   // will return the u64 in xEAX
-            SRLI(xRDX, xRAX, 32);
-            ZEROUP(xRAX);   // wipe upper part
+            CALL(ReadTSC, x3);   // will return the u64 in x3
+            SRLI(xRDX, x3, 32);
+            AND(xRAX, x3, 32);   // wipe upper part
             break;
 
 
@@ -342,12 +349,72 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 OR(gd, gd, x2);
             }
             break;
+        case 0x51:
+            INST_NAME("SQRTPS Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            d0 = fpu_get_scratch(dyn);
+            for(int i=0; i<4; ++i) {
+                FLW(d0, wback, fixedaddress+4*i);
+                FSQRTS(d0, d0);
+                FSW(d0, gback, gdoffset+4*i);
+            }
+            break;
+        case 0x52:
+            INST_NAME("RSQRTPS Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            s0 = fpu_get_scratch(dyn);
+            s1 = fpu_get_scratch(dyn); // 1.0f
+            v0 = fpu_get_scratch(dyn); // 0.0f
+            // do accurate computation, because riscv doesn't have rsqrt
+            MOV32w(x3, 1);
+            FCVTSW(s1, x3, RD_DYN);
+            if (!box64_dynarec_fastnan) {
+                FCVTSW(v0, xZR, RD_DYN);
+            }
+            for(int i=0; i<4; ++i) {
+                FLW(s0, wback, fixedaddress+i*4);
+                if (!box64_dynarec_fastnan) {
+                    FLES(x3, v0, s0); // s0 >= 0.0f?
+                    BNEZ(x3, 6*4);
+                    FEQS(x3, s0, s0); // isnan(s0)?
+                    BEQZ(x3, 2*4);
+                    // s0 is negative, so generate a NaN
+                    FDIVS(s0, s1, v0);
+                    // s0 is a NaN, just copy it
+                    FSW(s0, gback, gdoffset+i*4);
+                    J(4*4);
+                    // do regular computation
+                }
+                FSQRTS(s0, s0);
+                FDIVS(s0, s1, s0);
+                FSW(s0, gback, gdoffset+i*4);
+            }
+            break;
+        case 0x53:
+            INST_NAME("RCPPS Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            d0 = fpu_get_scratch(dyn);
+            d1 = fpu_get_scratch(dyn);
+            LUI(x3, 0x3f800);
+            FMVWX(d0, x3); // 1.0f
+            for(int i=0; i<4; ++i) {
+                FLW(d1, wback, fixedaddress+4*i);
+                FDIVS(d1, d0, d1);
+                FSW(d1, gback, gdoffset+4*i);
+            }
+            break;
         case 0x54:
             INST_NAME("ANDPS Gx, Ex");
             nextop = F8;
             gd = ((nextop&0x38)>>3)+(rex.r<<3);
             if(!(MODREG && gd==(nextop&7)+(rex.b<<3))) {
-                GETGX(x1);
+                GETGX();
                 GETEX(x2, 0);
                 SSE_LOOP_Q(x3, x4, AND(x3, x3, x4));
             }
@@ -355,7 +422,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x55:
             INST_NAME("ANDNPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, NOT(x3, x3); AND(x3, x3, x4));
             break;
@@ -364,7 +431,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             nextop = F8;
             gd = ((nextop&0x38)>>3)+(rex.r<<3);
             if(!(MODREG && gd==(nextop&7)+(rex.b<<3))) {
-                GETGX(x1);
+                GETGX();
                 GETEX(x2, 0);
                 SSE_LOOP_Q(x3, x4, OR(x3, x3, x4));
             }
@@ -373,12 +440,12 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("XORPS Gx, Ex");
             nextop = F8;
             //TODO: it might be possible to check if SS or SD are used and not purge them to optimize a bit
-            GETGX(x1);
+            GETGX();
             if(MODREG && gd==(nextop&7)+(rex.b<<3))
             {
                 // just zero dest
-                SD(xZR, x1, 0);
-                SD(xZR, x1, 8);
+                SD(xZR, gback, gdoffset+0);
+                SD(xZR, gback, gdoffset+8);
             } else {
                 GETEX(x2, 0);
                 SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
@@ -387,37 +454,37 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x58:
             INST_NAME("ADDPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 // GX->f[i] += EX->f[i];
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 FADDS(s1, s1, s0);
-                FSW(s1, gback, i*4);
+                FSW(s1, gback, gdoffset+i*4);
             }
             break;
         case 0x59:
             INST_NAME("MULPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 // GX->f[i] *= EX->f[i];
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 FMULS(s1, s1, s0);
-                FSW(s1, gback, i*4);
+                FSW(s1, gback, gdoffset+i*4);
             }
             break;
         case 0x5A:
             INST_NAME("CVTPS2PD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
@@ -425,46 +492,46 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             FLW(s1, wback, fixedaddress+4);
             FCVTDS(s0, s0);
             FCVTDS(s1, s1);
-            FSD(s0, gback, 0);
-            FSD(s1, gback, 8);
+            FSD(s0, gback, gdoffset+0);
+            FSD(s1, gback, gdoffset+8);
             break;
         case 0x5B:
             INST_NAME("CVTDQ2PS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             for (int i=0; i<4; ++i) {
                 LW(x3, wback, fixedaddress+i*4);
                 FCVTSW(s0, x3, RD_RNE);
-                FSW(s0, gback, i*4);
+                FSW(s0, gback, gdoffset+i*4);
             }
             break;
         case 0x5C:
             INST_NAME("SUBPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 // GX->f[i] -= EX->f[i];
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 FSUBS(s1, s1, s0);
-                FSW(s1, gback, i*4);
+                FSW(s1, gback, gdoffset+i*4);
             }
             break;
         case 0x5D:
             INST_NAME("MINPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 if(!box64_dynarec_fastnan) {
                     FEQS(x3, s0, s0);
                     FEQS(x4, s1, s1);
@@ -472,38 +539,38 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     BEQZ(x3, 12);
                     FLTS(x3, s0, s1);
                     BEQZ(x3, 8);
-                    FSW(s0, gback, i*4);
+                    FSW(s0, gback, gdoffset+i*4);
                 } else {
                     FMINS(s1, s1, s0);
-                    FSW(s1, gback, i*4);
+                    FSW(s1, gback, gdoffset+i*4);
                 }
             }
             break;
         case 0x5E:
             INST_NAME("DIVPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 // GX->f[i] /= EX->f[i];
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 FDIVS(s1, s1, s0);
-                FSW(s1, gback, i*4);
+                FSW(s1, gback, gdoffset+i*4);
             }
             break;
         case 0x5F:
             INST_NAME("MAXPS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             s0 = fpu_get_scratch(dyn);
             s1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 FLW(s0, wback, fixedaddress+i*4);
-                FLW(s1, gback, i*4);
+                FLW(s1, gback, gdoffset+i*4);
                 if(!box64_dynarec_fastnan) {
                     FEQS(x3, s0, s0);
                     FEQS(x4, s1, s1);
@@ -511,13 +578,242 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     BEQZ(x3, 12);
                     FLTS(x3, s1, s0);
                     BEQZ(x3, 8);
-                    FSW(s0, gback, i*4);
+                    FSW(s0, gback, gdoffset+i*4);
                 } else {
                     FMAXS(s1, s1, s0);
-                    FSW(s1, gback, i*4);
+                    FSW(s1, gback, gdoffset+i*4);
+                }
+            }
+            break;
+        case 0x60:
+            INST_NAME("PUNPCKLBW Gm,Em");
+            nextop = F8;
+            GETGM();
+            for(int i=3; i>0; --i) { // 0 is untouched
+                // GX->ub[2 * i] = GX->ub[i];
+                LBU(x3, gback, gdoffset+i);
+                SB(x3, gback, gdoffset+2*i);
+            }
+            if (MODREG && gd==(nextop&7)) {
+                for(int i=0; i<4; ++i) {
+                    // GX->ub[2 * i + 1] = GX->ub[2 * i];
+                    LBU(x3, gback, gdoffset+2*i);
+                    SB(x3, gback, gdoffset+2*i+1);
+                }
+            } else {
+                GETEM(x2, 0);
+                for(int i=0; i<4; ++i) {
+                    // GX->ub[2 * i + 1] = EX->ub[i];
+                    LBU(x3, wback, fixedaddress+i);
+                    SB(x3, gback, gdoffset+2*i+1);
+                }
+            }
+            break;
+        case 0x61:
+            INST_NAME("PUNPCKLWD Gm, Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            // GM->uw[3] = EM->uw[1];
+            LHU(x3, wback, fixedaddress+2*1);
+            SH(x3, gback, gdoffset+2*3);
+            // GM->uw[2] = GM->uw[1];
+            LHU(x3, gback, gdoffset+2*1);
+            SH(x3, gback, gdoffset+2*2);
+            // GM->uw[1] = EM->uw[0];
+            LHU(x3, wback, fixedaddress+2*0);
+            SH(x3, gback, gdoffset+2*1);
+            break;
+        case 0x62:
+            INST_NAME("PUNPCKLDQ Gm, Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            // GM->ud[1] = EM->ud[0];
+            LWU(x3, wback, fixedaddress);
+            SW(x3, gback, gdoffset+4*1);
+            break;
+        case 0x67:
+            INST_NAME("PACKUSWB Gm, Em");
+            nextop = F8;
+            GETGM();
+            ADDI(x5, xZR, 0xFF);
+            for(int i=0; i<4; ++i) {
+                // GX->ub[i] = (GX->sw[i]<0)?0:((GX->sw[i]>0xff)?0xff:GX->sw[i]);
+                LH(x3, gback, gdoffset+i*2);
+                BGE(x5, x3, 8);
+                ADDI(x3, xZR, 0xFF);
+                NOT(x4, x3);
+                SRAI(x4, x4, 63);
+                AND(x3, x3, x4);
+                SB(x3, gback, gdoffset+i);
+            }
+            if (MODREG && gd==(nextop&7)) {
+                // GM->ud[1] = GM->ud[0];
+                LW(x3, gback, gdoffset+0*4);
+                SW(x3, gback, gdoffset+1*4);
+            } else {
+                GETEM(x1, 0);
+                for(int i=0; i<4; ++i) {
+                    // GX->ub[4+i] = (EX->sw[i]<0)?0:((EX->sw[i]>0xff)?0xff:EX->sw[i]);
+                    LH(x3, wback, fixedaddress+i*2);
+                    BGE(x5, x3, 8);
+                    ADDI(x3, xZR, 0xFF);
+                    NOT(x4, x3);
+                    SRAI(x4, x4, 63);
+                    AND(x3, x3, x4);
+                    SB(x3, gback, gdoffset+4+i);
+                }
+            }
+            break;
+        case 0x68:
+            INST_NAME("PUNPCKHBW Gm,Em");
+            nextop = F8;
+            GETGM();
+            for(int i=0; i<4; ++i) {
+                // GX->ub[2 * i] = GX->ub[i + 4];
+                LBU(x3, gback, gdoffset+i+4);
+                SB(x3, gback, gdoffset+2*i);
+            }
+            if (MODREG && gd==(nextop&7)) {
+                for(int i=0; i<4; ++i) {
+                    // GX->ub[2 * i + 1] = GX->ub[2 * i];
+                    LBU(x3, gback, gdoffset+2*i);
+                    SB(x3, gback, gdoffset+2*i+1);
+                }
+            } else {
+                GETEM(x2, 0);
+                for(int i=0; i<4; ++i) {
+                    // GX->ub[2 * i + 1] = EX->ub[i + 4];
+                    LBU(x3, wback, fixedaddress+i+4);
+                    SB(x3, gback, gdoffset+2*i+1);
+                }
+            }
+            break;
+        case 0x69:
+            INST_NAME("PUNPCKHWD Gm,Em");
+            nextop = F8;
+            GETGM();
+            for(int i=0; i<2; ++i) {
+                // GX->uw[2 * i] = GX->uw[i + 2];
+                LHU(x3, gback, gdoffset+(i+2)*2);
+                SH(x3, gback, gdoffset+2*i*2);
+            }
+            if (MODREG && gd==(nextop&7)) {
+                for(int i=0; i<2; ++i) {
+                    // GX->uw[2 * i + 1] = GX->uw[2 * i];
+                    LHU(x3, gback, gdoffset+2*i*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
+                }
+            } else {
+                GETEM(x1, 0);
+                for(int i=0; i<2; ++i) {
+                    // GX->uw[2 * i + 1] = EX->uw[i + 2];
+                    LHU(x3, wback, fixedaddress+(i+2)*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
+                }
+            }
+            break;
+        case 0x6A:
+            INST_NAME("PUNPCKHDQ Gm,Em");
+            nextop = F8;
+            GETEM(x1, 0);
+            GETGM();
+            // GM->ud[0] = GM->ud[1];
+            LWU(x3, gback, gdoffset+1*4);
+            SW(x3, gback, gdoffset+0*4);
+            if (!(MODREG && (gd==ed))) {
+                // GM->ud[1] = EM->ud[1];
+                LWU(x3, wback, fixedaddress+1*4);
+                SW(x3, gback, gdoffset+1*4);
+            }
+            break;
+        case 0x6E:
+            INST_NAME("MOVD Gm, Ed");
+            nextop = F8;
+            GETGM();
+            if(MODREG) {
+                ed = xRAX + (nextop&7) + (rex.b<<3);
+            } else {
+                addr = geted(dyn, addr, ninst, nextop, &ed, x3, x2, &fixedaddress, rex, NULL, 1, 0);
+                if(rex.w) {
+                    LD(x4, ed, fixedaddress);
+                } else {
+                    LW(x4, ed, fixedaddress);
                 }
+                ed = x4;
+            }
+            if(rex.w) SD(ed, gback, gdoffset+0); else SW(ed, gback, gdoffset+0);
+            break;
+        case 0x6F:
+            INST_NAME("MOVQ Gm, Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            LD(x3, wback, fixedaddress);
+            SD(x3, gback, gdoffset+0);
+            break;
+        case 0x71:
+            nextop = F8;
+            switch((nextop>>3)&7) {
+                case 2:
+                    INST_NAME("PSRLW Em, Ib");
+                    GETEM(x1, 1);
+                    u8 = F8;
+                    if (u8>15) {
+                        // just zero dest
+                        SD(xZR, wback, fixedaddress);
+                    } else if(u8) {
+                        for (int i=0; i<4; ++i) {
+                            // EX->uw[i] >>= u8;
+                            LHU(x3, wback, fixedaddress+i*2);
+                            SRLI(x3, x3, u8);
+                            SH(x3, wback, fixedaddress+i*2);
+                        }
+                    }
+                    break;
+                case 4:
+                    INST_NAME("PSRAW Em, Ib");
+                    GETEM(x1, 1);
+                    u8 = F8;
+                    if(u8>15) u8=15;
+                    if(u8) {
+                        for (int i=0; i<4; ++i) {
+                            // EX->sw[i] >>= u8;
+                            LH(x3, wback, fixedaddress+i*2);
+                            SRAI(x3, x3, u8);
+                            SH(x3, wback, fixedaddress+i*2);
+                        }
+                    }
+                    break;
+                case 6:
+                    INST_NAME("PSLLW Em, Ib");
+                    GETEM(x1, 1);
+                    u8 = F8;
+                    if (u8>15) {
+                        // just zero dest
+                        SD(xZR, wback, fixedaddress+0);
+                    } else if(u8) {
+                        for (int i=0; i<4; ++i) {
+                            // EX->uw[i] <<= u8;
+                            LHU(x3, wback, fixedaddress+i*2);
+                            SLLI(x3, x3, u8);
+                            SH(x3, wback, fixedaddress+i*2);
+                        }
+                    }
+                    break;
+                default:
+                    *ok = 0;
+                    DEFAULT;
             }
             break;
+        case 0x75:
+            INST_NAME("PCMPEQW Gm,Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            MMX_LOOP_W(x3, x4, SUB(x3, x3, x4); SEQZ(x3, x3); NEG(x3, x3));
+            break;
         case 0x77:
             INST_NAME("EMMS");
             // empty MMX, FPU now usable
@@ -525,7 +821,14 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             /*emu->top = 0;
             emu->fpu_stack = 0;*/ //TODO: Check if something is needed here?
             break;
-
+        case 0x7F:
+            INST_NAME("MOVQ Em, Gm");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            LD(x3, gback, gdoffset+0);
+            SD(x3, wback, fixedaddress);
+            break;
         #define GO(GETFLAGS, NO, YES, F)   \
             READFLAGS(F);                                               \
             i32_ = F32S;                                                \
@@ -570,9 +873,10 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     eb1 = xRAX+(ed&3);                  \
                 }                                       \
                 if (eb2) {                              \
-                    LUI(x1, 0xffffffffffff0);           \
+                    LUI(x1, 0xffff0);                   \
                     ORI(x1, x1, 0xff);                  \
                     AND(eb1, eb1, x1);                  \
+                    SLLI(x3, x3, 8);                    \
                 } else {                                \
                     ANDI(eb1, eb1, 0xf00);              \
                 }                                       \
@@ -585,7 +889,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
 
         GOCOND(0x90, "SET", "Eb");
         #undef GO
-            
+
         case 0xA2:
             INST_NAME("CPUID");
             NOTEST(x1);
@@ -787,7 +1091,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 wback = 0;
             } else {
                 SMREAD();
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
                 SRAI(x1, gd, 5+rex.w);
                 SLLI(x1, x1, 2+rex.w);
                 ADD(x3, wback, x1);
@@ -804,10 +1108,10 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             ANDI(x4, x4, 1); // F_CF is 1
             ANDI(xFlags, xFlags, ~1);
             OR(xFlags, xFlags, x4);
-            ADDI(x3, xZR, 1);
-            SLL(x3, x3, x2);
-            NOT(x3, x3);
-            AND(ed, ed, x3);
+            ADDI(x5, xZR, 1);
+            SLL(x5, x5, x2);
+            NOT(x5, x5);
+            AND(ed, ed, x5);
             if(wback) {
                 SDxw(ed, wback, fixedaddress);
                 SMWRITE();
@@ -844,8 +1148,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             GETGD;
             if(MODREG) {
                 ed = xRAX+(nextop&7)+(rex.b<<3);
-                SLLI(gd, ed, 48);
-                SRLI(gd, gd, 48);
+                ZEXTH(gd, ed);
             } else {
                 SMREAD();
                 addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
@@ -998,14 +1301,18 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             ORI(xFlags, xFlags, 1<<F_ZF);
             B_NEXT_nocond;
             MARK;
-            NEG(x2, ed);
-            AND(x2, x2, ed);
-            TABLE64(x3, 0x03f79d71b4ca8b09ULL);
-            MUL(x2, x2, x3);
-            SRLI(x2, x2, 64-6);
-            TABLE64(x1, (uintptr_t)&deBruijn64tab);
-            ADD(x1, x1, x2);
-            LBU(gd, x1, 0);
+            if(rv64_zbb) {
+                CTZxw(gd, ed);
+            } else {
+                NEG(x2, ed);
+                AND(x2, x2, ed);
+                TABLE64(x3, 0x03f79d71b4ca8b09ULL);
+                MUL(x2, x2, x3);
+                SRLI(x2, x2, 64-6);
+                TABLE64(x1, (uintptr_t)&deBruijn64tab);
+                ADD(x1, x1, x2);
+                LBU(gd, x1, 0);
+            }
             ANDI(xFlags, xFlags, ~(1<<F_ZF));
             break;
         case 0xBD:
@@ -1024,37 +1331,43 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             B_NEXT_nocond;
             MARK;
             ANDI(xFlags, xFlags, ~(1<<F_ZF));
-            if(ed!=gd)
-                u8 = gd;
-            else
-                u8 = x1;
-            ADDI(u8, xZR, 0);
-            if(rex.w) {
-                MV(x2, ed);
-                SRLI(x3, x2, 32);
+            if(rv64_zbb) {
+                MOV32w(x1, rex.w?63:31);
+                CLZxw(gd, ed);
+                SUB(gd, x1, gd);
+            } else {
+                if(ed!=gd)
+                    u8 = gd;
+                else
+                    u8 = x1;
+                ADDI(u8, xZR, 0);
+                if(rex.w) {
+                    MV(x2, ed);
+                    SRLI(x3, x2, 32);
+                    BEQZ(x3, 4+2*4);
+                    ADDI(u8, u8, 32);
+                    MV(x2, x3);
+                } else {
+                    AND(x2, ed, xMASK);
+                }
+                SRLI(x3, x2, 16);
                 BEQZ(x3, 4+2*4);
-                ADDI(u8, u8, 32);
+                ADDI(u8, u8, 16);
                 MV(x2, x3);
-            } else {
-                AND(x2, ed, xMASK);
+                SRLI(x3, x2, 8);
+                BEQZ(x3, 4+2*4);
+                ADDI(u8, u8, 8);
+                MV(x2, x3);
+                SRLI(x3, x2, 4);
+                BEQZ(x3, 4+2*4);
+                ADDI(u8, u8, 4);
+                MV(x2, x3);
+                ANDI(x2, x2, 0b1111);
+                TABLE64(x3, (uintptr_t)&lead0tab);
+                ADD(x3, x3, x2);
+                LBU(x2, x3, 0);
+                ADD(gd, u8, x2);
             }
-            SRLI(x3, x2, 16);
-            BEQZ(x3, 4+2*4);
-            ADDI(u8, u8, 16);
-            MV(x2, x3);
-            SRLI(x3, x2, 8);
-            BEQZ(x3, 4+2*4);
-            ADDI(u8, u8, 8);
-            MV(x2, x3);
-            SRLI(x3, x2, 4);
-            BEQZ(x3, 4+2*4);
-            ADDI(u8, u8, 4);
-            MV(x2, x3);
-            ANDI(x2, x2, 0b1111); 
-            TABLE64(x3, (uintptr_t)&lead0tab);
-            ADD(x3, x3, x2);
-            LBU(x2, x3, 0);
-            ADD(gd, u8, x2);
             break;
         case 0xBE:
             INST_NAME("MOVSX Gd, Eb");
@@ -1098,13 +1411,13 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0xC2:
             INST_NAME("CMPPS Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             d0 = fpu_get_scratch(dyn);
             d1 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
-                FLW(d0, gback, i*4);
+                FLW(d0, gback, gdoffset+i*4);
                 FLW(d1, wback, fixedaddress+i*4);
                 if ((u8&7) == 0) {                                      // Equal
                     FEQS(x3, d0, d1);
@@ -1135,7 +1448,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     }
                     case 7: break;                                      // Not NaN
                     }
-                    
+
                     // MARK2;
                     if ((u8&7) == 5 || (u8&7) == 6) {
                         MOV32w(x3, 1);
@@ -1143,7 +1456,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     // MARK;
                 }
                 NEG(x3, x3);
-                SW(x3, gback, i*4);
+                SW(x3, gback, gdoffset+i*4);
             }
             break;
         case 0xC3:
@@ -1160,24 +1473,24 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0xC6: // TODO: Optimize this!
             INST_NAME("SHUFPS Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             int32_t idx;
 
             idx = (u8>>(0*2))&3;
-            LWU(x3, gback, idx*4);
+            LWU(x3, gback, gdoffset+idx*4);
             idx = (u8>>(1*2))&3;
-            LWU(x4, gback, idx*4);
+            LWU(x4, gback, gdoffset+idx*4);
             idx = (u8>>(2*2))&3;
             LWU(x5, wback, fixedaddress+idx*4);
             idx = (u8>>(3*2))&3;
             LWU(x6, wback, fixedaddress+idx*4);
 
-            SW(x3, gback, 0*4);
-            SW(x4, gback, 1*4);
-            SW(x5, gback, 2*4);
-            SW(x6, gback, 3*4);
+            SW(x3, gback, gdoffset+0*4);
+            SW(x4, gback, gdoffset+1*4);
+            SW(x5, gback, gdoffset+2*4);
+            SW(x6, gback, gdoffset+3*4);
             break;
 
         case 0xC8:
@@ -1190,90 +1503,111 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0xCF:                  /* BSWAP reg */
             INST_NAME("BSWAP Reg");
             gd = xRAX+(opcode&7)+(rex.b<<3);
-            #if 1
-            ANDI(x1, gd, 0xff);
-            SLLI(x1, x1, (rex.w?64:32)-8);
-            SRLI(x2, gd, 8);
-            ANDI(x3, x2, 0xff);
-            SLLI(x3, x3, (rex.w?64:32)-16);
-            OR(x1, x1, x3);
-            SRLI(x2, gd, 16);
-            ANDI(x3, x2, 0xff);
-            SLLI(x3, x3, (rex.w?64:32)-24);
-            OR(x1, x1, x3);
-            SRLI(x2, gd, 24);
-            if(rex.w) {
-                ANDI(x3, x2, 0xff);
-                SLLI(x3, x3, (rex.w?64:32)-32);
-                OR(x1, x1, x3);
-                SRLI(x2, gd, 32);
-                ANDI(x3, x2, 0xff);
-                SLLI(x3, x3, 64-40);
-                OR(x1, x1, x3);
-                SRLI(x2, gd, 40);
+            if(rv64_zbb) {
+                REV8(gd, gd);
+                if(!rex.w)
+                    SRLI(gd, gd, 32);
+            } else {
+                gback = gd;
+                if (!rex.w) {
+                    AND(x4, gd, xMASK);
+                    gd = x4;
+                }
+                ANDI(x1, gd, 0xff);
+                SLLI(x1, x1, (rex.w?64:32)-8);
+                SRLI(x2, gd, 8);
                 ANDI(x3, x2, 0xff);
-                SLLI(x3, x3, 64-48);
+                SLLI(x3, x3, (rex.w?64:32)-16);
                 OR(x1, x1, x3);
-                SRLI(x2, gd, 48);
+                SRLI(x2, gd, 16);
                 ANDI(x3, x2, 0xff);
-                SLLI(x3, x3, 64-56);
+                SLLI(x3, x3, (rex.w?64:32)-24);
                 OR(x1, x1, x3);
-                SRLI(x2, gd, 56);
+                SRLI(x2, gd, 24);
+                if(rex.w) {
+                    ANDI(x3, x2, 0xff);
+                    SLLI(x3, x3, 64-32);
+                    OR(x1, x1, x3);
+                    SRLI(x2, gd, 32);
+                    ANDI(x3, x2, 0xff);
+                    SLLI(x3, x3, 64-40);
+                    OR(x1, x1, x3);
+                    SRLI(x2, gd, 40);
+                    ANDI(x3, x2, 0xff);
+                    SLLI(x3, x3, 64-48);
+                    OR(x1, x1, x3);
+                    SRLI(x2, gd, 48);
+                    ANDI(x3, x2, 0xff);
+                    SLLI(x3, x3, 64-56);
+                    OR(x1, x1, x3);
+                    SRLI(x2, gd, 56);
+                }
+                OR(gback, x1, x2);
             }
-            OR(gd, x1, x2);
-            #else
-            MOV_U12(x1, 0xff);
-            SLLI(x4, x1, 8); // mask 0xff00
-            if (rex.w) {
-                SLLI(x5, x1, 16); // mask 0xff0000
-                SLLI(x6, x1, 24); // mask 0xff000000
-
-                SRLI(x2, gd, 56);
-
-                SRLI(x3, gd, 40);
-                AND(x3, x3, x4);
-                OR(x2, x2, x3);
-
-                SRLI(x3, gd, 24);
-                AND(x3, x3, x5);
-                OR(x2, x2, x3);
-
-                SRLI(x3, gd, 8);
-                AND(x3, x3, x6);
-                OR(x2, x2, x3);
-
-                AND(x3, gd, x6);
-                SLLI(x3, x3, 8);
-                OR(x2, x2, x3);
-
-                AND(x3, gd, x5);
-                SLLI(x3, x3, 24);
-                OR(x2, x2, x3);
-
-                AND(x3, gd, x4);
-                SLLI(x3, x3, 40);
-                OR(x2, x2, x3);
-
-                SLLI(x3, x3, 56);
-                OR(gd, x2, x3);
+            break;
+        case 0xE5:
+            INST_NAME("PMULHW Gm,Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            for(int i=0; i<4; ++i) {
+                LH(x3, gback, gdoffset+2*i);
+                LH(x4, wback, fixedaddress+2*i);
+                MULW(x3, x3, x4);
+                SRAIW(x3, x3, 16);
+                SH(x3, gback, gdoffset+2*i);
+            }
+            break;
+        case 0xED:
+            INST_NAME("PADDSW Gm,Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            for(int i=0; i<4; ++i) {
+                // tmp32s = (int32_t)GX->sw[i] + EX->sw[i];
+                // GX->sw[i] = (tmp32s>32767)?32767:((tmp32s<-32768)?-32768:tmp32s);
+                LH(x3, gback, gdoffset+2*i);
+                LH(x4, wback, fixedaddress+2*i);
+                ADDW(x3, x3, x4);
+                LUI(x4, 0xFFFF8); // -32768
+                BGE(x3, x4, 12);
+                SH(x4, gback, gdoffset+2*i);
+                J(20); // continue
+                LUI(x4, 8); // 32768
+                BLT(x3, x4, 8);
+                ADDIW(x3, x4, -1);
+                SH(x3, gback, gdoffset+2*i);
+            }
+            break;
+        case 0xEF:
+            INST_NAME("PXOR Gm,Em");
+            nextop = F8;
+            GETGM();
+            if(MODREG && gd==(nextop&7)) {
+                // just zero dest
+                SD(xZR, gback, gdoffset+0);
             } else {
-                SRLIW(x2, gd, 24);
-
-                SRLIW(x3, gd, 8);
-                AND(x3, x3, x4);
-                OR(x2, x2, x3);
-
-                AND(x3, gd, x4);
-                SLLI(x3, x3, 8);
-                OR(x2, x2, x3);
-
-                AND(x3, gd, x1);
-                SLLI(x3, x3, 24);
-                OR(gd, x2, x3);
+                GETEM(x2, 0);
+                LD(x3, gback, gdoffset+0);
+                LD(x4, wback, fixedaddress);
+                XOR(x3, x3, x4);
+                SD(x3, gback, gdoffset+0);
             }
-            #endif
             break;
-
+        case 0xF9:
+            INST_NAME("PSUBW Gm, Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            MMX_LOOP_W(x3, x4, SUBW(x3, x3, x4));
+            break;
+        case 0xFD:
+            INST_NAME("PADDW Gm, Em");
+            nextop = F8;
+            GETGM();
+            GETEM(x2, 0);
+            MMX_LOOP_W(x3, x4, ADDW(x3, x3, x4));
+            break;
         default:
             DEFAULT;
     }
diff --git a/src/dynarec/rv64/dynarec_rv64_64.c b/src/dynarec/rv64/dynarec_rv64_64.c
index 455a8d72..bc3b2c96 100644
--- a/src/dynarec/rv64/dynarec_rv64_64.c
+++ b/src/dynarec/rv64/dynarec_rv64_64.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -23,8 +22,6 @@
 #include "dynarec_rv64_helper.h"
 #include "dynarec_rv64_functions.h"
 
-#define GETG        gd = ((nextop&0x38)>>3)+(rex.r<<3)
-
 uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int seg, int* ok, int* need_epilog)
 {
     (void)ip; (void)rep; (void)need_epilog;
@@ -33,12 +30,13 @@ uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
     uint8_t nextop;
     uint8_t u8;
     uint8_t gd, ed, eb1, eb2, gb1, gb2;
-    uint8_t wback, wb1, wb2, wb;
+    uint8_t gback, wback, wb1, wb2, wb;
     int64_t i64, j64;
+    uint64_t u64;
     int v0, v1;
     int q0;
     int d0;
-    int64_t fixedaddress;
+    int64_t fixedaddress, gdoffset;
     int unscaled;
     MAYUSE(eb1);
     MAYUSE(eb2);
@@ -56,14 +54,85 @@ uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the F0 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+
+    GETREX();
 
     switch(opcode) {
+        case 0x03:
+            INST_NAME("ADD Gd, Seg:Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            nextop = F8;
+            GETGD;
+            GETEDO(x4, 0, x5);
+            emit_add32(dyn, ninst, rex, gd, ed, x3, x4, x5);
+            break;
+        case 0x0F:
+            opcode = F8;
+            switch(opcode) {
+                case 0x11:
+                    switch(rep) {
+                        case 0:
+                            INST_NAME("MOVUPS Ex,Gx");
+                            nextop = F8;
+                            GETGX();
+                            GETEX(x2, 0);
+                            if(!MODREG) {
+                                grab_segdata(dyn, addr, ninst, x4, seg);
+                                ADD(x4, x4, wback);
+                                wback = x4;
+                            }
+                            LD(x3, gback, gdoffset+0);
+                            LD(x5, gback, gdoffset+8);
+                            SD(x3, wback, fixedaddress+0);
+                            SD(x5, wback, fixedaddress+8);
+                            if(!MODREG)
+                                SMWRITE2();
+                            break;
+                        case 1:
+                            INST_NAME("MOVSD Ex, Gx");
+                            nextop = F8;
+                            GETG;
+                            v0 = sse_get_reg(dyn, ninst, x1, gd, 0);
+                            if(MODREG) {
+                                ed = (nextop&7)+ (rex.b<<3);
+                                d0 = sse_get_reg(dyn, ninst, x1, ed, 0);
+                                FMVD(d0, v0);
+                            } else {
+                                grab_segdata(dyn, addr, ninst, x4, seg);
+                                addr = geted(dyn, addr, ninst, nextop, &ed, x1, x2, &fixedaddress, rex, NULL, 1, 0);
+                                ADD(x4, x4, ed);
+                                ed = x4;
+                                FSD(v0, ed, fixedaddress);
+                                SMWRITE2();
+                            }
+                            break;
+                        case 2:
+                            INST_NAME("MOVSS Ex, Gx");
+                            nextop = F8;
+                            GETG;
+                            v0 = sse_get_reg(dyn, ninst, x1, gd, 1);
+                            if(MODREG) {
+                                q0 = sse_get_reg(dyn, ninst, x1, (nextop&7) + (rex.b<<3), 1);
+                                FMVS(q0, v0);
+                            } else {
+                                grab_segdata(dyn, addr, ninst, x4, seg);
+                                addr = geted(dyn, addr, ninst, nextop, &ed, x1, x2, &fixedaddress, rex, NULL, 1, 0);
+                                ADD(x4, x4, ed);
+                                ed = x4;
+                                FSW(v0, ed, fixedaddress);
+                                SMWRITE2();
+                            }
+                            break;
+                        default:
+                            DEFAULT;
+                    }
+                    break;
+
+                default:
+                    DEFAULT;
+            }
+            break;
         case 0x2B:
             INST_NAME("SUB Gd, Seg:Ed");
             SETFLAGS(X_ALL, SF_SET_PENDING);
@@ -84,6 +153,174 @@ uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             emit_xor32(dyn, ninst, rex, gd, ed, x3, x4);
             break;
 
+        case 0x66:
+            addr = dynarec64_6664(dyn, addr, ip, ninst, rex, seg, ok, need_epilog);
+            break;
+        case 0x80:
+            nextop = F8;
+            switch((nextop>>3)&7) {
+                case 0: // ADD
+                    INST_NAME("ADD Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_add8c(dyn, ninst, x1, u8, x2, x4, x5);
+                    EBBACK(x5, 0);
+                    break;
+                case 1: // OR
+                    INST_NAME("OR Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_or8c(dyn, ninst, x1, u8, x2, x4, x5);
+                    EBBACK(x5, 0);
+                    break;
+                case 2: // ADC
+                    INST_NAME("ADC Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_adc8c(dyn, ninst, x1, u8, x2, x4, x5, x6);
+                    EBBACK(x5, 0);
+                    break;
+                case 3: // SBB
+                    INST_NAME("SBB Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_sbb8c(dyn, ninst, x1, u8, x2, x4, x5, x6);
+                    EBBACK(x5, 0);
+                    break;
+                case 4: // AND
+                    INST_NAME("AND Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_and8c(dyn, ninst, x1, u8, x2, x4);
+                    EBBACK(x5, 0);
+                    break;
+                case 5: // SUB
+                    INST_NAME("SUB Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_sub8c(dyn, ninst, x1, u8, x2, x4, x5, x6);
+                    EBBACK(x5, 0);
+                    break;
+                case 6: // XOR
+                    INST_NAME("XOR Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    emit_xor8c(dyn, ninst, x1, u8, x2, x4);
+                    EBBACK(x5, 0);
+                    break;
+                case 7: // CMP
+                    INST_NAME("CMP Eb, Ib");
+                    grab_segdata(dyn, addr, ninst, x1, seg);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEBO(x1, 1);
+                    u8 = F8;
+                    if(u8) {
+                        MOV32w(x2, u8);
+                        emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+                    } else {
+                        emit_cmp8_0(dyn, ninst, x1, x3, x4);
+                    }
+                    break;
+                default:
+                    DEFAULT;
+            }
+            break;
+        case 0x81:
+        case 0x83:
+            nextop = F8;
+            grab_segdata(dyn, addr, ninst, x6, seg);
+            switch((nextop>>3)&7) {
+                case 0: // ADD
+                    if(opcode==0x81) {INST_NAME("ADD Ed, Id");} else {INST_NAME("ADD Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_add32c(dyn, ninst, rex, ed, i64, x3, x4, x5, x9);
+                    WBACKO(x6);
+                    break;
+                case 1: // OR
+                    if(opcode==0x81) {INST_NAME("OR Ed, Id");} else {INST_NAME("OR Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_or32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACKO(x6);
+                    break;
+                case 2: // ADC
+                    if(opcode==0x81) {INST_NAME("ADC Ed, Id");} else {INST_NAME("ADC Ed, Ib");}
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    MOV64xw(x5, i64);
+                    SD(x6, xEmu, offsetof(x64emu_t, scratch));
+                    emit_adc32(dyn, ninst, rex, ed, x5, x3, x4, x6, x9);
+                    LD(x6, xEmu, offsetof(x64emu_t, scratch));
+                    WBACKO(x6);
+                    break;
+                case 3: // SBB
+                    if(opcode==0x81) {INST_NAME("SBB Ed, Id");} else {INST_NAME("SBB Ed, Ib");}
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    MOV64xw(x5, i64);
+                    emit_sbb32(dyn, ninst, rex, ed, x5, x3, x4, x9);
+                    WBACKO(x6);
+                    break;
+                case 4: // AND
+                    if(opcode==0x81) {INST_NAME("AND Ed, Id");} else {INST_NAME("AND Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_and32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACKO(x6);
+                    break;
+                case 5: // SUB
+                    if(opcode==0x81) {INST_NAME("SUB Ed, Id");} else {INST_NAME("SUB Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_sub32c(dyn, ninst, rex, ed, i64, x3, x4, x5, x9);
+                    WBACKO(x6);
+                    break;
+                case 6: // XOR
+                    if(opcode==0x81) {INST_NAME("XOR Ed, Id");} else {INST_NAME("XOR Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_xor32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACKO(x6);
+                    break;
+                case 7: // CMP
+                    if(opcode==0x81) {INST_NAME("CMP Ed, Id");} else {INST_NAME("CMP Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETEDO(x6, (opcode==0x81)?4:1, x5);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    if(i64) {
+                        MOV64xw(x2, i64);
+                        emit_cmp32(dyn, ninst, rex, ed, x2, x3, x4, x5, x6);
+                    } else
+                        emit_cmp32_0(dyn, ninst, rex, ed, x3, x4);
+                    break;
+            }
+            break;
         case 0x88:
             INST_NAME("MOV Seg:Eb, Gb");
             grab_segdata(dyn, addr, ninst, x4, seg);
@@ -156,6 +393,81 @@ uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 LDxw(gd, x4, fixedaddress);
             }
             break;
+
+        case 0xA1:
+            INST_NAME("MOV EAX,FS:Od");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            // TODO: could be optimized.
+            MOV64z(x1, u64);
+            ADD(x1, x1, x4);
+            LDxw(xRAX, x1, 0);
+            break;
+
+        case 0xA3:
+            INST_NAME("MOV FS:Od,EAX");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            if(rex.is32bits)
+                u64 = F32;
+            else
+                u64 = F64;
+            // TODO: could be optimized.
+            MOV64z(x1, u64);
+            ADD(x1, x1, x4);
+            SDxw(xRAX, x1, 0);
+            SMWRITE2();
+            break;
+
+        case 0xC6:
+            INST_NAME("MOV Seg:Eb, Ib");
+            grab_segdata(dyn, addr, ninst, x4, seg);
+            nextop=F8;
+            if(MODREG) {   // reg <= u8
+                u8 = F8;
+                if(!rex.rex) {
+                    ed = (nextop&7);
+                    eb1 = xRAX+(ed&3);  // Ax, Cx, Dx or Bx
+                    eb2 = (ed&4)>>2;    // L or H
+                } else {
+                    eb1 = xRAX+(nextop&7)+(rex.b<<3);
+                    eb2 = 0;
+                }
+
+                if (eb2) {
+                    // load a mask to x3 (ffffffffffff00ff)
+                    LUI(x3, 0xffff0);
+                    ORI(x3, x3, 0xff);
+                    // apply mask
+                    AND(eb1, eb1, x3);
+                    if(u8) {
+                        if((u8<<8)<2048) {
+                            ADDI(x4, xZR, u8<<8);
+                        } else {
+                            ADDI(x4, xZR, u8);
+                            SLLI(x4, x4, 8);
+                        }
+                        OR(eb1, eb1, x4);
+                    }
+                } else {
+                    ANDI(eb1, eb1, 0xf00);  // mask ffffffffffffff00
+                    ORI(eb1, eb1, u8);
+                }
+            } else {                    // mem <= u8
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 1);
+                u8 = F8;
+                if(u8) {
+                    ADDI(x3, xZR, u8);
+                    ed = x3;
+                } else
+                    ed = xZR;
+                ADD(x4, wback, x4);
+                SB(ed, x4, fixedaddress);
+                SMWRITE2();
+            }
+            break;
         case 0xC7:
             INST_NAME("MOV Seg:Ed, Id");
             grab_segdata(dyn, addr, ninst, x4, seg);
@@ -165,11 +477,15 @@ uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 ed = xRAX+(nextop&7)+(rex.b<<3);
                 MOV64xw(ed, i64);
             } else {                    // mem <= i32
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 4);
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 4);
                 i64 = F32S;
-                MOV64xw(x3, i64);
-                ADD(x4, ed, x4);
-                SDxw(x3, x4, fixedaddress);
+                if(i64) {
+                    MOV64xw(x3, i64);
+                    ed = x3;
+                } else
+                    ed = xZR;
+                ADD(x4, wback, x4);
+                SDxw(ed, x4, fixedaddress);
                 SMWRITE2();
             }
             break;
diff --git a/src/dynarec/rv64/dynarec_rv64_66.c b/src/dynarec/rv64/dynarec_rv64_66.c
index 7bc996e9..49a7ef65 100644
--- a/src/dynarec/rv64/dynarec_rv64_66.c
+++ b/src/dynarec/rv64/dynarec_rv64_66.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -50,14 +49,10 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the 66 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
 
-    if(rex.w && opcode!=0x0f)   // rex.w cancels "66", but not for 66 0f type of prefix
+    GETREX();
+
+    if(rex.w && !(opcode==0x0f || opcode==0xf0 || opcode==0x64 || opcode==0x65))   // rex.w cancels "66", but not for 66 0f type of prefix
         return dynarec64_00(dyn, addr-1, ip, ninst, rex, rep, ok, need_epilog); // addr-1, to "put back" opcode
 
     switch(opcode) {
@@ -83,8 +78,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("ADD AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1 , xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1 , xRAX);
             MOV32w(x2, i32);
             emit_add16(dyn, ninst, x1, x2, x3, x4, x6);
             LUI(x3, 0xffff0);
@@ -113,8 +107,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("OR AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1, xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1, xRAX);
             MOV32w(x2, i32);
             emit_or16(dyn, ninst, x1, x2, x3, x4);
             LUI(x3, 0xffff0);
@@ -124,6 +117,16 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x0F:
             addr = dynarec64_660F(dyn, addr, ip, ninst, rex, ok, need_epilog);
             break;
+        case 0x19:
+            INST_NAME("SBB Ew, Gw");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGW(x2);
+            GETEW(x1, 0);
+            emit_sbb16(dyn, ninst, x1, x2, x4, x5, x6);
+            EWBACK;
+            break;
         case 0x1B:
             INST_NAME("SBB Gw, Ew");
             READFLAGS(X_CF);
@@ -156,8 +159,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("AND AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1, xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1, xRAX);
             MOV32w(x2, i32);
             emit_and16(dyn, ninst, x1, x2, x3, x4);
             LUI(x3, 0xffff0);
@@ -186,8 +188,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("SUB AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1, xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1, xRAX);
             MOV32w(x2, i32);
             emit_sub16(dyn, ninst, x1, x2, x3, x4, x5);
             LUI(x2, 0xffff0);
@@ -216,8 +217,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("XOR AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1, xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1, xRAX);
             MOV32w(x2, i32);
             emit_xor16(dyn, ninst, x1, x2, x3, x4, x5);
             LUI(x5, 0xffff0);
@@ -244,8 +244,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             INST_NAME("CMP AX, Iw");
             SETFLAGS(X_ALL, SF_SET_PENDING);
             i32 = F16;
-            SLLI(x1, xRAX, 48);
-            SRLI(x1, x1, 48);
+            ZEXTH(x1, xRAX);
             if(i32) {
                 MOV32w(x2, i32);
                 emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5, x6);
@@ -253,6 +252,51 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 emit_cmp16_0(dyn, ninst, x1, x3, x4);
             }
             break;
+        case 0x40:
+        case 0x41:
+        case 0x42:
+        case 0x43:
+        case 0x44:
+        case 0x45:
+        case 0x46:
+        case 0x47:
+            INST_NAME("INC Reg16 (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            ZEXTH(x1, gd);
+            emit_inc16(dyn, ninst, x1, x2, x3, x4);
+            LUI(x3, 0xffff0);
+            AND(gd, gd, x3);
+            OR(gd, gd, x1);
+            ZEROUP(gd);
+            break;
+        case 0x48:
+        case 0x49:
+        case 0x4A:
+        case 0x4B:
+        case 0x4C:
+        case 0x4D:
+        case 0x4E:
+        case 0x4F:
+            INST_NAME("DEC Reg16 (32bits)");
+            SETFLAGS(X_ALL&~X_CF, SF_SUBSET_PENDING);
+            gd = xRAX + (opcode&7);
+            ZEXTH(x1, gd);
+            emit_dec16(dyn, ninst, x1, x2, x3, x4, x5);
+            LUI(x3, 0xffff0);
+            AND(gd, gd, x3);
+            OR(gd, gd, x1);
+            ZEROUP(gd);
+            break;
+        case 0x64:
+            addr = dynarec64_6664(dyn, addr, ip, ninst, rex, _FS, ok, need_epilog);
+            break;
+        case 0x65:
+            addr = dynarec64_6664(dyn, addr, ip, ninst, rex, _GS, ok, need_epilog);
+            break;
+        case 0x66:
+            addr = dynarec64_66(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
+            break;
         case 0x69:
         case 0x6B:
             if(opcode==0x69) {
@@ -267,8 +311,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             if(opcode==0x69) i32 = F16S; else i32 = F8S;
             MOV32w(x2, i32);
             MULW(x2, x2, x1);
-            SLLI(x2, x2, 48);
-            SRLI(x2, x2, 48);
+            ZEXTH(x2, x2);
             UFLAG_RES(x2);
             gd=x2;
             GWBACK;
@@ -394,8 +437,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     // we don't use GETGW above, so we need let gd & 0xffff.
                     LUI(x1, 0xffff0);
                     AND(ed, ed, x1);
-                    SLLI(x2, gd, 48);
-                    SRLI(x2, x2, 48);
+                    ZEXTH(x2, gd);
                     OR(ed, ed, x2);
                 }
             } else {
@@ -413,8 +455,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 if(ed!=gd) {
                     LUI(x1, 0xffff0);
                     AND(gd, gd, x1);
-                    SLLI(x2, ed, 48);
-                    SRLI(x2, x2, 48);
+                    ZEXTH(x2, ed);
                     OR(gd, gd, x2);
                 }
             } else {
@@ -443,13 +484,11 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     // x2 <- rax
                     MV(x2, xRAX);
                     // rax[15:0] <- gd[15:0]
-                    SLLI(x3, gd, 48);
-                    SRLI(x3, x3, 48);
+                    ZEXTH(x3, gd);
                     AND(xRAX, xRAX, x4);
                     OR(xRAX, xRAX, x3);
                     // gd[15:0] <- x2[15:0]
-                    SLLI(x2, x2, 48);
-                    SRLI(x2, x2, 48);
+                    ZEXTH(x2, x2);
                     AND(gd, gd, x4);
                     OR(gd, gd, x2);
                 }
@@ -530,6 +569,54 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 ADD(xRDI, xRDI, x3);
             }
             break;
+
+        case 0xAF:
+            switch (rep) {
+                case 1:
+                case 2:
+                    if(rep==1) {INST_NAME("REPNZ SCASW");} else {INST_NAME("REPZ SCASW");}
+                    MAYSETFLAGS();
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    CBZ_NEXT(xRCX);
+                    GETDIR(x3, x1, rex.w?8:2);
+                    if (rex.w) {
+                        MARK;
+                        LD(x2, xRDI, 0);
+                        ADD(xRDI, xRDI, x3);
+                        ADDI(xRCX, xRCX, -1);
+                        if (rep==1) {BEQ_MARK3(xRAX, x2);} else {BNE_MARK3(xRAX, x2);}
+                        BNE_MARK(xRCX, xZR);
+                        MARK3;
+                        emit_cmp32(dyn, ninst, rex, xRAX, x2, x3, x4, x5, x6);
+                    } else {
+                        ZEXTH(x1, xRAX);
+                        MARK;
+                        LHU(x2, xRDI, 0);
+                        ADD(xRDI, xRDI, x3);
+                        ADDI(xRCX, xRCX, -1);
+                        if (rep==1) {BEQ_MARK3(x1, x2);} else {BNE_MARK3(x1, x2);}
+                        BNE_MARK(xRCX, xZR);
+                        MARK3;
+                        emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5, x6);
+                    }
+                    break;
+                default:
+                    INST_NAME("SCASW");
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETDIR(x3, x1, rex.w?8:2);
+                    if (rex.w) {
+                        LD(x2, xRDI, 0);
+                        emit_cmp32(dyn, ninst, rex, xRAX, x2, x3, x4, x5, x6);
+                    } else {
+                        ZEXTH(x1, xRAX);
+                        LHU(x2, xRDI, 0);
+                        emit_cmp16(dyn, ninst, x1, x2, x3, x4, x5, x6);
+                    }
+                    ADD(xRDI, xRDI, x3);
+                    break;
+            }
+            break;
+
         case 0xB8:
         case 0xB9:
         case 0xBA:
@@ -555,7 +642,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 }
             }
             break;
-            
+
         case 0xC1:
             nextop = F8;
             switch((nextop>>3)&7) {
@@ -643,8 +730,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     UFLAG_OP12(ed, x2)
                     SRAI(ed, ed, u8&0x1f);
                     if(MODREG) {
-                        SLLI(ed, ed, 48);
-                        SRLI(ed, ed, 48);
+                        ZEXTH(ed, ed);
                     }
                     EWBACK;
                     UFLAG_RES(ed);
@@ -652,7 +738,7 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     break;
             }
             break;
-            
+
         case 0xC7:
             INST_NAME("MOV Ew, Iw");
             nextop = F8;
@@ -693,6 +779,25 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     UFLAG_RES(ed);
                     UFLAG_DF(x3, d_shr16);
                     break;
+                case 4:
+                case 6:
+                    if(opcode==0xD1) {
+                        INST_NAME("SHL Ew, 1");
+                        MOV32w(x4, 1);
+                    } else {
+                        INST_NAME("SHL Ew, CL");
+                        ANDI(x4, xRCX, 0x1f);
+                    }
+                    UFLAG_IF {MESSAGE(LOG_DUMP, "Need Optimization for flags\n");}
+                    SETFLAGS(X_ALL, SF_PENDING);
+                    GETEW(x1, 0);
+                    UFLAG_OP12(ed, x4)
+                    SLL(ed, ed, x4);
+                    ZEXTH(ed, ed);
+                    EWBACK;
+                    UFLAG_RES(ed);
+                    UFLAG_DF(x3, d_shl16);
+                    break;
                 case 7:
                     if(opcode==0xD1) {
                         INST_NAME("SAR Ew, 1");
@@ -704,10 +809,9 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     UFLAG_IF {MESSAGE(LOG_DUMP, "Need Optimization for flags\n");}
                     SETFLAGS(X_ALL, SF_PENDING);
                     GETSEW(x1, 0);
-                    UFLAG_OP12(ed, x4)
+                    UFLAG_OP12(ed, x4);
                     SRA(ed, ed, x4);
-                    SLLI(ed, ed, 48);
-                    SRLI(ed, ed, 48);
+                    ZEXTH(ed, ed);
                     EWBACK;
                     UFLAG_RES(ed);
                     UFLAG_DF(x3, d_sar16);
@@ -716,6 +820,10 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     DEFAULT;
             }
             break;
+
+        case 0xF0:
+            return dynarec64_66F0(dyn, addr, ip, ninst, rex, rep, ok, need_epilog);
+
         case 0xF7:
             nextop = F8;
             switch((nextop>>3)&7) {
@@ -745,9 +853,8 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     INST_NAME("DIV Ew");
                     SETFLAGS(X_ALL, SF_SET);
                     GETEW(x1, 0);
-                    SLLI(x2, xRAX, 48);
+                    ZEXTH(x2, xRAX);
                     SLLI(x3, xRDX, 48);
-                    SRLI(x2, x2, 48);
                     SRLI(x3, x3, 32);
                     OR(x2, x2, x3);
                     DIVUW(x3, x2, ed);
@@ -766,9 +873,8 @@ uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     NOTEST(x1);
                     SETFLAGS(X_ALL, SF_SET);
                     GETSEW(x1, 0);
-                    SLLI(x2, xRAX, 48);
+                    ZEXTH(x2, xRAX);
                     SLLI(x3, xRDX, 48);
-                    SRLI(x2, x2, 48);
                     SRLI(x3, x3, 32);
                     OR(x2, x2, x3);
                     DIVW(x3, x2, ed);
diff --git a/src/dynarec/rv64/dynarec_rv64_660f.c b/src/dynarec/rv64/dynarec_rv64_660f.c
index 260ea32b..3f51289e 100644
--- a/src/dynarec/rv64/dynarec_rv64_660f.c
+++ b/src/dynarec/rv64/dynarec_rv64_660f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -27,7 +26,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     (void)ip; (void)need_epilog;
 
     uint8_t opcode = F8;
-    uint8_t nextop, u8;
+    uint8_t nextop, u8, s8;
     int32_t i32;
     uint8_t gd, ed;
     uint8_t wback, wb1, wb2, gback;
@@ -37,7 +36,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     int v0, v1;
     int q0, q1;
     int d0, d1;
-    int64_t fixedaddress;
+    int64_t fixedaddress, gdoffset;
     int unscaled;
 
     MAYUSE(d0);
@@ -49,27 +48,27 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     MAYUSE(j64);
 
     static const int8_t round_round[] = { RD_RNE, RD_RDN, RD_RUP, RD_RTZ };
-    
+
     switch(opcode) {
         case 0x10:
             INST_NAME("MOVUPD Gx,Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_MV_Q(x3);
             break;
         case 0x11:
             INST_NAME("MOVUPD Ex,Gx");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_MV_Q2(x3);
             if(!MODREG) SMWRITE2();
             break;
         case 0x12:
             INST_NAME("MOVLPD Gx, Eq");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             if(MODREG) {
                 // access register instead of memory is bad opcode!
                 DEFAULT;
@@ -78,33 +77,47 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             SMREAD();
             addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
             LD(x3, wback, fixedaddress);
-            SD(x3, gback, 0);
+            SD(x3, gback, gdoffset+0);
+            break;
+        case 0x13:
+            INST_NAME("MOVLPD Eq, Gx");
+            nextop = F8;
+            GETGX();
+            if(MODREG) {
+                // access register instead of memory is bad opcode!
+                DEFAULT;
+                return addr;
+            }
+            addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+            LD(x3, gback, gdoffset+0);
+            SD(x3, wback, fixedaddress);
+            SMWRITE2();
             break;
         case 0x14:
             INST_NAME("UNPCKLPD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             // GX->q[1] = EX->q[0];
             LD(x3, wback, fixedaddress+0);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+8);
             break;
         case 0x15:
             INST_NAME("UNPCKHPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             // GX->q[0] = GX->q[1];
-            LD(x3, gback, 8);
-            SD(x3, gback, 0);
+            LD(x3, gback, gdoffset+8);
+            SD(x3, gback, gdoffset+0);
             // GX->q[1] = EX->q[1];
             LD(x3, wback, fixedaddress+8);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+8);
             break;
         case 0x16:
             INST_NAME("MOVHPD Gx, Eq");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             if(MODREG) {
                 // access register instead of memory is bad opcode!
                 DEFAULT;
@@ -113,56 +126,32 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             SMREAD();
             addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
             LD(x3, wback, fixedaddress);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+8);
             break;
         case 0x1F:
             INST_NAME("NOP (multibyte)");
             nextop = F8;
             FAKEED;
             break;
-        
-        #define GO(GETFLAGS, NO, YES, F)            \
-            READFLAGS(F);                           \
-            GETFLAGS;                               \
-            nextop=F8;                              \
-            GETGD;                                  \
-            if(MODREG) {                            \
-                ed = xRAX+(nextop&7)+(rex.b<<3);    \
-                SLLI(x4, ed, 48);                   \
-                SRLI(x4, x4, 48);                   \
-            } else {                                \
-                SMREAD();                           \
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x4, &fixedaddress, rex, NULL, 1, 0); \
-                LHU(x4, ed, fixedaddress);          \
-                ed = x4;                            \
-            }                                       \
-            B##NO(x1, 4+4*4);                       \
-            ADDI(x3, xZR, -1);                      \
-            SRLI(x3, x3, 48);                       \
-            AND(gd, gd, x3);                        \
-            OR(gd, gd, ed);
-
-        GOCOND(0x40, "CMOV", "Gw, Ew");
-        #undef GO
         case 0x28:
             INST_NAME("MOVAPD Gx,Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_MV_Q(x3);
             break;
         case 0x29:
             INST_NAME("MOVAPD Ex,Gx");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_MV_Q2(x3);
             if(!MODREG) SMWRITE2();
             break;
         case 0x2B:
             INST_NAME("MOVNTPD Ex, Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q2(x3);
             break;
@@ -207,15 +196,15 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 case 0x00:
                     INST_NAME("PSHUFB Gx, Ex");
                     nextop = F8;
-                    GETGX(x1);
+                    GETGX();
                     GETEX(x2, 0);
                     sse_forget_reg(dyn, ninst, x5);
 
                     ADDI(x5, xEmu, offsetof(x64emu_t, scratch));
 
                     // perserve gd
-                    LD(x3, gback, 0);
-                    LD(x4, gback, 8);
+                    LD(x3, gback, gdoffset+0);
+                    LD(x4, gback, gdoffset+8);
                     SD(x3, x5, 0);
                     SD(x4, x5, 8);
 
@@ -223,29 +212,29 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         LBU(x3, wback, fixedaddress+i);
                         ANDI(x4, x3, 128);
                         BEQZ(x4, 12);
-                        SB(xZR, gback, i);
+                        SB(xZR, gback, gdoffset+i);
                         BEQZ(xZR, 20); // continue
                         ANDI(x4, x3, 15);
                         ADD(x4, x4, x5);
                         LBU(x4, x4, 0);
-                        SB(x4, gback, i);
+                        SB(x4, gback, gdoffset+i);
                     }
                     break;
                 case 0x01:
                     INST_NAME("PHADDW Gx, Ex");
                     nextop = F8;
-                    GETGX(x1);
+                    GETGX();
                     for (int i=0; i<4; ++i) {
                         // GX->sw[i] = GX->sw[i*2+0]+GX->sw[i*2+1];
-                        LH(x3, gback, 2*(i*2+0));
-                        LH(x4, gback, 2*(i*2+1));
+                        LH(x3, gback, gdoffset+2*(i*2+0));
+                        LH(x4, gback, gdoffset+2*(i*2+1));
                         ADDW(x3, x3, x4);
-                        SH(x3, gback, 2*i);
+                        SH(x3, gback, gdoffset+2*i);
                     }
                     if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                         // GX->q[1] = GX->q[0];
-                        LD(x3, gback, 0);
-                        SD(x3, gback, 8);
+                        LD(x3, gback, gdoffset+0);
+                        SD(x3, gback, gdoffset+8);
                     } else {
                         GETEX(x2, 0);
                         for (int i=0; i<4; ++i) {
@@ -253,47 +242,150 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                             LH(x3, wback, fixedaddress+2*(i*2+0));
                             LH(x4, wback, fixedaddress+2*(i*2+1));
                             ADDW(x3, x3, x4);
-                            SH(x3, gback, 2*(4+i));
+                            SH(x3, gback, gdoffset+2*(4+i));
                         }
                     }
                     break;
                 case 0x02:
                     INST_NAME("PHADDD Gx, Ex");
                     nextop = F8;
-                    GETGX(x1);
+                    GETGX();
                     // GX->sd[0] += GX->sd[1];
-                    LW(x3, gback, 0*4);
-                    LW(x4, gback, 1*4);
+                    LW(x3, gback, gdoffset+0*4);
+                    LW(x4, gback, gdoffset+1*4);
                     ADDW(x3, x3, x4);
-                    SW(x3, gback, 0*4);
+                    SW(x3, gback, gdoffset+0*4);
                     // GX->sd[1] = GX->sd[2] + GX->sd[3];
-                    LW(x3, gback, 2*4);
-                    LW(x4, gback, 3*4);
+                    LW(x3, gback, gdoffset+2*4);
+                    LW(x4, gback, gdoffset+3*4);
                     ADDW(x3, x3, x4);
-                    SW(x3, gback, 1*4);
+                    SW(x3, gback, gdoffset+1*4);
                     if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                         // GX->q[1] = GX->q[0];
-                        LD(x3, gback, 0);
-                        SD(x3, gback, 8);
+                        LD(x3, gback, gdoffset+0);
+                        SD(x3, gback, gdoffset+8);
                     } else {
                         GETEX(x2, 0);
                         // GX->sd[2] = EX->sd[0] + EX->sd[1];
                         LW(x3, wback, fixedaddress+0*4);
                         LW(x4, wback, fixedaddress+1*4);
                         ADDW(x3, x3, x4);
-                        SW(x3, gback, 2*4);
+                        SW(x3, gback, gdoffset+2*4);
                         // GX->sd[3] = EX->sd[2] + EX->sd[3];
                         LW(x3, wback, fixedaddress+2*4);
                         LW(x4, wback, fixedaddress+3*4);
                         ADDW(x3, x3, x4);
-                        SW(x3, gback, 3*4);
+                        SW(x3, gback, gdoffset+3*4);
+                    }
+                    break;
+
+                case 0x04:
+                    INST_NAME("PADDUBSW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    MOV64x(x5, 32767);
+                    MOV64x(x6, -32768);
+                    for(int i=0; i<8; ++i) {
+                        LBU(x3, gback, gdoffset+i*2);
+                        LB(x4, wback, fixedaddress+i*2);
+                        MUL(x9, x3, x4);
+                        LBU(x3, gback, gdoffset+i*2+1);
+                        LB(x4, wback, fixedaddress+i*2+1);
+                        MUL(x3, x3, x4);
+                        ADD(x3, x3, x9);
+                        if(rv64_zbb) {
+                            MIN(x3, x3, x5);
+                            MAX(x3, x3, x6);
+                        } else {
+                            BLT(x3, x5, 4+4);
+                            MV(x3, x5);
+                            BLT(x6, x3, 4+4);
+                            MV(x3, x6);
+                        }
+                        SH(x3, gback, gdoffset+i*2);
+                    }
+                    break;
+
+                case 0x08:
+                    INST_NAME("PSIGNB Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<16; ++i) {
+                        LB(x3, gback, gdoffset+i);
+                        LB(x4, wback, fixedaddress+i);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x3, x3);
+                        BNE(x4, xZR, 4+4);
+                        MOV_U12(x3, 0);
+                        SB(x3, gback, gdoffset+i);
+                    }
+                    break;
+                case 0x09:
+                    INST_NAME("PSIGNW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<8; ++i) {
+                        LH(x3, gback, gdoffset+i*2);
+                        LH(x4, wback, fixedaddress+i*2);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x3, x3);
+                        BNE(x4, xZR, 4+4);
+                        MOV_U12(x3, 0);
+                        SH(x3, gback, gdoffset+i*2);
+                    }
+                    break;
+                case 0x0A:
+                    INST_NAME("PSIGND Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LW(x3, gback, gdoffset+i*4);
+                        LW(x4, wback, fixedaddress+i*4);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x3, x3);
+                        BNE(x4, xZR, 4+4);
+                        ADDI(x3, xZR, 0);
+                        SW(x3, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x0B:
+                    INST_NAME("PMULHRSW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<8; ++i) {
+                        LH(x3, gback, gdoffset+i*2);
+                        LH(x4, wback, fixedaddress+i*2);
+                        MUL(x3, x3, x4);
+                        SRAI(x3, x3, 14);
+                        ADDI(x3, x3, 1);
+                        SRAI(x3, x3, 1);
+                        SH(x3, gback, gdoffset+i*2);
+                    }
+                    break;
+                case 0x10:
+                    INST_NAME("PBLENDVB Gx,Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    sse_forget_reg(dyn, ninst, 0); // forget xmm[0]
+                    for (int i=0; i<16; ++i) {
+                        LB(x3, xEmu, offsetof(x64emu_t, xmm[0])+i);
+                        BGE(x3, xZR, 12); // continue
+                        LBU(x3, wback, fixedaddress+i);
+                        SB(x3, gback, gdoffset+i);
+                        // continue
                     }
                     break;
                 case 0x17:
                     INST_NAME("PTEST Gx, Ex");
                     nextop = F8;
                     SETFLAGS(X_ALL, SF_SET);
-                    GETGX(x1);
+                    GETGX();
                     GETEX(x2, 0);
                     CLEAR_FLAGS();
                     SET_DFNONE();
@@ -302,8 +394,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         LD(x6, wback, fixedaddress+8);
 
                         IFX(X_ZF) {
-                            LD(x3, gback, 0);
-                            LD(x4, gback, 8);
+                            LD(x3, gback, gdoffset+0);
+                            LD(x4, gback, gdoffset+8);
                             AND(x3, x3, x5);
                             AND(x4, x4, x6);
                             OR(x3, x3, x4);
@@ -311,9 +403,9 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                             ORI(xFlags, xFlags, 1<<F_ZF);
                         }
                         IFX(X_CF) {
-                            LD(x3, gback, 0);
+                            LD(x3, gback, gdoffset+0);
                             NOT(x3, x3);
-                            LD(x4, gback, 8);
+                            LD(x4, gback, gdoffset+8);
                             NOT(x4, x4);
                             AND(x3, x3, x5);
                             AND(x4, x4, x6);
@@ -323,19 +415,306 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                         }
                     }
                     break;
+
+                case 0x1C:
+                    INST_NAME("PABSB Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<16; ++i) {
+                        LB(x4, wback, fixedaddress+i);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x4, x4);
+                        SB(x4, gback, gdoffset+i);
+                    }
+                    break;
+                case 0x1D:
+                    INST_NAME("PABSW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<8; ++i) {
+                        LH(x4, wback, fixedaddress+i*2);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x4, x4);
+                        SH(x4, gback, gdoffset+i*2);
+                    }
+                    break;
+                case 0x1E:
+                    INST_NAME("PABSD Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    MOV64x(x5, ~(1<<31));
+                    for(int i=0; i<4; ++i) {
+                        LW(x4, wback, fixedaddress+i*4);
+                        BGE(x4, xZR, 4+4);
+                        NEG(x4, x4);
+                        SW(x4, gback, gdoffset+i*4);
+                    }
+                    break;
+
+                case 0x2B:
+                    INST_NAME("PACKUSDW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    MOV64x(x5, 65535);
+                    for(int i=0; i<4; ++i) {
+                        LW(x3, gback, gdoffset+i*4);
+                        if(rv64_zbb) {
+                            MIN(x3, x3, x5);
+                            MAX(x3, x3, xZR);
+                        } else {
+                            BGE(x3, xZR, 4+4);
+                            MV(x3, xZR);
+                            BLT(x3, x5, 4+4);
+                            MV(x3, x5);
+                        }
+                        SH(x3, gback, gdoffset+i*2);
+                    }
+                    if(MODREG && gd==ed) {
+                        LD(x3, gback, gdoffset+0);
+                        SD(x3, gback, gdoffset+8);
+                    } else for(int i=0; i<4; ++i) {
+                        LW(x3, wback, fixedaddress+i*4);
+                        if(rv64_zbb) {
+                            MIN(x3, x3, x5);
+                            MAX(x3, x3, xZR);
+                        } else {
+                            BGE(x3, xZR, 4+4);
+                            MV(x3, xZR);
+                            BLT(x3, x5, 4+4);
+                            MV(x3, x5);
+                        }
+                        SH(x3, gback, gdoffset+8+i*2);
+                    }
+                    break;
+
+                case 0x30:
+                    INST_NAME("PMOVZXBW Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=7; i>=0; --i) {
+                        LBU(x3, wback, fixedaddress+i);
+                        SH(x3, gback, gdoffset+i*2);
+                    }
+                    break;
+                case 0x31:
+                    INST_NAME("PMOVZXBD Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=3; i>=0; --i) {
+                        LBU(x3, wback, fixedaddress+i);
+                        SW(x3, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x32:
+                    INST_NAME("PMOVZXBQ Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=1; i>=0; --i) {
+                        LBU(x3, wback, fixedaddress+i);
+                        SD(x3, gback, gdoffset+i*8);
+                    }
+                    break;
+                case 0x33:
+                    INST_NAME("PMOVZXWD Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=3; i>=0; --i) {
+                        LHU(x3, wback, fixedaddress+i*2);
+                        SW(x3, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x34:
+                    INST_NAME("PMOVZXWQ Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=1; i>=0; --i) {
+                        LHU(x3, wback, fixedaddress+i*2);
+                        SD(x3, gback, gdoffset+i*8);
+                    }
+                    break;
+                case 0x35:
+                    INST_NAME("PMOVZXDQ Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=1; i>=0; --i) {
+                        LWU(x3, wback, fixedaddress+i*4);
+                        SD(x3, gback, gdoffset+i*8);
+                    }
+                    break;
+
+                case 0x38:
+                    INST_NAME("PMINSB Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<16; ++i) {
+                        LB(x3, gback, gdoffset+i);
+                        LB(x4, wback, fixedaddress+i);
+                        if(rv64_zbb) MIN(x4, x3, x4); else BLT(x3, x4, 4+4);
+                        SB(x4, gback, gdoffset+i);
+                    }
+                    break;
+                case 0x39:
+                    INST_NAME("PMINSD Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LW(x3, gback, gdoffset+i*4);
+                        LW(x4, wback, fixedaddress+i*4);
+                        if(rv64_zbb) MIN(x4, x3, x4); else BLT(x3, x4, 4+4);
+                        SW(x4, gback, gdoffset+i*4);
+                    }
+                    break;
                 case 0x3A:
                     INST_NAME("PMINUW Gx, Ex");  // SSE4 opcode!
                     nextop = F8;
-                    GETGX(x1);
+                    GETGX();
                     GETEX(x2, 0);
                     for(int i=0; i<8; ++i) {
-                        // if(GX->uw[i]>EX->uw[i]) GX->uw[i] = EX->uw[i];
-                        LHU(x3, gback, i*2);
+                        LHU(x3, gback, gdoffset+i*2);
                         LHU(x4, wback, fixedaddress+i*2);
-                        BLTU(x3, x4, 8);
-                        SH(x4, gback, i*2);
+                        if(rv64_zbb) MINU(x4, x3, x4); else BLTU(x3, x4, 4+4);
+                        SH(x4, gback, gdoffset+i*2);
                     }
                     break;
+                case 0x3B:
+                    INST_NAME("PMINUD Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LWU(x3, gback, gdoffset+i*4);
+                        LWU(x4, wback, fixedaddress+i*4);
+                        if(rv64_zbb) MINU(x4, x3, x4); else BLTU(x3, x4, 4+4);
+                        SW(x4, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x3C:
+                    INST_NAME("PMAXSB Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<16; ++i) {
+                        LB(x3, gback, gdoffset+i);
+                        LB(x4, wback, fixedaddress+i);
+                        if(rv64_zbb) MAX(x4, x3, x4); else BLT(x4, x3, 4+4);
+                        SB(x4, gback, gdoffset+i);
+                    }
+                    break;
+                case 0x3D:
+                    INST_NAME("PMAXSD Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LW(x3, gback, gdoffset+i*4);
+                        LW(x4, wback, fixedaddress+i*4);
+                        if(rv64_zbb) MAX(x4, x3, x4); else BLT(x4, x3, 4+4);
+                        SW(x4, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x3E:
+                    INST_NAME("PMAXUW Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<8; ++i) {
+                        LHU(x3, gback, gdoffset+i*2);
+                        LHU(x4, wback, fixedaddress+i*2);
+                        if(rv64_zbb) MAXU(x4, x3, x4); else BLTU(x4, x3, 4+4);
+                        SH(x4, gback, gdoffset+i*2);
+                    }
+                    break;
+                case 0x3F:
+                    INST_NAME("PMAXUD Gx, Ex");  // SSE4 opcode!
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LWU(x3, gback, gdoffset+i*4);
+                        LWU(x4, wback, fixedaddress+i*4);
+                        if(rv64_zbb) MAXU(x4, x3, x4); else BLTU(x4, x3, 4+4);
+                        SW(x4, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0x40:
+                    INST_NAME("PMULLD Gx, Ex");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    for(int i=0; i<4; ++i) {
+                        LW(x3, gback, gdoffset+i*4);
+                        LW(x4, wback, fixedaddress+i*4);
+                        MUL(x3, x3, x4);
+                        SW(x3, gback, gdoffset+i*4);
+                    }
+                    break;
+                case 0xDB:
+                    INST_NAME("AESIMC Gx, Ex");  // AES-NI
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 0);
+                    SSE_LOOP_MV_Q(x3);
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd);
+                    CALL(native_aesimc, -1);
+                    break;
+                case 0xDC:
+                    INST_NAME("AESENC Gx, Ex");  // AES-NI
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd);
+                    CALL(native_aese, -1);
+                    GETGX();
+                    GETEX(x2, 0);
+                    SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
+                    break;
+                case 0xDD:
+                    INST_NAME("AESENCLAST Gx, Ex");  // AES-NI
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd);
+                    CALL(native_aeselast, -1);
+                    GETGX();
+                    GETEX(x2, 0);
+                    SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
+                    break;
+                case 0xDE:
+                    INST_NAME("AESDEC Gx, Ex");  // AES-NI
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd);
+                    CALL(native_aesd, -1);
+                    GETGX();
+                    GETEX(x2, 0);
+                    SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
+                    break;
+
+                case 0xDF:
+                    INST_NAME("AESDECLAST Gx, Ex");  // AES-NI
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd);
+                    CALL(native_aesdlast, -1);
+                    GETGX();
+                    GETEX(x2, 0);
+                    SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
+                    break;
                 default:
                     DEFAULT;
             }
@@ -346,19 +725,20 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 case 0x0B:
                     INST_NAME("ROUNDSD Gx, Ex, Ib");
                     nextop = F8;
-                    GETEXSD(d0, 0);
+                    GETEXSD(d0, 1);
                     GETGXSD_empty(v0);
                     d1 = fpu_get_scratch(dyn);
+                    v1 = fpu_get_scratch(dyn);
                     u8 = F8;
                     FEQD(x2, d0, d0);
                     BNEZ_MARK(x2);
-                    FADDD(v0, d0, d0);
+                    if (v0!=d0) FMVD(v0, d0);
                     B_NEXT_nocond;
                     MARK; // d0 is not nan
-                    FABSD(v0, d0);
+                    FABSD(v1, d0);
                     MOV64x(x3, 1ULL << __DBL_MANT_DIG__);
                     FCVTDL(d1, x3, RD_RTZ);
-                    FLTD(x3, v0, d1);
+                    FLTD(x3, v1, d1);
                     BNEZ_MARK2(x3);
                     if (v0!=d0) FMVD(v0, d0);
                     B_NEXT_nocond;
@@ -366,17 +746,258 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(u8&4) {
                         u8 = sse_setround(dyn, ninst, x4, x2);
                         FCVTLD(x5, d0, RD_DYN);
-                        FCVTDL(v0, x5, RD_DYN);
+                        FCVTDL(v0, x5, RD_RTZ);
                         x87_restoreround(dyn, ninst, u8);
                     } else {
                         FCVTLD(x5, d0, round_round[u8&3]);
-                        FCVTDL(v0, x5, round_round[u8&3]);
+                        FCVTDL(v0, x5, RD_RTZ);
                     }
                     break;
-                default:
+                case 0x09:
+                    INST_NAME("ROUNDPD Gx, Ex, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 1);
+                    u8 = F8;
+                    d0 = fpu_get_scratch(dyn);
+                    d1 = fpu_get_scratch(dyn);
+                    v1 = fpu_get_scratch(dyn);
+                    MOV64x(x3, 1ULL << __DBL_MANT_DIG__);
+                    FCVTDL(d1, x3, RD_RTZ);
+
+                    // i = 0
+                    FLD(d0, wback, fixedaddress);
+                    FEQD(x4, d0, d0);
+                    BNEZ(x4, 8);
+                    B_MARK_nocond;
+                    // d0 is not nan
+                    FABSD(v1, d0);
+                    FLTD(x4, v1, d1);
+                    BNEZ(x4, 8);
+                    B_MARK_nocond;
+                    if(u8&4) {
+                        u8 = sse_setround(dyn, ninst, x4, x5);
+                        FCVTLD(x5, d0, RD_DYN);
+                        FCVTDL(d0, x5, RD_RTZ);
+                        x87_restoreround(dyn, ninst, u8);
+                    } else {
+                        FCVTLD(x5, d0, round_round[u8&3]);
+                        FCVTDL(d0, x5, RD_RTZ);
+                    }
+                    MARK;
+                    FSD(d0, gback, gdoffset+0);
+
+                    // i = 1
+                    FLD(d0, wback, fixedaddress+8);
+                    FEQD(x4, d0, d0);
+                    BNEZ(x4, 8);
+                    B_MARK2_nocond;
+                    // d0 is not nan
+                    FABSD(v1, d0);
+                    FLTD(x4, v1, d1);
+                    BNEZ(x4, 8);
+                    B_MARK2_nocond;
+                    if(u8&4) {
+                        u8 = sse_setround(dyn, ninst, x4, x5);
+                        FCVTLD(x5, d0, RD_DYN);
+                        FCVTDL(d0, x5, RD_RTZ);
+                        x87_restoreround(dyn, ninst, u8);
+                    } else {
+                        FCVTLD(x5, d0, round_round[u8&3]);
+                        FCVTDL(d0, x5, RD_RTZ);
+                    }
+                    MARK2;
+                    FSD(d0, gback, gdoffset+8);
+                    break;
+                case 0x0E:
+                    INST_NAME("PBLENDW Gx, Ex, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 1);
+                    u8 = F8;
+                    i32 = 0;
+                    if (MODREG && gd==ed) break;
+                    while (u8)
+                        if(u8&1) {
+                            if(!(i32&1) && u8&2) {
+                                if(!(i32&3) && (u8&0xf)==0xf) {
+                                    // whole 64bits
+                                    LD(x3, wback, fixedaddress+8*(i32>>2));
+                                    SD(x3, gback, gdoffset+8*(i32>>2));
+                                    i32+=4;
+                                    u8>>=4;
+                                } else {
+                                    // 32bits
+                                    LWU(x3, wback, fixedaddress+4*(i32>>1));
+                                    SW(x3, gback, gdoffset+4*(i32>>1));
+                                    i32+=2;
+                                    u8>>=2;
+                                }
+                            } else {
+                                // 16 bits
+                                LHU(x3, wback, fixedaddress+2*i32);
+                                SH(x3, gback, gdoffset+2*i32);
+                                i32++;
+                                u8>>=1;
+                            }
+                        } else {
+                            // nope
+                            i32++;
+                            u8>>=1;
+                        }
+                    break;
+                case 0x0F:
+                    INST_NAME("PALIGNR Gx, Ex, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 1);
+                    u8 = F8;
+                    sse_forget_reg(dyn, ninst, x5);
+                    ADDI(x5, xEmu, offsetof(x64emu_t, scratch));
+                    // perserve gd
+                    LD(x3, gback, gdoffset+0);
+                    LD(x4, gback, gdoffset+8);
+                    SD(x3, x5, 0);
+                    SD(x4, x5, 8);
+                    if(u8>31) {
+                        SD(xZR, gback, gdoffset+0);
+                        SD(xZR, gback, gdoffset+8);
+                    } else {
+                        for (int i=0; i<16; ++i, ++u8) {
+                            if (u8>15) {
+                                if(u8>31) {
+                                    SB(xZR, gback, gdoffset+i);
+                                    continue;
+                                }
+                                else LBU(x3, x5, u8-16);
+                            } else {
+                                LBU(x3, wback, fixedaddress+u8);
+                            }
+                            SB(x3, gback, gdoffset+i);
+                        }
+                    }
+                    break;
+                case 0x16:
+                    if(rex.w) {INST_NAME("PEXTRQ Ed, Gx, Ib");} else {INST_NAME("PEXTRD Ed, Gx, Ib");}
+                    nextop = F8;
+                    GETGX();
+                    GETED(1);
+                    u8 = F8;
+                    if(rex.w)
+                        LD(ed, gback, gdoffset+8*(u8&1));
+                    else
+                        LWU(ed, gback, gdoffset+4*(u8&3));
+                    if (wback) {
+                        SDxw(ed, wback, fixedaddress);
+                        SMWRITE2();
+                    }
+                    break;
+                case 0x20:
+                    INST_NAME("PINSRB Gx, ED, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETED(1);
+                    u8 = F8;
+                    SB(ed, gback, gdoffset+u8&0xF);
+                    break;
+                case 0x21:
+                    INST_NAME("INSERTPS GX, EX, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETEX(x2, 1);
+                    u8 = F8;
+                    if(MODREG) s8 = (u8>>6)&3; else s8 = 0;
+                    // GX->ud[(tmp8u>>4)&3] = EX->ud[tmp8s];
+                    LWU(x3, wback, fixedaddress+4*s8);
+                    SW(x3, gback, gdoffset+4*(u8>>4));
+                    for(int i=0; i<4; ++i) {
+                        if(u8&(1<<i))
+                            // GX->ud[i] = 0;
+                            SW(xZR, gback, gdoffset+4*i);
+                    }
+                    break;
+                case 0x22:
+                    INST_NAME("PINSRD Gx, ED, Ib");
+                    nextop = F8;
+                    GETGX();
+                    GETED(1);
+                    u8 = F8;
+                    if(rex.w) {
+                        SD(ed, gback, gdoffset+8*(u8&0x1));
+                    } else {
+                        SW(ed, gback, gdoffset+4*(u8&0x3));
+                    }
+                    break;
+                case 0x44:
+                    INST_NAME("PCLMULQDQ Gx, Ex, Ib");
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd); // gx
+                    if(MODREG) {
+                        ed = (nextop&7)+(rex.b<<3);
+                        sse_forget_reg(dyn, ninst, ed);
+                        MOV32w(x2, ed);
+                        MOV32w(x3, 0);  // p = NULL
+                    } else {
+                        MOV32w(x2, 0);
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x3, x5, &fixedaddress, rex, NULL, 0, 1);
+                        if(ed!=x3) {
+                            MV(x3, ed);
+                        }
+                    }
+                    u8 = F8;
+                    MOV32w(x4, u8);
+                    CALL(native_pclmul, -1);
+                    break;
+                case 0xDF:
+                    INST_NAME("AESKEYGENASSIST Gx, Ex, Ib");  // AES-NI
+                    nextop = F8;
+                    GETG;
+                    sse_forget_reg(dyn, ninst, gd);
+                    MOV32w(x1, gd); // gx
+                    if(MODREG) {
+                        ed = (nextop&7)+(rex.b<<3);
+                        sse_forget_reg(dyn, ninst, ed);
+                        MOV32w(x2, ed);
+                        MOV32w(x3, 0);  //p = NULL
+                    } else {
+                        MOV32w(x2, 0);
+                        addr = geted(dyn, addr, ninst, nextop, &ed, x3, x2, &fixedaddress, rex, NULL, 0, 1);
+                        if(ed!=x3) {
+                            MV(x3, ed);
+                        }
+                    }
+                    u8 = F8;
+                    MOV32w(x4, u8);
+                    CALL(native_aeskeygenassist, -1);
+                    break;
+            default:
                     DEFAULT;
             }
             break;
+        #define GO(GETFLAGS, NO, YES, F)            \
+            READFLAGS(F);                           \
+            GETFLAGS;                               \
+            nextop=F8;                              \
+            GETGD;                                  \
+            if(MODREG) {                            \
+                ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                ZEXTH(x4, ed);                      \
+                ed = x4;                            \
+            } else {                                \
+                SMREAD();                           \
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x4, &fixedaddress, rex, NULL, 1, 0); \
+                LHU(x4, ed, fixedaddress);          \
+                ed = x4;                            \
+            }                                       \
+            B##NO(x1, 4+3*4);                       \
+            LUI(x3, 0xffff0);                       \
+            AND(gd, gd, x3);                        \
+            OR(gd, gd, ed);
+
+        GOCOND(0x40, "CMOV", "Gw, Ew");
+        #undef GO
         case 0x50:
             INST_NAME("PMOVMSKD Gd, Ex");
             nextop = F8;
@@ -390,11 +1011,11 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 if (i) SLLI(x2, x2, 1);
                 OR(gd, gd, x2);
             }
-            break;   
+            break;
         case 0x51:
             INST_NAME("SQRTPD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             if(!box64_dynarec_fastnan) {
@@ -411,42 +1032,42 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     BEQ(x3, xZR, 8);
                     FNEGD(d0, d0);
                 }
-                FSD(d0, gback, i*8);
+                FSD(d0, gback, gdoffset+i*8);
             }
             break;
         case 0x54:
             INST_NAME("ANDPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_Q(x3, x4, AND(x3, x3, x4));
             break;
         case 0x55:
             INST_NAME("ANDNPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_Q(x3, x4, NOT(x3, x3); AND(x3, x3, x4));
             break;
         case 0x56:
             INST_NAME("ORPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_Q(x3, x4, OR(x3, x3, x4));
             break;
         case 0x57:
             INST_NAME("XORPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
             break;
         case 0x58:
             INST_NAME("ADDPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_FQ(x3, x4, {
                 if(!box64_dynarec_fastnan) {
                     FEQD(x3, v0, v0);
@@ -466,7 +1087,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("MULPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_FQ(x3, x4, {
                 if(!box64_dynarec_fastnan) {
                     FEQD(x3, v0, v0);
@@ -485,24 +1106,24 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x5A:
             INST_NAME("CVTPD2PS Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             // GX->f[0] = EX->d[0];
             FLD(d0, wback, fixedaddress+0);
             FCVTSD(d0, d0);
-            FSD(d0, gback, 0);
+            FSD(d0, gback, gdoffset+0);
             // GX->f[1] = EX->d[1];
             FLD(d0, wback, fixedaddress+8);
             FCVTSD(d0, d0);
-            FSD(d0, gback, 4);
+            FSD(d0, gback, gdoffset+4);
             // GX->q[1] = 0;
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+8);
             break;
         case 0x5B:
             INST_NAME("CVTPS2DQ Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             u8 = sse_setround(dyn, ninst, x6, x4);
@@ -513,7 +1134,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 SUB(x5, x5, x3);
                 BEQZ(x5, 8);
                 LUI(x3, 0x80000); // INT32_MIN
-                SW(x3, gback, 4*i);
+                SW(x3, gback, gdoffset+4*i);
             }
             x87_restoreround(dyn, ninst, u8);
             break;
@@ -521,7 +1142,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("SUBPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_FQ(x3, x4, {
                 if(!box64_dynarec_fastnan) {
                     FEQD(x3, v0, v0);
@@ -540,12 +1161,12 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x5D:
             INST_NAME("MINPD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             d1 = fpu_get_scratch(dyn);
             for (int i=0; i<2; ++i) {
-                FLD(d0, gback, 8*i);
+                FLD(d0, gback, gdoffset+8*i);
                 FLD(d1, wback, fixedaddress+8*i);
                 FEQD(x3, d0, d0);
                 FEQD(x4, d1, d1);
@@ -553,14 +1174,14 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 BEQ(x3, xZR, 12);
                 FLTD(x3, d1, d0);
                 BEQ(x3, xZR, 8); // continue
-                FSD(d1, gback, 8*i);
+                FSD(d1, gback, gdoffset+8*i);
             }
             break;
         case 0x5E:
             INST_NAME("DIVPD Gx, Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_FQ(x3, x4, {
                 if(!box64_dynarec_fastnan) {
                     FEQD(x3, v0, v0);
@@ -579,12 +1200,12 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x5F:
             INST_NAME("MAXPD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             d1 = fpu_get_scratch(dyn);
             for (int i=0; i<2; ++i) {
-                FLD(d0, gback, 8*i);
+                FLD(d0, gback, gdoffset+8*i);
                 FLD(d1, wback, fixedaddress+8*i);
                 FEQD(x3, d0, d0);
                 FEQD(x4, d1, d1);
@@ -592,54 +1213,54 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 BEQ(x3, xZR, 12);
                 FLTD(x3, d0, d1);
                 BEQ(x3, xZR, 8); // continue
-                FSD(d1, gback, 8*i);
+                FSD(d1, gback, gdoffset+8*i);
             }
             break;
         case 0x60:
             INST_NAME("PUNPCKLBW Gx,Ex");
             nextop = F8;
-            GETGX(x2);
+            GETGX();
             for(int i=7; i>0; --i) { // 0 is untouched
                 // GX->ub[2 * i] = GX->ub[i];
-                LBU(x3, gback, i);
-                SB(x3, gback, 2*i);
+                LBU(x3, gback, gdoffset+i);
+                SB(x3, gback, gdoffset+2*i);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 for(int i=0; i<8; ++i) {
                     // GX->ub[2 * i + 1] = GX->ub[2 * i];
-                    LBU(x3, gback, 2*i);
-                    SB(x3, gback, 2*i+1);
+                    LBU(x3, gback, gdoffset+2*i);
+                    SB(x3, gback, gdoffset+2*i+1);
                 }
             } else {
                 GETEX(x1, 0);
                 for(int i=0; i<8; ++i) {
                     // GX->ub[2 * i + 1] = EX->ub[i];
                     LBU(x3, wback, fixedaddress+i);
-                    SB(x3, gback, 2*i+1);
+                    SB(x3, gback, gdoffset+2*i+1);
                 }
             }
             break;
         case 0x61:
             INST_NAME("PUNPCKLWD Gx,Ex");
             nextop = F8;
-            GETGX(x2);
+            GETGX();
             for(int i=3; i>0; --i) {
                 // GX->uw[2 * i] = GX->uw[i];
-                LHU(x3, gback, i*2);
-                SH(x3, gback, 2*i*2);
+                LHU(x3, gback, gdoffset+i*2);
+                SH(x3, gback, gdoffset+2*i*2);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 for(int i=0; i<4; ++i) {
                     // GX->uw[2 * i + 1] = GX->uw[2 * i];
-                    LHU(x3, gback, 2*i*2);
-                    SH(x3, gback, (2*i+1)*2);
+                    LHU(x3, gback, gdoffset+2*i*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
                 }
             } else {
                 GETEX(x1, 0);
                 for(int i=0; i<4; ++i) {
                     // GX->uw[2 * i + 1] = EX->uw[i];
                     LHU(x3, wback, fixedaddress+i*2);
-                    SH(x3, gback, (2*i+1)*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
                 }
             }
             break;
@@ -647,71 +1268,108 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("PUNPCKLDQ Gx,Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             // GX->ud[3] = EX->ud[1];
-            LWU(x3, x1, fixedaddress+1*4);
-            SW(x3, x2, 3*4);
+            LWU(x3, wback, fixedaddress+1*4);
+            SW(x3, gback, gdoffset+3*4);
             // GX->ud[2] = GX->ud[1];
-            LWU(x3, x2, 1*4);
-            SW(x3, x2, 2*4);
+            LWU(x3, gback, gdoffset+1*4);
+            SW(x3, gback, gdoffset+2*4);
             // GX->ud[1] = EX->ud[0];
-            LWU(x3, x1, fixedaddress+0*4);
-            SW(x3, x2, 1*4);
+            LWU(x3, wback, fixedaddress+0*4);
+            SW(x3, gback, gdoffset+1*4);
+            break;
+        case 0x63:
+            INST_NAME("PACKSSWB Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            MOV64x(x5, 127);
+            MOV64x(x6, -128);
+            for(int i=0; i<8; ++i) {
+                LH(x3, gback, gdoffset+i*2);
+                if(rv64_zbb) {
+                    MIN(x3, x3, x5);
+                    MAX(x3, x3, x6);
+                } else {
+                    BLT(x3, x5, 4+4);
+                    MV(x3, x5);
+                    BGE(x3, x6, 4+4);
+                    MV(x3, x6);
+                }
+                SB(x3, gback, gdoffset+i);
+            }
+            if(MODREG && gd==ed) {
+                LD(x3, gback, gdoffset+0);
+                SD(x3, gback, gdoffset+8);
+            } else for(int i=0; i<8; ++i) {
+                LH(x3, wback, fixedaddress+i*2);
+                if(rv64_zbb) {
+                    MIN(x3, x3, x5);
+                    MAX(x3, x3, x6);
+                } else {
+                    BLT(x3, x5, 4+4);
+                    MV(x3, x5);
+                    BGE(x3, x6, 4+4);
+                    MV(x3, x6);
+                }
+                SB(x3, gback, gdoffset+8+i);
+            }
             break;
         case 0x64:
             INST_NAME("PCMPGTB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
                 // GX->ub[i] = (GX->sb[i]>EX->sb[i])?0xFF:0x00;
                 LB(x3, wback, fixedaddress+i);
-                LB(x4, gback, i);
+                LB(x4, gback, gdoffset+i);
                 SLT(x3, x3, x4);
                 NEG(x3, x3);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0x65:
             INST_NAME("PCMPGTW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
                 // GX->uw[i] = (GX->sw[i]>EX->sw[i])?0xFFFF:0x0000;
                 LH(x3, wback, fixedaddress+i*2);
-                LH(x4, gback, i*2);
+                LH(x4, gback, gdoffset+i*2);
                 SLT(x3, x3, x4);
                 NEG(x3, x3);
-                SH(x3, gback, i*2);
+                SH(x3, gback, gdoffset+i*2);
             }
             break;
         case 0x66:
             INST_NAME("PCMPGTD Gx,Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             SSE_LOOP_DS(x3, x4, SLT(x4, x4, x3); SLLI(x3, x4, 63); SRAI(x3, x3, 63));
             break;
         case 0x67:
             INST_NAME("PACKUSWB Gx, Ex");
             nextop = F8;
-            GETGX(x2);
+            GETGX();
             ADDI(x5, xZR, 0xFF);
             for(int i=0; i<8; ++i) {
                 // GX->ub[i] = (GX->sw[i]<0)?0:((GX->sw[i]>0xff)?0xff:GX->sw[i]);
-                LH(x3, gback, i*2);
+                LH(x3, gback, gdoffset+i*2);
                 BGE(x5, x3, 8);
                 ADDI(x3, xZR, 0xFF);
                 NOT(x4, x3);
                 SRAI(x4, x4, 63);
                 AND(x3, x3, x4);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 // GX->q[1] = GX->q[0];
-                LD(x3, gback, 0*8);
-                SD(x3, gback, 1*8);
+                LD(x3, gback, gdoffset+0*8);
+                SD(x3, gback, gdoffset+1*8);
             } else {
                 GETEX(x1, 0);
                 for(int i=0; i<8; ++i) {
@@ -722,55 +1380,55 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     NOT(x4, x3);
                     SRAI(x4, x4, 63);
                     AND(x3, x3, x4);
-                    SB(x3, gback, 8+i);
+                    SB(x3, gback, gdoffset+8+i);
                 }
             }
             break;
         case 0x68:
             INST_NAME("PUNPCKHBW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             for(int i=0; i<8; ++i) {
                 // GX->ub[2 * i] = GX->ub[i + 8];
-                LBU(x3, gback, i+8);
-                SB(x3, gback, 2*i);
+                LBU(x3, gback, gdoffset+i+8);
+                SB(x3, gback, gdoffset+2*i);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 for(int i=0; i<8; ++i) {
                     // GX->ub[2 * i + 1] = GX->ub[2 * i];
-                    LBU(x3, gback, 2*i);
-                    SB(x3, gback, 2*i+1);
+                    LBU(x3, gback, gdoffset+2*i);
+                    SB(x3, gback, gdoffset+2*i+1);
                 }
             } else {
                 GETEX(x2, 0);
                 for(int i=0; i<8; ++i) {
                     // GX->ub[2 * i + 1] = EX->ub[i + 8];
                     LBU(x3, wback, fixedaddress+i+8);
-                    SB(x3, gback, 2*i+1);
+                    SB(x3, gback, gdoffset+2*i+1);
                 }
             }
             break;
         case 0x69:
             INST_NAME("PUNPCKHWD Gx,Ex");
             nextop = F8;
-            GETGX(x2);
+            GETGX();
             for(int i=0; i<4; ++i) {
                 // GX->uw[2 * i] = GX->uw[i + 4];
-                LHU(x3, gback, (i+4)*2);
-                SH(x3, gback, 2*i*2);
+                LHU(x3, gback, gdoffset+(i+4)*2);
+                SH(x3, gback, gdoffset+2*i*2);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 for(int i=0; i<4; ++i) {
                     // GX->uw[2 * i + 1] = GX->uw[2 * i];
-                    LHU(x3, gback, 2*i*2);
-                    SH(x3, gback, (2*i+1)*2);
+                    LHU(x3, gback, gdoffset+2*i*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
                 }
             } else {
                 GETEX(x1, 0);
                 for(int i=0; i<4; ++i) {
                     // GX->uw[2 * i + 1] = EX->uw[i + 4];
                     LHU(x3, wback, fixedaddress+(i+4)*2);
-                    SH(x3, gback, (2*i+1)*2);
+                    SH(x3, gback, gdoffset+(2*i+1)*2);
                 }
             }
             break;
@@ -778,41 +1436,41 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             INST_NAME("PUNPCKHDQ Gx,Ex");
             nextop = F8;
             GETEX(x1, 0);
-            GETGX(x2);
+            GETGX();
             // GX->ud[0] = GX->ud[2];
-            LWU(x3, gback, 2*4);
-            SW(x3, gback, 0*4);
+            LWU(x3, gback, gdoffset+2*4);
+            SW(x3, gback, gdoffset+0*4);
             // GX->ud[1] = EX->ud[2];
             LWU(x3, wback, fixedaddress+2*4);
-            SW(x3, gback, 1*4);
+            SW(x3, gback, gdoffset+1*4);
             // GX->ud[2] = GX->ud[3];
-            LWU(x3, gback, 3*4);
-            SW(x3, gback, 2*4);
+            LWU(x3, gback, gdoffset+3*4);
+            SW(x3, gback, gdoffset+2*4);
             // GX->ud[3] = EX->ud[3];
             if (!(MODREG && (gd==ed))) {
                 LWU(x3, wback, fixedaddress+3*4);
-                SW(x3, gback, 3*4);
+                SW(x3, gback, gdoffset+3*4);
             }
             break;
         case 0x6B:
             INST_NAME("PACKSSDW Gx,Ex");
             nextop = F8;
-            GETGX(x2);
+            GETGX();
             MOV64x(x5, 32768);
             NEG(x6, x5);
             for(int i=0; i<4; ++i) {
                 // GX->sw[i] = (GX->sd[i]<-32768)?-32768:((GX->sd[i]>32767)?32767:GX->sd[i]);
-                LW(x3, gback, i*4);
+                LW(x3, gback, gdoffset+i*4);
                 BGE(x5, x3, 8);
                 ADDI(x3, x5, -1);
                 BGE(x3, x6, 8);
                 MV(x3, x6);
-                SH(x3, gback, i*2);
+                SH(x3, gback, gdoffset+i*2);
             }
             if (MODREG && gd==(nextop&7)+(rex.b<<3)) {
                 // GX->q[1] = GX->q[0];
-                LD(x3, gback, 0*8);
-                SD(x3, gback, 1*8);
+                LD(x3, gback, gdoffset+0*8);
+                SD(x3, gback, gdoffset+1*8);
             } else {
                 GETEX(x1, 0);
                 for(int i=0; i<4; ++i) {
@@ -822,32 +1480,32 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     ADDI(x3, x5, -1);
                     BGE(x3, x6, 8);
                     MV(x3, x6);
-                    SH(x3, gback, (4+i)*2);
+                    SH(x3, gback, gdoffset+(4+i)*2);
                 }
             }
             break;
         case 0x6C:
             INST_NAME("PUNPCKLQDQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             if(MODREG) {
                 v1 = sse_get_reg(dyn, ninst, x2, (nextop&7)+(rex.b<<3), 0);
-                FSD(v1, gback, 8);
+                FSD(v1, gback, gdoffset+8);
             } else {
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 0, 0);
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 1, 0);
                 LD(x3, ed, fixedaddress+0);
-                SD(x3, gback, 8);
+                SD(x3, gback, gdoffset+8);
             }
             break;
         case 0x6D:
             INST_NAME("PUNPCKHQDQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
-            LD(x3, gback, 8);
-            SD(x3, gback, 0);
+            LD(x3, gback, gdoffset+8);
+            SD(x3, gback, gdoffset+0);
             LD(x3, wback, fixedaddress+8);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+8);
             break;
         case 0x6E:
             INST_NAME("MOVD Gx, Ed");
@@ -869,14 +1527,14 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x6F:
             INST_NAME("MOVDQA Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q(x3);
             break;
         case 0x70: // TODO: Optimize this!
             INST_NAME("PSHUFD Gx,Ex,Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             int32_t idx;
@@ -890,10 +1548,10 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             idx = (u8>>(3*2))&3;
             LWU(x6, wback, fixedaddress+idx*4);
 
-            SW(x3, gback, 0*4);
-            SW(x4, gback, 1*4);
-            SW(x5, gback, 2*4);
-            SW(x6, gback, 3*4);
+            SW(x3, gback, gdoffset+0*4);
+            SW(x4, gback, gdoffset+1*4);
+            SW(x5, gback, gdoffset+2*4);
+            SW(x6, gback, gdoffset+3*4);
             break;
         case 0x71:
             nextop = F8;
@@ -904,8 +1562,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     u8 = F8;
                     if (u8>15) {
                         // just zero dest
-                        SD(xZR, x1, fixedaddress+0);
-                        SD(xZR, x1, fixedaddress+8);
+                        SD(xZR, wback, fixedaddress+0);
+                        SD(xZR, wback, fixedaddress+8);
                     } else if(u8) {
                         for (int i=0; i<8; ++i) {
                             // EX->uw[i] >>= u8;
@@ -935,8 +1593,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     u8 = F8;
                     if (u8>15) {
                         // just zero dest
-                        SD(xZR, x1, fixedaddress+0);
-                        SD(xZR, x1, fixedaddress+8);
+                        SD(xZR, wback, fixedaddress+0);
+                        SD(xZR, wback, fixedaddress+8);
                     } else if(u8) {
                         for (int i=0; i<8; ++i) {
                             // EX->uw[i] <<= u8;
@@ -961,8 +1619,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(u8) {
                         if (u8>31) {
                             // just zero dest
-                            SD(xZR, x1, fixedaddress+0);
-                            SD(xZR, x1, fixedaddress+8);
+                            SD(xZR, wback, fixedaddress+0);
+                            SD(xZR, wback, fixedaddress+8);
                         } else if(u8) {
                             SSE_LOOP_D_S(x3, SRLI(x3, x3, u8));
                         }
@@ -984,8 +1642,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(u8) {
                         if (u8>31) {
                             // just zero dest
-                            SD(xZR, x1, fixedaddress+0);
-                            SD(xZR, x1, fixedaddress+8);
+                            SD(xZR, wback, fixedaddress+0);
+                            SD(xZR, wback, fixedaddress+8);
                         } else if(u8) {
                             SSE_LOOP_D_S(x3, SLLI(x3, x3, u8));
                         }
@@ -1023,24 +1681,24 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(!u8) break;
                     if(u8>15) {
                         // just zero dest
-                        SD(xZR, x1, fixedaddress+0);
-                        SD(xZR, x1, fixedaddress+8);
+                        SD(xZR, wback, fixedaddress+0);
+                        SD(xZR, wback, fixedaddress+8);
                     } else {
                         u8*=8;
                         if (u8 < 64) {
-                            LD(x3, x1, fixedaddress+0);
-                            LD(x4, x1, fixedaddress+8);
+                            LD(x3, wback, fixedaddress+0);
+                            LD(x4, wback, fixedaddress+8);
                             SRLI(x3, x3, u8);
                             SLLI(x5, x4, 64-u8);
                             OR(x3, x3, x5);
-                            SD(x3, x1, fixedaddress+0);
+                            SD(x3, wback, fixedaddress+0);
                             SRLI(x4, x4, u8);
-                            SD(x4, x1, fixedaddress+8);
+                            SD(x4, wback, fixedaddress+8);
                         } else {
-                            LD(x3, x1, fixedaddress+8);
+                            LD(x3, wback, fixedaddress+8);
                             if (u8-64 > 0) { SRLI(x3, x3, u8-64); }
-                            SD(x3, x1, fixedaddress+0);
-                            SD(xZR, x1, fixedaddress+8);
+                            SD(x3, wback, fixedaddress+0);
+                            SD(xZR, wback, fixedaddress+8);
                         }
                     }
                     break;
@@ -1051,8 +1709,8 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(!u8) break;
                     if(u8>63) {
                         // just zero dest
-                        SD(xZR, x1, fixedaddress+0);
-                        SD(xZR, x1, fixedaddress+8);
+                        SD(xZR, wback, fixedaddress+0);
+                        SD(xZR, wback, fixedaddress+8);
                     } else {
                         LD(x3, wback, fixedaddress+0);
                         LD(x4, wback, fixedaddress+8);
@@ -1069,24 +1727,24 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     if(!u8) break;
                     if(u8>15) {
                         // just zero dest
-                        SD(xZR, x1, fixedaddress+0);
-                        SD(xZR, x1, fixedaddress+8);
+                        SD(xZR, wback, fixedaddress+0);
+                        SD(xZR, wback, fixedaddress+8);
                     } else {
                         u8*=8;
                         if (u8 < 64) {
-                            LD(x3, x1, fixedaddress+0);
-                            LD(x4, x1, fixedaddress+8);
+                            LD(x3, wback, fixedaddress+0);
+                            LD(x4, wback, fixedaddress+8);
                             SLLI(x4, x4, u8);
                             SRLI(x5, x3, 64-u8);
                             OR(x4, x4, x5);
-                            SD(x4, x1, fixedaddress+8);
+                            SD(x4, wback, fixedaddress+8);
                             SLLI(x3, x3, u8);
-                            SD(x3, x1, fixedaddress+0);
+                            SD(x3, wback, fixedaddress+0);
                         } else {
-                            LD(x3, x1, fixedaddress+0);
+                            LD(x3, wback, fixedaddress+0);
                             if (u8-64 > 0) { SLLI(x3, x3, u8-64); }
-                            SD(x3, x1, fixedaddress+8);
-                            SD(xZR, x1, fixedaddress+0);
+                            SD(x3, wback, fixedaddress+8);
+                            SD(xZR, wback, fixedaddress+0);
                         }
                     }
                     break;
@@ -1097,52 +1755,94 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x74:
             INST_NAME("PCMPEQB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 SUB(x3, x3, x4);
                 SEQZ(x3, x3);
                 NEG(x3, x3);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0x75:
             INST_NAME("PCMPEQW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_W(x3, x4, SUB(x3, x3, x4); SEQZ(x3, x3); NEG(x3, x3));
             break;
         case 0x76:
             INST_NAME("PCMPEQD Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_D(x3, x4, XOR(x3, x3, x4); SNEZ(x3, x3); ADDI(x3, x3, -1));
             break;
+        case 0x7C:
+            INST_NAME("HADDPD Gx, Ex");
+            nextop = F8;
+            GETGX();
+            d0 = fpu_get_scratch(dyn);
+            d1 = fpu_get_scratch(dyn);
+            FLD(d0, gback, gdoffset+0);
+            FLD(d1, gback, gdoffset+8);
+            if(!box64_dynarec_fastnan) {
+                FEQD(x3, d0, d0);
+                FEQD(x4, d1, d1);
+                AND(x3, x3, x4);
+            }
+            FADDD(d0, d0, d1);
+            if(!box64_dynarec_fastnan) {
+                FEQD(x4, d0, d0);
+                BEQZ(x3, 12);
+                BNEZ(x4, 8);
+                FNEGD(d0, d0);
+            }
+            FSD(d0, gback, gdoffset+0);
+            if(MODREG && gd==(nextop&7)+(rex.b<<3)) {
+                FSD(d0, gback, gdoffset+8);
+            } else {
+                GETEX(x2, 0);
+                FLD(d0, wback, fixedaddress+0);
+                FLD(d1, wback, fixedaddress+8);
+                if(!box64_dynarec_fastnan) {
+                    FEQD(x3, d0, d0);
+                    FEQD(x4, d1, d1);
+                    AND(x3, x3, x4);
+                }
+                FADDD(d0, d0, d1);
+                if(!box64_dynarec_fastnan) {
+                    FEQD(x4, d0, d0);
+                    BEQZ(x3, 12);
+                    BNEZ(x4, 8);
+                    FNEGD(d0, d0);
+                }
+                FSD(d0, gback, gdoffset+8);
+            }
+            break;
         case 0x7E:
             INST_NAME("MOVD Ed,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             if(rex.w) {
                 if(MODREG) {
                     ed = xRAX + (nextop&7) + (rex.b<<3);
-                    LD(ed, x1, 0);
+                    LD(ed, gback, gdoffset+0);
                 } else {
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 0, 0);
-                    LD(x3, x1, 0);
+                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+                    LD(x3, gback, gdoffset+0);
                     SD(x3, ed, fixedaddress);
                     SMWRITE2();
                 }
             } else {
                 if(MODREG) {
                     ed = xRAX + (nextop&7) + (rex.b<<3);
-                    LWU(ed, x1, 0);
+                    LWU(ed, gback, gdoffset+0);
                 } else {
-                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 0, 0);
-                    LWU(x3, x1, 0);
+                    addr = geted(dyn, addr, ninst, nextop, &ed, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+                    LWU(x3, gback, gdoffset+0);
                     SW(x3, ed, fixedaddress);
                     SMWRITE2();
                 }
@@ -1151,7 +1851,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x7F:
             INST_NAME("MOVDQA Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q2(x3);
             if(!MODREG) SMWRITE2();
@@ -1165,8 +1865,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETSGW(x2);
             MULW(x2, x2, x1);
             UFLAG_RES(x2);
-            SLLI(x2, x2, 48);
-            SRLI(x2, x2, 48);
+            ZEXTH(x2, x2);
             GWBACK;
             break;
 
@@ -1188,7 +1887,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 SRAI(x1, x1, 56);
             } else {
                 SMREAD();
-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x4, &fixedaddress, rex, NULL, 0, 0);
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x4, &fixedaddress, rex, NULL, 1, 0);
                 LB(x1, ed, fixedaddress);
             }
             LUI(x5, 0xffff0);
@@ -1200,13 +1899,13 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xC2:
             INST_NAME("CMPPD Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             d0 = fpu_get_scratch(dyn);
             d1 = fpu_get_scratch(dyn);
             for(int i=0; i<2; ++i) {
-                FLD(d0, gback, 8*i);
+                FLD(d0, gback, gdoffset+8*i);
                 FLD(d1, wback, fixedaddress+8*i);
                 if ((u8&7) == 0) {                                      // Equal
                     FEQD(x3, d0, d1);
@@ -1237,7 +1936,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     }
                     case 7: break;                                      // Not NaN
                     }
-                    
+
                     // MARK2;
                     if ((u8&7) == 5 || (u8&7) == 6) {
                         MOV32w(x3, 1);
@@ -1245,16 +1944,16 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     // MARK;
                 }
                 NEG(x3, x3);
-                SD(x3, gback, 8*i);
+                SD(x3, gback, gdoffset+8*i);
             }
             break;
         case 0xC4:
             INST_NAME("PINSRW Gx,Ed,Ib");
             nextop = F8;
             GETED(1);
-            GETGX(x3);
+            GETGX();
             u8 = (F8)&7;
-            SH(ed, gback, u8*2);
+            SH(ed, gback, gdoffset+u8*2);
             break;
         case 0xC5:
             INST_NAME("PEXTRW Gd,Ex,Ib");
@@ -1267,90 +1966,90 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xC6:
             INST_NAME("SHUFPD Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
+            GETEX(x2, 1);
             u8 = F8;
             if (MODREG && gd==(nextop&7)+(rex.b<<3) && u8==0) {
-                LD(x3, gback, 0);
-                SD(x3, gback, 8);
+                LD(x3, gback, gdoffset+0);
+                SD(x3, gback, gdoffset+8);
                 break;
             }
-            GETEX(x2, 1)
-            LD(x3, gback, 8*(u8&1));
+            LD(x3, gback, gdoffset+8*(u8&1));
             LD(x4, wback, fixedaddress+8*((u8>>1)&1));
-            SD(x3, gback, 0);
-            SD(x4, gback, 8);
+            SD(x3, gback, gdoffset+0);
+            SD(x4, gback, gdoffset+8);
             break;
         case 0xD1:
             INST_NAME("PSRLW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x3, wback, fixedaddress);
             ADDI(x4, xZR, 16);
             BLTU_MARK(x3, x4);
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<8; ++i) {
-                LHU(x5, gback, 2*i);
+                LHU(x5, gback, gdoffset+2*i);
                 SRLW(x5, x5, x3);
-                SH(x5, gback, 2*i);
+                SH(x5, gback, gdoffset+2*i);
             }
             break;
         case 0xD2:
             INST_NAME("PSRLD Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x3, wback, fixedaddress);
             ADDI(x4, xZR, 32);
             BLTU_MARK(x3, x4);
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<4; ++i) {
-                LWU(x5, gback, 4*i);
+                LWU(x5, gback, gdoffset+4*i);
                 SRLW(x5, x5, x3);
-                SW(x5, gback, 4*i);
+                SW(x5, gback, gdoffset+4*i);
             }
             break;
         case 0xD3:
             INST_NAME("PSRLQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x3, wback, fixedaddress);
             ADDI(x4, xZR, 64);
             BLTU_MARK(x3, x4);
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<2; ++i) {
-                LD(x5, gback, 8*i);
+                LD(x5, gback, gdoffset+8*i);
                 SRL(x5, x5, x3);
-                SD(x5, gback, 8*i);
+                SD(x5, gback, gdoffset+8*i);
             }
             break;
         case 0xD4:
             INST_NAME("PADDQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, ADD(x3, x3, x4));
             break;
         case 0xD5:
             INST_NAME("PMULLW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
-                LH(x3, gback, 2*i);
+                LH(x3, gback, gdoffset+2*i);
                 LH(x4, wback, fixedaddress+2*i);
                 MULW(x3, x3, x4);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xD6:
@@ -1381,314 +2080,347 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xD8:
             INST_NAME("PSUBUSB Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 SUB(x3, x3, x4);
                 NOT(x4, x3);
                 SRAI(x4, x4, 63);
                 AND(x3, x3, x4);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xD9:
             INST_NAME("PSUBUSW Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_W(x3, x4, SUB(x3, x3, x4); NOT(x4, x3); SRAI(x4, x4, 63); AND(x3, x3, x4));
             break;
         case 0xDA:
             INST_NAME("PMINUB Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 BLTU(x3, x4, 8);
                 MV(x3, x4);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xDB:
             INST_NAME("PAND Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, AND(x3, x3, x4));
             break;
         case 0xDC:
             INST_NAME("PADDUSB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x5, xZR, 0xFF);
             for(int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 ADD(x3, x3, x4);
                 BLT(x3, x5, 8);
                 ADDI(x3, xZR, 0xFF);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xDD:
             INST_NAME("PADDUSW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
                 // tmp32s = (int32_t)GX->uw[i] + EX->uw[i];
                 // GX->uw[i] = (tmp32s>65535)?65535:tmp32s;
-                LHU(x3, gback, i*2);
+                LHU(x3, gback, gdoffset+i*2);
                 LHU(x4, wback, fixedaddress+i*2);
                 ADDW(x3, x3, x4);
                 MOV32w(x4, 65536);
                 BLT(x3, x4, 8);
                 ADDIW(x3, x4, -1);
-                SH(x3, gback, i*2);
+                SH(x3, gback, gdoffset+i*2);
             }
             break;
         case 0xDE:
             INST_NAME("PMAXUB Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 BLTU(x4, x3, 8);
                 MV(x3, x4);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xDF:
             INST_NAME("PANDN Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, NOT(x3, x3); AND(x3, x3, x4));
             break;
          case 0xE0:
             INST_NAME("PAVGB Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 ADDW(x3, x3, x4);
                 ADDIW(x3, x3, 1);
                 SRAIW(x3, x3, 1);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xE1:
             INST_NAME("PSRAW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x4, xZR, 16);
             LD(x3, wback, fixedaddress);
             BLTU(x3, x4, 8);
             SUBI(x3, x4, 1);
             for (int i=0; i<8; ++i) {
-                LH(x4, gback, 2*i);
+                LH(x4, gback, gdoffset+2*i);
                 SRAW(x4, x4, x3);
-                SH(x4, gback, 2*i);
+                SH(x4, gback, gdoffset+2*i);
             }
             break;
         case 0xE2:
             INST_NAME("PSRAD Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x4, xZR, 32);
             LD(x3, wback, fixedaddress);
             BLTU(x3, x4, 8);
             SUBI(x3, x4, 1);
             for (int i=0; i<4; ++i) {
-                LW(x4, gback, 4*i);
+                LW(x4, gback, gdoffset+4*i);
                 SRAW(x4, x4, x3);
-                SW(x4, gback, 4*i);
+                SW(x4, gback, gdoffset+4*i);
             }
             break;
         case 0xE3:
             INST_NAME("PAVGW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<8; ++i) {
-                LHU(x3, gback, 2*i);
+                LHU(x3, gback, gdoffset+2*i);
                 LHU(x4, wback, fixedaddress+2*i);
                 ADDW(x3, x3, x4);
                 ADDIW(x3, x3, 1);
                 SRAIW(x3, x3, 1);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xE4:
             INST_NAME("PMULHUW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
-                LHU(x3, gback, 2*i);
+                LHU(x3, gback, gdoffset+2*i);
                 LHU(x4, wback, fixedaddress+2*i);
                 MULW(x3, x3, x4);
                 SRLIW(x3, x3, 16);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xE5:
             INST_NAME("PMULHW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
-                LH(x3, gback, 2*i);
+                LH(x3, gback, gdoffset+2*i);
                 LH(x4, wback, fixedaddress+2*i);
                 MULW(x3, x3, x4);
                 SRAIW(x3, x3, 16);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
+        case 0xE6:
+            INST_NAME("CVTTPD2DQ Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            v0 = fpu_get_scratch(dyn);
+            v1 = fpu_get_scratch(dyn);
+            FLD(v0, wback, fixedaddress+0);
+            FLD(v1, wback, fixedaddress+8);
+            if(!box64_dynarec_fastround) {
+                FSFLAGSI(0);  // // reset all bits
+            }
+            FCVTWD(x3, v0, RD_RTZ);
+            if(!box64_dynarec_fastround) {
+                FRFLAGS(x5);   // get back FPSR to check the IOC bit
+                ANDI(x5, x5, (1<<FR_NV)|(1<<FR_OF));
+                BEQ_MARK(x5, xZR);
+                MOV32w(x3, 0x80000000);
+                MARK;
+                FSFLAGSI(0);  // // reset all bits
+            }
+            FCVTWD(x4, v1, RD_RTZ);
+            if(!box64_dynarec_fastround) {
+                FRFLAGS(x5);   // get back FPSR to check the IOC bit
+                ANDI(x5, x5, (1<<FR_NV)|(1<<FR_OF));
+                BEQ_MARK2(x5, xZR);
+                MOV32w(x4, 0x80000000);
+                MARK2;
+            }
+            SW(x3, gback, gdoffset+0);
+            SW(x4, gback, gdoffset+4);
+            SD(xZR, gback, gdoffset+8);
+            break;
         case 0xE7:
             INST_NAME("MOVNTDQ Ex, Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q2(x3);
             break;
         case 0xE8:
             INST_NAME("PSUBSB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
                 // tmp16s = (int16_t)GX->sb[i] - EX->sb[i];
                 // GX->sb[i] = (tmp16s<-128)?-128:((tmp16s>127)?127:tmp16s);
-                LB(x3, gback, i);
+                LB(x3, gback, gdoffset+i);
                 LB(x4, wback, fixedaddress+i);
                 SUBW(x3, x3, x4);
                 SLLIW(x3, x3, 16);
                 SRAIW(x3, x3, 16);
                 ADDI(x4, xZR, 0x7f);
                 BLT(x3, x4, 12);     // tmp16s>127?
-                SB(x4, gback, i);
+                SB(x4, gback, gdoffset+i);
                 J(24);               // continue
                 ADDI(x4, xZR, 0xf80);
                 BLT(x4, x3, 12);     // tmp16s<-128?
-                SB(x4, gback, i);
+                SB(x4, gback, gdoffset+i);
                 J(8);                // continue
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xE9:
             INST_NAME("PSUBSW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
                 // tmp32s = (int32_t)GX->sw[i] - EX->sw[i];
                 // GX->sw[i] = (tmp32s>32767)?32767:((tmp32s<-32768)?-32768:tmp32s);
-                LH(x3, gback, 2*i);
+                LH(x3, gback, gdoffset+2*i);
                 LH(x4, wback, fixedaddress+2*i);
                 SUBW(x3, x3, x4);
                 LUI(x4, 0xFFFF8); // -32768
                 BGE(x3, x4, 12);
-                SH(x4, gback, 2*i);
+                SH(x4, gback, gdoffset+2*i);
                 J(20); // continue
                 LUI(x4, 8); // 32768
                 BLT(x3, x4, 8);
                 ADDIW(x3, x4, -1);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xEA:
             INST_NAME("PMINSW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<8; ++i) {
-                LH(x3, gback, 2*i);
+                LH(x3, gback, gdoffset+2*i);
                 LH(x4, wback, fixedaddress+2*i);
                 BLT(x3, x4, 8);
                 MV(x3, x4);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xEB:
             INST_NAME("POR Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, OR(x3, x3, x4));
             break;
         case 0xEC:
             INST_NAME("PADDSB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
                 // tmp16s = (int16_t)GX->sb[i] + EX->sb[i];
                 // GX->sb[i] = (tmp16s>127)?127:((tmp16s<-128)?-128:tmp16s);
-                LB(x3, gback, i);
+                LB(x3, gback, gdoffset+i);
                 LB(x4, wback, fixedaddress+i);
                 ADDW(x3, x3, x4);
                 SLLIW(x3, x3, 16);
                 SRAIW(x3, x3, 16);
                 ADDI(x4, xZR, 0x7f);
                 BLT(x3, x4, 12);     // tmp16s>127?
-                SB(x4, gback, i);
+                SB(x4, gback, gdoffset+i);
                 J(24);               // continue
                 ADDI(x4, xZR, 0xf80);
                 BLT(x4, x3, 12);     // tmp16s<-128?
-                SB(x4, gback, i);
+                SB(x4, gback, gdoffset+i);
                 J(8);                // continue
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xED:
             INST_NAME("PADDSW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<8; ++i) {
                 // tmp32s = (int32_t)GX->sw[i] + EX->sw[i];
                 // GX->sw[i] = (tmp32s>32767)?32767:((tmp32s<-32768)?-32768:tmp32s);
-                LH(x3, gback, 2*i);
+                LH(x3, gback, gdoffset+2*i);
                 LH(x4, wback, fixedaddress+2*i);
                 ADDW(x3, x3, x4);
                 LUI(x4, 0xFFFF8); // -32768
                 BGE(x3, x4, 12);
-                SH(x4, gback, 2*i);
+                SH(x4, gback, gdoffset+2*i);
                 J(20); // continue
                 LUI(x4, 8); // 32768
                 BLT(x3, x4, 8);
                 ADDIW(x3, x4, -1);
-                SH(x3, gback, 2*i);
+                SH(x3, gback, gdoffset+2*i);
             }
             break;
         case 0xEE:
             INST_NAME("PMAXSW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_WS(x3, x4, BGE(x3, x4, 8); MV(x3, x4));
             break;
         case 0xEF:
             INST_NAME("PXOR Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             if(MODREG && gd==(nextop&7)+(rex.b<<3))
             {
                 // just zero dest
-                SD(xZR, x1, 0);
-                SD(xZR, x1, 8);
+                SD(xZR, gback, gdoffset+0);
+                SD(xZR, gback, gdoffset+8);
             } else {
                 GETEX(x2, 0);
                 SSE_LOOP_Q(x3, x4, XOR(x3, x3, x4));
@@ -1697,102 +2429,102 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xF1:
             INST_NAME("PSLLQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x4, xZR, 16);
             LD(x3, wback, fixedaddress+0);
             BLTU_MARK(x3, x4);
             // just zero dest
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<8; ++i) {
-                LHU(x4, gback, 2*i);
+                LHU(x4, gback, gdoffset+2*i);
                 SLLW(x4, x4, x3);
-                SH(x4, gback, 2*i);
+                SH(x4, gback, gdoffset+2*i);
             }
             break;
         case 0xF2:
             INST_NAME("PSLLQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x4, xZR, 32);
             LD(x3, wback, fixedaddress+0);
             BLTU_MARK(x3, x4);
             // just zero dest
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<4; ++i) {
-                LWU(x4, gback, 4*i);
+                LWU(x4, gback, gdoffset+4*i);
                 SLLW(x4, x4, x3);
-                SW(x4, gback, 4*i);
+                SW(x4, gback, gdoffset+4*i);
             }
             break;
         case 0xF3:
             INST_NAME("PSLLQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             ADDI(x4, xZR, 64);
             LD(x3, wback, fixedaddress+0);
             BLTU_MARK(x3, x4);
             // just zero dest
-            SD(xZR, gback, 0);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+0);
+            SD(xZR, gback, gdoffset+8);
             B_NEXT_nocond;
             MARK;
             for (int i=0; i<2; ++i) {
-                LD(x4, gback, 8*i);
+                LD(x4, gback, gdoffset+8*i);
                 SLL(x4, x4, x3);
-                SD(x4, gback, 8*i);
+                SD(x4, gback, gdoffset+8*i);
             }
             break;
         case 0xF4:
             INST_NAME("PMULUDQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             // GX->q[1] = (uint64_t)EX->ud[2]*GX->ud[2];
-            LWU(x3, gback, 2*4);
+            LWU(x3, gback, gdoffset+2*4);
             LWU(x4, wback, fixedaddress+2*4);
             MUL(x3, x3, x4);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+8);
             // GX->q[0] = (uint64_t)EX->ud[0]*GX->ud[0];
-            LWU(x3, gback, 0*4);
+            LWU(x3, gback, gdoffset+0*4);
             LWU(x4, wback, fixedaddress+0*4);
             MUL(x3, x3, x4);
-            SD(x3, gback, 0);
+            SD(x3, gback, gdoffset+0);
             break;
         case 0xF5:
             INST_NAME("PMADDWD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for (int i=0; i<4; ++i) {
-                // GX->sd[i] = (int32_t)(GX->sw[i*2+0])*EX->sw[i*2+0] + 
+                // GX->sd[i] = (int32_t)(GX->sw[i*2+0])*EX->sw[i*2+0] +
                 //             (int32_t)(GX->sw[i*2+1])*EX->sw[i*2+1];
-                LH(x3, gback, 2*(i*2+0));
+                LH(x3, gback, gdoffset+2*(i*2+0));
                 LH(x4, wback, fixedaddress+2*(i*2+0));
                 MULW(x5, x3, x4);
-                LH(x3, gback, 2*(i*2+1));
+                LH(x3, gback, gdoffset+2*(i*2+1));
                 LH(x4, wback, fixedaddress+2*(i*2+1));
                 MULW(x6, x3, x4);
                 ADDW(x5, x5, x6);
-                SW(x5, gback, 4*i);
+                SW(x5, gback, gdoffset+4*i);
             }
             break;
         case 0xF6:
             INST_NAME("PSADBW Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             MV(x6, xZR);
             for (int i=0; i<16; ++i) {
-                LBU(x3, gback, i);
+                LBU(x3, gback, gdoffset+i);
                 LBU(x4, wback, fixedaddress+i);
                 SUBW(x3, x3, x4);
                 SRAIW(x5, x3, 31);
@@ -1801,7 +2533,7 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 ANDI(x3, x3, 0xff);
                 ADDW(x6, x6, x3);
                 if (i==7 || i == 15) {
-                    SD(x6, gback, i+1-8);
+                    SD(x6, gback, gdoffset+i+1-8);
                     if (i==7) MV(x6, xZR);
                 }
             }
@@ -1809,61 +2541,61 @@ uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xF8:
             INST_NAME("PSUBB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
                 // GX->sb[i] -= EX->sb[i];
                 LB(x3, wback, fixedaddress+i);
-                LB(x4, gback, i);
+                LB(x4, gback, gdoffset+i);
                 SUB(x3, x4, x3);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xF9:
             INST_NAME("PSUBW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_W(x3, x4, SUBW(x3, x3, x4));
             break;
         case 0xFA:
             INST_NAME("PSUBD Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_D(x3, x4, SUBW(x3, x3, x4));
             break;
         case 0xFB:
             INST_NAME("PSUBQ Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_Q(x3, x4, SUB(x3, x3, x4));
             break;
         case 0xFC:
             INST_NAME("PADDB Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             for(int i=0; i<16; ++i) {
                 // GX->sb[i] += EX->sb[i];
-                LB(x3, gback, i);
+                LB(x3, gback, gdoffset+i);
                 LB(x4, wback, fixedaddress+i);
                 ADDW(x3, x3, x4);
-                SB(x3, gback, i);
+                SB(x3, gback, gdoffset+i);
             }
             break;
         case 0xFD:
             INST_NAME("PADDW Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_W(x3, x4, ADDW(x3, x3, x4));
             break;
         case 0xFE:
             INST_NAME("PADDD Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_D(x3, x4, ADDW(x3, x3, x4));
             break;
diff --git a/src/dynarec/rv64/dynarec_rv64_6664.c b/src/dynarec/rv64/dynarec_rv64_6664.c
new file mode 100644
index 00000000..a139e3ae
--- /dev/null
+++ b/src/dynarec/rv64/dynarec_rv64_6664.c
@@ -0,0 +1,77 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+
+#include "debug.h"
+#include "box64context.h"
+#include "dynarec.h"
+#include "emu/x64emu_private.h"
+#include "emu/x64run_private.h"
+#include "x64run.h"
+#include "x64emu.h"
+#include "box64stack.h"
+#include "callback.h"
+#include "emu/x64run_private.h"
+#include "x64trace.h"
+#include "dynarec_native.h"
+
+#include "rv64_printer.h"
+#include "dynarec_rv64_private.h"
+#include "dynarec_rv64_helper.h"
+#include "dynarec_rv64_functions.h"
+
+uintptr_t dynarec64_6664(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int seg, int* ok, int* need_epilog)
+{
+    (void)ip; (void)need_epilog;
+
+    uint8_t opcode = F8;
+    uint8_t nextop;
+    uint8_t gd, ed;
+    int64_t j64;
+    int v0, v1;
+    int64_t fixedaddress;
+    int unscaled;
+    MAYUSE(j64);
+
+    GETREX();
+
+    switch(opcode) {
+        case 0x8B:
+            INST_NAME("MOV Gd, FS:Ed");
+            nextop=F8;
+            GETGD;
+            if(MODREG) {   // reg <= reg
+                ed = xRAX+(nextop&7)+(rex.b<<3);
+                if(rex.w) {
+                    MV(gd, ed);
+                } else {
+                    if(ed!=gd) {
+                        LUI(x1, 0xffff0);
+                        AND(gd, gd, x1);
+                        ZEXTH(x1, ed);
+                        OR(gd, gd, x1);
+                    }
+                }
+            } else {                    // mem <= reg
+                grab_segdata(dyn, addr, ninst, x4, seg);
+                SMREAD();
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                ADD(x4, ed, x4);
+                if(rex.w) {
+                    LD(gd, x4, fixedaddress);
+                } else {
+                    LHU(x1, x4, fixedaddress);
+                    SRLI(gd, gd, 16);
+                    SLLI(gd, gd, 16);
+                    OR(gd, gd, x1);
+                }
+            }
+            break;
+
+
+        default:
+            DEFAULT;
+    }
+    return addr;
+}
diff --git a/src/dynarec/rv64/dynarec_rv64_66f0.c b/src/dynarec/rv64/dynarec_rv64_66f0.c
new file mode 100644
index 00000000..863e535d
--- /dev/null
+++ b/src/dynarec/rv64/dynarec_rv64_66f0.c
@@ -0,0 +1,129 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+
+#include "debug.h"
+#include "box64context.h"
+#include "dynarec.h"
+#include "emu/x64emu_private.h"
+#include "emu/x64run_private.h"
+#include "x64run.h"
+#include "x64emu.h"
+#include "box64stack.h"
+#include "callback.h"
+#include "emu/x64run_private.h"
+#include "x64trace.h"
+#include "dynarec_native.h"
+
+#include "rv64_printer.h"
+#include "dynarec_rv64_private.h"
+#include "dynarec_rv64_helper.h"
+#include "dynarec_rv64_functions.h"
+
+
+uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
+{
+    (void)ip; (void)rep; (void)need_epilog;
+
+    uint8_t opcode = F8;
+    uint8_t nextop;
+    uint8_t gd, ed, u8;
+    uint8_t wback, wb1, wb2, gb1, gb2;
+    int32_t i32;
+    int64_t i64, j64;
+    int64_t fixedaddress;
+    int unscaled;
+    MAYUSE(gb1);
+    MAYUSE(gb2);
+    MAYUSE(wb1);
+    MAYUSE(wb2);
+    MAYUSE(j64);
+
+    while((opcode==0xF2) || (opcode==0xF3)) {
+        rep = opcode-0xF1;
+        opcode = F8;
+    }
+
+    GETREX();
+
+    switch(opcode) {
+        case 0x81:
+        case 0x83:
+            nextop = F8;
+            SMDMB();
+            switch((nextop>>3)&7) {
+                case 0: //ADD
+                    if(opcode==0x81) {
+                        INST_NAME("LOCK ADD Ew, Iw");
+                    } else {
+                        INST_NAME("LOCK ADD Ew, Ib");
+                    }
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    if(MODREG) {
+                        if(opcode==0x81) i32 = F16S; else i32 = F8S;
+                        ed = xRAX+(nextop&7)+(rex.b<<3);
+                        MOV32w(x5, i32);
+                        ZEXTH(x6, ed);
+                        emit_add16(dyn, ninst, x6, x5, x3, x4, x2);
+                        SRLI(ed, ed, 16);
+                        SLLI(ed, ed, 16);
+                        OR(ed, ed, x6);
+                    } else {
+                        addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, LOCK_LOCK, 0, (opcode==0x81)?2:1);
+                        if(opcode==0x81) i32 = F16S; else i32 = F8S;
+                        MOV32w(x5, i32);
+
+                        ANDI(x3, wback, 0b10);
+                        BNEZ_MARK(x3);
+
+                        // lower 16 bits
+                        MARKLOCK;
+                        LR_W(x1, wback, 1, 1);
+                        SRLIW(x3, x1, 16);
+                        SLLIW(x3, x3, 16);
+                        ADD(x4, x1, x5);
+                        SLLIW(x4, x4, 16);
+                        SRLIW(x4, x4, 16);
+                        OR(x4, x4, x3);
+                        SC_W(x3, x4, wback, 1, 1);
+                        BNEZ_MARKLOCK(x3);
+                        IFX(X_ALL|X_PEND) {
+                            SLLIW(x1, x1, 16);
+                            SRLIW(x1, x1, 16);
+                        }
+                        B_MARK3_nocond;
+
+                        MARK;
+                        // upper 16 bits
+                        XORI(wback, wback, 0b10);
+                        MARK2;
+                        LR_W(x1, wback, 1, 1);
+                        SLLIW(x3, x1, 16);
+                        SRLIW(x3, x3, 16);
+                        SRLIW(x1, x1, 16);
+                        ADD(x4, x1, x5);
+                        SLLIW(x4, x4, 16);
+                        OR(x4, x4, x3);
+                        SC_W(x3, x4, wback, 1, 1);
+                        BNEZ_MARK2(x3);
+
+                        MARK3;
+                        // final
+                        IFX(X_ALL|X_PEND) {
+                            emit_add16(dyn, ninst, x1, x5, x3, x4, x6);
+                        }
+                    }
+                    break;
+                default:
+                    DEFAULT;
+            }
+            SMDMB();
+            break;
+
+        default:
+            DEFAULT;
+    }
+
+    return addr;
+}
\ No newline at end of file
diff --git a/src/dynarec/rv64/dynarec_rv64_67.c b/src/dynarec/rv64/dynarec_rv64_67.c
new file mode 100644
index 00000000..cb7702a8
--- /dev/null
+++ b/src/dynarec/rv64/dynarec_rv64_67.c
@@ -0,0 +1,574 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "debug.h"
+#include "box64context.h"
+#include "dynarec.h"
+#include "emu/x64emu_private.h"
+#include "emu/x64run_private.h"
+#include "x64run.h"
+#include "x64emu.h"
+#include "box64stack.h"
+#include "callback.h"
+#include "emu/x64run_private.h"
+#include "x64trace.h"
+#include "dynarec_native.h"
+
+#include "rv64_printer.h"
+#include "dynarec_rv64_private.h"
+#include "dynarec_rv64_helper.h"
+#include "dynarec_rv64_functions.h"
+
+uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
+{
+    (void)ip; (void)need_epilog;
+
+    uint8_t opcode = F8;
+    uint8_t nextop;
+    uint8_t gd, ed, wback, wb, wb1, wb2, gb1, gb2, eb1, eb2;
+    int64_t fixedaddress;
+    int unscaled;
+    int8_t  i8;
+    uint8_t u8;
+    int32_t i32;
+    int64_t j64, i64;
+    int cacheupd = 0;
+    int lock;
+    int v0, v1, s0;
+    MAYUSE(i32);
+    MAYUSE(j64);
+    MAYUSE(v0);
+    MAYUSE(v1);
+    MAYUSE(s0);
+    MAYUSE(lock);
+    MAYUSE(cacheupd);
+
+    if(rex.is32bits) {
+        // should do a different file
+        DEFAULT;
+        return addr;
+    }
+
+    GETREX();
+
+    rep = 0;
+    while((opcode==0xF2) || (opcode==0xF3)) {
+        rep = opcode-0xF1;
+        opcode = F8;
+    }
+
+    switch(opcode) {
+
+        case 0x01:
+            INST_NAME("ADD Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_add32(dyn, ninst, rex, ed, gd, x3, x4, x5);
+            WBACK;
+            break;
+        case 0x02:
+            INST_NAME("ADD Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_add8(dyn, ninst, x1, x2, x3, x4);
+            GBBACK(x4);
+            break;
+        case 0x03:
+            INST_NAME("ADD Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_add32(dyn, ninst, rex, gd, ed, x3, x4, x5);
+            break;
+
+        case 0x05:
+            INST_NAME("ADD EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            emit_add32c(dyn, ninst, rex, xRAX, i64, x3, x4, x5, x6);
+            break;
+
+        case 0x09:
+            INST_NAME("OR Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_or32(dyn, ninst, rex, ed, gd, x3, x4);
+            WBACK;
+            break;
+        case 0x0A:
+            INST_NAME("OR Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_or8(dyn, ninst, x1, x2, x3, x4);
+            GBBACK(x4);
+            break;
+        case 0x0B:
+            INST_NAME("OR Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_or32(dyn, ninst, rex, gd, ed, x3, x4);
+            break;
+
+        case 0x0D:
+            INST_NAME("OR EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            emit_or32c(dyn, ninst, rex, xRAX, i64, x3, x4);
+            break;
+
+        case 0x0F:
+            opcode=F8;
+            switch(opcode) {
+                case 0x2E:
+                    // no special check...
+                case 0x2F:
+                    switch (rep) {
+                        case 0:
+                            if(opcode==0x2F) {INST_NAME("COMISS Gx, Ex");} else {INST_NAME("UCOMISS Gx, Ex");}
+                            SETFLAGS(X_ALL, SF_SET);
+                            nextop = F8;
+                            GETGXSS(s0);
+                            if(MODREG) {
+                                v0 = sse_get_reg(dyn, ninst, x1, (nextop&7) + (rex.b<<3), 1);
+                            } else {
+                                v0 = fpu_get_scratch(dyn);
+                                SMREAD();
+                                addr = geted32(dyn, addr, ninst, nextop, &ed, x1, x2, &fixedaddress, rex, NULL, 1, 0);
+                                FLW(v0, ed, fixedaddress);
+                            }
+                            CLEAR_FLAGS();
+                            // if isnan(s0) || isnan(v0)
+                            IFX(X_ZF | X_PF | X_CF) {
+                                FEQS(x3, s0, s0);
+                                FEQS(x2, v0, v0);
+                                AND(x2, x2, x3);
+                                BNE_MARK(x2, xZR);
+                                ORI(xFlags, xFlags, (1<<F_ZF) | (1<<F_PF) | (1<<F_CF));
+                                B_NEXT_nocond;
+                            }
+                            MARK;
+                            // else if isless(d0, v0)
+                            IFX(X_CF) {
+                                FLTS(x2, s0, v0);
+                                BEQ_MARK2(x2, xZR);
+                                ORI(xFlags, xFlags, 1<<F_CF);
+                                B_NEXT_nocond;
+                            }
+                            MARK2;
+                            // else if d0 == v0
+                            IFX(X_ZF) {
+                                FEQS(x2, s0, v0);
+                                CBZ_NEXT(x2);
+                                ORI(xFlags, xFlags, 1<<F_ZF);
+                            }
+                            break;
+                        default:
+                            DEFAULT;
+                    }
+                    break;
+                default:
+                    DEFAULT;
+            }
+            break;
+
+        case 0x11:
+            INST_NAME("ADC Ed, Gd");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_adc32(dyn, ninst, rex, ed, gd, x3, x4, x5, x6);
+            WBACK;
+            break;
+
+        case 0x13:
+            INST_NAME("ADC Gd, Ed");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_adc32(dyn, ninst, rex, gd, ed, x3, x4, x5, x6);
+            break;
+
+        case 0x15:
+            INST_NAME("ADC EAX, Id");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            MOV64xw(x1, i64);
+            emit_adc32(dyn, ninst, rex, xRAX, x1, x3, x4, x5, x6);
+            break;
+
+        case 0x19:
+            INST_NAME("SBB Ed, Gd");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_sbb32(dyn, ninst, rex, ed, gd, x3, x4, x5);
+            WBACK;
+            break;
+        case 0x1A:
+            INST_NAME("SBB Gb, Eb");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_sbb8(dyn, ninst, x1, x2, x3, x4, x5);
+            GBBACK(x4);
+            break;
+        case 0x1B:
+            INST_NAME("SBB Gd, Ed");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_sbb32(dyn, ninst, rex, gd, ed, x3, x4, x5);
+            break;
+
+        case 0x1D:
+            INST_NAME("SBB EAX, Id");
+            READFLAGS(X_CF);
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            MOV64xw(x2, i64);
+            emit_sbb32(dyn, ninst, rex, xRAX, x2, x3, x4, x5);
+            break;
+
+        case 0x21:
+            INST_NAME("AND Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_and32(dyn, ninst, rex, ed, gd, x3, x4);
+            WBACK;
+            break;
+        case 0x22:
+            INST_NAME("AND Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_and8(dyn, ninst, x1, x2, x3, x4);
+            GBBACK(x4);
+            break;
+        case 0x23:
+            INST_NAME("AND Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_and32(dyn, ninst, rex, gd, ed, x3, x4);
+            break;
+
+        case 0x25:
+            INST_NAME("AND EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            emit_and32c(dyn, ninst, rex, xRAX, i64, x3, x4);
+            break;
+
+        case 0x29:
+            INST_NAME("SUB Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_sub32(dyn, ninst, rex, ed, gd, x3, x4, x5);
+            WBACK;
+            break;
+        case 0x2A:
+            INST_NAME("SUB Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_sub8(dyn, ninst, x1, x2, x3, x4, x5);
+            GBBACK(x5);
+            break;
+        case 0x2B:
+            INST_NAME("SUB Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_sub32(dyn, ninst, rex, gd, ed, x3, x4, x5);
+            break;
+
+        case 0x2D:
+            INST_NAME("SUB EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            emit_sub32c(dyn, ninst, rex, xRAX, i64, x3, x4, x5, x6);
+            break;
+
+        case 0x31:
+            INST_NAME("XOR Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_xor32(dyn, ninst, rex, ed, gd, x3, x4);
+            WBACK;
+            break;
+        case 0x32:
+            INST_NAME("XOR Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_xor8(dyn, ninst, x1, x2, x3, x4);
+            GBBACK(x4);
+            break;
+        case 0x33:
+            INST_NAME("XOR Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_xor32(dyn, ninst, rex, gd, ed, x3, x4);
+            break;
+
+        case 0x35:
+            INST_NAME("XOR EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            emit_xor32c(dyn, ninst, rex, xRAX, i64, x3, x4);
+            break;
+
+        case 0x38:
+            INST_NAME("CMP Eb, Gb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x1, 0);
+            GETGB(x2);
+            emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+            break;
+        case 0x39:
+            INST_NAME("CMP Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_cmp32(dyn, ninst, rex, ed, gd, x3, x4, x5, x6);
+            break;
+        case 0x3A:
+            INST_NAME("CMP Gb, Eb");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETEB32(x2, 0);
+            GETGB(x1);
+            emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+            break;
+        case 0x3B:
+            INST_NAME("CMP Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            GETED32(0);
+            emit_cmp32(dyn, ninst, rex, gd, ed, x3, x4, x5, x6);
+            break;
+        case 0x3C:
+            INST_NAME("CMP AL, Ib");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            u8 = F8;
+            ANDI(x1, xRAX, 0xff);
+            if(u8) {
+                MOV32w(x2, u8);
+                emit_cmp8(dyn, ninst, x1, x2, x3, x4, x5, x6);
+            } else {
+                emit_cmp8_0(dyn, ninst, x1, x3, x4);
+            }
+            break;
+        case 0x3D:
+            INST_NAME("CMP EAX, Id");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            i64 = F32S;
+            if(i64) {
+                MOV64xw(x2, i64);
+                emit_cmp32(dyn, ninst, rex, xRAX, x2, x3, x4, x5, x6);
+            } else
+                emit_cmp32_0(dyn, ninst, rex, xRAX, x3, x4);
+            break;
+
+        case 0x81:
+        case 0x83:
+            nextop = F8;
+            switch((nextop>>3)&7) {
+                case 0: //ADD
+                    if(opcode==0x81) {INST_NAME("ADD Ed, Id");} else {INST_NAME("ADD Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_add32c(dyn, ninst, rex, ed, i64, x3, x4, x5, x6);
+                    WBACK;
+                    break;
+                case 1: //OR
+                    if(opcode==0x81) {INST_NAME("OR Ed, Id");} else {INST_NAME("OR Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_or32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACK;
+                    break;
+                case 2: //ADC
+                    if(opcode==0x81) {INST_NAME("ADC Ed, Id");} else {INST_NAME("ADC Ed, Ib");}
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    MOV64xw(x5, i64);
+                    emit_adc32(dyn, ninst, rex, ed, x5, x3, x4, x5, x6);
+                    WBACK;
+                    break;
+                case 3: //SBB
+                    if(opcode==0x81) {INST_NAME("SBB Ed, Id");} else {INST_NAME("SBB Ed, Ib");}
+                    READFLAGS(X_CF);
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    MOV64xw(x5, i64);
+                    emit_sbb32(dyn, ninst, rex, ed, x5, x3, x4, x5);
+                    WBACK;
+                    break;
+                case 4: //AND
+                    if(opcode==0x81) {INST_NAME("AND Ed, Id");} else {INST_NAME("AND Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_and32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACK;
+                    break;
+                case 5: //SUB
+                    if(opcode==0x81) {INST_NAME("SUB Ed, Id");} else {INST_NAME("SUB Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_sub32c(dyn, ninst, rex, ed, i64, x3, x4, x5, x6);
+                    WBACK;
+                    break;
+                case 6: //XOR
+                    if(opcode==0x81) {INST_NAME("XOR Ed, Id");} else {INST_NAME("XOR Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    emit_xor32c(dyn, ninst, rex, ed, i64, x3, x4);
+                    WBACK;
+                    break;
+                case 7: //CMP
+                    if(opcode==0x81) {INST_NAME("CMP Ed, Id");} else {INST_NAME("CMP Ed, Ib");}
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    GETED32((opcode==0x81)?4:1);
+                    if(opcode==0x81) i64 = F32S; else i64 = F8S;
+                    if(i64) {
+                        MOV64xw(x2, i64);
+                        emit_cmp32(dyn, ninst, rex, ed, x2, x3, x4, x5, x6);
+                    } else
+                        emit_cmp32_0(dyn, ninst, rex, ed, x3, x4);
+                    break;
+            }
+            break;
+
+        case 0x88:
+            INST_NAME("MOV Eb, Gb");
+            nextop = F8;
+            gd = ((nextop&0x38)>>3)+(rex.r<<3);
+            if(rex.rex) {
+                gb2 = 0;
+                gb1 = xRAX + gd;
+            } else {
+                gb2 = ((gd&4)>>2);
+                gb1 = xRAX+(gd&3);
+            }
+            gd = x4;
+            if(gb2) {
+                SRLI(x4, gb1, 8);
+                gb1 = x4;
+            }
+            if(MODREG) {
+                ed = (nextop&7) + (rex.b<<3);
+                if(rex.rex) {
+                    eb1 = xRAX+ed;
+                    eb2 = 0;
+                } else {
+                    eb1 = xRAX+(ed&3);  // Ax, Cx, Dx or Bx
+                    eb2 = ((ed&4)>>2);    // L or H
+                }
+                ANDI(gd, gb1, 0xff);
+                if(eb2) {
+                    MOV64x(x1, 0xffffffffffff00ffLL);
+                    AND(x1, eb1, x1);
+                    SLLI(gd, gd, 8);
+                    OR(eb1, x1, gd);
+                } else {
+                    ANDI(x1, eb1, ~0xff);
+                    OR(eb1, x1, gd);
+                }
+            } else {
+                addr = geted32(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0);
+                SB(gb1, ed, fixedaddress);
+                SMWRITELOCK(lock);
+            }
+            break;
+        case 0x89:
+            INST_NAME("MOV Ed, Gd");
+            nextop=F8;
+            GETGD;
+            if(MODREG) {   // reg <= reg
+                MVxw(xRAX+(nextop&7)+(rex.b<<3), gd);
+            } else {                    // mem <= reg
+                addr = geted32(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0);
+                SDxw(gd, ed, fixedaddress);
+                SMWRITELOCK(lock);
+            }
+            break;
+        case 0x8B:
+            INST_NAME("MOV Gd, Ed");
+            nextop=F8;
+            GETGD;
+            if(MODREG) {
+                MVxw(gd, xRAX+(nextop&7)+(rex.b<<3));
+            } else {
+                addr = geted32(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0);
+                SMREADLOCK(lock);
+                LDxw(gd, ed, fixedaddress);
+            }
+            break;
+        case 0x8D:
+            INST_NAME("LEA Gd, Ed");
+            nextop=F8;
+            GETGD;
+            if(MODREG) {   // reg <= reg? that's an invalid operation
+                DEFAULT;
+            } else {                    // mem <= reg
+                addr = geted32(dyn, addr, ninst, nextop, &ed, gd, x1, &fixedaddress, rex, NULL, 0, 0);
+                if(ed!=gd) {
+                    AND(gd, ed, xMASK);
+                }
+            }
+            break;
+        default:
+            DEFAULT;
+    }
+    return addr;
+}
diff --git a/src/dynarec/rv64/dynarec_rv64_d8.c b/src/dynarec/rv64/dynarec_rv64_d8.c
index beadb202..7f14468b 100644
--- a/src/dynarec/rv64/dynarec_rv64_d8.c
+++ b/src/dynarec/rv64/dynarec_rv64_d8.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -50,13 +49,73 @@ uintptr_t dynarec64_D8(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0xD0 ... 0xD7:
 
         case 0xD8 ... 0xDF:
-
+            INST_NAME("FCOMP ST0, STx");
+            v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_COMBINE(0, nextop&7));
+            v2 = x87_get_st(dyn, ninst, x1, x2, nextop&7, X87_COMBINE(0, nextop&7));
+            LHU(x3, xEmu, offsetof(x64emu_t, sw));
+            MOV32w(x1, 0b1110100011111111); // mask off c0,c1,c2,c3
+            AND(x3, x3, x1);
+            if(ST_IS_F(0)) {
+                FEQS(x5, v1, v1);
+                FEQS(x4, v2, v2);
+                AND(x5, x5, x4);
+                BEQZ(x5, 24); // undefined/NaN
+                FEQS(x5, v1, v2);
+                BNEZ(x5, 28); // equal
+                FLTS(x3, v1, v2); // x3 = (v1<v2)?1:0
+                SLLI(x1, x3, 8);
+                J(20); // end
+                // undefined/NaN
+                LUI(x1, 1);
+                ADDI(x1, x1, 0b010100000000);
+                J(8); // end
+                // equal
+                LUI(x1, 1);
+                // end
+            } else {
+                FEQD(x5, v1, v1);
+                FEQD(x4, v2, v2);
+                AND(x5, x5, x4);
+                BEQZ(x5, 24); // undefined/NaN
+                FEQD(x5, v1, v2);
+                BNEZ(x5, 28); // equal
+                FLTD(x3, v1, v2); // x3 = (v1<v2)?1:0
+                SLLI(x1, x3, 8);
+                J(20); // end
+                // undefined/NaN
+                LUI(x1, 1);
+                ADDI(x1, x1, 0b010100000000);
+                J(8); // end
+                // equal
+                LUI(x1, 1);
+                // end
+            }
+            OR(x3, x3, x1);
+            SH(x3, xEmu, offsetof(x64emu_t, sw));
+            x87_do_pop(dyn, ninst, x3);
+            break;
         case 0xE0 ... 0xE7:
-
+            INST_NAME("FSUB ST0, STx");
+            v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_COMBINE(0, nextop&7));
+            v2 = x87_get_st(dyn, ninst, x1, x2, nextop&7, X87_COMBINE(0, nextop&7));
+            if(ST_IS_F(0)) {
+                FSUBS(v1, v1, v2);
+            } else {
+                FSUBD(v1, v1, v2);
+            }
+            break;
         case 0xE8 ... 0xEF:
 
         case 0xF0 ... 0xF7:
-
+            INST_NAME("FDIV ST0, STx");
+            v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_COMBINE(0, nextop&7));
+            v2 = x87_get_st(dyn, ninst, x1, x2, nextop&7, X87_COMBINE(0, nextop&7));
+            if(ST_IS_F(0)) {
+                FDIVS(v1, v1, v2);
+            } else {
+                FDIVD(v1, v1, v2);
+            }
+            break;
         case 0xF8 ... 0xFF:
             DEFAULT;
             break;
diff --git a/src/dynarec/rv64/dynarec_rv64_d9.c b/src/dynarec/rv64/dynarec_rv64_d9.c
index 9378c650..4940d6b4 100644
--- a/src/dynarec/rv64/dynarec_rv64_d9.c
+++ b/src/dynarec/rv64/dynarec_rv64_d9.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -34,13 +33,16 @@ uintptr_t dynarec64_D9(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
     uint8_t u8;
     int64_t fixedaddress;
     int unscaled;
-    int v1, v2;
+    int v0, v1, v2;
     int s0;
     int i1, i2, i3;
+    int64_t j64;
 
     MAYUSE(s0);
-    MAYUSE(v2);
+    MAYUSE(v0);
     MAYUSE(v1);
+    MAYUSE(v2);
+    MAYUSE(j64);
 
     switch(nextop) {
         case 0xC0:
@@ -260,7 +262,12 @@ uintptr_t dynarec64_D9(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             break;
         case 0xFA:
             INST_NAME("FSQRT");
-            DEFAULT;
+            v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_ST0);
+            if(ST_IS_F(0)) {
+                FSQRTS(v1, v1);
+            } else {
+                FSQRTD(v1, v1);
+            }
             break;
         case 0xFB:
             INST_NAME("FSINCOS");
@@ -271,7 +278,43 @@ uintptr_t dynarec64_D9(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             break;
         case 0xFC:
             INST_NAME("FRNDINT");
-            DEFAULT;
+            v0 = x87_get_st(dyn, ninst, x1, x2, 0, X87_ST0);
+            v1 = fpu_get_scratch(dyn);
+            v2 = fpu_get_scratch(dyn);
+            u8 = x87_setround(dyn, ninst, x1, x2);
+
+            if(ST_IS_F(0)) {
+                FEQS(x2, v0, v0);
+                BNEZ_MARK(x2);
+                B_NEXT_nocond;
+                MARK; // v0 is not nan
+                FABSS(v1, v0);
+                MOV64x(x3, 1ULL << __FLT_MANT_DIG__);
+                FCVTSL(v2, x3, RD_RTZ);
+                FLTS(x3, v1, v2);
+                BNEZ_MARK2(x3);
+                B_NEXT_nocond;
+                MARK2;
+                FCVTLS(x3, v0, RD_DYN);
+                FCVTSL(v1, x3, RD_DYN);
+                FSGNJS(v0, v1, v0);
+            } else {
+                FEQD(x2, v0, v0);
+                BNEZ_MARK(x2);
+                B_NEXT_nocond;
+                MARK; // v0 is not nan
+                FABSD(v1, v0);
+                MOV64x(x3, 1ULL << __DBL_MANT_DIG__);
+                FCVTDL(v2, x3, RD_RTZ);
+                FLTD(x3, v1, v2);
+                BNEZ_MARK2(x3);
+                B_NEXT_nocond;
+                MARK2;
+                FCVTLD(x3, v0, RD_DYN);
+                FCVTDL(v1, x3, RD_DYN);
+                FSGNJD(v0, v1, v0);
+            }
+            x87_restoreround(dyn, ninst, u8);
             break;
         case 0xFD:
             INST_NAME("FSCALE");
diff --git a/src/dynarec/rv64/dynarec_rv64_db.c b/src/dynarec/rv64/dynarec_rv64_db.c
index 95e350c0..7a5dddb0 100644
--- a/src/dynarec/rv64/dynarec_rv64_db.c
+++ b/src/dynarec/rv64/dynarec_rv64_db.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -150,7 +149,45 @@ uintptr_t dynarec64_DB(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0xEE:
         case 0xEF:
             INST_NAME("FUCOMI ST0, STx");
-            DEFAULT;
+            SETFLAGS(X_ALL, SF_SET);
+            SET_DFNONE();
+            v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_COMBINE(0, nextop&7));
+            v2 = x87_get_st(dyn, ninst, x1, x2, nextop&7, X87_COMBINE(0, nextop&7));
+            IFX(F_ZF | F_PF | F_CF) {
+                if(ST_IS_F(0)) {
+                    FEQS(x5, v1, v1);
+                    FEQS(x4, v2, v2);
+                    AND(x5, x5, x4);
+                    BEQZ(x5, 24); // undefined/NaN
+                    FEQS(x5, v1, v2);
+                    BNEZ(x5, 24); // equal
+                    FLTS(x3, v1, v2); // x3 = (v1<v2)?1:0
+                    OR(xFlags, xFlags, x3); // CF is the least significant bit
+                    J(16); // end
+                    // NaN
+                    ORI(xFlags, xFlags, (1<<F_ZF) | (1<<F_PF) | (1<<F_CF));
+                    J(8); // end
+                    // equal
+                    ORI(xFlags, xFlags, 1<<F_ZF);
+                    // end
+                } else {
+                    FEQD(x5, v1, v1);
+                    FEQD(x4, v2, v2);
+                    AND(x5, x5, x4);
+                    BEQZ(x5, 24); // undefined/NaN
+                    FEQD(x5, v1, v2);
+                    BNEZ(x5, 24); // equal
+                    FLTD(x3, v1, v2); // x3 = (v1<v2)?1:0
+                    OR(xFlags, xFlags, x3); // CF is the least significant bit
+                    J(16); // end
+                    // NaN
+                    ORI(xFlags, xFlags, (1<<F_ZF) | (1<<F_PF) | (1<<F_CF));
+                    J(8); // end
+                    // equal
+                    ORI(xFlags, xFlags, 1<<F_ZF);
+                    // end
+                }
+            }
             break;
         case 0xF0:  
         case 0xF1:
@@ -191,7 +228,24 @@ uintptr_t dynarec64_DB(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     break;
                 case 3:
                     INST_NAME("FISTP Ed, ST0");
-                    DEFAULT;
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    u8 = x87_setround(dyn, ninst, x1, x2);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+                    v2 = fpu_get_scratch(dyn);
+                    if(!box64_dynarec_fastround) {
+                        FSFLAGSI(0); // reset all bits
+                    }
+                    FCVTWD(x4, v1, RD_DYN);
+                    x87_restoreround(dyn, ninst, u8);
+                    if(!box64_dynarec_fastround) {
+                        FRFLAGS(x5);   // get back FPSR to check the IOC bit
+                        ANDI(x5, x5, 1<<FR_NV);
+                        BEQ_MARK2(x5, xZR);
+                        MOV32w(x4, 0x80000000);
+                    }
+                    MARK2;
+                    SW(x4, wback, fixedaddress);
+                    x87_do_pop(dyn, ninst, x3);
                     break;
                 case 5:
                     INST_NAME("FLD tbyte");
diff --git a/src/dynarec/rv64/dynarec_rv64_dc.c b/src/dynarec/rv64/dynarec_rv64_dc.c
new file mode 100644
index 00000000..d802e2fb
--- /dev/null
+++ b/src/dynarec/rv64/dynarec_rv64_dc.c
@@ -0,0 +1,119 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+
+#include "debug.h"
+#include "box64context.h"
+#include "dynarec.h"
+#include "emu/x64emu_private.h"
+#include "emu/x64run_private.h"
+#include "x64run.h"
+#include "x64emu.h"
+#include "box64stack.h"
+#include "callback.h"
+#include "emu/x64run_private.h"
+#include "x64trace.h"
+#include "emu/x87emu_private.h"
+#include "dynarec_native.h"
+
+#include "rv64_printer.h"
+#include "dynarec_rv64_private.h"
+#include "dynarec_rv64_helper.h"
+#include "dynarec_rv64_functions.h"
+
+
+uintptr_t dynarec64_DC(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
+{
+    (void)ip; (void)rep; (void)need_epilog;
+
+    uint8_t nextop = F8;
+    uint8_t wback;
+    int64_t fixedaddress;
+    int unscaled;
+    int v1, v2;
+
+    MAYUSE(v2);
+    MAYUSE(v1);
+
+    switch(nextop) {
+        case 0xC0 ... 0xC7:
+            INST_NAME("FADD STx, ST0");
+            DEFAULT;
+            break;
+        case 0xC8 ... 0xCF:
+            INST_NAME("FMUL STx, ST0");
+            DEFAULT;
+            break;
+        case 0xD0 ... 0xD7:
+            INST_NAME("FCOM ST0, STx"); //yep
+            DEFAULT;
+            break;
+        case 0xD8 ... 0xDF:
+            INST_NAME("FCOMP ST0, STx");
+            DEFAULT;
+            break;
+        case 0xE0 ... 0xE7:
+            INST_NAME("FSUBR STx, ST0");
+            DEFAULT;
+            break;
+            break;
+        case 0xE8 ... 0xEF:
+            INST_NAME("FSUB STx, ST0");
+            DEFAULT;
+            break;
+        case 0xF0 ... 0xF7:
+            INST_NAME("FDIVR STx, ST0");
+            DEFAULT;
+            break;
+        case 0xF8 ... 0xFF:
+            INST_NAME("FDIV STx, ST0");
+            DEFAULT;
+            break;
+        default:
+            switch((nextop>>3)&7) {
+                case 3:
+                    INST_NAME("FCOMP ST0, double[ED]");
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    v2 = fpu_get_scratch(dyn);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    FLD(v2, wback, fixedaddress);
+
+                    LHU(x3, xEmu, offsetof(x64emu_t, sw));
+                    MOV32w(x1, 0b1110100011111111); // mask off c0,c1,c2,c3
+                    AND(x3, x3, x1);
+                    FEQD(x5, v1, v1);
+                    FEQD(x4, v2, v2);
+                    AND(x5, x5, x4);
+                    BEQZ(x5, 24); // undefined/NaN
+                    FEQD(x5, v1, v2);
+                    BNEZ(x5, 28); // equal
+                    FLTD(x3, v1, v2); // x3 = (v1<v2)?1:0
+                    SLLI(x1, x3, 8);
+                    J(20); // end
+                    // undefined/NaN
+                    LUI(x1, 1);
+                    ADDI(x1, x1, 0b010100000000);
+                    J(8); // end
+                    // equal
+                    LUI(x1, 1);
+                    // end
+                    OR(x3, x3, x1);
+                    SH(x3, xEmu, offsetof(x64emu_t, sw));
+
+                    x87_do_pop(dyn, ninst, x3);
+                    break;
+                case 6:
+                    INST_NAME("FDIV ST0, double[ED]");
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    v2 = fpu_get_scratch(dyn);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    FLD(v2, wback, fixedaddress);
+                    FDIVD(v1, v1, v2);
+                    break;
+                default:
+                    DEFAULT;
+            }
+    }
+    return addr;
+}
diff --git a/src/dynarec/rv64/dynarec_rv64_dd.c b/src/dynarec/rv64/dynarec_rv64_dd.c
new file mode 100644
index 00000000..044f9aab
--- /dev/null
+++ b/src/dynarec/rv64/dynarec_rv64_dd.c
@@ -0,0 +1,179 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <errno.h>
+
+#include "debug.h"
+#include "box64context.h"
+#include "dynarec.h"
+#include "emu/x64emu_private.h"
+#include "emu/x64run_private.h"
+#include "x64run.h"
+#include "x64emu.h"
+#include "box64stack.h"
+#include "callback.h"
+#include "emu/x64run_private.h"
+#include "x64trace.h"
+#include "emu/x87emu_private.h"
+#include "dynarec_native.h"
+
+#include "rv64_printer.h"
+#include "dynarec_rv64_private.h"
+#include "dynarec_rv64_helper.h"
+#include "dynarec_rv64_functions.h"
+
+
+uintptr_t dynarec64_DD(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog)
+{
+    (void)ip; (void)rep; (void)need_epilog;
+
+    uint8_t nextop = F8;
+    uint8_t ed, wback;
+    int64_t fixedaddress;
+    int unscaled;
+    int v1, v2;
+    int s0;
+    int64_t j64;
+
+    MAYUSE(s0);
+    MAYUSE(v2);
+    MAYUSE(v1);
+    MAYUSE(j64);
+
+    switch(nextop) {
+        case 0xC0:
+        case 0xC1:
+        case 0xC2:
+        case 0xC3:
+        case 0xC4:
+        case 0xC5:
+        case 0xC6:
+        case 0xC7:
+            INST_NAME("FFREE STx");
+            MESSAGE(LOG_DUMP, "Need Optimization\n");
+            x87_purgecache(dyn, ninst, 0, x1, x2, x3);
+            MOV32w(x1, nextop&7);
+            CALL(fpu_do_free, -1);
+            break;
+        case 0xD0:
+        case 0xD1:
+        case 0xD2:
+        case 0xD3:
+        case 0xD4:
+        case 0xD5:
+        case 0xD6:
+        case 0xD7:
+            INST_NAME("FST ST0, STx");
+            DEFAULT;
+            break;
+        case 0xD8:
+            INST_NAME("FSTP ST0, ST0");
+            x87_do_pop(dyn, ninst, x3);
+            break;
+        case 0xD9:
+        case 0xDA:
+        case 0xDB:
+        case 0xDC:
+        case 0xDD:
+        case 0xDE:
+        case 0xDF:
+            INST_NAME("FSTP ST0, STx");
+            // copy the cache value for st0 to stx
+            x87_get_st_empty(dyn, ninst, x1, x2, nextop&7, X87_ST(nextop&7));
+            x87_get_st(dyn, ninst, x1, x2, 0, X87_ST0);
+            x87_swapreg(dyn, ninst, x1, x2, 0, nextop&7);
+            x87_do_pop(dyn, ninst, x3);
+            break;
+        case 0xE0:
+        case 0xE1:
+        case 0xE2:
+        case 0xE3:
+        case 0xE4:
+        case 0xE5:
+        case 0xE6:
+        case 0xE7:
+            INST_NAME("FUCOM ST0, STx");
+            DEFAULT;
+            break;
+        case 0xE8:
+        case 0xE9:
+        case 0xEA:
+        case 0xEB:
+        case 0xEC:
+        case 0xED:
+        case 0xEE:
+        case 0xEF:
+            INST_NAME("FUCOMP ST0, STx");
+            DEFAULT;
+            break;
+        case 0xC8:
+        case 0xC9:
+        case 0xCA:
+        case 0xCB:
+        case 0xCC:
+        case 0xCD:
+        case 0xCE:
+        case 0xCF:
+        case 0xF0:
+        case 0xF1:
+        case 0xF2:
+        case 0xF3:
+        case 0xF4:
+        case 0xF5:
+        case 0xF6:
+        case 0xF7:
+        case 0xF8:
+        case 0xF9:
+        case 0xFA:
+        case 0xFB:
+        case 0xFC:
+        case 0xFD:
+        case 0xFE:
+        case 0xFF:
+            DEFAULT;
+            break;
+
+        default:
+            switch((nextop>>3)&7) {
+                case 0:
+                    INST_NAME("FLD double");
+                    v1 = x87_do_push(dyn, ninst, x1, EXT_CACHE_ST_D);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    FLD(v1, wback, fixedaddress);
+                    break;
+                case 2:
+                    INST_NAME("FST double");
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    FSD(v1, wback, fixedaddress);
+                    break;
+                case 3:
+                    INST_NAME("FSTP double");
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, 0);
+                    FSD(v1, wback, fixedaddress);
+                    x87_do_pop(dyn, ninst, x3);
+                    break;
+                case 7:
+                    INST_NAME("FNSTSW m2byte");
+                    fpu_purgecache(dyn, ninst, 0, x1, x2, x3);
+                    addr = geted(dyn, addr, ninst, nextop, &ed, x4, x6, &fixedaddress, rex, NULL, 0, 0);
+                    LWU(x2, xEmu, offsetof(x64emu_t, top));
+                    LHU(x3, xEmu, offsetof(x64emu_t, sw));
+                    if(dyn->e.x87stack) {
+                        // update top
+                        ADDI(x2, x2, -dyn->e.x87stack);
+                        ANDI(x2, x2, 7);
+                    }
+                    MOV32w(x5, ~0x3800);
+                    AND(x3, x3, x5);    // mask out TOP
+                    SLLI(x2, x2, 11);   // shift TOP to bit 11
+                    OR(x3, x3, x2);     // inject TOP
+                    SH(x3, ed, fixedaddress);   // store whole sw flags
+                    break;
+                default:
+                    DEFAULT;
+            }
+    }
+    return addr;
+}
diff --git a/src/dynarec/rv64/dynarec_rv64_de.c b/src/dynarec/rv64/dynarec_rv64_de.c
index 1511c6ef..a2341b40 100644
--- a/src/dynarec/rv64/dynarec_rv64_de.c
+++ b/src/dynarec/rv64/dynarec_rv64_de.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
diff --git a/src/dynarec/rv64/dynarec_rv64_df.c b/src/dynarec/rv64/dynarec_rv64_df.c
index a96a45f1..de99b02a 100644
--- a/src/dynarec/rv64/dynarec_rv64_df.c
+++ b/src/dynarec/rv64/dynarec_rv64_df.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -41,15 +40,29 @@ uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
 
     switch(nextop) {
         case 0xC0 ... 0xC7:
-        
-        case 0xE0:
-        
-        case 0xE8 ... 0xEF:
+            INST_NAME("FFREEP STx");
             DEFAULT;
             break;
-        
-        case 0xF0 ... 0xF7:
-            INST_NAME("FCOMIP ST0, STx");
+
+        case 0xE0:
+            INST_NAME("FNSTSW AX");
+            LHU(x2, xEmu, offsetof(x64emu_t, top));
+            LHU(x1, xEmu, offsetof(x64emu_t, sw));
+            MOV32w(x3, 0b1100011111111111); // mask
+            AND(x1, x1, x3);
+            SLLI(x2, x2, 11);
+            OR(x1, x1, x2); // inject top
+            SH(x1, xEmu, offsetof(x64emu_t, sw));
+            SRLI(xRAX, xRAX, 16);
+            SLLI(xRAX, xRAX, 16);
+            OR(xRAX, xRAX, x1);
+            break;
+        case 0xE8 ... 0xF7:
+            if (nextop < 0xF0) {
+                INST_NAME("FUCOMIP ST0, STx");
+            } else {
+                INST_NAME("FCOMIP ST0, STx");
+            }
             SETFLAGS(X_ALL, SF_SET);
             SET_DFNONE();
             v1 = x87_get_st(dyn, ninst, x1, x2, 0, X87_COMBINE(0, nextop&7));
@@ -114,9 +127,9 @@ uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 case 1:
                     INST_NAME("FISTTP Ew, ST0");
                     v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_F);
-                    addr = geted(dyn, addr, ninst, nextop, &wback, x3, x4, &fixedaddress, rex, NULL, 0, 0);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x3, x4, &fixedaddress, rex, NULL, 1, 0);
                     if(!box64_dynarec_fastround) {
-                        FSFLAGSI(xZR); // reset all bits
+                        FSFLAGSI(0); // reset all bits
                     }
                     FCVTWD(x4, v1, RD_RTZ);
                     if(!box64_dynarec_fastround) {
@@ -136,12 +149,12 @@ uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 case 3:
                     INST_NAME("FISTP Ew, ST0");
                     v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_F);
-                    addr = geted(dyn, addr, ninst, nextop, &wback, x3, x4, &fixedaddress, rex, NULL, 0, 0);
-                    u8 = sse_setround(dyn, ninst, x2, x3);
+                    u8 = x87_setround(dyn, ninst, x1, x2);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
                     if(!box64_dynarec_fastround) {
-                        FSFLAGSI(xZR); // reset all bits
+                        FSFLAGSI(0); // reset all bits
                     }
-                    FCVTWD(x4, v1, RD_RM);
+                    FCVTWD(x4, v1, RD_DYN);
                     x87_restoreround(dyn, ninst, u8);
                     if(!box64_dynarec_fastround) {
                         FRFLAGS(x5);   // get back FPSR to check the IOC bit
@@ -157,6 +170,71 @@ uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                     SH(x4, wback, fixedaddress);
                     x87_do_pop(dyn, ninst, x3);
                     break;
+                case 5:
+                    INST_NAME("FILD ST0, i64");
+                    v1 = x87_do_push(dyn, ninst, x1, EXT_CACHE_ST_D);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+                    LD(x1, wback, fixedaddress);
+                    if (rex.is32bits) {
+                        // need to also feed the STll stuff...
+                        ADDI(x4, xEmu, offsetof(x64emu_t, fpu_ll));
+                        LWU(x5, xEmu, offsetof(x64emu_t, top));
+                        int a = 0 - dyn->e.x87stack;
+                        if(a) {
+                            ADDIW(x5, x5, a);
+                            ANDI(x5, x5, 0x7);
+                        }
+                        SLLI(x5, x5, 4); // fpu_ll is 2 i64
+                        ADD(x5, x5, x4);
+                        SD(x1, x5, 8);   // ll
+                    }
+                    FCVTDL(v1, x1, RD_RTZ);
+                    if(rex.is32bits) {
+                        FSD(v1, x5, 0);  // ref
+                    }
+                    break;
+                case 7:
+                    INST_NAME("FISTP i64, ST0");
+                    v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_D);
+                    u8 = x87_setround(dyn, ninst, x1, x2);
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
+
+                    if(rex.is32bits) {
+                        // need to check STll first...
+                        ADDI(x4, xEmu, offsetof(x64emu_t, fpu_ll));
+                        LWU(x5, xEmu, offsetof(x64emu_t, top));
+                        int a = 0 - dyn->e.x87stack;
+                        if(a) {
+                            ADDIW(x5, x5, a);
+                            ANDI(x5, x5, 0x7);
+                        }
+                        SLLI(x5, x5, 4); // fpu_ll is 2 i64
+                        ADD(x5, x5, x4);
+                        FMVXD(x3, v1);
+                        LD(x6, x5, 0);  // ref
+                        BNE_MARK(x6, x3);
+                        LD(x6, x5, 8);  // ll
+                        SD(x6, wback, fixedaddress);
+                        B_MARK3_nocond;
+                        MARK;
+                    }
+
+                    if(!box64_dynarec_fastround) {
+                        FSFLAGSI(0); // reset all bits
+                    }
+                    FCVTLD(x4, v1, RD_DYN);
+                    if(!box64_dynarec_fastround) {
+                        FRFLAGS(x5);   // get back FPSR to check the IOC bit
+                        ANDI(x5, x5, 1<<FR_NV);
+                        BEQ_MARK2(x5, xZR);
+                        MOV64x(x4, 0x8000000000000000LL);
+                    }
+                    MARK2;
+                    SD(x4, wback, fixedaddress);
+                    MARK3;
+                    x87_restoreround(dyn, ninst, u8);
+                    x87_do_pop(dyn, ninst, x3);
+                    break;
                 default:
                     DEFAULT;
                     break;
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_logic.c b/src/dynarec/rv64/dynarec_rv64_emit_logic.c
index 6d17895f..1352868b 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_logic.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_logic.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "rv64_printer.h"
 #include "dynarec_rv64_private.h"
@@ -165,8 +163,7 @@ void emit_xor16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
     }
 
     XOR(s1, s1, s2);
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
 
     IFX(X_PEND) {
         SH(s1, xEmu, offsetof(x64emu_t, res));
@@ -197,8 +194,7 @@ void emit_or16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4) {
     }
 
     OR(s1, s1, s2);
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
     IFX(X_PEND) {
         SD(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -426,7 +422,7 @@ void emit_and32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int64_t c, i
         MOV64xw(s3, c);
         AND(s1, s1, s3); // res = s1 & s2
     }
-    if (!rex.w) ZEROUP(s1);
+    if (!rex.w && c<0 && c>=-2048) ZEROUP(s1);
 
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_math.c b/src/dynarec/rv64/dynarec_rv64_emit_math.c
index 01579ea3..5d6f7e0e 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_math.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_math.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "rv64_printer.h"
 #include "dynarec_rv64_private.h"
@@ -37,8 +35,7 @@ void emit_add32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     IFX(X_CF) {
         if (rex.w) {
             AND(s5, xMASK, s1);
-            AND(s4, xMASK, s2);
-            ADD(s5, s5, s4); // lo
+            if(rv64_zba) ADDUW(s5, s2, s5); else {AND(s4, xMASK, s2); ADD(s5, s5, s4);} // lo
             SRLI(s3, s1, 0x20);
             SRLI(s4, s2, 0x20);
             ADD(s4, s4, s3);
@@ -65,8 +62,12 @@ void emit_add32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s5, s1);   // s5 = ~res
-        AND(s3, s5, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s5, s1);   // s5 = ~res
+            AND(s3, s5, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -126,8 +127,7 @@ void emit_add32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int64_t c, i
     IFX(X_CF) {
         if (rex.w) {
             AND(s5, xMASK, s1);
-            AND(s4, xMASK, s2);
-            ADD(s5, s5, s4); // lo
+            if(rv64_zba) ADDUW(s5, s2, s5); else {AND(s4, xMASK, s2); ADD(s5, s5, s4);} // lo
             SRLI(s3, s1, 0x20);
             SRLI(s4, s2, 0x20);
             ADD(s4, s4, s3);
@@ -159,8 +159,12 @@ void emit_add32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int64_t c, i
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);   // s2 = ~res
+            AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -213,8 +217,12 @@ void emit_add16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
         SW(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s5, s1);   // s5 = ~res
-        AND(s3, s5, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);    // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s5, s1);   // s5 = ~res
+            AND(s3, s5, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -237,8 +245,7 @@ void emit_add16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
         ORI(xFlags, xFlags, 1 << F_CF);
     }
 
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
 
     IFX(X_ZF) {
         BNEZ(s1, 8);
@@ -272,8 +279,12 @@ void emit_add8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
     ADD(s1, s1, s2);
 
     IFX(X_AF|X_OF) {
-        NOT(s4, s1);   // s4 = ~res
-        AND(s3, s4, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s4, s1);   // s4 = ~res
+            AND(s3, s4, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s2);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -332,8 +343,12 @@ void emit_add8c(dynarec_rv64_t* dyn, int ninst, int s1, int c, int s2, int s3, i
     ADDI(s1, s1, c);
 
     IFX(X_AF|X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);   // s2 = ~res
+            AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -580,8 +595,12 @@ void emit_inc8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
         SB(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);   // s2 = ~res
+            AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s2, s3, 0x08); // AF: cc & 0x08
@@ -625,8 +644,9 @@ void emit_dec8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
         SET_DFNONE();
     }
     IFX(X_AF | X_OF) {
-        ORI(s3, s1, 1);      // s3 = op1 | op2
-        ANDI(s4, s1, 1);      // s4 = op1 & op2
+        NOT(s4, s1);        // s4 = ~op1
+        ORI(s3, s4, 1);      // s3 = ~op1 | op2
+        ANDI(s4, s4, 1);      // s4 = ~op1 & op2
     }
 
     ADDIW(s1, s1, -1);
@@ -635,9 +655,8 @@ void emit_dec8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
         SB(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
-        OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
+        AND(s3, s1, s3);   // s3 = res & (~op1 | op2)
+        OR(s3, s3, s4);   // cc = (res & (~op1 | op2)) | (~op1 & op2)
         IFX(X_AF) {
             ANDI(s2, s3, 0x08); // AF: cc & 0x08
             BEQZ(s2, 8);
@@ -689,8 +708,12 @@ void emit_inc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);    // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);   // s2 = ~res
+            AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s5);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s2, s3, 0x08); // AF: cc & 0x08
@@ -781,6 +804,9 @@ void emit_dec32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
 // emit INC16 instruction, from s1, store result in s1 using s3 and s4 as scratch
 void emit_inc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
 {
+    IFX(X_ALL) {
+        ANDI(xFlags, xFlags, ~((1UL<<F_AF) | (1UL<<F_OF2) | (1UL<<F_ZF) | (1UL<<F_SF) | (1UL<<F_PF)));
+    }
     IFX(X_PEND) {
         SH(s1, xEmu, offsetof(x64emu_t, op1));
         SET_DF(s3, d_inc16);
@@ -798,8 +824,12 @@ void emit_inc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
         SH(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);   // s2 = ~res
-        AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s3);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);   // s2 = ~res
+            AND(s3, s2, s3);   // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s4);   // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -816,8 +846,7 @@ void emit_inc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4)
         }
     }
 
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
 
     IFX(X_ZF) {
         BNEZ(s1, 8);
@@ -909,6 +938,7 @@ void emit_sbb8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, i
     SUBW(s1, s1, s3);
     ANDI(s1, s1, 0xff);
 
+    CLEAR_FLAGS();
     IFX(X_PEND) {
         SB(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -928,6 +958,78 @@ void emit_sbb8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, i
     }
 }
 
+// emit ADC8 instruction, from s1, s2, store result in s1 using s3 and s4 as scratch
+void emit_adc8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, int s5) {
+    IFX(X_PEND) {
+        SH(s1, xEmu, offsetof(x64emu_t, op1));
+        SH(s2, xEmu, offsetof(x64emu_t, op2));
+        SET_DF(s3, d_adc8);
+    } else IFX(X_ALL) {
+        SET_DFNONE();
+    }
+    IFX(X_AF | X_OF) {
+        OR(s4, s1, s2);  // s3 = op1 | op2
+        AND(s5, s1, s2); // s4 = op1 & op2
+    }
+
+    ADD(s1, s1, s2);
+    ANDI(s3, xFlags, 1 << F_CF);
+    ADD(s1, s1, s3);
+
+    CLEAR_FLAGS();
+    IFX(X_PEND) {
+        SW(s1, xEmu, offsetof(x64emu_t, res));
+    }
+    IFX(X_AF | X_OF) {
+        if(rv64_zbb) {
+            ANDN(s3, s1, s4);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);     // s2 = ~res
+            AND(s3, s2, s4); // s3 = ~res & (op1 | op2)
+        }
+        OR(s3, s3, s5);  // cc = (~res & (op1 | op2)) | (op1 & op2)
+        IFX(X_AF) {
+            ANDI(s4, s3, 0x08); // AF: cc & 0x08
+            BEQZ(s4, 8);
+            ORI(xFlags, xFlags, 1 << F_AF);
+        }
+        IFX(X_OF) {
+            SRLI(s3, s3, 6);
+            SRLI(s4, s3, 1);
+            XOR(s3, s3, s4);
+            ANDI(s3, s3, 1); // OF: xor of two MSB's of cc
+            BEQZ(s3, 8);
+            ORI(xFlags, xFlags, 1 << F_OF2);
+        }
+    }
+    IFX(X_CF) {
+        SRLI(s3, s1, 8);
+        BEQZ(s3, 8);
+        ORI(xFlags, xFlags, 1 << F_CF);
+    }
+
+    ANDI(s1, s1, 0xff);
+
+    IFX(X_ZF) {
+        BNEZ(s1, 8);
+        ORI(xFlags, xFlags, 1 << F_ZF);
+    }
+    IFX(X_SF) {
+        SRLI(s3, s1, 7);
+        BEQZ(s3, 8);
+        ORI(xFlags, xFlags, 1 << F_SF);
+    }
+    IFX(X_PF) {
+        emit_pf(dyn, ninst, s1, s3, s4);
+    }
+}
+
+// emit ADC8 instruction, from s1, const c, store result in s1 using s3, s4, s5 and s6 as scratch
+void emit_adc8c(dynarec_rv64_t* dyn, int ninst, int s1, int32_t c, int s3, int s4, int s5, int s6) {
+    MOV32w(s5, c&0xff);
+    emit_adc8(dyn, ninst, s1, s5, s3, s4, s6);
+}
+
 // emit SBB8 instruction, from s1, constant c, store result in s1 using s3, s4, s5 and s6 as scratch
 void emit_sbb8c(dynarec_rv64_t* dyn, int ninst, int s1, int c, int s3, int s4, int s5, int s6)
 {
@@ -955,6 +1057,7 @@ void emit_sbb16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
     ANDI(s3, xFlags, 1 << F_CF);
     SUBW(s1, s1, s3);
 
+    CLEAR_FLAGS();
     SLLIW(s1, s1, 16);
     IFX(X_SF) {
         BGE(s1, xZR, 8);
@@ -996,6 +1099,7 @@ void emit_sbb32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     ANDI(s3, xFlags, 1 << F_CF);
     SUBxw(s1, s1, s3);
 
+    CLEAR_FLAGS();
     IFX(X_SF) {
         BGE(s1, xZR, 8);
         ORI(xFlags, xFlags, 1 << F_SF);
@@ -1091,8 +1195,7 @@ void emit_neg16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3)
     }
 
     NEG(s1, s1);
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
     IFX(X_PEND) {
         SH(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -1121,7 +1224,8 @@ void emit_neg16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3)
         }    
     }
     IFX(X_SF) {
-        ANDI(s3, s1, 1 << F_SF);    // 1<<F_SF is sign bit, so just mask
+        SRLI(s3, s1, 15-F_SF);    // put sign bit in place
+        ANDI(s3, s3, 1 << F_SF);    // 1<<F_SF is sign bit, so just mask
         OR(xFlags, xFlags, s3);
     }
     IFX(X_PF) {
@@ -1192,7 +1296,6 @@ void emit_neg8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3)
 // emit ADC16 instruction, from s1, s2, store result in s1 using s3 and s4 as scratch
 void emit_adc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, int s5)
 {
-    CLEAR_FLAGS();
     IFX(X_PEND) {
         SH(s1, xEmu, offsetof(x64emu_t, op1));
         SH(s2, xEmu, offsetof(x64emu_t, op2));
@@ -1209,12 +1312,17 @@ void emit_adc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
     ANDI(s3, xFlags, 1 << F_CF);
     ADD(s1, s1, s3);
 
+    CLEAR_FLAGS();
     IFX(X_PEND) {
         SW(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);     // s2 = ~res
-        AND(s3, s2, s4); // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s4);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);     // s2 = ~res
+            AND(s3, s2, s4); // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s5);  // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
@@ -1236,8 +1344,7 @@ void emit_adc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
         ORI(xFlags, xFlags, 1 << F_CF);
     }
 
-    SLLI(s1, s1, 48);
-    SRLI(s1, s1, 48);
+    ZEXTH(s1, s1);
 
     IFX(X_ZF) {
         BNEZ(s1, 8);
@@ -1254,9 +1361,8 @@ void emit_adc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
 }
 
 // emit ADC32 instruction, from s1, s2, store result in s1 using s3 and s4 as scratch
-void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5)
+void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5, int s6)
 {
-    CLEAR_FLAGS();
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, op1));
         SDxw(s2, xEmu, offsetof(x64emu_t, op2));
@@ -1267,21 +1373,16 @@ void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     IFX(X_CF) {
         if (rex.w) {
             AND(s5, xMASK, s1);
-            AND(s4, xMASK, s2);
-            ADD(s5, s5, s4); // lo
+            if(rv64_zba) ADDUW(s5, s2, s5); else {AND(s4, xMASK, s2); ADD(s5, s5, s4);} // lo
             SRLI(s3, s1, 0x20);
             SRLI(s4, s2, 0x20);
             ADD(s4, s4, s3);
             SRLI(s5, s5, 0x20);
             ADD(s5, s5, s4); // hi
-            SRAI(s5, s5, 0x20);
-            BEQZ(s5, 8);
-            ORI(xFlags, xFlags, 1 << F_CF);
+            SRAI(s6, s5, 0x20);
         } else {
             ADD(s5, s1, s2);
-            SRLI(s5, s5, 0x20);
-            BEQZ(s5, 8);
-            ORI(xFlags, xFlags, 1 << F_CF);
+            SRLI(s6, s5, 0x20);
         }
     }
     IFX(X_AF | X_OF) {
@@ -1293,12 +1394,21 @@ void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     ANDI(s3, xFlags, 1 << F_CF);
     ADDxw(s1, s1, s3);
 
+    CLEAR_FLAGS();
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
+    IFX(X_CF) {
+        BEQZ(s6, 8);
+        ORI(xFlags, xFlags, 1 << F_CF);
+    }
     IFX(X_AF | X_OF) {
-        NOT(s2, s1);     // s2 = ~res
-        AND(s3, s2, s4); // s3 = ~res & (op1 | op2)
+        if(rv64_zbb) {
+            ANDN(s3, s1, s4);   // s3 = ~res & (op1 | op2)
+        } else {
+            NOT(s2, s1);     // s2 = ~res
+            AND(s3, s2, s4); // s3 = ~res & (op1 | op2)
+        }
         OR(s3, s3, s5);  // cc = (~res & (op1 | op2)) | (op1 & op2)
         IFX(X_AF) {
             ANDI(s4, s3, 0x08); // AF: cc & 0x08
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_shift.c b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
index dbcc2d5f..7030c674 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_shift.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "rv64_printer.h"
 #include "dynarec_rv64_private.h"
@@ -327,11 +325,15 @@ void emit_rol32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     } else {
         ANDI(s4, s2, 0x1f);
     }
-    SLLxw(s3, s1, s4);
-    NEG(s4, s4);
-    ADDI(s4, s4, rex.w?64:32);
-    SRLxw(s1, s1, s4);
-    OR(s1, s3, s1);
+    if(rv64_zbb) {
+        ROLxw(s1, s1, s4);
+    } else {
+        SLLxw(s3, s1, s4);
+        NEG(s4, s4);
+        ADDI(s4, s4, rex.w?64:32);
+        SRLxw(s1, s1, s4);
+        OR(s1, s3, s1);
+    }
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -370,11 +372,15 @@ void emit_ror32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
     } else {
         ANDI(s4, s2, 0x1f);
     }
-    SRLxw(s3, s1, s4);
-    NEG(s4, s4);
-    ADDI(s4, s4, rex.w?64:32);
-    SLLxw(s1, s1, s4);
-    OR(s1, s3, s1);
+    if(rv64_zbb) {
+        RORxw(s1, s1, s4);
+    } else {
+        SRLxw(s3, s1, s4);
+        NEG(s4, s4);
+        ADDI(s4, s4, rex.w?64:32);
+        SLLxw(s1, s1, s4);
+        OR(s1, s3, s1);
+    }
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -413,9 +419,13 @@ void emit_rol32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, uint32_t c,
         }
         return;
     }
-    SLLIxw(s3, s1, c);
-    SRLIxw(s1, s1, (rex.w?64:32)-c);
-    OR(s1, s3, s1);
+    if(rv64_zbb) {
+        RORIxw(s1, s1, (rex.w?64:32)-c);
+    } else {
+        SLLIxw(s3, s1, c);
+        SRLIxw(s1, s1, (rex.w?64:32)-c);
+        OR(s1, s3, s1);
+    }
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
@@ -454,9 +464,13 @@ void emit_ror32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, uint32_t c,
         }
         return;
     }
-    SRLIxw(s3, s1, c);
-    SLLIxw(s1, s1, (rex.w?64:32)-c);
-    OR(s1, s3, s1);
+    if(rv64_zbb) {
+        RORIxw(s1, s1, c);
+    } else {
+        SRLIxw(s3, s1, c);
+        SLLIxw(s1, s1, (rex.w?64:32)-c);
+        OR(s1, s3, s1);
+    }
     IFX(X_PEND) {
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_tests.c b/src/dynarec/rv64/dynarec_rv64_emit_tests.c
index 79ebe6cb..00c1fb7d 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_tests.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_tests.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -16,7 +15,6 @@
 #include "emu/x64run_private.h"
 #include "x64trace.h"
 #include "dynarec_native.h"
-#include "../tools/bridge_private.h"
 
 #include "rv64_printer.h"
 #include "dynarec_rv64_private.h"
@@ -108,8 +106,7 @@ void emit_cmp16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
     // It's a cmp, we can't store the result back to s1.
     SUB(s6, s1, s2);
     IFX(X_ALL) {
-        SLLI(s6, s6, 48);
-        SRLI(s6, s6, 48);
+        ZEXTH(s6, s6);
     }
     IFX_PENDOR0 {
         SH(s6, xEmu, offsetof(x64emu_t, res));
diff --git a/src/dynarec/rv64/dynarec_rv64_f0.c b/src/dynarec/rv64/dynarec_rv64_f0.c
index 3ccaafa4..348f2905 100644
--- a/src/dynarec/rv64/dynarec_rv64_f0.c
+++ b/src/dynarec/rv64/dynarec_rv64_f0.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -47,12 +46,8 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         rep = opcode-0xF1;
         opcode = F8;
     }
-    // REX prefix before the F0 are ignored
-    rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+
+    GETREX();
 
     // TODO: Take care of unligned memory access for all the LOCK ones.
     // https://github.com/ptitSeb/box64/pull/604
@@ -104,6 +99,101 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
         case 0x0F:
             nextop = F8;
             switch(nextop) {
+                case 0xB0:
+                    switch(rep) {
+                        case 0:
+                            INST_NAME("LOCK CMPXCHG Eb, Gb");
+                            SETFLAGS(X_ALL, SF_SET_PENDING);
+                            nextop = F8;
+                            ANDI(x6, xRAX, 0xff); // AL
+                            SMDMB();
+                            if(MODREG) {
+                                if(rex.rex) {
+                                    wback = xRAX+(nextop&7)+(rex.b<<3);
+                                    wb2 = 0;
+                                } else {
+                                    wback = (nextop&7);
+                                    wb2 = (wback>>2)*8;
+                                    wback = xRAX+(wback&3);
+                                }
+                                if (wb2) {
+                                    MV(x2, wback);
+                                    SRLI(x2, x2, wb2);
+                                    ANDI(x2, x2, 0xff);
+                                } else {
+                                    ANDI(x2, wback, 0xff);
+                                }
+                                wb1 = 0;
+                                ed = x2;
+                                UFLAG_IF {
+                                    emit_cmp8(dyn, ninst, x6, ed, x3, x4, x5, x1);
+                                }
+                                BNE_MARK2(x6, x2);
+                                if (wb2) {
+                                    MV(wback, x2);
+                                    SRLI(wback, wback, wb2);
+                                    ANDI(wback, wback, 0xff);
+                                } else {
+                                    ANDI(wback, x2, 0xff);
+                                }
+                                GETGB(x1);
+                                MV(ed, gd);
+                                MARK2;
+                                ANDI(xRAX, xRAX, ~0xff);
+                                OR(xRAX, xRAX, x2);
+                                B_NEXT_nocond;
+                            } else {
+                                // this one is tricky, and did some repetitive work.
+                                // mostly because we only got 6 scratch registers,
+                                // and has so much to do.
+                                if(rex.rex) {
+                                    gb1 = xRAX+((nextop&0x38)>>3)+(rex.r<<3);
+                                    gb2 = 0;
+                                } else {
+                                    gd = (nextop&0x38)>>3;
+                                    gb2 = ((gd&4)>>2);
+                                    gb1 = xRAX+(gd&3);
+                                }
+                                addr = geted(dyn, addr, ninst, nextop, &wback, x3, x2, &fixedaddress, rex, LOCK_LOCK, 0, 0);
+                                ANDI(x5, wback, 0b11);
+                                SLLI(x5, x5, 3);        // shamt
+                                MARKLOCK;
+                                ANDI(x2, wback, ~0b11); // align to 32bit
+                                LWU(x1, x2, 0);
+                                LR_W(x4, x2, 1, 1);
+                                SRL(x4, x4, x5);
+                                ANDI(x4, x4, 0xff);
+                                BNE_MARK(x6, x4); // compare AL with m8
+                                // AL == m8, r8 is loaded into m8
+                                ADDI(x2, xZR, 0xff);
+                                SLL(x2, x2, x5);
+                                NOT(x2, x2);
+                                AND(x2, x1, x2);
+                                if (gb2) {
+                                    MV(x1, gb1);
+                                    SRLI(x1, x1, 8);
+                                    ANDI(x1, x1, 0xff);
+                                } else {
+                                    ANDI(x1, gb1, 0xff);
+                                }
+                                SLL(x1, x1, x5);
+                                OR(x1, x1, x2);
+                                ANDI(x2, wback, ~0b11); // align to 32bit again
+                                SC_W(x9, x1, x2, 1, 1);
+                                BNEZ_MARKLOCK(x9);
+                                // done
+                                MARK;
+                                UFLAG_IF {emit_cmp8(dyn, ninst, x6, x4, x1, x2, x3, x5);}
+                                // load m8 into AL
+                                ANDI(xRAX, xRAX, ~0xff);
+                                OR(xRAX, xRAX, x4);
+                            }
+                            SMDMB();
+                            break;
+                        default:
+                            DEFAULT;
+                    }
+                    break;
                 case 0xB1:
                     switch (rep) {
                         case 0:
@@ -188,9 +278,16 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                             addr = geted(dyn, addr, ninst, nextop, &wback, x1, x2, &fixedaddress, rex, LOCK_LOCK, 0, 0);
                             ANDI(xFlags, xFlags, ~(1<<F_ZF));
                             if (rex.w) {
-                                // there is no atomic move on 16bytes, so faking it
+                                // there is no atomic move on 16bytes, so implement it with mutex
+                                LD(x9, xEmu, offsetof(x64emu_t, context));
+                                ADDI(x9, x9, offsetof(box64context_t, mutex_16b));
+                                ADDI(x4, xZR, 1);
+                                MARKLOCK;
+                                AMOSWAP_W(x4, x4, x9, 1, 1);
+                                // x4 == 1 if locked
+                                BNEZ_MARKLOCK(x4);
+
                                 SMDMB();
-                                // MARKLOCK;
                                 LD(x2, wback, 0);
                                 LD(x3, wback, 8);
                                 BNE_MARK(x2, xRAX);
@@ -204,6 +301,9 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                                 MV(xRDX, x3);
                                 MARK3;
                                 SMDMB();
+
+                                // unlock
+                                AMOSWAP_W(xZR, xZR, x9, 1, 1);
                             } else {
                                 SMDMB();
                                 MARKLOCK;
@@ -260,6 +360,64 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             }
             SMDMB();
             break;
+        case 0x29:
+            INST_NAME("LOCK SUB Ed, Gd");
+            SETFLAGS(X_ALL, SF_SET_PENDING);
+            nextop = F8;
+            GETGD;
+            SMDMB();
+            if(MODREG) {
+                ed = xRAX+(nextop&7)+(rex.b<<3);
+                emit_sub32(dyn, ninst, rex, ed, gd, x3, x4, x5);
+            } else {
+                addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, LOCK_LOCK, 0, 0);
+                MARKLOCK;
+                LRxw(x1, wback, 1, 1);
+                SUB(x4, x1, gd);
+                SCxw(x3, x4, wback, 1, 1);
+                BNEZ_MARKLOCK(x3);
+                IFX(X_ALL|X_PEND)
+                    emit_sub32(dyn, ninst, rex, x1, gd, x3, x4, x5);
+            }
+            SMDMB();
+            break;
+        case 0x80:
+            nextop = F8;
+            SMDMB();
+            switch((nextop>>3)&7) {
+                case 1: // OR
+                    INST_NAME("LOCK OR Eb, Ib");
+                    SETFLAGS(X_ALL, SF_SET_PENDING);
+                    if(MODREG) {
+                        GETEB(x1, 1);
+                        u8 = F8;
+                        emit_or8c(dyn, ninst, x1, u8, x2, x4, x5);
+                        EBBACK(x5, 0);
+                    } else {
+                        addr = geted(dyn, addr, ninst, nextop, &wback, x5, x1, &fixedaddress, rex, LOCK_LOCK, 0, 1);
+                        u8 = F8;
+                        ANDI(x2, wback, 3);
+                        SLLI(x2, x2, 3);     // offset in bits
+                        ANDI(x3, wback, ~3); // aligned addr
+                        ADDI(x1, xZR, u8);
+                        SLL(x1, x1, x2);     // Ib << offset
+                        MARKLOCK;
+                        LR_W(x4, x3, 1, 1);
+                        OR(x6, x4, x1);
+                        SC_W(x6, x6, x3, 1, 1);
+                        BNEZ_MARKLOCK(x6);
+                        IFX(X_ALL|X_PEND) {
+                            SRL(x1, x4, x2);
+                            ANDI(x1, x1, 0xFF);
+                            emit_or8c(dyn, ninst, x1, u8, x2, x4, x5);
+                        }
+                    }
+                    break;
+                default:
+                    DEFAULT;
+            }
+            SMDMB();
+            break;
         case 0x81:
         case 0x83:
             nextop = F8;
@@ -379,7 +537,7 @@ uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                             emit_sub32c(dyn, ninst, rex, x1, i64, x3, x4, x5, x6);
                     }
                     break;
-                default: 
+                default:
                     DEFAULT;
             }
             SMDMB();
diff --git a/src/dynarec/rv64/dynarec_rv64_f20f.c b/src/dynarec/rv64/dynarec_rv64_f20f.c
index 95f526f0..ac3da811 100644
--- a/src/dynarec/rv64/dynarec_rv64_f20f.c
+++ b/src/dynarec/rv64/dynarec_rv64_f20f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -35,7 +34,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     int v0, v1;
     int q0;
     int d0, d1;
-    int64_t fixedaddress;
+    int64_t fixedaddress, gdoffset;
     int unscaled;
 
     MAYUSE(d0);
@@ -82,11 +81,11 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x12:
             INST_NAME("MOVDDUP Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             LD(x3, wback, fixedaddress+0);
-            SD(x3, gback, 0);
-            SD(x3, gback, 8);
+            SD(x3, gback, gdoffset+0);
+            SD(x3, gback, gdoffset+8);
             break;
         case 0x2A:
             INST_NAME("CVTSI2SD Gx, Ed");
@@ -105,7 +104,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETGD;
             GETEXSD(v0, 0);
             if(!box64_dynarec_fastround) {
-                FSFLAGSI(xZR);  // // reset all bits
+                FSFLAGSI(0);  // // reset all bits
             }
             FCVTLDxw(gd, v0, RD_RTZ);
             if(!rex.w)
@@ -127,7 +126,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETGD;
             GETEXSD(v0, 0);
             if(!box64_dynarec_fastround) {
-                FSFLAGSI(xZR);  // // reset all bits
+                FSFLAGSI(0);  // // reset all bits
             }
             u8 = sse_setround(dyn, ninst, x2, x3);
             FCVTLDxw(gd, v0, RD_DYN);
@@ -184,8 +183,9 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETEXSD(d0, 0);
             GETGXSD_empty(d1);
             if(!box64_dynarec_fastnan) {
-                FMVDX(d1, xZR);
-                FLTD(x3, d0, d1);
+                v0 = fpu_get_scratch(dyn);  // need a scratch in case d0 == d1
+                FMVDX(v0, xZR);
+                FLTD(x3, d0, v0);
             }
             FSQRTD(d1, d0);
             if(!box64_dynarec_fastnan) {
@@ -275,7 +275,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x70: // TODO: Optimize this!
             INST_NAME("PSHUFLW Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             int32_t idx;
@@ -289,14 +289,14 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             idx = (u8>>(3*2))&3;
             LHU(x6, wback, fixedaddress+idx*2);
 
-            SH(x3, gback, 0*2);
-            SH(x4, gback, 1*2);
-            SH(x5, gback, 2*2);
-            SH(x6, gback, 3*2);
+            SH(x3, gback, gdoffset+0*2);
+            SH(x4, gback, gdoffset+1*2);
+            SH(x5, gback, gdoffset+2*2);
+            SH(x6, gback, gdoffset+3*2);
 
             if (!(MODREG && (gd==ed))) {
                 LD(x3, wback, fixedaddress+8);
-                SD(x3, gback, 8);
+                SD(x3, gback, gdoffset+8);
             }
             break;
         case 0xC2:
@@ -334,7 +334,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 }
                 case 7: break;                                      // Not NaN
                 }
-                
+
                 MARK2;
                 if ((u8&7) == 5 || (u8&7) == 6) {
                     MOV32w(x2, 1);
@@ -347,7 +347,7 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xE6:
             INST_NAME("CVTPD2DQ Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             d0 = fpu_get_scratch(dyn);
             u8 = sse_setround(dyn, ninst, x6, x4);
@@ -358,10 +358,17 @@ uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 SUB(x5, x5, x3);
                 BEQZ(x5, 8);
                 LUI(x3, 0x80000); // INT32_MIN
-                SW(x3, gback, 4*i);
+                SW(x3, gback, gdoffset+4*i);
             }
             x87_restoreround(dyn, ninst, u8);
-            SD(xZR, gback, 8);
+            SD(xZR, gback, gdoffset+8);
+            break;
+        case 0xF0:
+            INST_NAME("LDDQU Gx,Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+            SSE_LOOP_MV_Q(x3);
             break;
         default:
             DEFAULT;
diff --git a/src/dynarec/rv64/dynarec_rv64_f30f.c b/src/dynarec/rv64/dynarec_rv64_f30f.c
index 489d5ca0..0c0676e0 100644
--- a/src/dynarec/rv64/dynarec_rv64_f30f.c
+++ b/src/dynarec/rv64/dynarec_rv64_f30f.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 
 #include "debug.h"
@@ -35,7 +34,7 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
     int v0, v1;
     int q0, q1;
     int d0, d1;
-    int64_t fixedaddress;
+    int64_t fixedaddress, gdoffset;
     int unscaled;
     int64_t j64;
 
@@ -80,7 +79,22 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 SMWRITE2();
             }
             break;
-            
+
+        case 0x12:
+            INST_NAME("MOVSLDUP Gx, Ex");
+            nextop = F8;
+            GETGX();
+            GETEX(x2, 0);
+
+            // GX->ud[1] = GX->ud[0] = EX->ud[0];
+            // GX->ud[3] = GX->ud[2] = EX->ud[2];
+            LD(x3, wback, fixedaddress+0);
+            SD(x3, gback, gdoffset+0);
+            SD(x3, gback, gdoffset+4);
+            LD(x3, wback, fixedaddress+8);
+            SD(x3, gback, gdoffset+8);
+            SD(x3, gback, gdoffset+12);
+            break;
         case 0x1E:
             INST_NAME("NOP / ENDBR32 / ENDBR64");
             nextop = F8;
@@ -105,7 +119,7 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETGD;
             GETEXSS(d0, 0);
             if(!box64_dynarec_fastround) {
-                FSFLAGSI(xZR);  // // reset all bits
+                FSFLAGSI(0);  // // reset all bits
             }
             FCVTSxw(gd, d0, RD_RTZ);
             if(!rex.w)
@@ -121,6 +135,31 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 }
             }
             break;
+        case 0x2D:
+            INST_NAME("CVTSS2SI Gd, Ex");
+            nextop = F8;
+            GETGD;
+            GETEXSS(d0, 0);
+            if(!box64_dynarec_fastround) {
+                FSFLAGSI(0);  // // reset all bits
+            }
+            u8 = sse_setround(dyn, ninst, x5, x6);
+            FCVTSxw(gd, d0, RD_DYN);
+            x87_restoreround(dyn, ninst, u8);
+            if(!rex.w)
+                ZEROUP(gd);
+            if(!box64_dynarec_fastround) {
+                FRFLAGS(x5);   // get back FPSR to check the IOC bit
+                ANDI(x5, x5, (1<<FR_NV)|(1<<FR_OF));
+                CBZ_NEXT(x5);
+                if(rex.w) {
+                    MOV64x(gd, 0x8000000000000000LL);
+                } else {
+                    MOV32w(gd, 0x80000000);
+                }
+            }
+            break;
+
         case 0x51:
             INST_NAME("SQRTSS Gx, Ex");
             nextop = F8;
@@ -128,6 +167,16 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETGXSS_empty(v1);
             FSQRTS(v1, v0);
             break;
+        case 0x53:
+            INST_NAME("RCPSS Gx, Ex");
+            nextop = F8;
+            GETEXSS(v0, 0);
+            GETGXSS_empty(v1);
+            q0 = fpu_get_scratch(dyn);
+            LUI(x3, 0x3F800); // 1.0f
+            FMVWX(q0, x3);
+            FDIVS(v1, q0, v0);
+            break;
         case 0x58:
             INST_NAME("ADDSS Gx, Ex");
             nextop = F8;
@@ -196,14 +245,14 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x6F:
             INST_NAME("MOVDQU Gx,Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q(x3);
             break;
         case 0x70: // TODO: Optimize this!
             INST_NAME("PSHUFHW Gx, Ex, Ib");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 1);
             u8 = F8;
             int32_t idx;
@@ -217,14 +266,14 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             idx = 4+((u8>>(3*2))&3);
             LHU(x6, wback, fixedaddress+idx*2);
 
-            SH(x3, gback, (4+0)*2);
-            SH(x4, gback, (4+1)*2);
-            SH(x5, gback, (4+2)*2);
-            SH(x6, gback, (4+3)*2);
+            SH(x3, gback, gdoffset+(4+0)*2);
+            SH(x4, gback, gdoffset+(4+1)*2);
+            SH(x5, gback, gdoffset+(4+2)*2);
+            SH(x6, gback, gdoffset+(4+3)*2);
 
             if (!(MODREG && (gd==ed))) {
                 LD(x3, wback, fixedaddress+0);
-                SD(x3, gback, 0);
+                SD(x3, gback, gdoffset+0);
             }
             break;
         case 0x7E:
@@ -246,21 +295,21 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0x7F:
             INST_NAME("MOVDQU Ex,Gx");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             SSE_LOOP_MV_Q2(x3);
             if(!MODREG) SMWRITE2();
             break;
-        
+
         case 0x5B:
             INST_NAME("CVTTPS2DQ Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             v0 = fpu_get_scratch(dyn);
             for(int i=0; i<4; ++i) {
                 if(!box64_dynarec_fastround) {
-                    FSFLAGSI(xZR); // reset all bits
+                    FSFLAGSI(0); // reset all bits
                 }
                 FLW(v0, wback, fixedaddress+i*4);
                 FCVTWS(x3, v0, RD_RTZ);
@@ -270,7 +319,49 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     BEQZ(x5, 8);
                     MOV32w(x3, 0x80000000);
                 }
-                SW(x3, gback, i*4);
+                SW(x3, gback, gdoffset+i*4);
+            }
+            break;
+        case 0xB8:
+            INST_NAME("POPCNT Gd, Ed");
+            SETFLAGS(X_ALL, SF_SET);
+            SET_DFNONE();
+            nextop = F8;
+            GETED(0);
+            GETGD;
+            if(!rex.w && MODREG) {
+                AND(x4, ed, xMASK);
+                ed = x4;
+            }
+            CLEAR_FLAGS();
+            BNE_MARK(ed, xZR);
+            ORI(xFlags, xFlags, 1<<F_ZF);
+            MOV32w(gd, 0);
+            B_NEXT_nocond;
+            MARK;
+            if(rv64_zbb) {
+                CPOPxw(gd, ed);
+            } else {
+                TABLE64(x1, 0x5555555555555555uLL);
+                SRLI(x5, ed, 1);
+                AND(x5, x5, x1);
+                SUB(x5, ed, x5);
+                TABLE64(x3, 0x3333333333333333uLL);
+                SRLI(x1, x5, 2);
+                AND(x1, x1, x3);
+                AND(x5, x5, x3);
+                ADD(x5, x5, x1);
+                TABLE64(x3, 0x0F0F0F0F0F0F0F0FuLL);
+                SRLI(x1, x5, 4);
+                ADD(x5, x5, x1);
+                AND(x5, x5, x3);
+                SRLI(x1, x5, 32);
+                ADDW(x5, x5, x1);
+                SRLIW(x1, x5, 16);
+                ADDW(x5, x5, x1);
+                SRLIW(x1, x5, 8);
+                ADDW(x5, x5, x1);
+                ANDI(gd, x5, 0x7F);
             }
             break;
         case 0xBC:
@@ -284,21 +375,24 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 AND(x4, ed, xMASK);
                 ed = x4;
             }
-            BNE_MARK(ed, xZR);
             ANDI(xFlags, xFlags, ~((1<<F_ZF) | (1<<F_CF)));
+            BNE_MARK(ed, xZR);
             ORI(xFlags, xFlags, 1<<F_CF);
             MOV32w(gd, rex.w?64:32);
             B_NEXT_nocond;
             MARK;
-            NEG(x2, ed);
-            AND(x2, x2, ed);
-            TABLE64(x3, 0x03f79d71b4ca8b09ULL);
-            MUL(x2, x2, x3);
-            SRLI(x2, x2, 64-6);
-            TABLE64(x1, (uintptr_t)&deBruijn64tab);
-            ADD(x1, x1, x2);
-            LBU(gd, x1, 0);
-            ANDI(xFlags, xFlags, ~((1<<F_ZF) | (1<<F_CF)));
+            if(rv64_zbb) {
+                CTZxw(gd, ed);
+            } else {
+                NEG(x2, ed);
+                AND(x2, x2, ed);
+                TABLE64(x3, 0x03f79d71b4ca8b09ULL);
+                MUL(x2, x2, x3);
+                SRLI(x2, x2, 64-6);
+                TABLE64(x1, (uintptr_t)&deBruijn64tab);
+                ADD(x1, x1, x2);
+                LBU(gd, x1, 0);
+            }
             BNE(gd, xZR, 4+4);
             ORI(xFlags, xFlags, 1<<F_ZF);
             break;
@@ -319,38 +413,42 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             ORI(xFlags, xFlags, 1<<F_CF);
             B_NEXT_nocond;
             MARK;
-            if(ed!=gd)
-                u8 = gd;
-            else
-                u8 = x1;
-            ADDI(u8, xZR, rex.w?63:31);
-            if(rex.w) {
-                MV(x2, ed);
-                SRLI(x3, x2, 32);
+            if(rv64_zbb) {
+                CLZxw(gd, ed);
+            } else {
+                if(ed!=gd)
+                    u8 = gd;
+                else
+                    u8 = x1;
+                ADDI(u8, xZR, rex.w?63:31);
+                if(rex.w) {
+                    MV(x2, ed);
+                    SRLI(x3, x2, 32);
+                    BEQZ(x3, 4+2*4);
+                    SUBI(u8, u8, 32);
+                    MV(x2, x3);
+                } else {
+                    AND(x2, ed, xMASK);
+                }
+                SRLI(x3, x2, 16);
                 BEQZ(x3, 4+2*4);
-                SUBI(u8, u8, 32);
+                SUBI(u8, u8, 16);
                 MV(x2, x3);
-            } else {
-                AND(x2, ed, xMASK);
+                SRLI(x3, x2, 8);
+                BEQZ(x3, 4+2*4);
+                SUBI(u8, u8, 8);
+                MV(x2, x3);
+                SRLI(x3, x2, 4);
+                BEQZ(x3, 4+2*4);
+                SUBI(u8, u8, 4);
+                MV(x2, x3);
+                ANDI(x2, x2, 0b1111);
+                TABLE64(x3, (uintptr_t)&lead0tab);
+                ADD(x3, x3, x2);
+                LBU(x2, x3, 0);
+                SUB(gd, u8, x2);
+                MARK2;
             }
-            SRLI(x3, x2, 16);
-            BEQZ(x3, 4+2*4);
-            SUBI(u8, u8, 16);
-            MV(x2, x3);
-            SRLI(x3, x2, 8);
-            BEQZ(x3, 4+2*4);
-            SUBI(u8, u8, 8);
-            MV(x2, x3);
-            SRLI(x3, x2, 4);
-            BEQZ(x3, 4+2*4);
-            SUBI(u8, u8, 4);
-            MV(x2, x3);
-            ANDI(x2, x2, 0b1111); 
-            TABLE64(x3, (uintptr_t)&lead0tab);
-            ADD(x3, x3, x2);
-            LBU(x2, x3, 0);
-            SUB(gd, u8, x2);
-            MARK2;
             ANDI(xFlags, xFlags, ~((1<<F_ZF) | (1<<F_CF)));
             BNE(gd, xZR, 4+4);
             ORI(xFlags, xFlags, 1<<F_ZF);
@@ -391,7 +489,7 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
                 }
                 case 7: break;                                      // Not NaN
                 }
-                
+
                 MARK2;
                 if ((u8&7) == 5 || (u8&7) == 6) {
                     MOV32w(x2, 1);
@@ -405,7 +503,7 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         case 0xE6:
             INST_NAME("CVTDQ2PD Gx, Ex");
             nextop = F8;
-            GETGX(x1);
+            GETGX();
             GETEX(x2, 0);
             q0 = fpu_get_scratch(dyn);
             q1 = fpu_get_scratch(dyn);
@@ -413,8 +511,8 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
             LW(x4, wback, fixedaddress+4);
             FCVTDW(q0, x3, RD_RTZ);
             FCVTDW(q1, x4, RD_RTZ);
-            FSD(q0, gback, 0);
-            FSD(q1, gback, 8);
+            FSD(q0, gback, gdoffset+0);
+            FSD(q1, gback, gdoffset+8);
             break;
 
         default:
diff --git a/src/dynarec/rv64/dynarec_rv64_functions.c b/src/dynarec/rv64/dynarec_rv64_functions.c
index dade3016..541ac45f 100644
--- a/src/dynarec/rv64/dynarec_rv64_functions.c
+++ b/src/dynarec/rv64/dynarec_rv64_functions.c
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
 #include <errno.h>
 #include <string.h>
 #include <math.h>
@@ -13,7 +12,6 @@
 #include "box64context.h"
 #include "dynarec.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -130,7 +128,7 @@ int extcache_get_st_f(dynarec_rv64_t* dyn, int ninst, int a)
          && dyn->insts[ninst].e.extcache[i].n==a)
             return i;
     return -1;
-} 
+}
 int extcache_get_st_f_noback(dynarec_rv64_t* dyn, int ninst, int a)
 {
     for(int i=0; i<24; ++i)
@@ -138,7 +136,7 @@ int extcache_get_st_f_noback(dynarec_rv64_t* dyn, int ninst, int a)
          && dyn->insts[ninst].e.extcache[i].n==a)
             return i;
     return -1;
-} 
+}
 int extcache_get_current_st_f(dynarec_rv64_t* dyn, int a)
 {
     for(int i=0; i<24; ++i)
@@ -146,7 +144,7 @@ int extcache_get_current_st_f(dynarec_rv64_t* dyn, int a)
          && dyn->e.extcache[i].n==a)
             return i;
     return -1;
-} 
+}
 
 static void extcache_promote_double_forward(dynarec_rv64_t* dyn, int ninst, int maxinst, int a);
 static void extcache_promote_double_internal(dynarec_rv64_t* dyn, int ninst, int maxinst, int a);
@@ -155,7 +153,7 @@ static void extcache_promote_double_combined(dynarec_rv64_t* dyn, int ninst, int
     if(a == dyn->insts[ninst].e.combined1 || a == dyn->insts[ninst].e.combined2) {
         if(a == dyn->insts[ninst].e.combined1) {
             a = dyn->insts[ninst].e.combined2;
-        } else 
+        } else
             a = dyn->insts[ninst].e.combined1;
         int i = extcache_get_st_f_noback(dyn, ninst, a);
         //if(box64_dynarec_dump) dynarec_log(LOG_NONE, "extcache_promote_double_combined, ninst=%d combined%c %d i=%d (stack:%d/%d)\n", ninst, (a == dyn->insts[ninst].e.combined2)?'2':'1', a ,i, dyn->insts[ninst].e.stack_push, -dyn->insts[ninst].e.stack_pop);
@@ -328,7 +326,7 @@ void extcacheUnwind(extcache_t* cache)
 {
     if(cache->swapped) {
         // unswap
-        int a = -1; 
+        int a = -1;
         int b = -1;
         for(int j=0; j<24 && ((a==-1) || (b==-1)); ++j)
             if((cache->extcache[j].t == EXT_CACHE_ST_D || cache->extcache[j].t == EXT_CACHE_ST_F)) {
@@ -346,12 +344,21 @@ void extcacheUnwind(extcache_t* cache)
         cache->combined1 = cache->combined2 = 0;
     }
     if(cache->news) {
-        // reove the newly created extcache
+        // remove the newly created extcache
         for(int i=0; i<24; ++i)
             if(cache->news&(1<<i))
                 cache->extcache[i].v = 0;
         cache->news = 0;
     }
+    // add/change bad regs
+    for(int i=0; i<16; ++i) {
+        if(cache->olds[i].changed) {
+            cache->extcache[i].t = cache->olds[i].single?EXT_CACHE_SS:EXT_CACHE_SD;
+        } else if(cache->olds[i].purged) {
+            cache->extcache[i].n = i;
+            cache->extcache[i].t = cache->olds[i].single?EXT_CACHE_SS:EXT_CACHE_SD;
+        }
+    }
     if(cache->stack_push) {
         // unpush
         for(int j=0; j<24; ++j) {
@@ -484,15 +491,22 @@ const char* getCacheName(int t, int n)
     return buff;
 }
 
-void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name)
+void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name, rex_t rex)
 {
+    static const char* fnames[] = {
+        "ft0"," ft1", "ft2", "ft3", "ft4", "ft5", "ft6", "ft7",
+        "fs0", "fs1",
+        "fa0", "fa1", "fa2", "fa3", "fa4", "fa5", "fa6", "fa7",
+        "fs2", "fs3", "fs4", "fs5", "fs6", "fs7", "fs8", "fs9", "fs10", "fs11",
+        "ft8", "ft9", "ft10", "ft11"
+    };
     if(box64_dynarec_dump) {
-        printf_x64_instruction(my_context->dec, &dyn->insts[ninst].x64, name);
+        printf_x64_instruction(rex.is32bits?my_context->dec32:my_context->dec, &dyn->insts[ninst].x64, name);
         dynarec_log(LOG_NONE, "%s%p: %d emitted opcodes, inst=%d, barrier=%d state=%d/%d(%d), %s=%X/%X, use=%X, need=%X/%X, sm=%d/%d",
             (box64_dynarec_dump>1)?"\e[32m":"",
             (void*)(dyn->native_start+dyn->insts[ninst].address),
             dyn->insts[ninst].size/4,
-            ninst,         
+            ninst,
             dyn->insts[ninst].x64.barrier,
             dyn->insts[ninst].x64.state_flags,
             dyn->f.pending,
@@ -517,12 +531,12 @@ void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name)
             dynarec_log(LOG_NONE, ", last_ip=%p", (void*)dyn->last_ip);
         for(int ii=0; ii<24; ++ii) {
             switch(dyn->insts[ninst].e.extcache[ii].t) {
-                case EXT_CACHE_ST_D: dynarec_log(LOG_NONE, " D%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
-                case EXT_CACHE_ST_F: dynarec_log(LOG_NONE, " S%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
-                case EXT_CACHE_MM: dynarec_log(LOG_NONE, " D%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
-                case EXT_CACHE_SS: dynarec_log(LOG_NONE, " S%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
-                case EXT_CACHE_SD: dynarec_log(LOG_NONE, " D%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
-                case EXT_CACHE_SCR: dynarec_log(LOG_NONE, " D%d:%s", EXTREG(ii), getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_ST_D: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_ST_F: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_MM: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_SS: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_SD: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
+                case EXT_CACHE_SCR: dynarec_log(LOG_NONE, " %s:%s", fnames[EXTREG(ii)], getCacheName(dyn->insts[ninst].e.extcache[ii].t, dyn->insts[ninst].e.extcache[ii].n)); break;
                 case EXT_CACHE_NONE:
                 default:    break;
             }
diff --git a/src/dynarec/rv64/dynarec_rv64_functions.h b/src/dynarec/rv64/dynarec_rv64_functions.h
index fc53dcd7..451336bd 100644
--- a/src/dynarec/rv64/dynarec_rv64_functions.h
+++ b/src/dynarec/rv64/dynarec_rv64_functions.h
@@ -45,7 +45,7 @@ void extcacheUnwind(extcache_t* cache);
 
 const char* getCacheName(int t, int n);
 
-void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name);
+void inst_name_pass3(dynarec_native_t* dyn, int ninst, const char* name, rex_t rex);
 void print_opcode(dynarec_native_t* dyn, int ninst, uint32_t opcode);
 void print_newinst(dynarec_native_t* dyn, int ninst);
 
diff --git a/src/dynarec/rv64/dynarec_rv64_helper.c b/src/dynarec/rv64/dynarec_rv64_helper.c
index 37bcec29..a005c3b9 100644
--- a/src/dynarec/rv64/dynarec_rv64_helper.c
+++ b/src/dynarec/rv64/dynarec_rv64_helper.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
-#include <pthread.h>
 #include <errno.h>
 #include <assert.h>
 #include <string.h>
@@ -20,7 +19,6 @@
 #include "x64trace.h"
 #include "dynarec_native.h"
 #include "../dynablock_private.h"
-#include "../tools/bridge_private.h"
 #include "custommem.h"
 
 #include "rv64_printer.h"
@@ -28,11 +26,16 @@
 #include "dynarec_rv64_functions.h"
 #include "dynarec_rv64_helper.h"
 
+static uintptr_t geted_32(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, int *l, int i12);
+
 /* setup r2 to address pointed by ED, also fixaddress is an optionnal delta in the range [-absmax, +absmax], with delta&mask==0 to be added to ed for LDR/STR */
 uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, rex_t rex, int *l, int i12, int delta)
 {
     MAYUSE(dyn); MAYUSE(ninst); MAYUSE(delta);
 
+    if(rex.is32bits)
+        return geted_32(dyn, addr, ninst, nextop, ed, hint, scratch, fixaddress, l, i12);
+
     int lock = l?((l==LOCK_LOCK)?1:2):0;
     if(lock==2)
         *l = 0;
@@ -47,14 +50,19 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
         if((nextop&7)==4) {
             uint8_t sib = F8;
             int sib_reg = ((sib>>3)&7)+(rex.x<<3);
+            int sib_reg2 = (sib&0x7)+(rex.b<<3);
             if((sib&0x7)==5) {
                 int64_t tmp = F32S;
                 if (sib_reg!=4) {
                     if(tmp && ((tmp<-2048) || (tmp>maxval) || !i12)) {
                         MOV64x(scratch, tmp);
                         if((sib>>6)) {
-                            SLLI(ret, xRAX+sib_reg, (sib>>6));
-                            ADD(ret, ret, scratch);
+                            if(rv64_zba) {
+                                SHxADD(ret, xRAX+sib_reg, sib>>6, scratch);
+                            } else {
+                                SLLI(ret, xRAX+sib_reg, (sib>>6));
+                                ADD(ret, ret, scratch);
+                            }
                         } else {
                             ADD(ret, xRAX+sib_reg, scratch);
                         }
@@ -75,13 +83,17 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
             } else {
                 if (sib_reg!=4) {
                     if(sib>>6) {
-                        SLLI(scratch, xRAX+sib_reg, (sib>>6));
-                        ADD(ret, xRAX+(sib&0x7)+(rex.b<<3), scratch);
+                        if(rv64_zba) {
+                            SHxADD(ret, xRAX+sib_reg, sib>>6, xRAX+sib_reg2);
+                        } else {
+                            SLLI(scratch, xRAX+sib_reg, (sib>>6));
+                            ADD(ret, xRAX+sib_reg2, scratch);
+                        }
                     } else {
-                        ADD(ret, xRAX+(sib&0x7)+(rex.b<<3), xRAX+sib_reg);
+                        ADD(ret, xRAX+sib_reg2, xRAX+sib_reg);
                     }
                 } else {
-                    ret = xRAX+(sib&0x7)+(rex.b<<3);
+                    ret = xRAX+sib_reg2;
                 }
             }
         } else if((nextop&7)==5) {
@@ -125,6 +137,7 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
             sib = F8;
             sib_reg = ((sib>>3)&7)+(rex.x<<3);
         }
+        int sib_reg2 = (sib&0x07)+(rex.b<<3);
         if(nextop&0x80)
             i64 = F32S;
         else
@@ -134,13 +147,17 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
             if((nextop&7)==4) {
                 if (sib_reg!=4) {
                     if(sib>>6) {
-                        SLLI(scratch, xRAX+sib_reg, (sib>>6));
-                        ADD(ret, xRAX+(sib&0x07)+(rex.b<<3), scratch);
+                        if(rv64_zba) {
+                            SHxADD(ret, xRAX+sib_reg, sib>>6, xRAX+sib_reg2);
+                        } else {
+                            SLLI(scratch, xRAX+sib_reg, (sib>>6));
+                            ADD(ret, xRAX+sib_reg2, scratch);
+                        }
                     } else {
-                        ADD(ret, xRAX+(sib&0x07)+(rex.b<<3), xRAX+sib_reg);
+                        ADD(ret, xRAX+sib_reg2, xRAX+sib_reg);
                     }
                 } else {
-                    ret = xRAX+(sib&0x07)+(rex.b<<3);
+                    ret = xRAX+sib_reg2;
                 }
             } else
                 ret = xRAX+(nextop&0x07)+(rex.b<<3);
@@ -149,13 +166,17 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
                 if((nextop&7)==4) {
                     if (sib_reg!=4) {
                         if(sib>>6) {
-                            SLLI(scratch, xRAX+sib_reg, (sib>>6));
-                            ADD(scratch, xRAX+(sib&0x07)+(rex.b<<3), scratch);
+                            if(rv64_zba) {
+                                SHxADD(scratch, xRAX+sib_reg, sib>>6, xRAX+sib_reg2);
+                            } else {
+                                SLLI(scratch, xRAX+sib_reg, (sib>>6));
+                                ADD(scratch, xRAX+sib_reg2, scratch);
+                            }
                         } else {
-                            ADD(scratch, xRAX+(sib&0x07)+(rex.b<<3), xRAX+sib_reg);
+                            ADD(scratch, xRAX+sib_reg2, xRAX+sib_reg);
                         }
                     } else {
-                        scratch = xRAX+(sib&0x07)+(rex.b<<3);
+                        scratch = xRAX+sib_reg2;
                     }
                 } else
                     scratch = xRAX+(nextop&0x07)+(rex.b<<3);
@@ -164,15 +185,19 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
                 MOV64x(scratch, i64);
                 if((nextop&7)==4) {
                     if (sib_reg!=4) {
-                        ADD(scratch, scratch, xRAX+(sib&0x07)+(rex.b<<3));
+                        ADD(scratch, scratch, xRAX+sib_reg2);
                         if(sib>>6) {
-                            SLLI(ret, xRAX+sib_reg, (sib>>6));
-                            ADD(ret, scratch, ret);
+                            if(rv64_zba) {
+                                SHxADD(ret, xRAX+sib_reg, sib>>6, scratch);
+                            } else {
+                                SLLI(ret, xRAX+sib_reg, (sib>>6));
+                                ADD(ret, scratch, ret);
+                            }
                         } else {
                             ADD(ret, scratch, xRAX+sib_reg);
                         }
                     } else {
-                        PASS3(int tmp = xRAX+(sib&0x07)+(rex.b<<3));
+                        PASS3(int tmp = xRAX+sib_reg2);
                         ADD(ret, tmp, scratch);
                     }
                 } else {
@@ -186,6 +211,269 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
     return addr;
 }
 
+static uintptr_t geted_32(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, int *l, int i12)
+{
+    MAYUSE(dyn); MAYUSE(ninst);
+
+    int lock = l?((l==LOCK_LOCK)?1:2):0;
+    if(lock==2)
+        *l = 0;
+    uint8_t ret = x2;
+    *fixaddress = 0;
+    if(hint>0) ret = hint;
+    int maxval = 2047;
+    if(i12>1)
+        maxval -= i12;
+    MAYUSE(scratch);
+    if(!(nextop&0xC0)) {
+        if((nextop&7)==4) {
+            uint8_t sib = F8;
+            int sib_reg = (sib>>3)&0x7;
+            int sib_reg2 = sib&0x7;
+            if(sib_reg2==5) {
+                int64_t tmp = F32S;
+                if (sib_reg!=4) {
+                    if(tmp && ((tmp<-2048) || (tmp>maxval) || !i12)) {
+                        MOV32w(scratch, tmp);
+                        if((sib>>6)) {
+                            if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), scratch); else {SLLI(ret, xRAX+sib_reg, sib>>6); ADDW(ret, ret, scratch);}
+                        } else
+                            ADDW(ret, xRAX+sib_reg, scratch);
+                    } else {
+                        if(sib>>6)
+                            SLLI(ret, xRAX+sib_reg, (sib>>6));
+                        else
+                            ret = xRAX+sib_reg;
+                        *fixaddress = tmp;
+                    }
+                } else {
+                    switch(lock) {
+                        case 1: addLockAddress((int32_t)tmp); break;
+                        case 2: if(isLockAddress((int32_t)tmp)) *l=1; break;
+                    }
+                    MOV32w(ret, tmp);
+                }
+            } else {
+                if (sib_reg!=4) {
+                    if((sib>>6)) {
+                        if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else { SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, xRAX+sib_reg2);}
+                    } else
+                        ADDW(ret, xRAX+sib_reg2, xRAX+sib_reg);
+                } else {
+                    ret = xRAX+sib_reg2;
+                }
+            }
+        } else if((nextop&7)==5) {
+            uint32_t tmp = F32;
+            MOV32w(ret, tmp);
+            switch(lock) {
+                case 1: addLockAddress(tmp); break;
+                case 2: if(isLockAddress(tmp)) *l=1; break;
+            }
+        } else {
+            ret = xRAX+(nextop&7);
+            if(ret==hint) {
+                AND(hint, ret, xMASK);    //to clear upper part
+            }
+        }
+    } else {
+        int64_t i32;
+        uint8_t sib = 0;
+        int sib_reg = 0;
+        if((nextop&7)==4) {
+            sib = F8;
+            sib_reg = (sib>>3)&7;
+        }
+        int sib_reg2 = sib&0x07;
+        if(nextop&0x80)
+            i32 = F32S;
+        else
+            i32 = F8S;
+        if(i32==0 || ((i32>=-2048) && (i32<=2047)  && i12)) {
+            *fixaddress = i32;
+            if((nextop&7)==4) {
+                if (sib_reg!=4) {
+                    if(sib>>6) {
+                    if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else {SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, xRAX+sib_reg2);}
+                    } else
+                        ADDW(ret, xRAX+sib_reg2, xRAX+sib_reg);
+                } else {
+                    ret = xRAX+sib_reg2;
+                }
+            } else {
+                ret = xRAX+(nextop&0x07);
+            }
+        } else {
+            if(i32>=-2048 && i32<=2047) {
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        if(sib>>6) {
+                            if(rv64_zba) SHxADDUW(scratch, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else {SLLI(scratch, xRAX+sib_reg, sib>>6); ADDW(scratch, scratch, xRAX+sib_reg2);}
+                        } else
+                            ADDW(scratch, xRAX+sib_reg2, xRAX+sib_reg);
+                    } else {
+                        scratch = xRAX+sib_reg2;
+                    }
+                } else
+                    scratch = xRAX+(nextop&0x07);
+                ADDIW(ret, scratch, i32);
+            } else {
+                MOV32w(scratch, i32);
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        ADDW(scratch, scratch, xRAX+sib_reg2);
+                        if(sib>>6) {
+                            if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), scratch); else {SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, scratch);}
+                        } else
+                            ADDW(ret, scratch, xRAX+sib_reg);
+                    } else {
+                        PASS3(int tmp = xRAX+sib_reg2);
+                        ADDW(ret, tmp, scratch);
+                    }
+                } else {
+                    PASS3(int tmp = xRAX+(nextop&0x07));
+                    ADDW(ret, tmp, scratch);
+                }
+            }
+        }
+    }
+    *ed = ret;
+    return addr;
+}
+
+/* setup r2 to address pointed by ED, also fixaddress is an optionnal delta in the range [-absmax, +absmax], with delta&mask==0 to be added to ed for LDR/STR */
+uintptr_t geted32(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, rex_t rex, int *l, int i12, int delta)
+{
+    MAYUSE(dyn); MAYUSE(ninst); MAYUSE(delta);
+
+    int lock = l?((l==LOCK_LOCK)?1:2):0;
+    if(lock==2)
+        *l = 0;
+    uint8_t ret = x2;
+    *fixaddress = 0;
+    if(hint>0) ret = hint;
+    int maxval = 2047;
+    if(i12>1)
+        maxval -= i12;
+    MAYUSE(scratch);
+    if(!(nextop&0xC0)) {
+        if((nextop&7)==4) {
+            uint8_t sib = F8;
+            int sib_reg = ((sib>>3)&0x7)+(rex.x<<3);
+            int sib_reg2 = (sib&0x7)+(rex.b<<3);
+            if((sib&0x7)==5) {
+                int64_t tmp = F32S;
+                if (sib_reg!=4) {
+                    if(tmp && ((tmp<-2048) || (tmp>maxval) || !i12)) {
+                        MOV64x(scratch, tmp);
+                        if((sib>>6)) {
+                            if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), scratch); else {SLLI(ret, xRAX+sib_reg, sib>>6); ADDW(ret, ret, scratch);}
+                        } else
+                            ADDW(ret, xRAX+sib_reg, scratch);
+                    } else {
+                        if(sib>>6)
+                            SLLI(ret, xRAX+sib_reg, (sib>>6));
+                        else
+                            ret = xRAX+sib_reg;
+                        *fixaddress = tmp;
+                    }
+                } else {
+                    switch(lock) {
+                        case 1: addLockAddress(tmp); break;
+                        case 2: if(isLockAddress(tmp)) *l=1; break;
+                    }
+                    MOV64x(ret, tmp);
+                }
+            } else {
+                if (sib_reg!=4) {
+                    if((sib>>6)) {
+                        if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else { SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, xRAX+sib_reg2);}
+                    } else
+                        ADDW(ret, xRAX+sib_reg2, xRAX+sib_reg);
+                } else {
+                    ret = xRAX+sib_reg2;
+                }
+            }
+        } else if((nextop&7)==5) {
+            uint32_t tmp = F32;
+            MOV32w(ret, tmp);
+            GETIP(addr+delta);
+            ADDW(ret, ret, xRIP);
+            switch(lock) {
+                case 1: addLockAddress(addr+delta+tmp); break;
+                case 2: if(isLockAddress(addr+delta+tmp)) *l=1; break;
+            }
+        } else {
+            ret = xRAX+(nextop&7)+(rex.b<<3);
+            if(ret==hint) {
+                AND(hint, ret, xMASK);    //to clear upper part
+            }
+        }
+    } else {
+        int64_t i64;
+        uint8_t sib = 0;
+        int sib_reg = 0;
+        if((nextop&7)==4) {
+            sib = F8;
+            sib_reg = ((sib>>3)&7)+(rex.x<<3);
+        }
+        int sib_reg2 = (sib&0x07)+(rex.b<<3);
+        if(nextop&0x80)
+            i64 = F32S;
+        else
+            i64 = F8S;
+        if(i64==0 || ((i64>=-2048) && (i64<=2047)  && i12)) {
+            *fixaddress = i64;
+            if((nextop&7)==4) {
+                if (sib_reg!=4) {
+                    if(sib>>6) {
+                    if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else {SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, xRAX+sib_reg2);}
+                    } else
+                        ADDW(ret, xRAX+sib_reg2, xRAX+sib_reg);
+                } else {
+                    ret = xRAX+sib_reg2;
+                }
+            } else {
+                ret = xRAX+(nextop&0x07)+(rex.b<<3);
+            }
+        } else {
+            if(i64>=-2048 && i64<=2047) {
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        if(sib>>6) {
+                            if(rv64_zba) SHxADDUW(scratch, xRAX+sib_reg, (sib>>6), xRAX+sib_reg2); else {SLLI(scratch, xRAX+sib_reg, sib>>6); ADDW(scratch, scratch, xRAX+sib_reg2);}
+                        } else
+                            ADDW(scratch, xRAX+sib_reg2, xRAX+sib_reg);
+                    } else {
+                        scratch = xRAX+sib_reg2;
+                    }
+                } else
+                    scratch = xRAX+(nextop&0x07)+(rex.b<<3);
+                ADDIW(ret, scratch, i64);
+            } else {
+                MOV32w(scratch, i64);
+                if((nextop&7)==4) {
+                    if (sib_reg!=4) {
+                        ADDW(scratch, scratch, xRAX+sib_reg2);
+                        if(sib>>6) {
+                            if(rv64_zba) SHxADDUW(ret, xRAX+sib_reg, (sib>>6), scratch); else {SLLI(ret, xRAX+sib_reg, (sib>>6)); ADDW(ret, ret, scratch);}
+                        } else
+                            ADDW(ret, scratch, xRAX+sib_reg);
+                    } else {
+                        PASS3(int tmp = xRAX+sib_reg2);
+                        ADDW(ret, tmp, scratch);
+                    }
+                } else {
+                    PASS3(int tmp = xRAX+(nextop&0x07)+(rex.b<<3));
+                    ADDW(ret, tmp, scratch);
+                }
+            }
+        }
+    }
+    *ed = ret;
+    return addr;
+}
+
 void jump_to_epilog(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst)
 {
     MAYUSE(dyn); MAYUSE(ip); MAYUSE(ninst);
@@ -233,8 +521,7 @@ void jump_to_next(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst)
         MAYUSE(tbl);
         TABLE64(x3, tbl);
         SRLI(x2, xRIP, JMPTABL_START3);
-        SLLI(x2, x2, 3);
-        ADD(x3, x3, x2);
+        if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
         LD(x3, x3, 0); // could be LR_D(x3, x3, 1, 1); for better safety
         MOV64x(x4, JMPTABLE_MASK2<<3);    // x4 = mask
         SRLI(x2, xRIP, JMPTABL_START2-3);
@@ -256,8 +543,7 @@ void jump_to_next(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst)
             }
             AND(x2, xRIP, x4);
         }
-        SLLI(x2, x2, 3);
-        ADD(x3, x3, x2);
+        if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
         LD(x2, x3, 0); //LR_D(x2, x3, 1, 1);
     } else {
         uintptr_t p = getJumpTableAddress64(ip);
@@ -277,12 +563,12 @@ void jump_to_next(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst)
     JALR(x2); // save LR...
 }
 
-void ret_to_epilog(dynarec_rv64_t* dyn, int ninst)
+void ret_to_epilog(dynarec_rv64_t* dyn, int ninst, rex_t rex)
 {
     MAYUSE(dyn); MAYUSE(ninst);
     MESSAGE(LOG_DUMP, "Ret to epilog\n");
-    POP1(xRIP);
-    MV(x1, xRIP);
+    POP1z(xRIP);
+    MVz(x1, xRIP);
     SMEND();
     /*if(box64_dynarec_callret) {
         // pop the actual return address from RV64 stack
@@ -297,8 +583,7 @@ void ret_to_epilog(dynarec_rv64_t* dyn, int ninst)
     uintptr_t tbl = getJumpTable64();
     MOV64x(x3, tbl);
     SRLI(x2, xRIP, JMPTABL_START3);
-    SLLI(x2, x2, 3);
-    ADD(x3, x3, x2);
+    if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
     LD(x3, x3, 0);
     MOV64x(x4, JMPTABLE_MASK2<<3);    // x4 = mask
     SRLI(x2, xRIP, JMPTABL_START2-3);
@@ -320,25 +605,24 @@ void ret_to_epilog(dynarec_rv64_t* dyn, int ninst)
         }
         AND(x2, xRIP, x4);
     }
-    SLLI(x2, x2, 3);
-    ADD(x3, x3, x2);
+    if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
     LD(x2, x3, 0);
     JALR(x2); // save LR
     CLEARIP();
 }
 
-void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, int n)
+void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, rex_t rex, int n)
 {
     MAYUSE(dyn); MAYUSE(ninst);
     MESSAGE(LOG_DUMP, "Retn to epilog\n");
-    POP1(xRIP);
+    POP1z(xRIP);
     if(n>0x7ff) {
         MOV64x(w1, n);
-        ADD(xRSP, xRSP, x1);
+        ADDz(xRSP, xRSP, x1);
     } else {
-        ADDI(xRSP, xRSP, n);
+        ADDIz(xRSP, xRSP, n);
     }
-    MV(x1, xRIP);
+    MVz(x1, xRIP);
     SMEND();
     /*if(box64_dynarec_callret) {
         // pop the actual return address from RV64 stack
@@ -353,8 +637,7 @@ void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, int n)
     uintptr_t tbl = getJumpTable64();
     MOV64x(x3, tbl);
     SRLI(x2, xRIP, JMPTABL_START3);
-    SLLI(x2, x2, 3);
-    ADD(x3, x3, x2);
+    if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
     LD(x3, x3, 0);
     MOV64x(x4, JMPTABLE_MASK2<<3);    // x4 = mask
     SRLI(x2, xRIP, JMPTABL_START2-3);
@@ -376,8 +659,7 @@ void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, int n)
         }
         AND(x2, xRIP, x4);
     }
-    SLLI(x2, x2, 3);
-    ADD(x3, x3, x2);
+    if(rv64_zba) SH3ADD(x3, x2, x3); else {SLLI(x2, x2, 3); ADD(x3, x3, x2);}
     LD(x2, x3, 0);
     JALR(x2); // save LR
     CLEARIP();
@@ -388,26 +670,35 @@ void iret_to_epilog(dynarec_rv64_t* dyn, int ninst, int is64bits)
     //#warning TODO: is64bits
     MAYUSE(ninst);
     MESSAGE(LOG_DUMP, "IRet to epilog\n");
-    // POP IP
     NOTEST(x2);
-    POP1(xRIP);
-    // POP CS
-    POP1(x2);
+    if(is64bits) {
+        POP1(xRIP);
+        POP1(x2);
+        POP1(xFlags);
+    } else {
+        POP1_32(xRIP);
+        POP1_32(x2);
+        POP1_32(xFlags);
+    }
+
     SH(x2, xEmu, offsetof(x64emu_t, segs[_CS]));
-    MV(x1, xZR);
-    SD(x1, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
-    SD(x1, xEmu, offsetof(x64emu_t, segs_serial[_SS]));
-    // POP EFLAGS
-    POP1(xFlags);
+    SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_CS]));
+    // clean EFLAGS
     MOV32w(x1, 0x3F7FD7);
     AND(xFlags, xFlags, x1);
     ORI(xFlags, xFlags, 0x2);
     SET_DFNONE();
     // POP RSP
-    POP1(x3);
+    if (is64bits) {
+        POP1(x3);   //rsp
+        POP1(x2);   //ss
+    } else {
+        POP1_32(x3);   //rsp
+        POP1_32(x2);   //ss
+    }
     // POP SS
-    POP1(x2);
     SH(x2, xEmu, offsetof(x64emu_t, segs[_SS]));
+    SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_SS]));
     // set new RSP
     MV(xRSP, x3);
     // Ret....
@@ -434,6 +725,7 @@ void call_c(dynarec_rv64_t* dyn, int ninst, void* fnc, int reg, int ret, int sav
         // x5..x8, x10..x17, x28..x31 those needs to be saved by caller
         STORE_REG(RAX);
         STORE_REG(RCX);
+        STORE_REG(RDX);
         STORE_REG(R12);
         STORE_REG(R13);
         STORE_REG(R14);
@@ -452,6 +744,7 @@ void call_c(dynarec_rv64_t* dyn, int ninst, void* fnc, int reg, int ret, int sav
         #define GO(A)   if(ret!=x##A) {LOAD_REG(A);}
         GO(RAX);
         GO(RCX);
+        GO(RDX);
         GO(R12);
         GO(R13);
         GO(R14);
@@ -703,16 +996,14 @@ void x87_purgecache(dynarec_rv64_t* dyn, int ninst, int next, int s1, int s2, in
             for (int i=0; i<a; ++i) {
                 SUBI(s2, s2, 1);
                 ANDI(s2, s2, 7);    // (emu->top + st)&7
-                SLLI(s1, s2, 2);
-                ADD(s1, xEmu, s1);
+                if(rv64_zba) SH2ADD(s1, s2, xEmu); else {SLLI(s1, s2, 2); ADD(s1, xEmu, s1);}
                 SW(s3, s1, offsetof(x64emu_t, p_regs));
             }
         } else {
             // empty tags
             ADDI(s3, xZR, 0b11);
             for (int i=0; i<-a; ++i) {
-                SLLI(s1, s2, 2);
-                ADD(s1, xEmu, s1);
+                if(rv64_zba) SH2ADD(s1, s2, xEmu); else {SLLI(s1, s2, 2); ADD(s1, xEmu, s1);}
                 SW(s3, s1, offsetof(x64emu_t, p_regs));
                 ADDI(s2, s2, 1);
                 ANDI(s2, s2, 7);    // (emu->top + st)&7
@@ -741,8 +1032,7 @@ void x87_purgecache(dynarec_rv64_t* dyn, int ninst, int next, int s1, int s2, in
                 #endif
                 ADDI(s3, s2, dyn->e.x87cache[i]);
                 ANDI(s3, s3, 7);   // (emu->top + st)&7
-                SLLI(s1, s3, 3);
-                ADD(s1, xEmu, s1);
+                if(rv64_zba) SH3ADD(s1, s3, xEmu); else {SLLI(s1, s3, 3); ADD(s1, xEmu, s1);}
                 if(next) {
                     // need to check if a ST_F need local promotion
                     if(extcache_get_st_f(dyn, ninst, dyn->e.x87cache[i])>=0) {
@@ -801,8 +1091,7 @@ static void x87_reflectcache(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int
         if(dyn->e.x87cache[i]!=-1) {
             ADDI(s3, s2, dyn->e.x87cache[i]);
             ANDI(s3, s3, 7);   // (emu->top + i)&7
-            SLLI(s1, s3, 3);
-            ADD(s1, xEmu, s1);
+            if(rv64_zba) SH3ADD(s1, s3, xEmu); else {SLLI(s1, s3, 3); ADD(s1, xEmu, s1);}
             if(extcache_get_st_f(dyn, ninst, dyn->e.x87cache[i])>=0) {
                 FCVTDS(SCRATCH0, dyn->e.x87reg[i]);
                 FSD(SCRATCH0, s1, offsetof(x64emu_t, x87));
@@ -834,7 +1123,7 @@ int x87_get_current_cache(dynarec_rv64_t* dyn, int ninst, int st, int t)
     for (int i=0; i<8; ++i) {
         if(dyn->e.x87cache[i]==st) {
             #if STEP == 1
-            if(t==EXT_CACHE_ST_D && (dyn->e.extcache[dyn->e.x87reg[i]].t==EXT_CACHE_ST_F))
+            if(t==EXT_CACHE_ST_D && (dyn->e.extcache[EXTIDX(dyn->e.x87reg[i])].t==EXT_CACHE_ST_F))
                 extcache_promote_double(dyn, ninst, st);
             #endif
             return i;
@@ -866,8 +1155,7 @@ int x87_get_cache(dynarec_rv64_t* dyn, int ninst, int populate, int s1, int s2,
             ADDI(s2, s2, a);
             ANDI(s2, s2, 7);
         }
-        SLLI(s2, s2, 3);
-        ADD(s1, xEmu, s2);
+        if(rv64_zba) SH3ADD(s1, s2, xEmu); else  {SLLI(s2, s2, 3); ADD(s1, xEmu, s2);}
         FLD(dyn->e.x87reg[ret], s1, offsetof(x64emu_t, x87));
     }
     MESSAGE(LOG_DUMP, "\t-------x87 Cache for ST%d\n", st);
@@ -912,7 +1200,7 @@ void x87_refresh(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int st)
         ANDI(s2, s2, 7);    // (emu->top + i)&7
     }
     ADD(s1, xEmu, s2);
-    if(dyn->e.extcache[dyn->e.x87reg[ret]].t==EXT_CACHE_ST_F) {
+    if(dyn->e.extcache[EXTIDX(dyn->e.x87reg[ret])].t==EXT_CACHE_ST_F) {
         FCVTDS(SCRATCH0, dyn->e.x87reg[ret]);
         FSD(SCRATCH0, s1, offsetof(x64emu_t, x87));
     } else {
@@ -932,23 +1220,24 @@ void x87_forget(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int st)
         return;
     MESSAGE(LOG_DUMP, "\tForget x87 Cache for ST%d\n", st);
     #if STEP == 1
-    if(dyn->e.extcache[dyn->e.x87reg[ret]].t==EXT_CACHE_ST_F)
+    if(dyn->e.extcache[EXTIDX(dyn->e.x87reg[ret])].t==EXT_CACHE_ST_F)
         extcache_promote_double(dyn, ninst, st);
     #endif
     // prepare offset to fpu => s1
     // Get top
     LW(s2, xEmu, offsetof(x64emu_t, top));
     // Update
-    if(st) {
-        ADDI(s2, s2, st);
+    int a = st - dyn->e.x87stack;
+    if(a) {
+        ADDI(s2, s2, a);
         ANDI(s2, s2, 7);    // (emu->top + i)&7
     }
-    ADD(s1, xEmu, s2);
+    if(rv64_zba) SH3ADD(s1, s2, xEmu); else {SLLI(s2, s2, 3); ADD(s1, xEmu, s2);}
     FSD(dyn->e.x87reg[ret], s1, offsetof(x64emu_t, x87));
     MESSAGE(LOG_DUMP, "\t--------x87 Cache for ST%d\n", st);
     // and forget that cache
     fpu_free_reg(dyn, dyn->e.x87reg[ret]);
-    dyn->e.extcache[dyn->e.x87reg[ret]].v = 0;
+    dyn->e.extcache[EXTIDX(dyn->e.x87reg[ret])].v = 0;
     dyn->e.x87cache[ret] = -1;
     dyn->e.x87reg[ret] = -1;
 }
@@ -963,15 +1252,16 @@ void x87_reget_st(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int st)
             // refresh the value
             MESSAGE(LOG_DUMP, "\tRefresh x87 Cache for ST%d\n", st);
             #if STEP == 1
-            if(dyn->e.extcache[dyn->e.x87reg[i]].t==EXT_CACHE_ST_F)
+            if(dyn->e.extcache[EXTIDX(dyn->e.x87reg[i])].t==EXT_CACHE_ST_F)
                 extcache_promote_double(dyn, ninst, st);
             #endif
             LW(s2, xEmu, offsetof(x64emu_t, top));
             int a = st - dyn->e.x87stack;
-            ADDI(s2, s2, a);
-            AND(s2, s2, 7);
-            SLLI(s2, s2, 3);
-            ADD(s1, xEmu, s2);
+            if(a) {
+                ADDI(s2, s2, a);
+                AND(s2, s2, 7);
+            }
+            if(rv64_zba) SH3ADD(s1, s2, xEmu); else {SLLI(s2, s2, 3); ADD(s1, xEmu, s2);}
             FLD(dyn->e.x87reg[i], s1, offsetof(x64emu_t, x87));
             MESSAGE(LOG_DUMP, "\t-------x87 Cache for ST%d\n", st);
             // ok
@@ -991,8 +1281,7 @@ void x87_reget_st(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int st)
     int a = st - dyn->e.x87stack;
     ADDI(s2, s2, a);
     ANDI(s2, s2, 7);    // (emu->top + i)&7
-    SLLI(s2, s2, 3);
-    ADD(s1, xEmu, s2);
+    if(rv64_zba) SH3ADD(s1, s2, xEmu); else {SLLI(s2, s2, 3); ADD(s1, xEmu, s2);}
     FLD(dyn->e.x87reg[ret], s1, offsetof(x64emu_t, x87));
     MESSAGE(LOG_DUMP, "\t-------x87 Cache for ST%d\n", st);
 }
@@ -1084,6 +1373,16 @@ static int isx87Empty(dynarec_rv64_t* dyn)
     return 1;
 }
 
+// forget ext register for a MMX reg, does nothing if the regs is not loaded
+void mmx_forget_reg(dynarec_rv64_t* dyn, int ninst, int a)
+{
+    if (dyn->e.mmxcache[a] == -1)
+        return;
+    FSD(dyn->e.mmxcache[a], xEmu, offsetof(x64emu_t, mmx[a]));
+    fpu_free_reg(dyn, dyn->e.mmxcache[a]);
+    return;
+}
+
 // get neon register for a MMX reg, create the entry if needed
 int mmx_get_reg(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int a)
 {
@@ -1153,6 +1452,10 @@ int sse_get_reg(dynarec_rv64_t* dyn, int ninst, int s1, int a, int single)
         // forget / reload if change of size
         if(dyn->e.ssecache[a].single!=single) {
             sse_forget_reg(dyn, ninst, a);
+            // update olds after the forget...
+            dyn->e.olds[a].changed = 1;
+            dyn->e.olds[a].purged = 0;
+            dyn->e.olds[a].single = 1-single;
             return sse_get_reg(dyn, ninst, s1, a, single);
         }
         return dyn->e.ssecache[a].reg;
@@ -1176,6 +1479,10 @@ int sse_get_reg_empty(dynarec_rv64_t* dyn, int ninst, int s1, int a, int single)
             // need to wipe the half high 32bits of old Double because we now have a single
             //SW(xZR, xEmu, offsetof(x64emu_t, xmm[a])+4);
         }
+        dyn->e.olds[a].changed = 1;
+        dyn->e.olds[a].purged = 0;
+        dyn->e.olds[a].reg = EXTIDX(dyn->e.ssecache[a].reg);
+        dyn->e.olds[a].single = 1-single;
         dyn->e.ssecache[a].single = single;
         dyn->e.extcache[EXTIDX(dyn->e.ssecache[a].reg)].t = single?EXT_CACHE_SS:EXT_CACHE_SD;
         return dyn->e.ssecache[a].reg;
@@ -1194,6 +1501,10 @@ void sse_forget_reg(dynarec_rv64_t* dyn, int ninst, int a)
     else
         FSD(dyn->e.ssecache[a].reg, xEmu, offsetof(x64emu_t, xmm[a]));
     fpu_free_reg(dyn, dyn->e.ssecache[a].reg);
+    dyn->e.olds[a].changed = 0;
+    dyn->e.olds[a].purged = 1;
+    dyn->e.olds[a].reg = dyn->e.ssecache[a].reg;
+    dyn->e.olds[a].single = dyn->e.ssecache[a].single;
     dyn->e.ssecache[a].v = -1;
     return;
 }
@@ -1235,6 +1546,10 @@ static void sse_purgecache(dynarec_rv64_t* dyn, int ninst, int next, int s1)
                 FSD(dyn->e.ssecache[i].reg, xEmu, offsetof(x64emu_t, xmm[i]));
             if(!next) {
                 fpu_free_reg(dyn, dyn->e.ssecache[i].reg);
+                dyn->e.olds[i].changed = 0;
+                dyn->e.olds[i].purged = 1;
+                dyn->e.olds[i].reg = dyn->e.ssecache[i].reg;
+                dyn->e.olds[i].single = dyn->e.ssecache[i].single;
                 dyn->e.ssecache[i].v = -1;
             }
         }
@@ -1286,8 +1601,8 @@ void fpu_pushcache(dynarec_rv64_t* dyn, int ninst, int s1, int not07)
         for(int i=17; i<24; ++i)
             if(dyn->e.extcache[i].v!=0) {
                 switch(dyn->e.extcache[i].t) {
-                    case EXT_CACHE_ST_F: 
-                    case EXT_CACHE_SS: 
+                    case EXT_CACHE_ST_F:
+                    case EXT_CACHE_SS:
                         FSW(EXTREG(i), xSP, p*8);
                         break;
                     default:
@@ -1328,8 +1643,8 @@ void fpu_popcache(dynarec_rv64_t* dyn, int ninst, int s1, int not07)
         for(int i=17; i<24; ++i)
             if(dyn->e.extcache[i].v!=0) {
                 switch(dyn->e.extcache[i].t) {
-                    case EXT_CACHE_ST_F: 
-                    case EXT_CACHE_SS: 
+                    case EXT_CACHE_ST_F:
+                    case EXT_CACHE_SS:
                         FLW(EXTREG(i), xSP, p*8);
                         break;
                     default:
@@ -1387,7 +1702,7 @@ static void swapCache(dynarec_rv64_t* dyn, int ninst, int i, int j, extcache_t *
     int j_single = 0;
     if(cache->extcache[j].t==EXT_CACHE_SS || cache->extcache[j].t==EXT_CACHE_ST_F)
         j_single =1;
-    
+
     if(!cache->extcache[i].v) {
         // a mov is enough, no need to swap
         MESSAGE(LOG_DUMP, "\t  - Moving %d <- %d\n", i, j);
@@ -1454,12 +1769,12 @@ static void loadCache(dynarec_rv64_t* dyn, int ninst, int stack_cnt, int s1, int
             FLD(reg, xEmu, offsetof(x64emu_t, xmm[n]));
             break;
         case EXT_CACHE_MM:
-            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));
             FLD(reg, xEmu, offsetof(x64emu_t, mmx[i]));
             break;
         case EXT_CACHE_ST_D:
         case EXT_CACHE_ST_F:
-            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Loading %s\n", getCacheName(t, n));
             if((*s3_top) == 0xffff) {
                 LW(s3, xEmu, offsetof(x64emu_t, top));
                 *s3_top = 0;
@@ -1471,18 +1786,17 @@ static void loadCache(dynarec_rv64_t* dyn, int ninst, int stack_cnt, int s1, int
             }
             *s3_top += a;
             *s2_val = 0;
-            SLLI(s2, s3, 3);
-            ADD(s2, xEmu, s2);
+            if(rv64_zba) SH3ADD(s2, s3, xEmu); else {SLLI(s2, s3, 3); ADD(s2, xEmu, s2);}
             FLD(reg, s2, offsetof(x64emu_t, x87));
             if(t==EXT_CACHE_ST_F) {
                 FCVTSD(reg, reg);
             }
-            break;                    
+            break;
         case EXT_CACHE_NONE:
         case EXT_CACHE_SCR:
         default:    /* nothing done */
             MESSAGE(LOG_DUMP, "\t  - ignoring %s\n", getCacheName(t, n));
-            break; 
+            break;
     }
     cache->extcache[i].n = n;
     cache->extcache[i].t = t;
@@ -1501,12 +1815,12 @@ static void unloadCache(dynarec_rv64_t* dyn, int ninst, int stack_cnt, int s1, i
             FSD(reg, xEmu, offsetof(x64emu_t, xmm[n]));
             break;
         case EXT_CACHE_MM:
-            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));
             FSD(reg, xEmu, offsetof(x64emu_t, mmx[n]));
             break;
         case EXT_CACHE_ST_D:
         case EXT_CACHE_ST_F:
-            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));                    
+            MESSAGE(LOG_DUMP, "\t  - Unloading %s\n", getCacheName(t, n));
             if((*s3_top)==0xffff) {
                 LW(s3, xEmu, offsetof(x64emu_t, top));
                 *s3_top = 0;
@@ -1517,19 +1831,18 @@ static void unloadCache(dynarec_rv64_t* dyn, int ninst, int stack_cnt, int s1, i
                 ANDI(s3, s3, 7);
             }
             *s3_top += a;
-            SLLI(s2, s3, 3);
-            ADD(s2, xEmu, s2);
+            if(rv64_zba) SH3ADD(s2, s3, xEmu); else {SLLI(s2, s3, 3); ADD(s2, xEmu, s2);}
             *s2_val = 0;
             if(t==EXT_CACHE_ST_F) {
                 FCVTDS(reg, reg);
             }
             FSD(reg, s2, offsetof(x64emu_t, x87));
-            break;                    
+            break;
         case EXT_CACHE_NONE:
         case EXT_CACHE_SCR:
         default:    /* nothing done */
             MESSAGE(LOG_DUMP, "\t  - ignoring %s\n", getCacheName(t, n));
-            break; 
+            break;
     }
     cache->extcache[i].v = 0;
 }
@@ -1678,18 +1991,18 @@ static void flagsCacheTransform(dynarec_rv64_t* dyn, int ninst, int s1)
     int go = 0;
     switch (dyn->insts[jmp].f_entry.pending) {
         case SF_UNKNOWN: break;
-        case SF_SET: 
-            if(dyn->f.pending!=SF_SET && dyn->f.pending!=SF_SET_PENDING) 
-                go = 1; 
+        case SF_SET:
+            if(dyn->f.pending!=SF_SET && dyn->f.pending!=SF_SET_PENDING)
+                go = 1;
             break;
         case SF_SET_PENDING:
-            if(dyn->f.pending!=SF_SET 
+            if(dyn->f.pending!=SF_SET
             && dyn->f.pending!=SF_SET_PENDING
-            && dyn->f.pending!=SF_PENDING) 
-                go = 1; 
+            && dyn->f.pending!=SF_PENDING)
+                go = 1;
             break;
         case SF_PENDING:
-            if(dyn->f.pending!=SF_SET 
+            if(dyn->f.pending!=SF_SET
             && dyn->f.pending!=SF_SET_PENDING
             && dyn->f.pending!=SF_PENDING)
                 go = 1;
@@ -1702,11 +2015,11 @@ static void flagsCacheTransform(dynarec_rv64_t* dyn, int ninst, int s1)
     if(go) {
         if(dyn->f.pending!=SF_PENDING) {
             LW(s1, xEmu, offsetof(x64emu_t, df));
-            j64 = (GETMARK3)-(dyn->native_size);
+            j64 = (GETMARKF2)-(dyn->native_size);
             BEQZ(s1, j64);
         }
         CALL_(UpdateFlags, -1, 0);
-        MARK3;
+        MARKF2;
     }
 #endif
 }
@@ -1734,7 +2047,7 @@ void rv64_move32(dynarec_rv64_t* dyn, int ninst, int reg, int32_t val, int zerou
         LUI(reg, hi20);
         src = reg;
     }
-    if (lo12 || !hi20) ADDI(reg, src, lo12);
+    if (lo12 || !hi20) ADDIW(reg, src, lo12);
     if((zeroup && ((hi20&0x80000) || (!hi20 && (lo12&0x800)))
     || (!zeroup && !(val&0x80000000) && ((hi20&0x80000) || (!hi20 && (lo12&0x800)))))) {
         ZEROUP(reg);
diff --git a/src/dynarec/rv64/dynarec_rv64_helper.h b/src/dynarec/rv64/dynarec_rv64_helper.h
index b12ee96b..0b1023b3 100644
--- a/src/dynarec/rv64/dynarec_rv64_helper.h
+++ b/src/dynarec/rv64/dynarec_rv64_helper.h
@@ -99,6 +99,25 @@
                     LD(x1, wback, fixedaddress);        \
                     ed = x1;                            \
                 }
+#define GETEDz(D) if(MODREG) {                          \
+                    ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                    wback = 0;                          \
+                } else {                                \
+                    SMREAD()                            \
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, D); \
+                    LDz(x1, wback, fixedaddress);       \
+                    ed = x1;                            \
+                }
+// GETED32 can use r1 for ed, and r2 for wback. wback is 0 if ed is xEAX..xEDI
+#define GETED32(D)  if(MODREG) {                        \
+                    ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                    wback = 0;                          \
+                } else {                                \
+                    SMREAD()                            \
+                    addr = geted32(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, NULL, 1, D); \
+                    LDxw(x1, wback, fixedaddress);      \
+                    ed = x1;                            \
+                }
 //GETEDH can use hint for ed, and x1 or x2 for wback (depending on hint), might also use x3. wback is 0 if ed is xEAX..xEDI
 #define GETEDH(hint, D) if(MODREG) {                    \
                     ed = xRAX+(nextop&7)+(rex.b<<3);    \
@@ -109,13 +128,23 @@
                     LDxw(hint, wback, fixedaddress);    \
                     ed = hint;                          \
                 }
+//GETEDW can use hint for wback and ret for ed. wback is 0 if ed is xEAX..xEDI
+#define GETEDW(hint, ret, D)   if(MODREG) {             \
+                    ed = xRAX+(nextop&7)+(rex.b<<3);    \
+                    MV(ret, ed);                        \
+                    wback = 0;                          \
+                } else {                                \
+                    SMREAD();                           \
+                    addr = geted(dyn, addr, ninst, nextop, &wback, (hint==x2)?x1:x2, (hint==x1)?x1:x3, &fixedaddress, rex, NULL, 0, D); \
+                    ed = ret;                           \
+                    LDxw(ed, wback, fixedaddress);      \
+                }
 // GETGW extract x64 register in gd, that is i
-#define GETGW(i) gd = xRAX+((nextop&0x38)>>3)+(rex.r<<3); SLLI(i, gd, 48); SRLI(i, i, 48); gd = i;
+#define GETGW(i) gd = xRAX+((nextop&0x38)>>3)+(rex.r<<3); ZEXTH(i, gd); gd = i;
 //GETEWW will use i for ed, and can use w for wback.
 #define GETEWW(w, i, D) if(MODREG) {        \
                     wback = xRAX+(nextop&7)+(rex.b<<3);\
-                    SLLI(i, wback, 48);     \
-                    SRLI(i, i, 48);         \
+                    ZEXTH(i, wback);        \
                     ed = i;                 \
                     wb1 = 0;                \
                 } else {                    \
@@ -130,8 +159,7 @@
 //GETSEW will use i for ed, and can use r3 for wback. This is the Signed version
 #define GETSEW(i, D) if(MODREG) {           \
                     wback = xRAX+(nextop&7)+(rex.b<<3);\
-                    SLLI(i, wback, 48);     \
-                    SRAI(i, i, 48);         \
+                    if(rv64_zbb) SEXTH(i, wback); else {SLLI(i, wback, 48); SRAI(i, i, 48);}\
                     ed = i;                 \
                     wb1 = 0;                \
                 } else {                    \
@@ -159,6 +187,7 @@
                     LDxw(x1, S, fixedaddress);          \
                     ed = x1;                            \
                 }
+#define WBACKO(O)   if(wback) {ADD(O, wback, O); SDxw(ed, O, 0); SMWRITE2();}
 
 // FAKEED like GETED, but doesn't get anything
 #define FAKEED  if(!MODREG) {   \
@@ -191,6 +220,28 @@
                     wb1 = 1;                    \
                     ed = i;                     \
                 }
+//GETEBO will use i for ed, i is also Offset, and can use r3 for wback.
+#define GETEBO(i, D) if(MODREG) {               \
+                    if(rex.rex) {               \
+                        wback = xRAX+(nextop&7)+(rex.b<<3);     \
+                        wb2 = 0;                \
+                    } else {                    \
+                        wback = (nextop&7);     \
+                        wb2 = (wback>>2)*8;     \
+                        wback = xRAX+(wback&3); \
+                    }                           \
+                    if (wb2) {MV(i, wback); SRLI(i, i, wb2); ANDI(i, i, 0xff);} else {ANDI(i, wback, 0xff);}   \
+                    wb1 = 0;                    \
+                    ed = i;                     \
+                } else {                        \
+                    SMREAD();                   \
+                    addr = geted(dyn, addr, ninst, nextop, &wback, x3, x2, &fixedaddress, rex, NULL, 1, D); \
+                    ADD(x3, wback, i);          \
+                    if(wback!=x3) wback = x3;   \
+                    LBU(i, wback, fixedaddress);\
+                    wb1 = 1;                    \
+                    ed = i;                     \
+                }
 //GETSEB sign extend EB, will use i for ed, and can use r3 for wback.
 #define GETSEB(i, D) if(MODREG) {                \
                     if(rex.rex) {               \
@@ -213,6 +264,26 @@
                     wb1 = 1;                    \
                     ed = i;                     \
                 }
+// GETEB32 will use i for ed, and can use r3 for wback.
+#define GETEB32(i, D) if(MODREG) {                \
+                    if(rex.rex) {               \
+                        wback = xRAX+(nextop&7)+(rex.b<<3);     \
+                        wb2 = 0;                \
+                    } else {                    \
+                        wback = (nextop&7);     \
+                        wb2 = (wback>>2)*8;     \
+                        wback = xRAX+(wback&3); \
+                    }                           \
+                    if (wb2) {MV(i, wback); SRLI(i, i, wb2); ANDI(i, i, 0xff);} else {ANDI(i, wback, 0xff);}   \
+                    wb1 = 0;                    \
+                    ed = i;                     \
+                } else {                        \
+                    SMREAD();                   \
+                    addr = geted32(dyn, addr, ninst, nextop, &wback, x3, x2, &fixedaddress, rex, NULL, 1, D); \
+                    LBU(i, wback, fixedaddress);\
+                    wb1 = 1;                    \
+                    ed = i;                     \
+                }
 
 //GETGB will use i for gd
 #define GETGB(i) if(rex.rex) {                                \
@@ -228,7 +299,6 @@
 
 // Write gb (gd) back to original register / memory, using s1 as scratch
 #define GBBACK(s1) if(gb2) {                            \
-                    assert(gb2 == 8);                   \
                     MOV64x(s1, 0xffffffffffff00ffLL);   \
                     AND(gb1, gb1, s1);                  \
                     SLLI(s1, gd, 8);                    \
@@ -243,7 +313,6 @@
                     SB(ed, wback, fixedaddress);        \
                     SMWRITE();                          \
                 } else if(wb2) {                        \
-                    assert(wb2 == 8);                   \
                     MOV64x(s1, 0xffffffffffff00ffLL);   \
                     AND(wback, wback, s1);              \
                     if (c) {ANDI(ed, ed, 0xff);}        \
@@ -309,31 +378,49 @@
     }
 
 // Will get pointer to GX in general register a, will purge SS or SD if loaded. can use gback as load address
-#define GETGX(a)                        \
-    gd = ((nextop&0x38)>>3)+(rex.r<<3); \
-    sse_forget_reg(dyn, ninst, gd);     \
-    gback = a;                          \
-    ADDI(a, xEmu, offsetof(x64emu_t, xmm[gd]))
+#define GETGX()                             \
+    gd = ((nextop&0x38)>>3)+(rex.r<<3);     \
+    sse_forget_reg(dyn, ninst, gd);         \
+    gback = xEmu;                           \
+    gdoffset = offsetof(x64emu_t, xmm[gd])
 
 // Get Ex address in general register a, will purge SS or SD if it's reg and is loaded. May use x3. Use wback as load address!
 #define GETEX(a, D)                                                                                     \
     if(MODREG) {                                                                                        \
         ed = (nextop&7)+(rex.b<<3);                                                                     \
         sse_forget_reg(dyn, ninst, ed);                                                                 \
-        fixedaddress = 0;                                                                               \
-        ADDI(a, xEmu, offsetof(x64emu_t, xmm[ed]));                                                     \
-        wback = a;                                                                                      \
+        fixedaddress = offsetof(x64emu_t, xmm[ed]);                                                     \
+        wback = xEmu;                                                                                   \
     } else {                                                                                            \
         SMREAD();                                                                                       \
         ed=16;                                                                                          \
         addr = geted(dyn, addr, ninst, nextop, &wback, a, x3, &fixedaddress, rex, NULL, 1, D);          \
     }
 
+#define GETGM()                             \
+    gd = ((nextop&0x38)>>3);                \
+    mmx_forget_reg(dyn, ninst, gd);         \
+    gback = xEmu;                           \
+    gdoffset = offsetof(x64emu_t, mmx[gd])
+
+// Get EM, might use x3
+#define GETEM(a, D)                                                                             \
+    if(MODREG) {                                                                                \
+        ed = (nextop&7);                                                                        \
+        mmx_forget_reg(dyn, ninst, ed);                                                         \
+        fixedaddress = offsetof(x64emu_t, mmx[ed]);                                             \
+        wback = xEmu;                                                                           \
+    } else {                                                                                    \
+        SMREAD();                                                                               \
+        ed=8;                                                                                   \
+        addr = geted(dyn, addr, ninst, nextop, &wback, a, x3, &fixedaddress, rex, NULL, 1, D);  \
+    }
+
 #define SSE_LOOP_D_ITEM(GX1, EX1, F, i) \
-    LWU(GX1, gback, i*4);               \
+    LWU(GX1, gback, gdoffset+i*4);      \
     LWU(EX1, wback, fixedaddress+i*4);  \
     F;                                  \
-    SW(GX1, gback, i*4);
+    SW(GX1, gback, gdoffset+i*4);
 
 // Loop for SSE opcode that use 32bits value and write to GX.
 #define SSE_LOOP_D(GX1, EX1, F)     \
@@ -343,10 +430,10 @@
     SSE_LOOP_D_ITEM(GX1, EX1, F, 3)
 
 #define SSE_LOOP_DS_ITEM(GX1, EX1, F, i) \
-    LW(GX1, gback, i*4);                 \
+    LW(GX1, gback, gdoffset+i*4);        \
     LW(EX1, wback, fixedaddress+i*4);    \
     F;                                   \
-    SW(GX1, gback, i*4);
+    SW(GX1, gback, gdoffset+i*4);
 
 // Loop for SSE opcode that use 32bits value and write to GX.
 #define SSE_LOOP_DS(GX1, EX1, F)     \
@@ -355,20 +442,28 @@
     SSE_LOOP_DS_ITEM(GX1, EX1, F, 2) \
     SSE_LOOP_DS_ITEM(GX1, EX1, F, 3)
 
+#define MMX_LOOP_W(GX1, EX1, F)            \
+    for (int i=0; i<4; ++i) {              \
+        LHU(GX1, gback, gdoffset+i*2);     \
+        LHU(EX1, wback, fixedaddress+i*2); \
+        F;                                 \
+        SH(GX1, gback, gdoffset+i*2);      \
+    }
+
 #define SSE_LOOP_W(GX1, EX1, F)            \
     for (int i=0; i<8; ++i) {              \
-        LHU(GX1, gback, i*2);              \
+        LHU(GX1, gback, gdoffset+i*2);     \
         LHU(EX1, wback, fixedaddress+i*2); \
         F;                                 \
-        SH(GX1, gback, i*2);               \
+        SH(GX1, gback, gdoffset+i*2);      \
     }
 
 #define SSE_LOOP_WS(GX1, EX1, F)          \
     for (int i=0; i<8; ++i) {             \
-        LH(GX1, gback, i*2);              \
+        LH(GX1, gback, gdoffset+i*2);     \
         LH(EX1, wback, fixedaddress+i*2); \
         F;                                \
-        SH(GX1, gback, i*2);              \
+        SH(GX1, gback, gdoffset+i*2);     \
     }
 
 #define SSE_LOOP_D_S_ITEM(EX1, F, i)    \
@@ -384,10 +479,10 @@
     SSE_LOOP_D_S_ITEM(EX1, F, 3)
 
 #define SSE_LOOP_Q_ITEM(GX1, EX1, F, i) \
-    LD(GX1, gback, i*8);                \
+    LD(GX1, gback, gdoffset+i*8);       \
     LD(EX1, wback, fixedaddress+i*8);   \
     F;                                  \
-    SD(GX1, gback, i*8);
+    SD(GX1, gback, gdoffset+i*8);
 
 // Loop for SSE opcode that use 64bits value and write to GX.
 #define SSE_LOOP_Q(GX1, EX1, F)     \
@@ -396,10 +491,10 @@
 
 
 #define SSE_LOOP_FQ_ITEM(GX1, EX1, F, i)            \
-    FLD(v0, gback, i*8);                            \
+    FLD(v0, gback, gdoffset+i*8);                   \
     FLD(v1, wback, fixedaddress+i*8);               \
     F;                                              \
-    FSD(v0, gback, i*8);
+    FSD(v0, gback, gdoffset+i*8);
 
 #define SSE_LOOP_FQ(GX1, EX1, F)     \
     v0 = fpu_get_scratch(dyn);       \
@@ -410,7 +505,7 @@
 
 #define SSE_LOOP_MV_Q_ITEM(s, i)      \
     LD(s, wback, fixedaddress+i*8);   \
-    SD(s, gback, i*8);
+    SD(s, gback, gdoffset+i*8);
 
 // Loop for SSE opcode that moves 64bits value from wback to gback, use s as scratch.
 #define SSE_LOOP_MV_Q(s)     \
@@ -418,7 +513,7 @@
     SSE_LOOP_MV_Q_ITEM(s, 1)
 
 #define SSE_LOOP_MV_Q_ITEM2(s, i)     \
-    LD(s, gback, i*8);                \
+    LD(s, gback, gdoffset+i*8);       \
     SD(s, wback, fixedaddress+i*8);
 
 // Loop for SSE opcode that moves 64bits value from gback to wback, use s as scratch.
@@ -436,17 +531,19 @@
 // R0 will not be pushed/popd if ret is -2. Flags are not save/restored
 #define CALL_S(F, ret) call_c(dyn, ninst, F, x6, ret, 0, 0)
 
-#define MARK    dyn->insts[ninst].mark = dyn->native_size
-#define GETMARK dyn->insts[ninst].mark
-#define MARK2   dyn->insts[ninst].mark2 = dyn->native_size
-#define GETMARK2 dyn->insts[ninst].mark2
-#define MARK3   dyn->insts[ninst].mark3 = dyn->native_size
-#define GETMARK3 dyn->insts[ninst].mark3
-#define MARKF   dyn->insts[ninst].markf = dyn->native_size
-#define GETMARKF dyn->insts[ninst].markf
-#define MARKSEG dyn->insts[ninst].markseg = dyn->native_size
-#define GETMARKSEG dyn->insts[ninst].markseg
-#define MARKLOCK dyn->insts[ninst].marklock = dyn->native_size
+#define MARK        dyn->insts[ninst].mark = dyn->native_size
+#define GETMARK     dyn->insts[ninst].mark
+#define MARK2       dyn->insts[ninst].mark2 = dyn->native_size
+#define GETMARK2    dyn->insts[ninst].mark2
+#define MARK3       dyn->insts[ninst].mark3 = dyn->native_size
+#define GETMARK3    dyn->insts[ninst].mark3
+#define MARKF       dyn->insts[ninst].markf = dyn->native_size
+#define GETMARKF    dyn->insts[ninst].markf
+#define MARKF2      dyn->insts[ninst].markf2 = dyn->native_size
+#define GETMARKF2   dyn->insts[ninst].markf2
+#define MARKSEG     dyn->insts[ninst].markseg = dyn->native_size
+#define GETMARKSEG  dyn->insts[ninst].markseg
+#define MARKLOCK    dyn->insts[ninst].marklock = dyn->native_size
 #define GETMARKLOCK dyn->insts[ninst].marklock
 
 #define Bxx_gen(OP, M, reg1, reg2)      \
@@ -526,7 +623,7 @@
 #define STORE_REG(A)    SD(x##A, xEmu, offsetof(x64emu_t, regs[_##A]))
 #define LOAD_REG(A)     LD(x##A, xEmu, offsetof(x64emu_t, regs[_##A]))
 
-// Need to also store current value of some register, as they may be used by functions like setjump
+// Need to also store current value of some register, as they may be used by functions like setjmp
 #define STORE_XEMU_CALL()   \
     STORE_REG(RBX);         \
     STORE_REG(RDX);         \
@@ -606,11 +703,11 @@
 
 // Adjust the xFlags bit 5 -> bit 11, src and dst can be the same (and can be xFlags, but not s1)
 #define FLAGS_ADJUST_TO11(dst, src, s1) \
-    MOV64x(s1, ~(1<<11));               \
-    AND(dst, src, s1);                  \
-    ANDI(s1, dst, 1<<5);                \
-    SLLI(s1, s1, 11-5);                 \
-    ANDI(dst, dst, ~(1<<5));            \
+    LUI(s1, 0xFFFFF);                   \
+    ADDIW(s1, s1, 0x7DF);               \
+    AND(s1, src, s1);                   \
+    ANDI(dst, src, 1<<5);               \
+    SLLI(dst, dst, 11-5);               \
     OR(dst, dst, s1)
 
 #ifndef MAYSETFLAGS
@@ -721,8 +818,8 @@
 
 #define MODREG  ((nextop&0xC0)==0xC0)
 
-void rv64_epilog();
-void rv64_epilog_fast();
+void rv64_epilog(void);
+void rv64_epilog_fast(void);
 void* rv64_next(x64emu_t* emu, uintptr_t addr);
 
 #ifndef STEPNAME
@@ -863,6 +960,7 @@ void* rv64_next(x64emu_t* emu, uintptr_t addr);
 #define sse_setround    STEPNAME(sse_setround)
 #define mmx_get_reg     STEPNAME(mmx_get_reg)
 #define mmx_get_reg_empty STEPNAME(mmx_get_reg_empty)
+#define mmx_forget_reg   STEPNAME(mmx_forget_reg)
 #define sse_get_reg     STEPNAME(sse_get_reg)
 #define sse_get_reg_empty STEPNAME(sse_get_reg_empty)
 #define sse_forget_reg   STEPNAME(sse_forget_reg)
@@ -888,7 +986,7 @@ void* rv64_next(x64emu_t* emu, uintptr_t addr);
 uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, rex_t rex, int* l, int i12, int delta);
 
 /* setup r2 to address pointed by */
-//uintptr_t geted32(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int absmax, uint32_t mask, rex_t rex, int* l, int s, int delta);
+uintptr_t geted32(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, uint8_t scratch, int64_t* fixaddress, rex_t rex, int* l, int i12, int delta);
 
 /* setup r2 to address pointed by */
 //uintptr_t geted16(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop, uint8_t* ed, uint8_t hint, int64_t* fixaddress, int absmax, uint32_t mask, int s);
@@ -898,8 +996,8 @@ uintptr_t geted(dynarec_rv64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
 void jump_to_epilog(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst);
 void jump_to_epilog_fast(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst);
 void jump_to_next(dynarec_rv64_t* dyn, uintptr_t ip, int reg, int ninst);
-void ret_to_epilog(dynarec_rv64_t* dyn, int ninst);
-void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, int n);
+void ret_to_epilog(dynarec_rv64_t* dyn, int ninst, rex_t rex);
+void retn_to_epilog(dynarec_rv64_t* dyn, int ninst, rex_t rex, int n);
 void iret_to_epilog(dynarec_rv64_t* dyn, int ninst, int is64bits);
 void call_c(dynarec_rv64_t* dyn, int ninst, void* fnc, int reg, int ret, int saveflags, int save_reg);
 void call_n(dynarec_rv64_t* dyn, int ninst, void* fnc, int w);
@@ -950,10 +1048,10 @@ void emit_inc8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4);
 void emit_dec32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5);
 void emit_dec16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, int s5);
 void emit_dec8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4);
-void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5);
+void emit_adc32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5, int s6);
 //void emit_adc32c(dynarec_rv64_t* dyn, int ninst, int s1, int32_t c, int s3, int s4);
-//void emit_adc8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4);
-//void emit_adc8c(dynarec_rv64_t* dyn, int ninst, int s1, int32_t c, int s3, int s4, int s5);
+void emit_adc8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, int s5);
+void emit_adc8c(dynarec_rv64_t* dyn, int ninst, int s1, int32_t c, int s3, int s4, int s5, int s6);
 void emit_adc16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, int s5);
 //void emit_adc16c(dynarec_rv64_t* dyn, int ninst, int s1, int32_t c, int s3, int s4);
 void emit_sbb32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s3, int s4, int s5);
@@ -1047,12 +1145,20 @@ int extcache_st_coherency(dynarec_rv64_t* dyn, int ninst, int a, int b);
 #define X87_ST(A)   extcache_get_st(dyn, ninst, A)
 #endif
 
+//MMX helpers
+// get float register for a MMX reg, create the entry if needed
+int mmx_get_reg(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int a);
+// get float register for a MMX reg, but don't try to synch it if it needed to be created
+int mmx_get_reg_empty(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int a);
+// forget float register for a MMX reg, create the entry if needed
+void mmx_forget_reg(dynarec_rv64_t* dyn, int ninst, int a);
+
 //SSE/SSE2 helpers
-// get neon register for a SSE reg, create the entry if needed
+// get float register for a SSE reg, create the entry if needed
 int sse_get_reg(dynarec_rv64_t* dyn, int ninst, int s1, int a, int single);
-// get neon register for a SSE reg, but don't try to synch it if it needed to be created
+// get float register for a SSE reg, but don't try to synch it if it needed to be created
 int sse_get_reg_empty(dynarec_rv64_t* dyn, int ninst, int s1, int a, int single);
-// forget neon register for a SSE reg, create the entry if needed
+// forget float register for a SSE reg, create the entry if needed
 void sse_forget_reg(dynarec_rv64_t* dyn, int ninst, int a);
 // purge the XMM0..XMM7 cache (before function call)
 void sse_purge07cache(dynarec_rv64_t* dyn, int ninst, int s1);
@@ -1085,19 +1191,19 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
 uintptr_t dynarec64_64(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int seg, int* ok, int* need_epilog);
 //uintptr_t dynarec64_65(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep,int* ok, int* need_epilog);
 uintptr_t dynarec64_66(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
-//uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
+uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_D8(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_D9(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 //uintptr_t dynarec64_DA(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_DB(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
-//uintptr_t dynarec64_DC(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
-//uintptr_t dynarec64_DD(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
+uintptr_t dynarec64_DC(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
+uintptr_t dynarec64_DD(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_DE(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_660F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int* ok, int* need_epilog);
-//uintptr_t dynarec64_6664(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int seg, int* ok, int* need_epilog);
-//uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
+uintptr_t dynarec64_6664(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int seg, int* ok, int* need_epilog);
+uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int rep, int* ok, int* need_epilog);
 uintptr_t dynarec64_F20F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int* ok, int* need_epilog);
 uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ninst, rex_t rex, int* ok, int* need_epilog);
 
@@ -1231,4 +1337,12 @@ uintptr_t dynarec64_F30F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int
         SW(s2, xEmu, offsetof(x64emu_t, test.test));        \
     }
 
+#define GETREX()                                \
+    rex.rex = 0;                                \
+    if(!rex.is32bits)                           \
+        while(opcode>=0x40 && opcode<=0x4f) {   \
+            rex.rex = opcode;                   \
+            opcode = F8;                        \
+        }
+
 #endif //__DYNAREC_RV64_HELPER_H__
diff --git a/src/dynarec/rv64/dynarec_rv64_pass0.h b/src/dynarec/rv64/dynarec_rv64_pass0.h
index b07162eb..fbba8f22 100644
--- a/src/dynarec/rv64/dynarec_rv64_pass0.h
+++ b/src/dynarec/rv64/dynarec_rv64_pass0.h
@@ -22,13 +22,14 @@
 #define NEW_INST \
         ++dyn->size;                            \
         if(dyn->size+3>=dyn->cap) {             \
-                dyn->insts = (instruction_native_t*)customRealloc(dyn->insts, sizeof(instruction_native_t)*dyn->cap*2);\
+                dyn->insts = (instruction_native_t*)dynaRealloc(dyn->insts, sizeof(instruction_native_t)*dyn->cap*2);\
                 memset(&dyn->insts[dyn->cap], 0, sizeof(instruction_native_t)*dyn->cap);   \
                 dyn->cap *= 2;                  \
         }                                       \
         dyn->insts[ninst].x64.addr = ip;        \
         dyn->e.combined1 = dyn->e.combined2 = 0;\
         dyn->e.swapped = 0; dyn->e.barrier = 0; \
+        for(int i=0; i<16; ++i) dyn->e.olds[i].v = 0;\
         dyn->insts[ninst].f_entry = dyn->f;     \
         if(ninst) {dyn->insts[ninst-1].x64.size = dyn->insts[ninst].x64.addr - dyn->insts[ninst-1].x64.addr;}
 
@@ -40,9 +41,10 @@
 #define DEFAULT                         \
         --dyn->size;                    \
         *ok = -1;                       \
-        if(box64_dynarec_log>=LOG_INFO) {\
-        dynarec_log(LOG_NONE, "%p: Dynarec stopped because of Opcode %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", \
-        (void*)ip, PKip(0),             \
+        if(box64_dynarec_log>=LOG_INFO || box64_dynarec_dump || box64_dynarec_missing) {\
+        dynarec_log(LOG_NONE, "%p: Dynarec stopped because of %sOpcode %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", \
+        (void*)ip, rex.is32bits?"32bits ":"",\
+        PKip(0),                        \
         PKip(1), PKip(2), PKip(3),      \
         PKip(4), PKip(5), PKip(6),      \
         PKip(7), PKip(8), PKip(9),      \
diff --git a/src/dynarec/rv64/dynarec_rv64_pass1.h b/src/dynarec/rv64/dynarec_rv64_pass1.h
index c818c26c..34d0a468 100644
--- a/src/dynarec/rv64/dynarec_rv64_pass1.h
+++ b/src/dynarec/rv64/dynarec_rv64_pass1.h
@@ -5,6 +5,7 @@
 #define NEW_INST                                \
         dyn->insts[ninst].f_entry = dyn->f;     \
         dyn->e.combined1 = dyn->e.combined2 = 0;\
+        for(int i=0; i<16; ++i) dyn->e.olds[i].v = 0;\
         dyn->e.swapped = 0; dyn->e.barrier = 0
 
 #define INST_EPILOG                             \
diff --git a/src/dynarec/rv64/dynarec_rv64_pass2.h b/src/dynarec/rv64/dynarec_rv64_pass2.h
index d71f9180..1c6e4734 100644
--- a/src/dynarec/rv64/dynarec_rv64_pass2.h
+++ b/src/dynarec/rv64/dynarec_rv64_pass2.h
@@ -2,7 +2,7 @@
 #define FINI                                                                                            \
         if(ninst) {                                                                                     \
                 dyn->insts[ninst].address = (dyn->insts[ninst-1].address+dyn->insts[ninst-1].size);     \
-                dyn->insts_size += 1+((dyn->insts[ninst].x64.size>dyn->insts[ninst].size)?dyn->insts[ninst].x64.size:dyn->insts[ninst].size)/15; \
+                dyn->insts_size += 1+((dyn->insts[ninst].x64.size>(dyn->insts[ninst].size/4))?dyn->insts[ninst].x64.size:(dyn->insts[ninst].size/4))/15; \
         }
 
 #define MESSAGE(A, ...)  
@@ -10,7 +10,7 @@
 #define NEW_INST                                                                                        \
         if(ninst) {                                                                                     \
                 dyn->insts[ninst].address = (dyn->insts[ninst-1].address+dyn->insts[ninst-1].size);     \
-                dyn->insts_size += 1+((dyn->insts[ninst-1].x64.size>dyn->insts[ninst-1].size)?dyn->insts[ninst-1].x64.size:dyn->insts[ninst-1].size)/15; \
+                dyn->insts_size += 1+((dyn->insts[ninst-1].x64.size>(dyn->insts[ninst-1].size/4))?dyn->insts[ninst-1].x64.size:(dyn->insts[ninst-1].size/4))/15; \
         }
 #define INST_EPILOG dyn->insts[ninst].epilog = dyn->native_size; 
 #define INST_NAME(name) 
diff --git a/src/dynarec/rv64/dynarec_rv64_pass3.h b/src/dynarec/rv64/dynarec_rv64_pass3.h
index dafef0c5..459c4e13 100644
--- a/src/dynarec/rv64/dynarec_rv64_pass3.h
+++ b/src/dynarec/rv64/dynarec_rv64_pass3.h
@@ -1,4 +1,4 @@
-#define INIT    
+#define INIT
 #define FINI        \
     if(ninst)       \
         addInst(dyn->instsize, &dyn->insts_size, dyn->insts[ninst].x64.size, dyn->insts[ninst].size/4); \
@@ -16,8 +16,8 @@
     if(box64_dynarec_dump) print_newinst(dyn, ninst);   \
     if(ninst)                                           \
         addInst(dyn->instsize, &dyn->insts_size, dyn->insts[ninst-1].x64.size, dyn->insts[ninst-1].size/4);
-#define INST_EPILOG     
-#define INST_NAME(name) inst_name_pass3(dyn, ninst, name)
+#define INST_EPILOG
+#define INST_NAME(name) inst_name_pass3(dyn, ninst, name, rex)
 
 #define TABLE64(A, V)   {int val64offset = Table64(dyn, (V), 3); MESSAGE(LOG_DUMP, "  Table64: 0x%lx\n", (V)); AUIPC(A, SPLIT20(val64offset)); LD(A, A, SPLIT12(val64offset));}
 #define FTABLE64(A, V)  {mmx87_regs_t v = {.d = V}; int val64offset = Table64(dyn, v.q, 3); MESSAGE(LOG_DUMP, "  FTable64: %g\n", v.d); AUIPC(x1, SPLIT20(val64offset)); FLD(A, x1, SPLIT12(val64offset));}
diff --git a/src/dynarec/rv64/dynarec_rv64_private.h b/src/dynarec/rv64/dynarec_rv64_private.h
index 01657427..b9cbb2af 100644
--- a/src/dynarec/rv64/dynarec_rv64_private.h
+++ b/src/dynarec/rv64/dynarec_rv64_private.h
@@ -31,6 +31,15 @@ typedef union sse_cache_s {
         uint8_t     single:1;
     };
 } sse_cache_t;
+typedef union sse_old_s {
+    int8_t      v;
+    struct {
+        uint8_t     changed:1;
+        uint8_t     purged:1;
+        uint8_t     reg:4;
+        uint8_t     single:1;
+    };
+} sse_old_t;
 typedef struct extcache_s {
     // ext cache
     ext_cache_t         extcache[24];
@@ -43,6 +52,7 @@ typedef struct extcache_s {
     uint8_t             swapped;        // the combined reg were swapped
     uint8_t             barrier;        // is there a barrier at instruction epilog?
     uint32_t            news;           // bitmask, wich neoncache are new for this opcode
+    sse_old_t           olds[16];       // SSE regs has changed or has been removed
     // fpu cache
     int8_t              x87cache[8];    // cache status for the 8 x87 register behind the fpu stack
     int8_t              x87reg[8];      // reg used for x87cache entry
@@ -70,7 +80,7 @@ typedef struct instruction_rv64_s {
     int                 pred_sz;    // size of predecessor list
     int                 *pred;      // predecessor array
     uintptr_t           mark, mark2, mark3;
-    uintptr_t           markf;
+    uintptr_t           markf, markf2;
     uintptr_t           markseg;
     uintptr_t           marklock;
     int                 pass2choice;// value for choices that are fixed on pass2 for pass3
diff --git a/src/dynarec/rv64/rv64_emitter.h b/src/dynarec/rv64/rv64_emitter.h
index 29336895..e9fa2f6d 100644
--- a/src/dynarec/rv64/rv64_emitter.h
+++ b/src/dynarec/rv64/rv64_emitter.h
@@ -74,6 +74,7 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define x4      14
 #define x5      15
 #define x6      6
+#define x9      9
 // used to clear the upper 32bits
 #define xMASK   5
 // 32bits version of scratch
@@ -112,6 +113,7 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define MOV64x(A, B)    rv64_move64(dyn, ninst, A, B)
 #define MOV32w(A, B)    rv64_move32(dyn, ninst, A, B, 1)
 #define MOV64xw(A, B)   if(rex.w) {MOV64x(A, B);} else {MOV32w(A, B);}
+#define MOV64z(A, B)    if(rex.is32bits) {MOV32w(A, B);} else {MOV64x(A, B);}
 
 // ZERO the upper part
 #define ZEROUP(r)       AND(r, r, xMASK)
@@ -174,12 +176,16 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define ADDW(rd, rs1, rs2)          EMIT(R_type(0b0000000, rs2, rs1, 0b000, rd, 0b0111011))
 // rd = rs1 + rs2
 #define ADDxw(rd, rs1, rs2)         EMIT(R_type(0b0000000, rs2, rs1, 0b000, rd, rex.w?0b0110011:0b0111011))
+// rd = rs1 + rs2
+#define ADDz(rd, rs1, rs2)          EMIT(R_type(0b0000000, rs2, rs1, 0b000, rd, rex.is32bits?0b0111011:0b0110011))
 // rd = rs1 - rs2
 #define SUB(rd, rs1, rs2)           EMIT(R_type(0b0100000, rs2, rs1, 0b000, rd, 0b0110011))
 // rd = rs1 - rs2
 #define SUBW(rd, rs1, rs2)          EMIT(R_type(0b0100000, rs2, rs1, 0b000, rd, 0b0111011))
 // rd = rs1 - rs2
 #define SUBxw(rd, rs1, rs2)         EMIT(R_type(0b0100000, rs2, rs1, 0b000, rd, rex.w?0b0110011:0b0111011))
+// rd = rs1 - rs2
+#define SUBz(rd, rs1, rs2)          EMIT(R_type(0b0100000, rs2, rs1, 0b000, rd, rex.is32bits?0b0111011:0b0110011))
 // rd = rs1<<rs2
 #define SLL(rd, rs1, rs2)           EMIT(R_type(0b0000000, rs2, rs1, 0b001, rd, 0b0110011))
 // rd = (rs1<rs2)?1:0
@@ -202,7 +208,9 @@ f28–31  ft8–11  FP temporaries                  Caller
 // rd = rs1 (pseudo instruction)
 #define MV(rd, rs1)                 ADDI(rd, rs1, 0)
 // rd = rs1 (pseudo instruction)
-#define MVxw(rd, rs1)               if(rex.w) {MV(rd, rs1); } else {AND(rd, rs1, xMASK);}
+#define MVxw(rd, rs1)               if(rex.w) {MV(rd, rs1);} else {AND(rd, rs1, xMASK);}
+// rd = rs1 (pseudo instruction)
+#define MVz(rd, rs1)               if(rex.is32bits) {AND(rd, rs1, xMASK);} else {MV(rd, rs1);}
 // rd = !rs1
 #define NOT(rd, rs1)                XORI(rd, rs1, -1)
 // rd = -rs1
@@ -254,7 +262,12 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define SW(rs2, rs1, imm12)         EMIT(S_type(imm12, rs2, rs1, 0b010, 0b0100011))
 
 #define PUSH1(reg)                  do {SD(reg, xRSP, -8); SUBI(xRSP, xRSP, 8);} while(0)
-#define POP1(reg)                   do {LD(reg, xRSP, 0); ADDI(xRSP, xRSP, 8);}while(0)
+#define POP1(reg)                   do {LD(reg, xRSP, 0); if (reg!=xRSP) ADDI(xRSP, xRSP, 8);} while(0)
+#define PUSH1_32(reg)               do {SW(reg, xRSP, -4); SUBIW(xRSP, xRSP, 4);} while(0)
+#define POP1_32(reg)                do {LWU(reg, xRSP, 0); if (reg!=xRSP) ADDIW(xRSP, xRSP, 4);} while(0)
+
+#define POP1z(reg)                  if(rex.is32bits) {POP1_32(reg);} else {POP1(reg);}
+#define PUSH1z(reg)                 if(rex.is32bits) {PUSH1_32(reg);} else {PUSH1(reg);}
 
 #define FENCE_gen(pred, succ)       (((pred)<<24) | ((succ)<<20) | 0b0001111)
 #define FENCE()                     EMIT(FENCE_gen(3, 3))
@@ -271,10 +284,14 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define LD(rd, rs1, imm12)          EMIT(I_type(imm12, rs1, 0b011, rd, 0b0000011))
 // rd = [rs1 + imm12]
 #define LDxw(rd, rs1, imm12)        EMIT(I_type(imm12, rs1, 0b011<<(1-rex.w), rd, 0b0000011))
+// rd = [rs1 + imm12]
+#define LDz(rd, rs1, imm12)         EMIT(I_type(imm12, rs1, 0b011<<rex.is32bits, rd, 0b0000011))
 // [rs1 + imm12] = rs2
 #define SD(rs2, rs1, imm12)         EMIT(S_type(imm12, rs2, rs1, 0b011, 0b0100011))
 // [rs1 + imm12] = rs2
 #define SDxw(rs2, rs1, imm12)       EMIT(S_type(imm12, rs2, rs1, 0b010+rex.w, 0b0100011))
+// [rs1 + imm12] = rs2
+#define SDz(rs2, rs1, imm12)        EMIT(S_type(imm12, rs2, rs1, 0b010+(1-rex.is32bits), 0b0100011))
 
 // Shift Left Immediate
 #define SLLI(rd, rs1, imm6)         EMIT(I_type(imm6, rs1, 0b001, rd, 0b0010011))
@@ -285,8 +302,12 @@ f28–31  ft8–11  FP temporaries                  Caller
 
 // rd = rs1 + imm12
 #define ADDIW(rd, rs1, imm12)       EMIT(I_type((imm12)&0b111111111111, rs1, 0b000, rd, 0b0011011))
+// rd = rs1 - imm12
+#define SUBIW(rd, rs1, imm12)       EMIT(I_type((-imm12)&0b111111111111, rs1, 0b000, rd, 0b0011011))
 // rd = rs1 + imm12
 #define ADDIxw(rd, rs1, imm12)      EMIT(I_type((imm12)&0b111111111111, rs1, 0b000, rd, rex.w?0b0010011:0b0011011))
+// rd = rs1 + imm12
+#define ADDIz(rd, rs1, imm12)       EMIT(I_type((imm12)&0b111111111111, rs1, 0b000, rd, rex.is32bits?0b0011011:0b0010011))
 
 #define SEXT_W(rd, rs1)             ADDIW(rd, rs1, 0)
 
@@ -359,6 +380,8 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define LR_W(rd, rs1, aq, rl)       EMIT(R_type(AQ_RL(0b00010, aq, rl), 0, rs1, 0b010, rd, 0b0101111))
 #define SC_W(rd, rs2, rs1, aq, rl)  EMIT(R_type(AQ_RL(0b00011, aq, rl), rs2, rs1, 0b010, rd, 0b0101111))
 
+#define AMOSWAP_W(rd, rs2, rs1, aq, rl)  EMIT(R_type(AQ_RL(0b00001, aq, rl), rs2, rs1, 0b010, rd, 0b0101111))
+
 // RV64A
 #define LR_D(rd, rs1, aq, rl)       EMIT(R_type(AQ_RL(0b00010, aq, rl), 0, rs1, 0b011, rd, 0b0101111))
 #define SC_D(rd, rs2, rs1, aq, rl)  EMIT(R_type(AQ_RL(0b00011, aq, rl), rs2, rs1, 0b011, rd, 0b0101111))
@@ -366,6 +389,8 @@ f28–31  ft8–11  FP temporaries                  Caller
 #define LRxw(rd, rs1, aq, rl)       EMIT(R_type(AQ_RL(0b00010, aq, rl), 0, rs1, 0b010|rex.w, rd, 0b0101111))
 #define SCxw(rd, rs2, rs1, aq, rl)  EMIT(R_type(AQ_RL(0b00011, aq, rl), rs2, rs1, 0b010|rex.w, rd, 0b0101111))
 
+#define AMOSWAP_D(rd, rs2, rs1, aq, rl) EMIT(R_type(AQ_RL(0b00001, aq, rl), rs2, rs1, 0b011, rd, 0b0101111))
+
 // RV32F
 // Read round mode
 #define FRRM(rd)                    CSRRS(rd, xZR, 0x002)
@@ -509,4 +534,120 @@ f28–31  ft8–11  FP temporaries                  Caller
 // Convert from Double to unsigned integer
 #define FCVTLUDxw(rd, frs1, rm)     EMIT(R_type(0b1100001, 0b00001+(rex.w?0b10:0b00), frs1, rm, rd, 0b1010011))
 
+//Zba
+// Add unsigned word (Wz(rs1) + X(rs2))
+#define ADDUW(rd, rs1, rs2)         EMIT(R_type(0b0000100, rs2, rs1, 0b000, rd, 0b0111011))
+// Zero-extend Word
+#define ZEXTW(rd, rs1)              ADDUW(rd, rs1, xZR)
+// Shift left by 1 and add (rd = X(rs2) + X(rs1)<<1)
+#define SH1ADD(rd, rs1, rs2)        EMIT(R_type(0b0010000, rs2, rs1, 0b010, rd, 0b0110011))
+// Shift unsigned word left by 1 and add (rd = X(rs2) + Wz(rs1)<<1)
+#define SH1ADDUW(rd, rs1, rs2)      EMIT(R_type(0b0010000, rs2, rs1, 0b010, rd, 0b0111011))
+// Shift left by 2 and add (rd = X(rs2) + X(rs1)<<2)
+#define SH2ADD(rd, rs1, rs2)        EMIT(R_type(0b0010000, rs2, rs1, 0b100, rd, 0b0110011))
+// Shift unsigned word left by 2 and add (rd = X(rs2) + Wz(rs1)<<2)
+#define SH2ADDUW(rd, rs1, rs2)      EMIT(R_type(0b0010000, rs2, rs1, 0b100, rd, 0b0111011))
+// Shift left by 3 and add (rd = X(rs2) + X(rs1)<<3)
+#define SH3ADD(rd, rs1, rs2)        EMIT(R_type(0b0010000, rs2, rs1, 0b110, rd, 0b0110011))
+// Shift unsigned word left by 3 and add (rd = X(rs2) + Wz(rs1)<<3)
+#define SH3ADDUW(rd, rs1, rs2)      EMIT(R_type(0b0010000, rs2, rs1, 0b110, rd, 0b0111011))
+// Shift left unsigned word (immediate)
+#define SLLIUW(rd, rs1, imm)        EMIT(R_type(0b0000100, imm, rs1, 0b001, rd, 0b0011011))
+// Shift left by 1,2 or 3 and add (rd = X(rs2) + X(rs1)<<x)
+#define SHxADD(rd, rs1, x, rs2)        EMIT(R_type(0b0010000, rs2, rs1, (x)<<1, rd, 0b0110011))
+// Shift unsigned word left by 1,2 or 3 and add (rd = X(rs2) + Wz(rs1)<<x)
+#define SHxADDUW(rd, rs1, x, rs2)      EMIT(R_type(0b0010000, rs2, rs1, (x)<<1, rd, 0b0111011))
+
+//Zbb
+// AND with reverted operand (rs1 & ~rs2)
+#define ANDN(rd, rs1, rs2)      EMIT(R_type(0b0100000, rs2, rs1, 0b111, rd, 0b0110011))
+// OR with reverted operand (rs1 | ~rs2)
+#define ORN(rd, rs1, rs2)       EMIT(R_type(0b0100000, rs2, rs1, 0b110, rd, 0b0110011))
+// Exclusive NOR (~(rs1 ^ rs2))
+#define XNOR(rd, rs1, rs2)      EMIT(R_type(0b0100000, rs2, rs1, 0b100, rd, 0b0110011))
+// Count leading zero bits
+#define CLZ(rd, rs)             EMIT(R_type(0b0110000, 0b00000, rs, 0b001, rd, 0b0010011))
+// Count leading zero bits in word
+#define CLZW(rd, rs)            EMIT(R_type(0b0110000, 0b00000, rs, 0b001, rd, 0b0011011))
+// Count leading zero bits
+#define CLZxw(rd, rs)           EMIT(R_type(0b0110000, 0b00000, rs, 0b001, rd, rex.w?0b0010011:0b0011011))
+// Count trailing zero bits
+#define CTZ(rd, rs)             EMIT(R_type(0b0110000, 0b00001, rs, 0b001, rd, 0b0010011))
+// Count trailing zero bits in word
+#define CTZW(rd, rs)            EMIT(R_type(0b0110000, 0b00001, rs, 0b001, rd, 0b0011011))
+// Count trailing zero bits
+#define CTZxw(rd, rs)           EMIT(R_type(0b0110000, 0b00001, rs, 0b001, rd, rex.w?0b0010011:0b0011011))
+// Count set bits
+#define CPOP(rd, rs)            EMIT(R_type(0b0110000, 0b00010, rs, 0b001, rd, 0b0010011))
+// Count set bits in word
+#define CPOPW(rd, rs)           EMIT(R_type(0b0110000, 0b00010, rs, 0b001, rd, 0b0011011))
+// Count set bits
+#define CPOPxw(rd, rs)          EMIT(R_type(0b0110000, 0b00010, rs, 0b001, rd, rex.w?0b0010011:0b0011011))
+// Maximum
+#define MAX(rd, rs1, rs2)       EMIT(R_type(0b0000101, rs2, rs1, 0b110, rd, 0b0110011))
+// Unisgned maximum
+#define MAXU(rd, rs1, rs2)      EMIT(R_type(0b0000101, rs2, rs1, 0b111, rd, 0b0110011))
+// Minimum
+#define MIN(rd, rs1, rs2)       EMIT(R_type(0b0000101, rs2, rs1, 0b100, rd, 0b0110011))
+// Unsigned minimum
+#define MINU(rd, rs1, rs2)      EMIT(R_type(0b0000101, rs2, rs1, 0b101, rd, 0b0110011))
+// Sign-extend byte
+#define SEXTB(rd, rs)           EMIT(R_type(0b0110000, 0b00100, rs, 0b001, rd, 0b0010011))
+// Sign-extend half-word
+#define SEXTH(rd, rs)           EMIT(R_type(0b0110000, 0b00101, rs, 0b001, rd, 0b0010011))
+// Zero-extend half-word
+#define ZEXTH_(rd, rs)          EMIT(R_type(0b0000100, 0b00000, rs, 0b100, rd, 0b0111011))
+// Zero-extend half-word
+#define ZEXTH(rd, rs)           if(rv64_zbb) ZEXTH_(rd, rs); else {SLLI(rd, rs, 48); SRLI(rd, rd, 48);}
+// Rotate left (register)
+#define ROL(rd, rs1, rs2)       EMIT(R_type(0b0110000, rs2, rs1, 0b001, rd, 0b0110011))
+// Rotate left word (register)
+#define ROLW(rd, rs1, rs2)      EMIT(R_type(0b0110000, rs2, rs1, 0b001, rd, 0b0111011))
+// Rotate left (register)
+#define ROLxw(rd, rs1, rs2)     EMIT(R_type(0b0110000, rs2, rs1, 0b001, rd, rex.w?0b0110011:0b0111011))
+// Rotate right (register)
+#define ROR(rd, rs1, rs2)       EMIT(R_type(0b0110000, rs2, rs1, 0b101, rd, 0b0110011))
+// Rotate right (immediate)
+#define RORI(rd, rs1, shamt)    EMIT(R_type(0b0110000, shamt, rs1, 0b101, rd, 0b0010011))
+// Rotate right word (immediate)
+#define RORIW(rd, rs1, shamt)   EMIT(R_type(0b0110000, shamt, rs1, 0b101, rd, 0b0011011))
+// Rotate right (immediate)
+#define RORIxw(rd, rs1, shamt)  EMIT(R_type(0b0110000, shamt, rs1, 0b101, rd, rex.w?0b0010011:0b0011011))
+// Rotate right word (register)
+#define RORW(rd, rs1, rs2)      EMIT(R_type(0b0110000, rs2, rs1, 0b101, rd, 0b0111011))
+// Rotate right (register)
+#define RORxw(rd, rs1, rs2)     EMIT(R_type(0b0110000, rs2, rs1, 0b101, rd, rex.w?0b0110011:0b0111011))
+// Bitwise OR Combine, byte granule (for all byte, if byte==0, res.byte=0, else res.byte=0xff)
+#define ORCB(rd, rs)            EMIT(I_type(0b001010000111, rs, 0b101, rd, 0b0010011))
+// Byte-reverse register
+#define REV8(rd, rs)            EMIT(I_type(0b011010111000, rs, 0b101, rd, 0b0010011))
+
+//Zbc
+// Carry-less multily (low-part)
+#define CLMUL(rd, rs1, rs2)         EMIT(R_type(0b0000101, rs2, rs1, 0b001, rd, 0b0110011))
+// Carry-less multiply (high-part)
+#define CLMULH(rd, rs1, rs2)        EMIT(R_type(0b0000101, rs2, rs1, 0b011, rd, 0b0110011))
+// Carry-less multiply (reversed)
+#define CLMULR(rd, rs1, rs2)        EMIT(R_type(0b0000101, rs2, rs1, 0b010, rd, 0b0110011))
+
+//Zbs
+// encoding of the "imm" on RV64 use a slight different mask, but it will work using R_type with high bit of imm ovewriting low bit op func
+// Single-bit Clear (Register)
+#define BCLR(rd, rs1, rs2)          EMIT(R_type(0b0100100, rs2, rs1, 0b001, rd, 0b0110011))
+// Single-bit Clear (Immediate)
+#define BCLI(rd, rs1, imm)          EMIT(R_type(0b0100100, imm, rs1, 0b001, rd, 0b0010011))
+// Single-bit Extreact (Register)
+#define BEXT(rd, rs1, rs2)          EMIT(R_type(0b0100100, rs2, rs1, 0b101, rd, 0b0110011))
+// Single-bit Extract (Immediate)
+#define BEXTI(rd, rs1, imm)         EMIT(R_type(0b0100100, imm, rs1, 0b101, rd, 0b0010011))
+// Single-bit Invert (Register)
+#define BINV(rd, rs1, rs2)          EMIT(R_type(0b0110100, rs2, rs1, 0b001, rd, 0b0110011))
+// Single-bit Invert (Immediate)
+#define BINVI(rd, rs1, imm)         EMIT(R_type(0b0110100, imm, rs1, 0b001, rd, 0b0010011))
+// Single-bit Set (Register)
+#define BSET(rd, rs1, rs2)          EMIT(R_type(0b0010100, rs2, rs1, 0b001, rd, 0b0110011))
+// Single-bit Set (Immediate)
+#define BSETI(rd, rs1, imm)         EMIT(R_type(0b0010100, imm, rs1, 0b001, rd, 0b0010011))
+
+
 #endif //__RV64_EMITTER_H__
diff --git a/src/dynarec/rv64/rv64_epilog.S b/src/dynarec/rv64/rv64_epilog.S
index 6a299d9d..17dc117f 100644
--- a/src/dynarec/rv64/rv64_epilog.S
+++ b/src/dynarec/rv64/rv64_epilog.S
@@ -39,26 +39,27 @@ rv64_epilog:
 rv64_epilog_fast:
     ld      ra, (sp)  // save ra
     ld      x8, 8(sp) // save fp
-    ld      x18, 16(sp)
-    ld      x19, 24(sp)
-    ld      x20, 32(sp)
-    ld      x21, 40(sp)
-    ld      x22, 48(sp)
-    ld      x23, 56(sp)
-    ld      x24, 64(sp)
-    ld      x25, 72(sp)
-    ld      x26, 80(sp)
-    ld      x27, 88(sp)
-    fld     f18, (12*8)(sp)
-    fld     f19, (13*8)(sp)
-    fld     f20, (14*8)(sp)
-    fld     f21, (15*8)(sp)
-    fld     f22, (16*8)(sp)
-    fld     f23, (17*8)(sp)
-    fld     f24, (18*8)(sp)
-    fld     f25, (19*8)(sp)
-    fld     f26, (20*8)(sp)
-    fld     f27, (21*8)(sp)
-    addi    sp,  sp, (8 * 22)
+    ld      x18, (2*8)(sp)
+    ld      x19, (3*8)(sp)
+    ld      x20, (4*8)(sp)
+    ld      x21, (5*8)(sp)
+    ld      x22, (6*8)(sp)
+    ld      x23, (7*8)(sp)
+    ld      x24, (8*8)(sp)
+    ld      x25, (9*8)(sp)
+    ld      x26, (10*8)(sp)
+    ld      x27, (11*8)(sp)
+    ld      x9,  (12*8)(sp)
+    fld     f18, (13*8)(sp)
+    fld     f19, (14*8)(sp)
+    fld     f20, (15*8)(sp)
+    fld     f21, (16*8)(sp)
+    fld     f22, (17*8)(sp)
+    fld     f23, (19*8)(sp)
+    fld     f24, (19*8)(sp)
+    fld     f25, (20*8)(sp)
+    fld     f26, (21*8)(sp)
+    fld     f27, (22*8)(sp)
+    addi    sp,  sp, (8 * 24)
     //end, return...
     ret
diff --git a/src/dynarec/rv64/rv64_printer.c b/src/dynarec/rv64/rv64_printer.c
index bdc424c1..db013c32 100644
--- a/src/dynarec/rv64/rv64_printer.c
+++ b/src/dynarec/rv64/rv64_printer.c
@@ -785,6 +785,9 @@ const char* rv64_print(uint32_t data, uintptr_t addr)
                 } else if (imm116 == 0x10) { /* SRAI */
                     insn.name = "srai";
                     insn.imm&=0b111111;
+                } else if (insn.imm==0b011010111000) {
+                    insn.name = "rev8";
+                    PRINT_rd_rs1();
                 }
                 break;
             }
@@ -968,6 +971,20 @@ const char* rv64_print(uint32_t data, uintptr_t addr)
                 }
             }
             break;
+            case 0x10: {
+                switch (funct3) {
+                case 0b010:
+                    insn.name = "sh1add";
+                    break;
+                case 0b100:
+                    insn.name = "sh2add";
+                    break;
+                case 0b110:
+                    insn.name = "sh3add";
+                    break;
+                }
+            }
+            break;
             case 0x20: {
                 switch (funct3) {
                 case 0x0: /* SUB */
diff --git a/src/dynarec/rv64/rv64_prolog.S b/src/dynarec/rv64/rv64_prolog.S
index 0817bdc1..96a85d3b 100644
--- a/src/dynarec/rv64/rv64_prolog.S
+++ b/src/dynarec/rv64/rv64_prolog.S
@@ -11,29 +11,30 @@
 .global rv64_prolog
 rv64_prolog:
     //save all 18 used register
-    addi    sp,  sp, -(8 * 22)
+    addi    sp,  sp, -(8 * 24)  // 16 bytes aligned
     sd      ra, (sp)  // save ra
     sd      x8, 8(sp) // save fp
-    sd      x18, 16(sp)
-    sd      x19, 24(sp)
-    sd      x20, 32(sp)
-    sd      x21, 40(sp)
-    sd      x22, 48(sp)
-    sd      x23, 56(sp)
-    sd      x24, 64(sp)
-    sd      x25, 72(sp)
-    sd      x26, 80(sp)
-    sd      x27, 88(sp)
-    fsd     f18, (12*8)(sp)
-    fsd     f19, (13*8)(sp)
-    fsd     f20, (14*8)(sp)
-    fsd     f21, (15*8)(sp)
-    fsd     f22, (16*8)(sp)
-    fsd     f23, (17*8)(sp)
-    fsd     f24, (18*8)(sp)
-    fsd     f25, (19*8)(sp)
-    fsd     f26, (20*8)(sp)
-    fsd     f27, (21*8)(sp)
+    sd      x18, (2*8)(sp)
+    sd      x19, (3*8)(sp)
+    sd      x20, (4*8)(sp)
+    sd      x21, (5*8)(sp)
+    sd      x22, (6*8)(sp)
+    sd      x23, (7*8)(sp)
+    sd      x24, (8*8)(sp)
+    sd      x25, (9*8)(sp)
+    sd      x26, (10*8)(sp)
+    sd      x27, (11*8)(sp)
+    sd      x9,  (12*8)(sp)
+    fsd     f18, (13*8)(sp)
+    fsd     f19, (14*8)(sp)
+    fsd     f20, (15*8)(sp)
+    fsd     f21, (16*8)(sp)
+    fsd     f22, (17*8)(sp)
+    fsd     f23, (19*8)(sp)
+    fsd     f24, (19*8)(sp)
+    fsd     f25, (20*8)(sp)
+    fsd     f26, (21*8)(sp)
+    fsd     f27, (22*8)(sp)
     //setup emu -> register
     ld      x16, (a0)
     ld      x17, 8(a0)
diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c
index 37de9dc2..5a0890cf 100644
--- a/src/elfs/elfloader.c
+++ b/src/elfs/elfloader.c
@@ -37,6 +37,7 @@
 #include "dynablock.h"
 #endif
 #include "../emu/x64emu_private.h"
+#include "../emu/x64run_private.h"
 #include "x64tls.h"
 
 void* my__IO_2_1_stderr_ = NULL;
@@ -258,7 +259,7 @@ int AllocElfMemory(box64context_t* context, elfheader_t* head, int mainbin)
     } else {
         // vaddr is 0, load everything has a One block
         uintptr_t old_offs = offs;
-        if(!offs && box64_wine)
+        if(!offs /*&& box64_wine*/)
             offs = (uintptr_t)find47bitBlock(head->memsz); // limit to 47bits...
         printf_log(log_level, "Allocating 0x%zx memory @%p for Elf \"%s\"\n", head->memsz, (void*)offs, head->name);
         void* p = mmap((void*)offs, head->memsz
@@ -373,6 +374,23 @@ int LoadElfMemory(FILE* f, box64context_t* context, elfheader_t* head)
     return 0;
 }
 
+int isElfHasNeededVer(elfheader_t* head, const char* libname, elfheader_t* verneeded)
+{
+    if(!verneeded || !head)
+        return 1;
+    if(!head->VerDef || !verneeded->VerNeed)
+        return 1;
+    int cnt = GetNeededVersionCnt(verneeded, libname);
+    for (int i=0; i<cnt; ++i) {
+        const char* vername = GetNeededVersionString(verneeded, libname, i);
+        if(vername && !GetVersionIndice(head, vername)) {
+            printf_log(/*LOG_DEBUG*/LOG_INFO, "Discarding %s for missing version %s\n", head->path, vername);
+            return 0;   // missing version
+        }
+    }
+    return 1;
+}
+
 int ReloadElfMemory(FILE* f, box64context_t* context, elfheader_t* head)
 {
     (void)context;
@@ -502,7 +520,8 @@ int RelocateElfREL(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t*
                     if(sym->st_size && offs) {
                         printf_dump(LOG_NEVER, "Apply %s R_X86_64_GLOB_DAT with R_X86_64_COPY @%p/%p (%p/%p -> %p/%p) size=%ld on sym=%s \n", (bind==STB_LOCAL)?"Local":"Global", p, globp, (void*)(p?(*p):0), (void*)(globp?(*globp):0), (void*)(offs + head->delta), (void*)globoffs, sym->st_size, symname);
                         memmove((void*)globoffs, (void*)offs, sym->st_size);   // preapply to copy part from lib to main elf
-                        AddUniqueSymbol(GetGlobalData(maplib), symname, offs + head->delta, sym->st_size, version, vername);
+                        AddUniqueSymbol(GetGlobalData(maplib), symname, globoffs, sym->st_size, version, vername);
+                        AddUniqueSymbol(my_context->globdata, symname, offs + head->delta, sym->st_size, version, vername);
                     } else {
                         printf_dump(LOG_NEVER, "Apply %s R_X86_64_GLOB_DAT with R_X86_64_COPY @%p/%p (%p/%p -> %p/%p) null sized on sym=%s \n", (bind==STB_LOCAL)?"Local":"Global", p, globp, (void*)(p?(*p):0), (void*)(globp?(*globp):0), (void*)offs, (void*)globoffs, symname);
                     }
@@ -527,7 +546,7 @@ int RelocateElfREL(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t*
                     uintptr_t old_offs = offs;
                     uintptr_t old_end = end;
                     offs = 0;
-                    GetSizedSymbolStartEnd(GetGlobalData(maplib), symname, &offs, &end, size, version, vername, 1, globdefver); // try globaldata symbols first
+                    GetSizedSymbolStartEnd(my_context->globdata, symname, &offs, &end, size, version, vername, 1, globdefver); // try globaldata symbols first
                     if(offs==0) {
                         GetNoSelfSymbolStartEnd(maplib, symname, &offs, &end, head, size, version, vername, globdefver, weakdefver);   // get original copy if any
                         if(!offs && local_maplib)
@@ -711,7 +730,7 @@ int RelocateElfRELA(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t
                 globoffs = offs;
                 globend = end;
                 offs = end = 0;
-                GetSizedSymbolStartEnd(GetGlobalData(maplib), symname, &offs, &end, size, version, vername, 1, globdefver); // try globaldata symbols first
+                GetSizedSymbolStartEnd(my_context->globdata, symname, &offs, &end, size, version, vername, 1, globdefver); // try globaldata symbols first
                 if(!offs && local_maplib)
                     GetNoSelfSymbolStartEnd(local_maplib, symname, &offs, &end, head, size, version, vername, globdefver, weakdefver);
                 if(!offs)
@@ -736,7 +755,8 @@ int RelocateElfRELA(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t
                             (bind==STB_LOCAL)?"Local":"Global", p, globp, (void*)(p?(*p):0), 
                             (void*)(globp?(*globp):0), (void*)offs, (void*)globoffs, sym->st_size, symname, version, vername?vername:"(none)");
                         //memmove((void*)globoffs, (void*)offs, sym->st_size);   // preapply to copy part from lib to main elf
-                        AddUniqueSymbol(GetGlobalData(maplib), symname, offs, sym->st_size, version, vername);
+                        AddUniqueSymbol(GetGlobalData(maplib), symname, globoffs, sym->st_size, version, vername);
+                        AddUniqueSymbol(my_context->globdata, symname, offs, sym->st_size, version, vername);
                     } else {
                         printf_dump(LOG_NEVER, "Apply %s R_X86_64_GLOB_DAT with R_X86_64_COPY @%p/%p (%p/%p -> %p/%p) null sized on sym=%s (ver=%d/%s)\n", 
                             (bind==STB_LOCAL)?"Local":"Global", p, globp, (void*)(p?(*p):0), 
@@ -890,7 +910,6 @@ int RelocateElfRELA(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t
     }
     return bindnow?ret_ok:0;
 }
-void checkHookedSymbols(lib_t *maplib, elfheader_t* h); // in mallochook.c
 int RelocateElf(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t* head)
 {
     if((head->flags&DF_BIND_NOW) && !bindnow) {
@@ -911,7 +930,6 @@ int RelocateElf(lib_t *maplib, lib_t *local_maplib, int bindnow, elfheader_t* he
         if(RelocateElfRELA(maplib, local_maplib, bindnow, head, cnt, (Elf64_Rela *)(head->rela + head->delta), NULL))
             return -1;
     }
-    checkHookedSymbols(maplib, head);
     return 0;
 }
 
@@ -1020,6 +1038,7 @@ uintptr_t GetLastByte(elfheader_t* h)
     return (uintptr_t)h->memory/* + h->delta*/ + h->memsz;
 }
 
+void checkHookedSymbols(elfheader_t* h); // in mallochook.c
 void AddSymbols(lib_t *maplib, kh_mapsymbols_t* mapsymbols, kh_mapsymbols_t* weaksymbols, kh_mapsymbols_t* localsymbols, elfheader_t* h)
 {
     if(box64_dump && h->DynSym) DumpDynSym(h);
@@ -1104,6 +1123,7 @@ void AddSymbols(lib_t *maplib, kh_mapsymbols_t* mapsymbols, kh_mapsymbols_t* wea
                 }
         }
     }
+    checkHookedSymbols(h);
 }
 
 /*
@@ -1184,9 +1204,13 @@ int LoadNeededLibs(elfheader_t* h, lib_t *maplib, int local, int bindnow, box64c
 
     DumpDynamicNeeded(h);
     int cnt = 0;
-    for (int i=0; i<h->numDynamic; ++i)
+    // count the number of needed libs, and also grab soname
+    for (int i=0; i<h->numDynamic; ++i) {
         if(h->Dynamic[i].d_tag==DT_NEEDED)
             ++cnt;
+        if(h->Dynamic[i].d_tag==DT_SONAME)
+            h->soname = h->DynStrTab+h->delta+h->Dynamic[i].d_un.d_val;
+    }
     h->needed = new_neededlib(cnt);
     if(h == my_context->elfs[0])
         my_context->neededlibs = h->needed;
@@ -1196,7 +1220,7 @@ int LoadNeededLibs(elfheader_t* h, lib_t *maplib, int local, int bindnow, box64c
             h->needed->names[j++] = h->DynStrTab+h->delta+h->Dynamic[i].d_un.d_val;
 
     // TODO: Add LD_LIBRARY_PATH and RPATH handling
-    if(AddNeededLib(maplib, local, bindnow, h->needed, box64, emu)) {
+    if(AddNeededLib(maplib, local, bindnow, h->needed, h, box64, emu)) {
         printf_log(LOG_INFO, "Error loading one of needed lib\n");
         if(!allow_missing_libs)
             return 1;   //error...
@@ -1241,6 +1265,7 @@ void MarkElfInitDone(elfheader_t* h)
     if(h)
         h->init_done = 1;
 }
+void startMallocHook();
 void RunElfInitPltResolver(elfheader_t* h, x64emu_t *emu)
 {
     if(!h || h->init_done)
@@ -1255,17 +1280,20 @@ void RunElfInitPltResolver(elfheader_t* h, x64emu_t *emu)
     }
     printf_dump(LOG_DEBUG, "Calling Init for %s @%p\n", ElfName(h), (void*)p);
     if(h->initentry)
-        RunSafeFunction(my_context, p, 3, my_context->argc, my_context->argv, my_context->envv);
+        RunSafeFunction(p, 3, my_context->argc, my_context->argv, my_context->envv);
     printf_dump(LOG_DEBUG, "Done Init for %s\n", ElfName(h));
     // and check init array now
     Elf64_Addr *addr = (Elf64_Addr*)(h->initarray + h->delta);
     for (size_t i=0; i<h->initarray_sz; ++i) {
         if(addr[i]) {
             printf_dump(LOG_DEBUG, "Calling Init[%zu] for %s @%p\n", i, ElfName(h), (void*)addr[i]);
-            RunSafeFunction(my_context, (uintptr_t)addr[i], 3, my_context->argc, my_context->argv, my_context->envv);
+            RunSafeFunction((uintptr_t)addr[i], 3, my_context->argc, my_context->argv, my_context->envv);
         }
     }
 
+    if(h->malloc_hook_2)
+        startMallocHook();
+
     h->fini_done = 0;   // can be fini'd now (in case it was re-inited)
     printf_dump(LOG_DEBUG, "All Init Done for %s\n", ElfName(h));
     return;
@@ -1310,6 +1338,9 @@ void RunElfInit(elfheader_t* h, x64emu_t *emu)
         }
     }
 
+    if(h->malloc_hook_2)
+        startMallocHook();
+
     h->fini_done = 0;   // can be fini'd now (in case it was re-inited)
     printf_dump(LOG_DEBUG, "All Init Done for %s\n", ElfName(h));
     return;
@@ -1582,7 +1613,7 @@ static int my_dl_iterate_phdr_##A(struct dl_phdr_info* a, size_t b, void* c)
         return 0;                                                                   \
     if(!a->dlpi_name[0]) /*don't send informations about box64 itself*/             \
         return 0;                                                                   \
-    return (int)RunFunction(my_context, my_dl_iterate_phdr_fct_##A, 3, a, b, c);    \
+    return (int)RunFunction(my_dl_iterate_phdr_fct_##A, 3, a, b, c);                \
 }
 SUPER()
 #undef GO
@@ -1855,6 +1886,7 @@ EXPORT void PltResolver(x64emu_t* emu)
             printf_dump(LOG_DEBUG, "symbol %s from %s but elf not initialized yet, run Init now (from %s)\n", symname, ElfName(sym_elf), ElfName(h));
             RunElfInitPltResolver(sym_elf, emu);
         }
+        offs = (uintptr_t)getAlternate((void*)offs);
 
         if(p) {
             printf_dump(LOG_DEBUG, "            Apply %s R_X86_64_JUMP_SLOT %p with sym=%s(ver %d: %s%s%s) (%p -> %p / %s)\n", (bind==STB_LOCAL)?"Local":"Global", p, symname, version, symname, vername?"@":"", vername?vername:"",*(void**)p, (void*)offs, ElfName(sym_elf));
diff --git a/src/elfs/elfloader_private.h b/src/elfs/elfloader_private.h
index a6116ad7..d2bc2559 100644
--- a/src/elfs/elfloader_private.h
+++ b/src/elfs/elfloader_private.h
@@ -12,6 +12,7 @@ typedef struct kh_defaultversion_s kh_defaultversion_t;
 struct elfheader_s {
     char*       name;
     char*       path;   // Resolved path to file
+    char*       soname; // soname of the elf
     size_t      numPHEntries;
     Elf64_Phdr  *PHEntries;
     size_t      numSHEntries;
@@ -86,6 +87,7 @@ struct elfheader_s {
     int         init_done;
     int         fini_done;
     int         refcnt;     // ref count for the elf
+    int         malloc_hook_2;  // this elf hook malloc, hacking it
 
     char*       memory;     // char* and not void* to allow math on memory pointer
     void**      multiblock;
diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c
index 7b83e07e..1701378f 100644
--- a/src/elfs/elfparser.c
+++ b/src/elfs/elfparser.c
@@ -416,18 +416,6 @@ int GetVersionIndice(elfheader_t* h, const char* vername)
 {
     if(!vername)
         return 0;
-    if(h->VerNeed) {
-        Elf64_Verneed *ver = (Elf64_Verneed*)((uintptr_t)h->VerNeed + h->delta);
-        while(ver) {
-            Elf64_Vernaux *aux = (Elf64_Vernaux*)((uintptr_t)ver + ver->vn_aux);
-            for(int j=0; j<ver->vn_cnt; ++j) {
-                if(!strcmp(h->DynStr+aux->vna_name, vername)) 
-                    return aux->vna_other;
-                aux = (Elf64_Vernaux*)((uintptr_t)aux + aux->vna_next);
-            }
-            ver = ver->vn_next?((Elf64_Verneed*)((uintptr_t)ver + ver->vn_next)):NULL;
-        }
-    }
     if(h->VerDef) {
         Elf64_Verdef *def = (Elf64_Verdef*)((uintptr_t)h->VerDef + h->delta);
         while(def) {
@@ -438,4 +426,44 @@ int GetVersionIndice(elfheader_t* h, const char* vername)
         }
     }
     return 0;
+}
+
+int GetNeededVersionCnt(elfheader_t* h, const char* libname)
+{
+    if(!libname)
+        return 0;
+    if(h->VerNeed) {
+        Elf64_Verneed *ver = (Elf64_Verneed*)((uintptr_t)h->VerNeed + h->delta);
+        while(ver) {
+            char *filename = h->DynStr + ver->vn_file;
+            Elf64_Vernaux *aux = (Elf64_Vernaux*)((uintptr_t)ver + ver->vn_aux);
+            if(!strcmp(filename, libname))
+                return ver->vn_cnt;
+            ver = ver->vn_next?((Elf64_Verneed*)((uintptr_t)ver + ver->vn_next)):NULL;
+        }
+    }
+    return 0;
+}
+
+const char* GetNeededVersionString(elfheader_t* h, const char* libname, int idx)
+{
+    if(!libname)
+        return 0;
+    if(h->VerNeed) {
+        Elf64_Verneed *ver = (Elf64_Verneed*)((uintptr_t)h->VerNeed + h->delta);
+        while(ver) {
+            char *filename = h->DynStr + ver->vn_file;
+            Elf64_Vernaux *aux = (Elf64_Vernaux*)((uintptr_t)ver + ver->vn_aux);
+            if(!strcmp(filename, libname)) {
+                for(int j=0; j<ver->vn_cnt; ++j) {
+                    if(j==idx) 
+                        return h->DynStr+aux->vna_name;
+                    aux = (Elf64_Vernaux*)((uintptr_t)aux + aux->vna_next);
+                }
+                return NULL;    // idx out of bound, return NULL...
+           }
+            ver = ver->vn_next?((Elf64_Verneed*)((uintptr_t)ver + ver->vn_next)):NULL;
+        }
+    }
+    return NULL;
 }
\ No newline at end of file
diff --git a/src/emu/modrm.h b/src/emu/modrm.h
index 21ba6d3c..cd967c0e 100644
--- a/src/emu/modrm.h
+++ b/src/emu/modrm.h
@@ -34,6 +34,7 @@
 #define GETEW(D)            oped=TestEw(test, &addr, rex, nextop, D)

 #define GETEW32(D)          oped=TestEw32O(test, &addr, rex, nextop, D, 0)

 #define GETEW_OFFS(D, O)    oped=TestEdO(test, &addr, rex, nextop, D, O)

+#define GETEW_OFFS_16(O)    oped=TestEw16off(test, &addr, rex, nextop, O)

 #define GETGW               opgd=GetGw(test->emu, &addr, rex, nextop)

 #define GETEX(D)            opex=TestEx(test, &addr, rex, nextop, D)

 #define GETEX32(D)          opex=TestEx32O(test, &addr, rex, nextop, D, 0)

@@ -58,6 +59,7 @@
 #define GETEW(D)            oped=GetEw(emu, &addr, rex, nextop, D)

 #define GETEW32(D)          oped=GetEw32O(emu, &addr, rex, nextop, D, 0)

 #define GETEW_OFFS(D, O)    oped=GetEdO(emu, &addr, rex, nextop, D, O)

+#define GETEW_OFFS_16(O)    oped=GetEw16off(emu, &addr, rex, nextop, O)

 #define GETGW               opgd=GetGw(emu, &addr, rex, nextop)

 #define GETEX(D)            opex=GetEx(emu, &addr, rex, nextop, D)

 #define GETEX32(D)          opex=GetEx32O(emu, &addr, rex, nextop, D, 0)

@@ -81,6 +83,7 @@
 #define FAKEED32(D)         GetEd32O(emu, &addr, rex, nextop, D, 0)

 #define GETEA(D)            GetEA(emu, &addr, rex, nextop, D)

 #define _GETED(D)           oped=GetEd(emu, &addr, rex, nextop, D)

+#define _GETED32(D)         oped=GetEd32O(emu, &addr, rex, nextop, D, 0)

 

 #define MODREG  ((nextop&0xC0)==0xC0)

 

diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c
index de4dd50e..9de4cb18 100644
--- a/src/emu/x64emu.c
+++ b/src/emu/x64emu.c
@@ -58,17 +58,6 @@ uint32_t* GetParityTab()
     return x86emu_parity_tab;
 }
 
-void PushExit(x64emu_t* emu)
-{
-    uintptr_t endMarker = AddCheckBridge(my_context->system, NULL, NULL, 0, "ExitEmulation");
-    Push(emu, endMarker);
-}
-
-void* GetExit()
-{
-    return (void*)AddCheckBridge(my_context->system, NULL, NULL, 0, "ExitEmulation");
-}
-
 static void internalX64Setup(x64emu_t* emu, box64context_t *context, uintptr_t start, uintptr_t stack, int stacksize, int ownstack)
 {
     emu->context = context;
@@ -86,9 +75,9 @@ static void internalX64Setup(x64emu_t* emu, box64context_t *context, uintptr_t s
     R_RIP = start;
     R_RSP = (stack + stacksize) & ~7;   // align stack start, always
     // fake init of segments...
-    emu->segs[_CS] = 0x73;
-    emu->segs[_DS] = emu->segs[_ES] = emu->segs[_SS] = 0x7b;
-    emu->segs[_FS] = 0x33;
+    emu->segs[_CS] = 0x33;
+    emu->segs[_DS] = emu->segs[_ES] = emu->segs[_SS] = 0x2b;
+    emu->segs[_FS] = 0x43;
     emu->segs[_GS] = default_gs;
     // setup fpu regs
     reset_fpu(emu);
@@ -117,10 +106,18 @@ x64emu_t *NewX64EmuFromStack(x64emu_t* emu, box64context_t *context, uintptr_t s
 }
 
 EXPORTDYN
-void SetupX64Emu(x64emu_t *emu)
+void SetupX64Emu(x64emu_t *emu, x64emu_t *ref)
 {
     printf_log(LOG_DEBUG, "Setup X86_64 Emu\n");
-    (void)emu;  // Not doing much here...
+    if(ref) {
+        // save RIP and RSP
+        uintptr_t old_rip = R_RIP;
+        uintptr_t old_rsp = R_RSP;
+        CloneEmu(emu, ref);
+        // restore RIP and RSP
+        R_RIP = old_rip;
+        R_RSP = old_rsp;
+    }
 }
 
 #ifdef HAVE_TRACE
@@ -398,11 +395,13 @@ void ResetFlags(x64emu_t *emu)
     emu->df = d_none;
 }
 
-const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip)
+const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip, int is32bits)
 {
     static char buff[1000];
     static const char* regname[] = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI",
                                     " R8", " R9", "R10", "R11", "R12", "R13", "R14", "R15"};
+    static const char* regname32[]={"EAX", "ECX", "EDX", "EBX", "ESP", "EBP", "ESI", "EDI"};
+    static const char* segname[] = {"ES", "CS", "SS", "DS", "FS", "GS"};
     char tmp[160];
     buff[0] = '\0';
 #ifdef HAVE_TRACE
@@ -416,7 +415,7 @@ const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip)
     }
     if(trace_xmm) {
         // do xmm reg if needed
-        for(int i=0; i<16; ++i) {
+        for(int i=0; i<(is32bits?8:16); ++i) {
             if (trace_regsdiff && (emu->old_xmm[i].q[0] != emu->xmm[i].q[0] || emu->old_xmm[i].q[1] != emu->xmm[i].q[1])) {
                 sprintf(tmp, "\e[1;35m%02d:%016lx-%016lx\e[m", i, emu->xmm[i].q[1], emu->xmm[i].q[0]);
                 emu->old_xmm[i].q[0] = emu->xmm[i].q[0];
@@ -441,21 +440,28 @@ const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip)
         }
         strcat(buff, "\n");
     }
-    for (int i=_AX; i<=_R15; ++i) {
+    for (int i=0; i<6; ++i) {
+            sprintf(tmp, "%s=0x%04x", segname[i], emu->segs[i]);
+            strcat(buff, tmp);
+            if(i!=_GS)
+                strcat(buff, " ");
+    }
+    strcat(buff, "\n");
+    if(is32bits)
+        for (int i=_AX; i<=_RDI; ++i) {
 #ifdef HAVE_TRACE
-        if (trace_regsdiff && (emu->regs[i].q[0] != emu->oldregs[i].q[0])) {
-            sprintf(tmp, "\e[1;35m%s=%016lx\e[m ", regname[i], emu->regs[i].q[0]);
-            emu->oldregs[i].q[0] = emu->regs[i].q[0];
-        } else {
-            sprintf(tmp, "%s=%016lx ", regname[i], emu->regs[i].q[0]);
-        }
+            if (trace_regsdiff && (emu->regs[i].dword[0] != emu->oldregs[i].q[0])) {
+                sprintf(tmp, "\e[1;35m%s=%08x\e[m ", regname32[i], emu->regs[i].dword[0]);
+                emu->oldregs[i].q[0] = emu->regs[i].dword[0];
+            } else {
+                sprintf(tmp, "%s=%08x ", regname32[i], emu->regs[i].dword[0]);
+            }
 #else
-        sprintf(tmp, "%s=%016lx ", regname[i], emu->regs[i].q[0]);
+            sprintf(tmp, "%s=%08x ", regname[i], emu->regs[i].dword[0]);
 #endif
-        strcat(buff, tmp);
+            strcat(buff, tmp);
 
-        if (i%5==4) {
-            if(i==4) {
+            if(i==_RBX) {
                 if(emu->df) {
 #define FLAG_CHAR(f) (ACCESS_FLAG(F_##f##F)) ? #f : "?"
                     sprintf(tmp, "flags=%s%s%s%s%s%s%s\n", FLAG_CHAR(O), FLAG_CHAR(D), FLAG_CHAR(S), FLAG_CHAR(Z), FLAG_CHAR(A), FLAG_CHAR(P), FLAG_CHAR(C));
@@ -467,22 +473,54 @@ const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip)
                     strcat(buff, tmp);
 #undef FLAG_CHAR
                 }
+            }
+        }
+    else
+        for (int i=_AX; i<=_R15; ++i) {
+#ifdef HAVE_TRACE
+            if (trace_regsdiff && (emu->regs[i].q[0] != emu->oldregs[i].q[0])) {
+                sprintf(tmp, "\e[1;35m%s=%016lx\e[m ", regname[i], emu->regs[i].q[0]);
+                emu->oldregs[i].q[0] = emu->regs[i].q[0];
             } else {
-                strcat(buff, "\n");
+                sprintf(tmp, "%s=%016lx ", regname[i], emu->regs[i].q[0]);
             }
-        } 
+#else
+            sprintf(tmp, "%s=%016lx ", regname[i], emu->regs[i].q[0]);
+#endif
+            strcat(buff, tmp);
+
+            if (i%5==4) {
+                if(i==4) {
+                    if(emu->df) {
+#define FLAG_CHAR(f) (ACCESS_FLAG(F_##f##F)) ? #f : "?"
+                        sprintf(tmp, "flags=%s%s%s%s%s%s%s\n", FLAG_CHAR(O), FLAG_CHAR(D), FLAG_CHAR(S), FLAG_CHAR(Z), FLAG_CHAR(A), FLAG_CHAR(P), FLAG_CHAR(C));
+                        strcat(buff, tmp);
+#undef FLAG_CHAR
+                    } else {
+#define FLAG_CHAR(f) (ACCESS_FLAG(F_##f##F)) ? #f : "-"
+                        sprintf(tmp, "FLAGS=%s%s%s%s%s%s%s\n", FLAG_CHAR(O), FLAG_CHAR(D), FLAG_CHAR(S), FLAG_CHAR(Z), FLAG_CHAR(A), FLAG_CHAR(P), FLAG_CHAR(C));
+                        strcat(buff, tmp);
+#undef FLAG_CHAR
+                    }
+                } else {
+                    strcat(buff, "\n");
+                }
+            } 
     }
-    sprintf(tmp, "RIP=%016lx ", ip);
+    if(is32bits)
+        sprintf(tmp, "EIP=%08lx ", ip);
+    else
+        sprintf(tmp, "RIP=%016lx ", ip);
     strcat(buff, tmp);
     return buff;
 }
 
-void StopEmu(x64emu_t* emu, const char* reason)
+void StopEmu(x64emu_t* emu, const char* reason, int is32bits)
 {
     emu->quit = 1;
     printf_log(LOG_NONE, "%s", reason);
     // dump stuff...
-    printf_log(LOG_NONE, "==== CPU Registers ====\n%s\n", DumpCPURegs(emu, R_RIP));
+    printf_log(LOG_NONE, "==== CPU Registers ====\n%s\n", DumpCPURegs(emu, R_RIP, is32bits));
     printf_log(LOG_NONE, "======== Stack ========\nStack is from %lX to %lX\n", R_RBP, R_RSP);
     if (R_RBP == R_RSP) {
         printf_log(LOG_NONE, "RBP = RSP: leaf function detected; next 128 bytes should be either data or random.\n");
@@ -497,13 +535,13 @@ void StopEmu(x64emu_t* emu, const char* reason)
 #endif
 }
 
-void UnimpOpcode(x64emu_t* emu)
+void UnimpOpcode(x64emu_t* emu, int is32bits)
 {
     R_RIP = emu->old_ip;
 
     int tid = syscall(SYS_gettid);
-    printf_log(LOG_NONE, "%04d|%p: Unimplemented Opcode (%02X %02X %02X %02X) %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", 
-        tid, (void*)emu->old_ip,
+    printf_log(LOG_NONE, "%04d|%p: Unimplemented %sOpcode (%02X %02X %02X %02X) %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", 
+        tid, (void*)emu->old_ip, is32bits?"32bits ":"",
         Peek(emu, -4), Peek(emu, -3), Peek(emu, -2), Peek(emu, -1),
         Peek(emu, 0), Peek(emu, 1), Peek(emu, 2), Peek(emu, 3),
         Peek(emu, 4), Peek(emu, 5), Peek(emu, 6), Peek(emu, 7),
diff --git a/src/emu/x64emu_private.h b/src/emu/x64emu_private.h
index 9e7b599e..250d8cee 100644
--- a/src/emu/x64emu_private.h
+++ b/src/emu/x64emu_private.h
@@ -98,6 +98,7 @@ typedef struct x64emu_s {
     void*       stack2free; // this is the stack to free (can be NULL)
     void*       init_stack; // initial stack (owned or not)
     uint32_t    size_stack; // stack size (owned or not)
+    struct __jmp_buf_tag *jmpbuf;
 
     x64_ucontext_t *uc_link; // to handle setcontext
 
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c
index 9d6f474b..d58574c3 100644
--- a/src/emu/x64int3.c
+++ b/src/emu/x64int3.c
@@ -12,6 +12,7 @@
 #include <signal.h>
 #include <poll.h>
 #include <sys/wait.h>
+#include <elf.h>
 
 #include "debug.h"
 #include "box64stack.h"
@@ -25,6 +26,7 @@
 #include "wrapper.h"
 #include "box64context.h"
 #include "librarian.h"
+#include "elfload_dump.h"
 
 #include <elf.h>
 #include "elfloader.h"
@@ -120,7 +122,17 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr)
                 const char *s = NULL;
                 s = GetNativeName((void*)a);
                 if(a==(uintptr_t)PltResolver) {
-                    snprintf(buff, 256, "%s", cycle_log?"PltResolver ":" ... ");
+                    if(cycle_log) {
+                        uintptr_t addr = *((uint64_t*)(R_RSP));
+                        int slot = *((uint64_t*)(R_RSP+8));
+                        elfheader_t *h = (elfheader_t*)addr;
+                        Elf64_Rela * rel = (Elf64_Rela *)(h->jmprel + h->delta) + slot;
+                        Elf64_Sym *sym = &h->DynSym[ELF64_R_SYM(rel->r_info)];
+                        const char* symname = SymName(h, sym);
+                        snprintf(buff, 256, "%04d|PltResolver \"%s\"", tid, symname?symname:"???");
+                    } else {
+                        snprintf(buff, 256, "%s", " ... ");
+                    }
                 } else if (!strcmp(s, "__open") || !strcmp(s, "open") || !strcmp(s, "open ") || !strcmp(s, "open64")) {
                     tmp = (char*)(R_RDI);
                     snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\", %d (,%d))", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (int)(R_ESI), (int)(R_EDX));
@@ -141,6 +153,10 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr)
                     tmp = (char*)(R_RDI);
                     snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\", %p, %zd)", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (void*)(R_RSI), (size_t)R_RDX);
                     perr = 1;
+                } else if (!strcmp(s, "execv")) {
+                    tmp = (char*)(R_RDI);
+                    snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\", %p)", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (void*)(R_RSI));
+                    perr = 1;
                 } else if (strstr(s, "mkdir")==s) {
                     tmp = (char*)(R_RDI);
                     snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\", %d)", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (int)(R_ESI));
@@ -202,13 +218,17 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr)
                     pu64 = (uint64_t*)R_RDI;
                     post = 3;
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, %d, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, R_EDX, R_RCX, (tmp)?tmp:"(nil)", (void*)(R_R9));
+                } else if (strstr(s, "__vfprintf_chk")) {
+                    tmp = (char*)(R_RDX);
+                    pu64 = (uint64_t*)R_RDI;
+                    snprintf(buff, 256, "%04d|%p: Calling %s(%p, %d, \"%s\", ... )", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_ESI, (tmp)?tmp:"(nil)");
                 } else if (strstr(s, "snprintf")==s) {
                     tmp = (char*)(R_RDX);
                     pu64 = (uint64_t*)R_RDI;
                     post = 3;
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, (tmp)?tmp:"(nil)", (void*)(R_RCX));
-                } else if (strstr(s, "vfprintf")==s) {
-                    tmp = (char*)(R_RSI);
+                } else if (!strcmp(s, "vfprintf")) {
+                    tmp = (char*)((R_RSI>2)?R_RSI:R_RDX);
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, \"%s\", ...)", tid, *(void**)(R_RSP), s, (void*)R_RDI, (tmp)?tmp:"(nil)");
                 } else if (!strcmp(s, "getcwd")) {
                     post = 2;
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index f064dfd1..6465ab5e 100644
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -49,9 +49,10 @@ int Run(x64emu_t *emu, int step)
     int step = 0;
     #endif
     uintptr_t addr = R_RIP;
-    rex_t rex;
+    rex_t rex = {0};
     int rep;    // 0 none, 1=F2 prefix, 2=F3 prefix
     int unimp = 0;
+    int is32bits = (emu->segs[_CS]==0x23);
 
     if(emu->quit)
         return 0;
@@ -62,7 +63,7 @@ int Run(x64emu_t *emu, int step)
         return 0;
     }
     //ref opcode: http://ref.x64asm.net/geek32.html#xA1
-    printf_log(LOG_DEBUG, "Run X86 (%p), RIP=%p, Stack=%p\n", emu, (void*)addr, (void*)R_RSP);
+    printf_log(LOG_DEBUG, "Run X86 (%p), RIP=%p, Stack=%p is32bits=%d\n", emu, (void*)addr, (void*)R_RSP, is32bits);
 
 x64emurun:
 #ifndef TEST_INTERPRETER
@@ -86,13 +87,15 @@ x64emurun:
             rep = opcode-0xF1;
             opcode = F8;
         }
-        while((opcode==0x3E))   //Branch Taken Hint ignored
+        while((opcode==0x3E) || (opcode==0x26))   //Branch Taken Hint ignored
             opcode = F8;
         rex.rex = 0;
-        while(opcode>=0x40 && opcode<=0x4f) {
-            rex.rex = opcode;
-            opcode = F8;
-        }
+        rex.is32bits = is32bits;
+        if(!is32bits)
+            while(opcode>=0x40 && opcode<=0x4f) {
+                rex.rex = opcode;
+                opcode = F8;
+            }
 
         switch(opcode) {
 
@@ -142,6 +145,21 @@ x64emurun:
             break;
 
         GO(0x00, add)                   /* ADD 0x00 -> 0x05 */
+        case 0x06:                      /* PUSH ES */
+            if(!rex.is32bits) {
+                unimp = 1;
+                goto fini;
+            }
+            Push32(emu, emu->segs[_ES]);  // even if a segment is a 16bits, a 32bits push/pop is done
+            break;
+        case 0x07:                      /* POP ES */
+            if(!rex.is32bits) {
+                unimp = 1;
+                goto fini;
+            }
+            emu->segs[_ES] = Pop32(emu);    // no check, no use....
+            emu->segs_serial[_ES] = 0;
+            break;
         GO(0x08, or)                    /*  OR 0x08 -> 0x0D */
         case 0x0F:                      /* More instructions */
             switch(rep) {
@@ -193,7 +211,24 @@ x64emurun:
         GO(0x30, xor)                   /* XOR 0x30 -> 0x35 */
         #undef GO
 
+        case 0x1E:                      /* PUSH DS */
+            if(!rex.is32bits) {
+                unimp = 1;
+                goto fini;
+            }
+            Push32(emu, emu->segs[_DS]);  // even if a segment is a 16bits, a 32bits push/pop is done
+            break;
+        case 0x1F:                      /* POP DS */
+            if(!rex.is32bits) {
+                unimp = 1;
+                goto fini;
+            }
+            emu->segs[_DS] = Pop32(emu);    // no check, no use....
+            emu->segs_serial[_DS] = 0;
+            break;
+
 	    case 0x2E:	    /* segments are ignored */
+        case 0x26:
         case 0x36:          /* SS: (ignored) */
             break;
 
@@ -236,13 +271,39 @@ x64emurun:
             else
                 cmp32(emu, R_EAX, F32);
             break;
-
+        case 0x40:
+        case 0x41:
+        case 0x42:
+        case 0x43:
+        case 0x44:
+        case 0x45:
+        case 0x46:
+        case 0x47:                      /* INC Reg (32bits only)*/
+            tmp8u = opcode&7;
+            emu->regs[tmp8u].dword[0] = inc32(emu, emu->regs[tmp8u].dword[0]);
+            break;
+        case 0x48:
+        case 0x49:
+        case 0x4A:
+        case 0x4B:
+        case 0x4C:
+        case 0x4D:
+        case 0x4E:
+        case 0x4F:                      /* DEC Reg (32bits only)*/
+            tmp8u = opcode&7;
+            emu->regs[tmp8u].dword[0] = dec32(emu, emu->regs[tmp8u].dword[0]);
+            break;
         case 0x54:                      /* PUSH ESP */
             if(rex.b)
-                Push(emu, R_R12);
+                Push64(emu, R_R12);
             else {
-                tmp64u = R_RSP;
-                Push(emu, tmp64u);
+                if(rex.is32bits) {
+                    tmp32u = R_ESP;
+                    Push32(emu, tmp32u);
+                } else {
+                    tmp64u = R_RSP;
+                    Push64(emu, tmp64u);
+                }
             }
             break;
         case 0x50:
@@ -253,7 +314,10 @@ x64emurun:
         case 0x56:
         case 0x57:                      /* PUSH Reg */
             tmp8u = (opcode&7)+(rex.b<<3);
-            Push(emu, emu->regs[tmp8u].q[0]);
+            if(rex.is32bits)
+                Push32(emu, emu->regs[tmp8u].dword[0]);
+            else
+                Push64(emu, emu->regs[tmp8u].q[0]);
             break;
         case 0x58:
         case 0x59:
@@ -264,20 +328,57 @@ x64emurun:
         case 0x5E:
         case 0x5F:                      /* POP Reg */
             tmp8u = (opcode&7)+(rex.b<<3);
-            emu->regs[tmp8u].q[0] = Pop(emu);
+            emu->regs[tmp8u].q[0] = is32bits?Pop32(emu):Pop64(emu);
+            break;
+        case 0x60:                      /* PUSHAD */
+            if(rex.is32bits) {
+                tmp32u = R_ESP;
+                Push32(emu, R_EAX);
+                Push32(emu, R_ECX);
+                Push32(emu, R_EDX);
+                Push32(emu, R_EBX);
+                Push32(emu, tmp32u);
+                Push32(emu, R_EBP);
+                Push32(emu, R_ESI);
+                Push32(emu, R_EDI);
+            } else {
+                unimp = 1;
+                goto fini;
+            }
+            break;
+        case 0x61:                      /* POPAD */
+            if(rex.is32bits) {
+                R_EDI = Pop32(emu);
+                R_ESI = Pop32(emu);
+                R_EBP = Pop32(emu);
+                R_ESP+=4;   // POP ESP
+                R_EBX = Pop32(emu);
+                R_EDX = Pop32(emu);
+                R_ECX = Pop32(emu);
+                R_EAX = Pop32(emu);
+            } else {
+                unimp = 1;
+                goto fini;
+            }
             break;
 
         case 0x63:                      /* MOVSXD Gd,Ed */
             nextop = F8;
             GETED(0);
             GETGD;
-            if(rex.w)
-                GD->sq[0] = ED->sdword[0];
-            else
-                if(MODREG)
-                    GD->q[0] = ED->dword[0];    // not really a sign extension
+            if(rex.is32bits) {
+                // ARPL here
+                // faking to always happy...
+                SET_FLAG(F_ZF);
+            } else {
+                if(rex.w)
+                    GD->sq[0] = ED->sdword[0];
                 else
-                    GD->sdword[0] = ED->sdword[0];  // meh?
+                    if(MODREG)
+                        GD->q[0] = ED->dword[0];    // not really a sign extension
+                    else
+                        GD->sdword[0] = ED->sdword[0];  // meh?
+            }
             break;
         case 0x64:                      /* FS: prefix */
             #ifdef TEST_INTERPRETER
@@ -292,6 +393,7 @@ x64emurun:
                 R_RIP = addr;
                 goto fini;
             }
+            is32bits = (emu->segs[_CS]==0x23);
             #endif
             break;
         case 0x65:                      /* GS: prefix */
@@ -307,6 +409,7 @@ x64emurun:
                 R_RIP = addr;
                 goto fini;
             }
+            is32bits = (emu->segs[_CS]==0x23);
             #endif
             break;
         case 0x66:                      /* 16bits prefix */
@@ -340,7 +443,10 @@ x64emurun:
             #endif
             break;
         case 0x68:                      /* Push Id */
-            Push(emu, F32S64);
+            if(rex.is32bits)
+                Push32(emu, F32);
+            else
+                Push64(emu, F32S64);
             break;
         case 0x69:                      /* IMUL Gd,Ed,Id */
             nextop = F8;
@@ -353,8 +459,13 @@ x64emurun:
                 GD->q[0] = imul32(emu, ED->dword[0], tmp64u);
             break;
         case 0x6A:                      /* Push Ib */
-            tmp64s = F8S;
-            Push(emu, (uint64_t)tmp64s);
+            if(rex.is32bits) {
+                tmp32s = F8S;
+                Push32(emu, (uint32_t)tmp32s);
+            } else {
+                tmp64s = F8S;
+                Push64(emu, (uint64_t)tmp64s);
+            }
             break;
         case 0x6B:                      /* IMUL Gd,Ed,Ib */
             nextop = F8;
@@ -367,14 +478,78 @@ x64emurun:
                 GD->q[0] = imul32(emu, ED->dword[0], (uint32_t)tmp64s);
             break;
         case 0x6C:                      /* INSB DX */
+            if(rex.is32bits) {
+                tmp32u = rep?R_ECX:1;
+                while(tmp32u--) {
+                    *(int8_t*)(R_EDI+GetESBaseEmu(emu)) = 0;   // faking port read, using explicit ES segment
+                    if(ACCESS_FLAG(F_DF))
+                        R_EDI-=1;
+                    else
+                        R_EDI+=1;
+                }
+                if(rep)
+                    R_ECX = 0;
+            } else {
+                // this is a privilege opcode in 64bits, but not in 32bits...
+                #ifndef TEST_INTERPRETOR
+                emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
+                STEP;
+                #endif
+            }
+            break;
         case 0x6D:                      /* INSL DX */
+            if(rex.is32bits) {
+                tmp32u = rep?R_ECX:1;
+                while(tmp32u--) {
+                    *(int32_t*)(R_EDI+GetESBaseEmu(emu)) = 0;   // faking port read, using explicit ES segment
+                    if(ACCESS_FLAG(F_DF))
+                        R_EDI-=4;
+                    else
+                        R_EDI+=4;
+                }
+                if(rep)
+                    R_ECX = 0;
+            } else {
+                // this is a privilege opcode in 64bits, but not in 32bits...
+                #ifndef TEST_INTERPRETOR
+                emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
+                STEP;
+                #endif
+            }
+            break;
         case 0x6E:                      /* OUTSB DX */
+            if(rex.is32bits) {
+                // faking port write, using explicit ES segment
+                if(ACCESS_FLAG(F_DF))
+                    R_ESI-=rep?R_ECX:1;
+                else
+                    R_ESI+=1?R_ECX:1;
+                if(rep)
+                    R_ECX = 0;
+            } else {
+                // this is a privilege opcode in 64bits, but not in 32bits...
+                #ifndef TEST_INTERPRETOR
+                emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
+                STEP;
+                #endif
+            }
+            break;
         case 0x6F:                      /* OUTSL DX */
-            // this is a privilege opcode...
-            #ifndef TEST_INTERPRETOR
-            emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
-            STEP;
-            #endif
+            if(rex.is32bits) {
+                // faking port write, using explicit ES segment
+                if(ACCESS_FLAG(F_DF))
+                    R_ESI-=(rep?R_ECX:1)*4;
+                else
+                    R_ESI+=(rep?R_ECX:1)*4;
+                if(rep)
+                    R_ECX = 0;
+            } else {
+                // this is a privilege opcode in 64bits, but not in 32bits...
+                #ifndef TEST_INTERPRETOR
+                emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
+                STEP;
+                #endif
+            }
             break;
 
         GOCOND(0x70
@@ -383,6 +558,12 @@ x64emurun:
             ,,STEP2
             )                           /* Jxx Ib */
         
+        case 0x82:
+            if(!rex.is32bits) {
+                unimp = 1;
+                goto fini;
+            }
+            // fallthru
         case 0x80:                      /* GRP Eb,Ib */
             nextop = F8;
             GETEB(1);
@@ -581,17 +762,30 @@ x64emurun:
             else
                 GD->q[0] = tmp64u&0xffffffff;
             break;
-
+        case 0x8E:                      /* MOV Seg, Ew */
+            nextop = F8;
+            GETED(0);
+            emu->segs[((nextop&0x38)>>3)] = ED->word[0];
+            emu->segs_serial[((nextop&0x38)>>3)] = 0;
+            break;
         case 0x8F:                      /* POP Ed */
             nextop = F8;
             if(MODREG) {
-                emu->regs[(nextop&7)+(rex.b<<3)].q[0] = Pop(emu);
+                emu->regs[(nextop&7)+(rex.b<<3)].q[0] = rex.is32bits?Pop32(emu):Pop64(emu);
             } else {
-                tmp64u = Pop(emu);  // this order allows handling POP [ESP] and variant
-                GETED(0);
-                R_ESP -= sizeof(void*); // to prevent issue with SEGFAULT
-                ED->q[0] = tmp64u;
-                R_ESP += sizeof(void*);
+                if(rex.is32bits) {
+                    tmp32u = Pop32(emu);  // this order allows handling POP [ESP] and variant
+                    GETED(0);
+                    R_ESP -= 4; // to prevent issue with SEGFAULT
+                    ED->dword[0] = tmp32u;
+                    R_ESP += 4;
+                } else {
+                    tmp64u = Pop64(emu);  // this order allows handling POP [ESP] and variant
+                    GETED(0);
+                    R_RSP -= sizeof(void*); // to prevent issue with SEGFAULT
+                    ED->q[0] = tmp64u;
+                    R_RSP += sizeof(void*);
+                }
             }
             break;
         case 0x90:                      /* NOP or XCHG R8, RAX*/
@@ -635,11 +829,23 @@ x64emurun:
             break;
         case 0x9C:                      /* PUSHF */
             CHECK_FLAGS(emu);
-            Push(emu, emu->eflags.x64);
+            if(rex.is32bits)
+                Push32(emu, emu->eflags.x64);
+            else
+                Push64(emu, emu->eflags.x64);
             break;
         case 0x9D:                      /* POPF */
-            emu->eflags.x64 = ((Pop(emu) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1
+            emu->eflags.x64 = (((rex.is32bits?Pop32(emu):Pop64(emu)) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1
             RESET_FLAGS(emu);
+            #ifndef TEST_INTERPRETER
+            if(ACCESS_FLAG(F_TF)) {
+                R_RIP = addr;
+                emit_signal(emu, SIGTRAP, (void*)addr, 1);
+                if(emu->quit) goto fini;
+                CLEAR_FLAG(F_TF);
+                STEP;
+            }
+            #endif
             break;
         case 0x9E:                      /* SAHF */
             CHECK_FLAGS(emu);
@@ -656,22 +862,36 @@ x64emurun:
             R_AH = (uint8_t)emu->eflags.x64;
             break;
         case 0xA0:                      /* MOV AL,Ob */
-            R_AL = *(uint8_t*)F64;
+            if(rex.is32bits)
+                R_AL = *(uint8_t*)(uintptr_t)F32;
+            else
+                R_AL = *(uint8_t*)F64;
             break;
         case 0xA1:                      /* MOV EAX,Od */
-            if(rex.w)
-                R_RAX = *(uint64_t*)F64;
-            else
-                R_RAX = *(uint32_t*)F64;
+            if(rex.is32bits)
+                R_EAX = *(int32_t*)(uintptr_t)F32;
+            else {
+                if(rex.w)
+                    R_RAX = *(uint64_t*)F64;
+                else
+                    R_RAX = *(uint32_t*)F64;
+            }
             break;
         case 0xA2:                      /* MOV Ob,AL */
-            *(uint8_t*)F64 = R_AL;
+            if(rex.is32bits)
+                *(uint8_t*)(uintptr_t)F32 = R_AL;
+            else
+                *(uint8_t*)F64 = R_AL;
             break;
         case 0xA3:                      /* MOV Od,EAX */
-            if(rex.w)
-                *(uint64_t*)F64 = R_RAX;
-            else
-                *(uint32_t*)F64 = R_EAX;
+            if(rex.is32bits)
+                *(uint32_t*)(uintptr_t)F32 = R_EAX;
+            else {
+                if(rex.w)
+                    *(uint64_t*)F64 = R_RAX;
+                else
+                    *(uint32_t*)F64 = R_EAX;
+            }
             break;
         case 0xA4:                      /* MOVSB */
             tmp8s = ACCESS_FLAG(F_DF)?-1:+1;
@@ -746,7 +966,6 @@ x64emurun:
                     R_RCX = tmp64u;
                     break;
                 default:
-                    tmp8s = ACCESS_FLAG(F_DF)?-1:+1;
                     tmp8u  = *(uint8_t*)R_RDI;
                     tmp8u2 = *(uint8_t*)R_RSI;
                     R_RDI += tmp8s;
@@ -816,14 +1035,12 @@ x64emurun:
                     break;
                 default:
                     if(rex.w) {
-                        tmp8s = ACCESS_FLAG(F_DF)?-8:+8;
                         tmp64u  = *(uint64_t*)R_RDI;
                         tmp64u2 = *(uint64_t*)R_RSI;
                         R_RDI += tmp8s;
                         R_RSI += tmp8s;
                         cmp64(emu, tmp64u2, tmp64u);
                     } else {
-                        tmp8s = ACCESS_FLAG(F_DF)?-4:+4;
                         tmp32u  = *(uint32_t*)R_RDI;
                         tmp32u2 = *(uint32_t*)R_RSI;
                         R_RDI += tmp8s;
@@ -1090,12 +1307,12 @@ x64emurun:
             break;
         case 0xC2:                      /* RETN Iw */
             tmp16u = F16;
-            addr = Pop(emu);
+            addr = rex.is32bits?Pop32(emu):Pop64(emu);
             R_RSP += tmp16u;
             STEP2
             break;
         case 0xC3:                      /* RET */
-            addr = Pop(emu);
+            addr = rex.is32bits?Pop32(emu):Pop64(emu);
             STEP2
             break;
 
@@ -1118,21 +1335,34 @@ x64emurun:
         case 0xC8:                      /* ENTER Iw,Ib */
             tmp16u = F16;
             tmp8u = (F8) & 0x1f;
-            tmp64u = R_RBP;
-            Push(emu, R_RBP);
-            R_RBP = R_RSP;
-            if (tmp8u) {
-                for (tmp8u2 = 1; tmp8u2 < tmp8u; tmp8u2++) {
-                    tmp64u -= sizeof(void*);
-                    Push(emu, *((uintptr_t*)tmp64u));
+            if(rex.is32bits) {
+                tmp64u = R_EBP;
+                Push32(emu, R_EBP);
+                R_EBP = R_ESP;
+                if (tmp8u) {
+                    for (tmp8u2 = 1; tmp8u2 < tmp8u; tmp8u2++) {
+                        tmp64u -= 4;
+                        Push32(emu, *((uint32_t*)tmp64u));
+                    }
+                    Push32(emu, R_EBP);
+                }
+            } else {
+                tmp64u = R_RBP;
+                Push64(emu, R_RBP);
+                R_RBP = R_RSP;
+                if (tmp8u) {
+                    for (tmp8u2 = 1; tmp8u2 < tmp8u; tmp8u2++) {
+                        tmp64u -= sizeof(void*);
+                        Push64(emu, *((uintptr_t*)tmp64u));
+                    }
+                    Push64(emu, R_RBP);
                 }
-                Push(emu, R_RBP);
             }
             R_RSP -= tmp16u;
             break;
         case 0xC9:                      /* LEAVE */
             R_RSP = R_RBP;
-            R_RBP = Pop(emu);
+            R_RBP = rex.is32bits?Pop32(emu):Pop64(emu);
             break;
 
         case 0xCC:                      /* INT 3 */
@@ -1143,26 +1373,44 @@ x64emurun:
             #endif
             break;
         case 0xCD:                      /* INT n */
+            tmp8u = F8;
             // this is a privilege opcode...
-            #ifndef TEST_INTERPRETER
-            emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
-            STEP;
-            #endif
+            if(box64_wine && tmp8u==0x2D) {
+                // lets ignore the INT 2D
+                printf_log(LOG_DEBUG, "INT 2D called\n");
+            } else if(box64_wine && tmp8u==0x29) {
+                // INT 29 is __fastfail
+                printf_log(LOG_DEBUG, "INT 29 called => __fastfail(0x%x)\n", R_ECX);
+                emu->quit = 1;
+                R_RIP = addr;
+                goto fini;
+            } else if (tmp8u==0x80) {
+                // 32bits syscall
+                #ifndef TEST_INTERPRETER
+                x86Syscall(emu);
+                STEP;
+                #endif
+            } else {
+                #ifndef TEST_INTERPRETER
+                emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
+                STEP;
+                #endif
+            }
             break;
 
-
         case 0xCF:                      /* IRET */
-            addr = Pop(emu);
-            emu->segs[_CS] = Pop(emu)&0xffff;
+            addr = rex.is32bits?Pop32(emu):Pop64(emu);
+            emu->segs[_CS] = (rex.is32bits?Pop32(emu):Pop64(emu))&0xffff;
             emu->segs_serial[_CS] = 0;
-            emu->eflags.x64 = ((Pop(emu) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1
-            tmp64u = Pop(emu);  //RSP
-            emu->segs[_SS] = Pop(emu)&0xffff;
+            emu->eflags.x64 = (((rex.is32bits?Pop32(emu):Pop64(emu)) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1
+            tmp64u = rex.is32bits?Pop32(emu):Pop64(emu);  //RSP
+            emu->segs[_SS] = (rex.is32bits?Pop32(emu):Pop64(emu))&0xffff;
             emu->segs_serial[_SS] = 0;
-            R_RSP= tmp64u;
+            R_RSP = tmp64u;
             RESET_FLAGS(emu);
             R_RIP = addr;
-            goto fini;      // exit, to recompute CS if needed
+            STEP;
+            is32bits = (emu->segs[_CS]==0x23);
             break;
         case 0xD0:                      /* GRP2 Eb,1 */
         case 0xD2:                      /* GRP2 Eb,CL */
@@ -1386,13 +1634,17 @@ x64emurun:
             break;
         case 0xE8:                      /* CALL Id */
             tmp32s = F32S; // call is relative
-            Push(emu, addr);
+            if(rex.is32bits)
+                Push32(emu, addr);
+            else
+                Push64(emu, addr);
             addr += tmp32s;
             STEP2
             break;
         case 0xE9:                      /* JMP Id */
             tmp32s = F32S; // jmp is relative
             addr += tmp32s;
+            addr = (uintptr_t)getAlternate((void*)addr);
             STEP2
             break;
 
@@ -1549,12 +1801,12 @@ x64emurun:
             SET_FLAG(F_CF);
             break;
         case 0xFA:                      /* CLI */
-            // this is a privilege opcode...
+            // this is a privilege opcode
             emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
             STEP;
             break;
         case 0xFB:                      /* STI */
-            // this is a privilege opcode...
+            // this is a privilege opcode
             emit_signal(emu, SIGSEGV, (void*)R_RIP, 0);
             STEP;
             break;
@@ -1606,8 +1858,13 @@ x64emurun:
                     break;
                 case 2:                 /* CALL NEAR Ed */
                     GETE8(0);
-                    tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);
-                    Push(emu, addr);
+                    if(rex.is32bits) {
+                        tmp64u = (uintptr_t)ED->dword[0];
+                        Push32(emu, addr);
+                    } else {
+                        tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);
+                        Push64(emu, addr);
+                    }
                     addr = tmp64u;
                     STEP2
                     break;
@@ -1619,16 +1876,27 @@ x64emurun:
                         emu->error |= ERR_ILLEGAL;
                         goto fini;
                     } else {
-                        Push(emu, R_CS);
-                        Push(emu, addr);
-                        R_RIP = addr = (uintptr_t)getAlternate((void*)ED->q[0]);   // check CS?
-                        R_CS = (ED+1)->word[0];
-                        goto fini;  // exit loop to recompute new CS...
+                        if(rex.is32bits || !rex.w) {
+                            Push32(emu, R_CS);
+                            Push32(emu, addr);
+                            addr = (uintptr_t)getAlternate((void*)(uintptr_t)ED->dword[0]);
+                            R_CS = ED->word[2];
+                        } else {
+                            Push64(emu, R_CS);
+                            Push64(emu, addr);
+                            addr = (uintptr_t)getAlternate((void*)ED->q[0]);
+                            R_CS = (ED+1)->word[0];
+                        }
+                        STEP2;
+                        is32bits = (emu->segs[_CS]==0x23);
                     }
                     break;
                 case 4:                 /* JMP NEAR Ed */
                     GETE8(0);
-                    addr = (uintptr_t)getAlternate((void*)ED->q[0]);
+                    if(rex.is32bits)
+                        addr = (uintptr_t)ED->dword[0];
+                    else
+                        addr = (uintptr_t)getAlternate((void*)ED->q[0]);
                     STEP2
                     break;
                 case 5:                 /* JMP FAR Ed */
@@ -1639,23 +1907,26 @@ x64emurun:
                         emu->error |= ERR_ILLEGAL;
                         goto fini;
                     } else {
-                        R_RIP = (uintptr_t)getAlternate((void*)ED->q[0]);   //check CS?
-                        R_CS = (ED+1)->word[0];
-                        goto fini;  // exit loop to recompute CS...
+                        if(rex.is32bits || !rex.w) {
+                            addr = (uintptr_t)getAlternate((void*)(uintptr_t)ED->dword[0]);
+                            R_CS = ED->word[2];
+                        } else {
+                            addr = (uintptr_t)getAlternate((void*)ED->q[0]);
+                            R_CS = (ED+1)->word[0];
+                        }
+                        STEP2;
+                        is32bits = (emu->segs[_CS]==0x23);
                     }
                     break;
                 case 6:                 /* Push Ed */
-                    GETE8(0);
-                    tmp64u = ED->q[0];  // rex.w ignored
-                    #ifdef TEST_INTERPRETER
-                    R_RSP -=8;
-                    if(test->memsize!=8)
-                        *(uint64_t*)test->mem = *(uint64_t*)test->memaddr;
-                    test->memsize = 8;
-                    test->memaddr = R_RSP;
-                    #else
-                    Push(emu, tmp64u);  // avoid potential issue with push [esp+...]
-                    #endif
+                    _GETED(0);
+                    if(rex.is32bits) {
+                        tmp32u = ED->dword[0];
+                        Push32(emu, tmp32u);  // avoid potential issue with push [esp+...]
+                    } else {
+                        tmp64u = ED->q[0];  // rex.w ignored
+                        Push64(emu, tmp64u);  // avoid potential issue with push [esp+...]
+                    }
                     break;
                 default:
                     printf_log(LOG_NONE, "Illegal Opcode %p: %02X %02X %02X %02X %02X %02X\n",(void*)R_RIP, opcode, nextop, PK(2), PK(3), PK(4), PK(5));
@@ -1673,11 +1944,12 @@ x64emurun:
 
 
 fini:
+if(emu->segs[_CS]!=0x33 && emu->segs[_CS]!=0x23) printf_log(LOG_NONE, "Warning, CS is not default value: 0x%x\n", emu->segs[_CS]);
 #ifndef TEST_INTERPRETER
     printf_log(LOG_DEBUG, "End of X86 run (%p), RIP=%p, Stack=%p, unimp=%d, emu->fork=%d, emu->uc_link=%p, emu->quit=%d\n", emu, (void*)R_RIP, (void*)R_RSP, unimp, emu->fork, emu->uc_link, emu->quit);
     if(unimp) {
         emu->quit = 1;
-        UnimpOpcode(emu);
+        UnimpOpcode(emu, is32bits);
     }
     // fork handling
     if(emu->fork) {
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c
index 5f46db5d..b09dce9c 100644
--- a/src/emu/x64run0f.c
+++ b/src/emu/x64run0f.c
@@ -108,7 +108,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
             nextop = F8;

             GETEX(0);

             GETGX;

-            if((nextop&0xC0)==0xC0)    /* MOVHLPS Gx,Ex */

+            if(MODREG)    /* MOVHLPS Gx,Ex */

                 GX->q[0] = EX->q[1];

             else

                 GX->q[0] = EX->q[0];    /* MOVLPS Gx,Ex */

@@ -350,8 +350,12 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                     GETED(0);

                     if(rex.w)

                         ED->q[0] = __builtin_bswap64(GD->q[0]);

-                    else

-                        ED->q[0] = __builtin_bswap32(GD->dword[0]);

+                    else {

+                        if(MODREG)

+                            ED->q[0] = __builtin_bswap32(GD->dword[0]);

+                        else

+                            ED->dword[0] = __builtin_bswap32(GD->dword[0]);

+                    }

                     break;

 

                 default:

@@ -929,9 +933,9 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
             if((nextop&0xF8)==0xF8) {

                 return addr;            /* SFENCE */

             }

-            GETED(0);

             switch((nextop>>3)&7) {

                 case 0:                 /* FXSAVE Ed */

+                    _GETED(0);

                     #ifndef TEST_INTERPRETER

                     if(rex.w)

                         fpu_fxsave64(emu, ED);

@@ -940,14 +944,14 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                     #endif

                     break;

                 case 1:                 /* FXRSTOR Ed */

-                    #ifndef TEST_INTERPRETER

+                    _GETED(0);

                     if(rex.w)

                         fpu_fxrstor64(emu, ED);

                     else

                         fpu_fxrstor32(emu, ED);

-                    #endif

                     break;

                 case 2:                 /* LDMXCSR Md */

+                    GETED(0);

                     emu->mxcsr.x32 = ED->dword[0];

                     #ifndef TEST_INTERPRETER

                     if(box64_sse_flushto0)

@@ -955,9 +959,11 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                     #endif

                     break;

                 case 3:                 /* STMXCSR Md */

+                    GETED(0);

                     ED->dword[0] = emu->mxcsr.x32;

                     break;

                 case 7:                 /* CLFLUSH Ed */

+                    _GETED(0);

                     #if defined(DYNAREC) && !defined(TEST_INTERPRETER)

                     if(box64_dynarec)

                         cleanDBFromAddressRange((uintptr_t)ED, 8, 0);

@@ -1432,7 +1438,12 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
             GETGM;

             GM->q = (EM->q > 63) ? 0L : (GM->q >> EM->q);

             break;

-

+        case 0xD4:                   /* PADDQ Gm,Em */

+            nextop = F8;

+            GETEM(0);

+            GETGM;

+            GM->sq += EM->sq;

+            break;

         case 0xD5:                   /* PMULLW Gm,Em */

             nextop = F8;

             GETEM(0);

@@ -1572,7 +1583,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
             break;

         case 0xE7:                   /* MOVNTQ Em,Gm */

             nextop = F8;

-            if((nextop&0xC0)==0xC0)

+            if(MODREG)

                 return 0;

             GETEM(0);

             GETGM;

@@ -1596,7 +1607,13 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                 GM->sw[i] = (tmp32s>32767)?32767:((tmp32s<-32768)?-32768:tmp32s);

             }

             break;

-

+        case 0xEA:                  /* PMINSW Gm,Em */

+            nextop = F8;

+            GETEM(0);

+            GETGM;

+            for (int i=0; i<4; ++i)

+                GM->sw[i] = (GM->sw[i]<EM->sw[i])?GM->sw[i]:EM->sw[i];

+            break;

         case 0xEB:                   /* POR Gm, Em */

             nextop = F8;

             GETEM(0);

@@ -1621,7 +1638,13 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
                 GM->sw[i] = (tmp32s>32767)?32767:((tmp32s<-32768)?-32768:tmp32s);

             }

             break;

-

+        case 0xEE:                  /* PMAXSW Gm,Em */

+            nextop = F8;

+            GETEM(0);

+            GETGM;

+            for (int i=0; i<4; ++i)

+                GM->sw[i] = (GM->sw[i]>EM->sw[i])?GM->sw[i]:EM->sw[i];

+            break;

         case 0xEF:                   /* PXOR Gm, Em */

             nextop = F8;

             GETEM(0);

@@ -1659,7 +1682,12 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
             GETGM;

             GM->q = (EM->q > 63) ? 0L : (GM->q << EM->ub[0]);

             break;

-

+        case 0xF4:                   /* PMULUDQ Gm,Em */

+            nextop = F8;

+            GETEM(0);

+            GETGM;

+            GM->q = (uint64_t)GM->ud[0] * (uint64_t)EM->ud[0];

+            break;

         case 0xF5:                   /* PMADDWD Gm, Em */

             nextop = F8;

             GETEM(0);

diff --git a/src/emu/x64run64.c b/src/emu/x64run64.c
index a8d100a3..587cc81e 100644
--- a/src/emu/x64run64.c
+++ b/src/emu/x64run64.c
@@ -47,19 +47,21 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
     opcode = F8;

     // REX prefix before the F0 are ignored

     rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    if(!rex.is32bits)

+        while(opcode>=0x40 && opcode<=0x4f) {

+            rex.rex = opcode;

+            opcode = F8;

+        }

     rep = 0;

     while((opcode==0xF2) || (opcode==0xF3)) {

         rep = opcode-0xF1;

         opcode = F8;

     }

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    if(!rex.is32bits)

+        while(opcode>=0x40 && opcode<=0x4f) {

+            rex.rex = opcode;

+            opcode = F8;

+        }

 

     switch(opcode) {

         #define GO(B, OP)                                   \

@@ -121,6 +123,12 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
 

                 case 0x10:

                     switch(rep) {

+                        case 0: /* MOVUPS Gx, FS:Ex */

+                            nextop = F8;

+                            GETEX_OFFS(0, tlsdata);

+                            GETGX;

+                            GX->u128 = EX->u128;

+                            break;

                         case 1: /* MOVSD Gx, FS:Ex */

                             nextop = F8;

                             GETEX_OFFS(0, tlsdata);

@@ -169,7 +177,18 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
                             return 0;

                     }

                     break;

-

+                case 0x28:

+                    switch(rep) {

+                        case 0: /* MOVAPS Gx, FS:Ex */

+                            nextop = F8;

+                            GETEX_OFFS(0, tlsdata);

+                            GETGX;

+                            GX->u128 = EX->u128;

+                            break;

+                        default:

+                            return 0;

+                    }

+                    break;

                 case 0x29:                      /* MOVAPS FS:Ex,Gx */

                     switch(rep) {

                         case 0:

@@ -290,17 +309,28 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
             nextop = F8;

             GETED_OFFS(0, tlsdata);

             GETGD;

-            if(rex.w)

-                GD->sq[0] = ED->sdword[0];

-            else

-                if(MODREG)

-                    GD->q[0] = ED->dword[0];    // not really a sign extension

+            if(rex.is32bits) {

+                // ARPL here

+                // faking to always happy...

+                SET_FLAG(F_ZF);

+            } else {

+                if(rex.w)

+                    GD->sq[0] = ED->sdword[0];

                 else

-                    GD->sdword[0] = ED->sdword[0];  // meh?

+                    if(MODREG)

+                        GD->q[0] = ED->dword[0];    // not really a sign extension

+                    else

+                        GD->sdword[0] = ED->sdword[0];  // meh?

+            }

             break;

 

         case 0x66:

             return Run6664(emu, rex, seg, addr);

+        case 0x67:

+            if(rex.is32bits)

+                return Run6764_32(emu, rex, seg, seg, addr);

+            else

+                return 0;

 

         case 0x80:                      /* GRP Eb,Ib */

             nextop = F8;

@@ -378,7 +408,6 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
             if(rex.w) {

                 ED->q[0] = GD->q[0];

             } else {

-                //if ED is a reg, than the opcode works like movzx

                 if(MODREG)

                     ED->q[0] = GD->dword[0];

                 else

@@ -401,6 +430,63 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
                 GD->q[0] = ED->dword[0];

             break;

 

+        case 0x8D:                      /* LEA Gd,M */

+            nextop = F8;

+            GETGD;

+            tmp64u = GETEA(0);

+            if(rex.w)

+                GD->q[0] = tmp64u;

+            else

+                GD->q[0] = tmp64u&0xffffffff;

+            break;

+

+        case 0x8F:                      /* POP FS:Ed */

+            nextop = F8;

+            if(MODREG) {

+                emu->regs[(nextop&7)+(rex.b<<3)].q[0] = Pop64(emu);

+            } else {

+                if(rex.is32bits) {

+                    tmp32u = Pop32(emu);  // this order allows handling POP [ESP] and variant

+                    GETED_OFFS(0, tlsdata);

+                    R_ESP -= 4; // to prevent issue with SEGFAULT

+                    ED->dword[0] = tmp32u;

+                    R_ESP += 4;

+                } else {

+                    tmp64u = Pop64(emu);  // this order allows handling POP [ESP] and variant

+                    GETED_OFFS(0, tlsdata);

+                    R_RSP -= sizeof(void*); // to prevent issue with SEGFAULT

+                    ED->q[0] = tmp64u;

+                    R_RSP += sizeof(void*);

+                }

+            }

+            break;

+

+        case 0xA1:                      /* MOV EAX,FS:Od */

+            if(rex.is32bits) {

+                tmp32s = F32S;

+                R_EAX = *(uint32_t*)(tlsdata+tmp32s);

+            } else {

+                tmp64u = F64;

+                if(rex.w)

+                    R_RAX = *(uint64_t*)(tlsdata+tmp64u);

+                else

+                    R_RAX = *(uint32_t*)(tlsdata+tmp64u);

+            }

+            break;

+

+        case 0xA3:                      /* MOV FS:Od,EAX */

+            if(rex.is32bits) {

+                tmp32s = F32S;

+                *(uint32_t*)(uintptr_t)(tlsdata+tmp32s) = R_EAX;

+            } else {

+                tmp64u = F64;

+                if(rex.w)

+                    *(uint64_t*)(tlsdata+tmp64u) = R_RAX;

+                else

+                    *(uint32_t*)(tlsdata+tmp64u) = R_EAX;

+            }

+            break;

+

         case 0xC6:                      /* MOV FS:Eb, Ib */

             nextop = F8;

             GETEB_OFFS(1, tlsdata);

@@ -556,42 +642,66 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
                     }

                     break;

                 case 2:                 /* CALL NEAR Ed */

-                    tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);

-                    Push(emu, addr);

+                    if(rex.is32bits) {

+                        tmp64u = (uintptr_t)getAlternate((void*)(uintptr_t)ED->dword[0]);

+                        Push32(emu, addr);

+                    } else {

+                        tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);

+                        Push64(emu, addr);

+                    }

                     addr = tmp64u;

                     break;

                 case 3:                 /* CALL FAR Ed */

-                    if(nextop>0xC0) {

+                    if(MODREG) {

                         printf_log(LOG_NONE, "Illegal Opcode %p: %02X %02X %02X %02X\n", (void*)R_RIP, opcode, nextop, PK(2), PK(3));

                         emu->quit=1;

                         emu->error |= ERR_ILLEGAL;

                         return 0;

                     } else {

-                        Push16(emu, R_CS);

-                        Push(emu, addr);

-                        R_RIP = addr = ED->dword[0];

-                        R_CS = (ED+1)->word[0];

+                        if(rex.is32bits || !rex.w) {

+                            Push32(emu, R_CS);

+                            Push32(emu, addr);

+                            R_RIP = addr = ED->dword[0];

+                            R_CS = ED->word[2];

+                        } else {

+                            Push64(emu, R_CS);

+                            Push64(emu, addr);

+                            R_RIP = addr = ED->q[0];

+                            R_CS = (ED+1)->word[0];

+                        }

                         return 0;  // exit loop to recompute new CS...

                     }

                     break;

                 case 4:                 /* JMP NEAR Ed */

-                    addr = (uintptr_t)getAlternate((void*)ED->q[0]);

+                    if(rex.is32bits)

+                        addr = (uintptr_t)getAlternate((void*)(uintptr_t)ED->dword[0]);

+                    else

+                        addr = (uintptr_t)getAlternate((void*)ED->q[0]);

                     break;

                 case 5:                 /* JMP FAR Ed */

-                    if(nextop>0xc0) {

+                    if(MODREG) {

                         printf_log(LOG_NONE, "Illegal Opcode %p: 0x%02X 0x%02X %02X %02X\n", (void*)R_RIP, opcode, nextop, PK(2), PK(3));

                         emu->quit=1;

                         emu->error |= ERR_ILLEGAL;

                         return 0;

                     } else {

-                        R_RIP = addr = ED->q[0];

-                        R_CS = (ED+1)->word[0];

-                        return 0;  // exit loop to recompute CS...

+                        if(rex.is32bits || !rex.w) {

+                            R_RIP = addr = ED->dword[0];

+                            R_CS = ED->word[2];

+                        } else {

+                            R_RIP = addr = ED->q[0];

+                            R_CS = (ED+1)->word[0];

+                        }

                     }

                     break;

                 case 6:                 /* Push Ed */

-                    tmp64u = ED->q[0];  // rex.w ignored

-                    Push(emu, tmp64u);  // avoid potential issue with push [esp+...]

+                    if(rex.is32bits) {

+                        tmp32u = ED->dword[0];

+                        Push32(emu, tmp32u);  // avoid potential issue with push [esp+...]

+                    } else {

+                        tmp64u = ED->q[0];  // rex.w ignored

+                        Push64(emu, tmp64u);  // avoid potential issue with push [esp+...]

+                    }

                     break;

                 default:

                     printf_log(LOG_NONE, "Illegal Opcode %p: %02X %02X %02X %02X %02X %02X\n",(void*)R_RIP, opcode, nextop, PK(2), PK(3), PK(4), PK(5));

diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c
index c2d53742..b037de11 100644
--- a/src/emu/x64run66.c
+++ b/src/emu/x64run66.c
@@ -56,10 +56,11 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
     }

 

     rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    if(!rex.is32bits)

+        while(opcode>=0x40 && opcode<=0x4f) {

+            rex.rex = opcode;

+            opcode = F8;

+        }

 

     switch(opcode) {

     #define GO(B, OP)                                               \

@@ -91,7 +92,7 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
         if(rex.w)                                                   \

             GW->q[0] = OP##64(emu, GW->q[0], EW->q[0]);             \

         else                                                        \

-        GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);        \

+            GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);    \

         break;                                                      \

     case B+4:                                                       \

         R_AL = OP##8(emu, R_AL, F8);                                \

@@ -143,6 +144,59 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
             cmp16(emu, R_AX, F16);

         break;

 

+    case 0x40:

+    case 0x41:

+    case 0x42:

+    case 0x43:

+    case 0x44:

+    case 0x45:

+    case 0x46:

+    case 0x47:                              /* INC Reg (32bits only) */

+        tmp8u = opcode&7;

+        emu->regs[tmp8u].word[0] = inc16(emu, emu->regs[tmp8u].word[0]);

+        break;

+    case 0x48:

+    case 0x49:

+    case 0x4A:

+    case 0x4B:

+    case 0x4C:

+    case 0x4D:

+    case 0x4E:

+    case 0x4F:                              /* DEC Reg (32bits only) */

+        tmp8u = opcode&7;

+        emu->regs[tmp8u].word[0] = dec16(emu, emu->regs[tmp8u].word[0]);

+        break;

+

+    case 0x60:                              /* PUSHA */

+        if(rex.is32bits) {

+            tmp16u = R_SP;

+            Push16(emu, R_AX);

+            Push16(emu, R_CX);

+            Push16(emu, R_DX);

+            Push16(emu, R_BX);

+            Push16(emu, tmp16u);

+            Push16(emu, R_BP);

+            Push16(emu, R_SI);

+            Push16(emu, R_DI);

+        } else {

+            return 0;

+        }

+        break;

+    case 0x61:                              /* POPA */

+        if(rex.is32bits) {

+            R_DI = Pop16(emu);

+            R_SI = Pop16(emu);

+            R_BP = Pop16(emu);

+            R_ESP+=2;   // POP ESP

+            R_BX = Pop16(emu);

+            R_DX = Pop16(emu);

+            R_CX = Pop16(emu);

+            R_AX = Pop16(emu);

+        } else {

+            return 0;

+        }

+        break;

+

     case 0x64:                              /* FS: */

         #ifdef TEST_INTERPRETER

         return Test6664(test, rex, _FS, addr);

@@ -314,18 +368,36 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
         R_DX=((R_AX & 0x8000)?0xFFFF:0x0000);

         break;

 

+    case 0x9C:                              /* PUSHFW */

+        CHECK_FLAGS(emu);

+        Push16(emu, (uint16_t)emu->eflags.x64);

+        break;

+    case 0x9D:                              /* POPFW */

+        CHECK_FLAGS(emu);

+        emu->eflags.x64 &=0xffff0000;

+        emu->eflags.x64 |= (Pop16(emu) & 0x3F7FD7) | 0x2;

+        break;

+

     case 0xA1:                      /* MOV EAX,Od */

-        if(rex.w)

-            R_RAX = *(uint64_t*)F64;

-        else

-            R_AX = *(uint16_t*)F64;

+        if(rex.is32bits) {

+            R_AX = *(uint16_t*)(uintptr_t)F32;

+        } else {

+            if(rex.w)

+                R_RAX = *(uint64_t*)F64;

+            else

+                R_AX = *(uint16_t*)F64;

+        }

         break;

 

     case 0xA3:                      /* MOV Od,EAX */

-        if(rex.w)

-            *(uint64_t*)F64 = R_RAX;

-        else

-            *(uint16_t*)F64 = R_AX;

+        if(rex.is32bits) {

+            *(uint16_t*)(uintptr_t)F32 = R_AX;

+        } else {

+            if(rex.w)

+                *(uint64_t*)F64 = R_RAX;

+            else

+                *(uint16_t*)F64 = R_AX;

+        }

         break;

 

     case 0xA5:              /* (REP) MOVSW */

@@ -414,14 +486,12 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
                 break;

             default:

                 if(rex.w) {

-                    tmp8s = ACCESS_FLAG(F_DF)?-8:+8;

                     tmp64u  = *(uint64_t*)R_RDI;

                     tmp64u2 = *(uint64_t*)R_RSI;

                     R_RDI += tmp8s;

                     R_RSI += tmp8s;

                     cmp64(emu, tmp64u2, tmp64u);

                 } else {

-                    tmp8s = ACCESS_FLAG(F_DF)?-2:+2;

                     tmp16u  = *(uint16_t*)R_RDI;

                     tmp16u2 = *(uint16_t*)R_RSI;

                     R_RDI += tmp8s;

@@ -485,7 +555,7 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
             R_RCX = tmp64u;

         break;

 

-    case 0xAF:                      /* (REPZ/REPNE) SCASD */

+    case 0xAF:                      /* (REPZ/REPNE) SCASW */

         if(rex.w)

             tmp8s = ACCESS_FLAG(F_DF)?-8:+8;

         else

@@ -647,7 +717,10 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
 

     case 0xE8:                              /* CALL Id */

         tmp32s = F32S; // call is relative

-        Push(emu, addr);

+        if(rex.is32bits)

+            Push32(emu, addr);

+        else

+            Push64(emu, addr);

         addr += tmp32s;

         break;

 

@@ -735,8 +808,13 @@ uintptr_t Run66(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
                 EW->word[0] = dec16(emu, EW->word[0]);

                 break;

             case 2:                 /* CALL NEAR Ed */

-                tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);

-                Push(emu, addr);

+                if(rex.is32bits) {

+                    tmp64u = (uintptr_t)getAlternate((void*)(uintptr_t)ED->dword[0]);

+                    Push32(emu, addr);

+                } else {

+                    tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);

+                    Push64(emu, addr);

+                }

                 addr = tmp64u;

                 break;

            /*case 6:

diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
index 29f36fcd..3083b7b0 100644
--- a/src/emu/x64run660f.c
+++ b/src/emu/x64run660f.c
@@ -591,7 +591,13 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr)
                 for(int i=1; i>=0; --i)

                     GX->q[i] = EX->ud[i];

                 break;

-

+            case 0x37: /* PCMPGTQ Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=1; i>=0; --i)

+                    GX->sq[i] = (GX->sq[i]>EX->sq[i])?-1LL:0LL;

+                break;

             case 0x38:  /* PMINSB Gx, Ex */

                 nextop = F8;

                 GETEX(0);

diff --git a/src/emu/x64run6664.c b/src/emu/x64run6664.c
index 668507a4..48a3be99 100644
--- a/src/emu/x64run6664.c
+++ b/src/emu/x64run6664.c
@@ -40,10 +40,11 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
     opcode = F8;

     // REX prefix before the F0 are ignored

     rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    if(!rex.is32bits)

+        while(opcode>=0x40 && opcode<=0x4f) {

+            rex.rex = opcode;

+            opcode = F8;

+        }

 

     switch(opcode) {

 

@@ -91,7 +92,7 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
             }

             break;

 

-        case 0x89:                              /* MOV Ew,Gw */

+        case 0x89:                              /* MOV FS:Ew,Gw */

             nextop = F8;

             GETEW_OFFS(0, tlsdata);

             GETGW;

@@ -100,8 +101,7 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
             else

                 EW->word[0] = GW->word[0];

             break;

-

-        case 0x8B:                      /* MOV Gd,Ed */

+        case 0x8B:                      /* MOV Gw,FS:Ew */

             nextop = F8;

             GETEW_OFFS(0, tlsdata);

             GETGW;

@@ -110,9 +110,16 @@ uintptr_t Run6664(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
             else

                 GW->word[0] = EW->word[0];

             break;

-

+        case 0xC7:                      /* MOV FS:Ew,Iw */

+            nextop = F8;

+            GETEW_OFFS(2, tlsdata);

+            if(rex.w)

+                EW->q[0] = F16S;

+            else

+                EW->word[0] = F16;

+            break;

        default:

             return 0;

     }

     return addr;

-}
\ No newline at end of file
+}

diff --git a/src/emu/x64run66f0.c b/src/emu/x64run66f0.c
index a880593c..df302af5 100644
--- a/src/emu/x64run66f0.c
+++ b/src/emu/x64run66f0.c
@@ -33,6 +33,7 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
 {
     uint8_t opcode;
     uint8_t nextop;
+    int16_t tmp16s;
     uint16_t tmp16u, tmp16u2;
     int32_t tmp32s;
     int64_t tmp64s;
@@ -47,12 +48,14 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
     opcode = F8;
     // REX prefix before the F0 are ignored
     rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+    uintptr_t addr_entry = addr;
+    if(!rex.is32bits)
+        while(opcode>=0x40 && opcode<=0x4f) {
+            rex.rex = opcode;
+            opcode = F8;
+        }
 
-    if(rex.w) return RunF0(emu, rex, addr);
+    if(rex.w) return RunF0(emu, rex, addr_entry);
 
     switch(opcode) {
         
@@ -92,39 +95,25 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
                     GETEW(0);
                     GETGW;
 #if defined(DYNAREC) && !defined(TEST_INTERPRETER)
-                    if(rex.w) {
+                    if(((uintptr_t)ED)&1) {
                         do {
-                            tmp64u = native_lock_read_dd(ED);
-                            tmp64u2 = add64(emu, tmp64u, GD->q[0]);
-                        } while(native_lock_write_dd(ED, tmp64u2));
-                        GD->q[0] = tmp64u;
+                            tmp16u = ED->word[0] & ~0xff;
+                            tmp16u |= native_lock_read_h(ED);
+                            tmp16u2 = add16(emu, tmp16u, GD->word[0]);
+                        } while(native_lock_write_h(ED, tmp16u2&0xff));
+                        ED->word[0] = tmp16u2;
                     } else {
-                        if(((uintptr_t)ED)&1) {
-                            do {
-                                tmp16u = ED->word[0] & ~0xff;
-                                tmp16u |= native_lock_read_h(ED);
-                                tmp16u2 = add16(emu, tmp16u, GD->word[0]);
-                            } while(native_lock_write_h(ED, tmp16u2&0xff));
-                            ED->word[0] = tmp16u2;
-                        } else {
-                            do {
-                                tmp16u = native_lock_read_h(ED);
-                                tmp16u2 = add16(emu, tmp16u, GD->word[0]);
-                            } while(native_lock_write_h(ED, tmp16u2));
-                        }
-                        GD->word[0] = tmp16u;
+                        do {
+                            tmp16u = native_lock_read_h(ED);
+                            tmp16u2 = add16(emu, tmp16u, GD->word[0]);
+                        } while(native_lock_write_h(ED, tmp16u2));
                     }
+                    GD->word[0] = tmp16u;
 #else
                     pthread_mutex_lock(&emu->context->mutex_lock);
-                    if(rex.w) {
-                        tmp64u = add64(emu, ED->q[0], GD->q[0]);
-                        GD->q[0] = ED->q[0];
-                        ED->q[0] = tmp64u;
-                    } else {
-                        tmp16u = add16(emu, ED->word[0], GD->word[0]);
-                        GD->word[0] = ED->word[0];
-                        ED->word[0] = tmp16u;
-                    }
+                    tmp16u = add16(emu, ED->word[0], GD->word[0]);
+                    GD->word[0] = ED->word[0];
+                    ED->word[0] = tmp16u;
                     pthread_mutex_unlock(&emu->context->mutex_lock);
 #endif
                     break;
@@ -140,32 +129,18 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
             nextop = F8;                                            \
             GETEW(0);                                               \
             GETGW;                                                  \
-            if(rex.w) {                                             \
-                do {                                                \
-                    tmp64u = native_lock_read_dd(ED);               \
-                    tmp64u = OP##64(emu, tmp64u, GD->q[0]);         \
-                } while (native_lock_write_dd(ED, tmp64u));         \
-            } else {                                                \
-                do {                                                \
-                    tmp16u = native_lock_read_h(ED);                \
-                    tmp16u = OP##16(emu, tmp16u, GW->word[0]);      \
-                } while (native_lock_write_h(ED, tmp16u));          \
-            }                                                       \
+            do {                                                    \
+                tmp16u = native_lock_read_h(ED);                    \
+                tmp16u = OP##16(emu, tmp16u, GW->word[0]);          \
+            } while (native_lock_write_h(ED, tmp16u));              \
             break;                                                  \
         case B+3:                                                   \
             nextop = F8;                                            \
             GETEW(0);                                               \
             GETGW;                                                  \
-            if(rex.w)                                               \
-                GD->q[0] = OP##64(emu, GD->q[0], ED->q[0]);         \
-            else                                                    \
-                GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);\
-            break;                                                  \
+            GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);    \
         case B+5:                                                   \
-            if(rex.w)                                               \
-                R_RAX = OP##64(emu, R_RAX, F32S64);                 \
-            else                                                    \
-                R_AX = OP##16(emu, R_AX, F16);                      \
+            R_AX = OP##16(emu, R_AX, F16);                          \
             break;
 #else
         #define GO(B, OP)                                           \
@@ -174,10 +149,7 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
             GETEW(0);                                               \
             GETGW;                                                  \
             pthread_mutex_lock(&emu->context->mutex_lock);          \
-            if(rex.w)                                               \
-                ED->q[0] = OP##64(emu, ED->q[0], GD->q[0]);         \
-            else                                                    \
-                EW->word[0] = OP##16(emu, EW->word[0], GW->word[0]);\
+            EW->word[0] = OP##16(emu, EW->word[0], GW->word[0]);    \
             pthread_mutex_unlock(&emu->context->mutex_lock);        \
             break;                                                  \
         case B+3:                                                   \
@@ -185,18 +157,12 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
             GETEW(0);                                               \
             GETGW;                                                  \
             pthread_mutex_lock(&emu->context->mutex_lock);          \
-            if(rex.w)                                               \
-                GD->q[0] = OP##64(emu, GD->q[0], ED->q[0]);         \
-            else                                                    \
-                GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);\
+            GW->word[0] = OP##16(emu, GW->word[0], EW->word[0]);    \
             pthread_mutex_unlock(&emu->context->mutex_lock);        \
             break;                                                  \
         case B+5:                                                   \
             pthread_mutex_lock(&emu->context->mutex_lock);          \
-            if(rex.w)                                               \
-                R_RAX = OP##64(emu, R_RAX, F32S64);                 \
-            else                                                    \
-                R_AX = OP##16(emu, R_AX, F16);                      \
+            R_AX = OP##16(emu, R_AX, F16);                          \
             pthread_mutex_unlock(&emu->context->mutex_lock);        \
             break;
 #endif
@@ -213,42 +179,42 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
         case 0x83:              /* GRP Ew,Ib */
             nextop = F8;
             GETED((opcode==0x83)?1:2);
-            tmp64s = (opcode==0x83)?(F8S):(F16S);
-            tmp64u = (uint64_t)tmp64s;
+            tmp16s = (opcode==0x83)?(F8S):(F16S);
+            tmp16u = (uint16_t)tmp16s;
 #if defined(DYNAREC) && !defined(TEST_INTERPRETER)
             if(MODREG)
                 switch((nextop>>3)&7) {
-                    case 0: ED->word[0] = add16(emu, ED->word[0], tmp64u); break;
-                    case 1: ED->word[0] =  or16(emu, ED->word[0], tmp64u); break;
-                    case 2: ED->word[0] = adc16(emu, ED->word[0], tmp64u); break;
-                    case 3: ED->word[0] = sbb16(emu, ED->word[0], tmp64u); break;
-                    case 4: ED->word[0] = and16(emu, ED->word[0], tmp64u); break;
-                    case 5: ED->word[0] = sub16(emu, ED->word[0], tmp64u); break;
-                    case 6: ED->word[0] = xor16(emu, ED->word[0], tmp64u); break;
-                    case 7:            cmp16(emu, ED->word[0], tmp64u); break;
+                    case 0: ED->word[0] = add16(emu, ED->word[0], tmp16u); break;
+                    case 1: ED->word[0] =  or16(emu, ED->word[0], tmp16u); break;
+                    case 2: ED->word[0] = adc16(emu, ED->word[0], tmp16u); break;
+                    case 3: ED->word[0] = sbb16(emu, ED->word[0], tmp16u); break;
+                    case 4: ED->word[0] = and16(emu, ED->word[0], tmp16u); break;
+                    case 5: ED->word[0] = sub16(emu, ED->word[0], tmp16u); break;
+                    case 6: ED->word[0] = xor16(emu, ED->word[0], tmp16u); break;
+                    case 7:               cmp16(emu, ED->word[0], tmp16u); break;
                 }
             else
                 switch((nextop>>3)&7) {
-                    case 0: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = add16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 1: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 =  or16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 2: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = adc16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 3: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = sbb16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 4: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = and16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 5: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = sub16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 6: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = xor16(emu, tmp16u2, tmp64u);} while(native_lock_write_h(ED, tmp16u2)); break;
-                    case 7:                                                 cmp16(emu, ED->word[0], tmp64u); break;
+                    case 0: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = add16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 1: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 =  or16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 2: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = adc16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 3: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = sbb16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 4: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = and16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 5: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = sub16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 6: do { tmp16u2 = native_lock_read_h(ED); tmp16u2 = xor16(emu, tmp16u2, tmp16u);} while(native_lock_write_h(ED, tmp16u2)); break;
+                    case 7:                                                  cmp16(emu, ED->word[0], tmp16u); break;
                 }
 #else
             pthread_mutex_lock(&emu->context->mutex_lock);
             switch((nextop>>3)&7) {
-                case 0: ED->word[0] = add16(emu, ED->word[0], tmp64u); break;
-                case 1: ED->word[0] =  or16(emu, ED->word[0], tmp64u); break;
-                case 2: ED->word[0] = adc16(emu, ED->word[0], tmp64u); break;
-                case 3: ED->word[0] = sbb16(emu, ED->word[0], tmp64u); break;
-                case 4: ED->word[0] = and16(emu, ED->word[0], tmp64u); break;
-                case 5: ED->word[0] = sub16(emu, ED->word[0], tmp64u); break;
-                case 6: ED->word[0] = xor16(emu, ED->word[0], tmp64u); break;
-                case 7:               cmp16(emu, ED->word[0], tmp64u); break;
+                case 0: ED->word[0] = add16(emu, ED->word[0], tmp16u); break;
+                case 1: ED->word[0] =  or16(emu, ED->word[0], tmp16u); break;
+                case 2: ED->word[0] = adc16(emu, ED->word[0], tmp16u); break;
+                case 3: ED->word[0] = sbb16(emu, ED->word[0], tmp16u); break;
+                case 4: ED->word[0] = and16(emu, ED->word[0], tmp16u); break;
+                case 5: ED->word[0] = sub16(emu, ED->word[0], tmp16u); break;
+                case 6: ED->word[0] = xor16(emu, ED->word[0], tmp16u); break;
+                case 7:               cmp16(emu, ED->word[0], tmp16u); break;
             }
             pthread_mutex_unlock(&emu->context->mutex_lock);
 #endif
@@ -260,74 +226,34 @@ uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr)
             switch((nextop>>3)&7) {
                 case 0:                 /* INC Ed */
 #if defined(DYNAREC) && !defined(TEST_INTERPRETER)
-                    if(rex.w)
-                        if(((uintptr_t)ED)&7) {
-                            // unaligned
-                            do {
-                                tmp64u = ED->q[0] & 0xffffffffffffff00LL;
-                                tmp64u |= native_lock_read_b(ED);
-                                tmp64u = inc64(emu, tmp64u);
-                            } while(native_lock_write_b(ED, tmp64u&0xff));
-                            ED->q[0] = tmp64u;
-                        }
-                        else
-                            do {
-                                tmp64u = native_lock_read_dd(ED);
-                            } while(native_lock_write_dd(ED, inc64(emu, tmp64u)));
-                    else {
-                        if((uintptr_t)ED&1) { 
-                            //meh.
-                            do {
-                                tmp16u = ED->word[0];
-                                tmp16u &=~0xff;
-                                tmp16u |= native_lock_read_b(ED);
-                                tmp16u = inc16(emu, tmp16u);
-                            } while(native_lock_write_b(ED, tmp16u&0xff));
-                            ED->word[0] = tmp16u;
-                        } else {
-                            do {
-                                tmp16u = native_lock_read_h(ED);
-                            } while(native_lock_write_h(ED, inc16(emu, tmp16u)));
-                        }
+                    if((uintptr_t)ED&1) { 
+                        //meh.
+                        do {
+                            tmp16u = ED->word[0];
+                            tmp16u &=~0xff;
+                            tmp16u |= native_lock_read_b(ED);
+                            tmp16u = inc16(emu, tmp16u);
+                        } while(native_lock_write_b(ED, tmp16u&0xff));
+                        ED->word[0] = tmp16u;
+                    } else {
+                        do {
+                            tmp16u = native_lock_read_h(ED);
+                        } while(native_lock_write_h(ED, inc16(emu, tmp16u)));
                     }
 #else
                     pthread_mutex_lock(&emu->context->mutex_lock);
-                    if(rex.w) {
-                        ED->q[0] = inc64(emu, ED->q[0]);
-                    } else {
-                        ED->word[0] = inc16(emu, ED->word[0]);
-                    }
+                    ED->word[0] = inc16(emu, ED->word[0]);
                     pthread_mutex_unlock(&emu->context->mutex_lock);
 #endif
                     break;
                 case 1:                 /* DEC Ed */
 #if defined(DYNAREC) && !defined(TEST_INTERPRETER)
-                    if(rex.w)
-                        if(((uintptr_t)ED)&7) {
-                            // unaligned
-                            do {
-                                tmp64u = ED->q[0] & 0xffffffffffffff00LL;
-                                tmp64u |= native_lock_read_b(ED);
-                                tmp64u = dec64(emu, tmp64u);
-                            } while(native_lock_write_b(ED, tmp64u&0xff));
-                            ED->q[0] = tmp64u;
-                        }
-                        else
-                            do {
-                                tmp64u = native_lock_read_dd(ED);
-                            } while(native_lock_write_dd(ED, dec64(emu, tmp64u)));
-                    else {
-                        do {
-                            tmp16u = native_lock_read_h(ED);
-                        } while(native_lock_write_h(ED, dec16(emu, tmp16u)));
-                    }
+                    do {
+                        tmp16u = native_lock_read_h(ED);
+                    } while(native_lock_write_h(ED, dec16(emu, tmp16u)));
 #else
                     pthread_mutex_lock(&emu->context->mutex_lock);
-                    if(rex.w) {
-                        ED->q[0] = dec64(emu, ED->q[0]);
-                    } else {
-                        ED->word[0] = dec16(emu, ED->word[0]);
-                    }
+                    ED->word[0] = dec16(emu, ED->word[0]);
                     pthread_mutex_unlock(&emu->context->mutex_lock);
 #endif
                     break;
diff --git a/src/emu/x64run67.c b/src/emu/x64run67.c
index 8b058f6b..8b68d4c5 100644
--- a/src/emu/x64run67.c
+++ b/src/emu/x64run67.c
@@ -41,6 +41,9 @@ uintptr_t Run67(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
     #endif

     opcode = F8;

 

+    if(rex.is32bits)

+        return Run67_32(emu, rex, rep, addr);

+

     while(opcode==0x67)

         opcode = F8;

 

@@ -151,6 +154,19 @@ uintptr_t Run67(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
             cmp32(emu, R_EAX, F32);

         break;

 

+    case 0x63:                      /* MOVSXD Gd,Ed */

+        nextop = F8;

+        GETED32(0);

+        GETGD;

+        if(rex.w)

+            GD->sq[0] = ED->sdword[0];

+        else

+            if(MODREG)

+                GD->q[0] = ED->dword[0];    // not really a sign extension

+            else

+                GD->sdword[0] = ED->sdword[0];  // meh?

+        break;

+

     case 0x66:

         #ifdef TEST_INTERPRETER

         return Test6766(test, rex, rep, addr);

@@ -259,7 +275,7 @@ uintptr_t Run67(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
 

     case 0x8D:                      /* LEA Gd,M */

         nextop = F8;

-        GETED32(0);

+        _GETED32(0);

         GETGD;

         if(rex.w)

             GD->q[0] = (uint64_t)ED;

@@ -348,7 +364,7 @@ uintptr_t Run67(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
 

     case 0xE8:                      /* CALL Id */

         tmp32s = F32S; // call is relative

-        Push(emu, addr);

+        Push64(emu, addr);

         addr += tmp32s;

         break;

 

diff --git a/src/emu/x64run670f.c b/src/emu/x64run670f.c
index 589e5181..015b3712 100644
--- a/src/emu/x64run670f.c
+++ b/src/emu/x64run670f.c
@@ -51,6 +51,19 @@ uintptr_t Run670F(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
 
     switch(opcode) {
 
+        case 0x11:
+            switch(rep) {
+                case 0:                      /* MOVUPS Ex,Gx */
+                    nextop = F8;
+                    GETEX32(0);
+                    GETGX;
+                    EX->u128 = GX->u128;
+                    break;
+                default:
+                    return 0;
+            }
+            break;
+
         case 0x2E:
             // same for now
         case 0x2F:                      
@@ -84,6 +97,12 @@ uintptr_t Run670F(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
                     GETGM;
                     GM->q = EM->q;
                     break;
+                case 2:  /* MOVDQU Gx, Ex */
+                    nextop = F8;
+                    GETEX32(0);
+                    GETGX;
+                    memcpy(GX, EX, 16);    // unaligned...
+                    break;
                 default:
                     return 0;
             }
@@ -102,6 +121,13 @@ uintptr_t Run670F(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
             }
             break;
 
+        case 0xB6:                      /* MOVZX Gd,Eb */
+            nextop = F8;
+            GETEB32(0);
+            GETGD;
+            GD->q[0] = EB->byte[0];
+            break;
+
         case 0xB9:
             switch(rep) {
                 case 0: /* UD1 Ed */
@@ -116,6 +142,13 @@ uintptr_t Run670F(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
             }
             break;
 
+        case 0xB7:                      /* MOVZX Gd,Ew */
+            nextop = F8;
+            GETEW32(0);
+            GETGD;
+            GD->q[0] = EW->word[0];
+            break;
+
     default:
         return 0;
     }
diff --git a/src/emu/x64run6764_32.c b/src/emu/x64run6764_32.c
new file mode 100644
index 00000000..6f6b0600
--- /dev/null
+++ b/src/emu/x64run6764_32.c
@@ -0,0 +1,67 @@
+#define _GNU_SOURCE
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "debug.h"
+#include "box64stack.h"
+#include "x64emu.h"
+#include "x64run.h"
+#include "x64emu_private.h"
+#include "x64run_private.h"
+#include "x64primop.h"
+#include "x64trace.h"
+#include "x87emu_private.h"
+#include "box64context.h"
+#include "bridge.h"
+
+#include "modrm.h"
+
+#ifdef TEST_INTERPRETER
+uintptr_t Test6764_32(x64test_t *test, rex_t rex, int rep, int seg, uintptr_t addr)
+#else
+uintptr_t Run6764_32(x64emu_t *emu, rex_t rex, int rep, int seg, uintptr_t addr)
+#endif
+{
+    uint8_t opcode;
+    uint8_t nextop;
+    int8_t tmp8s;
+    uint8_t tmp8u;
+    uint32_t tmp32u;
+    int32_t tmp32s;
+    uint64_t tmp64u;
+    reg64_t *oped, *opgd;
+    #ifdef TEST_INTERPRETER
+    x64emu_t* emu = test->emu;
+    #endif
+    uintptr_t tlsdata = GetSegmentBaseEmu(emu, seg);
+    opcode = F8;
+
+    while(opcode==0x67)
+        opcode = F8;
+
+    rex.rex = 0;
+    while((opcode==0xF2) || (opcode==0xF3)) {
+        rep = opcode-0xF1;
+        opcode = F8;
+    }
+
+    switch(opcode) {
+
+        case 0x8B:                      /* MOV Gw, FS:Ew */
+            nextop = F8;
+            GETEW_OFFS_16(tlsdata);
+            GETGW;
+            GW->word[0] = EW->word[0];
+            break;
+
+    default:
+        return 0;
+    }
+    return addr;
+}
\ No newline at end of file
diff --git a/src/emu/x64run6766.c b/src/emu/x64run6766.c
index ad44f8c4..35219b2c 100644
--- a/src/emu/x64run6766.c
+++ b/src/emu/x64run6766.c
@@ -57,10 +57,11 @@ uintptr_t Run6766(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
     }
     // REX prefix before the 66 are ignored
     rex.rex = 0;
-    while(opcode>=0x40 && opcode<=0x4f) {
-        rex.rex = opcode;
-        opcode = F8;
-    }
+    if(!rex.is32bits)
+        while(opcode>=0x40 && opcode<=0x4f) {
+            rex.rex = opcode;
+            opcode = F8;
+        }
 
     switch(opcode) {
 
@@ -71,6 +72,16 @@ uintptr_t Run6766(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)
         return Run67660F(emu, rex, addr);
         #endif
 
+    case 0x89:                              /* MOV Ew,Gw */
+        nextop = F8;
+        GETEW32(0);
+        GETGW;
+        if(rex.w)
+            EW->q[0] = GW->q[0];
+        else
+            EW->word[0] = GW->word[0];
+        break;
+
     default:
         return 0;
     }
diff --git a/src/emu/x64run67_32.c b/src/emu/x64run67_32.c
new file mode 100644
index 00000000..a1df3ba0
--- /dev/null
+++ b/src/emu/x64run67_32.c
@@ -0,0 +1,100 @@
+#define _GNU_SOURCE

+#include <stdint.h>

+#include <stdio.h>

+#include <stdlib.h>

+#include <math.h>

+#include <string.h>

+#include <signal.h>

+#include <sys/types.h>

+#include <unistd.h>

+

+#include "debug.h"

+#include "box64stack.h"

+#include "x64emu.h"

+#include "x64run.h"

+#include "x64emu_private.h"

+#include "x64run_private.h"

+#include "x64primop.h"

+#include "x64trace.h"

+#include "x87emu_private.h"

+#include "box64context.h"

+#include "bridge.h"

+

+#include "modrm.h"

+

+#ifdef TEST_INTERPRETER

+uintptr_t Test67_32(x64test_t *test, rex_t rex, int rep, uintptr_t addr)

+#else

+uintptr_t Run67_32(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr)

+#endif

+{

+    uint8_t opcode;

+    uint8_t nextop;

+    int8_t tmp8s;

+    uint8_t tmp8u;

+    uint32_t tmp32u;

+    int32_t tmp32s;

+    uint64_t tmp64u;

+    reg64_t *oped, *opgd;

+    #ifdef TEST_INTERPRETER

+    x64emu_t* emu = test->emu;

+    #endif

+    opcode = F8;

+

+    while(opcode==0x67)

+        opcode = F8;

+

+    rex.rex = 0;

+    while((opcode==0xF2) || (opcode==0xF3)) {

+        rep = opcode-0xF1;

+        opcode = F8;

+    }

+

+    switch(opcode) {

+

+    case 0x64:                      /* FS: prefix */

+        #ifdef TEST_INTERPRETER

+        return Test6764_32(test, rex, rep, _FS, addr);

+        #else

+        return Run6764_32(emu, rex, rep, _FS, addr);

+        #endif

+        break;

+    case 0x65:                      /* GS: prefix */

+        #ifdef TEST_INTERPRETER

+        return Test6764_32(test, rex, rep, _GS, addr);

+        #else

+        return Run6764_32(emu, rex, rep, _GS, addr);

+        #endif

+        break;

+

+    case 0xE0:                      /* LOOPNZ */

+        CHECK_FLAGS(emu);

+        tmp8s = F8S;

+        --R_CX; // don't update flags

+        if(R_CX && !ACCESS_FLAG(F_ZF))

+            addr += tmp8s;

+        break;

+    case 0xE1:                      /* LOOPZ */

+        CHECK_FLAGS(emu);

+        tmp8s = F8S;

+        --R_CX; // don't update flags

+        if(R_CX && ACCESS_FLAG(F_ZF))

+            addr += tmp8s;

+        break;

+    case 0xE2:                      /* LOOP */

+        tmp8s = F8S;

+        --R_CX; // don't update flags

+        if(R_CX)

+            addr += tmp8s;

+        break;

+    case 0xE3:              /* JECXZ Ib */

+        tmp8s = F8S;

+        if(!R_CX)

+            addr += tmp8s;

+        break;

+

+    default:

+        return 0;

+    }

+    return addr;

+}
\ No newline at end of file
diff --git a/src/emu/x64run_private.c b/src/emu/x64run_private.c
index 9f8457c2..b17b3e7f 100644
--- a/src/emu/x64run_private.c
+++ b/src/emu/x64run_private.c
@@ -33,6 +33,8 @@ int32_t EXPORT my___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, c
     (void)argc; (void)ubp_av; (void)fini; (void)rtld_fini; (void)stack_end;
 
     if(init) {
+        uintptr_t old_rsp = GetRSP(emu);
+        uintptr_t old_rbp = GetRBP(emu); // should not be needed, but seems to be without dynarec
         Push64(emu, GetRBP(emu));   // set frame pointer
         SetRBP(emu, GetRSP(emu));   // save RSP
         SetRSP(emu, GetRSP(emu)&~0xFLL);    // Align RSP
@@ -47,6 +49,8 @@ int32_t EXPORT my___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, c
             return 0;
         SetRSP(emu, GetRBP(emu));   // restore RSP
         SetRBP(emu, Pop64(emu));    // restore RBP
+        SetRSP(emu, old_rsp);
+        SetRBP(emu, old_rbp);
         emu->quit = 0;
     } else {
         RunElfInit(my_context->elfs[0], emu);
@@ -1006,7 +1010,7 @@ const char* getAddrFunctionName(uintptr_t addr)
     return ret;
 }
 
-void printFunctionAddr(uintptr_t nextaddr, const char* text)
+int printFunctionAddr(uintptr_t nextaddr, const char* text)
 {
     uint64_t sz = 0;
     uintptr_t start = 0;
@@ -1017,7 +1021,9 @@ void printFunctionAddr(uintptr_t nextaddr, const char* text)
             printf_log(LOG_NONE, " (%s%s:%s)", text, ElfName(FindElfAddress(my_context, nextaddr)), symbname);
         else
             printf_log(LOG_NONE, " (%s%s:%s + %ld)", text, ElfName(FindElfAddress(my_context, nextaddr)), symbname, nextaddr - start);
+        return 1;
     }
+    return 0;
 }
 
 #ifdef HAVE_TRACE
@@ -1028,6 +1034,7 @@ extern uint64_t start_cnt;
 
 void PrintTrace(x64emu_t* emu, uintptr_t ip, int dynarec)
 {
+    int is32bits = (emu->segs[_CS]==0x23);
     if(start_cnt) --start_cnt;
     if(!start_cnt && my_context->dec && (
             (trace_end == 0) 
@@ -1047,7 +1054,7 @@ void PrintTrace(x64emu_t* emu, uintptr_t ip, int dynarec)
             my_context->trace_tid = tid;
         }
 #endif
-        printf_log(LOG_NONE, "%s", DumpCPURegs(emu, ip));
+        printf_log(LOG_NONE, "%s", DumpCPURegs(emu, ip, is32bits));
         if(R_RIP==0) {
             printf_log(LOG_NONE, "Running at NULL address\n");
             mutex_unlock(&my_context->mutex_trace);
@@ -1061,30 +1068,38 @@ void PrintTrace(x64emu_t* emu, uintptr_t ip, int dynarec)
                 printf_log(LOG_NONE, "%p: Native call to %p => %s\n", (void*)ip, (void*)a, GetNativeName(*(void**)(ip+11)));
             }
         } else {
-            printf_log(LOG_NONE, "%s", DecodeX64Trace(my_context->dec, ip));
+            printf_log(LOG_NONE, "%s", DecodeX64Trace(is32bits?my_context->dec32:my_context->dec, ip));
             uint8_t peek = PK(0);
             rex_t rex = {0};
-            if(peek>=0x40 && peek<=0x4f) {
+            if(!is32bits && peek>=0x40 && peek<=0x4f) {
                 rex.rex = peek;
                 ip++;
                 peek = PK(0);
             }
             if(peek==0xC3 || peek==0xC2 || (peek==0xF3 && PK(1)==0xC3)) {
-                printf_log(LOG_NONE, " => %p", *(void**)(R_RSP));
-                printFunctionAddr(*(uintptr_t*)(R_RSP), "=> ");
+                if(is32bits) {
+                    printf_log(LOG_NONE, " => %p", (void*)(uintptr_t)*(uint32_t*)(R_RSP));
+                    printFunctionAddr(*(uint32_t*)(R_RSP), "=> ");
+                } else {
+                    printf_log(LOG_NONE, " => %p", *(void**)(R_RSP));
+                    printFunctionAddr(*(uintptr_t*)(R_RSP), "=> ");
+                }
             } else if(peek==0x57 && rex.b) {
                 printf_log(LOG_NONE, " => STACK_TOP: %p", *(void**)(R_RSP));
                 printFunctionAddr(ip, "here: ");
-            } else if(peek==0x55 || peek==0x53) {
+            } else if((peek==0x55 || peek==0x53) && !is32bits) {
                 printFunctionAddr(*(uintptr_t*)(R_RSP), " STACK_TOP: ");
-            } else if(peek==0xF3 && PK(1)==0x0F && PK(2)==0x1E && PK(3)==0xFA) {
+            } else if((peek==0x55 || peek==0x56) && is32bits) {
+                if(!printFunctionAddr(*(uint32_t*)(R_RSP), " STACK_TOP: "))
+                    printf_log(LOG_NONE, " STACK_TOP: %p ", (void*)(uintptr_t)*(uint32_t*)(R_RSP));
+            } else if(peek==0xF3 && PK(1)==0x0F && PK(2)==0x1E && PK(3)==0xFA && !is32bits) {
                 printFunctionAddr(*(uintptr_t*)(R_RSP), " STACK_TOP: ");
             } else if(peek==0xE8) { // Call
-                uintptr_t nextaddr = ip + 5 + PK64(1);
+                uintptr_t nextaddr = ip + 5 + PK32(1);
                 printFunctionAddr(nextaddr, "=> ");
             } else if(peek==0xFF) {
                 if(PK(1)==0x25) {
-                    uintptr_t nextaddr = ip + 6 + PK64(2);
+                    uintptr_t nextaddr = ip + 6 + PK32(2);
                     printFunctionAddr(nextaddr, "=> ");
                 }
             }
@@ -1132,8 +1147,56 @@ static uint64_t F64(uintptr_t* addr) {
     return ret;
 }
 
+reg64_t* GetECommon_32(x64emu_t* emu, uintptr_t* addr, uint8_t m, uint32_t base)
+{
+    if (m<=7) {
+        if(m==0x4) {
+            uint8_t sib = F8(addr);
+            base += ((sib&0x7)==5)?((uint32_t)F32S(addr)):(emu->regs[(sib&0x7)].dword[0]); // base
+            base += (emu->sbiidx[((sib>>3)&7)]->sdword[0] << (sib>>6));
+            return (reg64_t*)(uintptr_t)base;
+        } else if (m==0x5) { //disp32
+            base += F32S(addr);
+            return (reg64_t*)(uintptr_t)base;
+        }
+        return (reg64_t*)(uintptr_t)(base + emu->regs[m].dword[0]);
+    } else {
+        if((m&7)==4) {
+            uint8_t sib = F8(addr);
+            base += emu->regs[(sib&0x7)].dword[0]; // base
+            base += (emu->sbiidx[((sib>>3)&7)]->sdword[0] << (sib>>6));
+        } else {
+            base += emu->regs[(m&0x7)].dword[0];
+        }
+        base+=(m&0x80)?F32S(addr):F8S(addr);
+        return (reg64_t*)(uintptr_t)base;
+    }
+}
+reg64_t* GetEw16_32(x64emu_t *emu, uintptr_t* addr, uint8_t m, uint32_t base)
+{
+    switch(m&7) {
+        case 0: base+= R_BX+R_SI; break;
+        case 1: base+= R_BX+R_DI; break;
+        case 2: base+= R_BP+R_SI; break;
+        case 3: base+= R_BP+R_DI; break;
+        case 4: base+=      R_SI; break;
+        case 5: base+=      R_DI; break;
+        case 6: base+=      R_BP; break;
+        case 7: base+=      R_BX; break;
+    }
+    switch((m>>6)&3) {
+        case 0: if((m&7)==6) base= F16S(addr); break;
+        case 1: base += F8S(addr); break;
+        case 2: base += F16S(addr); break;
+        // case 3 is C0..C7, already dealt with
+    }
+    return (reg64_t*)(uintptr_t)base;
+}
+
 reg64_t* GetECommon(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_t delta)
 {
+    if(rex.is32bits)
+        return GetECommon_32(emu, addr, m, 0);
     if (m<=7) {
         if(m==0x4) {
             uint8_t sib = F8(addr);
@@ -1161,6 +1224,8 @@ reg64_t* GetECommon(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_
 
 reg64_t* GetECommonO(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_t delta, uintptr_t base)
 {
+    if(rex.is32bits)
+        return GetECommon_32(emu, addr, m, base);
     if (m<=7) {
         if(m==0x4) {
             uint8_t sib = F8(addr);
@@ -1187,6 +1252,8 @@ reg64_t* GetECommonO(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8
 
 reg64_t* GetECommon32O(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_t delta, uintptr_t base)
 {
+    if(rex.is32bits)
+        return GetEw16_32(emu, addr, m, base);
     if (m<=7) {
         if(m==0x4) {
             uint8_t sib = F8(addr);
@@ -1471,7 +1538,7 @@ reg64_t* GetEw16(x64emu_t *emu, uintptr_t* addr, rex_t rex, uint8_t v)
             case 7: base =      R_BX; break;
         }
         switch((m>>6)&3) {
-            case 0: if(m==6) base = F16(addr); break;
+            case 0: if((m&7)==6) base = F16S(addr); break;
             case 1: base += F8S(addr); break;
             case 2: base += F16S(addr); break;
             // case 3 is C0..C7, already dealt with
@@ -1501,7 +1568,7 @@ reg64_t* TestEw16(x64test_t *test, uintptr_t* addr, rex_t rex, uint8_t v)
             case 7: base =      R_BX; break;
         }
         switch((m>>6)&3) {
-            case 0: if(m==6) base = F16(addr); break;
+            case 0: if((m&7)==6) base = F16S(addr); break;
             case 1: base += F8S(addr); break;
             case 2: base += F16S(addr); break;
             // case 3 is C0..C7, already dealt with
@@ -1533,7 +1600,7 @@ reg64_t* GetEw16off(x64emu_t *emu, uintptr_t* addr, rex_t rex, uint8_t v, uintpt
             case 7: base =      R_BX; break;
         }
         switch((m>>6)&3) {
-            case 0: if(m==6) base = F16(addr); break;
+            case 0: if((m&7)==6) base = F16S(addr); break;
             case 1: base += F8S(addr); break;
             case 2: base += F16S(addr); break;
             // case 3 is C0..C7, already dealt with
@@ -1563,7 +1630,7 @@ reg64_t* TestEw16off(x64test_t *test, uintptr_t* addr, rex_t rex, uint8_t v, uin
             case 7: base =      R_BX; break;
         }
         switch((m>>6)&3) {
-            case 0: if(m==6) base = F16(addr); break;
+            case 0: if((m&7)==6) base = F16S(addr); break;
             case 1: base += F8S(addr); break;
             case 2: base += F16S(addr); break;
             // case 3 is C0..C7, already dealt with
diff --git a/src/emu/x64run_private.h b/src/emu/x64run_private.h
index 68db0670..dcda399f 100644
--- a/src/emu/x64run_private.h
+++ b/src/emu/x64run_private.h
@@ -4,39 +4,76 @@
 #include <stdint.h>
 #include "regs.h"
 #include "x64emu_private.h"
+#include "box64context.h"
 typedef struct x64emu_s x64emu_t;
 
-typedef union rex_s {
-    uint8_t rex;
-    struct {
-        unsigned int b:1;
-        unsigned int x:1;
-        unsigned int r:1;
-        unsigned int w:1;
-        unsigned int s:4;
+typedef struct rex_s {
+    union {
+        uint8_t rex;
+        struct {
+            unsigned int b:1;
+            unsigned int x:1;
+            unsigned int r:1;
+            unsigned int w:1;
+            unsigned int s:4;
+        };
     };
+    int     is32bits;
 } rex_t;
 
 static inline uint8_t Peek(x64emu_t *emu, int offset){return *(uint8_t*)(R_RIP + offset);}
 
-static inline uint64_t Pop(x64emu_t *emu)
-{
-    uint64_t* st = ((uint64_t*)(R_RSP));
-    R_RSP += 8;
-    return *st;
-}
-
 #ifdef TEST_INTERPRETER
-#define Push(E, V)  do{E->regs[_SP].q[0] -=8; test->memsize = 8; *(uint64_t*)test->mem = (V); test->memaddr = E->regs[_SP].q[0];}while(0)
 #define Push16(E, V)  do{E->regs[_SP].q[0] -=2; test->memsize = 2; *(uint16_t*)test->mem = (V); test->memaddr = E->regs[_SP].q[0];}while(0)
+#define Push32(E, V)  do{E->regs[_SP].q[0] -=4; test->memsize = 4; *(uint32_t*)test->mem = (V); test->memaddr = E->regs[_SP].q[0];}while(0)
+#define Push64(E, V)  do{E->regs[_SP].q[0] -=8; test->memsize = 8; *(uint64_t*)test->mem = (V); test->memaddr = E->regs[_SP].q[0];}while(0)
 #else
-static inline void Push(x64emu_t *emu, uint64_t v)
+static inline void Push16(x64emu_t *emu, uint16_t v)
+{
+    R_RSP -= 2;
+    *((uint16_t*)R_RSP) = v;
+}
+
+static inline void Push32(x64emu_t *emu, uint32_t v)
+{
+    R_RSP -= 4;
+    *((uint32_t*)R_RSP) = v;
+}
+
+static inline void Push64(x64emu_t *emu, uint64_t v)
 {
     R_RSP -= 8;
     *((uint64_t*)R_RSP) = v;
 }
 #endif
 
+static inline uint16_t Pop16(x64emu_t *emu)
+{
+    uint16_t* st = (uint16_t*)R_RSP;
+    R_RSP += 2;
+    return *st;
+}
+
+static inline uint32_t Pop32(x64emu_t *emu)
+{
+    uint32_t* st = (uint32_t*)R_RSP;
+    R_RSP += 4;
+    return *st;
+}
+
+static inline uint64_t Pop64(x64emu_t *emu)
+{
+    uint64_t* st = (uint64_t*)R_RSP;
+    R_RSP += 8;
+    return *st;
+}
+
+static inline void PushExit(x64emu_t* emu)
+{
+    R_RSP -= 8;
+    *((uint64_t*)R_RSP) = my_context->exit_bridge;
+}
+
 // the op code definition can be found here: http://ref.x86asm.net/geek32.html
 
 reg64_t* GetECommon(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_t delta);
@@ -97,6 +134,8 @@ uintptr_t Run66D9(x64emu_t *emu, rex_t rex, uintptr_t addr);
 uintptr_t Run66DD(x64emu_t *emu, rex_t rex, uintptr_t addr);
 uintptr_t Run66F0(x64emu_t *emu, rex_t rex, uintptr_t addr);
 uintptr_t Run67(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr);
+uintptr_t Run67_32(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr);
+uintptr_t Run6764_32(x64emu_t *emu, rex_t rex, int rep, int seg, uintptr_t addr);
 uintptr_t Run670F(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr);
 uintptr_t Run6766(x64emu_t *emu, rex_t rex, int rep, uintptr_t addr);
 uintptr_t Run67660F(x64emu_t *emu, rex_t rex, uintptr_t addr);
@@ -121,6 +160,8 @@ uintptr_t Test66D9(x64test_t *test, rex_t rex, uintptr_t addr);
 uintptr_t Test66DD(x64test_t *test, rex_t rex, uintptr_t addr);
 uintptr_t Test66F0(x64test_t *test, rex_t rex, uintptr_t addr);
 uintptr_t Test67(x64test_t *test, rex_t rex, int rep, uintptr_t addr);
+uintptr_t Test67_32(x64test_t *test, rex_t rex, int rep, uintptr_t addr);
+uintptr_t Test6764_32(x64test_t *test, rex_t rex, int rep, int seg, uintptr_t addr);
 uintptr_t Test670F(x64test_t *test, rex_t rex, int rep, uintptr_t addr);
 uintptr_t Test6766(x64test_t *test, rex_t rex, int rep, uintptr_t addr);
 uintptr_t Test67660F(x64test_t *test, rex_t rex, uintptr_t addr);
@@ -140,6 +181,7 @@ uintptr_t TestF30F(x64test_t *test, rex_t rex, uintptr_t addr);
 void x64Syscall(x64emu_t *emu);
 void x64Int3(x64emu_t* emu, uintptr_t* addr);
 x64emu_t* x64emu_fork(x64emu_t* e, int forktype);
+void x86Syscall(x64emu_t *emu); //32bits syscall
 
 uintptr_t GetSegmentBaseEmu(x64emu_t* emu, int seg);
 #define GetGSBaseEmu(emu)    GetSegmentBaseEmu(emu, _GS)
diff --git a/src/emu/x64rundb.c b/src/emu/x64rundb.c
index c406e367..ad5952bb 100644
--- a/src/emu/x64rundb.c
+++ b/src/emu/x64rundb.c
@@ -140,7 +140,7 @@ uintptr_t RunDB(x64emu_t *emu, rex_t rex, uintptr_t addr)
                 break;

             case 1: /* FISTTP Ed, ST0 */

                 GETE4(0);

-                if(isgreater(ST0.d, (double)(int32_t)0x7fffffff) || isless(ST0.d, (double)(int32_t)0x80000000) || !isfinite(ST0.d))

+                if(isgreater(ST0.d, (double)0x7fffffff) || isless(ST0.d, -(double)0x80000000U) || !isfinite(ST0.d))

                     ED->sdword[0] = 0x80000000;

                 else

                     ED->sdword[0] = ST0.d;

@@ -148,7 +148,7 @@ uintptr_t RunDB(x64emu_t *emu, rex_t rex, uintptr_t addr)
                 break;

             case 2: /* FIST Ed, ST0 */

                 GETE4(0);

-                if(isgreater(ST0.d, (double)(int32_t)0x7fffffff) || isless(ST0.d, (double)(int32_t)0x80000000) || !isfinite(ST0.d))

+                if(isgreater(ST0.d, (double)0x7fffffff) || isless(ST0.d, -(double)0x80000000U) || !isfinite(ST0.d))

                     ED->sdword[0] = 0x80000000;

                 else {

                     volatile int32_t tmp = fpu_round(emu, ST0.d);    // tmp to avoid BUS ERROR

@@ -157,7 +157,7 @@ uintptr_t RunDB(x64emu_t *emu, rex_t rex, uintptr_t addr)
                 break;

             case 3: /* FISTP Ed, ST0 */

                 GETE4(0);

-                if(isgreater(ST0.d, (double)(int32_t)0x7fffffff) || isless(ST0.d, (double)(int32_t)0x80000000) || !isfinite(ST0.d))

+                if(isgreater(ST0.d, (double)0x7fffffff) || isless(ST0.d, -(double)0x80000000U) || !isfinite(ST0.d))

                     ED->sdword[0] = 0x80000000;

                 else {

                     volatile int32_t tmp = fpu_round(emu, ST0.d);    // tmp to avoid BUS ERROR

diff --git a/src/emu/x64rundd.c b/src/emu/x64rundd.c
index f33450a7..fc65f01d 100644
--- a/src/emu/x64rundd.c
+++ b/src/emu/x64rundd.c
@@ -125,7 +125,14 @@ uintptr_t RunDD(x64emu_t *emu, rex_t rex, uintptr_t addr)
                 break;

             case 1: /* FISTTP ED qword */

                 GETE8(0);

-                *(int64_t*)ED = ST0.d;

+                if(STll(0).sref==ST(0).sq)

+                    ED->sq[0] = STll(0).sq;

+                else {

+                    if(isgreater(ST0.d, (double)0x7fffffffffffffffLL) || isless(ST0.d, -(double)0x8000000000000000LL) || !isfinite(ST0.d))

+                        *(uint64_t*)ED = 0x8000000000000000LL;

+                    else

+                        *(int64_t*)ED = ST0.d;

+                }

                 fpu_do_pop(emu);

                 break;

             case 2: /* FST double */

diff --git a/src/emu/x64rundf.c b/src/emu/x64rundf.c
index 528a6c3f..d707863c 100644
--- a/src/emu/x64rundf.c
+++ b/src/emu/x64rundf.c
@@ -175,7 +175,7 @@ uintptr_t RunDF(x64emu_t *emu, rex_t rex, uintptr_t addr)
             if(STll(0).sref==ST(0).sq)

                 ED->sq[0] = STll(0).sq;

             else {

-                if(isgreater(ST0.d, (double)(int64_t)0x7fffffffffffffffLL) || isless(ST0.d, (double)(int64_t)0x8000000000000000LL) || !isfinite(ST0.d))

+                if(isgreater(ST0.d, (double)0x7fffffffffffffffLL) || isless(ST0.d, -(double)0x8000000000000000LL) || !isfinite(ST0.d))

                     ED->sq[0] = 0x8000000000000000LL;

                 else

                     ED->sq[0] = fpu_round(emu, ST0.d);

diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c
index 6d58670a..5a75203e 100644
--- a/src/emu/x64runf0.c
+++ b/src/emu/x64runf0.c
@@ -50,10 +50,11 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr)
     opcode = F8;

     // REX prefix before the F0 are ignored

     rex.rex = 0;

-    while(opcode>=0x40 && opcode<=0x4f) {

-        rex.rex = opcode;

-        opcode = F8;

-    }

+    if(!rex.is32bits)

+        while(opcode>=0x40 && opcode<=0x4f) {

+            rex.rex = opcode;

+            opcode = F8;

+        }

 

     switch(opcode) {

 #if defined(DYNAREC) && !defined(TEST_INTERPRETER)

diff --git a/src/emu/x64syscall.c b/src/emu/x64syscall.c
index 4a82f9a1..4f9d6c88 100644
--- a/src/emu/x64syscall.c
+++ b/src/emu/x64syscall.c
@@ -77,7 +77,7 @@ typedef struct scwrap_s {
     int nbpars;
 } scwrap_t;
 
-scwrap_t syscallwrap[] = {
+static scwrap_t syscallwrap[] = {
     //{ 0, __NR_read, 3 },      // wrapped so SA_RESTART can be handled by libc
     //{ 1, __NR_write, 3 },     // same
     //{ 2, __NR_open, 3 },      // flags need transformation
@@ -198,6 +198,7 @@ scwrap_t syscallwrap[] = {
     { 208, __NR_io_getevents, 4},
     { 209, __NR_io_submit, 3},
     { 210, __NR_io_cancel, 3},
+    { 212, __NR_lookup_dcookie, 3},
     #ifdef __NR_epoll_create
     { 213, __NR_epoll_create, 1},
     #endif
@@ -215,6 +216,8 @@ scwrap_t syscallwrap[] = {
     { 233, __NR_epoll_ctl, 4},
     #endif
     { 234, __NR_tgkill, 3},
+    { 238, __NR_set_mempolicy, 3},
+    { 239, __NR_get_mempolicy, 5},
     { 247, __NR_waitid, 5},
     #ifdef __NR_inotify_init
     { 253, __NR_inotify_init, 0},   //0xFD
@@ -557,8 +560,8 @@ void EXPORT x64Syscall(x64emu_t *emu)
                         }
                     }
                     x64emu_t * newemu = NewX64Emu(emu->context, R_RIP, (uintptr_t)stack_base, stack_size, (R_RSI)?0:1);
-                    SetupX64Emu(newemu);
-                    CloneEmu(newemu, emu);
+                    SetupX64Emu(newemu, emu);
+                    //CloneEmu(newemu, emu);
                     Push64(newemu, 0);
                     PushExit(newemu);
                     void* mystack = NULL;
@@ -749,7 +752,7 @@ uintptr_t EXPORT my_syscall(x64emu_t *emu)
 {
     static uint32_t warned = 0;
     uint32_t s = R_EDI;
-    printf_dump(LOG_DEBUG, "%p: Calling libc syscall 0x%02X (%d) %p %p %p %p %p\n", (void*)R_RIP, s, s, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); 
+    printf_dump(LOG_DEBUG, "%04d| %p: Calling libc syscall 0x%02X (%d) %p %p %p %p %p\n", GetTID(), (void*)R_RIP, s, s, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); 
     // check wrapper first
     int cnt = sizeof(syscallwrap) / sizeof(scwrap_t);
     for (int i=0; i<cnt; i++) {
@@ -858,8 +861,8 @@ uintptr_t EXPORT my_syscall(x64emu_t *emu)
                     }
                 }
                 x64emu_t * newemu = NewX64Emu(emu->context, R_RIP, (uintptr_t)stack_base, stack_size, (R_RDX)?0:1);
-                SetupX64Emu(newemu);
-                CloneEmu(newemu, emu);
+                SetupX64Emu(newemu, emu);
+                //CloneEmu(newemu, emu);
                 Push64(newemu, 0);
                 PushExit(newemu);
                 void* mystack = NULL;
diff --git a/src/emu/x64test.c b/src/emu/x64test.c
index 525b96c9..8e0327a7 100644
--- a/src/emu/x64test.c
+++ b/src/emu/x64test.c
@@ -25,8 +25,8 @@
 void print_banner(x64emu_t* ref)
 {
     printf_log(LOG_NONE, "Warning, difference between Interpreter and Dynarec in %p (%02x %02x %02x %02x %02x %02x %02x %02x)\n"\
-        "=======================================\n", 
-        (void*)ref->old_ip, 
+        "=======================================\n",
+        (void*)ref->old_ip,
         ((uint8_t*)ref->old_ip)[0], ((uint8_t*)ref->old_ip)[1], ((uint8_t*)ref->old_ip)[2], ((uint8_t*)ref->old_ip)[3],
         ((uint8_t*)ref->old_ip)[4], ((uint8_t*)ref->old_ip)[5], ((uint8_t*)ref->old_ip)[6], ((uint8_t*)ref->old_ip)[7]
     );
@@ -55,7 +55,7 @@ void x64test_check(x64emu_t* ref, uintptr_t ip)
     // flags are volatile, so don't test them
 	//memcpy(&ref->eflags, &emu->eflags, sizeof(emu->eflags));
     if(memcmp(ref->segs, emu->segs, sizeof(emu->segs))) {
-        static const char* segname[] = {"CS", "DS", "ES", "SS", "FS", "GS"};
+        static const char* segname[] = {"ES", "CS", "SS", "DS", "FS", "GS"};
         BANNER;
         for(int i=0; i<6; ++i) {
             if(ref->segs[i]!=emu->segs[i]) {
@@ -147,7 +147,7 @@ void x64test_init(x64emu_t* ref, uintptr_t ip)
         uintptr_t prev_ip = test->emu->ip.q[0];
         if(test->clean)
             x64test_check(ref, ip);
-        if(ip != prev_ip || !test->test) {
+        if(ip != prev_ip || !test->test || !test->clean) {
             CopyEmu(test->emu, ref);
         }
     }
diff --git a/src/emu/x64tls.c b/src/emu/x64tls.c
index a68ba30b..12a6836d 100644
--- a/src/emu/x64tls.c
+++ b/src/emu/x64tls.c
@@ -15,7 +15,7 @@
 typedef struct thread_area_s
 {
              int  entry_number;
-        uintptr_t base_addr;
+        uint64_t  base_addr;
     unsigned int  limit;
     unsigned int  seg_32bit:1;
     unsigned int  contents:2;
@@ -23,29 +23,26 @@ typedef struct thread_area_s
     unsigned int  limit_in_pages:1;
     unsigned int  seg_not_present:1;
     unsigned int  useable:1;
+    unsigned int  lm:1;
 } thread_area_t;
+typedef struct thread_area_32_s
+{
+             int  entry_number;
+        uint32_t  base_addr;
+    unsigned int  limit;
+    unsigned int  seg_32bit:1;
+    unsigned int  contents:2;
+    unsigned int  read_exec_only:1;
+    unsigned int  limit_in_pages:1;
+    unsigned int  seg_not_present:1;
+    unsigned int  useable:1;
+} thread_area_32_t;
 
-static pthread_once_t thread_key_once0 = PTHREAD_ONCE_INIT;
-static pthread_once_t thread_key_once1 = PTHREAD_ONCE_INIT;
-static pthread_once_t thread_key_once2 = PTHREAD_ONCE_INIT;
-static pthread_once_t thread_key_once3 = PTHREAD_ONCE_INIT;
-
-static void thread_key_alloc0() {
-	pthread_key_create(&my_context->segtls[0].key, NULL);
-}
-static void thread_key_alloc1() {
-	pthread_key_create(&my_context->segtls[1].key, NULL);
-}
-static void thread_key_alloc2() {
-	pthread_key_create(&my_context->segtls[2].key, NULL);
-}
-static void thread_key_alloc3() {
-	pthread_key_create(&my_context->segtls[3].key, NULL);
-}
+int GetTID();
 
-uint32_t my_set_thread_area(thread_area_t* td)
+uint32_t my_set_thread_area_32(x64emu_t* emu, thread_area_32_t* td)
 {
-    printf_log(LOG_DEBUG, "set_thread_area(%p[%d/base=%p/limit=%u/32bits:%u/%u/%u...])\n", td, td->entry_number, (void*)td->base_addr, td->limit_in_pages, td->seg_32bit, td->contents, td->read_exec_only);
+    printf_log(LOG_DEBUG, "%04d| set_thread_area_32(%p[%d/base=%p/limit=%u/32bits:%u/%u/%u...])\n", GetTID(), td, td->entry_number, (void*)(uintptr_t)td->base_addr, td->limit_in_pages, td->seg_32bit, td->contents, td->read_exec_only);
 
     int isempty = 0;
     // first, check if the "user_desc", here td, is "empty"
@@ -60,48 +57,47 @@ uint32_t my_set_thread_area(thread_area_t* td)
     int idx = td->entry_number;
     if(idx==-1) {
         // find a free one
-        for (int i=0; i<3 && idx==-1; ++i)
+        for (int i=9; i<15 && idx==-1; ++i)
             if(!my_context->segtls[i].present)
                 idx=i;
         if(idx==-1) {
             errno = ESRCH;
             return (uint32_t)-1;
         }
-        idx+=7;
         td->entry_number = idx;
     }
-    if(isempty && (td->entry_number<7 || td->entry_number>7+2)) {
+    if(isempty && (td->entry_number<9 || td->entry_number>15)) {
         errno = EINVAL;
         return (uint32_t)-1;
     }
     if(isempty) {
-        memset(&my_context->segtls[td->entry_number-7], 0, sizeof(base_segment_t));
+        memset(&my_context->segtls[td->entry_number], 0, sizeof(base_segment_t));
         return 0;
     }
-    if((idx<7 || idx>7+2)) {
+    if((idx<9 || idx>15)) {
         errno = EINVAL;
         return (uint32_t)-1;
     }
 
-    my_context->segtls[idx-7].base = td->base_addr;
-    my_context->segtls[idx-7].limit = td->limit;
-    my_context->segtls[idx-7].present = 1;
-    switch (idx-7) {
-        case 0:	pthread_once(&thread_key_once0, thread_key_alloc0); break;
-        case 1:	pthread_once(&thread_key_once1, thread_key_alloc1); break;
-        case 2:	pthread_once(&thread_key_once2, thread_key_alloc2); break;
+    my_context->segtls[idx].base = td->base_addr;
+    my_context->segtls[idx].limit = td->limit;
+    my_context->segtls[idx].present = 1;
+    my_context->segtls[idx].is32bits = 1;
+    if(!my_context->segtls[idx].key_init) {
+        pthread_key_create(&my_context->segtls[idx].key, NULL);
+        my_context->segtls[idx].key_init = 1;
     }
 
-    pthread_setspecific(my_context->segtls[idx-7].key, (void*)my_context->segtls[idx-7].base);
+    pthread_setspecific(my_context->segtls[idx].key, (void*)my_context->segtls[idx].base);
 
-    ResetSegmentsCache(thread_get_emu());
+    ResetSegmentsCache(emu);
 
     return 0;
 }
 
 uint32_t my_modify_ldt(x64emu_t* emu, int op, thread_area_t* td, int size)
 {
-    printf_log(/*LOG_DEBUG*/LOG_INFO, "modify_ldt(0x%x, %p[0x%x/base=%p/limit=%u/32bits:%u/%u/%u...], %d)\n", op, td, td->entry_number, (void*)td->base_addr, td->limit_in_pages, td->seg_32bit, td->contents, td->read_exec_only, size);
+    printf_log(LOG_DEBUG, "%04d| modify_ldt(0x%x, %p[0x%x/base=%p/limit=%u/32bits:%u/%u/%u...], %d)\n", GetTID(), op, td, td->entry_number, (void*)td->base_addr, td->limit_in_pages, td->seg_32bit, td->contents, td->read_exec_only, size);
     if(!td) {
         errno = EFAULT;
         return (uint32_t)-1;
@@ -116,8 +112,8 @@ uint32_t my_modify_ldt(x64emu_t* emu, int op, thread_area_t* td, int size)
         return (uint32_t)-1;
     }
 
-    int idx = td->entry_number - 7;
-    if(idx<0 || idx>2) {
+    int idx = td->entry_number;
+    if(idx<9 || idx>15) {
         errno = EINVAL;
         return (uint32_t)-1;
     }
@@ -133,33 +129,66 @@ uint32_t my_modify_ldt(x64emu_t* emu, int op, thread_area_t* td, int size)
     return 0;
 }
 
+static void* GetSeg43Base();
 int my_arch_prctl(x64emu_t *emu, int code, void* addr)
 {
+    printf_log(LOG_DEBUG, "%04d| arch_prctl(0x%x, %p) (RSP=%p, FS=0x%x, GS=0x%x)\n", GetTID(), code, addr,(void*)R_RSP, emu->segs[_FS], emu->segs[_GS]);
+
     #define ARCH_SET_GS          0x1001
     #define ARCH_SET_FS          0x1002
     #define ARCH_GET_FS          0x1003
     #define ARCH_GET_GS          0x1004
+    int seg = 0;
+    int idx = 0;
     switch(code) {
         case ARCH_GET_GS:
             *(void**)addr = GetSegmentBase(emu->segs[_GS]);
             return 0;
-        case ARCH_SET_GS:
-            pthread_once(&thread_key_once3, thread_key_alloc3);
-            if(emu->segs[_GS]!=(0xa<<3))
-                emu->segs[_GS] = 0xa<<3;    // should not move!
-            emu->segs_serial[_GS] = 0;
-            my_context->segtls[3].base = (uintptr_t)addr;
-            my_context->segtls[3].limit = 0;
-            my_context->segtls[3].present = 1;
-            pthread_setspecific(my_context->segtls[3].key, (void*)my_context->segtls[3].base);
-            ResetSegmentsCache(emu);
-            return 0;
         case ARCH_GET_FS:
             *(void**)addr = GetSegmentBase(emu->segs[_FS]);
             return 0;
+        case ARCH_SET_FS:
+        case ARCH_SET_GS:
+            seg=(code==ARCH_SET_FS)?_FS:_GS;
+            int idx = -1;
+            // search if it's a TLS base
+            // Is this search only occurs when seg==0?
+            for (int i=9; i<15 && idx==-1; ++i)
+                if(my_context->segtls[i].present && my_context->segtls[i].base==(uintptr_t)addr)
+                    idx=i;
+            if(idx==-1 && GetSeg43Base()==addr)
+                idx = 0x43>>3;
+            // found...
+            if(idx!=-1) {
+               printf_log(LOG_DEBUG, "Changing segment selector from 0x%x to 0x%x\n", emu->segs[seg], (idx<<3) +3);
+               emu->segs[seg]=(idx<<3) +3;
+            }
+            if(emu->segs[seg]==0) {
+                printf_log(LOG_DEBUG, "Warning, set seg, but it's 0!\n");
+                errno = EINVAL;
+                return -1;
+            }
+            idx = emu->segs[seg] >> 3;
+            if(idx<0 || idx>15) {
+                errno = EINVAL;
+                return -1;
+            }
+            emu->segs_serial[seg] = 0;
+            my_context->segtls[idx].base = (uintptr_t)addr;
+            my_context->segtls[idx].limit = 0;
+            my_context->segtls[idx].present = 1;
+            if(idx>8 && !my_context->segtls[idx].key_init) {
+                pthread_key_create(&my_context->segtls[idx].key, NULL);
+                my_context->segtls[idx].key_init = 1;
+            }
+            if(my_context->segtls[idx].key_init)
+                pthread_setspecific(my_context->segtls[idx].key, addr);
+            ResetSegmentsCache(emu);
+            return 0;
     }
     // other are unsupported
     printf_log(LOG_INFO, "warning, call to unsupported arch_prctl(0x%x, %p)\n", code, addr);
+    errno = ENOSYS;
     return -1;
 }
 
@@ -284,7 +313,7 @@ tlsdatasize_t* getTLSData(box64context_t *context)
     return ptr;
 }
 
-static void* GetSeg33Base()
+static void* GetSeg43Base()
 {
     tlsdatasize_t* ptr = getTLSData(my_context);
     return ptr->data;
@@ -297,16 +326,17 @@ void* GetSegmentBase(uint32_t desc)
         return NULL;
     }
     int base = desc>>3;
-    if(base==0xe || base==0xf)
-        return NULL;    // regular value...
-    if(base==0x6)
-        return GetSeg33Base();
-
-    if(base>6 && base<11 && my_context->segtls[base-7].present) {
-        void* ptr = pthread_getspecific(my_context->segtls[base-7].key);
+    if(base==0x8 && !my_context->segtls[base].key_init)
+        return GetSeg43Base();
+    if(base>15) {
+        printf_log(LOG_NONE, "Warning, accessing segment unknown 0x%x or unset\n", desc);
+        return NULL;
+    }
+    if(my_context->segtls[base].key_init) {
+        void* ptr = pthread_getspecific(my_context->segtls[base].key);
         return ptr;
     }
-
-    printf_log(LOG_NONE, "Warning, accessing segment unknown 0x%x or unset\n", desc);
-    return NULL;
+    
+    void* ptr = (void*)my_context->segtls[base].base;
+    return ptr;
 }
diff --git a/src/emu/x64trace.c b/src/emu/x64trace.c
index b5ddb5b7..ac655040 100644
--- a/src/emu/x64trace.c
+++ b/src/emu/x64trace.c
@@ -59,6 +59,7 @@ int InitX64Trace(box64context_t *context)
     #undef GO
 
     context->dec = InitX64TraceDecoder(context);
+    context->dec32 = InitX86TraceDecoder(context);
 
     return 0;
 }
@@ -73,6 +74,24 @@ void DeleteX64Trace(box64context_t *context)
     context->zydis = NULL;
 }
 
+zydis_dec_t* InitX86TraceDecoder(box64context_t *context)
+{
+    if(!context->zydis)
+        return NULL;
+    zydis_dec_t *dec = (zydis_dec_t*)box_calloc(1, sizeof(zydis_dec_t));
+    dec->ZydisDecoderDecodeBuffer = context->zydis->ZydisDecoderDecodeBuffer;
+    dec->ZydisFormatterFormatInstruction = context->zydis->ZydisFormatterFormatInstruction;
+    context->zydis->ZydisDecoderInit(&dec->decoder, ZYDIS_MACHINE_MODE_LEGACY_32, ZYDIS_ADDRESS_WIDTH_32);
+    context->zydis->ZydisFormatterInit(&dec->formatter, ZYDIS_FORMATTER_STYLE_INTEL);
+
+    return dec;
+}
+void DeleteX86TraceDecoder(zydis_dec_t **dec)
+{
+    box_free(*dec);
+    *dec = NULL;
+}
+
 zydis_dec_t* InitX64TraceDecoder(box64context_t *context)
 {
     if(!context->zydis)
diff --git a/src/emu/x86syscall.c b/src/emu/x86syscall.c
new file mode 100755
index 00000000..b41b0066
--- /dev/null
+++ b/src/emu/x86syscall.c
@@ -0,0 +1,284 @@
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/syscall.h>   /* For SYS_xxx definitions */
+#include <unistd.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <sys/select.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <asm/stat.h>
+#include <errno.h>
+#include <sched.h>
+#include <sys/wait.h>
+#include <sys/utsname.h>
+#ifndef __NR_socketcall
+#include <linux/net.h>
+#include <sys/socket.h>
+#endif
+#include <sys/resource.h>
+#include <poll.h>
+
+#include "debug.h"
+#include "box64stack.h"
+#include "x64emu.h"
+#include "x64run.h"
+#include "x64emu_private.h"
+#include "x64trace.h"
+#include "myalign.h"
+#include "box64context.h"
+#include "callback.h"
+#include "signals.h"
+#include "x64tls.h"
+
+
+// Syscall table for x86_64 can be found 
+typedef struct scwrap_s {
+    uint32_t x86s;
+    int nats;
+    int nbpars;
+} scwrap_t;
+
+static scwrap_t syscallwrap[] = {
+    //{ 2, __NR_fork, 1 },  
+    //{ 3, __NR_read, 3 },  // wrapped so SA_RESTART can be handled by libc
+    //{ 4, __NR_write, 3 }, // same
+    //{ 5, __NR_open, 3 },  // flags need transformation
+    //{ 6, __NR_close, 1 },   // wrapped so SA_RESTART can be handled by libc
+    //{ 7, __NR_waitpid, 3 },
+    //{ 10, __NR_unlink, 1 },
+    //{ 12, __NR_chdir, 1 },
+    //{ 13, __NR_time, 1 },
+    //{ 15, __NR_chmod, 2 },
+    //{ 19, __NR_lseek, 3 },
+    //{ 20, __NR_getpid, 0 },
+    //{ 24, __NR_getuid, 0 },
+    //{ 33, __NR_access, 2 },
+    //{ 37, __NR_kill, 2 },
+    //{ 38, __NR_rename, 2 },
+    //{ 39, __NR_mkdir, 2 },
+    //{ 40, __NR_rmdir, 1 },
+    //{ 41, __NR_dup, 1 },
+    //{ 42, __NR_pipe, 1 },
+    //{ 45, __NR_brk, 1 },
+    //{ 47, __NR_getgid, 0 },
+    //{ 49, __NR_geteuid, 0 },
+    //{ 50, __NR_getegid, 0 },
+    //{ 54, __NR_ioctl, 3 },    // should be wrapped to allow SA_RESTART handling by libc, but syscall is only 3 arguments, ioctl can be 5
+    //{ 55, __NR_fcntl, 3 },    // wrapped to allow filter of F_SETFD
+    //{ 60, __NR_umask, 1 },
+    //{ 63, __NR_dup2, 2 },
+    //{ 64, __NR_getppid, 0 },
+    //{ 66, __NR_setsid, 0 },
+    //{ 75, __NR_setrlimit, 2 },
+    //{ 76, __NR_getrlimit, 2 },
+    //{ 77, __NR_getrusage, 2 },
+    //{ 78, __NR_gettimeofday, 2 },
+    //{ 83, __NR_symlink, 2 },
+    //{ 82, __NR_select, 5 },
+    //{ 85, __NR_readlink, 3 },
+    //{ 91, __NR_munmap, 2 },
+    //{ 94, __NR_fchmod, 2 },
+    //{ 99, __NR_statfs, 2 },
+    //{ 102, __NR_socketcall, 2 },
+    //{ 104, __NR_setitimer, 3 },
+    //{ 105, __NR_getitimer, 2 },
+    //{ 106, __NR_newstat, 2 },
+    //{ 106, __NR_stat, 2 },
+    //{ 107, __NR_newlstat, 2 },
+    //{ 107, __NR_lstat, 2 },
+    //{ 108, __NR_newfstat, 2 },
+    //{ 108, __NR_fstat, 2 },
+    //{ 109, __NR_olduname, 1 },
+    //{ 110, __NR_iopl, 1 },
+    //{ 114, __NR_wait4, 4 }, //TODO: check struct rusage alignment
+    //{ 117, __NR_ipc, 6 },
+    //{ 119, __NR_sigreturn, 0},
+    //{ 120, __NR_clone, 5 },    // need works
+    //{ 122, __NR_uname, 1 },
+    //{ 123, __NR_modify_ldt },
+    //{ 125, __NR_mprotect, 3 },
+    //{ 136, __NR_personality, 1 },
+    //{ 140, __NR__llseek, 5 },
+    //{ 141, __NR_getdents, 3 },
+    //{ 142, __NR__newselect, 5 },
+    //{ 143, __NR_flock,  2 },
+    //{ 144, __NR_msync, 3 },
+    //{ 145, __NR_readv, 3 },
+    //{ 146, __NR_writev, 3 },
+    //{ 148, __NR_fdatasync, 1 },
+    //{ 149, __NR__sysctl, 1 },    // need wrapping?
+    //{ 156, __NR_sched_setscheduler, 3 },
+    //{ 157, __NR_sched_getscheduler, 1 },
+    //{ 158, __NR_sched_yield, 0 },
+    //{ 162, __NR_nanosleep, 2 },
+    //{ 164, __NR_setresuid, 3 },
+    //{ 168, __NR_poll, 3 },    // wrapped to allow SA_RESTART wrapping by libc
+    //{ 172, __NR_prctl, 5 },
+    //{ 173, __NR_rt_sigreturn, 0 },
+    //{ 175, __NR_rt_sigprocmask, 4 },
+    //{ 179, __NR_rt_sigsuspend, 2 },
+    //{ 183, __NR_getcwd, 2 },
+    //{ 184, __NR_capget, 2},
+    //{ 185, __NR_capset, 2},
+    //{ 186, __NR_sigaltstack, 2 },    // neeed wrap or something?
+    //{ 191, __NR_ugetrlimit, 2 },
+//    { 192, __NR_mmap2, 6},
+    //{ 195, __NR_stat64, 2 },  // need proprer wrap because of structure size change
+    //{ 196, __NR_lstat64, 2 }, // need proprer wrap because of structure size change
+    //{ 197, __NR_fstat64, 2 },  // need proprer wrap because of structure size change
+    //{ 199, __NR_getuid32, 0 },
+    //{ 200, __NR_getgid32, 0 },
+    //{ 201, __NR_geteuid32, 0 },
+    //{ 202, __NR_getegid32, 0 },
+    //{ 208, __NR_setresuid32, 3 },
+    //{ 209, __NR_getresuid32, 3 },
+    //{ 210, __NR_setresgid32, 3 },
+    //{ 211, __NR_getresgid32, 3 },
+    //{ 220, __NR_getdents64, 3 },
+    //{ 221, __NR_fcntl64, 3 },
+    { 224, __NR_gettid, 0 },
+    //{ 240, __NR_futex, 6 },
+    //{ 241, __NR_sched_setaffinity, 3 },
+    //{ 242, __NR_sched_getaffinity, 3 },
+    //{ 252, __NR_exit_group, 1 },
+    //{ 254, __NR_epoll_create, 1 },
+    //{ 255, __NR_epoll_ctl, 4 },
+    //{ 256, __NR_epoll_wait, 4 },
+    //{ 265, __NR_clock_gettime, 2 },
+    //{ 266, __NR_clock_getres, 2 },
+    //{ 270, __NR_tgkill, 3 },
+    //{ 271, __NR_utimes, 2 },
+    //{ 291, __NR_inotify_init, 0},
+    //{ 292, __NR_inotify_add_watch, 3},
+    //{ 293, __NR_inotify_rm_watch, 2},
+    //{ 311, __NR_set_robust_list, 2 },
+    //{ 312, __NR_get_robust_list, 4 },
+    //{ 318, __NR_getcpu, 3},
+    //{ 328, __NR_eventfd2, 2},
+    //{ 329, __NR_epoll_create1, 1 },
+    //{ 331, __NR_pipe2, 2},
+    //{ 332, __NR_inotify_init1, 1},
+    //{ 355, __NR_getrandom, 3 },
+    //{ 356, __NR_memfd_create, 2},
+    //{ 449, __NR_futex_waitv, 5},
+};
+
+struct mmap_arg_struct {
+    unsigned long addr;
+    unsigned long len;
+    unsigned long prot;
+    unsigned long flags;
+    unsigned long fd;
+    unsigned long offset;
+};
+
+#undef st_atime
+#undef st_ctime
+#undef st_mtime
+
+struct x64_pt_regs {
+	long ebx;
+	long ecx;
+	long edx;
+	long esi;
+	long edi;
+	long ebp;
+	long eax;
+	int  xds;
+	int  xes;
+	int  xfs;
+	int  xgs;
+	long orig_eax;
+	long eip;
+	int  xcs;
+	long eflags;
+	long esp;
+	int  xss;
+};
+
+#ifndef __NR_olduname
+struct oldold_utsname {
+        char sysname[9];
+        char nodename[9];
+        char release[9];
+        char version[9];
+        char machine[9];
+};
+#endif
+struct old_utsname {
+        char sysname[65];
+        char nodename[65];
+        char release[65];
+        char version[65];
+        char machine[65];
+};
+
+struct i386_user_desc {
+    unsigned int  entry_number;
+    unsigned long base_addr;
+    unsigned int  limit;
+    unsigned int  seg_32bit:1;
+    unsigned int  contents:2;
+    unsigned int  read_exec_only:1;
+    unsigned int  limit_in_pages:1;
+    unsigned int  seg_not_present:1;
+    unsigned int  useable:1;
+};
+
+void EXPORT x86Syscall(x64emu_t *emu)
+{
+    uint32_t s = R_EAX;
+    printf_log(LOG_DEBUG, "%p: Calling 32bits syscall 0x%02X (%d) %p %p %p %p %p", (void*)R_RIP, s, s, (void*)(uintptr_t)R_EBX, (void*)(uintptr_t)R_ECX, (void*)(uintptr_t)R_EDX, (void*)(uintptr_t)R_ESI, (void*)(uintptr_t)R_EDI); 
+    // check wrapper first
+    int cnt = sizeof(syscallwrap) / sizeof(scwrap_t);
+    for (int i=0; i<cnt; i++) {
+        if(syscallwrap[i].x86s == s) {
+            int sc = syscallwrap[i].nats;
+            switch(syscallwrap[i].nbpars) {
+                case 0: *(int32_t*)&R_EAX = syscall(sc); break;
+                case 1: *(int32_t*)&R_EAX = syscall(sc, R_EBX); break;
+                case 2: *(int32_t*)&R_EAX = syscall(sc, R_EBX, R_ECX); break;
+                case 3: *(int32_t*)&R_EAX = syscall(sc, R_EBX, R_ECX, R_EDX); break;
+                case 4: *(int32_t*)&R_EAX = syscall(sc, R_EBX, R_ECX, R_EDX, R_ESI); break;
+                case 5: *(int32_t*)&R_EAX = syscall(sc, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI); break;
+                case 6: *(int32_t*)&R_EAX = syscall(sc, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI, R_EBP); break;
+                default:
+                   printf_log(LOG_NONE, "ERROR, Unimplemented syscall wrapper (%d, %d)\n", s, syscallwrap[i].nbpars); 
+                   emu->quit = 1;
+                   return;
+            }
+            if(R_EAX==0xffffffff && errno>0)
+                R_EAX = (uint32_t)-errno;
+            printf_log(LOG_DEBUG, " => 0x%x\n", R_EAX);
+            return;
+        }
+    }
+    switch (s) {
+        case 1: // sys_exit
+            emu->quit = 1;
+            emu->exit = 1;
+            //R_EAX = syscall(__NR_exit, R_EBX);  // the syscall should exit only current thread
+            R_EAX = R_EBX; // faking the syscall here, we don't want to really terminate the thread now
+            break;
+        /*case 123:   // SYS_modify_ldt
+            R_EAX = my_modify_ldt(emu, R_EBX, (thread_area_t*)(uintptr_t)R_ECX, R_EDX);
+            if(R_EAX==0xffffffff && errno>0)
+                R_EAX = (uint32_t)-errno;
+            break;*/
+        case 243: // set_thread_area
+            R_EAX = my_set_thread_area_32(emu, (thread_area_32_t*)(uintptr_t)R_EBX);
+            if(R_EAX==0xffffffff && errno>0)
+                R_EAX = (uint32_t)-errno;
+            break;
+        default:
+            printf_log(LOG_INFO, "Warning: Unsupported Syscall 0x%02Xh (%d)\n", s, s);
+            R_EAX = (uint32_t)-ENOSYS;
+            return;
+    }
+    printf_log(LOG_DEBUG, " => 0x%x\n", R_EAX);
+}
diff --git a/src/emu/x87emu_private.c b/src/emu/x87emu_private.c
index 9f4b8af6..67573c37 100644
--- a/src/emu/x87emu_private.c
+++ b/src/emu/x87emu_private.c
@@ -339,8 +339,6 @@ void fpu_fxsave32(x64emu_t* emu, void* ed)
     p->ErrorSelector = 0;
     p->DataOffset = 0;
     p->DataSelector = 0;
-    p->MxCsr = 0;
-    p->MxCsr_Mask = 0;
     // copy FPU/MMX regs...
     for(int i=0; i<8; ++i)
         memcpy(&p->FloatRegisters[i].q[0], (i<stack)?&ST(i):&emu->mmx[i], sizeof(mmx87_regs_t));
@@ -367,8 +365,6 @@ void fpu_fxsave64(x64emu_t* emu, void* ed)
     p->ErrorOpcode = 0;
     p->ErrorOffset = 0;
     p->DataOffset = 0;
-    p->MxCsr = 0;
-    p->MxCsr_Mask = 0;
     // copy FPU/MMX regs...
     for(int i=0; i<8; ++i)
         memcpy(&p->FloatRegisters[i].q[0], (i<stack)?&ST(i):&emu->mmx[i], sizeof(mmx87_regs_t));
diff --git a/src/include/box64context.h b/src/include/box64context.h
index 3fe285dc..aa8c95b6 100644
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -8,6 +8,11 @@
 #include "dynarec/native_lock.h"
 #endif
 
+#ifdef DYNAREC
+// disabling for now, seems to have a negative impact on performances
+//#define USE_CUSTOM_MUTEX
+#endif
+
 typedef struct elfheader_s elfheader_t;
 typedef struct cleanup_s cleanup_t;
 typedef struct x64emu_s x64emu_t;
@@ -18,6 +23,7 @@ typedef struct bridge_s bridge_t;
 typedef struct dlprivate_s dlprivate_t;
 typedef struct kh_symbolmap_s kh_symbolmap_t;
 typedef struct kh_defaultversion_s kh_defaultversion_t;
+typedef struct kh_mapsymbols_s kh_mapsymbols_t;
 typedef struct library_s library_t;
 typedef struct linkmap_s linkmap_t;
 typedef struct kh_threadstack_s kh_threadstack_t;
@@ -64,8 +70,10 @@ void add1lib_neededlib(needed_libs_t* needed, library_t* lib, const char* name);
 typedef struct base_segment_s {
     uintptr_t       base;
     uint64_t        limit;
-    int             present;
     pthread_key_t   key;
+    uint8_t         present;
+    uint8_t         is32bits;
+    uint8_t         key_init;
 } base_segment_t;
 
 typedef struct box64context_s {
@@ -110,9 +118,11 @@ typedef struct box64context_s {
     lib_t               *maplib;        // lib and symbols handling
     lib_t               *local_maplib;  // libs and symbols openned has local (only collection of libs, no symbols)
     dic_t               *versym;        // dictionnary of versioned symbols
+    kh_mapsymbols_t     *globdata;      // GLOBAL_DAT relocation for COPY mapping in main elf
 
     kh_threadstack_t    *stacksizes;    // stack sizes attributes for thread (temporary)
     bridge_t            *system;        // other bridges
+    uintptr_t           exit_bridge;    // exit bridge value
     uintptr_t           vsyscall;       // vsyscall bridge value
     uintptr_t           vsyscalls[3];   // the 3 x86 VSyscall pseudo bridges (mapped at 0xffffffffff600000+)
     dlprivate_t         *dlprivate;     // dlopen library map
@@ -129,14 +139,25 @@ typedef struct box64context_s {
     pthread_mutex_t     mutex_thread;
     pthread_mutex_t     mutex_bridge;
     #else
+    #ifdef USE_CUSTOM_MUTEX
     uint32_t            mutex_dyndump;
     uint32_t            mutex_trace;
     uint32_t            mutex_tls;
     uint32_t            mutex_thread;
     uint32_t            mutex_bridge;
+    #else
+    pthread_mutex_t     mutex_dyndump;
+    pthread_mutex_t     mutex_trace;
+    pthread_mutex_t     mutex_tls;
+    pthread_mutex_t     mutex_thread;
+    pthread_mutex_t     mutex_bridge;
+    #endif
     uintptr_t           max_db_size;    // the biggest (in x86_64 instructions bytes) built dynablock
     int                 trace_dynarec;
     pthread_mutex_t     mutex_lock;     // this is for the Test interpreter
+    #ifdef __riscv
+    uint32_t            mutex_16b;
+    #endif
     #endif
 
     library_t           *libclib;       // shortcut to libc library (if loaded, so probably yes)
@@ -157,7 +178,7 @@ typedef struct box64context_s {
     pthread_key_t       tlskey;     // then tls key to have actual tlsdata
     void*               tlsdata;    // the initial global tlsdata
     int64_t             tlssize;    // wanted size of tlsdata
-    base_segment_t      segtls[4];  // only handling 0/1/2 descriptors (3 is internal use)
+    base_segment_t      segtls[16];
 
     uintptr_t           *auxval_start;
 
@@ -166,6 +187,7 @@ typedef struct box64context_s {
     int                 clean_cap;
 
     zydis_dec_t         *dec;           // trace
+    zydis_dec_t         *dec32;         // trace
 
     int                 forked;         //  how many forks... cleanup only when < 0
 
@@ -192,12 +214,12 @@ typedef struct box64context_s {
 
 } box64context_t;
 
-#ifndef DYNAREC
+#ifndef USE_CUSTOM_MUTEX
 #define mutex_lock(A)       pthread_mutex_lock(A)
 #define mutex_trylock(A)    pthread_mutex_trylock(A)
 #define mutex_unlock(A)     pthread_mutex_unlock(A)
 #else
-int GetTID();
+int GetTID(void);
 #define mutex_lock(A)       {uint32_t tid = (uint32_t)GetTID(); while(native_lock_storeifnull_d(A, tid)) sched_yield();}
 #define mutex_trylock(A)    native_lock_storeifnull_d(A, (uint32_t)GetTID())
 #define mutex_unlock(A)     native_lock_storeifref_d(A, 0, (uint32_t)GetTID())
@@ -223,10 +245,10 @@ int AddTLSPartition(box64context_t* context, int tlssize);
 
 // defined in fact in threads.c
 void thread_set_emu(x64emu_t* emu);
-x64emu_t* thread_get_emu();
+x64emu_t* thread_get_emu(void);
 
 // unlock mutex that are locked by current thread (for signal handling). Return a mask of unlock mutex
-int unlockMutex();
+int unlockMutex(void);
 // relock the muxtex that were unlocked
 void relockMutex(int locks);
 
diff --git a/src/include/box64stack.h b/src/include/box64stack.h
index 997e0646..0607f23f 100644
--- a/src/include/box64stack.h
+++ b/src/include/box64stack.h
@@ -9,11 +9,4 @@ typedef struct x64emu_s x64emu_t;
 int CalcStackSize(box64context_t *context);
 void SetupInitialStack(x64emu_t *emu);
 
-uint16_t Pop16(x64emu_t *emu);
-void Push16(x64emu_t *emu, uint16_t v);
-uint32_t Pop32(x64emu_t *emu);
-void Push32(x64emu_t *emu, uint32_t v);
-uint64_t Pop64(x64emu_t *emu);
-void Push64(x64emu_t *emu, uint64_t v);
-
-#endif //__BOX64_STACK_H_
\ No newline at end of file
+#endif //__BOX64_STACK_H_
diff --git a/src/include/bridge.h b/src/include/bridge.h
index 9859ae85..0c238089 100644
--- a/src/include/bridge.h
+++ b/src/include/bridge.h
@@ -7,13 +7,13 @@ typedef struct bridge_s bridge_t;
 typedef struct box64context_s box64context_t;
 typedef void (*wrapper_t)(x64emu_t* emu, uintptr_t fnc);
 
-bridge_t *NewBridge();
+bridge_t *NewBridge(void);
 void FreeBridge(bridge_t** bridge);
 
 uintptr_t AddBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* name);
 uintptr_t CheckBridged(bridge_t* bridge, void* fnc);
 uintptr_t AddCheckBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* name);
-uintptr_t AddAutomaticBridge(x64emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N);
+uintptr_t AddAutomaticBridge(x64emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* name);
 void* GetNativeFnc(uintptr_t fnc);
 void* GetNativeFncOrFnc(uintptr_t fnc);
 
@@ -22,13 +22,13 @@ uintptr_t AddVSyscall(bridge_t* bridge, int num);
 int hasAlternate(void* addr);
 void* getAlternate(void* addr);
 void addAlternate(void* addr, void* alt);
-void cleanAlternate();
+void cleanAlternate(void);
 
 #ifdef HAVE_TRACE
 const char* getBridgeName(void* addr);
 #endif
 
-void init_bridge_helper();
-void fini_bridge_helper();
+void init_bridge_helper(void);
+void fini_bridge_helper(void);
 
 #endif //__BRIDGE_H_
\ No newline at end of file
diff --git a/src/include/callback.h b/src/include/callback.h
index eecbc3d2..48d360c5 100644
--- a/src/include/callback.h
+++ b/src/include/callback.h
@@ -5,13 +5,14 @@
 
 typedef struct x64emu_s x64emu_t;
 
-uint64_t RunFunction(box64context_t *context, uintptr_t fnc, int nargs, ...);
+uint64_t RunFunction(uintptr_t fnc, int nargs, ...);
+uint64_t RunFunctionFmt(uintptr_t fnc, const char* fmt, ...);
 // save all modified register
-uint64_t RunSafeFunction(box64context_t *context, uintptr_t fnc, int nargs, ...);
+uint64_t RunSafeFunction(uintptr_t fnc, int nargs, ...);
 // use emu state to run function
 uint64_t RunFunctionWithEmu(x64emu_t *emu, int QuitOnLongJumpExit, uintptr_t fnc, int nargs, ...);
 // using the Windows x64 calling convention
-uint64_t RunFunctionWindows(box64context_t *context, uintptr_t fnc, int nargs, ...);
+uint64_t RunFunctionWindows(uintptr_t fnc, int nargs, ...);
 
 
 #endif //__CALLBACK_H__
\ No newline at end of file
diff --git a/src/include/custommem.h b/src/include/custommem.h
index e7623db2..13e73c4f 100644
--- a/src/include/custommem.h
+++ b/src/include/custommem.h
@@ -32,7 +32,7 @@ int setJumpTableIfRef64(void* addr, void* jmp, void* ref); // return 1 if write
 void setJumpTableDefault64(void* addr);
 void setJumpTableDefaultRef64(void* addr, void* jmp);
 int isJumpTableDefault64(void* addr);
-uintptr_t getJumpTable64();
+uintptr_t getJumpTable64(void);
 uintptr_t getJumpTableAddress64(uintptr_t addr);
 uintptr_t getJumpAddress64(uintptr_t addr);
 
@@ -64,7 +64,7 @@ void freeProtection(uintptr_t addr, size_t size);
 void refreshProtection(uintptr_t addr);
 uint32_t getProtection(uintptr_t addr);
 int getMmapped(uintptr_t addr);
-void loadProtectionFromMap();
+void loadProtectionFromMap(void);
 #ifdef DYNAREC
 void protectDB(uintptr_t addr, size_t size);
 void unprotectDB(uintptr_t addr, size_t size, int mark);    // if mark==0, the blocks are not marked as potentially dirty
@@ -79,7 +79,7 @@ void* find47bitBlock(size_t size);
 void* find47bitBlockNearHint(void* hint, size_t size);
 
 // unlock mutex that are locked by current thread (for signal handling). Return a mask of unlock mutex
-int unlockCustommemMutex();
+int unlockCustommemMutex(void);
 // relock the muxtex that were unlocked
 void relockCustommemMutex(int locks);
 
diff --git a/src/include/debug.h b/src/include/debug.h
index 37146e02..8397d6c5 100644
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -23,16 +23,23 @@ extern int box64_dynarec_x87double;
 extern int box64_dynarec_safeflags;
 extern int box64_dynarec_callret;
 extern int box64_dynarec_bleeding_edge;
+extern int box64_dynarec_jvm;
 extern int box64_dynarec_hotpage;
 extern int box64_dynarec_fastpage;
 extern int box64_dynarec_wait;
 extern int box64_dynarec_test;
+extern int box64_dynarec_missing;
 #ifdef ARM64
 extern int arm64_asimd;
 extern int arm64_aes;
 extern int arm64_pmull;
 extern int arm64_crc32;
 extern int arm64_atomics;
+#elif defined(RV64)
+extern int rv64_zba;
+extern int rv64_zbb;
+extern int rv64_zbc;
+extern int rv64_zbs;
 #endif
 #endif
 extern int box64_libcef;
@@ -96,7 +103,7 @@ void printf_ftrace(const char* fmt, ...);
 #define EXPORTDYN 
 #endif
 
-void init_malloc_hook();
+void init_malloc_hook(void);
 extern size_t(*box_malloc_usable_size)(void*);
 #ifdef ANDROID
 extern void*(*__libc_malloc)(size_t);
diff --git a/src/include/dictionnary.h b/src/include/dictionnary.h
index e2ec1466..efa5e1cc 100644
--- a/src/include/dictionnary.h
+++ b/src/include/dictionnary.h
@@ -4,7 +4,7 @@
 

 typedef void dic_t;

 

-dic_t *NewDictionnary();

+dic_t *NewDictionnary(void);

 void FreeDictionnary(dic_t **dic);

 

 const char* AddDictionnary(dic_t* dic, const char* s);

diff --git a/src/include/dynablock.h b/src/include/dynablock.h
index 4e9d0b36..757ca4ae 100644
--- a/src/include/dynablock.h
+++ b/src/include/dynablock.h
@@ -15,10 +15,10 @@ dynablock_t* InvalidDynablock(dynablock_t* db, int need_lock);
 dynablock_t* FindDynablockFromNativeAddress(void* addr);    // defined in box64context.h
 
 // Handling of Dynarec block (i.e. an exectable chunk of x64 translated code)
-dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create);   // return NULL if block is not found / cannot be created. Don't create if create==0
-dynablock_t* DBAlternateBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr);
+dynablock_t* DBGetBlock(x64emu_t* emu, uintptr_t addr, int create, int is32bits);   // return NULL if block is not found / cannot be created. Don't create if create==0
+dynablock_t* DBAlternateBlock(x64emu_t* emu, uintptr_t addr, uintptr_t filladdr, int is32bits);
 
 // for use in signal handler
-void cancelFillBlock();
+void cancelFillBlock(void);
 
 #endif //__DYNABLOCK_H_
\ No newline at end of file
diff --git a/src/include/dynarec_native.h b/src/include/dynarec_native.h
index eff5a6bf..05bfc3b5 100644
--- a/src/include/dynarec_native.h
+++ b/src/include/dynarec_native.h
@@ -5,9 +5,22 @@ typedef struct dynablock_s dynablock_t;
 typedef struct x64emu_s x64emu_t;
 typedef struct instsize_s instsize_t;
 
+//#define USE_CUSTOM_MEM
+#ifdef USE_CUSTOM_MEM
+#define dynaMalloc customMalloc
+#define dynaCalloc customCalloc
+#define dynaRealloc customRealloc
+#define dynaFree customFree
+#else
+#define dynaMalloc box_malloc
+#define dynaCalloc box_calloc
+#define dynaRealloc box_realloc
+#define dynaFree box_free
+#endif
+
 void addInst(instsize_t* insts, size_t* size, int x64_size, int native_size);
 
 void CancelBlock64(int need_lock);
-void* FillBlock64(dynablock_t* block, uintptr_t addr);
+void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bits);
 
 #endif //__DYNAREC_ARM_H_
\ No newline at end of file
diff --git a/src/include/dynarec_rv64.h b/src/include/dynarec_rv64.h
index 9abb704b..dd3b734e 100644
--- a/src/include/dynarec_rv64.h
+++ b/src/include/dynarec_rv64.h
@@ -4,7 +4,7 @@
 typedef struct dynablock_s dynablock_t;
 typedef struct x64emu_s x64emu_t;
 
-void CancelBlock64();
+void CancelBlock64(void);
 void* FillBlock64(dynablock_t* block, uintptr_t addr);
 
 #endif //__DYNAREC_RV64_H_
\ No newline at end of file
diff --git a/src/include/elfloader.h b/src/include/elfloader.h
index d5b54145..ca8839df 100644
--- a/src/include/elfloader.h
+++ b/src/include/elfloader.h
@@ -25,6 +25,7 @@ int CalcLoadAddr(elfheader_t* head);
 int AllocElfMemory(box64context_t* context, elfheader_t* head, int mainbin);
 void FreeElfMemory(elfheader_t* head);
 int LoadElfMemory(FILE* f, box64context_t* context, elfheader_t* head);
+int isElfHasNeededVer(elfheader_t* head, const char* libname, elfheader_t* verneeded);
 int ReloadElfMemory(FILE* f, box64context_t* context, elfheader_t* head);
 int RelocateElf(lib_t *maplib, lib_t* local_maplib, int bindnow, elfheader_t* head);
 int RelocateElfPlt(lib_t *maplib, lib_t* local_maplib, int bindnow, elfheader_t* head);
@@ -64,6 +65,8 @@ const char* GetParentSymbolVersion(elfheader_t* h, int index);
 const char* VersionedName(const char* name, int ver, const char* vername);
 int SameVersionedSymbol(const char* name1, int ver1, const char* vername1, const char* name2, int ver2, const char* vername2);
 int GetVersionIndice(elfheader_t* h, const char* vername);
+int GetNeededVersionCnt(elfheader_t* h, const char* libname);
+const char* GetNeededVersionString(elfheader_t* h, const char* libname, int idx);
 
 kh_mapsymbols_t* GetMapSymbols(elfheader_t* h);
 kh_mapsymbols_t* GetWeakSymbols(elfheader_t* h);
diff --git a/src/include/fileutils.h b/src/include/fileutils.h
index c666f0be..2e983c74 100644
--- a/src/include/fileutils.h
+++ b/src/include/fileutils.h
@@ -19,13 +19,13 @@ int FileIsX64ELF(const char* filename);
 int FileIsShell(const char* filename);
 
 // return temp folder (will return /tmp if nothing is correct)
-const char* GetTmpDir();
+const char* GetTmpDir(void);
 
 // will lower case the string and return a copy. Nothing fancy here, just A..Z transformed to a..z, rest is untouched
 char* LowerCase(const char* s);
 
 #if defined(RPI) || defined(RK3399) || defined(RK3326)
-void sanitize_mojosetup_gtk_background();
+void sanitize_mojosetup_gtk_background(void);
 #endif
 
 #endif //__FILEUTILS_H_
\ No newline at end of file
diff --git a/src/include/globalsymbols.h b/src/include/globalsymbols.h
index fc2753ef..d0eb3012 100644
--- a/src/include/globalsymbols.h
+++ b/src/include/globalsymbols.h
@@ -2,18 +2,18 @@
 #define _GLOBAL_SYMBOLS_H_

 

 //GTK stuff

-void my_checkGlobalGdkDisplay();

-void my_setGlobalGThreadsInit();

+void my_checkGlobalGdkDisplay(void);

+void my_setGlobalGThreadsInit(void);

 

-//void** my_GetGTKDisplay();

-void** my_GetGthreadsGotInitialized();  // defined in wrappedgthread2

+//void** my_GetGTKDisplay(void);

+void** my_GetGthreadsGotInitialized(void);  // defined in wrappedgthread2

 

 // NCurse / TInfo

-void my_checkGlobalTInfo();

-void my_updateGlobalTInfo();

+void my_checkGlobalTInfo(void);

+void my_updateGlobalTInfo(void);

 

 // getopt

-void my_checkGlobalOpt();

-void my_updateGlobalOpt();

+void my_checkGlobalOpt(void);

+void my_updateGlobalOpt(void);

 

 #endif //_GLOBAL_SYMBOLS_H_
\ No newline at end of file
diff --git a/src/include/gtkclass.h b/src/include/gtkclass.h
index 23822088..8a88a0d2 100644
--- a/src/include/gtkclass.h
+++ b/src/include/gtkclass.h
@@ -778,6 +778,22 @@ typedef struct my_GstAllocatorClass_s {
   void*    _gst_reserved[4];
 } my_GstAllocatorClass_t;
 
+typedef struct my_GstTaskPoolClass_s {
+  my_GstObjectClass_t parent_class;
+  void      (*prepare)  (void* pool, void* error);
+  void      (*cleanup)  (void* pool);
+  void*     (*push)     (void* pool, void* func, void* user_data, void* error);
+  void      (*join)     (void* pool, void* id);
+  void      (*dispose_handle) (void* pool, void* id);
+  void*     _gst_reserved[4-1];
+} my_GstTaskPoolClass_t;
+
+typedef struct my_GDBusProxyClass_s {
+  my_GObjectClass_t parent_class;
+  void (*g_properties_changed) (void* proxy, void* changed_properties, const char* const* invalidated_properties);
+  void (*g_signal)             (void* proxy, const char* sender_name, const char* signal_name, void* parameters);
+  void* padding[32];
+} my_GDBusProxyClass_t;
 
 // GTypeValueTable
 typedef struct my_GTypeValueTable_s {
@@ -831,7 +847,7 @@ my_GTypeInfo_t* findFreeGTypeInfo(my_GTypeInfo_t* fcts, size_t parent);
 my_GtkTypeInfo_t* findFreeGtkTypeInfo(my_GtkTypeInfo_t* fcts, size_t parent);
 
 void InitGTKClass(bridge_t *bridge);
-void FiniGTKClass();
+void FiniGTKClass(void);
 
 #define GTKCLASSES()                \
 GTKCLASS(GObject)                   \
@@ -884,6 +900,8 @@ GTKCLASS(AtkObject)                 \
 GTKCLASS(AtkUtil)                   \
 GTKCLASS(GstObject)                 \
 GTKCLASS(GstAllocator)              \
+GTKCLASS(GstTaskPool)               \
+GTKCLASS(GDBusProxy)                \
 
 #define GTKCLASS(A) void Set##A##ID(size_t id);
 GTKCLASSES()
diff --git a/src/include/librarian.h b/src/include/librarian.h
index 2ff059df..80e108ca 100644
--- a/src/include/librarian.h
+++ b/src/include/librarian.h
@@ -16,15 +16,17 @@ typedef char* cstr_t;
 
 lib_t *NewLibrarian(box64context_t* context, int ownlibs);
 void FreeLibrarian(lib_t **maplib, x64emu_t* emu);
-dlprivate_t *NewDLPrivate();
+dlprivate_t *NewDLPrivate(void);
 void FreeDLPrivate(dlprivate_t **lib);
 
 box64context_t* GetLibrarianContext(lib_t* maplib);
 kh_mapsymbols_t* GetGlobalData(lib_t* maplib);
-int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, box64context_t* box64, x64emu_t* emu); // 0=success, 1=error
+int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, elfheader_t* verneeded, box64context_t* box64, x64emu_t* emu); // 0=success, 1=error
 void RemoveNeededLib(lib_t* maplib, int local, needed_libs_t* needed, box64context_t* box64, x64emu_t* emu);
 library_t* GetLibMapLib(lib_t* maplib, const char* name);
 library_t* GetLibInternal(const char* name);
+void promoteLocalLibGlobal(library_t* lib);
+int isLibLocal(library_t* lib);
 uintptr_t FindGlobalSymbol(lib_t *maplib, const char* name, int version, const char* vername);
 int GetNoSelfSymbolStartEnd(lib_t *maplib, const char* name, uintptr_t* start, uintptr_t* end, elfheader_t* self, size_t size, int version, const char* vername, const char* globdefver, const char* weakdefver);
 int GetGlobalSymbolStartEnd(lib_t *maplib, const char* name, uintptr_t* start, uintptr_t* end, elfheader_t *self, int version, const char* vername, const char* globdefver, const char* weakdefver);
diff --git a/src/include/library.h b/src/include/library.h
index ff48b691..b08927e0 100644
--- a/src/include/library.h
+++ b/src/include/library.h
@@ -15,7 +15,7 @@ typedef struct elfheader_s     elfheader_t;
 #define LIB_EMULATED    1
 #define LIB_UNNKNOW     -1
 
-library_t *NewLibrary(const char* path, box64context_t* box64);
+library_t *NewLibrary(const char* path, box64context_t* box64, elfheader_t* verneeded);
 int AddSymbolsLibrary(lib_t* maplib, library_t* lib, x64emu_t* emu);
 int FinalizeLibrary(library_t* lib, lib_t* local_maplib, int bindnow, x64emu_t* emu);
 
diff --git a/src/include/myalign.h b/src/include/myalign.h
index 1a0f60bf..247ea1b9 100644
--- a/src/include/myalign.h
+++ b/src/include/myalign.h
@@ -214,4 +214,4 @@ void AlignSemidDs(void *dest, const void* source);
 
 uintptr_t getVArgs(x64emu_t* emu, int pos, uintptr_t* b, int N);
 
-#endif  //__MY_ALIGN__H_
\ No newline at end of file
+#endif  //__MY_ALIGN__H_
diff --git a/src/include/rcfile.h b/src/include/rcfile.h
index c194e9ae..ebad7048 100644
--- a/src/include/rcfile.h
+++ b/src/include/rcfile.h
@@ -2,7 +2,7 @@
 #define __RCFILE_H__
 
 void LoadRCFile(const char* filename);
-void DeleteParams();
+void DeleteParams(void);
 void ApplyParams(const char* name);
 
 #endif //__RCFILE_H__
\ No newline at end of file
diff --git a/src/include/regs.h b/src/include/regs.h
index 7a4ced73..a80b393e 100644
--- a/src/include/regs.h
+++ b/src/include/regs.h
@@ -17,7 +17,7 @@ enum {
 #define _DI _RDI
 
 enum {
-    _CS, _DS, _SS, _ES, _FS, _GS
+    _ES, _CS, _SS, _DS, _FS, _GS
 };
 
 
diff --git a/src/include/sdl1rwops.h b/src/include/sdl1rwops.h
index 46b73519..76fd890f 100644
--- a/src/include/sdl1rwops.h
+++ b/src/include/sdl1rwops.h
@@ -4,7 +4,7 @@
 typedef struct SDL1_RWops_s SDL1_RWops_t;   // the actual SDL1 SDL_RWops
 typedef struct x64emu_s x64emu_t;
 
-typedef SDL1_RWops_t* (*sdl1_allocrw)();
+typedef SDL1_RWops_t* (*sdl1_allocrw)(void);
 typedef void (*sdl1_freerw)(SDL1_RWops_t*);
 
 // each function will be added to dictionary, and each native functions will be wrapped so they run in emulated world
diff --git a/src/include/sdl2rwops.h b/src/include/sdl2rwops.h
index f03f17c2..1b13c091 100644
--- a/src/include/sdl2rwops.h
+++ b/src/include/sdl2rwops.h
@@ -4,7 +4,7 @@
 typedef struct SDL2_RWops_s SDL2_RWops_t;   // the actual SDL2 SDL_RWops
 typedef struct x64emu_s x64emu_t;
 
-typedef SDL2_RWops_t* (*sdl2_allocrw)();
+typedef SDL2_RWops_t* (*sdl2_allocrw)(void);
 typedef void (*sdl2_freerw)(SDL2_RWops_t*);
 
 typedef struct SDL2RWSave_s {
diff --git a/src/include/signals.h b/src/include/signals.h
index 22e96d15..f3697f48 100644
--- a/src/include/signals.h
+++ b/src/include/signals.h
@@ -34,7 +34,7 @@ int my___sigaction(x64emu_t* emu, int signum, const x64_sigaction_t *act, x64_si
 int my_syscall_rt_sigaction(x64emu_t* emu, int signum, const x64_sigaction_restorer_t *act, x64_sigaction_restorer_t *oldact, int sigsetsize);
 
 void init_signal_helper(box64context_t* context);
-void fini_signal_helper();
+void fini_signal_helper(void);
 
 void emit_signal(x64emu_t* emu, int sig, void* addr, int code);
 
diff --git a/src/include/symbols.h b/src/include/symbols.h
index b00a354b..32e54b20 100644
--- a/src/include/symbols.h
+++ b/src/include/symbols.h
@@ -9,14 +9,15 @@ typedef struct versymbols_s versymbols_t;
 
 KHASH_MAP_DECLARE_STR(mapsymbols, versymbols_t)
 
-kh_mapsymbols_t* NewMapSymbols();
+kh_mapsymbols_t* NewMapSymbols(void);
 void FreeMapSymbols(kh_mapsymbols_t** map);
 
 // replace if already there
 void AddSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz, int ver, const char* vername);
 uintptr_t FindSymbol(kh_mapsymbols_t *mapsymbols, const char* name, int ver, const char* vername, int local, const char* defver);
+// Update addr and sz of existing symbols
+void ForceUpdateSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz);
 // don't add if already there
-
 void AddUniqueSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz, int ver, const char* vername);
 int GetSymbolStartEnd(kh_mapsymbols_t* mapsymbols, const char* name, uintptr_t* start, uintptr_t* end, int ver, const char* vername, int local, const char* defver);
 int GetSizedSymbolStartEnd(kh_mapsymbols_t* mapsymbols, const char* name, uintptr_t* start, uintptr_t* end, size_t size, int ver, const char* vername, int local, const char* defver);
@@ -24,7 +25,7 @@ const char* GetSymbolName(kh_mapsymbols_t* mapsymbols, void* p, uintptr_t* offs,
 
 // default version handling
 KHASH_MAP_DECLARE_STR(defaultversion, const char*)
-kh_defaultversion_t* NewDefaultVersion();
+kh_defaultversion_t* NewDefaultVersion(void);
 void FreeDefaultVersion(kh_defaultversion_t** def);
 
 void AddDefaultVersion(kh_defaultversion_t* def, const char* symname, const char* vername);
diff --git a/src/include/threads.h b/src/include/threads.h
index d094dc0b..af58046b 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -4,25 +4,15 @@
 typedef struct box64context_s box64context_t;
 typedef struct x64emu_s x64emu_t;
 
-typedef struct emu_jmpbuf_s {
-    x64emu_t*   emu;
-	void* 	    jmpbuf;
-	int 	    jmpbuf_ok;
-} emu_jmpbuf_t;
-
 void CleanStackSize(box64context_t* context);
 
-emu_jmpbuf_t* GetJmpBuf();
-
-void init_pthread_helper();
+void init_pthread_helper(void);
 void fini_pthread_helper(box64context_t* context);
 
 // prepare an "emuthread structure" in pet and return address of function pointer for a "thread creation routine"
 void* my_prepare_thread(x64emu_t *emu, void* f, void* arg, int ssize, void** pet);
 
-#ifndef DYNAREC
 //check and unlock if a mutex is locked by current thread (works only for PTHREAD_MUTEX_ERRORCHECK typed mutex)
 int checkUnlockMutex(void* m);
-#endif
 
 #endif //_THREADS_H_
\ No newline at end of file
diff --git a/src/include/wine_tools.h b/src/include/wine_tools.h
index 52993cea..5c60fec2 100644
--- a/src/include/wine_tools.h
+++ b/src/include/wine_tools.h
@@ -4,10 +4,10 @@
 void wine_prereserve(const char* reserve);
 
 extern int wine_preloaded;
-void* get_wine_prereserve();
+void* get_wine_prereserve(void);
 
 #ifdef DYNAREC
-void dynarec_wine_prereserve();
+void dynarec_wine_prereserve(void);
 #endif
 
 #endif //__WINE_TOOLS_H__
diff --git a/src/include/x64emu.h b/src/include/x64emu.h
index c7f2e20e..51a27a18 100644
--- a/src/include/x64emu.h
+++ b/src/include/x64emu.h
@@ -6,7 +6,7 @@ typedef struct box64context_s box64context_t;
 
 x64emu_t *NewX64Emu(box64context_t *context, uintptr_t start, uintptr_t stack, int stacksize, int ownstack);
 x64emu_t *NewX64EmuFromStack(x64emu_t* emu, box64context_t *context, uintptr_t start, uintptr_t stack, int stacksize, int ownstack);
-void SetupX64Emu(x64emu_t *emu);
+void SetupX64Emu(x64emu_t *emu, x64emu_t *ref);
 void FreeX64Emu(x64emu_t **x64emu);
 void FreeX64EmuFromStack(x64emu_t **emu);
 void CloneEmu(x64emu_t *newemu, const x64emu_t* emu);
@@ -14,7 +14,7 @@ void CopyEmu(x64emu_t *newemu, const x64emu_t* emu);
 void SetTraceEmu(uintptr_t trace_start, uintptr_t trace_end);
 
 box64context_t* GetEmuContext(x64emu_t* emu);
-uint32_t* GetParityTab();
+uint32_t* GetParityTab(void);
 
 uint32_t GetEAX(x64emu_t *emu);
 uint64_t GetRAX(x64emu_t *emu);
@@ -41,17 +41,15 @@ uint64_t GetRSP(x64emu_t *emu);
 uint64_t GetRBP(x64emu_t *emu);
 void ResetFlags(x64emu_t *emu);
 void ResetSegmentsCache(x64emu_t *emu);
-const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip);
+const char* DumpCPURegs(x64emu_t* emu, uintptr_t ip, int is32bits);
 
-void StopEmu(x64emu_t* emu, const char* reason);
-void PushExit(x64emu_t* emu);
-void* GetExit();
+void StopEmu(x64emu_t* emu, const char* reason, int is32bits);
 void EmuCall(x64emu_t* emu, uintptr_t addr);
 void AddCleanup(x64emu_t *emu, void *p, void* dso_handle);
 void AddCleanup1Arg(x64emu_t *emu, void *p, void* a, void* dso_handle);
 void CallCleanup(x64emu_t *emu, void* p);
 void CallAllCleanup(x64emu_t *emu);
-void UnimpOpcode(x64emu_t* emu);
+void UnimpOpcode(x64emu_t* emu, int is32bits);
 
 uint64_t ReadTSC(x64emu_t* emu);
 
@@ -60,7 +58,7 @@ long double LD2localLD(void* ld);        // long double (80bits pointer) -> long
 void LD2D(void* ld, void* d);   // long double (80bits) -> double (64bits)
 void D2LD(void* d, void* ld);   // double (64bits) -> long double (64bits)
 
-void printFunctionAddr(uintptr_t nextaddr, const char* text);
+int printFunctionAddr(uintptr_t nextaddr, const char* text); // 0 if nothing was found
 const char* getAddrFunctionName(uintptr_t addr);
 
 #endif //__X86EMU_H_
\ No newline at end of file
diff --git a/src/include/x64run.h b/src/include/x64run.h
index 0e156341..11f07cfa 100644
--- a/src/include/x64run.h
+++ b/src/include/x64run.h
@@ -11,6 +11,6 @@ int DynaRun(x64emu_t *emu);
 uint32_t LibSyscall(x64emu_t *emu);
 void PltResolver(x64emu_t* emu);
 extern uintptr_t pltResolver;
-int GetTID();
+int GetTID(void);
 
 #endif //__X64RUN_H_
\ No newline at end of file
diff --git a/src/include/x64tls.h b/src/include/x64tls.h
index 9ca97efb..66f0d9eb 100644
--- a/src/include/x64tls.h
+++ b/src/include/x64tls.h
@@ -2,8 +2,9 @@
 #define __X64_TLS_H__
 
 typedef struct thread_area_s thread_area_t;
+typedef struct thread_area_32_s thread_area_32_t;
 
-uint32_t my_set_thread_area(thread_area_t* td);
+uint32_t my_set_thread_area_32(x64emu_t* emu, thread_area_32_t* td);
 uint32_t my_modify_ldt(x64emu_t* emu, int op, thread_area_t* td, int size);
 
 tlsdatasize_t* getTLSData(box64context_t *context);
diff --git a/src/include/x64trace.h b/src/include/x64trace.h
index 662f2740..e7c3efd7 100644
--- a/src/include/x64trace.h
+++ b/src/include/x64trace.h
@@ -8,10 +8,11 @@ typedef struct zydis_dec_s zydis_dec_t;
 int InitX64Trace(box64context_t *context);
 void DeleteX64Trace(box64context_t *context);
 
+zydis_dec_t* InitX86TraceDecoder(box64context_t *context);
+void DeleteX86TraceDecoder(zydis_dec_t **dec);
 zydis_dec_t* InitX64TraceDecoder(box64context_t *context);
 void DeleteX64TraceDecoder(zydis_dec_t **dec);
-const char* DecodeX64Trace(zydis_dec_t *dec, uintptr_t p);
 
-#define ZYDIS_RUNTIME_ADDRESS_NONE (uint64_t)(-1)
+const char* DecodeX64Trace(zydis_dec_t *dec, uintptr_t p);
 
 #endif //__X64TRACE_H_
\ No newline at end of file
diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c
index e480f907..5de70936 100644
--- a/src/librarian/librarian.c
+++ b/src/librarian/librarian.c
@@ -156,7 +156,28 @@ static void MapLibRemoveMapLib(lib_t* dest, lib_t* src)
     }
 }
 
-int AddNeededLib_add(lib_t* maplib, int local, needed_libs_t* needed, int n, box64context_t* box64, x64emu_t* emu)
+void promoteLocalLibGlobal(library_t* lib)
+{
+    if(!lib || !my_context)
+        return;
+    // promote lib from local to global...
+    // for add the depending local libs...
+    if(lib->maplib) {
+        MapLibAddMapLib(my_context->maplib, lib, lib->maplib);
+    }
+    if(!libraryInMapLib(my_context->maplib, lib))
+        MapLibAddLib(my_context->maplib, lib);
+    MapLibRemoveMapLib(my_context->local_maplib, my_context->maplib);
+}
+
+int isLibLocal(library_t* lib)
+{
+    if(!lib || !my_context)
+        return 0;
+    return libraryInMapLib(my_context->local_maplib, lib);
+}
+
+static int AddNeededLib_add(lib_t* maplib, int local, needed_libs_t* needed, int n, elfheader_t* verneeded, box64context_t* box64, x64emu_t* emu)
 {
     const char* path = needed->names[n];
     printf_log(LOG_DEBUG, "Trying to add \"%s\" to maplib%s\n", path, local?" (local)":"");
@@ -187,18 +208,12 @@ int AddNeededLib_add(lib_t* maplib, int local, needed_libs_t* needed, int n, box
             }
         } else {
             // promote lib from local to global...
-            // for add the depending local libs...
-            if(lib->maplib) {
-                MapLibAddMapLib(my_context->maplib, lib, lib->maplib);
-            }
-            if(!libraryInMapLib(my_context->maplib, lib))
-                MapLibAddLib(my_context->maplib, lib);
-            MapLibRemoveMapLib(my_context->local_maplib, my_context->maplib);
+            promoteLocalLibGlobal(lib);
         }
         return 0;
     }
     // load a new one
-    needed->libs[n] = lib = NewLibrary(path, box64);
+    needed->libs[n] = lib = NewLibrary(path, box64, verneeded);
     if(!lib) {
         printf_log(LOG_DEBUG, "Faillure to create lib => fail\n");
         return 1;   //Error
@@ -242,7 +257,7 @@ int AddNeededLib_add(lib_t* maplib, int local, needed_libs_t* needed, int n, box
     return 0;
 }
 
-int AddNeededLib_init(lib_t* maplib, int local, int bindnow, library_t* lib, box64context_t* box64, x64emu_t* emu)
+int AddNeededLib_init(lib_t* maplib, int local, int bindnow, library_t* lib, elfheader_t* verneeded, box64context_t* box64, x64emu_t* emu)
 {
     if(!lib)    // no lib, error is already detected, no need to return a new one
         return 0;
@@ -268,7 +283,7 @@ int AddNeededLib_init(lib_t* maplib, int local, int bindnow, library_t* lib, box
             tmp.size = tmp.cap = 1;
             tmp.names = names;
             tmp.libs = libs;
-            AddNeededLib(maplib, 0, 0, &tmp, box64, emu);
+            AddNeededLib(maplib, 0, 0, &tmp, verneeded, box64, emu);
         }
         if(!strcmp(GetNameLib(lib), "libmss.so.6")) {
             char* names[] = {"libSDL-1.2.so.0", "libdl.so.2"}; // TODO: they will never be uninit...
@@ -277,7 +292,7 @@ int AddNeededLib_init(lib_t* maplib, int local, int bindnow, library_t* lib, box
             tmp.size = tmp.cap = 2;
             tmp.names = names;
             tmp.libs = libs;
-            AddNeededLib(maplib, 0, 0, &tmp, box64, emu);
+            AddNeededLib(maplib, 0, 0, &tmp, verneeded, box64, emu);
         }
 
         // finalize the lib
@@ -303,7 +318,7 @@ void AddNeededLib_remove(lib_t* maplib, int local, library_t** lib, box64context
 }
 
 EXPORTDYN
-int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, box64context_t* box64, x64emu_t* emu)
+int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, elfheader_t* verneeded, box64context_t* box64, x64emu_t* emu)
 {
     if(!needed) // no needed libs, no problems
         return 0;
@@ -311,7 +326,7 @@ int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, b
     int ret = 0;
     // Add libs and symbol
     for(int i=0; i<needed->size; ++i) {
-        if(AddNeededLib_add(maplib, local, needed, i, box64, emu)) {
+        if(AddNeededLib_add(maplib, local, needed, i, verneeded, box64, emu)) {
             printf_log(strchr(needed->names[i],'/')?LOG_DEBUG:LOG_INFO, "Error loading needed lib %s\n", needed->names[i]);
             ret = 1;
         }
@@ -322,7 +337,7 @@ int AddNeededLib(lib_t* maplib, int local, int bindnow, needed_libs_t* needed, b
     }
     // add dependant libs and init them
     for (int i=0; i<needed->size; ++i)
-        if(AddNeededLib_init(maplib, local, bindnow, needed->libs[i], box64, emu)) {
+        if(AddNeededLib_init(maplib, local, bindnow, needed->libs[i], verneeded, box64, emu)) {
             printf_log(LOG_INFO, "Error initializing needed lib %s\n", needed->names[i]);
             if(!allow_missing_libs) ret = 1;
         }
@@ -575,6 +590,10 @@ int GetGlobalNoWeakSymbolStartEnd(lib_t *maplib, const char* name, uintptr_t* st
 {
     int weak = 0;
     size_t size = 0;
+    // check global GLOB_DAT kind of symbols
+    if(GetSymbolStartEnd(GetGlobalData(maplib), name, start, end, version, vername, 1, defver))
+        if(*start || *end)
+            return 1;
     // check with default version...
     if(GetSymbolStartEnd(GetMapSymbols(my_context->elfs[0]), name, start, end, version, vername, 1, defver))
         if(*start || *end)
diff --git a/src/librarian/library.c b/src/librarian/library.c
index 4f9c95c8..18fbe24f 100644
--- a/src/librarian/library.c
+++ b/src/librarian/library.c
@@ -217,7 +217,7 @@ static void initWrappedLib(library_t *lib, box64context_t* context) {
             lib->type = LIB_WRAPPED;
             lib->w.refcnt = 1;
             // Call librarian to load all dependant elf
-            if(AddNeededLib(context->maplib, 0, 0, lib->w.needed, context, thread_get_emu())) {
+            if(AddNeededLib(context->maplib, 0, 0, lib->w.needed, NULL, context, thread_get_emu())) {
                 printf_log(LOG_NONE, "Error: loading a needed libs in elf %s\n", lib->name);
                 return;
             }
@@ -240,7 +240,7 @@ static void initWrappedLib(library_t *lib, box64context_t* context) {
     }
 }
 
-static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t* context)
+static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t* context, elfheader_t* verneeded)
 {
     if(FileExist(libname, IS_FILE))
     {
@@ -255,28 +255,36 @@ static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t*
             fclose(f);
             return 0;
         }
-        int mainelf = AddElfHeader(context, elf_header);
 
         if(CalcLoadAddr(elf_header)) {
             printf_log(LOG_NONE, "Error: reading elf header of %s\n", libname);
+            FreeElfHeader(&elf_header);
             fclose(f);
             return 0;
         }
         // allocate memory
         if(AllocElfMemory(context, elf_header, 0)) {
             printf_log(LOG_NONE, "Error: allocating memory for elf %s\n", libname);
+            FreeElfHeader(&elf_header);
             fclose(f);
             return 0;
         }
         // Load elf into memory
         if(LoadElfMemory(f, context, elf_header)) {
             printf_log(LOG_NONE, "Error: loading in memory elf %s\n", libname);
+            FreeElfHeader(&elf_header);
             fclose(f);
             return 0;
         }
         // can close the file now
         fclose(f);
+        if(verneeded && !isElfHasNeededVer(elf_header, lib->name, verneeded)) {
+            // incompatible, discard and continue the search
+            FreeElfHeader(&elf_header);
+            return 0;
+        }
 
+        int mainelf = AddElfHeader(context, elf_header);
         ElfAttachLib(elf_header, lib);
 
         lib->type = LIB_EMULATED;
@@ -301,6 +309,11 @@ static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t*
             box64_dynarec_bigblock = 0;
             box64_dynarec_strongmem = 1;
         }
+        if(libname && box64_dynarec_jvm && strstr(libname, "libjvm.so")) {
+            printf_log(LOG_INFO, "libjvm detected, disable Dynarec BigBlock and enable Dynarec StrongMem\n");
+            box64_dynarec_bigblock = 0;
+            box64_dynarec_strongmem = 1;
+        }
         #endif
         if(libname && box64_libcef && strstr(libname, "libcef.so")) {
             printf_log(LOG_INFO, "libcef detected, using malloc_hack_2\n");
@@ -311,13 +324,13 @@ static int loadEmulatedLib(const char* libname, library_t *lib, box64context_t*
     return 0;
 }
 
-static void initEmulatedLib(const char* path, library_t *lib, box64context_t* context)
+static void initEmulatedLib(const char* path, library_t *lib, box64context_t* context, elfheader_t* verneeded)
 {
     char libname[MAX_PATH];
     strcpy(libname, path);
     int found = FileIsX64ELF(libname);
     if(found)
-        if(loadEmulatedLib(libname, lib, context))
+        if(loadEmulatedLib(libname, lib, context, verneeded))
             return;
     if(!strchr(path, '/'))
         for(int i=0; i<context->box64_ld_lib.size; ++i)
@@ -325,8 +338,15 @@ static void initEmulatedLib(const char* path, library_t *lib, box64context_t* co
             strcpy(libname, context->box64_ld_lib.paths[i]);
             strcat(libname, path);
             if(FileIsX64ELF(libname))
-                if(loadEmulatedLib(libname, lib, context))
+                if(loadEmulatedLib(libname, lib, context, verneeded))
                     return;
+            // also try x86_64 variant
+            strcpy(libname, context->box64_ld_lib.paths[i]);
+            strcat(libname, "x86_64/");
+            strcat(libname, path);
+            if(FileIsX64ELF(libname))
+                if(loadEmulatedLib(libname, lib, context, verneeded))
+                    return;            
         }
 }
 
@@ -348,7 +368,7 @@ static int isEssentialLib(const char* name) {
     return 0;
 }
 
-library_t *NewLibrary(const char* path, box64context_t* context)
+library_t *NewLibrary(const char* path, box64context_t* context, elfheader_t* verneeded)
 {
     printf_log(LOG_DEBUG, "Trying to load \"%s\"\n", path);
     library_t *lib = (library_t*)box_calloc(1, sizeof(library_t));
@@ -394,7 +414,7 @@ library_t *NewLibrary(const char* path, box64context_t* context)
         initWrappedLib(lib, context);
     // then look for a native one
     if(lib->type==LIB_UNNKNOW)
-        initEmulatedLib(path, lib, context);
+        initEmulatedLib(path, lib, context, verneeded);
     // still not loaded but notwrapped indicated: use wrapped...
     if(lib->type==LIB_UNNKNOW && notwrapped && !precise)
         initWrappedLib(lib, context);
@@ -610,11 +630,16 @@ int IsSameLib(library_t* lib, const char* path)
     if(!strchr(path, '/') || lib->type==LIB_WRAPPED || !lib->path) {
         if(strcmp(name, lib->name)==0)
             ret=1;
+        if(lib->type==LIB_EMULATED && lib->e.elf->soname && !strcmp(lib->e.elf->soname, path))
+            ret=1;
     } else {
         char rpath[PATH_MAX];
         box_realpath(path, rpath);
         if(!strcmp(rpath, lib->path))
             ret=1;
+        if(lib->type==LIB_EMULATED && lib->e.elf->path && !strcmp(lib->e.elf->path, rpath)) {
+            ret=1;
+        }
     }
     if(!ret) {
         int n = NbDot(name);
@@ -1104,21 +1129,21 @@ void setNeededLibs(library_t* lib, int n, ...)
 
 void IncRefCount(library_t* lib, x64emu_t* emu)
 {
-    if(lib->type==LIB_UNNKNOW)
+    if(!lib || lib->type==LIB_UNNKNOW)
         return;
     switch (lib->type) {
         case LIB_WRAPPED:
             ++lib->w.refcnt;
-            if(lib->w.needed)
+            /*if(lib->w.needed)
                 for(int i=0; i<lib->w.needed->size; ++i) {
                     IncRefCount(lib->w.needed->libs[i], emu);
-                }
+                }*/
             break;
         case LIB_EMULATED:
             ++lib->e.elf->refcnt;
-            if(lib->e.elf->needed)
-                for(int i=0; i<lib->e.elf->needed->size; ++i)
-                    IncRefCount(lib->e.elf->needed->libs[i], emu);
+            /*if(lib->e.elf->needed)
+                for(int i=0; i<lib->e.elf->needed->size; ++i)   // some libs may not be loaded yet
+                    IncRefCount(lib->e.elf->needed->libs[i], emu);*/
     }
 }
 
@@ -1155,9 +1180,9 @@ int DecRefCount(library_t** lib, x64emu_t* emu)
             }
             break;
     }
-    if(needed)
+    /*if(needed)
         for(int i=0; i<needed->size; ++i)
-            DecRefCount(&needed->libs[i], emu);
+            DecRefCount(&needed->libs[i], emu);*/
     if(freed)
         free_neededlib(needed);
     return ret;
diff --git a/src/librarian/symbols.c b/src/librarian/symbols.c
index bbe7f941..cb59430a 100644
--- a/src/librarian/symbols.c
+++ b/src/librarian/symbols.c
@@ -170,6 +170,19 @@ void AddSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, ui
     v->syms[idx].sym.sz = sz;
 }
 
+void ForceUpdateSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz)
+{
+    int ret;
+    khint_t k = kh_put(mapsymbols, mapsymbols, name, &ret);
+    versymbols_t * v = &kh_val(mapsymbols, k);
+    if(ret) {v->sz = v->cap = 0; v->syms = NULL;}
+    // now check if that version already exist, and update record and exit if yes
+    for(int i=0; i<v->sz; ++i) {
+        v->syms[i].sym.offs = addr;
+        v->syms[i].sym.sz = sz;
+    }
+}
+
 uintptr_t FindSymbol(kh_mapsymbols_t *mapsymbols, const char* name, int ver, const char* vername, int local, const char* defver)
 {
     if(!mapsymbols)
diff --git a/src/library_list.h b/src/library_list.h
index 68a07e77..9770518c 100644
--- a/src/library_list.h
+++ b/src/library_list.h
@@ -15,6 +15,7 @@ GO("libGLX.so.0", libglx)
 GO("libGLX.so", libglx)
 GO("libX11.so.6", libx11)
 GO("libasound.so.2", libasound)
+GO("libasound.so", libasound)
 GO("libdl.so.2", libdl)
 GO("libm.so.6", libm)
 GO("libSDL2-2.0.so.0", sdl2)
@@ -152,6 +153,7 @@ GO("libpango-1.0.so", pango)
 GO("libibus-1.0.so.5", libibus)
 GO("libfontconfig.so.1", fontconfig)
 GO("libfreetype.so.6", freetype)
+GO("libharfbuzz.so.0", libharfbuzz)
 GO("libbz2.so.1", bz2)
 GO("liblzma.so.5", lzma)
 GO("libSM.so.6", libsm)
@@ -175,13 +177,14 @@ GO("libmpg123.so.0", mpg123)
 GO("libgnutls.so.30", gnutls)
 GO("libpcre.so.3", libpcre)
 GO("libcups.so.2", libcups)
-//GO("d3dadapter9.so.1", d3dadapter9)
 GO("libvulkan.so.1", vulkan)
 GO("libvulkan.so", vulkan)
 //GO("libwayland-client.so.0", waylandclient)
 GO("libgbm.so.1", gbm)
 GO("libxml2.so.2", xml2)
 GO("libxslt.so.1", xslt)
+GO("libgomp.so.1", gomp)
+GO("libcap.so.2", cap)
 GO("libldap_r-2.4.so.2", ldapr)
 GO("liblber-2.4.so.2", lber)
 //GO("libnsl.so.1", nsl)
diff --git a/src/libtools/myalign.c b/src/libtools/myalign.c
index 3d2e49a0..36873cba 100644
--- a/src/libtools/myalign.c
+++ b/src/libtools/myalign.c
@@ -717,7 +717,7 @@ void myStackAlignValist(x64emu_t* emu, const char* fmt, uint64_t* mystack, x64_v
             case 15:    //%zg, meh.. double?
                 if(fprs<X64_VA_MAX_XMM) {
                     *mystack = area[fprs/8];
-                    fprs+=8;
+                    fprs+=16;
                     mystack++;
                 } else {
                     *mystack = *st;
@@ -862,7 +862,7 @@ void myStackAlignWValist(x64emu_t* emu, const char* fmt, uint64_t* mystack, x64_
             case 15:    //%zg, meh .. double
                 if(fprs<X64_VA_MAX_XMM) {
                     *mystack = area[fprs/8];
-                    fprs+=8;
+                    fprs+=16;
                     mystack++;
                 } else {
                     *mystack = *st;
@@ -1130,4 +1130,4 @@ void myStackAlignScanfWValist(x64emu_t* emu, const char* fmt, uint64_t* mystack,
     }
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/libtools/obstack.c b/src/libtools/obstack.c
index 42b93569..b3f2fc57 100644
--- a/src/libtools/obstack.c
+++ b/src/libtools/obstack.c
@@ -44,7 +44,7 @@ GO(4)
 static uintptr_t my_chunkfun_fct_##A = 0;                                      \
 static void* my_chunkfun_##A(size_t a) \
 {                                                                               \
-    return (void*)RunFunction(my_context, my_chunkfun_fct_##A, 1, a);            \
+    return (void*)RunFunction(my_chunkfun_fct_##A, 1, a);                       \
 }
 SUPER()
 #undef GO
@@ -77,7 +77,7 @@ static void* reverse_chunkfunFct(library_t* lib, void* fct)
 static uintptr_t my_freefun_fct_##A = 0;                \
 static void my_freefun_##A(void* a)                     \
 {                                                       \
-    RunFunction(my_context, my_freefun_fct_##A, 1, a);  \
+    RunFunction(my_freefun_fct_##A, 1, a);              \
 }
 SUPER()
 #undef GO
@@ -239,7 +239,7 @@ void actual_obstack_alloc_failed_handler()
 {
     if(ref_obstack_alloc_failed_handler == my_obstack_alloc_failed_handler)
         real_obstack_alloc_failed_handler();
-    RunFunction(my_context, (uintptr_t)my_obstack_alloc_failed_handler, 0);
+    RunFunction((uintptr_t)my_obstack_alloc_failed_handler, 0);
 }
 void obstackSetup()
 {
diff --git a/src/libtools/sdl1rwops.c b/src/libtools/sdl1rwops.c
index c7349af6..ec3f8abd 100644
--- a/src/libtools/sdl1rwops.c
+++ b/src/libtools/sdl1rwops.c
@@ -72,20 +72,20 @@ EXPORT int32_t my_native_close(SDL1_RWops_t *context)
 }
 EXPORT int32_t my_emulated_seek(SDL1_RWops_t *context, int32_t offset, int32_t whence)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->seek, 3, context->hidden.my.orig, offset, whence);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->seek, "pii", context->hidden.my.orig, offset, whence);
 }
 EXPORT int32_t my_emulated_read(SDL1_RWops_t *context, void *ptr, int32_t size, int32_t maxnum)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->read, 4, context->hidden.my.orig, ptr, size, maxnum);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->read, "ppii", context->hidden.my.orig, ptr, size, maxnum);
 }
 
 EXPORT int32_t my_emulated_write(SDL1_RWops_t *context, const void *ptr, int32_t size, int32_t num)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->write, 4, context->hidden.my.orig, ptr, size, num);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->write, "ppii", context->hidden.my.orig, ptr, size, num);
 }
 EXPORT int32_t my_emulated_close(SDL1_RWops_t *context)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->close, 1, context->hidden.my.orig);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->close, "p", context->hidden.my.orig);
 }
 
 SDL1_RWops_t* AddNativeRW(x64emu_t* emu, SDL1_RWops_t* ops)
@@ -180,4 +180,4 @@ void RWSetType(SDL1_RWops_t* r, int awesome)
 {
     if(r)
         r->type = awesome;  // I like shoot'em up :D
-}
\ No newline at end of file
+}
diff --git a/src/libtools/sdl2rwops.c b/src/libtools/sdl2rwops.c
index 9b18dd8f..085c7837 100644
--- a/src/libtools/sdl2rwops.c
+++ b/src/libtools/sdl2rwops.c
@@ -85,23 +85,23 @@ EXPORT int32_t my2_native_close(SDL2_RWops_t *context)
 }
 EXPORT int64_t my2_emulated_size(SDL2_RWops_t *context)
 {
-    return (int64_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->size, 1, context->hidden.my.orig);
+    return (int64_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->size, "p", context->hidden.my.orig);
 }
 EXPORT int64_t my2_emulated_seek(SDL2_RWops_t *context, int64_t offset, int32_t whence)
 {
-    return (int64_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->seek, 3, context->hidden.my.orig, offset, whence);
+    return (int64_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->seek, "pIi", context->hidden.my.orig, offset, whence);
 }
 EXPORT int32_t my2_emulated_read(SDL2_RWops_t *context, void *ptr, int32_t size, int32_t maxnum)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->read, 4, context->hidden.my.orig, ptr, size, maxnum);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->read, "ppii", context->hidden.my.orig, ptr, size, maxnum);
 }
 EXPORT int32_t my2_emulated_write(SDL2_RWops_t *context, const void *ptr, int32_t size, int32_t num)
 {
-    return (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->write, 4, context->hidden.my.orig, ptr, size, num);
+    return (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->write, "ppii", context->hidden.my.orig, ptr, size, num);
 }
 EXPORT int32_t my2_emulated_close(SDL2_RWops_t *context)
 {
-    int ret = (int32_t)RunFunction(my_context, (uintptr_t)context->hidden.my.orig->close, 1, context->hidden.my.orig);
+    int ret = (int32_t)RunFunctionFmt((uintptr_t)context->hidden.my.orig->close, "p", context->hidden.my.orig);
     context->hidden.my.custom_free(context);
     return ret;
 }
@@ -109,12 +109,12 @@ EXPORT int32_t my2_emulated_close(SDL2_RWops_t *context)
 static uintptr_t emulated_sdl2allocrw = 0;
 EXPORT SDL2_RWops_t* my_wrapped_sdl2allocrw()
 {
-    return (SDL2_RWops_t*)RunFunction(my_context, emulated_sdl2allocrw, 0);
+    return (SDL2_RWops_t*)RunFunctionFmt(emulated_sdl2allocrw, "");
 }
 static uintptr_t emulated_sdl2freerw = 0;
 EXPORT void my_wrapped_sdl2freerw(SDL2_RWops_t* p)
 {
-    RunFunction(my_context, emulated_sdl2freerw, 1, p);
+    RunFunctionFmt(emulated_sdl2freerw, "p", p);
 }
 
 static void checkSDL2isNative()
@@ -174,7 +174,7 @@ SDL2_RWops_t* RWNativeStart2(x64emu_t* emu, SDL2_RWops_t* ops)
     newrw->type = BOX64RW;
     newrw->hidden.my.orig = ops;
     newrw->hidden.my.custom_free = (sdl2_freerw)emu->context->sdl2freerw;
-   
+
     // create wrapper
     #define GO(A, W) \
     newrw->A = my2_emulated_##A;
@@ -229,4 +229,4 @@ int32_t RWNativeWrite2(SDL2_RWops_t *ops, const void *ptr, int32_t size, int32_t
 int32_t RWNativeClose2(SDL2_RWops_t* ops)
 {
     return ops->close(ops);
-}
\ No newline at end of file
+}
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index 39dc190e..468a83f5 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
@@ -269,7 +270,7 @@ static void sigstack_key_alloc() {
 
 //1<<8 is mutex_dyndump
 #define is_dyndump_locked (1<<8)
-uint64_t RunFunctionHandler(int* exit, x64_ucontext_t* sigcontext, uintptr_t fnc, int nargs, ...)
+uint64_t RunFunctionHandler(int* exit, int dynarec, x64_ucontext_t* sigcontext, uintptr_t fnc, int nargs, ...)
 {
     if(fnc==0 || fnc==1) {
         va_list va;
@@ -295,8 +296,6 @@ uint64_t RunFunctionHandler(int* exit, x64_ucontext_t* sigcontext, uintptr_t fnc
     if(box64_dynarec_test)
         emu->test.test = 0;
     #endif
-
-    printf_log(LOG_DEBUG, "%04d|signal function handler %p called, RSP=%p\n", GetTID(), (void*)fnc, (void*)R_RSP);
     
     /*SetFS(emu, default_fs);*/
     for (int i=0; i<6; ++i)
@@ -320,14 +319,26 @@ uint64_t RunFunctionHandler(int* exit, x64_ucontext_t* sigcontext, uintptr_t fnc
     }
     va_end (va);
 
+    printf_log(LOG_DEBUG, "%04d|signal #%d function handler %p called, RSP=%p\n", GetTID(), R_EDI, (void*)fnc, (void*)R_RSP);
+
     int oldquitonlongjmp = emu->quitonlongjmp;
     emu->quitonlongjmp = 2;
+    int old_cs = R_CS;
+    R_CS = 0x33;
     
-    EmuCall(emu, fnc);  // avoid DynaCall for now
-    //DynaCall(emu, fnc);
-    if(nargs>6)
+    emu->eflags.x64 &= ~(1<<F_TF); // this one needs to cleared
+
+    if(dynarec)
+        DynaCall(emu, fnc);
+    else
+        EmuCall(emu, fnc);
+
+    if(nargs>6 && !emu->longjmp)
         R_RSP+=((nargs-6)*sizeof(void*));
 
+    if(!emu->longjmp && R_CS==0x33)
+        R_CS = old_cs;
+
     emu->quitonlongjmp = oldquitonlongjmp;
 
     #ifdef DYNAREC
@@ -449,6 +460,25 @@ uintptr_t getX64Address(dynablock_t* db, uintptr_t arm_addr)
     } while(db->instsize[i].x64 || db->instsize[i].nat);
     return x64addr;
 }
+x64emu_t* getEmuSignal(x64emu_t* emu, ucontext_t* p, dynablock_t* db)
+{
+#if defined(ARM64)
+        if(db && p->uc_mcontext.regs[0]>0x10000) {
+            emu = (x64emu_t*)p->uc_mcontext.regs[0];
+        }
+#elif defined(LA464)
+        if(db && p->uc_mcontext.__gregs[4]>0x10000) {
+            emu = (x64emu_t*)p->uc_mcontext.__gregs[4];
+        }
+#elif defined(RV64)
+        if(db && p->uc_mcontext.__gregs[10]>0x10000) {
+            emu = (x64emu_t*)p->uc_mcontext.__gregs[10];
+        }
+#else
+#error Unsupported Architecture
+#endif //arch
+    return emu;
+}
 #endif
 
 void copyUCTXreg2Emu(x64emu_t* emu, ucontext_t* p, uintptr_t ip) {
@@ -713,16 +743,21 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
             else
                 sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 14; // PAGE_FAULT
         } else {
-            sigcontext->uc_mcontext.gregs[X64_TRAPNO] = (info->si_code == SEGV_ACCERR)?13:14;
+            sigcontext->uc_mcontext.gregs[X64_TRAPNO] = (info->si_code == SEGV_ACCERR)?14:13;
             //X64_ERR seems to be INT:8 CODE:8. So for write access segfault it's 0x0002 For a read it's 0x0004 (and 8 for exec). For an int 2d it could be 0x2D01 for example
             sigcontext->uc_mcontext.gregs[X64_ERR] = 0x0004;    // read error? there is no execute control in box64 anyway
         }
         if(info->si_code == SEGV_ACCERR && old_code)
             *old_code = -1;
-    } else if(sig==SIGFPE)
-        sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 19;
-    else if(sig==SIGILL)
+    } else if(sig==SIGFPE) {
+        if (info->si_code == FPE_INTOVF)
+            sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 4;
+        else
+            sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 19;
+    } else if(sig==SIGILL)
         sigcontext->uc_mcontext.gregs[X64_TRAPNO] = 6;
+    else if(sig==SIGTRAP)
+        sigcontext->uc_mcontext.gregs[X64_TRAPNO] = info->si_code;
     //TODO: SIGABRT generate what?
     // call the signal handler
     x64_ucontext_t sigcontext_copy = *sigcontext;
@@ -744,10 +779,15 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
 
     int exits = 0;
     int ret;
-    if (simple)
-        ret = RunFunctionHandler(&exits, sigcontext, my_context->signals[sig], 1, sig);
-    else
-        ret = RunFunctionHandler(&exits, sigcontext, my_context->signals[sig], 3, sig, info2, sigcontext);
+    int dynarec = 0;
+    #ifdef DYNAREC
+    if(sig!=SIGSEGV && !(Locks&is_dyndump_locked))
+        dynarec = 1;
+    #endif
+    /*if (simple)
+        ret = RunFunctionHandler(&exits, dynarec, sigcontext, my_context->signals[sig], 1, sig);
+    else*/
+        ret = RunFunctionHandler(&exits, dynarec, sigcontext, my_context->signals[sig], 3, sig, info2, sigcontext);
     // restore old value from emu
     if(used_stack)  // release stack
         new_ss->ss_flags = 0;
@@ -763,9 +803,8 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
     #undef GO
 
     if(memcmp(sigcontext, &sigcontext_copy, sizeof(x64_ucontext_t))) {
-        emu_jmpbuf_t* ejb = GetJmpBuf();
-        if(ejb->jmpbuf_ok) {
-            #define GO(R)   ejb->emu->regs[_##R].q[0]=sigcontext->uc_mcontext.gregs[X64_R##R]
+        if(emu->jmpbuf) {
+            #define GO(R)   emu->regs[_##R].q[0]=sigcontext->uc_mcontext.gregs[X64_R##R]
             GO(AX);
             GO(CX);
             GO(DX);
@@ -775,7 +814,7 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
             GO(SP);
             GO(BX);
             #undef GO
-            #define GO(R)   ejb->emu->regs[_##R].q[0]=sigcontext->uc_mcontext.gregs[X64_##R]
+            #define GO(R)   emu->regs[_##R].q[0]=sigcontext->uc_mcontext.gregs[X64_##R]
             GO(R8);
             GO(R9);
             GO(R10);
@@ -785,14 +824,14 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
             GO(R14);
             GO(R15);
             #undef GO
-            ejb->emu->ip.q[0]=sigcontext->uc_mcontext.gregs[X64_RIP];
+            emu->ip.q[0]=sigcontext->uc_mcontext.gregs[X64_RIP];
             sigcontext->uc_mcontext.gregs[X64_RIP] = R_RIP;
             // flags
-            ejb->emu->eflags.x64=sigcontext->uc_mcontext.gregs[X64_EFL];
+            emu->eflags.x64=sigcontext->uc_mcontext.gregs[X64_EFL];
             // get segments
             uint16_t seg;
             seg = (sigcontext->uc_mcontext.gregs[X64_CSGSFS] >> 0)&0xffff;
-            #define GO(S) if(ejb->emu->segs[_##S]!=seg)  {ejb->emu->segs[_##S]=seg; ejb->emu->segs_serial[_##S] = 0;}
+            #define GO(S) if(emu->segs[_##S]!=seg)  {emu->segs[_##S]=seg; emu->segs_serial[_##S] = 0;}
             GO(CS);
             seg = (sigcontext->uc_mcontext.gregs[X64_CSGSFS] >> 16)&0xffff;
             GO(GS);
@@ -809,7 +848,7 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
             if(Locks & is_dyndump_locked)
                 CancelBlock64(1);
             #endif
-            siglongjmp(ejb->jmpbuf, 1);
+            siglongjmp(emu->jmpbuf, 1);
         }
         printf_log(LOG_INFO, "Warning, context has been changed in Sigactionhanlder%s\n", (sigcontext->uc_mcontext.gregs[X64_RIP]!=sigcontext_copy.uc_mcontext.gregs[X64_RIP])?" (EIP changed)":"");
     }
@@ -854,13 +893,23 @@ void my_sigactionhandler_oldcode(int32_t sig, int simple, siginfo_t* info, void
         exit(ret);
     }
     if(restorer)
-        RunFunctionHandler(&exits, NULL, restorer, 0);
+        RunFunctionHandler(&exits, 0, NULL, restorer, 0);
     relockMutex(Locks);
 }
 
 extern void* current_helper;
-#ifdef DYNAREC
+#define USE_SIGNAL_MUTEX
+#ifdef USE_SIGNAL_MUTEX
+#ifdef USE_CUSTOM_MUTEX
 static uint32_t mutex_dynarec_prot = 0;
+#else
+static pthread_mutex_t mutex_dynarec_prot = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
+#endif
+#define lock_signal()     mutex_lock(&mutex_dynarec_prot)
+#define unlock_signal()   mutex_unlock(&mutex_dynarec_prot)
+#else   // USE_SIGNAL_MUTEX
+#define lock_signal()     
+#define unlock_signal()   
 #endif
 
 extern int box64_quit;
@@ -876,6 +925,7 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
     ucontext_t *p = (ucontext_t *)ucntx;
     void* addr = (void*)info->si_addr;  // address that triggered the issue
     void* rsp = NULL;
+    x64emu_t* emu = thread_get_emu();
 #ifdef __aarch64__
     void * pc = (void*)p->uc_mcontext.pc;
     struct fpsimd_context *fpsimd = NULL;
@@ -915,14 +965,14 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
     #endif
 #ifdef DYNAREC
     if((Locks & is_dyndump_locked) && (sig==SIGSEGV) && current_helper) {
-        relockMutex(Locks);
         CancelBlock64(0);
         cancelFillBlock();  // Segfault inside a Fillblock, cancel it's creation...
+        relockMutex(Locks);
     }
     dynablock_t* db = NULL;
     int db_searched = 0;
     if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC)) {
-        mutex_lock(&mutex_dynarec_prot);
+        lock_signal();
         // check if SMC inside block
         db = FindDynablockFromNativeAddress(pc);
         db_searched = 1;
@@ -939,31 +989,33 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
         }
         // access error, unprotect the block (and mark them dirty)
         unprotectDB((uintptr_t)addr, 1, 1);    // unprotect 1 byte... But then, the whole page will be unprotected
-        if(db && ((addr>=db->x64_addr && addr<(db->x64_addr+db->x64_size)) || getNeedTest((uintptr_t)db->x64_addr))) {
+        int db_need_test = (db && !box64_dynarec_fastpage)?getNeedTest((uintptr_t)db->x64_addr):0;
+        if(db && ((addr>=db->x64_addr && addr<(db->x64_addr+db->x64_size)) || db_need_test)) {
+            emu = getEmuSignal(emu, p, db);
             // dynablock got auto-dirty! need to get out of it!!!
-            emu_jmpbuf_t* ejb = GetJmpBuf();
-            if(ejb->jmpbuf_ok) {
-                copyUCTXreg2Emu(ejb->emu, p, getX64Address(db, (uintptr_t)pc));
+            if(emu->jmpbuf) {
+                copyUCTXreg2Emu(emu, p, getX64Address(db, (uintptr_t)pc));
 #ifdef ARM64
-                if(fpsimd) {
-                    ejb->emu->xmm[0].u128 = fpsimd->vregs[0];
-                    ejb->emu->xmm[1].u128 = fpsimd->vregs[1];
-                    ejb->emu->xmm[2].u128 = fpsimd->vregs[2];
-                    ejb->emu->xmm[3].u128 = fpsimd->vregs[3];
-                }
+                //TODO: Need proper SIMD/x87 register traking!
+                /*if(fpsimd) {
+                    emu->xmm[0].u128 = fpsimd->vregs[0];
+                    emu->xmm[1].u128 = fpsimd->vregs[1];
+                    emu->xmm[2].u128 = fpsimd->vregs[2];
+                    emu->xmm[3].u128 = fpsimd->vregs[3];
+                }*/
 #elif defined(LA464)
                 /*if(fpsimd) {
-                    ejb->emu->xmm[0].u128 = fpsimd->vregs[0];
-                    ejb->emu->xmm[1].u128 = fpsimd->vregs[1];
-                    ejb->emu->xmm[2].u128 = fpsimd->vregs[2];
-                    ejb->emu->xmm[3].u128 = fpsimd->vregs[3];
+                    emu->xmm[0].u128 = fpsimd->vregs[0];
+                    emu->xmm[1].u128 = fpsimd->vregs[1];
+                    emu->xmm[2].u128 = fpsimd->vregs[2];
+                    emu->xmm[3].u128 = fpsimd->vregs[3];
                 }*/
 #elif defined(RV64)
                 /*if(fpsimd) {
-                    ejb->emu->xmm[0].u128 = fpsimd->vregs[0];
-                    ejb->emu->xmm[1].u128 = fpsimd->vregs[1];
-                    ejb->emu->xmm[2].u128 = fpsimd->vregs[2];
-                    ejb->emu->xmm[3].u128 = fpsimd->vregs[3];
+                    emu->xmm[0].u128 = fpsimd->vregs[0];
+                    emu->xmm[1].u128 = fpsimd->vregs[1];
+                    emu->xmm[2].u128 = fpsimd->vregs[2];
+                    emu->xmm[3].u128 = fpsimd->vregs[3];
                 }*/
 #else
 #error  Unsupported architecture
@@ -974,25 +1026,24 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
                     dynarec_log(LOG_INFO, "Dynablock unprotected, getting out!\n");
                 }
                 //relockMutex(Locks);
-                mutex_unlock(&mutex_dynarec_prot);
-                #ifdef DYNAREC
+                unlock_signal();
                 if(Locks & is_dyndump_locked)
                     CancelBlock64(1);
-                #endif
-                siglongjmp(ejb->jmpbuf, 2);
+                emu->test.clean = 0;
+                siglongjmp(emu->jmpbuf, 2);
             }
             dynarec_log(LOG_INFO, "Warning, Auto-SMC (%p for db %p/%p) detected, but jmpbuffer not ready!\n", (void*)addr, db, (void*)db->x64_addr);
         }
         // done
-        if((prot&PROT_WRITE) || (prot&PROT_DYNAREC)) {
-            mutex_unlock(&mutex_dynarec_prot);
+        if((prot&PROT_WRITE)/*|| (prot&PROT_DYNAREC)*/) {
+            unlock_signal();
             // if there is no write permission, don't return and continue to program signal handling
             relockMutex(Locks);
             return;
         }
-        mutex_unlock(&mutex_dynarec_prot);
+        unlock_signal();
     } else if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && ((prot&(PROT_READ|PROT_WRITE))==(PROT_READ|PROT_WRITE))) {
-        mutex_lock(&mutex_dynarec_prot);
+        lock_signal();
         db = FindDynablockFromNativeAddress(pc);
         db_searched = 1;
         if(db && db->x64_addr>= addr && (db->x64_addr+db->x64_size)<addr) {
@@ -1011,7 +1062,7 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
                 glitch_addr = addr;
                 glitch_prot = prot;
                 relockMutex(Locks);
-                mutex_unlock(&mutex_dynarec_prot);
+                unlock_signal();
                 return; // try again
             }
 dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for %p, db=%p, prot=0x%x\n", pc, addr, db, prot);
@@ -1033,14 +1084,14 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
                 refreshProtection((uintptr_t)addr);
                 relockMutex(Locks);
                 sched_yield();  // give time to the other process
-                mutex_unlock(&mutex_dynarec_prot);
+                unlock_signal();
                 return; // try again
             }
             glitch2_pc = NULL;
             glitch2_addr = NULL;
             glitch2_prot = 0;
         }
-        mutex_unlock(&mutex_dynarec_prot);
+        unlock_signal();
     } else if ((sig==SIGSEGV) && (addr) && (info->si_code == SEGV_ACCERR) && (prot&PROT_DYNAREC_R)) {
         // unprotect and continue to signal handler, because Write is not there on purpose
         unprotectDB((uintptr_t)addr, 1, 1);    // unprotect 1 byte... But then, the whole page will be unprotected
@@ -1081,7 +1132,6 @@ exit(-1);
         uintptr_t x64pc = (uintptr_t)-1;
         const char* x64name = NULL;
         const char* elfname = NULL;
-        x64emu_t* emu = thread_get_emu();
         // Adjust RIP for special case of NULL function run
         if(sig==SIGSEGV && R_RIP==0x1 && (uintptr_t)info->si_addr==0x0)
             R_RIP = 0x0;
@@ -1089,9 +1139,6 @@ exit(-1);
         rsp = (void*)R_RSP;
 #if defined(DYNAREC)
 #if defined(ARM64)
-        if(db && p->uc_mcontext.regs[0]>0x10000) {
-            emu = (x64emu_t*)p->uc_mcontext.regs[0];
-        }
         if(db) {
             x64pc = getX64Address(db, (uintptr_t)pc);
             rsp = (void*)p->uc_mcontext.regs[10+_SP];
@@ -1218,6 +1265,7 @@ exit(-1);
         }
         if(log_minimum<=box64_log) {
             static const char* reg_name[] = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", " R8", " R9","R10","R11", "R12","R13","R14","R15"};
+            static const char* seg_name[] = {"ES", "CS", "SS", "DS", "GS", "FS"};
             int shown_regs = 0;
 #ifdef DYNAREC
             uint32_t hash = 0;
@@ -1239,8 +1287,11 @@ exit(-1);
                     if(!(i%4)) printf_log(log_minimum, "\n");
                     printf_log(log_minimum, "%s:0x%016llx ", reg_name[i], p->uc_mcontext.regs[10+i]);
                 }
+                printf_log(log_minimum, "\n");
+                for (int i=0; i<6; ++i)
+                    printf_log(log_minimum, "%s:0x%04x ", seg_name[i], emu->segs[i]);
             }
-            if(rsp!=addr)
+            if(rsp!=addr && getProtection((uintptr_t)rsp-4*8) && getProtection((uintptr_t)rsp+4*8))
                 for (int i=-4; i<4; ++i) {
                     printf_log(log_minimum, "%sRSP%c0x%02x:0x%016lx", (i%4)?" ":"\n", i<0?'-':'+', abs(i)*8, *(uintptr_t*)(rsp+i*8));
                 }
@@ -1251,8 +1302,11 @@ exit(-1);
                     if(!(i%4)) printf_log(log_minimum, "\n");
                     printf_log(log_minimum, "%s:0x%016llx ", reg_name[i], p->uc_mcontext.__gregs[16+i]);
                 }
+                printf_log(log_minimum, "\n");
+                for (int i=0; i<6; ++i)
+                    printf_log(log_minimum, "%s:0x%04x ", seg_name[i], emu->segs[i]);
             }
-            if(rsp!=addr)
+            if(rsp!=addr && getProtection((uintptr_t)rsp-4*8) && getProtection((uintptr_t)rsp+4*8))
                 for (int i=-4; i<4; ++i) {
                     printf_log(log_minimum, "%sRSP%c0x%02x:0x%016lx", (i%4)?" ":"\n", i<0?'-':'+', abs(i)*8, *(uintptr_t*)(rsp+i*8));
                 }
@@ -1262,11 +1316,15 @@ exit(-1);
 #else
             printf_log(log_minimum, "%04d|%s @%p (%s) (x64pc=%p/%s:\"%s\", rsp=%p), for accessing %p (code=%d)", GetTID(), signame, pc, name, (void*)x64pc, elfname?elfname:"???", x64name?x64name:"???", rsp, addr, info->si_code);
 #endif
-            if(!shown_regs)
+            if(!shown_regs) {
                 for (int i=0; i<16; ++i) {
                     if(!(i%4)) printf_log(log_minimum, "\n");
                     printf_log(log_minimum, "%s:0x%016llx ", reg_name[i], emu->regs[i].q[0]);
                 }
+                printf_log(log_minimum, "\n");
+                for (int i=0; i<6; ++i)
+                    printf_log(log_minimum, "%s:0x%04x ", seg_name[i], emu->segs[i]);
+            }
             if(sig==SIGILL)
                 printf_log(log_minimum, " opcode=%02X %02X %02X %02X %02X %02X %02X %02X (%02X %02X %02X %02X %02X)\n", ((uint8_t*)pc)[0], ((uint8_t*)pc)[1], ((uint8_t*)pc)[2], ((uint8_t*)pc)[3], ((uint8_t*)pc)[4], ((uint8_t*)pc)[5], ((uint8_t*)pc)[6], ((uint8_t*)pc)[7], ((uint8_t*)x64pc)[0], ((uint8_t*)x64pc)[1], ((uint8_t*)x64pc)[2], ((uint8_t*)x64pc)[3], ((uint8_t*)x64pc)[4]);
             else if(sig==SIGBUS)
@@ -1360,6 +1418,7 @@ EXPORT sighandler_t my_sysv_signal(x64emu_t* emu, int signum, sighandler_t handl
 
 int EXPORT my_sigaction(x64emu_t* emu, int signum, const x64_sigaction_t *act, x64_sigaction_t *oldact)
 {
+    printf_log(LOG_DEBUG, "Sigaction(signum=%d, act=%p(f=%p, flags=0x%x), old=%p)\n", signum, act, act?act->_u._sa_handler:NULL, act?act->sa_flags:0, oldact);
     if(signum<0 || signum>=MAX_SIGNAL) {
         errno = EINVAL;
         return -1;
@@ -1372,6 +1431,7 @@ int EXPORT my_sigaction(x64emu_t* emu, int signum, const x64_sigaction_t *act, x
         return 0;
     struct sigaction newact = {0};
     struct sigaction old = {0};
+    uintptr_t old_handler = my_context->signals[signum];
     if(act) {
         newact.sa_mask = act->sa_mask;
         newact.sa_flags = act->sa_flags&~0x04000000;  // No sa_restorer...
@@ -1404,6 +1464,8 @@ int EXPORT my_sigaction(x64emu_t* emu, int signum, const x64_sigaction_t *act, x
             oldact->_u._sa_sigaction = old.sa_sigaction; //TODO should wrap...
         else
             oldact->_u._sa_handler = old.sa_handler;  //TODO should wrap...
+        if((uintptr_t)oldact->_u._sa_sigaction == (uintptr_t)my_sigactionhandler && old_handler)
+            oldact->_u._sa_sigaction = (void*)old_handler;
         oldact->sa_restorer = NULL; // no handling for now...
     }
     return ret;
@@ -1471,7 +1533,7 @@ int EXPORT my_syscall_rt_sigaction(x64emu_t* emu, int signum, const x64_sigactio
         struct sigaction newact = {0};
         struct sigaction old = {0};
         if(act) {
-            printf_log(LOG_DEBUG, " New action flags=0x%x mask=0x%lx\n", act->sa_flags, *(uint64_t*)&act->sa_mask);
+            printf_log(LOG_DEBUG, " New action for signal #%d flags=0x%x mask=0x%lx\n", signum, act->sa_flags, *(uint64_t*)&act->sa_mask);
             newact.sa_mask = act->sa_mask;
             newact.sa_flags = act->sa_flags&~0x04000000;  // No sa_restorer...
             if(act->sa_flags&0x04) {
@@ -1648,7 +1710,7 @@ EXPORT int my_makecontext(x64emu_t* emu, void* ucp, void* fnc, int32_t argc, int
     }
     // push the return value
     --rsp;
-    *rsp = (uintptr_t)GetExit();
+    *rsp = my_context->exit_bridge;
     u->uc_mcontext.gregs[X64_RSP] = (uintptr_t)rsp;
     
     return 0;
@@ -1663,10 +1725,15 @@ EXPORT int my_swapcontext(x64emu_t* emu, void* ucp1, void* ucp2)
     my_setcontext(emu, ucp2);
     return 0;
 }
-#ifdef DYNAREC
+#ifdef USE_SIGNAL_MUTEX
 static void atfork_child_dynarec_prot(void)
 {
+    #ifdef USE_CUSTOM_MUTEX
     native_lock_store(&mutex_dynarec_prot, 0);
+    #else
+    pthread_mutex_t tmp = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; 
+    memcpy(&mutex_dynarec_prot, &tmp, sizeof(mutex_dynarec_prot));
+    #endif
 }
 #endif
 void init_signal_helper(box64context_t* context)
@@ -1690,7 +1757,7 @@ void init_signal_helper(box64context_t* context)
     sigaction(SIGABRT, &action, NULL);
 
     pthread_once(&sigstack_key_once, sigstack_key_alloc);
-#ifdef DYNAREC
+#ifdef USE_SIGNAL_MUTEX
     atfork_child_dynarec_prot();
     pthread_atfork(NULL, NULL, atfork_child_dynarec_prot);
 #endif
diff --git a/src/libtools/threads.c b/src/libtools/threads.c
index 812e1943..90c665e2 100644
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -14,7 +14,6 @@
 #include "box64context.h"
 #include "threads.h"
 #include "emu/x64emu_private.h"
-#include "tools/bridge_private.h"
 #include "x64run.h"
 #include "x64emu.h"
 #include "box64stack.h"
@@ -215,7 +214,7 @@ x64emu_t* thread_get_emu()
 		}
 		void* stack = my_mmap(NULL, NULL, stacksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_GROWSDOWN, -1, 0);
 		x64emu_t *emu = NewX64Emu(my_context, 0, (uintptr_t)stack, stacksize, 1);
-		SetupX64Emu(emu);
+		SetupX64Emu(emu, NULL);
 		thread_set_emu(emu);
 		return emu;
 	}
@@ -490,7 +489,7 @@ EXPORT int my_pthread_create(x64emu_t *emu, void* t, void* attr, void* start_rou
 
 	emuthread_t *et = (emuthread_t*)box_calloc(1, sizeof(emuthread_t));
     x64emu_t *emuthread = NewX64Emu(my_context, (uintptr_t)start_routine, (uintptr_t)stack, stacksize, own);
-	SetupX64Emu(emuthread);
+	SetupX64Emu(emuthread, emu);
 	//SetFS(emuthread, GetFS(emu));
 	et->emu = emuthread;
 	et->fnc = (uintptr_t)start_routine;
@@ -498,7 +497,7 @@ EXPORT int my_pthread_create(x64emu_t *emu, void* t, void* attr, void* start_rou
 	#ifdef DYNAREC
 	if(box64_dynarec) {
 		// pre-creation of the JIT code for the entry point of the thread
-		DBGetBlock(emu, (uintptr_t)start_routine, 1);
+		DBGetBlock(emu, (uintptr_t)start_routine, 1, 0);	// function wrapping are 64bits only on box64
 	}
 	#endif
 	// create thread
@@ -512,14 +511,14 @@ void* my_prepare_thread(x64emu_t *emu, void* f, void* arg, int ssize, void** pet
 	void* stack = my_mmap(NULL, NULL, stacksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_GROWSDOWN, -1, 0);
 	emuthread_t *et = (emuthread_t*)box_calloc(1, sizeof(emuthread_t));
     x64emu_t *emuthread = NewX64Emu(emu->context, (uintptr_t)f, (uintptr_t)stack, stacksize, 1);
-	SetupX64Emu(emuthread);
+	SetupX64Emu(emuthread, emu					);
 	//SetFS(emuthread, GetFS(emu));
 	et->emu = emuthread;
 	et->fnc = (uintptr_t)f;
 	et->arg = arg;
 	#ifdef DYNAREC
 	// pre-creation of the JIT code for the entry point of the thread
-	DBGetBlock(emu, (uintptr_t)f, 1);
+	DBGetBlock(emu, (uintptr_t)f, 1, 0);	// function wrapping are 64bits only on box64
 	#endif
 	*pet =  et;
 	return pthread_routine;
@@ -619,7 +618,7 @@ GO(29)
 static uintptr_t my_key_destructor_fct_##A = 0;  \
 static void my_key_destructor_##A(void* a)    			\
 {                                       		\
-    RunFunction(my_context, my_key_destructor_fct_##A, 1, a);\
+    RunFunction(my_key_destructor_fct_##A, 1, a);\
 }
 SUPER()
 #undef GO
@@ -641,7 +640,7 @@ static void* findkey_destructorFct(void* fct)
 static uintptr_t my_cleanup_routine_fct_##A = 0;  \
 static void my_cleanup_routine_##A(void* a)    			\
 {                                       		\
-    RunFunction(my_context, my_cleanup_routine_fct_##A, 1, a);\
+    RunFunction(my_cleanup_routine_fct_##A, 1, a);\
 }
 SUPER()
 #undef GO
@@ -1067,28 +1066,6 @@ EXPORT int my_pthread_barrier_init(x64emu_t* emu, pthread_barrier_t* bar, my_bar
 
 #endif
 
-static void emujmpbuf_destroy(void* p)
-{
-	emu_jmpbuf_t *ej = (emu_jmpbuf_t*)p;
-	if(ej) {
-		box_free(ej->jmpbuf);
-		box_free(ej);
-	}
-}
-
-static pthread_key_t jmpbuf_key;
-
-emu_jmpbuf_t* GetJmpBuf()
-{
-	emu_jmpbuf_t *ejb = (emu_jmpbuf_t*)pthread_getspecific(jmpbuf_key);
-	if(!ejb) {
-		ejb = (emu_jmpbuf_t*)box_calloc(1, sizeof(emu_jmpbuf_t));
-		ejb->jmpbuf = box_calloc(1, sizeof(struct __jmp_buf_tag));
-		pthread_setspecific(jmpbuf_key, ejb);
-	}
-	return ejb;
-}
-
 void init_pthread_helper()
 {
 	real_pthread_cleanup_push_defer = (vFppp_t)dlsym(NULL, "_pthread_cleanup_push_defer");
@@ -1109,8 +1086,6 @@ void init_pthread_helper()
 	}
 
 	InitCancelThread();
-	pthread_key_create(&jmpbuf_key, emujmpbuf_destroy);
-	pthread_setspecific(jmpbuf_key, NULL);
 	pthread_key_create(&thread_key, emuthread_destroy);
 	pthread_setspecific(thread_key, NULL);
 }
@@ -1119,11 +1094,6 @@ void fini_pthread_helper(box64context_t* context)
 {
 	FreeCancelThread(context);
 	CleanStackSize(context);
-	emu_jmpbuf_t *ejb = (emu_jmpbuf_t*)pthread_getspecific(jmpbuf_key);
-	if(ejb) {
-		pthread_setspecific(jmpbuf_key, NULL);
-		emujmpbuf_destroy(ejb);
-	}
 	emuthread_t *et = (emuthread_t*)pthread_getspecific(thread_key);
 	if(et) {
 		pthread_setspecific(thread_key, NULL);
@@ -1131,7 +1101,6 @@ void fini_pthread_helper(box64context_t* context)
 	}
 }
 
-#ifndef DYNAREC
 int checkUnlockMutex(void* m)
 {
 	pthread_mutex_t* mutex = (pthread_mutex_t*)m;
@@ -1141,4 +1110,3 @@ int checkUnlockMutex(void* m)
 	}
 	return 0;
 }
-#endif
diff --git a/src/main.c b/src/main.c
index f4b7a239..be0cca39 100644
--- a/src/main.c
+++ b/src/main.c
@@ -35,6 +35,7 @@
 #include "x64run.h"
 #include "symbols.h"
 #include "rcfile.h"
+#include "emu/x64run_private.h"
 
 box64context_t *my_context = NULL;
 int box64_quit = 0;
@@ -61,8 +62,10 @@ int box64_dynarec_callret = 0;
 int box64_dynarec_hotpage = 0;
 int box64_dynarec_fastpage = 0;
 int box64_dynarec_bleeding_edge = 1;
+int box64_dynarec_jvm = 1;
 int box64_dynarec_wait = 1;
 int box64_dynarec_test = 0;
+int box64_dynarec_missing = 0;
 uintptr_t box64_nodynarec_start = 0;
 uintptr_t box64_nodynarec_end = 0;
 #ifdef ARM64
@@ -71,6 +74,11 @@ int arm64_aes = 0;
 int arm64_pmull = 0;
 int arm64_crc32 = 0;
 int arm64_atomics = 0;
+#elif defined(RV64)
+int rv64_zba = 0;
+int rv64_zbb = 0;
+int rv64_zbc = 0;
+int rv64_zbs = 0;
 #endif
 #else   //DYNAREC
 int box64_dynarec = 0;
@@ -114,7 +122,7 @@ int box64_isglibc234 = 0;
 char* box64_libGL = NULL;
 uintptr_t fmod_smc_start = 0;
 uintptr_t fmod_smc_end = 0;
-uint32_t default_gs = 0xa<<3;
+uint32_t default_gs = 0x53;
 int jit_gdb = 0;
 int box64_tcmalloc_minimal = 0;
 
@@ -355,7 +363,15 @@ HWCAP2_ECV
     printf_log(LOG_INFO, "Dynarec for LoongArch");
     printf_log(LOG_INFO, " PageSize:%zd ", box64_pagesize);
 #elif defined(RV64)
-    printf_log(LOG_INFO, "Dynarec for RISC-V");
+    void RV64_Detect_Function();
+    if(!getenv("BOX64_DYNAREC_RV64NOEXT"))
+        RV64_Detect_Function();
+    printf_log(LOG_INFO, "Dynarec for RISC-V ");
+    printf_log(LOG_INFO, "With extension: I M A F D C");
+    if(rv64_zba) printf_log(LOG_INFO, " Zba");
+    if(rv64_zbb) printf_log(LOG_INFO, " Zbb");
+    if(rv64_zbc) printf_log(LOG_INFO, " Zbc");
+    if(rv64_zbs) printf_log(LOG_INFO, " Zbs");
     printf_log(LOG_INFO, " PageSize:%zd ", box64_pagesize);
 #else
 #error Unsupported architecture
@@ -378,7 +394,7 @@ void LoadLogEnv()
     }
     // grab BOX64_TRACE_FILE envvar, and change %pid to actual pid is present in the name
     openFTrace(NULL);
-    box64_log = ftrace_name?LOG_INFO:(isatty(fileno(ftrace))?LOG_INFO:LOG_NONE); //default LOG value different if stdout is redirected or not
+    box64_log = ftrace_name?LOG_INFO:(isatty(fileno(stdout))?LOG_INFO:LOG_NONE); //default LOG value different if stdout is redirected or not
     p = getenv("BOX64_LOG");
     if(p) {
         if(strlen(p)==1) {
@@ -561,6 +577,15 @@ void LoadLogEnv()
         if(!box64_dynarec_bleeding_edge)
             printf_log(LOG_INFO, "Dynarec will not detect MonoBleedingEdge\n");
     }
+    p = getenv("BOX64_DYNAREC_JVM");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_dynarec_jvm = p[0]-'0';
+        }
+        if(!box64_dynarec_jvm)
+            printf_log(LOG_INFO, "Dynarec will not detect libjvm\n");
+    }
     p = getenv("BOX64_DYNAREC_WAIT");
     if(p) {
         if(strlen(p)==1) {
@@ -591,6 +616,15 @@ void LoadLogEnv()
         if(box64_dynarec_fastpage)
             printf_log(LOG_INFO, "Dynarec will use Fast HotPage\n");
     }
+    p = getenv("BOX64_DYNAREC_MISSING");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_dynarec_missing = p[0]-'0';
+        }
+        if(box64_dynarec_missing)
+            printf_log(LOG_INFO, "Dynarec will print missing opcodes\n");
+    }
     p = getenv("BOX64_NODYNAREC");
     if(p) {
         if (strchr(p,'-')) {
@@ -883,7 +917,7 @@ int GatherEnv(char*** dest, char** env, char* prog)
         (*dest)[idx++] = box_strdup("BOX64_PATH=.:bin");
     }
     if(!ld_path) {
-        (*dest)[idx++] = box_strdup("BOX64_LD_LIBRARY_PATH=.:lib:lib64");
+        (*dest)[idx++] = box_strdup("BOX64_LD_LIBRARY_PATH=.:lib:lib64:x86_64:bin64:libs64");
     }
     // add "_=prog" at the end...
     if(prog) {
@@ -1011,6 +1045,7 @@ void LoadEnvVars(box64context_t *context)
     AddPath("libcrypto.so.1", &context->box64_emulated_libs, 0);
     AddPath("libcrypto.so.1.0.0", &context->box64_emulated_libs, 0);
     AddPath("libunwind.so.8", &context->box64_emulated_libs, 0);
+    AddPath("libpng12.so.0", &context->box64_emulated_libs, 0);
 
     if(getenv("BOX64_SSE_FLUSHTO0")) {
         if (strcmp(getenv("BOX64_SSE_FLUSHTO0"), "1")==0) {
@@ -1157,12 +1192,14 @@ void setupTrace()
     }
 #endif
 }
+void endMallocHook();
 
 void endBox64()
 {
     if(!my_context || box64_quit)
         return;
-
+    
+    endMallocHook();
     x64emu_t* emu = thread_get_emu();
     // atexit first
     printf_log(LOG_DEBUG, "Calling atexit registered functions (exiting box64)\n");
@@ -1171,10 +1208,6 @@ void endBox64()
     box64_quit = 1;
     printf_log(LOG_DEBUG, "Calling fini for all loaded elfs and unload native libs\n");
     RunElfFini(my_context->elfs[0], emu);
-    #ifdef DYNAREC
-    // disable dynarec now
-    box64_dynarec = 0;
-    #endif
     FreeLibrarian(&my_context->local_maplib, emu);    // unload all libs
     FreeLibrarian(&my_context->maplib, emu);    // unload all libs
     #if 0
@@ -1218,6 +1251,10 @@ void endBox64()
     #endif
     // all done, free context
     FreeBox64Context(&my_context);
+    #ifdef DYNAREC
+    // disable dynarec now
+    box64_dynarec = 0;
+    #endif
     if(box64_libGL) {
         box_free(box64_libGL);
         box64_libGL = NULL;
@@ -1343,8 +1380,13 @@ int main(int argc, const char **argv, char **env) {
             wine_prereserve(prereserve);
         // special case for winedbg, doesn't work anyway
         if(argv[nextarg+1] && strstr(argv[nextarg+1], "winedbg")==argv[nextarg+1]) {
-            printf_log(LOG_NONE, "winedbg detected, not launching it!\n");
-            exit(0);    // exiting, it doesn't work anyway
+            if(getenv("BOX64_WINEDBG")) {
+                box64_nobanner = 1;
+                box64_log = 0;
+            } else {
+                printf_log(LOG_NONE, "winedbg detected, not launching it!\n");
+                exit(0);    // exiting, it doesn't work anyway
+            }
         }
         box64_wine = 1;
     } else 
@@ -1669,7 +1711,7 @@ int main(int argc, const char **argv, char **env) {
     x64emu_t *emu = NewX64Emu(my_context, my_context->ep, (uintptr_t)my_context->stack, my_context->stacksz, 0);
     // stack setup is much more complicated then just that!
     SetupInitialStack(emu); // starting here, the argv[] don't need free anymore
-    SetupX64Emu(emu);
+    SetupX64Emu(emu, NULL);
     SetRSI(emu, my_context->argc);
     SetRDX(emu, (uint64_t)my_context->argv);
     SetRCX(emu, (uint64_t)my_context->envv);
@@ -1705,7 +1747,7 @@ int main(int argc, const char **argv, char **env) {
         for(int i=0; i<ld_preload.size; ++i) {
             needed_libs_t* tmp = new_neededlib(1);
             tmp->names[0] = ld_preload.paths[i];
-            if(AddNeededLib(my_context->maplib, 0, 0, tmp, my_context, emu)) {
+            if(AddNeededLib(my_context->maplib, 0, 0, tmp, elf_header, my_context, emu)) {
                 printf_log(LOG_INFO, "Warning, cannot pre-load of %s\n", tmp->names[0]);
                 RemoveNeededLib(my_context->maplib, 0, tmp, my_context, emu);
             } else {
@@ -1751,7 +1793,7 @@ int main(int argc, const char **argv, char **env) {
     // Stack is ready, with stacked: NULL env NULL argv argc
     SetRIP(emu, my_context->ep);
     ResetFlags(emu);
-    PushExit(emu);  // push to pop it just after
+    Push64(emu, my_context->exit_bridge);  // push to pop it just after
     SetRDX(emu, Pop64(emu));    // RDX is exit function
     Run(emu, 0);
     // Get EAX
diff --git a/src/mallochook.c b/src/mallochook.c
index 5b503c8a..885e38c4 100644
--- a/src/mallochook.c
+++ b/src/mallochook.c
@@ -13,6 +13,7 @@
 #include "librarian.h"
 #include "elfs/elfloader_private.h"
 #include "custommem.h"
+#include "symbols.h"
 
 /*
     This file here is for handling overriding of malloc functions
@@ -42,7 +43,6 @@
 */
 
 #include "bridge.h"
-#include "tools/bridge_private.h"
 #include "wrapper.h"
 
 #define SUPER()                 \
@@ -146,6 +146,9 @@ uint32_t getProtection(uintptr_t addr);
 // mmap history
 static int malloc_hack_2 = 0;
 
+#define ALLOC 0
+#define FREE 1
+
 char* box_strdup(const char* s) {
     char* ret = box_calloc(1, strlen(s)+1);
     memcpy(ret, s, strlen(s));
@@ -180,18 +183,29 @@ static int ispot(size_t l) {
     return pot(l)==l;
 }
 
+#define GO(A, B) static uintptr_t real_##A = 0;
+#define GO2(A, B) static uintptr_t real_##A = 0;
+SUPER()
+#undef GO2
+#undef GO
+
 // redefining all libc memory allocation routines
 EXPORT void* malloc(size_t l)
 {
+    if(malloc_hack_2 && ALLOC && real_malloc) {
+        return (void*)RunFunctionFmt(real_malloc, "L", l);
+    }
     return box_calloc(1, l);
 }
 
 EXPORT void free(void* p)
 {
-    if(malloc_hack_2 && p) {
+    if(malloc_hack_2 && FREE && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -200,19 +214,30 @@ EXPORT void free(void* p)
 
 EXPORT void* calloc(size_t n, size_t s)
 {
+    if(malloc_hack_2 && ALLOC && real_calloc) {
+        return (void*)RunFunctionFmt(real_calloc, "LL", n,s);
+    }
     return box_calloc(n, s);
 }
 
 EXPORT void* realloc(void* p, size_t s)
 {
     if(malloc_hack_2)
-        if(getMmapped((uintptr_t)p)) {
-            // found! Will realloc using regular malloc then copy from old address as much as possible, but need to check size first
-            void* ret = box_malloc(s);
-            printf_log(LOG_DEBUG, "Malloc_Hack_2: hacking realloc(%p, %zu)", p, s);
-            while(s && !(getProtection((uintptr_t)p+s)&PROT_READ)) {if(s>box64_pagesize) s-=box64_pagesize; else s=0;}
-            memcpy(ret, p, s);
-            printf_log(LOG_DEBUG, " -> %p (copied %zu from old)\n", ret, s);
+        if(getMmapped((uintptr_t)p) || (!p && ALLOC && real_realloc)) {
+            void* ret = p;
+            if(real_realloc) {
+                ret = (void*)RunFunctionFmt(real_realloc, "pL", p, s);
+            } else {
+                // found! Will realloc using regular malloc then copy from old address as much as possible, but need to check size first
+                ret = box_malloc(s);
+                printf_log(LOG_DEBUG, "Malloc_Hack_2: hacking realloc(%p, %zu)", p, s);
+                while(s && !(getProtection((uintptr_t)p+s)&PROT_READ)) {if(s>box64_pagesize) s-=box64_pagesize; else s=0;}
+                memcpy(ret, p, s);
+                printf_log(LOG_DEBUG, " -> %p (copied %zu from old)\n", ret, s);
+                // Mmaped, free with original function
+                if(real_free)
+                    RunFunctionFmt(real_free, "p", p);
+            }
             return ret;
         }
     return box_realloc(p, s);
@@ -220,16 +245,25 @@ EXPORT void* realloc(void* p, size_t s)
 
 EXPORT void* aligned_alloc(size_t align, size_t size)
 {
+    if(malloc_hack_2 && ALLOC && real_aligned_alloc) {
+        return (void*)RunFunctionFmt(real_aligned_alloc, "LL", align, size);
+    }
     return box_memalign(align, size);
 }
 
 EXPORT void* memalign(size_t align, size_t size)
 {
+    if(malloc_hack_2 && ALLOC && real_aligned_alloc) {
+        return (void*)RunFunctionFmt(real_aligned_alloc, "LL", align, size);
+    }
     return box_memalign(align, size);
 }
 
 EXPORT int posix_memalign(void** p, size_t align, size_t size)
 {
+    if(malloc_hack_2 && ALLOC && real_posix_memalign) {
+        return RunFunctionFmt(real_posix_memalign, "pLL", p, align, size);
+    }
     if(align%sizeof(void*) || pot(align)!=align)
         return EINVAL;
     void* ret = box_memalign(align, size);
@@ -241,20 +275,28 @@ EXPORT int posix_memalign(void** p, size_t align, size_t size)
 
 EXPORT void* valloc(size_t size)
 {
+    if(malloc_hack_2 && ALLOC && real_valloc) {
+        return (void*)RunFunctionFmt(real_valloc, "L", size);
+    }
     return box_memalign(box64_pagesize, size);
 }
 
 EXPORT void* pvalloc(size_t size)
 {
+    if(malloc_hack_2 && ALLOC && real_pvalloc) {
+        return (void*)RunFunctionFmt(real_pvalloc, "L", size);
+    }
     return box_memalign(box64_pagesize, (size+box64_pagesize-1)&~(box64_pagesize-1));
 }
 
 EXPORT void cfree(void* p)
 {
-    if(malloc_hack_2 && p) {
+    if(malloc_hack_2 && FREE && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -263,26 +305,42 @@ EXPORT void cfree(void* p)
 
 EXPORT size_t malloc_usable_size(void* p)
 {
+    if(malloc_hack_2 && real_malloc_usable_size) {
+        if(getMmapped((uintptr_t)p))
+            return RunFunctionFmt(real_malloc_usable_size, "p", p);
+    }
     return box_malloc_usable_size(p);
 }
 
 EXPORT void* my__Znwm(size_t sz)   //operator new(size_t)
 {
+    if(malloc_hack_2 && real__Znwm) {
+        return (void*)RunFunctionFmt(real__Znwm, "L", sz);
+    }
     return box_malloc(sz);
 }
 
 EXPORT void* my__ZnwmRKSt9nothrow_t(size_t sz, void* p)   //operator new(size_t, std::nothrow_t const&)
 {
+    if(malloc_hack_2 && real__ZnwmRKSt9nothrow_t) {
+        return (void*)RunFunctionFmt(real__ZnwmRKSt9nothrow_t, "Lp", sz, p);
+    }
     return box_malloc(sz);
 }
 
 EXPORT void* my__Znam(size_t sz)   //operator new[](size_t)
 {
+    if(malloc_hack_2 && real__Znam) {
+        return (void*)RunFunctionFmt(real__Znam, "L", sz);
+    }
     return box_malloc(sz);
 }
 
 EXPORT void* my__ZnamRKSt9nothrow_t(size_t sz, void* p)   //operator new[](size_t, std::nothrow_t const&)
 {
+    if(malloc_hack_2 && real__ZnamRKSt9nothrow_t) {
+        return (void*)RunFunctionFmt(real__ZnamRKSt9nothrow_t, "Lp", sz, p);
+    }
     return box_malloc(sz);
 }
 
@@ -292,7 +350,9 @@ EXPORT void my__ZdaPv(void* p)   //operator delete[](void*)
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdaPv)
+                RunFunctionFmt(real__ZdaPv, "p", p);
             return;
         }
     }
@@ -304,7 +364,9 @@ EXPORT void my__ZdaPvm(void* p, size_t sz)   //operator delete[](void*, size_t)
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdaPvm)
+                RunFunctionFmt(real__ZdaPvm, "pL", p, sz);
             return;
         }
     }
@@ -316,7 +378,9 @@ EXPORT void my__ZdaPvmSt11align_val_t(void* p, size_t sz, size_t align)   //oper
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdaPvmSt11align_val_t)
+                RunFunctionFmt(real__ZdaPvmSt11align_val_t, "pLL", p, sz, align);
             return;
         }
     }
@@ -328,7 +392,9 @@ EXPORT void my__ZdlPv(void* p)   //operator delete(void*)
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdlPv)
+                RunFunctionFmt(real__ZdlPv, "p", p);
             return;
         }
     }
@@ -340,7 +406,9 @@ EXPORT void my__ZdlPvm(void* p, size_t sz)   //operator delete(void*, size_t)
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdlPvm)
+                RunFunctionFmt(real__ZdlPvm, "pL", p, sz);
             return;
         }
     }
@@ -349,21 +417,33 @@ EXPORT void my__ZdlPvm(void* p, size_t sz)   //operator delete(void*, size_t)
 
 EXPORT void* my__ZnwmSt11align_val_t(size_t sz, size_t align)  //// operator new(unsigned long, std::align_val_t)
 {
+    if(malloc_hack_2 && real__ZnwmSt11align_val_t) {
+        return (void*)RunFunctionFmt(real__ZnwmSt11align_val_t, "LL", sz, align);
+    }
     return box_memalign(align, sz);
 }
 
 EXPORT void* my__ZnwmSt11align_val_tRKSt9nothrow_t(size_t sz, size_t align, void* p)  //// operator new(unsigned long, std::align_val_t, std::nothrow_t const&)
 {
+    if(malloc_hack_2 && real__ZnwmSt11align_val_tRKSt9nothrow_t) {
+        return (void*)RunFunctionFmt(real__ZnwmSt11align_val_tRKSt9nothrow_t, "LLp", sz, align, p);
+    }
     return box_memalign(align, sz);
 }
 
 EXPORT void* my__ZnamSt11align_val_t(size_t sz, size_t align)  //// operator new[](unsigned long, std::align_val_t)
 {
+    if(malloc_hack_2 && real__ZnamSt11align_val_t) {
+        return (void*)RunFunctionFmt(real__ZnamSt11align_val_t, "LL", sz, align);
+    }
     return box_memalign(align, sz);
 }
 
 EXPORT void* my__ZnamSt11align_val_tRKSt9nothrow_t(size_t sz, size_t align, void* p)  //// operator new[](unsigned long, std::align_val_t, std::nothrow_t const&)
 {
+    if(malloc_hack_2 && real__ZnamSt11align_val_tRKSt9nothrow_t) {
+        return (void*)RunFunctionFmt(real__ZnamSt11align_val_tRKSt9nothrow_t, "LLp", sz, align, p);
+    }
     return box_memalign(align, sz);
 }
 
@@ -372,7 +452,9 @@ EXPORT void my__ZdlPvRKSt9nothrow_t(void* p, void* n)   //operator delete(void*,
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdlPvRKSt9nothrow_t)
+                RunFunctionFmt(real__ZdlPvRKSt9nothrow_t, "pp", p, n);
             return;
         }
     }
@@ -384,7 +466,9 @@ EXPORT void my__ZdaPvSt11align_val_tRKSt9nothrow_t(void* p, size_t align, void*
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -396,7 +480,9 @@ EXPORT void my__ZdlPvmSt11align_val_t(void* p, size_t sz, size_t align)   //oper
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -408,7 +494,9 @@ EXPORT void my__ZdaPvRKSt9nothrow_t(void* p, void* n)   //operator delete[](void
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -420,7 +508,9 @@ EXPORT void my__ZdaPvSt11align_val_t(void* p, size_t align)   //operator delete[
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -432,7 +522,9 @@ EXPORT void my__ZdlPvSt11align_val_t(void* p, size_t align)   //operator delete(
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real_free)
+                RunFunctionFmt(real_free, "p", p);
             return;
         }
     }
@@ -444,7 +536,9 @@ EXPORT void my__ZdlPvSt11align_val_tRKSt9nothrow_t(void* p, size_t align, void*
     if(malloc_hack_2 && p) {
         if(getMmapped((uintptr_t)p)) {
             printf_log(LOG_DEBUG, "%04d|Malloc_Hack_2: not freeing %p\n", GetTID(), p);
-            // Mmaped, do not free...
+            // Mmaped, free with original function
+            if(real__ZdlPvSt11align_val_tRKSt9nothrow_t)
+                RunFunctionFmt(real__ZdlPvSt11align_val_tRKSt9nothrow_t, "pLp", p, align, n);
             return;
         }
     }
@@ -674,34 +768,15 @@ typedef struct simple_jmp_s {
 } simple_jmp_t;
 #pragma pack(pop)
 
-static void addRelocJmp(void* offs, void* where, size_t size, const char* name)
+static void addRelocJmp(void* offs, void* where, size_t size, const char* name, elfheader_t* h, uintptr_t *real)
 {
-    reloc_jmp_t r_jmp = {0};
-    simple_jmp_t s_jmp = {0};
-    size_t sz = 0;
-    intptr_t off64 = (intptr_t)where - ((intptr_t)offs+5);
-    void* p = NULL;
-    int32_t off32 = (int32_t)off64;
-    if(off32 == off64) {
-        s_jmp._e9 = 0xe9;
-        s_jmp.delta = (uint32_t)off32;
-        p = &s_jmp;
-        sz = sizeof(s_jmp);
-    } else {
-        r_jmp._ff = 0xff;
-        r_jmp._25 = 0x25;
-        r_jmp.addr = where;
-        p = &r_jmp;
-        sz = sizeof(r_jmp);
-    }
-    if(size>=sz)
-        memcpy(offs, p, sz);
-    else {
-        printf_log(LOG_INFO, "Warning, cannot redirect %s, too small %zu vs %zu\n", name, size, sz);
+    if(real && !*real) {
+        *real = (uintptr_t)offs;
     }
+    addAlternate(offs, where);
 }
 
-void checkHookedSymbols(lib_t *maplib, elfheader_t* h)
+void checkHookedSymbols(elfheader_t* h)
 {
     int hooked = 0;
     if(box64_malloc_hack==1)
@@ -716,7 +791,7 @@ void checkHookedSymbols(lib_t *maplib, elfheader_t* h)
             uintptr_t offs = h->DynSym[i].st_value + h->delta;
             size_t sz = h->DynSym[i].st_size;
             if(bind!=STB_LOCAL && bind!=STB_WEAK && sz>=sizeof(reloc_jmp_t)) {
-                #define GO(A, B) if(!strcmp(symname, #A)) ++hooked; else if(!strcmp(symname, "scalable_" #A)) ++hooked; else if(!strcmp(symname, "__TBB_internal_" #A)) ++hooked;
+                #define GO(A, B) if(!strcmp(symname, #A)) ++hooked; else if(!strcmp(symname, "__libc_" #A)) ++hooked;
                 #define GO2(A, B)
                 SUPER()
                 #undef GO
@@ -726,8 +801,6 @@ void checkHookedSymbols(lib_t *maplib, elfheader_t* h)
     }
     if(hooked<2)
         return; // only redirect on lib that hooked / redefined the operators
-    if(box64_malloc_hack==2)
-        malloc_hack_2 = 1;
     printf_log(LOG_INFO, "Redirecting overridden malloc%s function for %s\n", malloc_hack_2?" with hack":"", ElfName(h));
     for (size_t i=0; i<h->numDynSym; ++i) {
         const char * symname = h->DynStr+h->DynSym[i].st_name;
@@ -739,29 +812,30 @@ void checkHookedSymbols(lib_t *maplib, elfheader_t* h)
             uintptr_t offs = h->DynSym[i].st_value + h->delta;
             size_t sz = h->DynSym[i].st_size;
             if(bind!=STB_LOCAL && bind!=STB_WEAK) {
-                #define GO(A, B) if(!strcmp(symname, "__libc_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A);}
+                #define GO(A, B) if(!strcmp(symname, "__libc_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, "__libc_" #A, h, NULL);}
                 #define GO2(A, B)
                 SUPER()
                 #undef GO
                 #undef GO2
-                #define GO(A, B) if(!strcmp(symname, "scalable_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A);}
-                #define GO2(A, B)
-                SUPER()
-                #undef GO
-                #undef GO2
-                #define GO(A, B) if(!strcmp(symname, "__TBB_internal_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A);}
-                #define GO2(A, B)
-                SUPER()
-                #undef GO
-                #undef GO2
-                #define GO(A, B) if(!strcmp(symname, #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A);}
-                #define GO2(A, B) if(!strcmp(symname, #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, my_##A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A);}
+                #define GO(A, B) if(!strcmp(symname, #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, #A, h, &real_##A);}
+                #define GO2(A, B) if(!strcmp(symname, #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, my_##A, 0, "my_" #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, "my_" #A, h, &real_##A);}
                 SUPER()
                 #undef GO
                 #undef GO2
             }
         }
     }
+    if(box64_malloc_hack==2)
+        h->malloc_hook_2 = 1;
+}
+
+void startMallocHook()
+{
+    malloc_hack_2 = 1;
+}
+void endMallocHook()
+{
+    malloc_hack_2 = 0;
 }
 
 EXPORT int my___TBB_internal_find_original_malloc(int n, char* names[], void* ptr[])
diff --git a/src/rv64detect.c b/src/rv64detect.c
new file mode 100644
index 00000000..9976d1d7
--- /dev/null
+++ b/src/rv64detect.c
@@ -0,0 +1,70 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <signal.h>
+#include <sys/mman.h>
+#include <setjmp.h>
+
+#include "debug.h"
+#include "dynarec/rv64/rv64_emitter.h"
+
+// Detect RV64 extensions, by executing on of the opcode with a SIGILL signal handler
+
+static sigjmp_buf sigbuf = {0};
+typedef void(*vFii_t)(int, int);
+static void detect_sigill(int sig)
+{
+    siglongjmp(sigbuf, 1);
+}
+
+static int Check(void* block)
+{
+    // Clear instruction cache
+    __clear_cache(block, block+box64_pagesize);
+    // Setup SIGILL signal handler
+    __sighandler_t old = signal(SIGILL, detect_sigill);
+    if(sigsetjmp(sigbuf, 1)) {
+        // didn't work, extension not present
+        signal(SIGILL, old);
+        return 0;
+    }
+    ((vFii_t)block)(0, 1);
+    // done...
+    signal(SIGILL, old);
+    return 1;
+}
+
+void RV64_Detect_Function()
+{
+    // Alloc memory to execute stuffs
+    void* my_block = mmap(NULL, box64_pagesize, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+    if(my_block==(void*)-1) {
+        return;
+    }
+    uint32_t* block;
+    #define EMIT(A) *block = (A); ++block
+    // Test Zba with ADDUW
+    block = (uint32_t*)my_block;
+    ADDUW(A0, A0, A1);
+    BR(xRA);
+    rv64_zba = Check(my_block);
+    // Test Zbb with ANDN
+    block = (uint32_t*)my_block;
+    ANDN(A0, A0, A1);
+    BR(xRA);
+    rv64_zbb = Check(my_block);
+    // Test Zbc with CLMUL
+    block = (uint32_t*)my_block;
+    CLMUL(A0, A0, A1);
+    BR(xRA);
+    rv64_zbc = Check(my_block);
+    // Test Zbs with BCLR
+    block = (uint32_t*)my_block;
+    BCLR(A0, A0, A1);
+    BR(xRA);
+    rv64_zbs = Check(my_block);
+
+    // Finish
+    // Free the memory my_block
+    munmap(my_block, box64_pagesize);
+}
\ No newline at end of file
diff --git a/src/tools/box64stack.c b/src/tools/box64stack.c
index 97623261..44596b98 100644
--- a/src/tools/box64stack.c
+++ b/src/tools/box64stack.c
@@ -35,45 +35,6 @@ int CalcStackSize(box64context_t *context)
     return 0;
 }
 
-uint16_t Pop16(x64emu_t *emu)
-{
-    uint16_t* st = ((uint16_t*)(R_RSP));
-    R_RSP += 2;
-    return *st;
-}
-
-void Push16(x64emu_t *emu, uint16_t v)
-{
-    R_RSP -= 2;
-    *((uint16_t*)R_RSP) = v;
-}
-
-uint32_t Pop32(x64emu_t *emu)
-{
-    uint32_t* st = ((uint32_t*)(R_RSP));
-    R_RSP += 4;
-    return *st;
-}
-
-void Push32(x64emu_t *emu, uint32_t v)
-{
-    R_RSP -= 4;
-    *((uint32_t*)R_RSP) = v;
-}
-
-uint64_t Pop64(x64emu_t *emu)
-{
-    uint64_t* st = ((uint64_t*)(R_RSP));
-    R_RSP += 8;
-    return *st;
-}
-
-void Push64(x64emu_t *emu, uint64_t v)
-{
-    R_RSP -= 8;
-    *((uint64_t*)R_RSP) = v;
-}
-
 void PushString(x64emu_t *emu, const char* s)
 {
     int sz = strlen(s) + 1;
@@ -86,7 +47,7 @@ EXPORTDYN
 void SetupInitialStack(x64emu_t *emu)
 {
     // start with 0
-    Push(emu, 0);
+    Push64(emu, 0);
     // push program executed
     PushString(emu, emu->context->argv[0]);
     uintptr_t p_arg0 = R_RSP;
@@ -116,7 +77,7 @@ void SetupInitialStack(x64emu_t *emu)
     uintptr_t p_random = real_getauxval(25);
     if(!p_random) {
         for (int i=0; i<4; ++i)
-            Push(emu, random());
+            Push64(emu, random());
         p_random = R_RSP;
     }
     // align
@@ -146,21 +107,21 @@ void SetupInitialStack(x64emu_t *emu)
     31 0x7ffd5074efea
     33 0x7ffd507e6000
     */
-    Push(emu, 0); Push(emu, 0);                         //AT_NULL(0)=0
-    //Push(emu, ); Push(emu, 3);                          //AT_PHDR(3)=address of the PH of the executable
-    //Push(emu, ); Push(emu, 4);                          //AT_PHENT(4)=size of PH entry
-    //Push(emu, ); Push(emu, 5);                          //AT_PHNUM(5)=number of elf headers
-    Push(emu, box64_pagesize); Push(emu, 6);            //AT_PAGESZ(6)
-    //Push(emu, real_getauxval(7)); Push(emu, 7);         //AT_BASE(7)=ld-2.27.so start (in memory)
-    Push(emu, 0); Push(emu, 8);                         //AT_FLAGS(8)=0
-    Push(emu, R_RIP); Push(emu, 9);                     //AT_ENTRY(9)=entrypoint
-    Push(emu, real_getauxval(11)); Push(emu, 11);       //AT_UID(11)
-    Push(emu, real_getauxval(12)); Push(emu, 12);       //AT_EUID(12)
-    Push(emu, real_getauxval(13)); Push(emu, 13);       //AT_GID(13)
-    Push(emu, real_getauxval(14)); Push(emu, 14);       //AT_EGID(14)
-    Push(emu, p_x86_64); Push(emu, 15);                 //AT_PLATFORM(15)=&"x86_64"
-    // Push HWCAP: same as CPUID 1.EDX
-    Push(emu,   1<<0      // fpu 
+    Push64(emu, 0); Push64(emu, 0);                         //AT_NULL(0)=0
+    //Push64(emu, ); Push64(emu, 3);                          //AT_PHDR(3)=address of the PH of the executable
+    //Push64(emu, ); Push64(emu, 4);                          //AT_PHENT(4)=size of PH entry
+    //Push64(emu, ); Push64(emu, 5);                          //AT_PHNUM(5)=number of elf headers
+    Push64(emu, box64_pagesize); Push64(emu, 6);            //AT_PAGESZ(6)
+    //Push64(emu, real_getauxval(7)); Push64(emu, 7);         //AT_BASE(7)=ld-2.27.so start (in memory)
+    Push64(emu, 0); Push64(emu, 8);                         //AT_FLAGS(8)=0
+    Push64(emu, R_RIP); Push64(emu, 9);                     //AT_ENTRY(9)=entrypoint
+    Push64(emu, real_getauxval(11)); Push64(emu, 11);       //AT_UID(11)
+    Push64(emu, real_getauxval(12)); Push64(emu, 12);       //AT_EUID(12)
+    Push64(emu, real_getauxval(13)); Push64(emu, 13);       //AT_GID(13)
+    Push64(emu, real_getauxval(14)); Push64(emu, 14);       //AT_EGID(14)
+    Push64(emu, p_x86_64); Push64(emu, 15);                 //AT_PLATFORM(15)=&"x86_64"
+    // Push64 HWCAP: same as CPUID 1.EDX
+    Push64(emu, 1<<0      // fpu
               | 1<<4      // rdtsc
               | 1<<8      // cmpxchg8
               | 1<<11     // sep (sysenter & sysexit)
@@ -173,27 +134,27 @@ void SetupInitialStack(x64emu_t *emu)
               | 1<<28     // hyper threading
               | 1<<30     // ia64
         );
-    Push(emu, 16);                                      //AT_HWCAP(16)=...
-    //Push(emu, sysconf(_SC_CLK_TCK)); Push(emu, 17);     //AT_CLKTCK(17)=times() frequency
-    Push(emu, real_getauxval(23)); Push(emu, 23);       //AT_SECURE(23)
-    Push(emu, p_random); Push(emu, 25);                 //AT_RANDOM(25)=p_random
-    Push(emu, 0); Push(emu, 26);                        //AT_HWCAP2(26)=0
-    Push(emu, p_arg0); Push(emu, 31);                   //AT_EXECFN(31)=p_arg0
-    Push(emu, emu->context->vsyscall); Push(emu, 32);                         //AT_SYSINFO(32)=vsyscall
-    //Push(emu, 0); Push(emu, 33);                         //AT_SYSINFO_EHDR(33)=address of vDSO
+    Push64(emu, 16);                                      //AT_HWCAP(16)=...
+    //Push64(emu, sysconf(_SC_CLK_TCK)); Push64(emu, 17);     //AT_CLKTCK(17)=times() frequency
+    Push64(emu, real_getauxval(23)); Push64(emu, 23);       //AT_SECURE(23)
+    Push64(emu, p_random); Push64(emu, 25);                 //AT_RANDOM(25)=p_random
+    Push64(emu, 0); Push64(emu, 26);                        //AT_HWCAP2(26)=0
+    Push64(emu, p_arg0); Push64(emu, 31);                   //AT_EXECFN(31)=p_arg0
+    Push64(emu, emu->context->vsyscall); Push64(emu, 32);                         //AT_SYSINFO(32)=vsyscall
+    //Push64(emu, 0); Push64(emu, 33);                         //AT_SYSINFO_EHDR(33)=address of vDSO
     if(!emu->context->auxval_start)       // store auxval start if needed
         emu->context->auxval_start = (uintptr_t*)R_RSP;
 
     // push nil / envs / nil / args / argc
-    Push(emu, 0);
+    Push64(emu, 0);
     for (int i=emu->context->envc-1; i>=0; --i)
-        Push(emu, p_envv[i]);
+        Push64(emu, p_envv[i]);
     box_free(emu->context->envv);
     emu->context->envv = (char**)R_RSP;
-    Push(emu, 0);
+    Push64(emu, 0);
     for (int i=emu->context->argc-1; i>=0; --i)
-        Push(emu, p_argv[i]);
+        Push64(emu, p_argv[i]);
     box_free(emu->context->argv);
     emu->context->argv = (char**)R_RSP;
-    Push(emu, emu->context->argc);
+    Push64(emu, emu->context->argc);
 }
diff --git a/src/tools/bridge.c b/src/tools/bridge.c
index 73bb8197..220e06a1 100644
--- a/src/tools/bridge.c
+++ b/src/tools/bridge.c
@@ -152,7 +152,7 @@ uintptr_t AddCheckBridge(bridge_t* bridge, wrapper_t w, void* fnc, int N, const
     return ret;
 }
 
-uintptr_t AddAutomaticBridge(x64emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N)
+uintptr_t AddAutomaticBridge(x64emu_t* emu, bridge_t* bridge, wrapper_t w, void* fnc, int N, const char* name)
 {
     (void)emu;
 
@@ -160,14 +160,14 @@ uintptr_t AddAutomaticBridge(x64emu_t* emu, bridge_t* bridge, wrapper_t w, void*
         return 0;
     uintptr_t ret = CheckBridged(bridge, fnc);
     if(!ret)
-        ret = AddBridge(bridge, w, fnc, N, NULL);
+        ret = AddBridge(bridge, w, fnc, N, name);
     if(!hasAlternate(fnc)) {
         printf_log(LOG_DEBUG, "Adding AutomaticBridge for %p to %p\n", fnc, (void*)ret);
         addAlternate(fnc, (void*)ret);
         #ifdef DYNAREC
         // now, check if dynablock at native address exist
         if(box64_dynarec)
-            DBAlternateBlock(emu, (uintptr_t)fnc, ret);
+            DBAlternateBlock(emu, (uintptr_t)fnc, ret, 0);  // function wrapping is exclusive to 64bits on box64
         #endif
     }
     return ret;
diff --git a/src/tools/callback.c b/src/tools/callback.c
index 9aafa6d8..f3a6bbbf 100644
--- a/src/tools/callback.c
+++ b/src/tools/callback.c
@@ -14,10 +14,8 @@
 #include "dynarec.h"
 
 EXPORTDYN
-uint64_t RunFunction(box64context_t *context, uintptr_t fnc, int nargs, ...)
+uint64_t RunFunction(uintptr_t fnc, int nargs, ...)
 {
-    (void)context;
-
     x64emu_t *emu = thread_get_emu();
     int align = (nargs>6)?(((nargs-6)&1)):0;
     int stackn = align + ((nargs>6)?(nargs-6):0);
@@ -56,11 +54,101 @@ uint64_t RunFunction(box64context_t *context, uintptr_t fnc, int nargs, ...)
 }
 
 EXPORTDYN
-uint64_t RunSafeFunction(box64context_t *context, uintptr_t fnc, int nargs, ...)
+uint64_t RunFunctionFmt(uintptr_t fnc, const char* fmt, ...)
 {
-    (void)context;
-
     x64emu_t *emu = thread_get_emu();
+    int nargs = 0;
+    int ni = 0;
+    int ndf = 0;
+    for (int i=0; fmt[i]; ++i) {
+        switch(fmt[i]) {
+            case 'f': 
+            case 'd': if(ndf<8) ++ndf; else ++nargs; break;
+            case 'p': 
+            case 'i': 
+            case 'u': 
+            case 'I': 
+            case 'U': 
+            case 'L': 
+            case 'l': 
+            case 'w': 
+            case 'W': 
+            case 'c': 
+            case 'C': if(ni<6) ++ni; else ++nargs; break;
+            default:
+                if(ni<6) ++ni; else ++nargs; break;
+        }
+    }
+    ni = 0;
+    ndf = 0;
+    int align = nargs&1;
+    int stackn = align + nargs;
+
+    Push64(emu, R_RBP); // push rbp
+    R_RBP = R_RSP;      // mov rbp, rsp
+
+    R_RSP -= stackn*sizeof(void*);   // need to push in reverse order
+
+    uint64_t *p = (uint64_t*)R_RSP;
+
+    static const int nn[] = {_DI, _SI, _DX, _CX, _R8, _R9};
+    #define GO(c, A, B, B2, C) case c: if(ni<6) emu->regs[nn[ni++]].A[0] = C va_arg(va, B2); else {*p = 0; *((B*)p) = va_arg(va, B2); ++p;}; break;
+    va_list va;
+    va_start (va, fmt);
+    for (int i=0; fmt[i]; ++i) {
+        switch(fmt[i]) {
+            case 'f':   if(ndf<8)
+                            emu->xmm[ndf++].f[0] = va_arg(va, double);  // float are promoted to double in ...
+                        else {
+                            *p = 0;
+                            *((float*)p) = va_arg(va, double);
+                            ++p;
+                        }
+                        break;
+            case 'd':   if(ndf<8)
+                            emu->xmm[ndf++].d[0] = va_arg(va, double);
+                        else {
+                            *((double*)p) = va_arg(va, double);
+                            ++p;
+                        }
+                        break;
+            GO('p', q, void*, void*, (uintptr_t))
+            GO('i', sdword, int, int, )
+            GO('u', dword, uint32_t, uint32_t, )
+            GO('I', sq, int64_t, int64_t, )
+            GO('U', q, uint64_t, uint64_t, )
+            GO('L', q, uint64_t, uint64_t, )
+            GO('l', sq, int64_t, int64_t, )
+            GO('w', sword, int16_t, int, )
+            GO('W', word, uint16_t, int, )
+            GO('c', sbyte, int8_t, int, )
+            GO('C', byte, uint8_t, int, )
+            default:
+                printf_log(LOG_NONE, "Error, unhandled arg %d: '%c' in RunFunctionFmt\n", i, fmt[i]);
+                if(ni<6) emu->regs[nn[ni++]].q[0] = va_arg(va, uint64_t); else {*p = va_arg(va, uint64_t); ++p;}; 
+                break;
+        }
+    }
+    va_end (va);
+
+    uintptr_t oldip = R_RIP;
+    DynaCall(emu, fnc);
+
+    if(oldip==R_RIP) {
+        R_RSP = R_RBP;          // mov rsp, rbp
+        R_RBP = Pop64(emu);     // pop rbp
+    }
+
+    uint64_t ret = R_RAX;
+
+    return ret;
+}
+
+EXPORTDYN
+uint64_t RunSafeFunction(uintptr_t fnc, int nargs, ...)
+{
+    x64emu_t * emu = thread_get_emu();
+
     int align = (nargs>6)?(((nargs-6)&1)):0;
     int stackn = align + ((nargs>6)?(nargs-6):0);
 
@@ -165,10 +253,8 @@ uint64_t RunFunctionWithEmu(x64emu_t *emu, int QuitOnLongJump, uintptr_t fnc, in
 }
 
 EXPORTDYN
-uint64_t RunFunctionWindows(box64context_t *context, uintptr_t fnc, int nargs, ...)
+uint64_t RunFunctionWindows(uintptr_t fnc, int nargs, ...)
 {
-    (void)context;
-
     x64emu_t *emu = thread_get_emu();
     int align = (nargs>4)?(((nargs-4)&1)):0;
     int stackn = align + ((nargs>4)?(nargs-4):0);
diff --git a/src/tools/gtkclass.c b/src/tools/gtkclass.c
index 22474a2f..269d8429 100644
--- a/src/tools/gtkclass.c
+++ b/src/tools/gtkclass.c
@@ -58,12 +58,12 @@ GO(10)	\
 GO(11)	\
 GO(12)
 
-#define WRAPPED(A, NAME, RET, DEF, N, ...)  \
+#define WRAPPED(A, NAME, RET, DEF, FMT, ...)  \
 static uintptr_t my_##NAME##_fct_##A = 0;   \
 static RET my_##NAME##_##A DEF              \
 {                                           \
     printf_log(LOG_DEBUG, "Calling " #NAME "_" #A " wrapper\n");             \
-    return (RET)RunFunction(my_context, my_##NAME##_fct_##A, N, __VA_ARGS__);\
+    return (RET)RunFunctionFmt(my_##NAME##_fct_##A, FMT, __VA_ARGS__);\
 }
 
 #define FIND(A, NAME) \
@@ -117,32 +117,32 @@ static void autobridge_##NAME##_##A(wrapper_t W, void* fct)         \
         return;                                                     \
     Dl_info info;                                                   \
     if(dladdr(fct, &info))                                          \
-        AddAutomaticBridge(thread_get_emu(), my_bridge, W, fct, 0); \
-}
-
-#define WRAPPER(A, NAME, RET, DEF, N, ...)          \
-WRAPPED(0, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(1, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(2, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(3, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(4, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(5, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(6, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
-WRAPPED(7, NAME##_##A, RET, DEF, N, __VA_ARGS__)    \
+        AddAutomaticBridge(thread_get_emu(), my_bridge, W, fct, 0, #NAME "_" #A); \
+}
+
+#define WRAPPER(A, NAME, RET, DEF, FMT, ...)        \
+WRAPPED(0, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(1, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(2, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(3, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(4, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(5, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(6, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
+WRAPPED(7, NAME##_##A, RET, DEF, FMT, __VA_ARGS__)  \
 FIND(A, NAME)                                       \
 REVERSE(A, NAME)                                    \
 AUTOBRIDGE(A, NAME)
 
 // ----- GObjectClass ------
 // wrapper x64 -> natives of callbacks
-WRAPPER(GObject, constructor, void*, (size_t type, uint32_t n_construct_properties, void* construct_properties), 3, type, n_construct_properties, construct_properties);
-WRAPPER(GObject, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
-WRAPPER(GObject, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
-WRAPPER(GObject, dispose, void, (void* object), 1, object);
-WRAPPER(GObject, finalize, void, (void* object), 1, object);
-WRAPPER(GObject, dispatch_properties_changed, void*, (size_t type, uint32_t n_pspecs, void* pspecs), 3, type, n_pspecs, pspecs);
-WRAPPER(GObject, notify, void*, (size_t type, void* pspecs), 2, type, pspecs);
-WRAPPER(GObject, constructed, void, (void* object), 1, object);
+WRAPPER(GObject, constructor, void*, (size_t type, uint32_t n_construct_properties, void* construct_properties), "Lup", type, n_construct_properties, construct_properties);
+WRAPPER(GObject, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), "pupp", object, property_id, value, pspec);
+WRAPPER(GObject, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), "pupp", object, property_id, value, pspec);
+WRAPPER(GObject, dispose, void, (void* object), "p", object);
+WRAPPER(GObject, finalize, void, (void* object), "p", object);
+WRAPPER(GObject, dispatch_properties_changed, void*, (size_t type, uint32_t n_pspecs, void* pspecs), "Lup", type, n_pspecs, pspecs);
+WRAPPER(GObject, notify, void*, (size_t type, void* pspecs), "Lp", type, pspecs);
+WRAPPER(GObject, constructed, void, (void* object), "p", object);
 
 #define SUPERGO() \
     GO(constructor, pFLup);                 \
@@ -163,7 +163,7 @@ static void wrapGObjectClass(my_GObjectClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGObjectClass(my_GObjectClass_t* class)
-{   
+{
     #define GO(A, W)   class->A = find_##A##_GObject (class->A)
     SUPERGO()
     #undef GO
@@ -179,14 +179,14 @@ static void bridgeGObjectClass(my_GObjectClass_t* class)
 
 // ----- GInitiallyUnownedClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GInitiallyUnowned, constructor, void*, (size_t type, uint32_t n_construct_properties, void* construct_properties), 3, type, n_construct_properties, construct_properties);
-WRAPPER(GInitiallyUnowned, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
-WRAPPER(GInitiallyUnowned, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), 4, object, property_id, value, pspec);
-WRAPPER(GInitiallyUnowned, dispose, void, (void* object), 1, object);
-WRAPPER(GInitiallyUnowned, finalize, void, (void* object), 1, object);
-WRAPPER(GInitiallyUnowned, dispatch_properties_changed, void*, (size_t type, uint32_t n_pspecs, void* pspecs), 3, type, n_pspecs, pspecs);
-WRAPPER(GInitiallyUnowned, notify, void*, (size_t type, void* pspecs), 2, type, pspecs);
-WRAPPER(GInitiallyUnowned, constructed, void, (void* object), 1, object);
+WRAPPER(GInitiallyUnowned, constructor, void*, (size_t type, uint32_t n_construct_properties, void* construct_properties), "Lup", type, n_construct_properties, construct_properties);
+WRAPPER(GInitiallyUnowned, set_property, void, (void* object, uint32_t property_id, void* value, void* pspec), "pupp", object, property_id, value, pspec);
+WRAPPER(GInitiallyUnowned, get_property, void, (void* object, uint32_t property_id, void* value, void* pspec), "pupp", object, property_id, value, pspec);
+WRAPPER(GInitiallyUnowned, dispose, void, (void* object), "p", object);
+WRAPPER(GInitiallyUnowned, finalize, void, (void* object), "p", object);
+WRAPPER(GInitiallyUnowned, dispatch_properties_changed, void*, (size_t type, uint32_t n_pspecs, void* pspecs), "Lup", type, n_pspecs, pspecs);
+WRAPPER(GInitiallyUnowned, notify, void*, (size_t type, void* pspecs), "Lp", type, pspecs);
+WRAPPER(GInitiallyUnowned, constructed, void, (void* object), "p", object);
 
 #define SUPERGO() \
     GO(constructor, pFLup);                 \
@@ -207,7 +207,7 @@ static void wrapGInitiallyUnownedClass(my_GInitiallyUnownedClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGInitiallyUnownedClass(my_GInitiallyUnownedClass_t* class)
-{   
+{
     #define GO(A, W)   class->A = find_##A##_GInitiallyUnowned (class->A)
     SUPERGO()
     #undef GO
@@ -223,7 +223,7 @@ static void bridgeGInitiallyUnownedClass(my_GInitiallyUnownedClass_t* class)
 
 // ----- GamesScoresImporterClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GamesScoresImporter, importOldScores, void, (void *self, void* context, void* new_scores_dir, void *error), 4, self, context, new_scores_dir, error);
+WRAPPER(GamesScoresImporter, importOldScores, void, (void *self, void* context, void* new_scores_dir, void *error), "pppp", self, context, new_scores_dir, error);
 
 #define SUPERGO() \
     GO(importOldScores, vFpppp);
@@ -256,21 +256,21 @@ static void bridgeGamesScoresImporterClass(my_GamesScoresImporterClass_t* class)
 
 // ----- GApplicationClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GApplication, startup, void, (void* application), 1, application);
-WRAPPER(GApplication, activate, void, (void* application), 1, application);
-WRAPPER(GApplication, open, void, (void* application, void* files, int n_files, void* hint), 4, application, files, n_files, hint);
-WRAPPER(GApplication, command_line, void, (void* application, void* command_line), 2, application, command_line);
-WRAPPER(GApplication, local_command_line, void, (void* application, void* arguments, void* exit_status), 3, application, arguments, exit_status);
-WRAPPER(GApplication, before_emit, void*, (void* application, void* platform_data), 2, application, platform_data);
-WRAPPER(GApplication, after_emit, void, (void* application, void* platform_data), 2, application, platform_data);
-WRAPPER(GApplication, add_platform_data, void, (void* application, void* builder), 2, application, builder);
-WRAPPER(GApplication, quit_mainloop, void, (void* application), 1, application);
-WRAPPER(GApplication, run_mainloop, void, (void* application), 1, application);
-WRAPPER(GApplication, shutdown, void, (void* application), 1, application);
-WRAPPER(GApplication, dbus_register, void, (void* application, void* connection, void* object_path, void* error), 4, application, connection, object_path, error);
-WRAPPER(GApplication, dbus_unregister, void, (void* application, void* connection, void* object_path), 3, application, connection, object_path);
-WRAPPER(GApplication, handle_local_options, void, (void* application, void* options), 2, application, options);
-WRAPPER(GApplication, name_lost, void, (void* application), 1, application);
+WRAPPER(GApplication, startup, void, (void* application), "p", application);
+WRAPPER(GApplication, activate, void, (void* application), "p", application);
+WRAPPER(GApplication, open, void, (void* application, void* files, int n_files, void* hint), "ppip", application, files, n_files, hint);
+WRAPPER(GApplication, command_line, void, (void* application, void* command_line), "pp", application, command_line);
+WRAPPER(GApplication, local_command_line, void, (void* application, void* arguments, void* exit_status), "ppp", application, arguments, exit_status);
+WRAPPER(GApplication, before_emit, void*, (void* application, void* platform_data), "pp", application, platform_data);
+WRAPPER(GApplication, after_emit, void, (void* application, void* platform_data), "pp", application, platform_data);
+WRAPPER(GApplication, add_platform_data, void, (void* application, void* builder), "pp", application, builder);
+WRAPPER(GApplication, quit_mainloop, void, (void* application), "p", application);
+WRAPPER(GApplication, run_mainloop, void, (void* application), "p", application);
+WRAPPER(GApplication, shutdown, void, (void* application), "p", application);
+WRAPPER(GApplication, dbus_register, void, (void* application, void* connection, void* object_path, void* error), "pppp", application, connection, object_path, error);
+WRAPPER(GApplication, dbus_unregister, void, (void* application, void* connection, void* object_path), "ppp", application, connection, object_path);
+WRAPPER(GApplication, handle_local_options, void, (void* application, void* options), "pp", application, options);
+WRAPPER(GApplication, name_lost, void, (void* application), "p", application);
 
 #define SUPERGO()                     \
     GO(startup, vFp);                 \
@@ -315,8 +315,8 @@ static void bridgeGApplicationClass(my_GApplicationClass_t* class)
 
 // ----- GtkApplicationClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkApplication, window_added, void, (void* application, void* window), 2, application, window);
-WRAPPER(GtkApplication, window_removed, void, (void* application, void* window), 2, application, window);
+WRAPPER(GtkApplication, window_added, void, (void* application, void* window), "pp", application, window);
+WRAPPER(GtkApplication, window_removed, void, (void* application, void* window), "pp", application, window);
 
 #define SUPERGO() \
     GO(window_added, pFpp);   \
@@ -350,9 +350,9 @@ static void bridgeGtkApplicationClass(my_GtkApplicationClass_t* class)
 
 // ----- GtkObjectClass ------
 // wrapper x64 -> natives of callbacks
-WRAPPER(GtkObject, set_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
-WRAPPER(GtkObject, get_arg, void, (void* object, void* arg, uint32_t arg_id), 3, object, arg, arg_id);
-WRAPPER(GtkObject, destroy, void, (void* object), 1, object);
+WRAPPER(GtkObject, set_arg, void, (void* object, void* arg, uint32_t arg_id), "ppu", object, arg, arg_id);
+WRAPPER(GtkObject, get_arg, void, (void* object, void* arg, uint32_t arg_id), "ppu", object, arg, arg_id);
+WRAPPER(GtkObject, destroy, void, (void* object), "p", object);
 
 #define SUPERGO() \
     GO(set_arg, vFppu); \
@@ -368,7 +368,7 @@ static void wrapGtkObjectClass(my_GtkObjectClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkObjectClass(my_GtkObjectClass_t* class)
-{   
+{
     unwrapGObjectClass(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkObject (class->A)
     SUPERGO()
@@ -387,72 +387,72 @@ static void bridgeGtkObjectClass(my_GtkObjectClass_t* class)
 
 // ----- GtkWidget2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkWidget2, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), 3, widget, n_pspecs, pspecs);
-WRAPPER(GtkWidget2, show,              void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, show_all,          void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, hide,              void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, hide_all,          void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, map,               void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, unmap,             void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, realize,           void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, unrealize,         void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, size_request,      void, (void* widget, void* requisition), 2, widget, requisition);
-WRAPPER(GtkWidget2, size_allocate,     void, (void* widget, void* allocation), 2, widget, allocation);
-WRAPPER(GtkWidget2, state_changed,     void, (void* widget, int previous_state), 2, widget, previous_state);
-WRAPPER(GtkWidget2, parent_set,        void, (void* widget, void* previous_parent), 2, widget, previous_parent);
-WRAPPER(GtkWidget2, hierarchy_changed, void, (void* widget, void* previous_toplevel), 2, widget, previous_toplevel);
-WRAPPER(GtkWidget2, style_set,         void, (void* widget, void* previous_style), 2, widget, previous_style);
-WRAPPER(GtkWidget2, direction_changed, void, (void* widget, int previous_direction), 2, widget, previous_direction);
-WRAPPER(GtkWidget2, grab_notify,       void, (void* widget, int was_grabbed), 2, widget, was_grabbed);
-WRAPPER(GtkWidget2, child_notify,      void, (void* widget, void* pspec), 2, widget, pspec);
-WRAPPER(GtkWidget2, mnemonic_activate, int, (void* widget, int group_cycling), 2, widget, group_cycling);
-WRAPPER(GtkWidget2, grab_focus,        void, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, focus,             int, (void* widget, int direction), 2, widget, direction);
-WRAPPER(GtkWidget2, event,             int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, button_press_event,int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, button_release_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, scroll_event,      int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, motion_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, delete_event,       int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, destroy_event,      int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, expose_event,       int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, key_press_event,    int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, key_release_event,  int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, enter_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, leave_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, configure_event,    int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, focus_in_event,     int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, focus_out_event,    int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, map_event,          int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, unmap_event,        int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, property_notify_event,  int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, selection_clear_event,  int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, selection_request_event,int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, selection_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, proximity_in_event,  int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, proximity_out_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, visibility_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, client_event,        int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, no_expose_event,     int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, window_state_event,  int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2, selection_get,       void, (void* widget, void* selection_data, uint32_t info, uint32_t time_), 4, widget, selection_data, info, time_);
-WRAPPER(GtkWidget2, selection_received,  void, (void* widget, void* selection_data, uint32_t time_), 3, widget, selection_data, time_);
-WRAPPER(GtkWidget2, drag_begin,          void, (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget2, drag_end,            void, (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget2, drag_data_get,       void, (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), 5, widget, context, selection_data, info, time_);
-WRAPPER(GtkWidget2, drag_data_delete,    void, (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget2, drag_leave,          void, (void* widget, void* context, uint32_t time_), 3, widget, context, time_);
-WRAPPER(GtkWidget2, drag_motion,         int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
-WRAPPER(GtkWidget2, drag_drop,           int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), 5, widget, context, x, y, time_);
-WRAPPER(GtkWidget2, drag_data_received,  void, (void* widget, void* context, int32_t x, int32_t y, void* selection_data, uint32_t info, uint32_t time_), 7, widget, context, x, y, selection_data, info, time_);
-WRAPPER(GtkWidget2,  popup_menu,         int  , (void* widget), 1, widget);
-WRAPPER(GtkWidget2,  show_help,          int  , (void* widget, int help_type), 2, widget, help_type);
-WRAPPER(GtkWidget2, get_accessible,      void*, (void* widget), 1, widget);
-WRAPPER(GtkWidget2, screen_changed,      void , (void* widget, void* previous_screen), 2, widget, previous_screen);
-WRAPPER(GtkWidget2, can_activate_accel,  int  , (void* widget, uint32_t signal_id), 2, widget, signal_id);
-WRAPPER(GtkWidget2, grab_broken_event,   int  , (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget2,  composited_changed, void , (void* widget), 1, widget);
-WRAPPER(GtkWidget2,  query_tooltip,      int  , (void* widget, int32_t x, int32_t y, int keyboard_tooltip, void* tooltip), 5, widget, x, y, keyboard_tooltip, tooltip);
+WRAPPER(GtkWidget2, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), "pup", widget, n_pspecs, pspecs);
+WRAPPER(GtkWidget2, show,              void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, show_all,          void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, hide,              void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, hide_all,          void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, map,               void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, unmap,             void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, realize,           void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, unrealize,         void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, size_request,      void, (void* widget, void* requisition), "pp", widget, requisition);
+WRAPPER(GtkWidget2, size_allocate,     void, (void* widget, void* allocation), "pp", widget, allocation);
+WRAPPER(GtkWidget2, state_changed,     void, (void* widget, int previous_state), "pi", widget, previous_state);
+WRAPPER(GtkWidget2, parent_set,        void, (void* widget, void* previous_parent), "pp", widget, previous_parent);
+WRAPPER(GtkWidget2, hierarchy_changed, void, (void* widget, void* previous_toplevel), "pp", widget, previous_toplevel);
+WRAPPER(GtkWidget2, style_set,         void, (void* widget, void* previous_style), "pp", widget, previous_style);
+WRAPPER(GtkWidget2, direction_changed, void, (void* widget, int previous_direction), "pi", widget, previous_direction);
+WRAPPER(GtkWidget2, grab_notify,       void, (void* widget, int was_grabbed), "pi", widget, was_grabbed);
+WRAPPER(GtkWidget2, child_notify,      void, (void* widget, void* pspec), "pp", widget, pspec);
+WRAPPER(GtkWidget2, mnemonic_activate, int, (void* widget, int group_cycling), "pi", widget, group_cycling);
+WRAPPER(GtkWidget2, grab_focus,        void, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, focus,             int, (void* widget, int direction), "pi", widget, direction);
+WRAPPER(GtkWidget2, event,             int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, button_press_event,int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, button_release_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, scroll_event,      int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, motion_notify_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, delete_event,       int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, destroy_event,      int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, expose_event,       int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, key_press_event,    int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, key_release_event,  int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, enter_notify_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, leave_notify_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, configure_event,    int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, focus_in_event,     int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, focus_out_event,    int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, map_event,          int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, unmap_event,        int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, property_notify_event,  int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, selection_clear_event,  int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, selection_request_event,int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, selection_notify_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, proximity_in_event,  int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, proximity_out_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2, visibility_notify_event, int, (void* widget, void* event), "p", widget, event);
+WRAPPER(GtkWidget2, client_event,        int, (void* widget, void* event), "p", widget, event);
+WRAPPER(GtkWidget2, no_expose_event,     int, (void* widget, void* event), "p", widget, event);
+WRAPPER(GtkWidget2, window_state_event,  int, (void* widget, void* event), "p", widget, event);
+WRAPPER(GtkWidget2, selection_get,       void, (void* widget, void* selection_data, uint32_t info, uint32_t time_), "ppuu", widget, selection_data, info, time_);
+WRAPPER(GtkWidget2, selection_received,  void, (void* widget, void* selection_data, uint32_t time_), "ppu", widget, selection_data, time_);
+WRAPPER(GtkWidget2, drag_begin,          void, (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget2, drag_end,            void, (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget2, drag_data_get,       void, (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), "pppuu", widget, context, selection_data, info, time_);
+WRAPPER(GtkWidget2, drag_data_delete,    void, (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget2, drag_leave,          void, (void* widget, void* context, uint32_t time_), "ppu", widget, context, time_);
+WRAPPER(GtkWidget2, drag_motion,         int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), "ppiiu", widget, context, x, y, time_);
+WRAPPER(GtkWidget2, drag_drop,           int, (void* widget, void* context, int32_t x, int32_t y, uint32_t time_), "ppiiu", widget, context, x, y, time_);
+WRAPPER(GtkWidget2, drag_data_received,  void, (void* widget, void* context, int32_t x, int32_t y, void* selection_data, uint32_t info, uint32_t time_), "ppiipuu", widget, context, x, y, selection_data, info, time_);
+WRAPPER(GtkWidget2,  popup_menu,         int  , (void* widget), "p", widget);
+WRAPPER(GtkWidget2,  show_help,          int  , (void* widget, int help_type), "pi", widget, help_type);
+WRAPPER(GtkWidget2, get_accessible,      void*, (void* widget), "p", widget);
+WRAPPER(GtkWidget2, screen_changed,      void , (void* widget, void* previous_screen), "pp", widget, previous_screen);
+WRAPPER(GtkWidget2, can_activate_accel,  int  , (void* widget, uint32_t signal_id), "pu", widget, signal_id);
+WRAPPER(GtkWidget2, grab_broken_event,   int  , (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget2,  composited_changed, void , (void* widget), "p", widget);
+WRAPPER(GtkWidget2,  query_tooltip,      int  , (void* widget, int32_t x, int32_t y, int keyboard_tooltip, void* tooltip), "piiip", widget, x, y, keyboard_tooltip, tooltip);
 
 #define SUPERGO() \
     GO(dispatch_child_properties_changed, vFpup);   \
@@ -532,7 +532,7 @@ static void wrapGtkWidget2Class(my_GtkWidget2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkWidget2Class(my_GtkWidget2Class_t* class)
-{   
+{
     unwrapGtkObjectClass(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkWidget2 (class->A)
     SUPERGO()
@@ -551,88 +551,88 @@ static void bridgeGtkWidget2Class(my_GtkWidget2Class_t* class)
 
 // ----- GtkWidget3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkWidget3, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), 3, widget, n_pspecs, pspecs);
-WRAPPER(GtkWidget3, destroy, void,              (void* widget), 1, widget);
-WRAPPER(GtkWidget3, show, void,                 (void* widget), 1, widget);
-WRAPPER(GtkWidget3, show_all, void,             (void* widget), 1, widget);
-WRAPPER(GtkWidget3, hide, void,                 (void* widget), 1, widget);
-WRAPPER(GtkWidget3, map, void,                  (void* widget), 1, widget);
-WRAPPER(GtkWidget3, unmap, void,                (void* widget), 1, widget);
-WRAPPER(GtkWidget3, realize, void,              (void* widget), 1, widget);
-WRAPPER(GtkWidget3, unrealize, void,            (void* widget), 1, widget);
-WRAPPER(GtkWidget3, size_allocate, void,        (void* widget, void* allocation), 2, widget, allocation);
-WRAPPER(GtkWidget3, state_changed, void,        (void* widget, int previous_state), 2, widget, previous_state);
-WRAPPER(GtkWidget3, state_flags_changed, void,  (void* widget, int previous_state_flags), 2, widget, previous_state_flags);
-WRAPPER(GtkWidget3, parent_set, void,           (void* widget, void* previous_parent), 2, widget, previous_parent);
-WRAPPER(GtkWidget3, hierarchy_changed, void,    (void* widget, void* previous_toplevel), 2, widget, previous_toplevel);
-WRAPPER(GtkWidget3, style_set, void,            (void* widget, void* previous_style), 2, widget, previous_style);
-WRAPPER(GtkWidget3, direction_changed, void,    (void* widget, int previous_direction), 2, widget, previous_direction);
-WRAPPER(GtkWidget3, grab_notify, void,          (void* widget, int was_grabbed), 2, widget, was_grabbed);
-WRAPPER(GtkWidget3, child_notify, void,         (void* widget, void* child_property), 2, widget, child_property);
-WRAPPER(GtkWidget3, draw, int,                  (void* widget, void* cr), 2, widget, cr);
-WRAPPER(GtkWidget3, get_request_mode, int,      (void* widget), 1, widget);
-WRAPPER(GtkWidget3, get_preferred_height, void, (void* widget, void* minimum_height, void* natural_height), 3, widget, minimum_height, natural_height);
-WRAPPER(GtkWidget3, get_preferred_width_for_height, void,  (void* widget, int height, void* minimum_width, void* natural_width), 4, widget, height, minimum_width, natural_width);
-WRAPPER(GtkWidget3, get_preferred_width, void,  (void* widget, void* minimum_width, void* natural_width), 3, widget, minimum_width, natural_width);
-WRAPPER(GtkWidget3, get_preferred_height_for_width, void,  (void* widget, int width, void* minimum_height, void* natural_height), 4, widget, width, minimum_height, natural_height);
-WRAPPER(GtkWidget3, mnemonic_activate, int,     (void* widget, int group_cycling), 2, widget, group_cycling);
-WRAPPER(GtkWidget3, grab_focus, void,           (void* widget), 1, widget);
-WRAPPER(GtkWidget3, focus, int,                 (void* widget, int direction), 2, widget, direction);
-WRAPPER(GtkWidget3, move_focus, void,           (void* widget, int direction), 2, widget, direction);
-WRAPPER(GtkWidget3, keynav_failed, int,         (void* widget, int direction), 2, widget, direction);
-WRAPPER(GtkWidget3, event, int,                 (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, button_press_event, int,    (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, button_release_event, int,  (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, scroll_event, int,          (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, motion_notify_event, int,   (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, delete_event, int,          (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, destroy_event, int,         (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, key_press_event, int,       (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, key_release_event, int,     (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, enter_notify_event, int,    (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, leave_notify_event, int,    (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, configure_event, int,       (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, focus_in_event, int,        (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, focus_out_event, int,       (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, map_event, int,             (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, unmap_event, int,           (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, property_notify_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, selection_clear_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, selection_request_event, int, (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, selection_notify_event, int,(void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, proximity_in_event, int,    (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, proximity_out_event, int,   (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, visibility_notify_event, int,   (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, window_state_event, int,    (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, damage_event, int,          (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, grab_broken_event, int,     (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, selection_get, void,        (void* widget, void* selection_data, uint32_t info, uint32_t time_), 4, widget, selection_data, info, time_);
-WRAPPER(GtkWidget3, selection_received, void,   (void* widget, void* selection_data, uint32_t time_), 3, widget, selection_data, time_);
-WRAPPER(GtkWidget3, drag_begin, void,           (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget3, drag_end, void,             (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget3, drag_data_get, void,        (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), 5, widget, context, selection_data, info, time_);
-WRAPPER(GtkWidget3, drag_data_delete, void,     (void* widget, void* context), 2, widget, context);
-WRAPPER(GtkWidget3, drag_leave, void,           (void* widget, void* context, uint32_t time_), 3, widget, context, time_);
-WRAPPER(GtkWidget3, drag_motion, int,           (void* widget, void* context, int x, int y, uint32_t time_), 5, widget, context, x, y, time_);
-WRAPPER(GtkWidget3, drag_drop, int,             (void* widget, void* context, int x, int y, uint32_t time_), 5, widget, context, x, y, time_);
-WRAPPER(GtkWidget3, drag_data_received, void,   (void* widget, void* context, int x, int y, void* selection_data, uint32_t info, uint32_t time_), 7, widget, context, x, y, selection_data, info, time_);
-WRAPPER(GtkWidget3, drag_failed, int,           (void* widget, void* context, int result), 3, widget, context, result);
-WRAPPER(GtkWidget3, popup_menu, int,            (void* widget), 1, widget);
-WRAPPER(GtkWidget3, show_help, int,             (void* widget, int help_type), 2, widget, help_type);
-WRAPPER(GtkWidget3, get_accessible, void*,      (void *widget), 1, widget);
-WRAPPER(GtkWidget3, screen_changed, void,       (void* widget, void* previous_screen), 2, widget, previous_screen);
-WRAPPER(GtkWidget3, can_activate_accel, int,    (void* widget, uint32_t signal_id), 2, widget, signal_id);
-WRAPPER(GtkWidget3, composited_changed, void,   (void* widget), 1, widget);
-WRAPPER(GtkWidget3, query_tooltip, int,         (void* widget, int x, int y, int keyboard_tooltip, void* tooltip), 5, widget, x, y, keyboard_tooltip, tooltip);
-WRAPPER(GtkWidget3, compute_expand, void,       (void* widget, void* hexpand_p, void* vexpand_p), 3, widget, hexpand_p, vexpand_p);
-WRAPPER(GtkWidget3, adjust_size_request, void,  (void* widget, int orientation, void* minimum_size, void* natural_size), 4, widget, orientation, minimum_size, natural_size);
-WRAPPER(GtkWidget3, adjust_size_allocation, void, (void*widget, int orientation, void* minimum_size, void* natural_size, void* allocated_pos, void* allocated_size), 6, widget, orientation, minimum_size, natural_size, allocated_pos, allocated_size);
-WRAPPER(GtkWidget3, style_updated, void,        (void* widget), 1, widget);
-WRAPPER(GtkWidget3, touch_event, int,           (void* widget, void* event), 2, widget, event);
-WRAPPER(GtkWidget3, get_preferred_height_and_baseline_for_width, void, (void* widget, int width, void* minimum_height, void* natural_height, void* minimum_baseline, void* natural_baseline), 6, widget, width, minimum_height, natural_height, minimum_baseline, natural_baseline);
-WRAPPER(GtkWidget3, adjust_baseline_request, void,  (void* widget, void* minimum_baseline, void* natural_baseline), 3, widget, minimum_baseline, natural_baseline);
-WRAPPER(GtkWidget3, adjust_baseline_allocation, void,  (void* widget, void* baseline), 2, widget, baseline);
-WRAPPER(GtkWidget3, queue_draw_region, void,    (void* widget, void* region), 2, widget, region);
+WRAPPER(GtkWidget3, dispatch_child_properties_changed, void, (void* widget, uint32_t n_pspecs, void* pspecs), "pup", widget, n_pspecs, pspecs);
+WRAPPER(GtkWidget3, destroy, void,              (void* widget), "p", widget);
+WRAPPER(GtkWidget3, show, void,                 (void* widget), "p", widget);
+WRAPPER(GtkWidget3, show_all, void,             (void* widget), "p", widget);
+WRAPPER(GtkWidget3, hide, void,                 (void* widget), "p", widget);
+WRAPPER(GtkWidget3, map, void,                  (void* widget), "p", widget);
+WRAPPER(GtkWidget3, unmap, void,                (void* widget), "p", widget);
+WRAPPER(GtkWidget3, realize, void,              (void* widget), "p", widget);
+WRAPPER(GtkWidget3, unrealize, void,            (void* widget), "p", widget);
+WRAPPER(GtkWidget3, size_allocate, void,        (void* widget, void* allocation), "pp", widget, allocation);
+WRAPPER(GtkWidget3, state_changed, void,        (void* widget, int previous_state), "pi", widget, previous_state);
+WRAPPER(GtkWidget3, state_flags_changed, void,  (void* widget, int previous_state_flags), "pi", widget, previous_state_flags);
+WRAPPER(GtkWidget3, parent_set, void,           (void* widget, void* previous_parent), "pp", widget, previous_parent);
+WRAPPER(GtkWidget3, hierarchy_changed, void,    (void* widget, void* previous_toplevel), "pp", widget, previous_toplevel);
+WRAPPER(GtkWidget3, style_set, void,            (void* widget, void* previous_style), "pp", widget, previous_style);
+WRAPPER(GtkWidget3, direction_changed, void,    (void* widget, int previous_direction), "pi", widget, previous_direction);
+WRAPPER(GtkWidget3, grab_notify, void,          (void* widget, int was_grabbed), "pi", widget, was_grabbed);
+WRAPPER(GtkWidget3, child_notify, void,         (void* widget, void* child_property), "pp", widget, child_property);
+WRAPPER(GtkWidget3, draw, int,                  (void* widget, void* cr), "pp", widget, cr);
+WRAPPER(GtkWidget3, get_request_mode, int,      (void* widget), "p", widget);
+WRAPPER(GtkWidget3, get_preferred_height, void, (void* widget, void* minimum_height, void* natural_height), "ppp", widget, minimum_height, natural_height);
+WRAPPER(GtkWidget3, get_preferred_width_for_height, void,  (void* widget, int height, void* minimum_width, void* natural_width), "pipp", widget, height, minimum_width, natural_width);
+WRAPPER(GtkWidget3, get_preferred_width, void,  (void* widget, void* minimum_width, void* natural_width), "ppp", widget, minimum_width, natural_width);
+WRAPPER(GtkWidget3, get_preferred_height_for_width, void,  (void* widget, int width, void* minimum_height, void* natural_height), "pipp", widget, width, minimum_height, natural_height);
+WRAPPER(GtkWidget3, mnemonic_activate, int,     (void* widget, int group_cycling), "pi", widget, group_cycling);
+WRAPPER(GtkWidget3, grab_focus, void,           (void* widget), "p", widget);
+WRAPPER(GtkWidget3, focus, int,                 (void* widget, int direction), "pi", widget, direction);
+WRAPPER(GtkWidget3, move_focus, void,           (void* widget, int direction), "pi", widget, direction);
+WRAPPER(GtkWidget3, keynav_failed, int,         (void* widget, int direction), "pi", widget, direction);
+WRAPPER(GtkWidget3, event, int,                 (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, button_press_event, int,    (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, button_release_event, int,  (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, scroll_event, int,          (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, motion_notify_event, int,   (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, delete_event, int,          (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, destroy_event, int,         (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, key_press_event, int,       (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, key_release_event, int,     (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, enter_notify_event, int,    (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, leave_notify_event, int,    (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, configure_event, int,       (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, focus_in_event, int,        (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, focus_out_event, int,       (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, map_event, int,             (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, unmap_event, int,           (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, property_notify_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, selection_clear_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, selection_request_event, int, (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, selection_notify_event, int,(void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, proximity_in_event, int,    (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, proximity_out_event, int,   (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, visibility_notify_event, int,   (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, window_state_event, int,    (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, damage_event, int,          (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, grab_broken_event, int,     (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, selection_get, void,        (void* widget, void* selection_data, uint32_t info, uint32_t time_), "ppuu", widget, selection_data, info, time_);
+WRAPPER(GtkWidget3, selection_received, void,   (void* widget, void* selection_data, uint32_t time_), "ppu", widget, selection_data, time_);
+WRAPPER(GtkWidget3, drag_begin, void,           (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget3, drag_end, void,             (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget3, drag_data_get, void,        (void* widget, void* context, void* selection_data, uint32_t info, uint32_t time_), "pppuu", widget, context, selection_data, info, time_);
+WRAPPER(GtkWidget3, drag_data_delete, void,     (void* widget, void* context), "pp", widget, context);
+WRAPPER(GtkWidget3, drag_leave, void,           (void* widget, void* context, uint32_t time_), "ppu", widget, context, time_);
+WRAPPER(GtkWidget3, drag_motion, int,           (void* widget, void* context, int x, int y, uint32_t time_), "ppiiu", widget, context, x, y, time_);
+WRAPPER(GtkWidget3, drag_drop, int,             (void* widget, void* context, int x, int y, uint32_t time_), "ppiiu", widget, context, x, y, time_);
+WRAPPER(GtkWidget3, drag_data_received, void,   (void* widget, void* context, int x, int y, void* selection_data, uint32_t info, uint32_t time_), "ppiipuu", widget, context, x, y, selection_data, info, time_);
+WRAPPER(GtkWidget3, drag_failed, int,           (void* widget, void* context, int result), "ppi", widget, context, result);
+WRAPPER(GtkWidget3, popup_menu, int,            (void* widget), "p", widget);
+WRAPPER(GtkWidget3, show_help, int,             (void* widget, int help_type), "pi", widget, help_type);
+WRAPPER(GtkWidget3, get_accessible, void*,      (void *widget), "p", widget);
+WRAPPER(GtkWidget3, screen_changed, void,       (void* widget, void* previous_screen), "pp", widget, previous_screen);
+WRAPPER(GtkWidget3, can_activate_accel, int,    (void* widget, uint32_t signal_id), "pu", widget, signal_id);
+WRAPPER(GtkWidget3, composited_changed, void,   (void* widget), "p", widget);
+WRAPPER(GtkWidget3, query_tooltip, int,         (void* widget, int x, int y, int keyboard_tooltip, void* tooltip), "piiip", widget, x, y, keyboard_tooltip, tooltip);
+WRAPPER(GtkWidget3, compute_expand, void,       (void* widget, void* hexpand_p, void* vexpand_p), "ppp", widget, hexpand_p, vexpand_p);
+WRAPPER(GtkWidget3, adjust_size_request, void,  (void* widget, int orientation, void* minimum_size, void* natural_size), "pipp", widget, orientation, minimum_size, natural_size);
+WRAPPER(GtkWidget3, adjust_size_allocation, void, (void*widget, int orientation, void* minimum_size, void* natural_size, void* allocated_pos, void* allocated_size), "pipppp", widget, orientation, minimum_size, natural_size, allocated_pos, allocated_size);
+WRAPPER(GtkWidget3, style_updated, void,        (void* widget), "p", widget);
+WRAPPER(GtkWidget3, touch_event, int,           (void* widget, void* event), "pp", widget, event);
+WRAPPER(GtkWidget3, get_preferred_height_and_baseline_for_width, void, (void* widget, int width, void* minimum_height, void* natural_height, void* minimum_baseline, void* natural_baseline), "pipppp", widget, width, minimum_height, natural_height, minimum_baseline, natural_baseline);
+WRAPPER(GtkWidget3, adjust_baseline_request, void,  (void* widget, void* minimum_baseline, void* natural_baseline), "ppp", widget, minimum_baseline, natural_baseline);
+WRAPPER(GtkWidget3, adjust_baseline_allocation, void,  (void* widget, void* baseline), "pp", widget, baseline);
+WRAPPER(GtkWidget3, queue_draw_region, void,    (void* widget, void* region), "pp", widget, region);
 
 #define SUPERGO() \
     GO(dispatch_child_properties_changed, vFpup);   \
@@ -729,7 +729,7 @@ static void wrapGtkWidget3Class(my_GtkWidget3Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkWidget3Class(my_GtkWidget3Class_t* class)
-{   
+{
     unwrapGInitiallyUnownedClass(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkWidget3 (class->A)
     SUPERGO()
@@ -748,15 +748,15 @@ static void bridgeGtkWidget3Class(my_GtkWidget3Class_t* class)
 
 // ----- GtkContainer2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkContainer2, add, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer2, remove, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer2, check_resize, void, (void* container), 1, container);
-WRAPPER(GtkContainer2, forall, void, (void* container, int include_internals, void* callback, void* callback_data), 4, container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0, NULL), callback_data);
-WRAPPER(GtkContainer2, set_focus_child, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer2, child_type, int, (void* container), 1, container);
-WRAPPER(GtkContainer2, composite_name, void*, (void* container, void* child), 2, container, child);
-WRAPPER(GtkContainer2, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
-WRAPPER(GtkContainer2, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
+WRAPPER(GtkContainer2, add, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer2, remove, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer2, check_resize, void, (void* container), "p", container);
+WRAPPER(GtkContainer2, forall, void, (void* container, int include_internals, void* callback, void* callback_data), "pipp", container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0, NULL), callback_data);
+WRAPPER(GtkContainer2, set_focus_child, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer2, child_type, int, (void* container), "p", container);
+WRAPPER(GtkContainer2, composite_name, void*, (void* container, void* child), "pp", container, child);
+WRAPPER(GtkContainer2, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), "ppupp", container, child, property_id, value, pspec);
+WRAPPER(GtkContainer2, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), "ppupp", container, child, property_id, value, pspec);
 
 #define SUPERGO() \
     GO(add, vFpp);                  \
@@ -779,7 +779,7 @@ static void wrapGtkContainer2Class(my_GtkContainer2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkContainer2Class(my_GtkContainer2Class_t* class)
-{   
+{
     unwrapGtkWidget2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkContainer2 (class->A)
     SUPERGO()
@@ -798,16 +798,16 @@ static void bridgeGtkContainer2Class(my_GtkContainer2Class_t* class)
 
 // ----- GtkContainer3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkContainer3, add, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer3, remove, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer3, check_resize, void, (void* container), 1, container);
-WRAPPER(GtkContainer3, forall, void, (void* container, int include_internals, void* callback, void* callback_data), 4, container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0, NULL), callback_data);
-WRAPPER(GtkContainer3, set_focus_child, void, (void* container, void* widget), 2, container, widget);
-WRAPPER(GtkContainer3, child_type, int, (void* container), 1, container);
-WRAPPER(GtkContainer3, composite_name, void*, (void* container, void* child), 2, container, child);
-WRAPPER(GtkContainer3, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
-WRAPPER(GtkContainer3, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), 5, container, child, property_id, value, pspec);
-WRAPPER(GtkContainer3, get_path_for_child, void*, (void* container, void* child), 2, container, child);
+WRAPPER(GtkContainer3, add, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer3, remove, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer3, check_resize, void, (void* container), "p", container);
+WRAPPER(GtkContainer3, forall, void, (void* container, int include_internals, void* callback, void* callback_data), "pipp", container, include_internals, AddCheckBridge(my_bridge, vFpp, callback, 0, NULL), callback_data);
+WRAPPER(GtkContainer3, set_focus_child, void, (void* container, void* widget), "pp", container, widget);
+WRAPPER(GtkContainer3, child_type, int, (void* container), "p", container);
+WRAPPER(GtkContainer3, composite_name, void*, (void* container, void* child), "pp", container, child);
+WRAPPER(GtkContainer3, set_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), "ppupp", container, child, property_id, value, pspec);
+WRAPPER(GtkContainer3, get_child_property, void, (void* container, void* child, uint32_t property_id, void* value, void* pspec), "ppupp", container, child, property_id, value, pspec);
+WRAPPER(GtkContainer3, get_path_for_child, void*, (void* container, void* child), "pp", container, child);
 
 #define SUPERGO() \
     GO(add, vFpp);                  \
@@ -831,7 +831,7 @@ static void wrapGtkContainer3Class(my_GtkContainer3Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkContainer3Class(my_GtkContainer3Class_t* class)
-{   
+{
     unwrapGtkWidget3Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkContainer3 (class->A)
     SUPERGO()
@@ -850,12 +850,12 @@ static void bridgeGtkContainer3Class(my_GtkContainer3Class_t* class)
 
 // ----- GtkActionClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkAction, activate, void, (void* action), 1, action);
-WRAPPER(GtkAction, create_menu_item, void*, (void* action), 1, action);
-WRAPPER(GtkAction, create_tool_item, void*, (void* action), 1, action);
-WRAPPER(GtkAction, connect_proxy, void , (void* action, void* proxy), 2, action, proxy);
-WRAPPER(GtkAction, disconnect_proxy, void , (void* action, void* proxy), 2, action, proxy);
-WRAPPER(GtkAction, create_menu, void*, (void* action), 1, action);
+WRAPPER(GtkAction, activate, void, (void* action), "p", action);
+WRAPPER(GtkAction, create_menu_item, void*, (void* action), "p", action);
+WRAPPER(GtkAction, create_tool_item, void*, (void* action), "p", action);
+WRAPPER(GtkAction, connect_proxy, void , (void* action, void* proxy), "pp", action, proxy);
+WRAPPER(GtkAction, disconnect_proxy, void , (void* action, void* proxy), "pp", action, proxy);
+WRAPPER(GtkAction, create_menu, void*, (void* action), "p", action);
 
 #define SUPERGO() \
     GO(activate, vFp);          \
@@ -875,7 +875,7 @@ static void wrapGtkActionClass(my_GtkActionClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkActionClass(my_GtkActionClass_t* class)
-{   
+{
     unwrapGObjectClass(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkAction (class->A)
     SUPERGO()
@@ -900,7 +900,7 @@ static void wrapGtkMisc2Class(my_GtkMisc2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkMisc2Class(my_GtkMisc2Class_t* class)
-{   
+{
     unwrapGtkWidget2Class(&class->parent_class);
 }
 // autobridge
@@ -943,7 +943,7 @@ static void bridgeGtkMisc3Class(my_GtkMisc3Class_t* class)
 
 // ----- GtkGtkMenuButtonClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkMenuButton, activate, void, (void* self), 1, self);
+WRAPPER(GtkMenuButton, activate, void, (void* self), "p", self);
 
 #define SUPERGO() \
     GO(activate, vFp);
@@ -976,10 +976,10 @@ static void bridgeGtkMenuButtonClass(my_GtkMenuButtonClass_t* class)
 
 // ----- GtkLabel2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkLabel2, move_cursor, void, (void* label, int step, int count, int extend_selection), 4, label, step, count, extend_selection);
-WRAPPER(GtkLabel2, copy_clipboard, void, (void* label), 1, label);
-WRAPPER(GtkLabel2, populate_popup, void, (void* label, void* menu), 2, label, menu);
-WRAPPER(GtkLabel2, activate_link, int, (void* label, void* uri), 2, label, uri);
+WRAPPER(GtkLabel2, move_cursor, void, (void* label, int step, int count, int extend_selection), "piii", label, step, count, extend_selection);
+WRAPPER(GtkLabel2, copy_clipboard, void, (void* label), "p", label);
+WRAPPER(GtkLabel2, populate_popup, void, (void* label, void* menu), "pp", label, menu);
+WRAPPER(GtkLabel2, activate_link, int, (void* label, void* uri), "pp", label, uri);
 
 #define SUPERGO() \
     GO(move_cursor, vFpiii);    \
@@ -997,7 +997,7 @@ static void wrapGtkLabel2Class(my_GtkLabel2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkLabel2Class(my_GtkLabel2Class_t* class)
-{   
+{
     unwrapGtkMisc2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkLabel2 (class->A)
     SUPERGO()
@@ -1015,10 +1015,10 @@ static void bridgeGtkLabel2Class(my_GtkLabel2Class_t* class)
 
 // ----- GtkLabel3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkLabel3, move_cursor, void, (void* label, int step, int count, int extend_selection), 4, label, step, count, extend_selection);
-WRAPPER(GtkLabel3, copy_clipboard, void, (void* label), 1, label);
-WRAPPER(GtkLabel3, populate_popup, void, (void* label, void* menu), 2, label, menu);
-WRAPPER(GtkLabel3, activate_link, int, (void* label, void* uri), 2, label, uri);
+WRAPPER(GtkLabel3, move_cursor, void, (void* label, int step, int count, int extend_selection), "piii", label, step, count, extend_selection);
+WRAPPER(GtkLabel3, copy_clipboard, void, (void* label), "p", label);
+WRAPPER(GtkLabel3, populate_popup, void, (void* label, void* menu), "pp", label, menu);
+WRAPPER(GtkLabel3, activate_link, int, (void* label, void* uri), "pp", label, uri);
 
 #define SUPERGO() \
     GO(move_cursor, vFpiii);    \
@@ -1055,22 +1055,22 @@ static void bridgeGtkLabel3Class(my_GtkLabel3Class_t* class)
 
 // ----- GtkTreeView2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkTreeView2, set_scroll_adjustments, void, (void* tree_view, void* hadjustment, void* vadjustment), 3, tree_view, hadjustment, vadjustment);
-WRAPPER(GtkTreeView2, row_activated, void, (void* tree_view, void* path, void* column), 3, tree_view, path, column);
-WRAPPER(GtkTreeView2, test_expand_row, int, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
-WRAPPER(GtkTreeView2, test_collapse_row, int, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
-WRAPPER(GtkTreeView2, row_expanded, void, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
-WRAPPER(GtkTreeView2, row_collapsed, void, (void* tree_view, void* iter, void* path), 3, tree_view, iter, path);
-WRAPPER(GtkTreeView2, columns_changed, void, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, cursor_changed, void, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, move_cursor, int, (void* tree_view, int step, int count), 3, tree_view, step, count);
-WRAPPER(GtkTreeView2, select_all, int, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, unselect_all, int, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, select_cursor_row, int, (void* tree_view, int start_editing), 2, tree_view, start_editing);
-WRAPPER(GtkTreeView2, toggle_cursor_row, int, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, expand_collapse_cursor_row, int, (void* tree_view, int logical, int expand, int open_all), 4, tree_view, logical, expand, open_all);
-WRAPPER(GtkTreeView2, select_cursor_parent, int, (void* tree_view), 1, tree_view);
-WRAPPER(GtkTreeView2, start_interactive_search, int, (void* tree_view), 1, tree_view);
+WRAPPER(GtkTreeView2, set_scroll_adjustments, void, (void* tree_view, void* hadjustment, void* vadjustment), "ppp", tree_view, hadjustment, vadjustment);
+WRAPPER(GtkTreeView2, row_activated, void, (void* tree_view, void* path, void* column), "ppp", tree_view, path, column);
+WRAPPER(GtkTreeView2, test_expand_row, int, (void* tree_view, void* iter, void* path), "ppp", tree_view, iter, path);
+WRAPPER(GtkTreeView2, test_collapse_row, int, (void* tree_view, void* iter, void* path), "ppp", tree_view, iter, path);
+WRAPPER(GtkTreeView2, row_expanded, void, (void* tree_view, void* iter, void* path), "ppp", tree_view, iter, path);
+WRAPPER(GtkTreeView2, row_collapsed, void, (void* tree_view, void* iter, void* path), "ppp", tree_view, iter, path);
+WRAPPER(GtkTreeView2, columns_changed, void, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, cursor_changed, void, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, move_cursor, int, (void* tree_view, int step, int count), "pii", tree_view, step, count);
+WRAPPER(GtkTreeView2, select_all, int, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, unselect_all, int, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, select_cursor_row, int, (void* tree_view, int start_editing), "pi", tree_view, start_editing);
+WRAPPER(GtkTreeView2, toggle_cursor_row, int, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, expand_collapse_cursor_row, int, (void* tree_view, int logical, int expand, int open_all), "piii", tree_view, logical, expand, open_all);
+WRAPPER(GtkTreeView2, select_cursor_parent, int, (void* tree_view), "p", tree_view);
+WRAPPER(GtkTreeView2, start_interactive_search, int, (void* tree_view), "p", tree_view);
 
 #define SUPERGO() \
     GO(set_scroll_adjustments, vFppp);      \
@@ -1100,7 +1100,7 @@ static void wrapGtkTreeView2Class(my_GtkTreeView2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkTreeView2Class(my_GtkTreeView2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkTreeView2 (class->A)
     SUPERGO()
@@ -1126,7 +1126,7 @@ static void wrapGtkBin2Class(my_GtkBin2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkBin2Class(my_GtkBin2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
 }
 // autobridge
@@ -1153,12 +1153,12 @@ static void bridgeGtkBin3Class(my_GtkBin3Class_t* class)
 
 // ----- GtkWindow2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkWindow2, set_focus, void, (void* window, void* focus), 2, window, focus);
-WRAPPER(GtkWindow2, frame_event, int, (void* window, void* event), 2, window, event);
-WRAPPER(GtkWindow2, activate_focus, void, (void* window), 1, window);
-WRAPPER(GtkWindow2, activate_default, void, (void* window), 1, window);
-WRAPPER(GtkWindow2, move_focus, void, (void* window, int direction), 2, window, direction);
-WRAPPER(GtkWindow2, keys_changed, void, (void* window), 1, window);
+WRAPPER(GtkWindow2, set_focus, void, (void* window, void* focus), "pp", window, focus);
+WRAPPER(GtkWindow2, frame_event, int, (void* window, void* event), "pp", window, event);
+WRAPPER(GtkWindow2, activate_focus, void, (void* window), "p", window);
+WRAPPER(GtkWindow2, activate_default, void, (void* window), "p", window);
+WRAPPER(GtkWindow2, move_focus, void, (void* window, int direction), "pi", window, direction);
+WRAPPER(GtkWindow2, keys_changed, void, (void* window), "p", window);
 
 #define SUPERGO()               \
     GO(set_focus, vFpp);        \
@@ -1179,7 +1179,7 @@ static void wrapGtkWindow2Class(my_GtkWindow2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkWindow2Class(my_GtkWindow2Class_t* class)
-{   
+{
     unwrapGtkBin2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkWindow2 (class->A)
     SUPERGO()
@@ -1198,11 +1198,11 @@ static void bridgeGtkWindow2Class(my_GtkWindow2Class_t* class)
 
 // ----- GtkWindow3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkWindow3, set_focus, void, (void* window, void* focus), 2, window, focus);
-WRAPPER(GtkWindow3, activate_focus, void, (void* window), 1, window);
-WRAPPER(GtkWindow3, activate_default, void, (void* window), 1, window);
-WRAPPER(GtkWindow3, keys_changed, void, (void* window), 1, window);
-WRAPPER(GtkWindow3, enable_debugging, int, (void* window, int toggle), 2, window, toggle);
+WRAPPER(GtkWindow3, set_focus, void, (void* window, void* focus), "pp", window, focus);
+WRAPPER(GtkWindow3, activate_focus, void, (void* window), "p", window);
+WRAPPER(GtkWindow3, activate_default, void, (void* window), "p", window);
+WRAPPER(GtkWindow3, keys_changed, void, (void* window), "p", window);
+WRAPPER(GtkWindow3, enable_debugging, int, (void* window, int toggle), "pi", window, toggle);
 
 #define SUPERGO()               \
     GO(set_focus, vFpp);        \
@@ -1258,14 +1258,14 @@ static void bridgeGtkApplicationWindowClass(my_GtkApplicationWindowClass_t* clas
 
 // ----- GtkListBoxClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkListBoxClass,row_selected, void, (void *box, void *row), 2, box, row);
-WRAPPER(GtkListBoxClass,row_activated, void, (void *box, void *row), 2, box, row);
-WRAPPER(GtkListBoxClass,activate_cursor_row, void, (void *box), 1, box);
-WRAPPER(GtkListBoxClass,toggle_cursor_row, void, (void *box), 1, box);
-WRAPPER(GtkListBoxClass,move_cursor, void, (void *box, int step, int count), 3, box, step, count);
-WRAPPER(GtkListBoxClass,selected_rows_changed, void, (void *box), 1, box);
-WRAPPER(GtkListBoxClass,select_all, void, (void *box), 1, box);
-WRAPPER(GtkListBoxClass,unselect_all, void, (void *box), 1, box);
+WRAPPER(GtkListBoxClass,row_selected, void, (void *box, void *row), "pp", box, row);
+WRAPPER(GtkListBoxClass,row_activated, void, (void *box, void *row), "pp", box, row);
+WRAPPER(GtkListBoxClass,activate_cursor_row, void, (void *box), "p", box);
+WRAPPER(GtkListBoxClass,toggle_cursor_row, void, (void *box), "p", box);
+WRAPPER(GtkListBoxClass,move_cursor, void, (void *box, int step, int count), "pii", box, step, count);
+WRAPPER(GtkListBoxClass,selected_rows_changed, void, (void *box), "p", box);
+WRAPPER(GtkListBoxClass,select_all, void, (void *box), "p", box);
+WRAPPER(GtkListBoxClass,unselect_all, void, (void *box), "p", box);
 
 #define SUPERGO()                  \
     GO(row_selected, vFpp);        \
@@ -1306,7 +1306,7 @@ static void bridgeGtkListBoxClass(my_GtkListBoxClass_t* class)
 
 // ----- GtkListBoxRowClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkListBoxRowClass, activate, void, (void *row), 1, row);
+WRAPPER(GtkListBoxRowClass, activate, void, (void *row), "p", row);
 
 #define SUPERGO()       \
     GO(activate, vFpp);
@@ -1346,7 +1346,7 @@ static void wrapGtkTable2Class(my_GtkTable2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkTable2Class(my_GtkTable2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
 }
 // autobridge
@@ -1364,7 +1364,7 @@ static void wrapGtkFixed2Class(my_GtkFixed2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkFixed2Class(my_GtkFixed2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
 }
 // autobridge
@@ -1382,7 +1382,7 @@ static void wrapMetaFrames2Class(my_MetaFrames2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapMetaFrames2Class(my_MetaFrames2Class_t* class)
-{   
+{
     unwrapGtkWindow2Class(&class->parent_class);
 }
 // autobridge
@@ -1393,8 +1393,8 @@ static void bridgeMetaFrames2Class(my_MetaFrames2Class_t* class)
 
 // ----- GDBusObjectManagerClientClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GDBusObjectManagerClient,interface_proxy_signal, void, (void* manager, void* object_proxy, void* interface_proxy, void* sender_name, void* signal_name, void* parameters), 6, manager, object_proxy, interface_proxy, sender_name, signal_name, parameters);
-WRAPPER(GDBusObjectManagerClient,interface_proxy_properties_changed, void, (void* manager, void* object_proxy, void* interface_proxy, void* changed_properties, void* invalidated_properties), 5, manager, object_proxy, interface_proxy, changed_properties, invalidated_properties);
+WRAPPER(GDBusObjectManagerClient,interface_proxy_signal, void, (void* manager, void* object_proxy, void* interface_proxy, void* sender_name, void* signal_name, void* parameters), "pppppp", manager, object_proxy, interface_proxy, sender_name, signal_name, parameters);
+WRAPPER(GDBusObjectManagerClient,interface_proxy_properties_changed, void, (void* manager, void* object_proxy, void* interface_proxy, void* changed_properties, void* invalidated_properties), "ppppp", manager, object_proxy, interface_proxy, changed_properties, invalidated_properties);
 
 #define SUPERGO()                                       \
     GO(interface_proxy_signal, vFpppppp);               \
@@ -1411,7 +1411,7 @@ static void wrapGDBusObjectManagerClientClass(my_GDBusObjectManagerClientClass_t
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGDBusObjectManagerClientClass(my_GDBusObjectManagerClientClass_t* class)
-{   
+{
     unwrapGObjectClass(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GDBusObjectManagerClient (class->A)
     SUPERGO()
@@ -1430,12 +1430,12 @@ static void bridgeGDBusObjectManagerClientClass(my_GDBusObjectManagerClientClass
 
 // ----- GtkButton2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkButton2, pressed, void,  (void* button), 1, button);
-WRAPPER(GtkButton2, released, void, (void* button), 1, button);
-WRAPPER(GtkButton2, clicked, void,  (void* button), 1, button);
-WRAPPER(GtkButton2, enter, void,    (void* button), 1, button);
-WRAPPER(GtkButton2, leave, void,    (void* button), 1, button);
-WRAPPER(GtkButton2, activate, void, (void* button), 1, button);
+WRAPPER(GtkButton2, pressed, void,  (void* button), "p", button);
+WRAPPER(GtkButton2, released, void, (void* button), "p", button);
+WRAPPER(GtkButton2, clicked, void,  (void* button), "p", button);
+WRAPPER(GtkButton2, enter, void,    (void* button), "p", button);
+WRAPPER(GtkButton2, leave, void,    (void* button), "p", button);
+WRAPPER(GtkButton2, activate, void, (void* button), "p", button);
 
 #define SUPERGO()               \
     GO(pressed, vFp);           \
@@ -1456,7 +1456,7 @@ static void wrapGtkButton2Class(my_GtkButton2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkButton2Class(my_GtkButton2Class_t* class)
-{   
+{
     unwrapGtkBin2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkButton2 (class->A)
     SUPERGO()
@@ -1475,12 +1475,12 @@ static void bridgeGtkButton2Class(my_GtkButton2Class_t* class)
 
 // ----- GtkButton3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkButton3, pressed, void,  (void* button), 1, button);
-WRAPPER(GtkButton3, released, void, (void* button), 1, button);
-WRAPPER(GtkButton3, clicked, void,  (void* button), 1, button);
-WRAPPER(GtkButton3, enter, void,    (void* button), 1, button);
-WRAPPER(GtkButton3, leave, void,    (void* button), 1, button);
-WRAPPER(GtkButton3, activate, void, (void* button), 1, button);
+WRAPPER(GtkButton3, pressed, void,  (void* button), "p", button);
+WRAPPER(GtkButton3, released, void, (void* button), "p", button);
+WRAPPER(GtkButton3, clicked, void,  (void* button), "p", button);
+WRAPPER(GtkButton3, enter, void,    (void* button), "p", button);
+WRAPPER(GtkButton3, leave, void,    (void* button), "p", button);
+WRAPPER(GtkButton3, activate, void, (void* button), "p", button);
 
 #define SUPERGO()               \
     GO(pressed, vFp);           \
@@ -1520,8 +1520,8 @@ static void bridgeGtkButton3Class(my_GtkButton3Class_t* class)
 
 // ----- GtkComboBox2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkComboBox2, changed, void, (void* combo_box), 1, combo_box);
-WRAPPER(GtkComboBox2, get_active_text, void*, (void* combo_box), 1, combo_box);
+WRAPPER(GtkComboBox2, changed, void, (void* combo_box), "p", combo_box);
+WRAPPER(GtkComboBox2, get_active_text, void*, (void* combo_box), "p", combo_box);
 
 #define SUPERGO()               \
     GO(changed, vFp);           \
@@ -1538,7 +1538,7 @@ static void wrapGtkComboBox2Class(my_GtkComboBox2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkComboBox2Class(my_GtkComboBox2Class_t* class)
-{   
+{
     unwrapGtkBin2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkComboBox2 (class->A)
     SUPERGO()
@@ -1557,7 +1557,7 @@ static void bridgeGtkComboBox2Class(my_GtkComboBox2Class_t* class)
 
 // ----- GtkToggleButton2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkToggleButton2, toggled, void, (void* toggle_button), 1, toggle_button);
+WRAPPER(GtkToggleButton2, toggled, void, (void* toggle_button), "p", toggle_button);
 
 #define SUPERGO()               \
     GO(toggled, vFp);           \
@@ -1573,7 +1573,7 @@ static void wrapGtkToggleButton2Class(my_GtkToggleButton2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkToggleButton2Class(my_GtkToggleButton2Class_t* class)
-{   
+{
     unwrapGtkButton2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkToggleButton2 (class->A)
     SUPERGO()
@@ -1592,7 +1592,7 @@ static void bridgeGtkToggleButton2Class(my_GtkToggleButton2Class_t* class)
 
 // ----- GtkCheckButton2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkCheckButton2, draw_indicator, void, (void* check_button, void* area), 2, check_button, area);
+WRAPPER(GtkCheckButton2, draw_indicator, void, (void* check_button, void* area), "pp", check_button, area);
 
 #define SUPERGO()               \
     GO(draw_indicator, vFpp);   \
@@ -1608,7 +1608,7 @@ static void wrapGtkCheckButton2Class(my_GtkCheckButton2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkCheckButton2Class(my_GtkCheckButton2Class_t* class)
-{   
+{
     unwrapGtkToggleButton2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkCheckButton2 (class->A)
     SUPERGO()
@@ -1627,17 +1627,17 @@ static void bridgeGtkCheckButton2Class(my_GtkCheckButton2Class_t* class)
 
 // ----- GtkEntry2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkEntry2, populate_popup, void,     (void* entry, void* menu), 2, entry, menu);
-WRAPPER(GtkEntry2, activate, void,           (void* entry), 1, entry);
-WRAPPER(GtkEntry2, move_cursor, void,        (void* entry, int step, int count, int extend_selection), 4, entry, step, count, extend_selection);
-WRAPPER(GtkEntry2, insert_at_cursor, void,   (void* entry, void* str), 2, entry, str);
-WRAPPER(GtkEntry2, delete_from_cursor, void, (void* entry, size_t type, int count), 3, entry, type, count);
-WRAPPER(GtkEntry2, backspace, void,          (void* entry), 1, entry);
-WRAPPER(GtkEntry2, cut_clipboard, void,      (void* entry), 1, entry);
-WRAPPER(GtkEntry2, copy_clipboard, void,     (void* entry), 1, entry);
-WRAPPER(GtkEntry2, paste_clipboard, void,    (void* entry), 1, entry);
-WRAPPER(GtkEntry2, toggle_overwrite, void,   (void* entry), 1, entry);
-WRAPPER(GtkEntry2, get_text_area_size, void, (void* entry, void* x, void* y, void* width, void* height), 5, entry, x, y, width, height);
+WRAPPER(GtkEntry2, populate_popup, void,     (void* entry, void* menu), "pp", entry, menu);
+WRAPPER(GtkEntry2, activate, void,           (void* entry), "p", entry);
+WRAPPER(GtkEntry2, move_cursor, void,        (void* entry, int step, int count, int extend_selection), "piii", entry, step, count, extend_selection);
+WRAPPER(GtkEntry2, insert_at_cursor, void,   (void* entry, void* str), "pp", entry, str);
+WRAPPER(GtkEntry2, delete_from_cursor, void, (void* entry, size_t type, int count), "pLi", entry, type, count);
+WRAPPER(GtkEntry2, backspace, void,          (void* entry), "p", entry);
+WRAPPER(GtkEntry2, cut_clipboard, void,      (void* entry), "p", entry);
+WRAPPER(GtkEntry2, copy_clipboard, void,     (void* entry), "p", entry);
+WRAPPER(GtkEntry2, paste_clipboard, void,    (void* entry), "p", entry);
+WRAPPER(GtkEntry2, toggle_overwrite, void,   (void* entry), "p", entry);
+WRAPPER(GtkEntry2, get_text_area_size, void, (void* entry, void* x, void* y, void* width, void* height), "ppppp", entry, x, y, width, height);
 
 #define SUPERGO()                   \
     GO(populate_popup, vFpp);       \
@@ -1662,7 +1662,7 @@ static void wrapGtkEntry2Class(my_GtkEntry2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkEntry2Class(my_GtkEntry2Class_t* class)
-{   
+{
     unwrapGtkWidget2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkEntry2 (class->A)
     SUPERGO()
@@ -1681,11 +1681,11 @@ static void bridgeGtkEntry2Class(my_GtkEntry2Class_t* class)
 
 // ----- GtkSpinButton2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkSpinButton2, input, int,  (void* spin_button, void* new_value), 2, spin_button, new_value);
-WRAPPER(GtkSpinButton2, output, int, (void* spin_button), 1, spin_button);
-WRAPPER(GtkSpinButton2, value_changed, void, (void* spin_button), 1, spin_button);
-WRAPPER(GtkSpinButton2, change_value, void, (void* spin_button, int scroll), 2, spin_button, scroll);
-WRAPPER(GtkSpinButton2, wrapped, void, (void* spin_button), 1, spin_button);
+WRAPPER(GtkSpinButton2, input, int,  (void* spin_button, void* new_value), "pp", spin_button, new_value);
+WRAPPER(GtkSpinButton2, output, int, (void* spin_button), "p", spin_button);
+WRAPPER(GtkSpinButton2, value_changed, void, (void* spin_button), "p", spin_button);
+WRAPPER(GtkSpinButton2, change_value, void, (void* spin_button, int scroll), "pi", spin_button, scroll);
+WRAPPER(GtkSpinButton2, wrapped, void, (void* spin_button), "p", spin_button);
 
 #define SUPERGO()           \
     GO(input, iFpp);        \
@@ -1704,7 +1704,7 @@ static void wrapGtkSpinButton2Class(my_GtkSpinButton2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkSpinButton2Class(my_GtkSpinButton2Class_t* class)
-{   
+{
     unwrapGtkEntry2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkSpinButton2 (class->A)
     SUPERGO()
@@ -1723,9 +1723,9 @@ static void bridgeGtkSpinButton2Class(my_GtkSpinButton2Class_t* class)
 
 // ----- GtkProgress2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkProgress2, paint, void,          (void* progress), 1, progress);
-WRAPPER(GtkProgress2, update, void,         (void* progress), 1, progress);
-WRAPPER(GtkProgress2, act_mode_enter, void, (void* progress), 1, progress);
+WRAPPER(GtkProgress2, paint, void,          (void* progress), "p", progress);
+WRAPPER(GtkProgress2, update, void,         (void* progress), "p", progress);
+WRAPPER(GtkProgress2, act_mode_enter, void, (void* progress), "p", progress);
 
 #define SUPERGO()           \
     GO(paint, vFp);         \
@@ -1742,7 +1742,7 @@ static void wrapGtkProgress2Class(my_GtkProgress2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkProgress2Class(my_GtkProgress2Class_t* class)
-{   
+{
     unwrapGtkWidget2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkProgress2 (class->A)
     SUPERGO()
@@ -1774,7 +1774,7 @@ static void wrapGtkProgressBar2Class(my_GtkProgressBar2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkProgressBar2Class(my_GtkProgressBar2Class_t* class)
-{   
+{
     unwrapGtkProgress2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkProgressBar2 (class->A)
     SUPERGO()
@@ -1793,7 +1793,7 @@ static void bridgeGtkProgressBar2Class(my_GtkProgressBar2Class_t* class)
 
 // ----- GtkFrame2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkFrame2, compute_child_allocation, void, (void* frame, void* allocation), 2, frame, allocation);
+WRAPPER(GtkFrame2, compute_child_allocation, void, (void* frame, void* allocation), "pp", frame, allocation);
 
 #define SUPERGO()                       \
     GO(compute_child_allocation, vFpp); \
@@ -1808,7 +1808,7 @@ static void wrapGtkFrame2Class(my_GtkFrame2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkFrame2Class(my_GtkFrame2Class_t* class)
-{   
+{
     unwrapGtkBin2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkFrame2 (class->A)
     SUPERGO()
@@ -1827,15 +1827,15 @@ static void bridgeGtkFrame2Class(my_GtkFrame2Class_t* class)
 
 // ----- GtkMenuShell2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkMenuShell2,deactivate, void,      (void* menu_shell), 1, menu_shell);
-WRAPPER(GtkMenuShell2,selection_done, void,  (void* menu_shell), 1, menu_shell);
-WRAPPER(GtkMenuShell2,move_current, void,    (void* menu_shell, int direction), 2, menu_shell, direction);
-WRAPPER(GtkMenuShell2,activate_current, void,(void* menu_shell, int force_hide), 2, menu_shell, force_hide);
-WRAPPER(GtkMenuShell2,cancel, void,          (void* menu_shell), 1, menu_shell);
-WRAPPER(GtkMenuShell2,select_item, void,     (void* menu_shell, void* menu_item), 2, menu_shell, menu_item);
-WRAPPER(GtkMenuShell2,insert, void,          (void* menu_shell, void* child, int position), 3, menu_shell, child, position);
-WRAPPER(GtkMenuShell2,get_popup_delay, int,  (void* menu_shell), 1, menu_shell);
-WRAPPER(GtkMenuShell2,move_selected, int,    (void* menu_shell, int distance), 2, menu_shell, distance);
+WRAPPER(GtkMenuShell2,deactivate, void,      (void* menu_shell), "p", menu_shell);
+WRAPPER(GtkMenuShell2,selection_done, void,  (void* menu_shell), "p", menu_shell);
+WRAPPER(GtkMenuShell2,move_current, void,    (void* menu_shell, int direction),  "pi", menu_shell, direction);
+WRAPPER(GtkMenuShell2,activate_current, void,(void* menu_shell, int force_hide), "pi", menu_shell, force_hide);
+WRAPPER(GtkMenuShell2,cancel, void,          (void* menu_shell), "p", menu_shell);
+WRAPPER(GtkMenuShell2,select_item, void,     (void* menu_shell, void* menu_item), "pp", menu_shell, menu_item);
+WRAPPER(GtkMenuShell2,insert, void,          (void* menu_shell, void* child, int position), "ppi", menu_shell, child, position);
+WRAPPER(GtkMenuShell2,get_popup_delay, int,  (void* menu_shell), "p", menu_shell);
+WRAPPER(GtkMenuShell2,move_selected, int,    (void* menu_shell, int distance), "pi", menu_shell, distance);
 
 #define SUPERGO()               \
     GO(deactivate, vFp);        \
@@ -1858,7 +1858,7 @@ static void wrapGtkMenuShell2Class(my_GtkMenuShell2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkMenuShell2Class(my_GtkMenuShell2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkMenuShell2 (class->A)
     SUPERGO()
@@ -1890,7 +1890,7 @@ static void wrapGtkMenuBar2Class(my_GtkMenuBar2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkMenuBar2Class(my_GtkMenuBar2Class_t* class)
-{   
+{
     unwrapGtkMenuShell2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkMenuBar2 (class->A)
     SUPERGO()
@@ -1909,19 +1909,19 @@ static void bridgeGtkMenuBar2Class(my_GtkMenuBar2Class_t* class)
 
 // ----- GtkTextView2Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkTextView2, set_scroll_adjustments, void,   (void* text_view, void* hadjustment, void* vadjustment), 3, text_view, hadjustment, vadjustment);
-WRAPPER(GtkTextView2, populate_popup, void,           (void* text_view, void* menu), 2, text_view, menu);
-WRAPPER(GtkTextView2, move_cursor, void,              (void* text_view, int step, int count, int extend_selection), 4, text_view, step, count, extend_selection);
-WRAPPER(GtkTextView2, page_horizontally, void,        (void* text_view, int count, int extend_selection), 3, text_view, count, extend_selection);
-WRAPPER(GtkTextView2, set_anchor, void,               (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, insert_at_cursor, void,         (void* text_view, void* str), 2, text_view, str);
-WRAPPER(GtkTextView2, delete_from_cursor, void,       (void* text_view, int type, int count), 3, text_view, type, count);
-WRAPPER(GtkTextView2, backspace, void,                (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, cut_clipboard, void,            (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, copy_clipboard, void,           (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, paste_clipboard, void,          (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, toggle_overwrite, void,         (void* text_view), 1, text_view);
-WRAPPER(GtkTextView2, move_focus, void,               (void* text_view, int direction), 2, text_view, direction);
+WRAPPER(GtkTextView2, set_scroll_adjustments, void,   (void* text_view, void* hadjustment, void* vadjustment), "ppp", text_view, hadjustment, vadjustment);
+WRAPPER(GtkTextView2, populate_popup, void,           (void* text_view, void* menu), "pp", text_view, menu);
+WRAPPER(GtkTextView2, move_cursor, void,              (void* text_view, int step, int count, int extend_selection), "piii", text_view, step, count, extend_selection);
+WRAPPER(GtkTextView2, page_horizontally, void,        (void* text_view, int count, int extend_selection), "pii", text_view, count, extend_selection);
+WRAPPER(GtkTextView2, set_anchor, void,               (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, insert_at_cursor, void,         (void* text_view, void* str), "pp", text_view, str);
+WRAPPER(GtkTextView2, delete_from_cursor, void,       (void* text_view, int type, int count), "pii", text_view, type, count);
+WRAPPER(GtkTextView2, backspace, void,                (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, cut_clipboard, void,            (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, copy_clipboard, void,           (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, paste_clipboard, void,          (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, toggle_overwrite, void,         (void* text_view), "p", text_view);
+WRAPPER(GtkTextView2, move_focus, void,               (void* text_view, int direction), "pi", text_view, direction);
 
 #define SUPERGO()                       \
     GO(set_scroll_adjustments, vFppp);  \
@@ -1948,7 +1948,7 @@ static void wrapGtkTextView2Class(my_GtkTextView2Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkTextView2Class(my_GtkTextView2Class_t* class)
-{   
+{
     unwrapGtkContainer2Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkTextView2 (class->A)
     SUPERGO()
@@ -1967,20 +1967,20 @@ static void bridgeGtkTextView2Class(my_GtkTextView2Class_t* class)
 
 // ----- GtkTextView3Class ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkTextView3, populate_popup, void,           (void* text_view, void* menu), 2, text_view, menu);
-WRAPPER(GtkTextView3, move_cursor, void,              (void* text_view, int step, int count, int extend_selection), 4, text_view, step, count, extend_selection);
-WRAPPER(GtkTextView3, set_anchor, void,               (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, insert_at_cursor, void,         (void* text_view, void* str), 2, text_view, str);
-WRAPPER(GtkTextView3, delete_from_cursor, void,       (void* text_view, int type, int count), 3, text_view, type, count);
-WRAPPER(GtkTextView3, backspace, void,                (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, cut_clipboard, void,            (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, copy_clipboard, void,           (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, paste_clipboard, void,          (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, toggle_overwrite, void,         (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, create_buffer, void*,           (void* text_view), 1, text_view);
-WRAPPER(GtkTextView3, draw_layer, void,               (void* text_view, int layer, void* cr), 3, text_view, layer, cr);
-WRAPPER(GtkTextView3, extend_selection, int,          (void* text_view, int granularity, void* location, void* start, void* end), 5, text_view, granularity, location, start, end);
-WRAPPER(GtkTextView3, insert_emoji, void,             (void* text_view), 1, text_view);
+WRAPPER(GtkTextView3, populate_popup, void,           (void* text_view, void* menu), "pp", text_view, menu);
+WRAPPER(GtkTextView3, move_cursor, void,              (void* text_view, int step, int count, int extend_selection), "piii", text_view, step, count, extend_selection);
+WRAPPER(GtkTextView3, set_anchor, void,               (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, insert_at_cursor, void,         (void* text_view, void* str), "pp", text_view, str);
+WRAPPER(GtkTextView3, delete_from_cursor, void,       (void* text_view, int type, int count), "pii", text_view, type, count);
+WRAPPER(GtkTextView3, backspace, void,                (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, cut_clipboard, void,            (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, copy_clipboard, void,           (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, paste_clipboard, void,          (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, toggle_overwrite, void,         (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, create_buffer, void*,           (void* text_view), "p", text_view);
+WRAPPER(GtkTextView3, draw_layer, void,               (void* text_view, int layer, void* cr), "pip", text_view, layer, cr);
+WRAPPER(GtkTextView3, extend_selection, int,          (void* text_view, int granularity, void* location, void* start, void* end), "pippp", text_view, granularity, location, start, end);
+WRAPPER(GtkTextView3, insert_emoji, void,             (void* text_view), "p", text_view);
 
 #define SUPERGO()                       \
     GO(populate_popup, vFpp);           \
@@ -2008,7 +2008,7 @@ static void wrapGtkTextView3Class(my_GtkTextView3Class_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGtkTextView3Class(my_GtkTextView3Class_t* class)
-{   
+{
     unwrapGtkContainer3Class(&class->parent_class);
     #define GO(A, W)   class->A = find_##A##_GtkTextView3 (class->A)
     SUPERGO()
@@ -2059,12 +2059,12 @@ static void bridgeGtkGrid3Class(my_GtkGrid3Class_t* class)
 
 // ----- GtkEventControllerClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkEventController, set_widget, void, (void* controller, void* widget), 2, controller, widget);
-WRAPPER(GtkEventController, unset_widget, void, (void* controller), 1, controller);
-WRAPPER(GtkEventController, handle_event, int, (void *controller, void *event, double x, double y), 4, controller, event, x, y);
-WRAPPER(GtkEventController, reset, void, (void* controller), 1, controller);
-WRAPPER(GtkEventController, handle_crossing, void, (void *controller, void *crossing, double x, double y), 4, controller, crossing, x, y);
-WRAPPER(GtkEventController, filter_event, void, (void *controller, void *event), 2, controller, event);
+WRAPPER(GtkEventController, set_widget, void, (void* controller, void* widget), "pp", controller, widget);
+WRAPPER(GtkEventController, unset_widget, void, (void* controller), "p", controller);
+WRAPPER(GtkEventController, handle_event, int, (void *controller, void *event, double x, double y), "ppdd", controller, event, x, y);
+WRAPPER(GtkEventController, reset, void, (void* controller), "p", controller);
+WRAPPER(GtkEventController, handle_crossing, void, (void *controller, void *crossing, double x, double y), "ppdd", controller, crossing, x, y);
+WRAPPER(GtkEventController, filter_event, void, (void *controller, void *event), "pp", controller, event);
 
 #define SUPERGO()               \
     GO(set_widget, vFpp);       \
@@ -2103,12 +2103,12 @@ static void bridgeGtkEventControllerClass(my_GtkEventControllerClass_t* class)
 
 // ----- GtkGestureClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkGesture, check, void, (void* gesture), 1, gesture);
-WRAPPER(GtkGesture, begin, void, (void *gesture, void *sequence), 2, gesture, sequence);
-WRAPPER(GtkGesture, update, void, (void *gesture, void *sequence), 2, gesture, sequence);
-WRAPPER(GtkGesture, end, void, (void *gesture, void *sequence), 2, gesture, sequence);
-WRAPPER(GtkGesture, cancel, void, (void *gesture, void *sequence), 2, gesture, sequence);
-WRAPPER(GtkGesture, sequence_state_changed, void, (void *gesture, void *sequence, int state), 3, gesture, sequence, state);
+WRAPPER(GtkGesture, check, void, (void* gesture), "p", gesture);
+WRAPPER(GtkGesture, begin, void, (void *gesture, void *sequence), "pp", gesture, sequence);
+WRAPPER(GtkGesture, update, void, (void *gesture, void *sequence), "pp", gesture, sequence);
+WRAPPER(GtkGesture, end, void, (void *gesture, void *sequence), "pp", gesture, sequence);
+WRAPPER(GtkGesture, cancel, void, (void *gesture, void *sequence), "pp", gesture, sequence);
+WRAPPER(GtkGesture, sequence_state_changed, void, (void *gesture, void *sequence, int state), "ppi", gesture, sequence, state);
 
 #define SUPERGO()              \
     GO(check, vFp);            \
@@ -2164,8 +2164,8 @@ static void bridgeGtkGestureSingleClass(my_GtkGestureSingleClass_t* class)
 
 // ----- GtkGestureClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GtkGestureLongPress, pressed, void, (void *gesture, double x, double y), 3, gesture, x, y);
-WRAPPER(GtkGestureLongPress, cancelled, void, (void *cancelled), 1, cancelled);
+WRAPPER(GtkGestureLongPress, pressed, void, (void *gesture, double x, double y), "pdd", gesture, x, y);
+WRAPPER(GtkGestureLongPress, cancelled, void, (void *cancelled), "p", cancelled);
 
 #define SUPERGO()              \
     GO(pressed, vFpdd);          \
@@ -2200,32 +2200,32 @@ static void bridgeGtkGestureLongPressClass(my_GtkGestureLongPressClass_t* class)
 
 // ----- AtkObjectClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(AtkObject, get_name, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_description, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_parent, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_n_children, int, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, ref_child, void*, (void* accessible, int i), 2, accessible, i);
-WRAPPER(AtkObject, get_index_in_parent, int, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, ref_relation_set, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_role, int, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_layer, int, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_mdi_zorder, int, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, ref_state_set, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, set_name, void, (void* accessible, void* name), 2, accessible, name);
-WRAPPER(AtkObject, set_description, void, (void* accessible, void* description), 2, accessible, description);
-WRAPPER(AtkObject, set_parent, void, (void* accessible, void* parent), 2, accessible, parent);
-WRAPPER(AtkObject, set_role, void, (void* accessible, int role), 2, accessible, role);
-WRAPPER(AtkObject, connect_property_change_handler, uint32_t, (void* accessible, void* handler), 2, accessible, AddCheckBridge(my_bridge, vFpp, handler, 0, NULL));
-WRAPPER(AtkObject, remove_property_change_handler, void, (void* accessible, uint32_t handler_id), 2, accessible, handler_id);
-WRAPPER(AtkObject, initialize, void, (void* accessible, void* data), 2, accessible, data);
-WRAPPER(AtkObject, children_changed, void, (void* accessible, uint32_t change_index, void* changed_child), 3, accessible, change_index, changed_child);
-WRAPPER(AtkObject, focus_event, void, (void* accessible, int focus_in), 2, accessible, focus_in);
-WRAPPER(AtkObject, property_change, void, (void* accessible, void* values), 2, accessible, values);
-WRAPPER(AtkObject, state_change, void, (void* accessible, void* name, int state_set), 3, accessible, name, state_set);
-WRAPPER(AtkObject, visible_data_changed, void, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, active_descendant_changed, void, (void* accessible, void* child), 2, accessible, child);
-WRAPPER(AtkObject, get_attributes, void*, (void* accessible), 1, accessible);
-WRAPPER(AtkObject, get_object_locale, void*, (void* accessible), 1, accessible);
+WRAPPER(AtkObject, get_name, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_description, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_parent, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_n_children, int, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, ref_child, void*, (void* accessible, int i), "pi", accessible, i);
+WRAPPER(AtkObject, get_index_in_parent, int, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, ref_relation_set, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_role, int, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_layer, int, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_mdi_zorder, int, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, ref_state_set, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, set_name, void, (void* accessible, void* name), "pp", accessible, name);
+WRAPPER(AtkObject, set_description, void, (void* accessible, void* description), "pp", accessible, description);
+WRAPPER(AtkObject, set_parent, void, (void* accessible, void* parent), "pp", accessible, parent);
+WRAPPER(AtkObject, set_role, void, (void* accessible, int role), "pi", accessible, role);
+WRAPPER(AtkObject, connect_property_change_handler, uint32_t, (void* accessible, void* handler), "pp", accessible, AddCheckBridge(my_bridge, vFpp, handler, 0, NULL));
+WRAPPER(AtkObject, remove_property_change_handler, void, (void* accessible, uint32_t handler_id), "pu", accessible, handler_id);
+WRAPPER(AtkObject, initialize, void, (void* accessible, void* data), "pp", accessible, data);
+WRAPPER(AtkObject, children_changed, void, (void* accessible, uint32_t change_index, void* changed_child), "pup", accessible, change_index, changed_child);
+WRAPPER(AtkObject, focus_event, void, (void* accessible, int focus_in), "pi", accessible, focus_in);
+WRAPPER(AtkObject, property_change, void, (void* accessible, void* values), "pp", accessible, values);
+WRAPPER(AtkObject, state_change, void, (void* accessible, void* name, int state_set), "ppi", accessible, name, state_set);
+WRAPPER(AtkObject, visible_data_changed, void, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, active_descendant_changed, void, (void* accessible, void* child), "pp", accessible, child);
+WRAPPER(AtkObject, get_attributes, void*, (void* accessible), "p", accessible);
+WRAPPER(AtkObject, get_object_locale, void*, (void* accessible), "p", accessible);
 
 #define SUPERGO() \
     GO(get_name, pFp);                          \
@@ -2265,7 +2265,7 @@ static void wrapAtkObjectClass(my_AtkObjectClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapAtkObjectClass(my_AtkObjectClass_t* class)
-{   
+{
     unwrapGObjectClass(&class->parent);
     #define GO(A, W)   class->A = find_##A##_AtkObject (class->A)
     SUPERGO()
@@ -2284,13 +2284,13 @@ static void bridgeAtkObjectClass(my_AtkObjectClass_t* class)
 
 // ----- AtkUtilClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(AtkUtil,add_global_event_listener, uint32_t,(void* listener, void* event_type), 2, AddCheckBridge(my_bridge, iFpupp, listener, 0, NULL), event_type);
-WRAPPER(AtkUtil,remove_global_event_listener, void ,(uint32_t listener_id), 1, listener_id);
-WRAPPER(AtkUtil,add_key_event_listener, uint32_t   ,(void* listener, void* data), 2, AddCheckBridge(my_bridge, iFpp, listener, 0, NULL), data);
-WRAPPER(AtkUtil,remove_key_event_listener, void    ,(uint32_t listener_id), 1, listener_id);
-WRAPPER(AtkUtil,get_root, void*                    ,(void), 0, 0);
-WRAPPER(AtkUtil,get_toolkit_name, void*            ,(void), 0, 0);
-WRAPPER(AtkUtil,get_toolkit_version, void*         ,(void), 0, 0);
+WRAPPER(AtkUtil,add_global_event_listener, uint32_t,(void* listener, void* event_type), "pp", AddCheckBridge(my_bridge, iFpupp, listener, 0, NULL), event_type);
+WRAPPER(AtkUtil,remove_global_event_listener, void ,(uint32_t listener_id), "u", listener_id);
+WRAPPER(AtkUtil,add_key_event_listener, uint32_t   ,(void* listener, void* data), "pp", AddCheckBridge(my_bridge, iFpp, listener, 0, NULL), data);
+WRAPPER(AtkUtil,remove_key_event_listener, void    ,(uint32_t listener_id), "u", listener_id);
+WRAPPER(AtkUtil,get_root, void*                    ,(void), "", 0);
+WRAPPER(AtkUtil,get_toolkit_name, void*            ,(void), "", 0);
+WRAPPER(AtkUtil,get_toolkit_version, void*         ,(void), "", 0);
 
 #define SUPERGO() \
     GO(add_global_event_listener, uFpp);        \
@@ -2311,7 +2311,7 @@ static void wrapAtkUtilClass(my_AtkUtilClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapAtkUtilClass(my_AtkUtilClass_t* class)
-{   
+{
     unwrapGObjectClass(&class->parent);
     #define GO(A, W)   class->A = find_##A##_AtkUtil (class->A)
     SUPERGO()
@@ -2330,7 +2330,7 @@ static void bridgeAtkUtilClass(my_AtkUtilClass_t* class)
 
 // ----- GstObjectClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GstObject, deep_notify, void, (void* object, void* origin, void* pspec), 3, object, origin, pspec);
+WRAPPER(GstObject, deep_notify, void, (void* object, void* origin, void* pspec), "ppp", object, origin, pspec);
 
 #define SUPERGO() \
     GO(deep_notify, vFppp); \
@@ -2345,7 +2345,7 @@ static void wrapGstObjectClass(my_GstObjectClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGstObjectClass(my_GstObjectClass_t* class)
-{   
+{
     unwrapGInitiallyUnownedClass(&class->parent);
     #define GO(A, W)   class->A = find_##A##_GstObject (class->A)
     SUPERGO()
@@ -2364,8 +2364,8 @@ static void bridgeGstObjectClass(my_GstObjectClass_t* class)
 
 // ----- GstAllocatorClass ------
 // wrapper x86 -> natives of callbacks
-WRAPPER(GstAllocator, alloc, void*, (void *allocator, size_t size, void *params), 3, allocator, size, params);
-WRAPPER(GstAllocator,free, void,    (void *allocator, void *memory), 2, allocator, memory);
+WRAPPER(GstAllocator, alloc, void*, (void *allocator, size_t size, void *params), "pLp", allocator, size, params);
+WRAPPER(GstAllocator,free, void,    (void *allocator, void *memory), "pp", allocator, memory);
 
 #define SUPERGO() \
     GO(alloc, pFpLp);       \
@@ -2381,7 +2381,7 @@ static void wrapGstAllocatorClass(my_GstAllocatorClass_t* class)
 }
 // unwrap (and use callback if not a native call anymore)
 static void unwrapGstAllocatorClass(my_GstAllocatorClass_t* class)
-{   
+{
     unwrapGstObjectClass(&class->parent);
     #define GO(A, W)   class->A = find_##A##_GstAllocator (class->A)
     SUPERGO()
@@ -2398,6 +2398,84 @@ static void bridgeGstAllocatorClass(my_GstAllocatorClass_t* class)
 
 #undef SUPERGO
 
+// ----- GstTaskPoolClass ------
+// wrapper x86 -> natives of callbacks
+WRAPPER(GstTaskPool, prepare, void,  (void* pool, void* error), "pp", pool, error);
+WRAPPER(GstTaskPool, cleanup, void,  (void* pool), "p", pool);
+WRAPPER(GstTaskPool, push, void*,    (void* pool, void* func, void* user_data, void* error), "pppp", pool, AddCheckBridge(my_bridge, vFp, func, 0, NULL), user_data, error);
+WRAPPER(GstTaskPool, join, void,     (void* pool, void* id), "pp", pool, id);
+WRAPPER(GstTaskPool, dispose_handle, void, (void* pool, void* id), "pp", pool, id);
+
+#define SUPERGO()               \
+    GO(prepare, vFpp);          \
+    GO(cleanup, vFp);           \
+    GO(push, pFpppp);           \
+    GO(join, vFpp);             \
+    GO(dispose_handle, vFpp);   \
+
+// wrap (so bridge all calls, just in case)
+static void wrapGstTaskPoolClass(my_GstTaskPoolClass_t* class)
+{
+    wrapGstObjectClass(&class->parent_class);
+    #define GO(A, W) class->A = reverse_##A##_GstTaskPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+// unwrap (and use callback if not a native call anymore)
+static void unwrapGstTaskPoolClass(my_GstTaskPoolClass_t* class)
+{
+    unwrapGstObjectClass(&class->parent_class);
+    #define GO(A, W)   class->A = find_##A##_GstTaskPool (class->A)
+    SUPERGO()
+    #undef GO
+}
+// autobridge
+static void bridgeGstTaskPoolClass(my_GstTaskPoolClass_t* class)
+{
+    bridgeGstObjectClass(&class->parent_class);
+    #define GO(A, W) autobridge_##A##_GstTaskPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+
+#undef SUPERGO
+
+// ----- GDBusProxyClass ------
+// wrapper x86 -> natives of callbacks
+WRAPPER(GDBusProxy, g_properties_changed, void, (void* proxy, void* changed_properties, const char* const* invalidated_properties), "ppp", proxy, changed_properties, invalidated_properties);
+WRAPPER(GDBusProxy, g_signal, void,             (void* proxy, const char* sender_name, const char* signal_name, void* parameters), "pppp", proxy, sender_name, signal_name, parameters);
+
+#define SUPERGO()                   \
+    GO(g_properties_changed, vFppp);\
+    GO(g_signal, vFpppp);           \
+
+// wrap (so bridge all calls, just in case)
+static void wrapGDBusProxyClass(my_GDBusProxyClass_t* class)
+{
+    wrapGObjectClass(&class->parent_class);
+    #define GO(A, W) class->A = reverse_##A##_GDBusProxy (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+// unwrap (and use callback if not a native call anymore)
+static void unwrapGDBusProxyClass(my_GDBusProxyClass_t* class)
+{
+    unwrapGObjectClass(&class->parent_class);
+    #define GO(A, W)   class->A = find_##A##_GDBusProxy (class->A)
+    SUPERGO()
+    #undef GO
+}
+// autobridge
+static void bridgeGDBusProxyClass(my_GDBusProxyClass_t* class)
+{
+    bridgeGObjectClass(&class->parent_class);
+    #define GO(A, W) autobridge_##A##_GDBusProxy (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+
+#undef SUPERGO
+
 // No more wrap/unwrap
 #undef WRAPPER
 #undef FIND
@@ -2410,11 +2488,12 @@ static void wrapGTKClass(void* cl, size_t type)
     #define GTKCLASS(A)                             \
     if(type==my_##A)                                \
         wrap##A##Class((my_##A##Class_t*)cl);       \
-    else 
+    else
 
     printf_log(LOG_DEBUG, "wrapGTKClass(%p, %zd (%s))\n", cl, type, g_type_name(type));
     GTKCLASSES()
-    {
+    if(type==8) {}  // GInterface have no structure
+    else {
         if(my_MetaFrames2==-1 && !strcmp(g_type_name(type), "MetaFrames")) {
             my_MetaFrames2 = type;
             wrapMetaFrames2Class((my_MetaFrames2Class_t*)cl);
@@ -2429,10 +2508,12 @@ static void unwrapGTKClass(void* cl, size_t type)
     #define GTKCLASS(A)                             \
     if(type==my_##A)                                \
         unwrap##A##Class((my_##A##Class_t*)cl);     \
-    else 
+    else
 
     printf_log(LOG_DEBUG, "unwrapGTKClass(%p, %zd (%s))\n", cl, type, g_type_name(type));
     GTKCLASSES()
+    if(type==8) {}  // GInterface have no structure
+    else
     {}  // else no warning, one is enough...
     #undef GTKCLASS
 }
@@ -2442,11 +2523,12 @@ static void bridgeGTKClass(void* cl, size_t type)
     #define GTKCLASS(A)                             \
     if(type==my_##A)                                \
         bridge##A##Class((my_##A##Class_t*)cl);     \
-    else 
+    else
 
     printf_log(LOG_DEBUG, "bridgeGTKClass(%p, %zd (%s))\n", cl, type, g_type_name(type));
     GTKCLASSES()
-    {
+    if(type==8) {}  // GInterface have no structure
+    else {
         printf_log(LOG_NONE, "Warning, AutoBridge GTK Class with unknown class type %zd (%s)\n", type, g_type_name(type));
     }
     #undef GTKCLASS
@@ -2476,7 +2558,8 @@ void* unwrapCopyGTKClass(void* klass, size_t type)
     size_t sz = 0;
     #define GTKCLASS(A) if(type==my_##A) sz = sizeof(my_##A##Class_t); else
     GTKCLASSES()
-    {
+    if(type==8) {}  // GInterface have no structure
+    else {
         printf_log(LOG_NONE, "Warning, unwrapCopyGTKClass called with unknown class type %zu (%s)\n", type, g_type_name(type));
         return klass;
     }
@@ -2513,7 +2596,8 @@ void* wrapCopyGTKClass(void* klass, size_t type)
     int sz = 0;
     #define GTKCLASS(A) if(type==my_##A) sz = sizeof(my_##A##Class_t); else
     GTKCLASSES()
-    {
+    if(type==8) {}  // GInterface have no structure
+    else {
         if(my_MetaFrames2==-1 && !strcmp(g_type_name(type), "MetaFrames")) {
             my_MetaFrames2 = type;
             sz = sizeof(my_MetaFrames2Class_t);
@@ -2548,10 +2632,10 @@ SUPER()
 // Then the static functions callback that may be used with the structure
 // value_init ...
 #define GO(A)   \
-static uintptr_t my_value_init_fct_##A = 0;                 \
-static void my_value_init_##A(void* a)                      \
-{                                                           \
-    RunFunction(my_context, my_value_init_fct_##A, 1, a);   \
+static uintptr_t my_value_init_fct_##A = 0;                     \
+static void my_value_init_##A(void* a)                          \
+{                                                               \
+    RunFunctionFmt(my_value_init_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -2570,10 +2654,10 @@ static void* find_value_init_Fct(void* fct)
 }
 // value_free ...
 #define GO(A)   \
-static uintptr_t my_value_free_fct_##A = 0;                 \
-static void my_value_free_##A(void* a)                      \
-{                                                           \
-    RunFunction(my_context, my_value_free_fct_##A, 1, a);   \
+static uintptr_t my_value_free_fct_##A = 0;                     \
+static void my_value_free_##A(void* a)                          \
+{                                                               \
+    RunFunctionFmt(my_value_free_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -2592,10 +2676,10 @@ static void* find_value_free_Fct(void* fct)
 }
 // value_copy ...
 #define GO(A)   \
-static uintptr_t my_value_copy_fct_##A = 0;                 \
-static void my_value_copy_##A(void* a, void* b)             \
-{                                                           \
-    RunFunction(my_context, my_value_copy_fct_##A, 2, a, b);\
+static uintptr_t my_value_copy_fct_##A = 0;                     \
+static void my_value_copy_##A(void* a, void* b)                 \
+{                                                               \
+    RunFunctionFmt(my_value_copy_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -2614,10 +2698,10 @@ static void* find_value_copy_Fct(void* fct)
 }
 // value_peek_pointer ...
 #define GO(A)   \
-static uintptr_t my_value_peek_pointer_fct_##A = 0;                             \
-static void* my_value_peek_pointer_##A(void* a)                                 \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_value_peek_pointer_fct_##A, 1, a); \
+static uintptr_t my_value_peek_pointer_fct_##A = 0;                                 \
+static void* my_value_peek_pointer_##A(void* a)                                     \
+{                                                                                   \
+    return (void*)RunFunctionFmt(my_value_peek_pointer_fct_##A, "p", a);\
 }
 SUPER()
 #undef GO
@@ -2636,10 +2720,10 @@ static void* find_value_peek_pointer_Fct(void* fct)
 }
 // collect_value ...
 #define GO(A)   \
-static uintptr_t my_collect_value_fct_##A = 0;                                      \
-static void* my_collect_value_##A(void* a, uint32_t b, void* c, uint32_t d)         \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_collect_value_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_collect_value_fct_##A = 0;                                              \
+static void* my_collect_value_##A(void* a, uint32_t b, void* c, uint32_t d)                 \
+{                                                                                           \
+    return (void*)RunFunctionFmt(my_collect_value_fct_##A, "pupu", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -2658,10 +2742,10 @@ static void* find_collect_value_Fct(void* fct)
 }
 // lcopy_value ...
 #define GO(A)   \
-static uintptr_t my_lcopy_value_fct_##A = 0;                                      \
-static void* my_lcopy_value_##A(void* a, uint32_t b, void* c, uint32_t d)         \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_lcopy_value_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_lcopy_value_fct_##A = 0;                                                \
+static void* my_lcopy_value_##A(void* a, uint32_t b, void* c, uint32_t d)                   \
+{                                                                                           \
+    return (void*)RunFunctionFmt(my_lcopy_value_fct_##A, "pupu", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -2705,10 +2789,10 @@ my_GTypeValueTable_t* findFreeGTypeValueTable(my_GTypeValueTable_t* fcts)
 
 // signal2 ...
 #define GO(A)   \
-static uintptr_t my_signal2_fct_##A = 0;                                \
-static void* my_signal2_##A(void* a, void* b)                           \
-{                                                                       \
-    return (void*)RunFunction(my_context, my_signal2_fct_##A, 2, a, b); \
+static uintptr_t my_signal2_fct_##A = 0;                                        \
+static void* my_signal2_##A(void* a, void* b)                                   \
+{                                                                               \
+    return (void*)RunFunctionFmt(my_signal2_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -2727,10 +2811,10 @@ static void* find_signal2_Fct(void* fct)
 }
 // signal3 ...
 #define GO(A)   \
-static uintptr_t my_signal3_fct_##A = 0;                                    \
-static void* my_signal3_##A(void* a, void* b, void* c)                      \
-{                                                                           \
-    return (void*)RunFunction(my_context, my_signal3_fct_##A, 3, a, b, c);  \
+static uintptr_t my_signal3_fct_##A = 0;                                            \
+static void* my_signal3_##A(void* a, void* b, void* c)                              \
+{                                                                                   \
+    return (void*)RunFunctionFmt(my_signal3_fct_##A, "ppp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -2749,10 +2833,10 @@ static void* find_signal3_Fct(void* fct)
 }
 // signal4 ...
 #define GO(A)   \
-static uintptr_t my_signal4_fct_##A = 0;                                        \
-static void* my_signal4_##A(void* a, void* b, void* c, void* d)                 \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_signal4_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_signal4_fct_##A = 0;                                                \
+static void* my_signal4_##A(void* a, void* b, void* c, void* d)                         \
+{                                                                                       \
+    return (void*)RunFunctionFmt(my_signal4_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -2771,10 +2855,10 @@ static void* find_signal4_Fct(void* fct)
 }
 // signal5 ...
 #define GO(A)   \
-static uintptr_t my_signal5_fct_##A = 0;                                        \
-static void* my_signal5_##A(void* a, void* b, void* c, void* d, void* e)        \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_signal5_fct_##A, 5, a, b, c, d, e);\
+static uintptr_t my_signal5_fct_##A = 0;                                                    \
+static void* my_signal5_##A(void* a, void* b, void* c, void* d, void* e)                    \
+{                                                                                           \
+    return (void*)RunFunctionFmt(my_signal5_fct_##A, "ppppp", a, b, c, d, e);   \
 }
 SUPER()
 #undef GO
@@ -2793,10 +2877,10 @@ static void* find_signal5_Fct(void* fct)
 }
 // signal6 ...
 #define GO(A)   \
-static uintptr_t my_signal6_fct_##A = 0;                                            \
-static void* my_signal6_##A(void* a, void* b, void* c, void* d, void* e, void* f)   \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_signal6_fct_##A, 6, a, b, c, d, e, f); \
+static uintptr_t my_signal6_fct_##A = 0;                                                        \
+static void* my_signal6_##A(void* a, void* b, void* c, void* d, void* e, void* f)               \
+{                                                                                               \
+    return (void*)RunFunctionFmt(my_signal6_fct_##A, "pppppp", a, b, c, d, e, f);   \
 }
 SUPER()
 #undef GO
@@ -2815,10 +2899,10 @@ static void* find_signal6_Fct(void* fct)
 }
 // signal7 ...
 #define GO(A)   \
-static uintptr_t my_signal7_fct_##A = 0;                                            \
-static void* my_signal7_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g)  \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_signal7_fct_##A, 7, a, b, c, d, e, f, g);      \
+static uintptr_t my_signal7_fct_##A = 0;                                                            \
+static void* my_signal7_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g)          \
+{                                                                                                   \
+    return (void*)RunFunctionFmt(my_signal7_fct_##A, "ppppppp", a, b, c, d, e, f, g);   \
 }
 SUPER()
 #undef GO
@@ -2907,7 +2991,7 @@ SUPER()
 static uintptr_t my_base_init_fct_##A = 0;                          \
 static int my_base_init_##A(void* a)                                \
 {                                                                   \
-    return RunFunction(my_context, my_base_init_fct_##A, 1, a);     \
+    return RunFunctionFmt(my_base_init_fct_##A, "p", a);     \
 }
 SUPER()
 #undef GO
@@ -2929,7 +3013,7 @@ static void* find_base_init_Fct(void* fct)
 static uintptr_t my_base_finalize_fct_##A = 0;                      \
 static int my_base_finalize_##A(void* a)                            \
 {                                                                   \
-    return RunFunction(my_context, my_base_finalize_fct_##A, 1, a); \
+    return RunFunctionFmt(my_base_finalize_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -2948,21 +3032,21 @@ static void* find_base_finalize_Fct(void* fct)
 }
 // class_init ...
 #define GO(A)   \
-static uintptr_t my_class_init_fct_##A = 0;                             \
-static size_t parent_class_init_##A = 0;                                \
-static int my_class_init_##A(void* a, void* b)                          \
-{                                                                       \
+static uintptr_t my_class_init_fct_##A = 0;                                 \
+static size_t parent_class_init_##A = 0;                                    \
+static int my_class_init_##A(void* a, void* b)                              \
+{                                                                           \
     printf_log(LOG_DEBUG, "Custom Class init %d for class %p (parent=%p:%s)\n", A, a, (void*)parent_class_init_##A, g_type_name(parent_class_init_##A));\
-    int ret = RunFunction(my_context, my_class_init_fct_##A, 2, a, b);  \
-    unwrapGTKClass(a, parent_class_init_##A);                           \
-    bridgeGTKClass(a, parent_class_init_##A);                           \
-    my_unwrap_signal_offset(a);                                         \
-    if(!strcmp(g_type_name(parent_class_init_##A), "AtkUtil")) {        \
+    int ret = RunFunctionFmt(my_class_init_fct_##A, "pp", a, b);\
+    unwrapGTKClass(a, parent_class_init_##A);                               \
+    bridgeGTKClass(a, parent_class_init_##A);                               \
+    my_unwrap_signal_offset(a);                                             \
+    if(!strcmp(g_type_name(parent_class_init_##A), "AtkUtil")) {            \
         my_AtkUtilClass_t* p = (my_AtkUtilClass_t*)g_type_class_peek(parent_class_init_##A);\
-        unwrapGTKClass(p, parent_class_init_##A);                       \
-        bridgeGTKClass(p, parent_class_init_##A);                       \
-    }                                                                   \
-    return ret;                                                         \
+        unwrapGTKClass(p, parent_class_init_##A);                           \
+        bridgeGTKClass(p, parent_class_init_##A);                           \
+    }                                                                       \
+    return ret;                                                             \
 }
 SUPER()
 #undef GO
@@ -2981,10 +3065,10 @@ static void* find_class_init_Fct(void* fct, size_t parent)
 }
 // class_finalize ...
 #define GO(A)   \
-static uintptr_t my_class_finalize_fct_##A = 0;                         \
-static int my_class_finalize_##A(void* a, void* b)                      \
-{                                                                       \
-    return RunFunction(my_context, my_class_finalize_fct_##A, 2, a, b); \
+static uintptr_t my_class_finalize_fct_##A = 0;                                 \
+static int my_class_finalize_##A(void* a, void* b)                              \
+{                                                                               \
+    return RunFunctionFmt(my_class_finalize_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -3003,10 +3087,10 @@ static void* find_class_finalize_Fct(void* fct)
 }
 // instance_init ...
 #define GO(A)   \
-static uintptr_t my_instance_init_fct_##A = 0;                         \
-static int my_instance_init_##A(void* a, void* b)                      \
-{                                                                      \
-    return RunFunction(my_context, my_instance_init_fct_##A, 2, a, b); \
+static uintptr_t my_instance_init_fct_##A = 0;                              \
+static int my_instance_init_##A(void* a, void* b)                           \
+{                                                                           \
+    return RunFunctionFmt(my_instance_init_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -3066,20 +3150,20 @@ static int fct_gtk_parent_##A = 0 ;                 \
 static uintptr_t fct_gtk_class_init_##A = 0;        \
 static int my_gtk_class_init_##A(void* g_class) {   \
     printf_log(LOG_DEBUG, "Calling fct_gtk_class_init_" #A " wrapper\n");           \
-    int ret = (int)RunFunction(my_context, fct_gtk_class_init_##A, 1, g_class);     \
+    int ret = (int)RunFunctionFmt(fct_gtk_class_init_##A, "p", g_class);\
     unwrapGTKClass(g_class, fct_gtk_parent_##A);                                    \
     bridgeGTKClass(g_class, fct_gtk_parent_##A);                                    \
     return ret;                                                                     \
 }   \
-static uintptr_t fct_gtk_object_init_##A = 0;  \
-static int my_gtk_object_init_##A(void* object, void* data) {   \
-    printf_log(LOG_DEBUG, "Calling fct_gtk_object_init_" #A " wrapper\n");             \
-    return (int)RunFunction(my_context, fct_gtk_object_init_##A, 2, object, data);    \
+static uintptr_t fct_gtk_object_init_##A = 0;                                           \
+static int my_gtk_object_init_##A(void* object, void* data) {                           \
+    printf_log(LOG_DEBUG, "Calling fct_gtk_object_init_" #A " wrapper\n");              \
+    return (int)RunFunctionFmt(fct_gtk_object_init_##A, "pp", object, data);\
 }   \
-static uintptr_t fct_gtk_base_class_init_##A = 0;  \
-static int my_gtk_base_class_init_##A(void* instance, void* data) {   \
-    printf_log(LOG_DEBUG, "Calling fct_gtk_base_class_init_" #A " wrapper\n");             \
-    return (int)RunFunction(my_context, fct_gtk_base_class_init_##A, 2, instance, data);    \
+static uintptr_t fct_gtk_base_class_init_##A = 0;                                               \
+static int my_gtk_base_class_init_##A(void* instance, void* data) {                             \
+    printf_log(LOG_DEBUG, "Calling fct_gtk_base_class_init_" #A " wrapper\n");                  \
+    return (int)RunFunctionFmt(fct_gtk_base_class_init_##A, "pp", instance, data);  \
 }
 
 SUPER()
@@ -3195,7 +3279,7 @@ void my_signal_delete(my_signal_t* sig)
     }
     uintptr_t d = sig->destroy;
     if(d) {
-        RunFunction(my_context, d, 1, sig->data);
+        RunFunctionFmt(d, "p", sig->data);
     }
     printf_log(LOG_DEBUG, "gtk Data deleted, sig=%p, data=%p, destroy=%p\n", sig, sig->data, (void*)d);
     box_free(sig);
@@ -3237,10 +3321,10 @@ int my_signal_cb(void* a, void* b, void* c, void* d)
     }
     printf_log(LOG_DEBUG, "gtk Signal called, sig=%p, NArgs=%d\n", sig, i);
     switch(i) {
-        case 1: return (int)RunFunction(my_context, sig->c_handler, 1, sig->data);
-        case 2: return (int)RunFunction(my_context, sig->c_handler, 2, a, sig->data);
-        case 3: return (int)RunFunction(my_context, sig->c_handler, 3, a, b, sig->data);
-        case 4: return (int)RunFunction(my_context, sig->c_handler, 4, a, b, c, sig->data);
+        case 1: return (int)RunFunctionFmt(sig->c_handler, "p", sig->data);
+        case 2: return (int)RunFunctionFmt(sig->c_handler, "pp", a, sig->data);
+        case 3: return (int)RunFunctionFmt(sig->c_handler, "ppp", a, b, sig->data);
+        case 4: return (int)RunFunctionFmt(sig->c_handler, "pppp", a, b, c, sig->data);
     }
     printf_log(LOG_NONE, "Warning, Gtk signal callback but no data found!");
     return 0;
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c
index 5454e5c4..c80a5312 100644
--- a/src/tools/my_cpuid.c
+++ b/src/tools/my_cpuid.c
@@ -146,8 +146,10 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u)
             R_EDX = 0;
             break;
         case 0x7:   // extended bits...
-            if(R_ECX==1)    R_EAX = 0; // Bit 5 is avx512_bf16
-            else R_EAX = R_ECX = R_EBX = R_EDX = 0; // TODO
+            if(R_ECX==1) {
+                R_EAX = 0; // Bit 5 is avx512_bf16
+            } else 
+                R_EAX = R_ECX = R_EBX = R_EDX = 0; // TODO
             break;
         case 0xB:   // Extended Topology Enumeration Leaf
             //TODO!
diff --git a/src/tools/rcfile.c b/src/tools/rcfile.c
index 7b0ccf64..e41980c0 100644
--- a/src/tools/rcfile.c
+++ b/src/tools/rcfile.c
@@ -39,6 +39,9 @@ static const char default_rcfile[] =
 "BOX64_NOSANDBOX=1\n"
 "BOX64_MALLOC_HACK=2\n"
 "\n"
+"[LotCG.x86_64]\n"
+"BOX64_DYNAREC_FASTROUND=0\n"
+"\n"
 "[pressure-vessel-wrap]\n"
 "BOX64_NOGTK=1\n"
 "\n"
@@ -52,7 +55,7 @@ static const char default_rcfile[] =
 "BOX64_NOSANDBOX=1\n"
 "BOX64_MALLOC_HACK=2\n"
 "BOX64_LOG=0\n"
-"BOX64_NOGTK=1\n"
+"BOX64_DYNAREC_BIGBLOCK=0\n"
 "\n"
 "[steam-runtime-check-requirements]\n"
 "BOX64_EXIT=1\n"
@@ -126,11 +129,13 @@ ENTRYBOOL(BOX64_DYNAREC_FASTROUND, box64_dynarec_fastround)         \
 ENTRYINT(BOX64_DYNAREC_SAFEFLAGS, box64_dynarec_safeflags, 0, 2, 2) \
 ENTRYBOOL(BOX64_DYNAREC_CALLRET, box64_dynarec_callret)             \
 ENTRYBOOL(BOX64_DYNAREC_BLEEDING_EDGE, box64_dynarec_bleeding_edge) \
+ENTRYBOOL(BOX64_DYNAREC_JVM, box64_dynarec_jvm)                     \
 ENTRYINT(BOX64_DYNAREC_HOTPAGE, box64_dynarec_hotpage, 0, 255, 8)   \
 ENTRYBOOL(BOX64_DYNAREC_FASTPAGE, box64_dynarec_fastpage)           \
 ENTRYBOOL(BOX64_DYNAREC_WAIT, box64_dynarec_wait)                   \
 ENTRYSTRING_(BOX64_NODYNAREC, box64_nodynarec)                      \
 ENTRYBOOL(BOX64_DYNAREC_TEST, box64_dynarec_test)                   \
+ENTRYBOOL(BOX64_DYNAREC_MISSING, box64_dynarec_missing)             \
 
 #else
 #define SUPER3()                                                    \
@@ -146,11 +151,13 @@ IGNORE(BOX64_DYNAREC_FASTROUND)                                     \
 IGNORE(BOX64_DYNAREC_SAFEFLAGS)                                     \
 IGNORE(BOX64_DYNAREC_CALLRET)                                       \
 IGNORE(BOX64_DYNAREC_BLEEDING_EDGE)                                 \
+IGNORE(BOX64_DYNAREC_JVM)                                           \
 IGNORE(BOX64_DYNAREC_HOTPAGE)                                       \
 IGNORE(BOX64_DYNAREC_FASTPAGE)                                      \
 IGNORE(BOX64_DYNAREC_WAIT)                                          \
 IGNORE(BOX64_NODYNAREC)                                             \
 IGNORE(BOX64_DYNAREC_TEST)                                          \
+IGNORE(BOX64_DYNAREC_MISSING)                                       \
 
 #endif
 
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 7c3b3816..9219270a 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -36,6 +36,7 @@
 #() iFp
 #() iFO
 #() iFS
+#() iFP
 #() IFv
 #() IFi
 #() IFI
@@ -158,6 +159,7 @@
 #() vFpp
 #() vFpS
 #() vFSi
+#() cFpi
 #() cFpp
 #() wFpi
 #() iFEi
@@ -217,6 +219,7 @@
 #() uFii
 #() uFiu
 #() uFip
+#() uFui
 #() uFuu
 #() uFup
 #() uFpw
@@ -231,6 +234,7 @@
 #() UFEp
 #() UFuu
 #() UFpi
+#() UFpU
 #() UFpp
 #() fFEp
 #() fFif
@@ -238,6 +242,7 @@
 #() fFff
 #() fFfD
 #() fFfp
+#() fFpu
 #() fFpp
 #() dFid
 #() dFdi
@@ -279,7 +284,6 @@
 #() pFiu
 #() pFip
 #() pFiV
-#() pFII
 #() pFui
 #() pFuu
 #() pFup
@@ -287,6 +291,8 @@
 #() pFdi
 #() pFdd
 #() pFli
+#() pFll
+#() pFlp
 #() pFLi
 #() pFLC
 #() pFLu
@@ -402,6 +408,7 @@
 #() vFpff
 #() vFpdu
 #() vFpdd
+#() vFpdp
 #() vFpll
 #() vFplp
 #() vFpLi
@@ -416,6 +423,7 @@
 #() vFppl
 #() vFppL
 #() vFppp
+#() cFpdp
 #() wFppp
 #() iFEiw
 #() iFEip
@@ -455,6 +463,7 @@
 #() iFCuW
 #() iFuwp
 #() iFuip
+#() iFuWp
 #() iFuui
 #() iFuuu
 #() iFuup
@@ -550,6 +559,7 @@
 #() uFpuL
 #() uFpup
 #() uFpfu
+#() uFpli
 #() uFpLu
 #() uFpLL
 #() uFpLp
@@ -568,6 +578,7 @@
 #() dFuud
 #() dFddd
 #() dFddp
+#() dFpii
 #() dFpdd
 #() dFppi
 #() dFppu
@@ -634,6 +645,7 @@
 #() pFulu
 #() pFulp
 #() pFupi
+#() pFupu
 #() pFupl
 #() pFupL
 #() pFupp
@@ -645,6 +657,7 @@
 #() pFLup
 #() pFLLp
 #() pFLpi
+#() pFLpp
 #() pFpii
 #() pFpiu
 #() pFpid
@@ -654,6 +667,7 @@
 #() pFpCi
 #() pFpCC
 #() pFpCu
+#() pFpWi
 #() pFpWW
 #() pFpWp
 #() pFpui
@@ -790,6 +804,7 @@
 #() vFLppi
 #() vFpiii
 #() vFpiiu
+#() vFpiid
 #() vFpiip
 #() vFpiui
 #() vFpiuu
@@ -853,10 +868,12 @@
 #() vFpppl
 #() vFpppL
 #() vFpppp
+#() cFpipp
 #() iFEiip
 #() iFEiiN
 #() iFEipp
 #() iFEipV
+#() iFEipA
 #() iFEupu
 #() iFEupp
 #() iFEpii
@@ -894,6 +911,7 @@
 #() iFillu
 #() iFipii
 #() iFipip
+#() iFipWp
 #() iFipui
 #() iFipuL
 #() iFipup
@@ -901,18 +919,21 @@
 #() iFipLu
 #() iFipLp
 #() iFippi
-#() iFippu
 #() iFippL
 #() iFippp
 #() iFipON
 #() iFuiup
 #() iFuipp
+#() iFuWWp
 #() iFuuuu
 #() iFuupi
+#() iFuupp
 #() iFupLp
 #() iFuppi
+#() iFuppu
 #() iFuppp
 #() iFLLiW
+#() iFLppp
 #() iFpwww
 #() iFpwpp
 #() iFpiii
@@ -959,6 +980,7 @@
 #() iFpUUU
 #() iFpULp
 #() iFpUpp
+#() iFpdip
 #() iFplii
 #() iFplip
 #() iFplpi
@@ -1014,6 +1036,7 @@
 #() CFuuff
 #() CFpiii
 #() CFpupp
+#() CFpLLi
 #() CFppip
 #() uFEipp
 #() uFEupp
@@ -1034,6 +1057,7 @@
 #() uFpupp
 #() uFppiu
 #() uFppip
+#() uFppuu
 #() uFpplp
 #() uFppLp
 #() uFpppi
@@ -1101,13 +1125,13 @@
 #() pFiiup
 #() pFiiLp
 #() pFiipi
-#() pFiipp
 #() pFiIIi
 #() pFillu
 #() pFipii
 #() pFipip
 #() pFippi
 #() pFippu
+#() pFippp
 #() pFuuii
 #() pFuuip
 #() pFuuuu
@@ -1120,6 +1144,9 @@
 #() pFDipp
 #() pFlfff
 #() pFLiip
+#() pFLLup
+#() pFLLpp
+#() pFLppp
 #() pFpiii
 #() pFpiiu
 #() pFpiip
@@ -1147,8 +1174,10 @@
 #() pFpupp
 #() pFpdIU
 #() pFplil
+#() pFplip
 #() pFplpl
 #() pFplpp
+#() pFpLii
 #() pFpLip
 #() pFpLup
 #() pFpLLp
@@ -1347,6 +1376,7 @@
 #() vFppiii
 #() vFppiiu
 #() vFppiip
+#() vFppiui
 #() vFppiup
 #() vFppiff
 #() vFppidd
@@ -1359,6 +1389,7 @@
 #() vFppuup
 #() vFppudd
 #() vFppupi
+#() vFppupu
 #() vFppupp
 #() vFppfff
 #() vFppddp
@@ -1368,6 +1399,7 @@
 #() vFpppui
 #() vFpppuu
 #() vFpppup
+#() vFpppff
 #() vFpppdd
 #() vFppppi
 #() vFppppu
@@ -1375,6 +1407,7 @@
 #() vFppppp
 #() iFEiipp
 #() iFEiipV
+#() iFEiipA
 #() iFEippi
 #() iFEippL
 #() iFEippp
@@ -1416,8 +1449,10 @@
 #() iFippLp
 #() iFipppi
 #() iFipppp
+#() iFuuupp
 #() iFuppLp
 #() iFLppip
+#() iFLpppp
 #() iFpwwww
 #() iFpwppp
 #() iFpiiii
@@ -1449,11 +1484,14 @@
 #() iFpuuui
 #() iFpuuup
 #() iFpuuLL
+#() iFpuupp
 #() iFpulup
 #() iFpulpp
 #() iFpupiU
+#() iFpupui
 #() iFpupuu
 #() iFpupup
+#() iFpuppL
 #() iFpuppp
 #() iFpUiUi
 #() iFpUupp
@@ -1482,6 +1520,7 @@
 #() iFppiLi
 #() iFppiLL
 #() iFppipi
+#() iFppipu
 #() iFppipp
 #() iFppuwp
 #() iFppuip
@@ -1521,9 +1560,11 @@
 #() uFLpppL
 #() uFpCCCC
 #() uFpWuip
+#() uFpuuui
 #() uFpuuuu
 #() uFpuupp
 #() uFpupuu
+#() uFpuppp
 #() uFppipp
 #() uFppuup
 #() uFppupp
@@ -1553,6 +1594,7 @@
 #() LFpLppL
 #() LFpLppp
 #() LFppLLp
+#() LFppLpL
 #() LFpppii
 #() LFppppp
 #() pFEpiii
@@ -1589,6 +1631,7 @@
 #() pFpiCCC
 #() pFpiuuu
 #() pFpiupp
+#() pFpiLip
 #() pFpipip
 #() pFpipup
 #() pFpippi
@@ -1603,14 +1646,17 @@
 #() pFpuuuu
 #() pFpuuup
 #() pFpupii
+#() pFpuppu
 #() pFpuppp
 #() pFpUdii
 #() pFpfffi
 #() pFpdddd
 #() pFplppp
 #() pFpLiii
+#() pFpLLip
 #() pFpLLLp
 #() pFpLpii
+#() pFpLpip
 #() pFppiii
 #() pFppiiu
 #() pFppiip
@@ -1625,11 +1671,13 @@
 #() pFppupp
 #() pFppddu
 #() pFppLii
+#() pFppLLi
+#() pFppLpp
 #() pFpppii
 #() pFpppip
-#() pFpppIi
 #() pFpppui
 #() pFpppup
+#() pFpppli
 #() pFpppLi
 #() pFppppi
 #() pFppppu
@@ -1653,6 +1701,7 @@
 #() vFEpiLpp
 #() vFEpippp
 #() vFEpuipp
+#() vFEpuipV
 #() vFEpupup
 #() vFEpuppp
 #() vFEpLLpp
@@ -1742,11 +1791,14 @@
 #() vFpuiiiu
 #() vFpuiipp
 #() vFpuuuiu
+#() vFpuuuup
+#() vFpuuupp
 #() vFpuupuu
 #() vFpuuppp
 #() vFpudddd
 #() vFpupiUu
 #() vFpupuuu
+#() vFpupupu
 #() vFpuppuu
 #() vFpupppp
 #() vFpUiuup
@@ -1805,11 +1857,13 @@
 #() iFEpIppp
 #() iFEpuppp
 #() iFEpUppp
+#() iFEppppi
 #() iFEppppp
 #() iFiiiiip
 #() iFiiiipp
 #() iFiiiuwp
 #() iFiWiipi
+#() iFilpppp
 #() iFiLpppi
 #() iFipiipi
 #() iFipipip
@@ -1834,17 +1888,23 @@
 #() iFpiuuup
 #() iFpiuupp
 #() iFpipipi
+#() iFpipipp
 #() iFpipupp
 #() iFpippip
+#() iFpippup
 #() iFpipppL
 #() iFpipppp
 #() iFpCiipp
 #() iFpCpipu
+#() iFpWipip
 #() iFpWpppp
 #() iFpuiCpp
 #() iFpuippp
 #() iFpuuuuu
+#() iFpuuuup
+#() iFpuuupp
 #() iFpuupuu
+#() iFpuuppp
 #() iFpuLLpp
 #() iFpupuui
 #() iFpupLpL
@@ -1853,6 +1913,7 @@
 #() iFpUuupp
 #() iFpUUUip
 #() iFpUUUUp
+#() iFpdpipp
 #() iFpLiiiL
 #() iFpLiiip
 #() iFpLiiuu
@@ -1871,9 +1932,11 @@
 #() iFppiipi
 #() iFppiipp
 #() iFppiupp
+#() iFppilpp
 #() iFppipii
 #() iFppipiL
 #() iFppipip
+#() iFppippu
 #() iFppIppp
 #() iFppuiii
 #() iFppuIII
@@ -1886,12 +1949,15 @@
 #() iFppLupp
 #() iFppLLiL
 #() iFppLLup
+#() iFppLLpp
 #() iFppLpLp
 #() iFppLppp
 #() iFpppiuu
 #() iFpppipi
+#() iFpppipu
 #() iFpppipp
 #() iFpppuii
+#() iFpppuup
 #() iFpppupu
 #() iFpppupp
 #() iFpppLpp
@@ -1900,6 +1966,7 @@
 #() iFppppip
 #() iFppppup
 #() iFpppppi
+#() iFpppppL
 #() iFpppppp
 #() uFEiippp
 #() uFEiuppp
@@ -1914,6 +1981,9 @@
 #() uFpWuuCp
 #() uFpuippp
 #() uFpuuuup
+#() uFpuuupp
+#() uFpuuppp
+#() uFpupupu
 #() uFppippp
 #() uFppuuup
 #() uFppuupu
@@ -1936,6 +2006,7 @@
 #() LFpipipi
 #() LFpLippp
 #() LFpLLLLL
+#() LFppLLpL
 #() LFSpLiip
 #() pFEpiupp
 #() pFEpippp
@@ -1954,14 +2025,17 @@
 #() pFipippp
 #() pFWCiWCi
 #() pFuuipip
+#() pFuuuiip
 #() pFuuuuii
 #() pFuuuuuu
 #() pFuuuuup
+#() pFuuppuu
 #() pFdddddd
 #() pFpiiiiu
 #() pFpiiipp
 #() pFpiiCCC
 #() pFpiUUUU
+#() pFpipipp
 #() pFpippip
 #() pFpipppp
 #() pFpCuuCC
@@ -1972,18 +2046,26 @@
 #() pFpuuupu
 #() pFpuuUUU
 #() pFpupuui
+#() pFpuppip
 #() pFpupppp
 #() pFplpppp
+#() pFpLuLpp
+#() pFpLpLLi
 #() pFpLppii
+#() pFpLppip
+#() pFpLppup
 #() pFppiiii
 #() pFppiipp
 #() pFppiCCC
 #() pFppiupp
+#() pFppilpp
 #() pFppipip
 #() pFppippi
 #() pFppippp
+#() pFppuupp
 #() pFppupii
 #() pFppuppp
+#() pFpplplp
 #() pFpplppp
 #() pFpppiup
 #() pFpppupp
@@ -2068,6 +2150,7 @@
 #() vFpippppu
 #() vFpuuuuuu
 #() vFpuuUUuu
+#() vFpuupupu
 #() vFpuupppp
 #() vFpupuuup
 #() vFpupppui
@@ -2102,6 +2185,7 @@
 #() vFpppiupi
 #() vFpppippi
 #() vFpppuuuu
+#() vFpppffff
 #() vFppppiip
 #() vFppppiui
 #() vFppppipi
@@ -2118,6 +2202,7 @@
 #() iFEpppppL
 #() iFEpppppp
 #() iFiiiiiip
+#() iFipupupi
 #() iFpiiiiii
 #() iFpiiiiip
 #() iFpiiiuwp
@@ -2128,10 +2213,12 @@
 #() iFpiupppp
 #() iFpiLuupp
 #() iFpiLuppp
+#() iFpipiiip
 #() iFpipipip
 #() iFpipippp
 #() iFpippLpp
 #() iFpippppW
+#() iFpippppp
 #() iFpIIpppp
 #() iFpWCiWCi
 #() iFpWppppW
@@ -2177,6 +2264,7 @@
 #() iFpppippi
 #() iFpppippp
 #() iFpppuiii
+#() iFpppLppp
 #() iFppppilp
 #() iFppppipp
 #() iFppppdpu
@@ -2191,6 +2279,8 @@
 #() uFiiiuuuu
 #() uFuippppp
 #() uFpippppp
+#() uFpuuuupp
+#() uFpuuuppp
 #() uFpuupppp
 #() uFppiuppp
 #() uFppuuuup
@@ -2224,28 +2314,37 @@
 #() pFpupiipp
 #() pFpuppipp
 #() pFplppppp
+#() pFpLLppup
+#() pFpLpipip
+#() pFpLpLLiL
 #() pFpLppiip
+#() pFpLppLLi
 #() pFppiiipp
 #() pFppiiCCC
+#() pFppiippp
 #() pFppipipp
 #() pFppipLpp
 #() pFppuippp
 #() pFppuuupp
 #() pFppuuppp
+#() pFppuLLip
 #() pFppliuip
 #() pFpplipup
 #() pFppLipip
+#() pFppLLiLi
 #() pFpppccci
 #() pFpppiiii
 #() pFpppCCCi
 #() pFpppuipp
 #() pFpppuuui
 #() pFpppuupp
+#() pFpppupup
 #() pFpppuppp
 #() pFpppfffi
 #() pFpppdddi
 #() pFpppllli
 #() pFpppLLLi
+#() pFppppiii
 #() pFppppuuu
 #() pFpppppuu
 #() pFppppppu
@@ -2292,6 +2391,7 @@
 #() vFuuufffff
 #() vFffffffff
 #() vFpiiiiiii
+#() vFpiiiiiip
 #() vFpiiiipii
 #() vFpiiULipp
 #() vFpiUuupup
@@ -2329,7 +2429,10 @@
 #() iFiiupiupi
 #() iFipippppp
 #() iFuuuuuuuu
+#() iFdiippppL
+#() iFpipiipip
 #() iFpippuuii
+#() iFpippuupp
 #() iFpCCWWpWu
 #() iFpWCuWCuu
 #() iFpWWipppp
@@ -2339,6 +2442,8 @@
 #() iFpuuipppp
 #() iFpuuupupu
 #() iFpuupuupp
+#() iFpuuppiip
+#() iFpuuppppp
 #() iFpupppWWu
 #() iFpupppppp
 #() iFpUuuLpUi
@@ -2348,8 +2453,10 @@
 #() iFpLLppppp
 #() iFpLpipppp
 #() iFpLppLpip
+#() iFpLpppupu
 #() iFpLpppppp
 #() iFppiiipip
+#() iFppillppp
 #() iFppIIIppp
 #() iFppuiiuuu
 #() iFppuuuuuu
@@ -2357,6 +2464,7 @@
 #() iFpppiiipi
 #() iFpppiiipp
 #() iFpppipipi
+#() iFppppiiup
 #() iFppppippp
 #() iFppppppii
 #() iFpppppppi
@@ -2370,12 +2478,13 @@
 #() uFuipppppp
 #() uFuupuuiuf
 #() uFulpppppp
+#() uFpuupupuu
 #() uFpupuuuCp
 #() uFppuuuupp
 #() uFppuuuppu
 #() uFppuppppp
 #() uFpppppupp
-#() LFELpLpLpi
+#() LFELpupupu
 #() LFEpiupppp
 #() LFpLpuuLLu
 #() pFEiplllpp
@@ -2403,7 +2512,14 @@
 #() pFpupppppp
 #() pFpdwwWWui
 #() pFplpppppp
+#() pFpLuLpLip
+#() pFpLpipLup
+#() pFpLpLLiLi
+#() pFpLppuLLp
+#() pFpLppLLiL
 #() pFppiiiiii
+#() pFpppipipi
+#() pFppplippp
 #() pFppppuppp
 #() pFpppppupp
 #() iWEpuuiipp
@@ -2443,6 +2559,7 @@
 #() vFpiuippppi
 #() vFpipiuiipp
 #() vFpipppiipi
+#() vFpuuuuuuuu
 #() vFpLpppippp
 #() vFppiiiiiii
 #() vFppiiiiipi
@@ -2463,6 +2580,7 @@
 #() vFppddddudd
 #() vFpplpppppi
 #() vFpppiiiiii
+#() vFpppffffff
 #() vFppppipiip
 #() vFpppppippp
 #() iFEpiiiiipi
@@ -2483,6 +2601,7 @@
 #() iFpLiuiiLLL
 #() iFpLLiiuuii
 #() iFpLpiiuuii
+#() iFpLpppupup
 #() iFpLppppppp
 #() iFppiiiiiii
 #() iFppippippp
@@ -2497,6 +2616,7 @@
 #() uFEipippppp
 #() uFEpppufppp
 #() uFuulpiuiuf
+#() uFpuupuppuu
 #() uFppLpLuppp
 #() uFppppppppp
 #() lFpppipiipp
@@ -2514,6 +2634,8 @@
 #() pFpCuWCCuuu
 #() pFpuuwwWWww
 #() pFpupuuuuup
+#() pFpLpLLipui
+#() pFpLppLLiLi
 #() pFppiiiiiip
 #() pFppipppppp
 #() pFpppiiiiii
@@ -2562,6 +2684,7 @@
 #() vFppuppuiiii
 #() vFppupppiiii
 #() vFppdddddddd
+#() vFppppppppii
 #() vFpppppppppp
 #() iFEpiiiiippp
 #() iFEpupppLppL
@@ -2576,7 +2699,9 @@
 #() iFppuuiiuupi
 #() iFpppiiipipi
 #() iFpppLLipppp
+#() iFpppppiiuup
 #() iFpppppppipi
+#() iFpppppppppu
 #() uFpddpippppp
 #() uFpppppppppp
 #() pFEiippppppp
@@ -2587,6 +2712,7 @@
 #() pFpuuuwwwwWW
 #() pFpuuuWWWCCi
 #() pFplllllllll
+#() pFppippLLLip
 #() pFppuiipuuii
 #() pFpppiiiiiii
 #() pFpppppppppp
@@ -2633,6 +2759,7 @@
 #() iFpLLpiiuuiiL
 #() iFppippipppip
 #() iFpppiiuuiiuu
+#() iFpppppiiuupp
 #() uFEpLiupppLuV
 #() uFEpLippppLup
 #() uFEpLippppLuA
@@ -2678,6 +2805,7 @@
 #() pFpCuuWWwwCCup
 #() pFpuuuWWWWWWWW
 #() pFppiiuuuiupLp
+#() pFppippLLLiLpp
 #() pFpppppppppppp
 #() vFEpppppppiippp
 #() vFuiiiiiiiiiuup
@@ -2699,6 +2827,7 @@
 #() uFppppuuupppppp
 #() pFpCuuwwWWWWuup
 #() pFpuupppwwwwWWC
+#() pFppLppppiiLpip
 #() pFpppppppuipppp
 #() pFppppppppppppp
 #() vFippppppppppppp
@@ -2790,6 +2919,7 @@ wrappedbz2:
   - BZ2_bzCompressInit
 wrappedcairo:
 wrappedcairogobject:
+wrappedcap:
 wrappedcrashhandler:
 wrappedcrypto:
 - vFp:
@@ -2799,18 +2929,30 @@ wrappedcrypto:
   - sk_new
 - vFpp:
   - X509_STORE_CTX_set_verify_cb
+  - X509_STORE_set_verify_cb
   - sk_pop_free
+- iFpp:
+  - BIO_meth_set_create
+  - BIO_meth_set_ctrl
+  - BIO_meth_set_destroy
+  - BIO_meth_set_gets
+  - BIO_meth_set_puts
+  - BIO_meth_set_read
+  - BIO_meth_set_write
 - pFpp:
   - OPENSSL_sk_pop_free
 - iFppp:
   - ASN1_i2d_bio
 - pFpppp:
   - ASN1_d2i_bio
+  - PEM_read_bio_DHparams
   - PEM_read_bio_DSAPrivateKey
   - PEM_read_bio_DSA_PUBKEY
   - PEM_read_bio_ECPrivateKey
   - PEM_read_bio_EC_PUBKEY
   - PEM_read_bio_PKCS7
+  - PEM_read_bio_PUBKEY
+  - PEM_read_bio_PrivateKey
   - PEM_read_bio_RSAPrivateKey
   - PEM_read_bio_RSA_PUBKEY
   - PEM_read_bio_X509
@@ -2825,6 +2967,7 @@ wrappedcrypto:
 - iFppppipp:
   - PEM_write_bio_DSAPrivateKey
   - PEM_write_bio_ECPrivateKey
+  - PEM_write_bio_PrivateKey
   - PEM_write_bio_RSAPrivateKey
 wrappedcrypto3:
 - vFp:
@@ -2836,6 +2979,10 @@ wrappedcrypto3:
   - OPENSSL_sk_pop_free
 - iFppp:
   - ASN1_i2d_bio
+- vFiipV:
+  - ERR_set_error
+- vFiipA:
+  - ERR_vset_error
 - pFpppp:
   - ASN1_d2i_bio
   - PEM_read_bio_DSAPrivateKey
@@ -2892,6 +3039,7 @@ wrappeddbus:
   - dbus_message_get_args_valist
 - iFpppp:
   - dbus_connection_add_filter
+  - dbus_connection_register_fallback
   - dbus_pending_call_set_notify
 - iFppppp:
   - dbus_connection_try_register_fallback
@@ -2998,6 +3146,8 @@ wrappedgdk3:
   - gdk_window_remove_filter
 - iFiipp:
   - gdk_input_add
+- uFippp:
+  - gdk_threads_add_idle_full
 - iFiippp:
   - gdk_input_add_full
 wrappedgdkpixbuf2:
@@ -3019,6 +3169,7 @@ wrappedgdkx112:
 wrappedgio2:
 - vFppp:
   - g_simple_async_result_set_op_res_gpointer
+  - g_task_return_pointer
 - vFippp:
   - g_bus_get
 - vFppip:
@@ -3036,8 +3187,11 @@ wrappedgio2:
   - g_simple_async_result_new
   - g_simple_async_result_new_from_error
   - g_simple_async_result_new_take_error
+  - g_task_new
 - vFpippp:
   - g_async_initable_init_async
+- vFpuipV:
+  - g_task_return_new_error
 - vFppipV:
   - g_simple_async_result_set_error
 - vFppipA:
@@ -3313,7 +3467,7 @@ wrappedgobject2:
   - g_signal_handlers_block_matched
   - g_signal_handlers_disconnect_matched
   - g_signal_handlers_unblock_matched
-- LFLpLpLpi:
+- LFLpupupu:
   - g_type_register_static_simple
 - LFpiupppp:
   - g_signal_handler_find
@@ -3323,6 +3477,7 @@ wrappedgobject2:
   - g_signal_newv
 - uFpLippppLuA:
   - g_signal_new_valist
+wrappedgomp:
 wrappedgssapi:
 wrappedgssapikrb5:
 wrappedgstapp:
@@ -3336,6 +3491,8 @@ wrappedgstreamer:
 - vFppA:
   - gst_caps_set_simple_valist
   - gst_structure_remove_fields_valist
+- iFppp:
+  - gst_caps_foreach
 - iFppV:
   - gst_structure_get
 - iFppA:
@@ -3383,6 +3540,7 @@ wrappedgtk3:
   - gtk_style_context_get_valist
 - vFppp:
   - gtk_builder_connect_signals_full
+  - gtk_clipboard_request_text
   - gtk_container_forall
   - gtk_container_foreach
   - gtk_menu_attach_to_widget
@@ -3618,11 +3776,13 @@ wrappedlibc:
 - iFpV:
   - __isoc99_scanf
   - execl
+  - execle
   - execlp
   - printf
   - wprintf
 - iFpA:
   - vprintf
+  - vwprintf
 - iFSp:
   - _IO_file_stat
 - pFip:
@@ -3665,6 +3825,9 @@ wrappedlibc:
   - sigaction
 - iFipV:
   - __printf_chk
+  - dprintf
+- iFipA:
+  - vdprintf
 - iFpLi:
   - mprotect
 - iFppi:
@@ -3682,6 +3845,7 @@ wrappedlibc:
   - __asprintf
   - __isoc99_fscanf
   - __isoc99_sscanf
+  - __isoc99_swscanf
   - asprintf
   - fprintf
   - fscanf
@@ -3716,6 +3880,8 @@ wrappedlibc:
   - tdelete
   - tfind
   - tsearch
+- pFppV:
+  - fopencookie
 - vFiipV:
   - __syslog_chk
 - vFiipA:
@@ -3726,6 +3892,10 @@ wrappedlibc:
   - epoll_ctl
 - iFiiiN:
   - semctl
+- iFiipV:
+  - __dprintf_chk
+- iFiipA:
+  - __vdprintf_chk
 - iFipii:
   - epoll_wait
 - iFippi:
@@ -3870,6 +4040,61 @@ wrappedlibglx:
 - pFp:
   - glXGetProcAddress
   - glXGetProcAddressARB
+wrappedlibharfbuzz:
+- vFp:
+  - hb_draw_funcs_destroy
+  - hb_font_funcs_destroy
+- pFp:
+  - hb_unicode_funcs_reference
+- vFppp:
+  - hb_font_set_funcs_data
+- pFppp:
+  - hb_face_create_for_tables
+- vFpppp:
+  - hb_buffer_set_message_func
+  - hb_draw_funcs_set_close_path_func
+  - hb_draw_funcs_set_cubic_to_func
+  - hb_draw_funcs_set_line_to_func
+  - hb_draw_funcs_set_move_to_func
+  - hb_draw_funcs_set_quadratic_to_func
+  - hb_font_funcs_set_font_h_extents_func
+  - hb_font_funcs_set_font_v_extents_func
+  - hb_font_funcs_set_glyph_contour_point_func
+  - hb_font_funcs_set_glyph_extents_func
+  - hb_font_funcs_set_glyph_from_name_func
+  - hb_font_funcs_set_glyph_func
+  - hb_font_funcs_set_glyph_h_advance_func
+  - hb_font_funcs_set_glyph_h_advances_func
+  - hb_font_funcs_set_glyph_h_kerning_func
+  - hb_font_funcs_set_glyph_h_origin_func
+  - hb_font_funcs_set_glyph_name_func
+  - hb_font_funcs_set_glyph_shape_func
+  - hb_font_funcs_set_glyph_v_advance_func
+  - hb_font_funcs_set_glyph_v_advances_func
+  - hb_font_funcs_set_glyph_v_kerning_func
+  - hb_font_funcs_set_glyph_v_origin_func
+  - hb_font_funcs_set_nominal_glyph_func
+  - hb_font_funcs_set_nominal_glyphs_func
+  - hb_font_funcs_set_variation_glyph_func
+  - hb_font_set_funcs
+  - hb_unicode_funcs_set_combining_class_func
+  - hb_unicode_funcs_set_compose_func
+  - hb_unicode_funcs_set_decompose_compatibility_func
+  - hb_unicode_funcs_set_decompose_func
+  - hb_unicode_funcs_set_eastasian_width_func
+  - hb_unicode_funcs_set_general_category_func
+  - hb_unicode_funcs_set_mirroring_func
+  - hb_unicode_funcs_set_script_func
+- iFppppi:
+  - hb_blob_set_user_data
+  - hb_buffer_set_user_data
+  - hb_face_set_user_data
+  - hb_font_funcs_set_user_data
+  - hb_font_set_user_data
+  - hb_unicode_funcs_set_user_data
+- pFpuupp:
+  - hb_blob_create
+  - hb_blob_create_or_fail
 wrappedlibibus:
 - vFpippp:
   - ibus_bus_current_input_context_async
@@ -4089,9 +4314,14 @@ wrappedlibssl:
 - pFp:
   - SSL_get_verify_callback
 - vFpp:
+  - SSL_CTX_sess_set_new_cb
   - SSL_CTX_set_client_cert_cb
+  - SSL_CTX_set_cookie_generate_cb
+  - SSL_CTX_set_cookie_verify_cb
   - SSL_CTX_set_default_passwd_cb
   - SSL_set_psk_client_callback
+  - SSL_set_psk_server_callback
+  - SSL_set_psk_use_session_callback
 - vFpip:
   - SSL_CTX_set_verify
   - SSL_set_verify
@@ -4115,6 +4345,7 @@ wrappedlibssl3:
   - SSL_CTX_set_verify
   - SSL_set_verify
 - vFppp:
+  - SSL_CTX_set_alpn_select_cb
   - SSL_CTX_set_cert_verify_callback
   - SSL_CTX_set_next_proto_select_cb
 - lFpip:
@@ -4138,10 +4369,15 @@ wrappedlibusb1:
   - libusb_hotplug_register_callback
 wrappedlibuuid:
 wrappedlibva:
+- pFppp:
+  - vaSetErrorCallback
+  - vaSetInfoCallback
 wrappedlibvadrm:
 wrappedlibvawayland:
 wrappedlibvax11:
 wrappedlibvdpau:
+- iFpipp:
+  - vdp_device_create_x11
 wrappedlibvorbis:
 wrappedlibx11:
 - iFp:
@@ -4261,8 +4497,12 @@ wrappedlibz:
 - iFpiiiiipi:
   - deflateInit2_
 wrappedlzma:
+- vFp:
+  - lzma_end
 - vFpp:
   - lzma_index_end
+- iFpi:
+  - lzma_code
 - iFpU:
   - lzma_alone_decoder
 - iFpp:
diff --git a/src/wrapped/generated/wrappedaluredefs.h b/src/wrapped/generated/wrappedaluredefs.h
index 4652a063..de0ccbf1 100644
--- a/src/wrapped/generated/wrappedaluredefs.h
+++ b/src/wrapped/generated/wrappedaluredefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalureDEFS_H_
 #define __wrappedalureDEFS_H_
diff --git a/src/wrapped/generated/wrappedaluretypes.h b/src/wrapped/generated/wrappedaluretypes.h
index a512e04a..a03db502 100644
--- a/src/wrapped/generated/wrappedaluretypes.h
+++ b/src/wrapped/generated/wrappedaluretypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalureTYPES_H_
 #define __wrappedalureTYPES_H_
diff --git a/src/wrapped/generated/wrappedalureundefs.h b/src/wrapped/generated/wrappedalureundefs.h
index b46f345c..7220c005 100644
--- a/src/wrapped/generated/wrappedalureundefs.h
+++ b/src/wrapped/generated/wrappedalureundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalureUNDEFS_H_
 #define __wrappedalureUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedalutdefs.h b/src/wrapped/generated/wrappedalutdefs.h
index 2b329559..2f69679f 100644
--- a/src/wrapped/generated/wrappedalutdefs.h
+++ b/src/wrapped/generated/wrappedalutdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalutDEFS_H_
 #define __wrappedalutDEFS_H_
diff --git a/src/wrapped/generated/wrappedaluttypes.h b/src/wrapped/generated/wrappedaluttypes.h
index 2605a7d5..087b2163 100644
--- a/src/wrapped/generated/wrappedaluttypes.h
+++ b/src/wrapped/generated/wrappedaluttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalutTYPES_H_
 #define __wrappedalutTYPES_H_
diff --git a/src/wrapped/generated/wrappedalutundefs.h b/src/wrapped/generated/wrappedalutundefs.h
index a75d812b..dfac8786 100644
--- a/src/wrapped/generated/wrappedalutundefs.h
+++ b/src/wrapped/generated/wrappedalutundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedalutUNDEFS_H_
 #define __wrappedalutUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedatkbridgedefs.h b/src/wrapped/generated/wrappedatkbridgedefs.h
index c775c9fe..aeb21847 100644
--- a/src/wrapped/generated/wrappedatkbridgedefs.h
+++ b/src/wrapped/generated/wrappedatkbridgedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkbridgeDEFS_H_
 #define __wrappedatkbridgeDEFS_H_
diff --git a/src/wrapped/generated/wrappedatkbridgetypes.h b/src/wrapped/generated/wrappedatkbridgetypes.h
index 979c708f..0406d28c 100644
--- a/src/wrapped/generated/wrappedatkbridgetypes.h
+++ b/src/wrapped/generated/wrappedatkbridgetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkbridgeTYPES_H_
 #define __wrappedatkbridgeTYPES_H_
diff --git a/src/wrapped/generated/wrappedatkbridgeundefs.h b/src/wrapped/generated/wrappedatkbridgeundefs.h
index 30ac3866..65d5c285 100644
--- a/src/wrapped/generated/wrappedatkbridgeundefs.h
+++ b/src/wrapped/generated/wrappedatkbridgeundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkbridgeUNDEFS_H_
 #define __wrappedatkbridgeUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedatkdefs.h b/src/wrapped/generated/wrappedatkdefs.h
index beec241f..9d417c68 100644
--- a/src/wrapped/generated/wrappedatkdefs.h
+++ b/src/wrapped/generated/wrappedatkdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkDEFS_H_
 #define __wrappedatkDEFS_H_
diff --git a/src/wrapped/generated/wrappedatktypes.h b/src/wrapped/generated/wrappedatktypes.h
index b882f5d4..1e9efa80 100644
--- a/src/wrapped/generated/wrappedatktypes.h
+++ b/src/wrapped/generated/wrappedatktypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkTYPES_H_
 #define __wrappedatkTYPES_H_
diff --git a/src/wrapped/generated/wrappedatkundefs.h b/src/wrapped/generated/wrappedatkundefs.h
index d170027c..058d317f 100644
--- a/src/wrapped/generated/wrappedatkundefs.h
+++ b/src/wrapped/generated/wrappedatkundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatkUNDEFS_H_
 #define __wrappedatkUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedatomicdefs.h b/src/wrapped/generated/wrappedatomicdefs.h
index a4fcd9fc..efbab8b1 100644
--- a/src/wrapped/generated/wrappedatomicdefs.h
+++ b/src/wrapped/generated/wrappedatomicdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatomicDEFS_H_
 #define __wrappedatomicDEFS_H_
diff --git a/src/wrapped/generated/wrappedatomictypes.h b/src/wrapped/generated/wrappedatomictypes.h
index 8167c845..9257ed42 100644
--- a/src/wrapped/generated/wrappedatomictypes.h
+++ b/src/wrapped/generated/wrappedatomictypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatomicTYPES_H_
 #define __wrappedatomicTYPES_H_
diff --git a/src/wrapped/generated/wrappedatomicundefs.h b/src/wrapped/generated/wrappedatomicundefs.h
index c9f30250..354f26a4 100644
--- a/src/wrapped/generated/wrappedatomicundefs.h
+++ b/src/wrapped/generated/wrappedatomicundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatomicUNDEFS_H_
 #define __wrappedatomicUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedatspidefs.h b/src/wrapped/generated/wrappedatspidefs.h
index c25b6ff3..78bd3ff0 100644
--- a/src/wrapped/generated/wrappedatspidefs.h
+++ b/src/wrapped/generated/wrappedatspidefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatspiDEFS_H_
 #define __wrappedatspiDEFS_H_
diff --git a/src/wrapped/generated/wrappedatspitypes.h b/src/wrapped/generated/wrappedatspitypes.h
index 435c9429..3885e392 100644
--- a/src/wrapped/generated/wrappedatspitypes.h
+++ b/src/wrapped/generated/wrappedatspitypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatspiTYPES_H_
 #define __wrappedatspiTYPES_H_
diff --git a/src/wrapped/generated/wrappedatspiundefs.h b/src/wrapped/generated/wrappedatspiundefs.h
index 801554b8..6c1de3ec 100644
--- a/src/wrapped/generated/wrappedatspiundefs.h
+++ b/src/wrapped/generated/wrappedatspiundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedatspiUNDEFS_H_
 #define __wrappedatspiUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedbz2defs.h b/src/wrapped/generated/wrappedbz2defs.h
index 02b9c875..553579ce 100644
--- a/src/wrapped/generated/wrappedbz2defs.h
+++ b/src/wrapped/generated/wrappedbz2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedbz2DEFS_H_
 #define __wrappedbz2DEFS_H_
diff --git a/src/wrapped/generated/wrappedbz2types.h b/src/wrapped/generated/wrappedbz2types.h
index 7e9f61f0..0fdf134a 100644
--- a/src/wrapped/generated/wrappedbz2types.h
+++ b/src/wrapped/generated/wrappedbz2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedbz2TYPES_H_
 #define __wrappedbz2TYPES_H_
diff --git a/src/wrapped/generated/wrappedbz2undefs.h b/src/wrapped/generated/wrappedbz2undefs.h
index e401f249..408af98d 100644
--- a/src/wrapped/generated/wrappedbz2undefs.h
+++ b/src/wrapped/generated/wrappedbz2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedbz2UNDEFS_H_
 #define __wrappedbz2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcairodefs.h b/src/wrapped/generated/wrappedcairodefs.h
index a95f11c9..d25672d3 100644
--- a/src/wrapped/generated/wrappedcairodefs.h
+++ b/src/wrapped/generated/wrappedcairodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairoDEFS_H_
 #define __wrappedcairoDEFS_H_
diff --git a/src/wrapped/generated/wrappedcairogobjectdefs.h b/src/wrapped/generated/wrappedcairogobjectdefs.h
index 55a8d4a7..8408e6f8 100644
--- a/src/wrapped/generated/wrappedcairogobjectdefs.h
+++ b/src/wrapped/generated/wrappedcairogobjectdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairogobjectDEFS_H_
 #define __wrappedcairogobjectDEFS_H_
diff --git a/src/wrapped/generated/wrappedcairogobjecttypes.h b/src/wrapped/generated/wrappedcairogobjecttypes.h
index af1f4941..e3e8e0a1 100644
--- a/src/wrapped/generated/wrappedcairogobjecttypes.h
+++ b/src/wrapped/generated/wrappedcairogobjecttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairogobjectTYPES_H_
 #define __wrappedcairogobjectTYPES_H_
diff --git a/src/wrapped/generated/wrappedcairogobjectundefs.h b/src/wrapped/generated/wrappedcairogobjectundefs.h
index c0210e48..dde0be0c 100644
--- a/src/wrapped/generated/wrappedcairogobjectundefs.h
+++ b/src/wrapped/generated/wrappedcairogobjectundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairogobjectUNDEFS_H_
 #define __wrappedcairogobjectUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcairotypes.h b/src/wrapped/generated/wrappedcairotypes.h
index 2748231d..b80b3522 100644
--- a/src/wrapped/generated/wrappedcairotypes.h
+++ b/src/wrapped/generated/wrappedcairotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairoTYPES_H_
 #define __wrappedcairoTYPES_H_
diff --git a/src/wrapped/generated/wrappedcairoundefs.h b/src/wrapped/generated/wrappedcairoundefs.h
index c464dbe3..5af41cd2 100644
--- a/src/wrapped/generated/wrappedcairoundefs.h
+++ b/src/wrapped/generated/wrappedcairoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcairoUNDEFS_H_
 #define __wrappedcairoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcapdefs.h b/src/wrapped/generated/wrappedcapdefs.h
new file mode 100644
index 00000000..1965eb42
--- /dev/null
+++ b/src/wrapped/generated/wrappedcapdefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedcapDEFS_H_
+#define __wrappedcapDEFS_H_
+
+
+#endif // __wrappedcapDEFS_H_
diff --git a/src/wrapped/generated/wrappedcaptypes.h b/src/wrapped/generated/wrappedcaptypes.h
new file mode 100644
index 00000000..0fad76e8
--- /dev/null
+++ b/src/wrapped/generated/wrappedcaptypes.h
@@ -0,0 +1,17 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedcapTYPES_H_
+#define __wrappedcapTYPES_H_
+
+#ifndef LIBNAME
+#error You should only #include this file inside a wrapped*.c file
+#endif
+#ifndef ADDED_FUNCTIONS
+#define ADDED_FUNCTIONS() 
+#endif
+
+
+#define SUPER() ADDED_FUNCTIONS()
+
+#endif // __wrappedcapTYPES_H_
diff --git a/src/wrapped/generated/wrappedcapundefs.h b/src/wrapped/generated/wrappedcapundefs.h
new file mode 100644
index 00000000..b3be1c92
--- /dev/null
+++ b/src/wrapped/generated/wrappedcapundefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedcapUNDEFS_H_
+#define __wrappedcapUNDEFS_H_
+
+
+#endif // __wrappedcapUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcrashhandlerdefs.h b/src/wrapped/generated/wrappedcrashhandlerdefs.h
index 54e0d20f..6048042a 100644
--- a/src/wrapped/generated/wrappedcrashhandlerdefs.h
+++ b/src/wrapped/generated/wrappedcrashhandlerdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrashhandlerDEFS_H_
 #define __wrappedcrashhandlerDEFS_H_
diff --git a/src/wrapped/generated/wrappedcrashhandlertypes.h b/src/wrapped/generated/wrappedcrashhandlertypes.h
index cc0f4981..c582a1d8 100644
--- a/src/wrapped/generated/wrappedcrashhandlertypes.h
+++ b/src/wrapped/generated/wrappedcrashhandlertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrashhandlerTYPES_H_
 #define __wrappedcrashhandlerTYPES_H_
diff --git a/src/wrapped/generated/wrappedcrashhandlerundefs.h b/src/wrapped/generated/wrappedcrashhandlerundefs.h
index 0ff57838..0d4cd35f 100644
--- a/src/wrapped/generated/wrappedcrashhandlerundefs.h
+++ b/src/wrapped/generated/wrappedcrashhandlerundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrashhandlerUNDEFS_H_
 #define __wrappedcrashhandlerUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcrypto3defs.h b/src/wrapped/generated/wrappedcrypto3defs.h
index 23d9412a..ce1acd5a 100644
--- a/src/wrapped/generated/wrappedcrypto3defs.h
+++ b/src/wrapped/generated/wrappedcrypto3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrypto3DEFS_H_
 #define __wrappedcrypto3DEFS_H_
diff --git a/src/wrapped/generated/wrappedcrypto3types.h b/src/wrapped/generated/wrappedcrypto3types.h
index 8958d348..ee932d24 100644
--- a/src/wrapped/generated/wrappedcrypto3types.h
+++ b/src/wrapped/generated/wrappedcrypto3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrypto3TYPES_H_
 #define __wrappedcrypto3TYPES_H_
@@ -15,6 +15,8 @@ typedef void (*vFp_t)(void*);
 typedef void (*vFpp_t)(void*, void*);
 typedef void* (*pFpp_t)(void*, void*);
 typedef int32_t (*iFppp_t)(void*, void*, void*);
+typedef void (*vFiipV_t)(int32_t, int32_t, void*, ...);
+typedef void (*vFiipA_t)(int32_t, int32_t, void*, va_list);
 typedef void* (*pFpppp_t)(void*, void*, void*, void*);
 typedef int32_t (*iFpiipp_t)(void*, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFpplppi_t)(void*, void*, intptr_t, void*, void*, int32_t);
@@ -26,6 +28,8 @@ typedef int32_t (*iFppppipp_t)(void*, void*, void*, void*, int32_t, void*, void*
 	GO(X509_STORE_CTX_set_verify_cb, vFpp_t) \
 	GO(OPENSSL_sk_pop_free, pFpp_t) \
 	GO(ASN1_i2d_bio, iFppp_t) \
+	GO(ERR_set_error, vFiipV_t) \
+	GO(ERR_vset_error, vFiipA_t) \
 	GO(ASN1_d2i_bio, pFpppp_t) \
 	GO(PEM_read_bio_DSAPrivateKey, pFpppp_t) \
 	GO(PEM_read_bio_DSA_PUBKEY, pFpppp_t) \
diff --git a/src/wrapped/generated/wrappedcrypto3undefs.h b/src/wrapped/generated/wrappedcrypto3undefs.h
index c6c7cb79..05f34f2e 100644
--- a/src/wrapped/generated/wrappedcrypto3undefs.h
+++ b/src/wrapped/generated/wrappedcrypto3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcrypto3UNDEFS_H_
 #define __wrappedcrypto3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcryptodefs.h b/src/wrapped/generated/wrappedcryptodefs.h
index ec601398..21060d94 100644
--- a/src/wrapped/generated/wrappedcryptodefs.h
+++ b/src/wrapped/generated/wrappedcryptodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcryptoDEFS_H_
 #define __wrappedcryptoDEFS_H_
diff --git a/src/wrapped/generated/wrappedcryptotypes.h b/src/wrapped/generated/wrappedcryptotypes.h
index fce03fad..52f30a69 100644
--- a/src/wrapped/generated/wrappedcryptotypes.h
+++ b/src/wrapped/generated/wrappedcryptotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcryptoTYPES_H_
 #define __wrappedcryptoTYPES_H_
@@ -14,6 +14,7 @@
 typedef void (*vFp_t)(void*);
 typedef void* (*pFp_t)(void*);
 typedef void (*vFpp_t)(void*, void*);
+typedef int32_t (*iFpp_t)(void*, void*);
 typedef void* (*pFpp_t)(void*, void*);
 typedef int32_t (*iFppp_t)(void*, void*, void*);
 typedef void* (*pFpppp_t)(void*, void*, void*, void*);
@@ -26,15 +27,26 @@ typedef int32_t (*iFppppipp_t)(void*, void*, void*, void*, int32_t, void*, void*
 	GO(CRYPTO_set_locking_callback, vFp_t) \
 	GO(sk_new, pFp_t) \
 	GO(X509_STORE_CTX_set_verify_cb, vFpp_t) \
+	GO(X509_STORE_set_verify_cb, vFpp_t) \
 	GO(sk_pop_free, vFpp_t) \
+	GO(BIO_meth_set_create, iFpp_t) \
+	GO(BIO_meth_set_ctrl, iFpp_t) \
+	GO(BIO_meth_set_destroy, iFpp_t) \
+	GO(BIO_meth_set_gets, iFpp_t) \
+	GO(BIO_meth_set_puts, iFpp_t) \
+	GO(BIO_meth_set_read, iFpp_t) \
+	GO(BIO_meth_set_write, iFpp_t) \
 	GO(OPENSSL_sk_pop_free, pFpp_t) \
 	GO(ASN1_i2d_bio, iFppp_t) \
 	GO(ASN1_d2i_bio, pFpppp_t) \
+	GO(PEM_read_bio_DHparams, pFpppp_t) \
 	GO(PEM_read_bio_DSAPrivateKey, pFpppp_t) \
 	GO(PEM_read_bio_DSA_PUBKEY, pFpppp_t) \
 	GO(PEM_read_bio_ECPrivateKey, pFpppp_t) \
 	GO(PEM_read_bio_EC_PUBKEY, pFpppp_t) \
 	GO(PEM_read_bio_PKCS7, pFpppp_t) \
+	GO(PEM_read_bio_PUBKEY, pFpppp_t) \
+	GO(PEM_read_bio_PrivateKey, pFpppp_t) \
 	GO(PEM_read_bio_RSAPrivateKey, pFpppp_t) \
 	GO(PEM_read_bio_RSA_PUBKEY, pFpppp_t) \
 	GO(PEM_read_bio_X509, pFpppp_t) \
@@ -46,6 +58,7 @@ typedef int32_t (*iFppppipp_t)(void*, void*, void*, void*, int32_t, void*, void*
 	GO(ENGINE_ctrl_cmd, iFpplppi_t) \
 	GO(PEM_write_bio_DSAPrivateKey, iFppppipp_t) \
 	GO(PEM_write_bio_ECPrivateKey, iFppppipp_t) \
+	GO(PEM_write_bio_PrivateKey, iFppppipp_t) \
 	GO(PEM_write_bio_RSAPrivateKey, iFppppipp_t)
 
 #endif // __wrappedcryptoTYPES_H_
diff --git a/src/wrapped/generated/wrappedcryptoundefs.h b/src/wrapped/generated/wrappedcryptoundefs.h
index 8f9f1f65..2455ff14 100644
--- a/src/wrapped/generated/wrappedcryptoundefs.h
+++ b/src/wrapped/generated/wrappedcryptoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcryptoUNDEFS_H_
 #define __wrappedcryptoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedcurldefs.h b/src/wrapped/generated/wrappedcurldefs.h
index 77ad009e..c195fbc5 100644
--- a/src/wrapped/generated/wrappedcurldefs.h
+++ b/src/wrapped/generated/wrappedcurldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcurlDEFS_H_
 #define __wrappedcurlDEFS_H_
diff --git a/src/wrapped/generated/wrappedcurltypes.h b/src/wrapped/generated/wrappedcurltypes.h
index 0eac2b84..9426caa0 100644
--- a/src/wrapped/generated/wrappedcurltypes.h
+++ b/src/wrapped/generated/wrappedcurltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcurlTYPES_H_
 #define __wrappedcurlTYPES_H_
diff --git a/src/wrapped/generated/wrappedcurlundefs.h b/src/wrapped/generated/wrappedcurlundefs.h
index 91952f7a..bd04c206 100644
--- a/src/wrapped/generated/wrappedcurlundefs.h
+++ b/src/wrapped/generated/wrappedcurlundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedcurlUNDEFS_H_
 #define __wrappedcurlUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedd3dadapter9defs.h b/src/wrapped/generated/wrappedd3dadapter9defs.h
index a19cf5ad..e7d1de44 100644
--- a/src/wrapped/generated/wrappedd3dadapter9defs.h
+++ b/src/wrapped/generated/wrappedd3dadapter9defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedd3dadapter9DEFS_H_
 #define __wrappedd3dadapter9DEFS_H_
diff --git a/src/wrapped/generated/wrappedd3dadapter9types.h b/src/wrapped/generated/wrappedd3dadapter9types.h
index beebd8ef..8b35df50 100644
--- a/src/wrapped/generated/wrappedd3dadapter9types.h
+++ b/src/wrapped/generated/wrappedd3dadapter9types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedd3dadapter9TYPES_H_
 #define __wrappedd3dadapter9TYPES_H_
diff --git a/src/wrapped/generated/wrappedd3dadapter9undefs.h b/src/wrapped/generated/wrappedd3dadapter9undefs.h
index da8b564e..f8dc9746 100644
--- a/src/wrapped/generated/wrappedd3dadapter9undefs.h
+++ b/src/wrapped/generated/wrappedd3dadapter9undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedd3dadapter9UNDEFS_H_
 #define __wrappedd3dadapter9UNDEFS_H_
diff --git a/src/wrapped/generated/wrappeddbusdefs.h b/src/wrapped/generated/wrappeddbusdefs.h
index ecc4d722..a8406bdd 100644
--- a/src/wrapped/generated/wrappeddbusdefs.h
+++ b/src/wrapped/generated/wrappeddbusdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusDEFS_H_
 #define __wrappeddbusDEFS_H_
diff --git a/src/wrapped/generated/wrappeddbusglib1defs.h b/src/wrapped/generated/wrappeddbusglib1defs.h
index e031d2dc..f4402baa 100644
--- a/src/wrapped/generated/wrappeddbusglib1defs.h
+++ b/src/wrapped/generated/wrappeddbusglib1defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusglib1DEFS_H_
 #define __wrappeddbusglib1DEFS_H_
diff --git a/src/wrapped/generated/wrappeddbusglib1types.h b/src/wrapped/generated/wrappeddbusglib1types.h
index 3dc3ceff..a73a56e9 100644
--- a/src/wrapped/generated/wrappeddbusglib1types.h
+++ b/src/wrapped/generated/wrappeddbusglib1types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusglib1TYPES_H_
 #define __wrappeddbusglib1TYPES_H_
diff --git a/src/wrapped/generated/wrappeddbusglib1undefs.h b/src/wrapped/generated/wrappeddbusglib1undefs.h
index 5dcdedf3..e8c5e978 100644
--- a/src/wrapped/generated/wrappeddbusglib1undefs.h
+++ b/src/wrapped/generated/wrappeddbusglib1undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusglib1UNDEFS_H_
 #define __wrappeddbusglib1UNDEFS_H_
diff --git a/src/wrapped/generated/wrappeddbustypes.h b/src/wrapped/generated/wrappeddbustypes.h
index 83ea5b82..ed139fe2 100644
--- a/src/wrapped/generated/wrappeddbustypes.h
+++ b/src/wrapped/generated/wrappeddbustypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusTYPES_H_
 #define __wrappeddbusTYPES_H_
@@ -38,6 +38,7 @@ typedef int32_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
 	GO(dbus_message_get_args, iFppip_t) \
 	GO(dbus_message_get_args_valist, iFppiA_t) \
 	GO(dbus_connection_add_filter, iFpppp_t) \
+	GO(dbus_connection_register_fallback, iFpppp_t) \
 	GO(dbus_pending_call_set_notify, iFpppp_t) \
 	GO(dbus_connection_try_register_fallback, iFppppp_t) \
 	GO(dbus_connection_try_register_object_path, iFppppp_t) \
diff --git a/src/wrapped/generated/wrappeddbusundefs.h b/src/wrapped/generated/wrappeddbusundefs.h
index 93796076..d58b9ee0 100644
--- a/src/wrapped/generated/wrappeddbusundefs.h
+++ b/src/wrapped/generated/wrappeddbusundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappeddbusUNDEFS_H_
 #define __wrappeddbusUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedexpatdefs.h b/src/wrapped/generated/wrappedexpatdefs.h
index 02bc963a..86557e8e 100644
--- a/src/wrapped/generated/wrappedexpatdefs.h
+++ b/src/wrapped/generated/wrappedexpatdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedexpatDEFS_H_
 #define __wrappedexpatDEFS_H_
diff --git a/src/wrapped/generated/wrappedexpattypes.h b/src/wrapped/generated/wrappedexpattypes.h
index 02ed574e..e5f6b71f 100644
--- a/src/wrapped/generated/wrappedexpattypes.h
+++ b/src/wrapped/generated/wrappedexpattypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedexpatTYPES_H_
 #define __wrappedexpatTYPES_H_
diff --git a/src/wrapped/generated/wrappedexpatundefs.h b/src/wrapped/generated/wrappedexpatundefs.h
index 43b30c1d..f3c6a7fe 100644
--- a/src/wrapped/generated/wrappedexpatundefs.h
+++ b/src/wrapped/generated/wrappedexpatundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedexpatUNDEFS_H_
 #define __wrappedexpatUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedfaudiodefs.h b/src/wrapped/generated/wrappedfaudiodefs.h
index 88c4fafd..2c95e056 100644
--- a/src/wrapped/generated/wrappedfaudiodefs.h
+++ b/src/wrapped/generated/wrappedfaudiodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfaudioDEFS_H_
 #define __wrappedfaudioDEFS_H_
diff --git a/src/wrapped/generated/wrappedfaudiotypes.h b/src/wrapped/generated/wrappedfaudiotypes.h
index b8a6f942..d809382a 100644
--- a/src/wrapped/generated/wrappedfaudiotypes.h
+++ b/src/wrapped/generated/wrappedfaudiotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfaudioTYPES_H_
 #define __wrappedfaudioTYPES_H_
diff --git a/src/wrapped/generated/wrappedfaudioundefs.h b/src/wrapped/generated/wrappedfaudioundefs.h
index 519b393f..df4fb44d 100644
--- a/src/wrapped/generated/wrappedfaudioundefs.h
+++ b/src/wrapped/generated/wrappedfaudioundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfaudioUNDEFS_H_
 #define __wrappedfaudioUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedflacdefs.h b/src/wrapped/generated/wrappedflacdefs.h
index ae76c697..a17eafad 100644
--- a/src/wrapped/generated/wrappedflacdefs.h
+++ b/src/wrapped/generated/wrappedflacdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedflacDEFS_H_
 #define __wrappedflacDEFS_H_
diff --git a/src/wrapped/generated/wrappedflactypes.h b/src/wrapped/generated/wrappedflactypes.h
index ffa36394..1cec1ca5 100644
--- a/src/wrapped/generated/wrappedflactypes.h
+++ b/src/wrapped/generated/wrappedflactypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedflacTYPES_H_
 #define __wrappedflacTYPES_H_
diff --git a/src/wrapped/generated/wrappedflacundefs.h b/src/wrapped/generated/wrappedflacundefs.h
index b084efff..ecb44cdf 100644
--- a/src/wrapped/generated/wrappedflacundefs.h
+++ b/src/wrapped/generated/wrappedflacundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedflacUNDEFS_H_
 #define __wrappedflacUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedfontconfigdefs.h b/src/wrapped/generated/wrappedfontconfigdefs.h
index 57b5421b..353653f9 100644
--- a/src/wrapped/generated/wrappedfontconfigdefs.h
+++ b/src/wrapped/generated/wrappedfontconfigdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfontconfigDEFS_H_
 #define __wrappedfontconfigDEFS_H_
diff --git a/src/wrapped/generated/wrappedfontconfigtypes.h b/src/wrapped/generated/wrappedfontconfigtypes.h
index 2a0c1efa..9a35cd7e 100644
--- a/src/wrapped/generated/wrappedfontconfigtypes.h
+++ b/src/wrapped/generated/wrappedfontconfigtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfontconfigTYPES_H_
 #define __wrappedfontconfigTYPES_H_
diff --git a/src/wrapped/generated/wrappedfontconfigundefs.h b/src/wrapped/generated/wrappedfontconfigundefs.h
index 005dbfd9..a68cdec5 100644
--- a/src/wrapped/generated/wrappedfontconfigundefs.h
+++ b/src/wrapped/generated/wrappedfontconfigundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfontconfigUNDEFS_H_
 #define __wrappedfontconfigUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedfreebl3defs.h b/src/wrapped/generated/wrappedfreebl3defs.h
index 2a75ec20..4a16bcb1 100644
--- a/src/wrapped/generated/wrappedfreebl3defs.h
+++ b/src/wrapped/generated/wrappedfreebl3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreebl3DEFS_H_
 #define __wrappedfreebl3DEFS_H_
diff --git a/src/wrapped/generated/wrappedfreebl3types.h b/src/wrapped/generated/wrappedfreebl3types.h
index 49e096dd..d81a5c43 100644
--- a/src/wrapped/generated/wrappedfreebl3types.h
+++ b/src/wrapped/generated/wrappedfreebl3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreebl3TYPES_H_
 #define __wrappedfreebl3TYPES_H_
diff --git a/src/wrapped/generated/wrappedfreebl3undefs.h b/src/wrapped/generated/wrappedfreebl3undefs.h
index e82ddf04..492cc1da 100644
--- a/src/wrapped/generated/wrappedfreebl3undefs.h
+++ b/src/wrapped/generated/wrappedfreebl3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreebl3UNDEFS_H_
 #define __wrappedfreebl3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedfreetypedefs.h b/src/wrapped/generated/wrappedfreetypedefs.h
index d04d70c5..61f9c0db 100644
--- a/src/wrapped/generated/wrappedfreetypedefs.h
+++ b/src/wrapped/generated/wrappedfreetypedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreetypeDEFS_H_
 #define __wrappedfreetypeDEFS_H_
diff --git a/src/wrapped/generated/wrappedfreetypetypes.h b/src/wrapped/generated/wrappedfreetypetypes.h
index 98f32575..d2e00ecb 100644
--- a/src/wrapped/generated/wrappedfreetypetypes.h
+++ b/src/wrapped/generated/wrappedfreetypetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreetypeTYPES_H_
 #define __wrappedfreetypeTYPES_H_
diff --git a/src/wrapped/generated/wrappedfreetypeundefs.h b/src/wrapped/generated/wrappedfreetypeundefs.h
index 946242d1..a5cb97d6 100644
--- a/src/wrapped/generated/wrappedfreetypeundefs.h
+++ b/src/wrapped/generated/wrappedfreetypeundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedfreetypeUNDEFS_H_
 #define __wrappedfreetypeUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgbmdefs.h b/src/wrapped/generated/wrappedgbmdefs.h
index 6fea3d62..bf0ea0ef 100644
--- a/src/wrapped/generated/wrappedgbmdefs.h
+++ b/src/wrapped/generated/wrappedgbmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgbmDEFS_H_
 #define __wrappedgbmDEFS_H_
diff --git a/src/wrapped/generated/wrappedgbmtypes.h b/src/wrapped/generated/wrappedgbmtypes.h
index c6c8da8c..7ebdb5b0 100644
--- a/src/wrapped/generated/wrappedgbmtypes.h
+++ b/src/wrapped/generated/wrappedgbmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgbmTYPES_H_
 #define __wrappedgbmTYPES_H_
diff --git a/src/wrapped/generated/wrappedgbmundefs.h b/src/wrapped/generated/wrappedgbmundefs.h
index 2d04c430..0c4296ff 100644
--- a/src/wrapped/generated/wrappedgbmundefs.h
+++ b/src/wrapped/generated/wrappedgbmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgbmUNDEFS_H_
 #define __wrappedgbmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgconf2defs.h b/src/wrapped/generated/wrappedgconf2defs.h
index 8ed9e269..baba4d20 100644
--- a/src/wrapped/generated/wrappedgconf2defs.h
+++ b/src/wrapped/generated/wrappedgconf2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgconf2DEFS_H_
 #define __wrappedgconf2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgconf2types.h b/src/wrapped/generated/wrappedgconf2types.h
index 3bdbc664..360690a6 100644
--- a/src/wrapped/generated/wrappedgconf2types.h
+++ b/src/wrapped/generated/wrappedgconf2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgconf2TYPES_H_
 #define __wrappedgconf2TYPES_H_
diff --git a/src/wrapped/generated/wrappedgconf2undefs.h b/src/wrapped/generated/wrappedgconf2undefs.h
index a1ab3a7c..70711aec 100644
--- a/src/wrapped/generated/wrappedgconf2undefs.h
+++ b/src/wrapped/generated/wrappedgconf2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgconf2UNDEFS_H_
 #define __wrappedgconf2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgcryptdefs.h b/src/wrapped/generated/wrappedgcryptdefs.h
index f401ba8e..fdb5d6e8 100644
--- a/src/wrapped/generated/wrappedgcryptdefs.h
+++ b/src/wrapped/generated/wrappedgcryptdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgcryptDEFS_H_
 #define __wrappedgcryptDEFS_H_
diff --git a/src/wrapped/generated/wrappedgcrypttypes.h b/src/wrapped/generated/wrappedgcrypttypes.h
index 93db3127..b09c103b 100644
--- a/src/wrapped/generated/wrappedgcrypttypes.h
+++ b/src/wrapped/generated/wrappedgcrypttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgcryptTYPES_H_
 #define __wrappedgcryptTYPES_H_
diff --git a/src/wrapped/generated/wrappedgcryptundefs.h b/src/wrapped/generated/wrappedgcryptundefs.h
index bd0c71d3..be639c5f 100644
--- a/src/wrapped/generated/wrappedgcryptundefs.h
+++ b/src/wrapped/generated/wrappedgcryptundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgcryptUNDEFS_H_
 #define __wrappedgcryptUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgdk3defs.h b/src/wrapped/generated/wrappedgdk3defs.h
index 56358556..287c4a94 100644
--- a/src/wrapped/generated/wrappedgdk3defs.h
+++ b/src/wrapped/generated/wrappedgdk3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdk3DEFS_H_
 #define __wrappedgdk3DEFS_H_
diff --git a/src/wrapped/generated/wrappedgdk3types.h b/src/wrapped/generated/wrappedgdk3types.h
index 2f888be1..c6b278f6 100644
--- a/src/wrapped/generated/wrappedgdk3types.h
+++ b/src/wrapped/generated/wrappedgdk3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdk3TYPES_H_
 #define __wrappedgdk3TYPES_H_
@@ -15,6 +15,7 @@ typedef void (*vFpp_t)(void*, void*);
 typedef int32_t (*iFpp_t)(void*, void*);
 typedef void (*vFppp_t)(void*, void*, void*);
 typedef int32_t (*iFiipp_t)(int32_t, int32_t, void*, void*);
+typedef uint32_t (*uFippp_t)(int32_t, void*, void*, void*);
 typedef int32_t (*iFiippp_t)(int32_t, int32_t, void*, void*, void*);
 
 #define SUPER() ADDED_FUNCTIONS() \
@@ -24,6 +25,7 @@ typedef int32_t (*iFiippp_t)(int32_t, int32_t, void*, void*, void*);
 	GO(gdk_window_add_filter, vFppp_t) \
 	GO(gdk_window_remove_filter, vFppp_t) \
 	GO(gdk_input_add, iFiipp_t) \
+	GO(gdk_threads_add_idle_full, uFippp_t) \
 	GO(gdk_input_add_full, iFiippp_t)
 
 #endif // __wrappedgdk3TYPES_H_
diff --git a/src/wrapped/generated/wrappedgdk3undefs.h b/src/wrapped/generated/wrappedgdk3undefs.h
index 248dfe33..88629a1f 100644
--- a/src/wrapped/generated/wrappedgdk3undefs.h
+++ b/src/wrapped/generated/wrappedgdk3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdk3UNDEFS_H_
 #define __wrappedgdk3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgdkpixbuf2defs.h b/src/wrapped/generated/wrappedgdkpixbuf2defs.h
index eb540331..57a4b7ad 100644
--- a/src/wrapped/generated/wrappedgdkpixbuf2defs.h
+++ b/src/wrapped/generated/wrappedgdkpixbuf2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkpixbuf2DEFS_H_
 #define __wrappedgdkpixbuf2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgdkpixbuf2types.h b/src/wrapped/generated/wrappedgdkpixbuf2types.h
index ca1e471e..ea505cd2 100644
--- a/src/wrapped/generated/wrappedgdkpixbuf2types.h
+++ b/src/wrapped/generated/wrappedgdkpixbuf2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkpixbuf2TYPES_H_
 #define __wrappedgdkpixbuf2TYPES_H_
diff --git a/src/wrapped/generated/wrappedgdkpixbuf2undefs.h b/src/wrapped/generated/wrappedgdkpixbuf2undefs.h
index c3f38a1b..a7250f8d 100644
--- a/src/wrapped/generated/wrappedgdkpixbuf2undefs.h
+++ b/src/wrapped/generated/wrappedgdkpixbuf2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkpixbuf2UNDEFS_H_
 #define __wrappedgdkpixbuf2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgdkx112defs.h b/src/wrapped/generated/wrappedgdkx112defs.h
index 3bedb8ee..cc0dbce8 100644
--- a/src/wrapped/generated/wrappedgdkx112defs.h
+++ b/src/wrapped/generated/wrappedgdkx112defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkx112DEFS_H_
 #define __wrappedgdkx112DEFS_H_
diff --git a/src/wrapped/generated/wrappedgdkx112types.h b/src/wrapped/generated/wrappedgdkx112types.h
index eca44b2e..1d129740 100644
--- a/src/wrapped/generated/wrappedgdkx112types.h
+++ b/src/wrapped/generated/wrappedgdkx112types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkx112TYPES_H_
 #define __wrappedgdkx112TYPES_H_
diff --git a/src/wrapped/generated/wrappedgdkx112undefs.h b/src/wrapped/generated/wrappedgdkx112undefs.h
index bc855c68..ec695070 100644
--- a/src/wrapped/generated/wrappedgdkx112undefs.h
+++ b/src/wrapped/generated/wrappedgdkx112undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgdkx112UNDEFS_H_
 #define __wrappedgdkx112UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgio2defs.h b/src/wrapped/generated/wrappedgio2defs.h
index 80a11ed6..076c7527 100644
--- a/src/wrapped/generated/wrappedgio2defs.h
+++ b/src/wrapped/generated/wrappedgio2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgio2DEFS_H_
 #define __wrappedgio2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgio2types.h b/src/wrapped/generated/wrappedgio2types.h
index 991e2b73..f2c5fe11 100644
--- a/src/wrapped/generated/wrappedgio2types.h
+++ b/src/wrapped/generated/wrappedgio2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgio2TYPES_H_
 #define __wrappedgio2TYPES_H_
@@ -19,6 +19,7 @@ typedef uint32_t (*uFpppp_t)(void*, void*, void*, void*);
 typedef uintptr_t (*LFpppp_t)(void*, void*, void*, void*);
 typedef void* (*pFpppp_t)(void*, void*, void*, void*);
 typedef void (*vFpippp_t)(void*, int32_t, void*, void*, void*);
+typedef void (*vFpuipV_t)(void*, uint32_t, int32_t, void*, ...);
 typedef void (*vFppipV_t)(void*, void*, int32_t, void*, ...);
 typedef void (*vFppipA_t)(void*, void*, int32_t, void*, va_list);
 typedef void* (*pFppppV_t)(void*, void*, void*, void*, ...);
@@ -45,6 +46,7 @@ typedef void (*vFpppppppiippp_t)(void*, void*, void*, void*, void*, void*, void*
 
 #define SUPER() ADDED_FUNCTIONS() \
 	GO(g_simple_async_result_set_op_res_gpointer, vFppp_t) \
+	GO(g_task_return_pointer, vFppp_t) \
 	GO(g_bus_get, vFippp_t) \
 	GO(g_simple_async_result_run_in_thread, vFppip_t) \
 	GO(g_dbus_connection_close, vFpppp_t) \
@@ -56,7 +58,9 @@ typedef void (*vFpppppppiippp_t)(void*, void*, void*, void*, void*, void*, void*
 	GO(g_simple_async_result_new, pFpppp_t) \
 	GO(g_simple_async_result_new_from_error, pFpppp_t) \
 	GO(g_simple_async_result_new_take_error, pFpppp_t) \
+	GO(g_task_new, pFpppp_t) \
 	GO(g_async_initable_init_async, vFpippp_t) \
+	GO(g_task_return_new_error, vFpuipV_t) \
 	GO(g_simple_async_result_set_error, vFppipV_t) \
 	GO(g_simple_async_result_set_error_va, vFppipA_t) \
 	GO(g_initable_new, pFppppV_t) \
diff --git a/src/wrapped/generated/wrappedgio2undefs.h b/src/wrapped/generated/wrappedgio2undefs.h
index ad5880af..6a24ec41 100644
--- a/src/wrapped/generated/wrappedgio2undefs.h
+++ b/src/wrapped/generated/wrappedgio2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgio2UNDEFS_H_
 #define __wrappedgio2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedglib2defs.h b/src/wrapped/generated/wrappedglib2defs.h
index 7f5f47f0..69ff6e26 100644
--- a/src/wrapped/generated/wrappedglib2defs.h
+++ b/src/wrapped/generated/wrappedglib2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedglib2DEFS_H_
 #define __wrappedglib2DEFS_H_
diff --git a/src/wrapped/generated/wrappedglib2types.h b/src/wrapped/generated/wrappedglib2types.h
index 8a30a358..a80a71e1 100644
--- a/src/wrapped/generated/wrappedglib2types.h
+++ b/src/wrapped/generated/wrappedglib2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedglib2TYPES_H_
 #define __wrappedglib2TYPES_H_
diff --git a/src/wrapped/generated/wrappedglib2undefs.h b/src/wrapped/generated/wrappedglib2undefs.h
index 0ffb827a..7fee531e 100644
--- a/src/wrapped/generated/wrappedglib2undefs.h
+++ b/src/wrapped/generated/wrappedglib2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedglib2UNDEFS_H_
 #define __wrappedglib2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgmodule2defs.h b/src/wrapped/generated/wrappedgmodule2defs.h
index 752f37e5..07c57695 100644
--- a/src/wrapped/generated/wrappedgmodule2defs.h
+++ b/src/wrapped/generated/wrappedgmodule2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmodule2DEFS_H_
 #define __wrappedgmodule2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgmodule2types.h b/src/wrapped/generated/wrappedgmodule2types.h
index 0f2414b0..b47d2011 100644
--- a/src/wrapped/generated/wrappedgmodule2types.h
+++ b/src/wrapped/generated/wrappedgmodule2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmodule2TYPES_H_
 #define __wrappedgmodule2TYPES_H_
diff --git a/src/wrapped/generated/wrappedgmodule2undefs.h b/src/wrapped/generated/wrappedgmodule2undefs.h
index 73b5acd4..95899ae5 100644
--- a/src/wrapped/generated/wrappedgmodule2undefs.h
+++ b/src/wrapped/generated/wrappedgmodule2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmodule2UNDEFS_H_
 #define __wrappedgmodule2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgmpdefs.h b/src/wrapped/generated/wrappedgmpdefs.h
index 9a8098ad..bcb57aaf 100644
--- a/src/wrapped/generated/wrappedgmpdefs.h
+++ b/src/wrapped/generated/wrappedgmpdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmpDEFS_H_
 #define __wrappedgmpDEFS_H_
diff --git a/src/wrapped/generated/wrappedgmptypes.h b/src/wrapped/generated/wrappedgmptypes.h
index 15f8b3dd..7ad626cf 100644
--- a/src/wrapped/generated/wrappedgmptypes.h
+++ b/src/wrapped/generated/wrappedgmptypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmpTYPES_H_
 #define __wrappedgmpTYPES_H_
diff --git a/src/wrapped/generated/wrappedgmpundefs.h b/src/wrapped/generated/wrappedgmpundefs.h
index bf130739..30992c9f 100644
--- a/src/wrapped/generated/wrappedgmpundefs.h
+++ b/src/wrapped/generated/wrappedgmpundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgmpUNDEFS_H_
 #define __wrappedgmpUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgnutlsdefs.h b/src/wrapped/generated/wrappedgnutlsdefs.h
index 1dcd724e..56bffbd1 100644
--- a/src/wrapped/generated/wrappedgnutlsdefs.h
+++ b/src/wrapped/generated/wrappedgnutlsdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgnutlsDEFS_H_
 #define __wrappedgnutlsDEFS_H_
diff --git a/src/wrapped/generated/wrappedgnutlstypes.h b/src/wrapped/generated/wrappedgnutlstypes.h
index e84f3d53..f53e02a2 100644
--- a/src/wrapped/generated/wrappedgnutlstypes.h
+++ b/src/wrapped/generated/wrappedgnutlstypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgnutlsTYPES_H_
 #define __wrappedgnutlsTYPES_H_
diff --git a/src/wrapped/generated/wrappedgnutlsundefs.h b/src/wrapped/generated/wrappedgnutlsundefs.h
index 814794b4..821d81b1 100644
--- a/src/wrapped/generated/wrappedgnutlsundefs.h
+++ b/src/wrapped/generated/wrappedgnutlsundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgnutlsUNDEFS_H_
 #define __wrappedgnutlsUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgobject2defs.h b/src/wrapped/generated/wrappedgobject2defs.h
index 398c0545..037139e8 100644
--- a/src/wrapped/generated/wrappedgobject2defs.h
+++ b/src/wrapped/generated/wrappedgobject2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgobject2DEFS_H_
 #define __wrappedgobject2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgobject2types.h b/src/wrapped/generated/wrappedgobject2types.h
index 42b93dbf..20ee997c 100644
--- a/src/wrapped/generated/wrappedgobject2types.h
+++ b/src/wrapped/generated/wrappedgobject2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgobject2TYPES_H_
 #define __wrappedgobject2TYPES_H_
@@ -37,7 +37,7 @@ typedef uintptr_t (*LFLpppi_t)(uintptr_t, void*, void*, void*, int32_t);
 typedef uintptr_t (*LFppppi_t)(void*, void*, void*, void*, int32_t);
 typedef uintptr_t (*LFpppppu_t)(void*, void*, void*, void*, void*, uint32_t);
 typedef uint32_t (*uFpiupppp_t)(void*, int32_t, uint32_t, void*, void*, void*, void*);
-typedef uintptr_t (*LFLpLpLpi_t)(uintptr_t, void*, uintptr_t, void*, uintptr_t, void*, int32_t);
+typedef uintptr_t (*LFLpupupu_t)(uintptr_t, void*, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef uintptr_t (*LFpiupppp_t)(void*, int32_t, uint32_t, void*, void*, void*, void*);
 typedef uint32_t (*uFpLiupppLuV_t)(void*, uintptr_t, int32_t, uint32_t, void*, void*, void*, uintptr_t, uint32_t, ...);
 typedef uint32_t (*uFpLippppLup_t)(void*, uintptr_t, int32_t, void*, void*, void*, void*, uintptr_t, uint32_t, void*);
@@ -77,7 +77,7 @@ typedef uint32_t (*uFpLippppLuA_t)(void*, uintptr_t, int32_t, void*, void*, void
 	GO(g_signal_handlers_block_matched, uFpiupppp_t) \
 	GO(g_signal_handlers_disconnect_matched, uFpiupppp_t) \
 	GO(g_signal_handlers_unblock_matched, uFpiupppp_t) \
-	GO(g_type_register_static_simple, LFLpLpLpi_t) \
+	GO(g_type_register_static_simple, LFLpupupu_t) \
 	GO(g_signal_handler_find, LFpiupppp_t) \
 	GO(g_signal_new, uFpLiupppLuV_t) \
 	GO(g_signal_newv, uFpLippppLup_t) \
diff --git a/src/wrapped/generated/wrappedgobject2undefs.h b/src/wrapped/generated/wrappedgobject2undefs.h
index 5454f152..86188e0f 100644
--- a/src/wrapped/generated/wrappedgobject2undefs.h
+++ b/src/wrapped/generated/wrappedgobject2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgobject2UNDEFS_H_
 #define __wrappedgobject2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgompdefs.h b/src/wrapped/generated/wrappedgompdefs.h
new file mode 100644
index 00000000..0b749fef
--- /dev/null
+++ b/src/wrapped/generated/wrappedgompdefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedgompDEFS_H_
+#define __wrappedgompDEFS_H_
+
+
+#endif // __wrappedgompDEFS_H_
diff --git a/src/wrapped/generated/wrappedgomptypes.h b/src/wrapped/generated/wrappedgomptypes.h
new file mode 100644
index 00000000..8b28dc5c
--- /dev/null
+++ b/src/wrapped/generated/wrappedgomptypes.h
@@ -0,0 +1,17 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedgompTYPES_H_
+#define __wrappedgompTYPES_H_
+
+#ifndef LIBNAME
+#error You should only #include this file inside a wrapped*.c file
+#endif
+#ifndef ADDED_FUNCTIONS
+#define ADDED_FUNCTIONS() 
+#endif
+
+
+#define SUPER() ADDED_FUNCTIONS()
+
+#endif // __wrappedgompTYPES_H_
diff --git a/src/wrapped/generated/wrappedgompundefs.h b/src/wrapped/generated/wrappedgompundefs.h
new file mode 100644
index 00000000..fc43f66f
--- /dev/null
+++ b/src/wrapped/generated/wrappedgompundefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedgompUNDEFS_H_
+#define __wrappedgompUNDEFS_H_
+
+
+#endif // __wrappedgompUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgssapidefs.h b/src/wrapped/generated/wrappedgssapidefs.h
index 952aca4c..616986f6 100644
--- a/src/wrapped/generated/wrappedgssapidefs.h
+++ b/src/wrapped/generated/wrappedgssapidefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapiDEFS_H_
 #define __wrappedgssapiDEFS_H_
diff --git a/src/wrapped/generated/wrappedgssapikrb5defs.h b/src/wrapped/generated/wrappedgssapikrb5defs.h
index 300b135c..9e31a625 100644
--- a/src/wrapped/generated/wrappedgssapikrb5defs.h
+++ b/src/wrapped/generated/wrappedgssapikrb5defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapikrb5DEFS_H_
 #define __wrappedgssapikrb5DEFS_H_
diff --git a/src/wrapped/generated/wrappedgssapikrb5types.h b/src/wrapped/generated/wrappedgssapikrb5types.h
index df34cdae..3941fd2e 100644
--- a/src/wrapped/generated/wrappedgssapikrb5types.h
+++ b/src/wrapped/generated/wrappedgssapikrb5types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapikrb5TYPES_H_
 #define __wrappedgssapikrb5TYPES_H_
diff --git a/src/wrapped/generated/wrappedgssapikrb5undefs.h b/src/wrapped/generated/wrappedgssapikrb5undefs.h
index 72f23496..714ff626 100644
--- a/src/wrapped/generated/wrappedgssapikrb5undefs.h
+++ b/src/wrapped/generated/wrappedgssapikrb5undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapikrb5UNDEFS_H_
 #define __wrappedgssapikrb5UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgssapitypes.h b/src/wrapped/generated/wrappedgssapitypes.h
index 10a4eee9..8aec39e2 100644
--- a/src/wrapped/generated/wrappedgssapitypes.h
+++ b/src/wrapped/generated/wrappedgssapitypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapiTYPES_H_
 #define __wrappedgssapiTYPES_H_
diff --git a/src/wrapped/generated/wrappedgssapiundefs.h b/src/wrapped/generated/wrappedgssapiundefs.h
index 2ff15c94..44e2ba9d 100644
--- a/src/wrapped/generated/wrappedgssapiundefs.h
+++ b/src/wrapped/generated/wrappedgssapiundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgssapiUNDEFS_H_
 #define __wrappedgssapiUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstappdefs.h b/src/wrapped/generated/wrappedgstappdefs.h
index 33f62bb6..164271ed 100644
--- a/src/wrapped/generated/wrappedgstappdefs.h
+++ b/src/wrapped/generated/wrappedgstappdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstappDEFS_H_
 #define __wrappedgstappDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstapptypes.h b/src/wrapped/generated/wrappedgstapptypes.h
index 65446106..018e9f73 100644
--- a/src/wrapped/generated/wrappedgstapptypes.h
+++ b/src/wrapped/generated/wrappedgstapptypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstappTYPES_H_
 #define __wrappedgstappTYPES_H_
diff --git a/src/wrapped/generated/wrappedgstappundefs.h b/src/wrapped/generated/wrappedgstappundefs.h
index b6234930..4ca020e2 100644
--- a/src/wrapped/generated/wrappedgstappundefs.h
+++ b/src/wrapped/generated/wrappedgstappundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstappUNDEFS_H_
 #define __wrappedgstappUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstaudiodefs.h b/src/wrapped/generated/wrappedgstaudiodefs.h
index a0244cf5..8b8eaed1 100644
--- a/src/wrapped/generated/wrappedgstaudiodefs.h
+++ b/src/wrapped/generated/wrappedgstaudiodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstaudioDEFS_H_
 #define __wrappedgstaudioDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstaudiotypes.h b/src/wrapped/generated/wrappedgstaudiotypes.h
index 3d2bab1a..8cfc5e60 100644
--- a/src/wrapped/generated/wrappedgstaudiotypes.h
+++ b/src/wrapped/generated/wrappedgstaudiotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstaudioTYPES_H_
 #define __wrappedgstaudioTYPES_H_
diff --git a/src/wrapped/generated/wrappedgstaudioundefs.h b/src/wrapped/generated/wrappedgstaudioundefs.h
index 28661ee9..f10847cb 100644
--- a/src/wrapped/generated/wrappedgstaudioundefs.h
+++ b/src/wrapped/generated/wrappedgstaudioundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstaudioUNDEFS_H_
 #define __wrappedgstaudioUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstbasedefs.h b/src/wrapped/generated/wrappedgstbasedefs.h
index b7c84389..f9b1581f 100644
--- a/src/wrapped/generated/wrappedgstbasedefs.h
+++ b/src/wrapped/generated/wrappedgstbasedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstbaseDEFS_H_
 #define __wrappedgstbaseDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstbasetypes.h b/src/wrapped/generated/wrappedgstbasetypes.h
index 9f86b32a..46ac9086 100644
--- a/src/wrapped/generated/wrappedgstbasetypes.h
+++ b/src/wrapped/generated/wrappedgstbasetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstbaseTYPES_H_
 #define __wrappedgstbaseTYPES_H_
diff --git a/src/wrapped/generated/wrappedgstbaseundefs.h b/src/wrapped/generated/wrappedgstbaseundefs.h
index 8945c017..177dc3d6 100644
--- a/src/wrapped/generated/wrappedgstbaseundefs.h
+++ b/src/wrapped/generated/wrappedgstbaseundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstbaseUNDEFS_H_
 #define __wrappedgstbaseUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstgldefs.h b/src/wrapped/generated/wrappedgstgldefs.h
index dabf9ee2..c076fc7a 100644
--- a/src/wrapped/generated/wrappedgstgldefs.h
+++ b/src/wrapped/generated/wrappedgstgldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstglDEFS_H_
 #define __wrappedgstglDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstgltypes.h b/src/wrapped/generated/wrappedgstgltypes.h
index fb403e88..e5f7daf4 100644
--- a/src/wrapped/generated/wrappedgstgltypes.h
+++ b/src/wrapped/generated/wrappedgstgltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstglTYPES_H_
 #define __wrappedgstglTYPES_H_
diff --git a/src/wrapped/generated/wrappedgstglundefs.h b/src/wrapped/generated/wrappedgstglundefs.h
index 541c7aa6..4e8957be 100644
--- a/src/wrapped/generated/wrappedgstglundefs.h
+++ b/src/wrapped/generated/wrappedgstglundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstglUNDEFS_H_
 #define __wrappedgstglUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstreamerdefs.h b/src/wrapped/generated/wrappedgstreamerdefs.h
index 9d2f057c..9e446b2b 100644
--- a/src/wrapped/generated/wrappedgstreamerdefs.h
+++ b/src/wrapped/generated/wrappedgstreamerdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstreamerDEFS_H_
 #define __wrappedgstreamerDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstreamertypes.h b/src/wrapped/generated/wrappedgstreamertypes.h
index 1464e544..bdaf1886 100644
--- a/src/wrapped/generated/wrappedgstreamertypes.h
+++ b/src/wrapped/generated/wrappedgstreamertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstreamerTYPES_H_
 #define __wrappedgstreamerTYPES_H_
@@ -13,6 +13,7 @@
 
 typedef void (*vFppV_t)(void*, void*, ...);
 typedef void (*vFppA_t)(void*, void*, va_list);
+typedef int32_t (*iFppp_t)(void*, void*, void*);
 typedef int32_t (*iFppV_t)(void*, void*, ...);
 typedef int32_t (*iFppA_t)(void*, void*, va_list);
 typedef void* (*pFppV_t)(void*, void*, ...);
@@ -27,6 +28,7 @@ typedef void (*vFpippippA_t)(void*, int32_t, void*, void*, int32_t, void*, void*
 	GO(gst_structure_remove_fields, vFppV_t) \
 	GO(gst_caps_set_simple_valist, vFppA_t) \
 	GO(gst_structure_remove_fields_valist, vFppA_t) \
+	GO(gst_caps_foreach, iFppp_t) \
 	GO(gst_structure_get, iFppV_t) \
 	GO(gst_structure_get_valist, iFppA_t) \
 	GO(gst_caps_new_simple, pFppV_t) \
diff --git a/src/wrapped/generated/wrappedgstreamerundefs.h b/src/wrapped/generated/wrappedgstreamerundefs.h
index 28df6ae9..890f0f66 100644
--- a/src/wrapped/generated/wrappedgstreamerundefs.h
+++ b/src/wrapped/generated/wrappedgstreamerundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstreamerUNDEFS_H_
 #define __wrappedgstreamerUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgsttagdefs.h b/src/wrapped/generated/wrappedgsttagdefs.h
index a7426a32..56df6468 100644
--- a/src/wrapped/generated/wrappedgsttagdefs.h
+++ b/src/wrapped/generated/wrappedgsttagdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgsttagDEFS_H_
 #define __wrappedgsttagDEFS_H_
diff --git a/src/wrapped/generated/wrappedgsttagtypes.h b/src/wrapped/generated/wrappedgsttagtypes.h
index 2e775191..82484afc 100644
--- a/src/wrapped/generated/wrappedgsttagtypes.h
+++ b/src/wrapped/generated/wrappedgsttagtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgsttagTYPES_H_
 #define __wrappedgsttagTYPES_H_
diff --git a/src/wrapped/generated/wrappedgsttagundefs.h b/src/wrapped/generated/wrappedgsttagundefs.h
index 0f175fe7..d79a221c 100644
--- a/src/wrapped/generated/wrappedgsttagundefs.h
+++ b/src/wrapped/generated/wrappedgsttagundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgsttagUNDEFS_H_
 #define __wrappedgsttagUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstvideodefs.h b/src/wrapped/generated/wrappedgstvideodefs.h
index 724324f7..d25a6803 100644
--- a/src/wrapped/generated/wrappedgstvideodefs.h
+++ b/src/wrapped/generated/wrappedgstvideodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstvideoDEFS_H_
 #define __wrappedgstvideoDEFS_H_
diff --git a/src/wrapped/generated/wrappedgstvideotypes.h b/src/wrapped/generated/wrappedgstvideotypes.h
index 21d0d898..13ee27bd 100644
--- a/src/wrapped/generated/wrappedgstvideotypes.h
+++ b/src/wrapped/generated/wrappedgstvideotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstvideoTYPES_H_
 #define __wrappedgstvideoTYPES_H_
diff --git a/src/wrapped/generated/wrappedgstvideoundefs.h b/src/wrapped/generated/wrappedgstvideoundefs.h
index 2ad73c4d..fc210ad8 100644
--- a/src/wrapped/generated/wrappedgstvideoundefs.h
+++ b/src/wrapped/generated/wrappedgstvideoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgstvideoUNDEFS_H_
 #define __wrappedgstvideoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgthread2defs.h b/src/wrapped/generated/wrappedgthread2defs.h
index 974eae2d..4c6d1b0c 100644
--- a/src/wrapped/generated/wrappedgthread2defs.h
+++ b/src/wrapped/generated/wrappedgthread2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgthread2DEFS_H_
 #define __wrappedgthread2DEFS_H_
diff --git a/src/wrapped/generated/wrappedgthread2types.h b/src/wrapped/generated/wrappedgthread2types.h
index 41eb6cb8..dbc79aff 100644
--- a/src/wrapped/generated/wrappedgthread2types.h
+++ b/src/wrapped/generated/wrappedgthread2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgthread2TYPES_H_
 #define __wrappedgthread2TYPES_H_
diff --git a/src/wrapped/generated/wrappedgthread2undefs.h b/src/wrapped/generated/wrappedgthread2undefs.h
index 05e86eb6..cdb418cd 100644
--- a/src/wrapped/generated/wrappedgthread2undefs.h
+++ b/src/wrapped/generated/wrappedgthread2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgthread2UNDEFS_H_
 #define __wrappedgthread2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgtk3defs.h b/src/wrapped/generated/wrappedgtk3defs.h
index b2941ec8..59040885 100644
--- a/src/wrapped/generated/wrappedgtk3defs.h
+++ b/src/wrapped/generated/wrappedgtk3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtk3DEFS_H_
 #define __wrappedgtk3DEFS_H_
diff --git a/src/wrapped/generated/wrappedgtk3types.h b/src/wrapped/generated/wrappedgtk3types.h
index ac89b747..768c97f9 100644
--- a/src/wrapped/generated/wrappedgtk3types.h
+++ b/src/wrapped/generated/wrappedgtk3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtk3TYPES_H_
 #define __wrappedgtk3TYPES_H_
@@ -46,6 +46,7 @@ typedef void* (*pFpipppppppi_t)(void*, int32_t, void*, void*, void*, void*, void
 	GO(gtk_tree_store_new, pFuV_t) \
 	GO(gtk_style_context_get_valist, vFpiA_t) \
 	GO(gtk_builder_connect_signals_full, vFppp_t) \
+	GO(gtk_clipboard_request_text, vFppp_t) \
 	GO(gtk_container_forall, vFppp_t) \
 	GO(gtk_container_foreach, vFppp_t) \
 	GO(gtk_menu_attach_to_widget, vFppp_t) \
diff --git a/src/wrapped/generated/wrappedgtk3undefs.h b/src/wrapped/generated/wrappedgtk3undefs.h
index b8dac037..4c845a46 100644
--- a/src/wrapped/generated/wrappedgtk3undefs.h
+++ b/src/wrapped/generated/wrappedgtk3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtk3UNDEFS_H_
 #define __wrappedgtk3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedgtkx112defs.h b/src/wrapped/generated/wrappedgtkx112defs.h
index 9f1c5c35..b0d27df4 100644
--- a/src/wrapped/generated/wrappedgtkx112defs.h
+++ b/src/wrapped/generated/wrappedgtkx112defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtkx112DEFS_H_
 #define __wrappedgtkx112DEFS_H_
diff --git a/src/wrapped/generated/wrappedgtkx112types.h b/src/wrapped/generated/wrappedgtkx112types.h
index 8ef972d0..41e56622 100644
--- a/src/wrapped/generated/wrappedgtkx112types.h
+++ b/src/wrapped/generated/wrappedgtkx112types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtkx112TYPES_H_
 #define __wrappedgtkx112TYPES_H_
diff --git a/src/wrapped/generated/wrappedgtkx112undefs.h b/src/wrapped/generated/wrappedgtkx112undefs.h
index 339c4cb8..0754599c 100644
--- a/src/wrapped/generated/wrappedgtkx112undefs.h
+++ b/src/wrapped/generated/wrappedgtkx112undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedgtkx112UNDEFS_H_
 #define __wrappedgtkx112UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedicui18n67defs.h b/src/wrapped/generated/wrappedicui18n67defs.h
index d9948e3d..bd7ce595 100644
--- a/src/wrapped/generated/wrappedicui18n67defs.h
+++ b/src/wrapped/generated/wrappedicui18n67defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n67DEFS_H_
 #define __wrappedicui18n67DEFS_H_
diff --git a/src/wrapped/generated/wrappedicui18n67types.h b/src/wrapped/generated/wrappedicui18n67types.h
index c5177418..adac7a66 100644
--- a/src/wrapped/generated/wrappedicui18n67types.h
+++ b/src/wrapped/generated/wrappedicui18n67types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n67TYPES_H_
 #define __wrappedicui18n67TYPES_H_
diff --git a/src/wrapped/generated/wrappedicui18n67undefs.h b/src/wrapped/generated/wrappedicui18n67undefs.h
index e73490b8..5fc6ff47 100644
--- a/src/wrapped/generated/wrappedicui18n67undefs.h
+++ b/src/wrapped/generated/wrappedicui18n67undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n67UNDEFS_H_
 #define __wrappedicui18n67UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedicui18n72defs.h b/src/wrapped/generated/wrappedicui18n72defs.h
index 8d8b1700..5e0d2b77 100644
--- a/src/wrapped/generated/wrappedicui18n72defs.h
+++ b/src/wrapped/generated/wrappedicui18n72defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n72DEFS_H_
 #define __wrappedicui18n72DEFS_H_
diff --git a/src/wrapped/generated/wrappedicui18n72types.h b/src/wrapped/generated/wrappedicui18n72types.h
index 297fd4b3..5a561161 100644
--- a/src/wrapped/generated/wrappedicui18n72types.h
+++ b/src/wrapped/generated/wrappedicui18n72types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n72TYPES_H_
 #define __wrappedicui18n72TYPES_H_
diff --git a/src/wrapped/generated/wrappedicui18n72undefs.h b/src/wrapped/generated/wrappedicui18n72undefs.h
index 1e6d41aa..0e2bdb74 100644
--- a/src/wrapped/generated/wrappedicui18n72undefs.h
+++ b/src/wrapped/generated/wrappedicui18n72undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicui18n72UNDEFS_H_
 #define __wrappedicui18n72UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedicuuc67defs.h b/src/wrapped/generated/wrappedicuuc67defs.h
index 334b9f5f..617ec43c 100644
--- a/src/wrapped/generated/wrappedicuuc67defs.h
+++ b/src/wrapped/generated/wrappedicuuc67defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc67DEFS_H_
 #define __wrappedicuuc67DEFS_H_
diff --git a/src/wrapped/generated/wrappedicuuc67types.h b/src/wrapped/generated/wrappedicuuc67types.h
index cdb20aa9..6f79293b 100644
--- a/src/wrapped/generated/wrappedicuuc67types.h
+++ b/src/wrapped/generated/wrappedicuuc67types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc67TYPES_H_
 #define __wrappedicuuc67TYPES_H_
diff --git a/src/wrapped/generated/wrappedicuuc67undefs.h b/src/wrapped/generated/wrappedicuuc67undefs.h
index 353cce90..3fa39a14 100644
--- a/src/wrapped/generated/wrappedicuuc67undefs.h
+++ b/src/wrapped/generated/wrappedicuuc67undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc67UNDEFS_H_
 #define __wrappedicuuc67UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedicuuc72defs.h b/src/wrapped/generated/wrappedicuuc72defs.h
index 9d243720..9950b536 100644
--- a/src/wrapped/generated/wrappedicuuc72defs.h
+++ b/src/wrapped/generated/wrappedicuuc72defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc72DEFS_H_
 #define __wrappedicuuc72DEFS_H_
diff --git a/src/wrapped/generated/wrappedicuuc72types.h b/src/wrapped/generated/wrappedicuuc72types.h
index 698d8a6e..f228cd2b 100644
--- a/src/wrapped/generated/wrappedicuuc72types.h
+++ b/src/wrapped/generated/wrappedicuuc72types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc72TYPES_H_
 #define __wrappedicuuc72TYPES_H_
diff --git a/src/wrapped/generated/wrappedicuuc72undefs.h b/src/wrapped/generated/wrappedicuuc72undefs.h
index 1ae15471..95319b05 100644
--- a/src/wrapped/generated/wrappedicuuc72undefs.h
+++ b/src/wrapped/generated/wrappedicuuc72undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedicuuc72UNDEFS_H_
 #define __wrappedicuuc72UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedkrb5defs.h b/src/wrapped/generated/wrappedkrb5defs.h
index c23ad2ff..921df2b4 100644
--- a/src/wrapped/generated/wrappedkrb5defs.h
+++ b/src/wrapped/generated/wrappedkrb5defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedkrb5DEFS_H_
 #define __wrappedkrb5DEFS_H_
diff --git a/src/wrapped/generated/wrappedkrb5types.h b/src/wrapped/generated/wrappedkrb5types.h
index 95cee103..d6da63c1 100644
--- a/src/wrapped/generated/wrappedkrb5types.h
+++ b/src/wrapped/generated/wrappedkrb5types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedkrb5TYPES_H_
 #define __wrappedkrb5TYPES_H_
diff --git a/src/wrapped/generated/wrappedkrb5undefs.h b/src/wrapped/generated/wrappedkrb5undefs.h
index 64160246..c4e2f41e 100644
--- a/src/wrapped/generated/wrappedkrb5undefs.h
+++ b/src/wrapped/generated/wrappedkrb5undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedkrb5UNDEFS_H_
 #define __wrappedkrb5UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlberdefs.h b/src/wrapped/generated/wrappedlberdefs.h
index a3a11c08..8d1a21e3 100644
--- a/src/wrapped/generated/wrappedlberdefs.h
+++ b/src/wrapped/generated/wrappedlberdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlberDEFS_H_
 #define __wrappedlberDEFS_H_
diff --git a/src/wrapped/generated/wrappedlbertypes.h b/src/wrapped/generated/wrappedlbertypes.h
index 2f4a2d8e..20174f1b 100644
--- a/src/wrapped/generated/wrappedlbertypes.h
+++ b/src/wrapped/generated/wrappedlbertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlberTYPES_H_
 #define __wrappedlberTYPES_H_
diff --git a/src/wrapped/generated/wrappedlberundefs.h b/src/wrapped/generated/wrappedlberundefs.h
index a36f8f4b..3475bbb5 100644
--- a/src/wrapped/generated/wrappedlberundefs.h
+++ b/src/wrapped/generated/wrappedlberundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlberUNDEFS_H_
 #define __wrappedlberUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedldaprdefs.h b/src/wrapped/generated/wrappedldaprdefs.h
index e87e5333..62b34d38 100644
--- a/src/wrapped/generated/wrappedldaprdefs.h
+++ b/src/wrapped/generated/wrappedldaprdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldaprDEFS_H_
 #define __wrappedldaprDEFS_H_
diff --git a/src/wrapped/generated/wrappedldaprtypes.h b/src/wrapped/generated/wrappedldaprtypes.h
index 21c47103..1d2c0135 100644
--- a/src/wrapped/generated/wrappedldaprtypes.h
+++ b/src/wrapped/generated/wrappedldaprtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldaprTYPES_H_
 #define __wrappedldaprTYPES_H_
diff --git a/src/wrapped/generated/wrappedldaprundefs.h b/src/wrapped/generated/wrappedldaprundefs.h
index 01fca189..77f89b34 100644
--- a/src/wrapped/generated/wrappedldaprundefs.h
+++ b/src/wrapped/generated/wrappedldaprundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldaprUNDEFS_H_
 #define __wrappedldaprUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedldlinuxdefs.h b/src/wrapped/generated/wrappedldlinuxdefs.h
index 0bb7bcbe..ea985e01 100644
--- a/src/wrapped/generated/wrappedldlinuxdefs.h
+++ b/src/wrapped/generated/wrappedldlinuxdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldlinuxDEFS_H_
 #define __wrappedldlinuxDEFS_H_
diff --git a/src/wrapped/generated/wrappedldlinuxtypes.h b/src/wrapped/generated/wrappedldlinuxtypes.h
index 6f65291b..5d15a41c 100644
--- a/src/wrapped/generated/wrappedldlinuxtypes.h
+++ b/src/wrapped/generated/wrappedldlinuxtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldlinuxTYPES_H_
 #define __wrappedldlinuxTYPES_H_
diff --git a/src/wrapped/generated/wrappedldlinuxundefs.h b/src/wrapped/generated/wrappedldlinuxundefs.h
index fedacfb9..bdf66dd2 100644
--- a/src/wrapped/generated/wrappedldlinuxundefs.h
+++ b/src/wrapped/generated/wrappedldlinuxundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedldlinuxUNDEFS_H_
 #define __wrappedldlinuxUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibasounddefs.h b/src/wrapped/generated/wrappedlibasounddefs.h
index 291625d4..a9b58fa1 100644
--- a/src/wrapped/generated/wrappedlibasounddefs.h
+++ b/src/wrapped/generated/wrappedlibasounddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibasoundDEFS_H_
 #define __wrappedlibasoundDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibasoundtypes.h b/src/wrapped/generated/wrappedlibasoundtypes.h
index a505adb7..73aaecef 100644
--- a/src/wrapped/generated/wrappedlibasoundtypes.h
+++ b/src/wrapped/generated/wrappedlibasoundtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibasoundTYPES_H_
 #define __wrappedlibasoundTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibasoundundefs.h b/src/wrapped/generated/wrappedlibasoundundefs.h
index 5552ae71..cc9a70dd 100644
--- a/src/wrapped/generated/wrappedlibasoundundefs.h
+++ b/src/wrapped/generated/wrappedlibasoundundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibasoundUNDEFS_H_
 #define __wrappedlibasoundUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcdefs.h b/src/wrapped/generated/wrappedlibcdefs.h
index a26acf2c..3a702c86 100644
--- a/src/wrapped/generated/wrappedlibcdefs.h
+++ b/src/wrapped/generated/wrappedlibcdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcDEFS_H_
 #define __wrappedlibcDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcmusldefs.h b/src/wrapped/generated/wrappedlibcmusldefs.h
index 663f6679..f1ee865f 100644
--- a/src/wrapped/generated/wrappedlibcmusldefs.h
+++ b/src/wrapped/generated/wrappedlibcmusldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcmuslDEFS_H_
 #define __wrappedlibcmuslDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcmusltypes.h b/src/wrapped/generated/wrappedlibcmusltypes.h
index da781fc7..642af3cc 100644
--- a/src/wrapped/generated/wrappedlibcmusltypes.h
+++ b/src/wrapped/generated/wrappedlibcmusltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcmuslTYPES_H_
 #define __wrappedlibcmuslTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibcmuslundefs.h b/src/wrapped/generated/wrappedlibcmuslundefs.h
index d562391d..688a9683 100644
--- a/src/wrapped/generated/wrappedlibcmuslundefs.h
+++ b/src/wrapped/generated/wrappedlibcmuslundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcmuslUNDEFS_H_
 #define __wrappedlibcmuslUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcryptdefs.h b/src/wrapped/generated/wrappedlibcryptdefs.h
index 785a0335..7bf8ce68 100644
--- a/src/wrapped/generated/wrappedlibcryptdefs.h
+++ b/src/wrapped/generated/wrappedlibcryptdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcryptDEFS_H_
 #define __wrappedlibcryptDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcrypttypes.h b/src/wrapped/generated/wrappedlibcrypttypes.h
index 596d117e..96e14ec6 100644
--- a/src/wrapped/generated/wrappedlibcrypttypes.h
+++ b/src/wrapped/generated/wrappedlibcrypttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcryptTYPES_H_
 #define __wrappedlibcryptTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibcryptundefs.h b/src/wrapped/generated/wrappedlibcryptundefs.h
index 35c99f28..184c5129 100644
--- a/src/wrapped/generated/wrappedlibcryptundefs.h
+++ b/src/wrapped/generated/wrappedlibcryptundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcryptUNDEFS_H_
 #define __wrappedlibcryptUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h
index 8c4ab887..ec55e5bb 100644
--- a/src/wrapped/generated/wrappedlibctypes.h
+++ b/src/wrapped/generated/wrappedlibctypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcTYPES_H_
 #define __wrappedlibcTYPES_H_
@@ -42,6 +42,7 @@ typedef int32_t (*iFiip_t)(int32_t, int32_t, void*);
 typedef int32_t (*iFiiN_t)(int32_t, int32_t, ...);
 typedef int32_t (*iFipp_t)(int32_t, void*, void*);
 typedef int32_t (*iFipV_t)(int32_t, void*, ...);
+typedef int32_t (*iFipA_t)(int32_t, void*, va_list);
 typedef int32_t (*iFpLi_t)(void*, uintptr_t, int32_t);
 typedef int32_t (*iFppi_t)(void*, void*, int32_t);
 typedef int32_t (*iFppp_t)(void*, void*, void*);
@@ -53,11 +54,14 @@ typedef intptr_t (*lFppL_t)(void*, void*, uintptr_t);
 typedef uintptr_t (*LFppL_t)(void*, void*, uintptr_t);
 typedef void* (*pFpip_t)(void*, int32_t, void*);
 typedef void* (*pFppp_t)(void*, void*, void*);
+typedef void* (*pFppV_t)(void*, void*, ...);
 typedef void (*vFiipV_t)(int32_t, int32_t, void*, ...);
 typedef void (*vFiipA_t)(int32_t, int32_t, void*, va_list);
 typedef void (*vFpLLp_t)(void*, uintptr_t, uintptr_t, void*);
 typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFiiiN_t)(int32_t, int32_t, int32_t, ...);
+typedef int32_t (*iFiipV_t)(int32_t, int32_t, void*, ...);
+typedef int32_t (*iFiipA_t)(int32_t, int32_t, void*, va_list);
 typedef int32_t (*iFipii_t)(int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iFippi_t)(int32_t, void*, void*, int32_t);
 typedef int32_t (*iFippL_t)(int32_t, void*, void*, uintptr_t);
@@ -140,10 +144,12 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
 	GO(swapcontext, iFpp_t) \
 	GO(__isoc99_scanf, iFpV_t) \
 	GO(execl, iFpV_t) \
+	GO(execle, iFpV_t) \
 	GO(execlp, iFpV_t) \
 	GO(printf, iFpV_t) \
 	GO(wprintf, iFpV_t) \
 	GO(vprintf, iFpA_t) \
+	GO(vwprintf, iFpA_t) \
 	GO(_IO_file_stat, iFSp_t) \
 	GO(__sysv_signal, pFip_t) \
 	GO(signal, pFip_t) \
@@ -174,6 +180,8 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
 	GO(register_printf_specifier, iFipp_t) \
 	GO(sigaction, iFipp_t) \
 	GO(__printf_chk, iFipV_t) \
+	GO(dprintf, iFipV_t) \
+	GO(vdprintf, iFipA_t) \
 	GO(mprotect, iFpLi_t) \
 	GO(ftw, iFppi_t) \
 	GO(ftw64, iFppi_t) \
@@ -187,6 +195,7 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
 	GO(__asprintf, iFppV_t) \
 	GO(__isoc99_fscanf, iFppV_t) \
 	GO(__isoc99_sscanf, iFppV_t) \
+	GO(__isoc99_swscanf, iFppV_t) \
 	GO(asprintf, iFppV_t) \
 	GO(fprintf, iFppV_t) \
 	GO(fscanf, iFppV_t) \
@@ -214,11 +223,14 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void*
 	GO(tdelete, pFppp_t) \
 	GO(tfind, pFppp_t) \
 	GO(tsearch, pFppp_t) \
+	GO(fopencookie, pFppV_t) \
 	GO(__syslog_chk, vFiipV_t) \
 	GO(__vsyslog_chk, vFiipA_t) \
 	GO(qsort, vFpLLp_t) \
 	GO(epoll_ctl, iFiiip_t) \
 	GO(semctl, iFiiiN_t) \
+	GO(__dprintf_chk, iFiipV_t) \
+	GO(__vdprintf_chk, iFiipA_t) \
 	GO(epoll_wait, iFipii_t) \
 	GO(fstatat, iFippi_t) \
 	GO(fstatat64, iFippi_t) \
diff --git a/src/wrapped/generated/wrappedlibcundefs.h b/src/wrapped/generated/wrappedlibcundefs.h
index 67fb46c3..b3b90e94 100644
--- a/src/wrapped/generated/wrappedlibcundefs.h
+++ b/src/wrapped/generated/wrappedlibcundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcUNDEFS_H_
 #define __wrappedlibcUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcupsdefs.h b/src/wrapped/generated/wrappedlibcupsdefs.h
index e34a7729..6903082a 100644
--- a/src/wrapped/generated/wrappedlibcupsdefs.h
+++ b/src/wrapped/generated/wrappedlibcupsdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcupsDEFS_H_
 #define __wrappedlibcupsDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibcupstypes.h b/src/wrapped/generated/wrappedlibcupstypes.h
index c03829df..5fb8ca9e 100644
--- a/src/wrapped/generated/wrappedlibcupstypes.h
+++ b/src/wrapped/generated/wrappedlibcupstypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcupsTYPES_H_
 #define __wrappedlibcupsTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibcupsundefs.h b/src/wrapped/generated/wrappedlibcupsundefs.h
index 8d13a03c..0b07f3fb 100644
--- a/src/wrapped/generated/wrappedlibcupsundefs.h
+++ b/src/wrapped/generated/wrappedlibcupsundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibcupsUNDEFS_H_
 #define __wrappedlibcupsUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibdldefs.h b/src/wrapped/generated/wrappedlibdldefs.h
index 2c0d7346..03dde183 100644
--- a/src/wrapped/generated/wrappedlibdldefs.h
+++ b/src/wrapped/generated/wrappedlibdldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdlDEFS_H_
 #define __wrappedlibdlDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibdltypes.h b/src/wrapped/generated/wrappedlibdltypes.h
index e47020f1..b9008317 100644
--- a/src/wrapped/generated/wrappedlibdltypes.h
+++ b/src/wrapped/generated/wrappedlibdltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdlTYPES_H_
 #define __wrappedlibdlTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibdlundefs.h b/src/wrapped/generated/wrappedlibdlundefs.h
index 1e3d44e8..0cf151bd 100644
--- a/src/wrapped/generated/wrappedlibdlundefs.h
+++ b/src/wrapped/generated/wrappedlibdlundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdlUNDEFS_H_
 #define __wrappedlibdlUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibdrmdefs.h b/src/wrapped/generated/wrappedlibdrmdefs.h
index 1d8c1e8d..d1cf6177 100644
--- a/src/wrapped/generated/wrappedlibdrmdefs.h
+++ b/src/wrapped/generated/wrappedlibdrmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdrmDEFS_H_
 #define __wrappedlibdrmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibdrmtypes.h b/src/wrapped/generated/wrappedlibdrmtypes.h
index 61bd907d..16b63312 100644
--- a/src/wrapped/generated/wrappedlibdrmtypes.h
+++ b/src/wrapped/generated/wrappedlibdrmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdrmTYPES_H_
 #define __wrappedlibdrmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibdrmundefs.h b/src/wrapped/generated/wrappedlibdrmundefs.h
index 6d39eb31..32a3b41a 100644
--- a/src/wrapped/generated/wrappedlibdrmundefs.h
+++ b/src/wrapped/generated/wrappedlibdrmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibdrmUNDEFS_H_
 #define __wrappedlibdrmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibegldefs.h b/src/wrapped/generated/wrappedlibegldefs.h
index 4cafbbf8..a756c752 100644
--- a/src/wrapped/generated/wrappedlibegldefs.h
+++ b/src/wrapped/generated/wrappedlibegldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibeglDEFS_H_
 #define __wrappedlibeglDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibegltypes.h b/src/wrapped/generated/wrappedlibegltypes.h
index 6a8b66a5..1671ce7e 100644
--- a/src/wrapped/generated/wrappedlibegltypes.h
+++ b/src/wrapped/generated/wrappedlibegltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibeglTYPES_H_
 #define __wrappedlibeglTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibeglundefs.h b/src/wrapped/generated/wrappedlibeglundefs.h
index 5957bbd8..b7abcadd 100644
--- a/src/wrapped/generated/wrappedlibeglundefs.h
+++ b/src/wrapped/generated/wrappedlibeglundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibeglUNDEFS_H_
 #define __wrappedlibeglUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibformdefs.h b/src/wrapped/generated/wrappedlibformdefs.h
index 3cb73ea6..75153628 100644
--- a/src/wrapped/generated/wrappedlibformdefs.h
+++ b/src/wrapped/generated/wrappedlibformdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformDEFS_H_
 #define __wrappedlibformDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibformtypes.h b/src/wrapped/generated/wrappedlibformtypes.h
index 2c5a17bf..db9df205 100644
--- a/src/wrapped/generated/wrappedlibformtypes.h
+++ b/src/wrapped/generated/wrappedlibformtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformTYPES_H_
 #define __wrappedlibformTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibformundefs.h b/src/wrapped/generated/wrappedlibformundefs.h
index dec3dc44..0243b937 100644
--- a/src/wrapped/generated/wrappedlibformundefs.h
+++ b/src/wrapped/generated/wrappedlibformundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformUNDEFS_H_
 #define __wrappedlibformUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibformwdefs.h b/src/wrapped/generated/wrappedlibformwdefs.h
index 73039bb5..6d524690 100644
--- a/src/wrapped/generated/wrappedlibformwdefs.h
+++ b/src/wrapped/generated/wrappedlibformwdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformwDEFS_H_
 #define __wrappedlibformwDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibformwtypes.h b/src/wrapped/generated/wrappedlibformwtypes.h
index ebbcd1f7..1910d8a7 100644
--- a/src/wrapped/generated/wrappedlibformwtypes.h
+++ b/src/wrapped/generated/wrappedlibformwtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformwTYPES_H_
 #define __wrappedlibformwTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibformwundefs.h b/src/wrapped/generated/wrappedlibformwundefs.h
index 879f8c14..38b8db09 100644
--- a/src/wrapped/generated/wrappedlibformwundefs.h
+++ b/src/wrapped/generated/wrappedlibformwundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibformwUNDEFS_H_
 #define __wrappedlibformwUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibfusedefs.h b/src/wrapped/generated/wrappedlibfusedefs.h
index 007d13f1..5e5b2200 100644
--- a/src/wrapped/generated/wrappedlibfusedefs.h
+++ b/src/wrapped/generated/wrappedlibfusedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibfuseDEFS_H_
 #define __wrappedlibfuseDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibfusetypes.h b/src/wrapped/generated/wrappedlibfusetypes.h
index 1966993d..b06673f6 100644
--- a/src/wrapped/generated/wrappedlibfusetypes.h
+++ b/src/wrapped/generated/wrappedlibfusetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibfuseTYPES_H_
 #define __wrappedlibfuseTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibfuseundefs.h b/src/wrapped/generated/wrappedlibfuseundefs.h
index bc2a569f..42445e32 100644
--- a/src/wrapped/generated/wrappedlibfuseundefs.h
+++ b/src/wrapped/generated/wrappedlibfuseundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibfuseUNDEFS_H_
 #define __wrappedlibfuseUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibgldefs.h b/src/wrapped/generated/wrappedlibgldefs.h
index b718c76f..ee88a40d 100644
--- a/src/wrapped/generated/wrappedlibgldefs.h
+++ b/src/wrapped/generated/wrappedlibgldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglDEFS_H_
 #define __wrappedlibglDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibgltypes.h b/src/wrapped/generated/wrappedlibgltypes.h
index bfb3f0d1..1d6863cb 100644
--- a/src/wrapped/generated/wrappedlibgltypes.h
+++ b/src/wrapped/generated/wrappedlibgltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglTYPES_H_
 #define __wrappedlibglTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibgludefs.h b/src/wrapped/generated/wrappedlibgludefs.h
index ad4b9bf0..5de3f3f4 100644
--- a/src/wrapped/generated/wrappedlibgludefs.h
+++ b/src/wrapped/generated/wrappedlibgludefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibgluDEFS_H_
 #define __wrappedlibgluDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibglundefs.h b/src/wrapped/generated/wrappedlibglundefs.h
index b129d86c..48f2034d 100644
--- a/src/wrapped/generated/wrappedlibglundefs.h
+++ b/src/wrapped/generated/wrappedlibglundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglUNDEFS_H_
 #define __wrappedlibglUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibglutypes.h b/src/wrapped/generated/wrappedlibglutypes.h
index 64e42a40..7b4c6869 100644
--- a/src/wrapped/generated/wrappedlibglutypes.h
+++ b/src/wrapped/generated/wrappedlibglutypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibgluTYPES_H_
 #define __wrappedlibgluTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibgluundefs.h b/src/wrapped/generated/wrappedlibgluundefs.h
index 690a8c6e..60041a24 100644
--- a/src/wrapped/generated/wrappedlibgluundefs.h
+++ b/src/wrapped/generated/wrappedlibgluundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibgluUNDEFS_H_
 #define __wrappedlibgluUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibglxdefs.h b/src/wrapped/generated/wrappedlibglxdefs.h
index bae8f4f8..a6a63efe 100644
--- a/src/wrapped/generated/wrappedlibglxdefs.h
+++ b/src/wrapped/generated/wrappedlibglxdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglxDEFS_H_
 #define __wrappedlibglxDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibglxtypes.h b/src/wrapped/generated/wrappedlibglxtypes.h
index 08219f2b..c5a0fce7 100644
--- a/src/wrapped/generated/wrappedlibglxtypes.h
+++ b/src/wrapped/generated/wrappedlibglxtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglxTYPES_H_
 #define __wrappedlibglxTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibglxundefs.h b/src/wrapped/generated/wrappedlibglxundefs.h
index d19111c6..ba1dfddb 100644
--- a/src/wrapped/generated/wrappedlibglxundefs.h
+++ b/src/wrapped/generated/wrappedlibglxundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibglxUNDEFS_H_
 #define __wrappedlibglxUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibharfbuzzdefs.h b/src/wrapped/generated/wrappedlibharfbuzzdefs.h
new file mode 100644
index 00000000..a66d790b
--- /dev/null
+++ b/src/wrapped/generated/wrappedlibharfbuzzdefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedlibharfbuzzDEFS_H_
+#define __wrappedlibharfbuzzDEFS_H_
+
+
+#endif // __wrappedlibharfbuzzDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibharfbuzztypes.h b/src/wrapped/generated/wrappedlibharfbuzztypes.h
new file mode 100644
index 00000000..4510551c
--- /dev/null
+++ b/src/wrapped/generated/wrappedlibharfbuzztypes.h
@@ -0,0 +1,71 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedlibharfbuzzTYPES_H_
+#define __wrappedlibharfbuzzTYPES_H_
+
+#ifndef LIBNAME
+#error You should only #include this file inside a wrapped*.c file
+#endif
+#ifndef ADDED_FUNCTIONS
+#define ADDED_FUNCTIONS() 
+#endif
+
+typedef void (*vFp_t)(void*);
+typedef void* (*pFp_t)(void*);
+typedef void (*vFppp_t)(void*, void*, void*);
+typedef void* (*pFppp_t)(void*, void*, void*);
+typedef void (*vFpppp_t)(void*, void*, void*, void*);
+typedef int32_t (*iFppppi_t)(void*, void*, void*, void*, int32_t);
+typedef void* (*pFpuupp_t)(void*, uint32_t, uint32_t, void*, void*);
+
+#define SUPER() ADDED_FUNCTIONS() \
+	GO(hb_draw_funcs_destroy, vFp_t) \
+	GO(hb_font_funcs_destroy, vFp_t) \
+	GO(hb_unicode_funcs_reference, pFp_t) \
+	GO(hb_font_set_funcs_data, vFppp_t) \
+	GO(hb_face_create_for_tables, pFppp_t) \
+	GO(hb_buffer_set_message_func, vFpppp_t) \
+	GO(hb_draw_funcs_set_close_path_func, vFpppp_t) \
+	GO(hb_draw_funcs_set_cubic_to_func, vFpppp_t) \
+	GO(hb_draw_funcs_set_line_to_func, vFpppp_t) \
+	GO(hb_draw_funcs_set_move_to_func, vFpppp_t) \
+	GO(hb_draw_funcs_set_quadratic_to_func, vFpppp_t) \
+	GO(hb_font_funcs_set_font_h_extents_func, vFpppp_t) \
+	GO(hb_font_funcs_set_font_v_extents_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_contour_point_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_extents_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_from_name_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_h_advance_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_h_advances_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_h_kerning_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_h_origin_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_name_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_shape_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_v_advance_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_v_advances_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_v_kerning_func, vFpppp_t) \
+	GO(hb_font_funcs_set_glyph_v_origin_func, vFpppp_t) \
+	GO(hb_font_funcs_set_nominal_glyph_func, vFpppp_t) \
+	GO(hb_font_funcs_set_nominal_glyphs_func, vFpppp_t) \
+	GO(hb_font_funcs_set_variation_glyph_func, vFpppp_t) \
+	GO(hb_font_set_funcs, vFpppp_t) \
+	GO(hb_unicode_funcs_set_combining_class_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_compose_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_decompose_compatibility_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_decompose_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_eastasian_width_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_general_category_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_mirroring_func, vFpppp_t) \
+	GO(hb_unicode_funcs_set_script_func, vFpppp_t) \
+	GO(hb_blob_set_user_data, iFppppi_t) \
+	GO(hb_buffer_set_user_data, iFppppi_t) \
+	GO(hb_face_set_user_data, iFppppi_t) \
+	GO(hb_font_funcs_set_user_data, iFppppi_t) \
+	GO(hb_font_set_user_data, iFppppi_t) \
+	GO(hb_unicode_funcs_set_user_data, iFppppi_t) \
+	GO(hb_blob_create, pFpuupp_t) \
+	GO(hb_blob_create_or_fail, pFpuupp_t)
+
+#endif // __wrappedlibharfbuzzTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibharfbuzzundefs.h b/src/wrapped/generated/wrappedlibharfbuzzundefs.h
new file mode 100644
index 00000000..5564b20c
--- /dev/null
+++ b/src/wrapped/generated/wrappedlibharfbuzzundefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
+ *******************************************************************/
+#ifndef __wrappedlibharfbuzzUNDEFS_H_
+#define __wrappedlibharfbuzzUNDEFS_H_
+
+
+#endif // __wrappedlibharfbuzzUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibibusdefs.h b/src/wrapped/generated/wrappedlibibusdefs.h
index 9c2e9c43..497ed09d 100644
--- a/src/wrapped/generated/wrappedlibibusdefs.h
+++ b/src/wrapped/generated/wrappedlibibusdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibibusDEFS_H_
 #define __wrappedlibibusDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibibustypes.h b/src/wrapped/generated/wrappedlibibustypes.h
index 305a205d..2685040d 100644
--- a/src/wrapped/generated/wrappedlibibustypes.h
+++ b/src/wrapped/generated/wrappedlibibustypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibibusTYPES_H_
 #define __wrappedlibibusTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibibusundefs.h b/src/wrapped/generated/wrappedlibibusundefs.h
index 023935cd..b5a6be08 100644
--- a/src/wrapped/generated/wrappedlibibusundefs.h
+++ b/src/wrapped/generated/wrappedlibibusundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibibusUNDEFS_H_
 #define __wrappedlibibusUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibicedefs.h b/src/wrapped/generated/wrappedlibicedefs.h
index 4d14f98c..064249ab 100644
--- a/src/wrapped/generated/wrappedlibicedefs.h
+++ b/src/wrapped/generated/wrappedlibicedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibiceDEFS_H_
 #define __wrappedlibiceDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibicetypes.h b/src/wrapped/generated/wrappedlibicetypes.h
index 03cc8bf9..e1cd9bdb 100644
--- a/src/wrapped/generated/wrappedlibicetypes.h
+++ b/src/wrapped/generated/wrappedlibicetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibiceTYPES_H_
 #define __wrappedlibiceTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibiceundefs.h b/src/wrapped/generated/wrappedlibiceundefs.h
index aa4fd2cd..7f302703 100644
--- a/src/wrapped/generated/wrappedlibiceundefs.h
+++ b/src/wrapped/generated/wrappedlibiceundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibiceUNDEFS_H_
 #define __wrappedlibiceUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibmdefs.h b/src/wrapped/generated/wrappedlibmdefs.h
index 11c42c39..31c10d15 100644
--- a/src/wrapped/generated/wrappedlibmdefs.h
+++ b/src/wrapped/generated/wrappedlibmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibmDEFS_H_
 #define __wrappedlibmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibmtypes.h b/src/wrapped/generated/wrappedlibmtypes.h
index 076e6945..001794ba 100644
--- a/src/wrapped/generated/wrappedlibmtypes.h
+++ b/src/wrapped/generated/wrappedlibmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibmTYPES_H_
 #define __wrappedlibmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibmundefs.h b/src/wrapped/generated/wrappedlibmundefs.h
index 7c323616..90bee0c8 100644
--- a/src/wrapped/generated/wrappedlibmundefs.h
+++ b/src/wrapped/generated/wrappedlibmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibmUNDEFS_H_
 #define __wrappedlibmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncurses6defs.h b/src/wrapped/generated/wrappedlibncurses6defs.h
index 66d02ce0..4bc7b05e 100644
--- a/src/wrapped/generated/wrappedlibncurses6defs.h
+++ b/src/wrapped/generated/wrappedlibncurses6defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurses6DEFS_H_
 #define __wrappedlibncurses6DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncurses6types.h b/src/wrapped/generated/wrappedlibncurses6types.h
index d9f6c028..f04e04fd 100644
--- a/src/wrapped/generated/wrappedlibncurses6types.h
+++ b/src/wrapped/generated/wrappedlibncurses6types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurses6TYPES_H_
 #define __wrappedlibncurses6TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibncurses6undefs.h b/src/wrapped/generated/wrappedlibncurses6undefs.h
index 93b34f45..a6e20720 100644
--- a/src/wrapped/generated/wrappedlibncurses6undefs.h
+++ b/src/wrapped/generated/wrappedlibncurses6undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurses6UNDEFS_H_
 #define __wrappedlibncurses6UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncursesdefs.h b/src/wrapped/generated/wrappedlibncursesdefs.h
index aedfc357..41836b88 100644
--- a/src/wrapped/generated/wrappedlibncursesdefs.h
+++ b/src/wrapped/generated/wrappedlibncursesdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesDEFS_H_
 #define __wrappedlibncursesDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncursestypes.h b/src/wrapped/generated/wrappedlibncursestypes.h
index b909e016..abb99f96 100644
--- a/src/wrapped/generated/wrappedlibncursestypes.h
+++ b/src/wrapped/generated/wrappedlibncursestypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesTYPES_H_
 #define __wrappedlibncursesTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibncursesundefs.h b/src/wrapped/generated/wrappedlibncursesundefs.h
index c8728a68..0ac19c40 100644
--- a/src/wrapped/generated/wrappedlibncursesundefs.h
+++ b/src/wrapped/generated/wrappedlibncursesundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesUNDEFS_H_
 #define __wrappedlibncursesUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncursesw6defs.h b/src/wrapped/generated/wrappedlibncursesw6defs.h
index 474c4332..36184fbc 100644
--- a/src/wrapped/generated/wrappedlibncursesw6defs.h
+++ b/src/wrapped/generated/wrappedlibncursesw6defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesw6DEFS_H_
 #define __wrappedlibncursesw6DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncursesw6types.h b/src/wrapped/generated/wrappedlibncursesw6types.h
index 317a31b7..1dbb1fd0 100644
--- a/src/wrapped/generated/wrappedlibncursesw6types.h
+++ b/src/wrapped/generated/wrappedlibncursesw6types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesw6TYPES_H_
 #define __wrappedlibncursesw6TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibncursesw6undefs.h b/src/wrapped/generated/wrappedlibncursesw6undefs.h
index 1844e361..c60f4cee 100644
--- a/src/wrapped/generated/wrappedlibncursesw6undefs.h
+++ b/src/wrapped/generated/wrappedlibncursesw6undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncursesw6UNDEFS_H_
 #define __wrappedlibncursesw6UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncurseswdefs.h b/src/wrapped/generated/wrappedlibncurseswdefs.h
index 80c42570..5d6556df 100644
--- a/src/wrapped/generated/wrappedlibncurseswdefs.h
+++ b/src/wrapped/generated/wrappedlibncurseswdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurseswDEFS_H_
 #define __wrappedlibncurseswDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibncurseswtypes.h b/src/wrapped/generated/wrappedlibncurseswtypes.h
index bd9677e1..15f15054 100644
--- a/src/wrapped/generated/wrappedlibncurseswtypes.h
+++ b/src/wrapped/generated/wrappedlibncurseswtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurseswTYPES_H_
 #define __wrappedlibncurseswTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibncurseswundefs.h b/src/wrapped/generated/wrappedlibncurseswundefs.h
index 5c6aa313..4f1b1b2a 100644
--- a/src/wrapped/generated/wrappedlibncurseswundefs.h
+++ b/src/wrapped/generated/wrappedlibncurseswundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibncurseswUNDEFS_H_
 #define __wrappedlibncurseswUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibnumadefs.h b/src/wrapped/generated/wrappedlibnumadefs.h
index 081cdda0..99b1c2ec 100644
--- a/src/wrapped/generated/wrappedlibnumadefs.h
+++ b/src/wrapped/generated/wrappedlibnumadefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibnumaDEFS_H_
 #define __wrappedlibnumaDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibnumatypes.h b/src/wrapped/generated/wrappedlibnumatypes.h
index 9da80717..b47e501f 100644
--- a/src/wrapped/generated/wrappedlibnumatypes.h
+++ b/src/wrapped/generated/wrappedlibnumatypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibnumaTYPES_H_
 #define __wrappedlibnumaTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibnumaundefs.h b/src/wrapped/generated/wrappedlibnumaundefs.h
index 97bc3625..12ac76dc 100644
--- a/src/wrapped/generated/wrappedlibnumaundefs.h
+++ b/src/wrapped/generated/wrappedlibnumaundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibnumaUNDEFS_H_
 #define __wrappedlibnumaUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedliboggdefs.h b/src/wrapped/generated/wrappedliboggdefs.h
index bd7fdec5..4ea83bb1 100644
--- a/src/wrapped/generated/wrappedliboggdefs.h
+++ b/src/wrapped/generated/wrappedliboggdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedliboggDEFS_H_
 #define __wrappedliboggDEFS_H_
diff --git a/src/wrapped/generated/wrappedliboggtypes.h b/src/wrapped/generated/wrappedliboggtypes.h
index d40bbf07..f29d58b2 100644
--- a/src/wrapped/generated/wrappedliboggtypes.h
+++ b/src/wrapped/generated/wrappedliboggtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedliboggTYPES_H_
 #define __wrappedliboggTYPES_H_
diff --git a/src/wrapped/generated/wrappedliboggundefs.h b/src/wrapped/generated/wrappedliboggundefs.h
index f8ee011d..77647730 100644
--- a/src/wrapped/generated/wrappedliboggundefs.h
+++ b/src/wrapped/generated/wrappedliboggundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedliboggUNDEFS_H_
 #define __wrappedliboggUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpaneldefs.h b/src/wrapped/generated/wrappedlibpaneldefs.h
index 74a5481c..3f55bb0f 100644
--- a/src/wrapped/generated/wrappedlibpaneldefs.h
+++ b/src/wrapped/generated/wrappedlibpaneldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpanelDEFS_H_
 #define __wrappedlibpanelDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpaneltypes.h b/src/wrapped/generated/wrappedlibpaneltypes.h
index 1eb40dba..1ac90302 100644
--- a/src/wrapped/generated/wrappedlibpaneltypes.h
+++ b/src/wrapped/generated/wrappedlibpaneltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpanelTYPES_H_
 #define __wrappedlibpanelTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibpanelundefs.h b/src/wrapped/generated/wrappedlibpanelundefs.h
index 907c8a04..a24d9eae 100644
--- a/src/wrapped/generated/wrappedlibpanelundefs.h
+++ b/src/wrapped/generated/wrappedlibpanelundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpanelUNDEFS_H_
 #define __wrappedlibpanelUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpcidefs.h b/src/wrapped/generated/wrappedlibpcidefs.h
index 7f13b152..dc587729 100644
--- a/src/wrapped/generated/wrappedlibpcidefs.h
+++ b/src/wrapped/generated/wrappedlibpcidefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpciDEFS_H_
 #define __wrappedlibpciDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpcitypes.h b/src/wrapped/generated/wrappedlibpcitypes.h
index c31b6419..ffda5c66 100644
--- a/src/wrapped/generated/wrappedlibpcitypes.h
+++ b/src/wrapped/generated/wrappedlibpcitypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpciTYPES_H_
 #define __wrappedlibpciTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibpciundefs.h b/src/wrapped/generated/wrappedlibpciundefs.h
index 91701067..345176dd 100644
--- a/src/wrapped/generated/wrappedlibpciundefs.h
+++ b/src/wrapped/generated/wrappedlibpciundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpciUNDEFS_H_
 #define __wrappedlibpciUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpcredefs.h b/src/wrapped/generated/wrappedlibpcredefs.h
index f8918a8f..17e3881e 100644
--- a/src/wrapped/generated/wrappedlibpcredefs.h
+++ b/src/wrapped/generated/wrappedlibpcredefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpcreDEFS_H_
 #define __wrappedlibpcreDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpcretypes.h b/src/wrapped/generated/wrappedlibpcretypes.h
index 3d50ccee..fb1e7e8b 100644
--- a/src/wrapped/generated/wrappedlibpcretypes.h
+++ b/src/wrapped/generated/wrappedlibpcretypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpcreTYPES_H_
 #define __wrappedlibpcreTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibpcreundefs.h b/src/wrapped/generated/wrappedlibpcreundefs.h
index 09b121b1..36feb597 100644
--- a/src/wrapped/generated/wrappedlibpcreundefs.h
+++ b/src/wrapped/generated/wrappedlibpcreundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpcreUNDEFS_H_
 #define __wrappedlibpcreUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpthreaddefs.h b/src/wrapped/generated/wrappedlibpthreaddefs.h
index 452735ee..f57a6d26 100644
--- a/src/wrapped/generated/wrappedlibpthreaddefs.h
+++ b/src/wrapped/generated/wrappedlibpthreaddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpthreadDEFS_H_
 #define __wrappedlibpthreadDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h
index e28603b6..95c1c73e 100644
--- a/src/wrapped/generated/wrappedlibpthreadtypes.h
+++ b/src/wrapped/generated/wrappedlibpthreadtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpthreadTYPES_H_
 #define __wrappedlibpthreadTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibpthreadundefs.h b/src/wrapped/generated/wrappedlibpthreadundefs.h
index f88eae66..90070946 100644
--- a/src/wrapped/generated/wrappedlibpthreadundefs.h
+++ b/src/wrapped/generated/wrappedlibpthreadundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibpthreadUNDEFS_H_
 #define __wrappedlibpthreadUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibresolvdefs.h b/src/wrapped/generated/wrappedlibresolvdefs.h
index a6d3bcbe..1046920e 100644
--- a/src/wrapped/generated/wrappedlibresolvdefs.h
+++ b/src/wrapped/generated/wrappedlibresolvdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibresolvDEFS_H_
 #define __wrappedlibresolvDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibresolvtypes.h b/src/wrapped/generated/wrappedlibresolvtypes.h
index 2c815ad7..520b0241 100644
--- a/src/wrapped/generated/wrappedlibresolvtypes.h
+++ b/src/wrapped/generated/wrappedlibresolvtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibresolvTYPES_H_
 #define __wrappedlibresolvTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibresolvundefs.h b/src/wrapped/generated/wrappedlibresolvundefs.h
index 5095a6f4..687e19a2 100644
--- a/src/wrapped/generated/wrappedlibresolvundefs.h
+++ b/src/wrapped/generated/wrappedlibresolvundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibresolvUNDEFS_H_
 #define __wrappedlibresolvUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibrtdefs.h b/src/wrapped/generated/wrappedlibrtdefs.h
index cea2bfe7..c25c773f 100644
--- a/src/wrapped/generated/wrappedlibrtdefs.h
+++ b/src/wrapped/generated/wrappedlibrtdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibrtDEFS_H_
 #define __wrappedlibrtDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibrttypes.h b/src/wrapped/generated/wrappedlibrttypes.h
index 70e85f3f..83b18783 100644
--- a/src/wrapped/generated/wrappedlibrttypes.h
+++ b/src/wrapped/generated/wrappedlibrttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibrtTYPES_H_
 #define __wrappedlibrtTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibrtundefs.h b/src/wrapped/generated/wrappedlibrtundefs.h
index e46e8d03..f94f05b4 100644
--- a/src/wrapped/generated/wrappedlibrtundefs.h
+++ b/src/wrapped/generated/wrappedlibrtundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibrtUNDEFS_H_
 #define __wrappedlibrtUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibsmdefs.h b/src/wrapped/generated/wrappedlibsmdefs.h
index 81e62442..322be8ec 100644
--- a/src/wrapped/generated/wrappedlibsmdefs.h
+++ b/src/wrapped/generated/wrappedlibsmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsmDEFS_H_
 #define __wrappedlibsmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibsmtypes.h b/src/wrapped/generated/wrappedlibsmtypes.h
index ce1ee208..ee4a9bc8 100644
--- a/src/wrapped/generated/wrappedlibsmtypes.h
+++ b/src/wrapped/generated/wrappedlibsmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsmTYPES_H_
 #define __wrappedlibsmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibsmundefs.h b/src/wrapped/generated/wrappedlibsmundefs.h
index 9cb2ee2d..025aca8a 100644
--- a/src/wrapped/generated/wrappedlibsmundefs.h
+++ b/src/wrapped/generated/wrappedlibsmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsmUNDEFS_H_
 #define __wrappedlibsmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibsndfiledefs.h b/src/wrapped/generated/wrappedlibsndfiledefs.h
index f2db08e0..c8422534 100644
--- a/src/wrapped/generated/wrappedlibsndfiledefs.h
+++ b/src/wrapped/generated/wrappedlibsndfiledefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsndfileDEFS_H_
 #define __wrappedlibsndfileDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibsndfiletypes.h b/src/wrapped/generated/wrappedlibsndfiletypes.h
index bc64940f..5852d045 100644
--- a/src/wrapped/generated/wrappedlibsndfiletypes.h
+++ b/src/wrapped/generated/wrappedlibsndfiletypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsndfileTYPES_H_
 #define __wrappedlibsndfileTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibsndfileundefs.h b/src/wrapped/generated/wrappedlibsndfileundefs.h
index 928d0b79..c2a0137c 100644
--- a/src/wrapped/generated/wrappedlibsndfileundefs.h
+++ b/src/wrapped/generated/wrappedlibsndfileundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsndfileUNDEFS_H_
 #define __wrappedlibsndfileUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibssl3defs.h b/src/wrapped/generated/wrappedlibssl3defs.h
index 72d427bd..3b3988d5 100644
--- a/src/wrapped/generated/wrappedlibssl3defs.h
+++ b/src/wrapped/generated/wrappedlibssl3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibssl3DEFS_H_
 #define __wrappedlibssl3DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibssl3types.h b/src/wrapped/generated/wrappedlibssl3types.h
index 531c8e66..217989d7 100644
--- a/src/wrapped/generated/wrappedlibssl3types.h
+++ b/src/wrapped/generated/wrappedlibssl3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibssl3TYPES_H_
 #define __wrappedlibssl3TYPES_H_
@@ -25,6 +25,7 @@ typedef int32_t (*iFlpppp_t)(intptr_t, void*, void*, void*, void*);
 	GO(SSL_set_psk_client_callback, vFpp_t) \
 	GO(SSL_CTX_set_verify, vFpip_t) \
 	GO(SSL_set_verify, vFpip_t) \
+	GO(SSL_CTX_set_alpn_select_cb, vFppp_t) \
 	GO(SSL_CTX_set_cert_verify_callback, vFppp_t) \
 	GO(SSL_CTX_set_next_proto_select_cb, vFppp_t) \
 	GO(SSL_CTX_callback_ctrl, lFpip_t) \
diff --git a/src/wrapped/generated/wrappedlibssl3undefs.h b/src/wrapped/generated/wrappedlibssl3undefs.h
index e88be970..adc44bb4 100644
--- a/src/wrapped/generated/wrappedlibssl3undefs.h
+++ b/src/wrapped/generated/wrappedlibssl3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibssl3UNDEFS_H_
 #define __wrappedlibssl3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibssldefs.h b/src/wrapped/generated/wrappedlibssldefs.h
index f9d00405..2f9824a2 100644
--- a/src/wrapped/generated/wrappedlibssldefs.h
+++ b/src/wrapped/generated/wrappedlibssldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsslDEFS_H_
 #define __wrappedlibsslDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibssltypes.h b/src/wrapped/generated/wrappedlibssltypes.h
index 1d00a486..a2156a45 100644
--- a/src/wrapped/generated/wrappedlibssltypes.h
+++ b/src/wrapped/generated/wrappedlibssltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsslTYPES_H_
 #define __wrappedlibsslTYPES_H_
@@ -20,9 +20,14 @@ typedef int32_t (*iFlpppp_t)(intptr_t, void*, void*, void*, void*);
 
 #define SUPER() ADDED_FUNCTIONS() \
 	GO(SSL_get_verify_callback, pFp_t) \
+	GO(SSL_CTX_sess_set_new_cb, vFpp_t) \
 	GO(SSL_CTX_set_client_cert_cb, vFpp_t) \
+	GO(SSL_CTX_set_cookie_generate_cb, vFpp_t) \
+	GO(SSL_CTX_set_cookie_verify_cb, vFpp_t) \
 	GO(SSL_CTX_set_default_passwd_cb, vFpp_t) \
 	GO(SSL_set_psk_client_callback, vFpp_t) \
+	GO(SSL_set_psk_server_callback, vFpp_t) \
+	GO(SSL_set_psk_use_session_callback, vFpp_t) \
 	GO(SSL_CTX_set_verify, vFpip_t) \
 	GO(SSL_set_verify, vFpip_t) \
 	GO(SSL_CTX_set_alpn_select_cb, vFppp_t) \
diff --git a/src/wrapped/generated/wrappedlibsslundefs.h b/src/wrapped/generated/wrappedlibsslundefs.h
index ad4376dc..d6347e09 100644
--- a/src/wrapped/generated/wrappedlibsslundefs.h
+++ b/src/wrapped/generated/wrappedlibsslundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibsslUNDEFS_H_
 #define __wrappedlibsslUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibtinfo6defs.h b/src/wrapped/generated/wrappedlibtinfo6defs.h
index 5105d93d..7e00c5b5 100644
--- a/src/wrapped/generated/wrappedlibtinfo6defs.h
+++ b/src/wrapped/generated/wrappedlibtinfo6defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfo6DEFS_H_
 #define __wrappedlibtinfo6DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibtinfo6types.h b/src/wrapped/generated/wrappedlibtinfo6types.h
index ae9f88fc..febeada5 100644
--- a/src/wrapped/generated/wrappedlibtinfo6types.h
+++ b/src/wrapped/generated/wrappedlibtinfo6types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfo6TYPES_H_
 #define __wrappedlibtinfo6TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibtinfo6undefs.h b/src/wrapped/generated/wrappedlibtinfo6undefs.h
index 7ee85b88..a4399bc2 100644
--- a/src/wrapped/generated/wrappedlibtinfo6undefs.h
+++ b/src/wrapped/generated/wrappedlibtinfo6undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfo6UNDEFS_H_
 #define __wrappedlibtinfo6UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibtinfodefs.h b/src/wrapped/generated/wrappedlibtinfodefs.h
index ee872e53..02dc550a 100644
--- a/src/wrapped/generated/wrappedlibtinfodefs.h
+++ b/src/wrapped/generated/wrappedlibtinfodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfoDEFS_H_
 #define __wrappedlibtinfoDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibtinfotypes.h b/src/wrapped/generated/wrappedlibtinfotypes.h
index c843b3cc..24c38a8d 100644
--- a/src/wrapped/generated/wrappedlibtinfotypes.h
+++ b/src/wrapped/generated/wrappedlibtinfotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfoTYPES_H_
 #define __wrappedlibtinfoTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibtinfoundefs.h b/src/wrapped/generated/wrappedlibtinfoundefs.h
index fd31e5e6..b9f60700 100644
--- a/src/wrapped/generated/wrappedlibtinfoundefs.h
+++ b/src/wrapped/generated/wrappedlibtinfoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibtinfoUNDEFS_H_
 #define __wrappedlibtinfoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibusb1defs.h b/src/wrapped/generated/wrappedlibusb1defs.h
index 09b516e2..3f0a2689 100644
--- a/src/wrapped/generated/wrappedlibusb1defs.h
+++ b/src/wrapped/generated/wrappedlibusb1defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibusb1DEFS_H_
 #define __wrappedlibusb1DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibusb1types.h b/src/wrapped/generated/wrappedlibusb1types.h
index a39891a0..ebc1c608 100644
--- a/src/wrapped/generated/wrappedlibusb1types.h
+++ b/src/wrapped/generated/wrappedlibusb1types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibusb1TYPES_H_
 #define __wrappedlibusb1TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibusb1undefs.h b/src/wrapped/generated/wrappedlibusb1undefs.h
index 4c01ae55..963de404 100644
--- a/src/wrapped/generated/wrappedlibusb1undefs.h
+++ b/src/wrapped/generated/wrappedlibusb1undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibusb1UNDEFS_H_
 #define __wrappedlibusb1UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibuuiddefs.h b/src/wrapped/generated/wrappedlibuuiddefs.h
index 394e27b7..10960845 100644
--- a/src/wrapped/generated/wrappedlibuuiddefs.h
+++ b/src/wrapped/generated/wrappedlibuuiddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibuuidDEFS_H_
 #define __wrappedlibuuidDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibuuidtypes.h b/src/wrapped/generated/wrappedlibuuidtypes.h
index 2b2ee7e4..981fad0b 100644
--- a/src/wrapped/generated/wrappedlibuuidtypes.h
+++ b/src/wrapped/generated/wrappedlibuuidtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibuuidTYPES_H_
 #define __wrappedlibuuidTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibuuidundefs.h b/src/wrapped/generated/wrappedlibuuidundefs.h
index e823fa7c..071dadf3 100644
--- a/src/wrapped/generated/wrappedlibuuidundefs.h
+++ b/src/wrapped/generated/wrappedlibuuidundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibuuidUNDEFS_H_
 #define __wrappedlibuuidUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvadefs.h b/src/wrapped/generated/wrappedlibvadefs.h
index 0805bd82..b6415094 100644
--- a/src/wrapped/generated/wrappedlibvadefs.h
+++ b/src/wrapped/generated/wrappedlibvadefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvaDEFS_H_
 #define __wrappedlibvaDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvadrmdefs.h b/src/wrapped/generated/wrappedlibvadrmdefs.h
index e600fafb..3bd233dd 100644
--- a/src/wrapped/generated/wrappedlibvadrmdefs.h
+++ b/src/wrapped/generated/wrappedlibvadrmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvadrmDEFS_H_
 #define __wrappedlibvadrmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvadrmtypes.h b/src/wrapped/generated/wrappedlibvadrmtypes.h
index b91734c1..1b3196db 100644
--- a/src/wrapped/generated/wrappedlibvadrmtypes.h
+++ b/src/wrapped/generated/wrappedlibvadrmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvadrmTYPES_H_
 #define __wrappedlibvadrmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvadrmundefs.h b/src/wrapped/generated/wrappedlibvadrmundefs.h
index 6dec44ea..c1ddf019 100644
--- a/src/wrapped/generated/wrappedlibvadrmundefs.h
+++ b/src/wrapped/generated/wrappedlibvadrmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvadrmUNDEFS_H_
 #define __wrappedlibvadrmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvatypes.h b/src/wrapped/generated/wrappedlibvatypes.h
index ac5d152b..92f4d80e 100644
--- a/src/wrapped/generated/wrappedlibvatypes.h
+++ b/src/wrapped/generated/wrappedlibvatypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvaTYPES_H_
 #define __wrappedlibvaTYPES_H_
@@ -11,7 +11,10 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef void* (*pFppp_t)(void*, void*, void*);
 
-#define SUPER() ADDED_FUNCTIONS()
+#define SUPER() ADDED_FUNCTIONS() \
+	GO(vaSetErrorCallback, pFppp_t) \
+	GO(vaSetInfoCallback, pFppp_t)
 
 #endif // __wrappedlibvaTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvaundefs.h b/src/wrapped/generated/wrappedlibvaundefs.h
index ac216431..7c10922f 100644
--- a/src/wrapped/generated/wrappedlibvaundefs.h
+++ b/src/wrapped/generated/wrappedlibvaundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvaUNDEFS_H_
 #define __wrappedlibvaUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvawaylanddefs.h b/src/wrapped/generated/wrappedlibvawaylanddefs.h
index a931a113..1972c35e 100644
--- a/src/wrapped/generated/wrappedlibvawaylanddefs.h
+++ b/src/wrapped/generated/wrappedlibvawaylanddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvawaylandDEFS_H_
 #define __wrappedlibvawaylandDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvawaylandtypes.h b/src/wrapped/generated/wrappedlibvawaylandtypes.h
index 8dff57e2..b828c4e6 100644
--- a/src/wrapped/generated/wrappedlibvawaylandtypes.h
+++ b/src/wrapped/generated/wrappedlibvawaylandtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvawaylandTYPES_H_
 #define __wrappedlibvawaylandTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvawaylandundefs.h b/src/wrapped/generated/wrappedlibvawaylandundefs.h
index dc888e30..70101044 100644
--- a/src/wrapped/generated/wrappedlibvawaylandundefs.h
+++ b/src/wrapped/generated/wrappedlibvawaylandundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvawaylandUNDEFS_H_
 #define __wrappedlibvawaylandUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvax11defs.h b/src/wrapped/generated/wrappedlibvax11defs.h
index 4219bde4..cbcb7b8e 100644
--- a/src/wrapped/generated/wrappedlibvax11defs.h
+++ b/src/wrapped/generated/wrappedlibvax11defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvax11DEFS_H_
 #define __wrappedlibvax11DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvax11types.h b/src/wrapped/generated/wrappedlibvax11types.h
index e4e8096b..c93dc22a 100644
--- a/src/wrapped/generated/wrappedlibvax11types.h
+++ b/src/wrapped/generated/wrappedlibvax11types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvax11TYPES_H_
 #define __wrappedlibvax11TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvax11undefs.h b/src/wrapped/generated/wrappedlibvax11undefs.h
index c91a350e..c893d848 100644
--- a/src/wrapped/generated/wrappedlibvax11undefs.h
+++ b/src/wrapped/generated/wrappedlibvax11undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvax11UNDEFS_H_
 #define __wrappedlibvax11UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvdpaudefs.h b/src/wrapped/generated/wrappedlibvdpaudefs.h
index 661912dc..51e4af54 100644
--- a/src/wrapped/generated/wrappedlibvdpaudefs.h
+++ b/src/wrapped/generated/wrappedlibvdpaudefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvdpauDEFS_H_
 #define __wrappedlibvdpauDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvdpautypes.h b/src/wrapped/generated/wrappedlibvdpautypes.h
index c2569c3f..92879a6e 100644
--- a/src/wrapped/generated/wrappedlibvdpautypes.h
+++ b/src/wrapped/generated/wrappedlibvdpautypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvdpauTYPES_H_
 #define __wrappedlibvdpauTYPES_H_
@@ -11,7 +11,9 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*);
 
-#define SUPER() ADDED_FUNCTIONS()
+#define SUPER() ADDED_FUNCTIONS() \
+	GO(vdp_device_create_x11, iFpipp_t)
 
 #endif // __wrappedlibvdpauTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvdpauundefs.h b/src/wrapped/generated/wrappedlibvdpauundefs.h
index f0523fdb..00e4f50e 100644
--- a/src/wrapped/generated/wrappedlibvdpauundefs.h
+++ b/src/wrapped/generated/wrappedlibvdpauundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvdpauUNDEFS_H_
 #define __wrappedlibvdpauUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvorbisdefs.h b/src/wrapped/generated/wrappedlibvorbisdefs.h
index 8ced83c8..bce375bd 100644
--- a/src/wrapped/generated/wrappedlibvorbisdefs.h
+++ b/src/wrapped/generated/wrappedlibvorbisdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvorbisDEFS_H_
 #define __wrappedlibvorbisDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibvorbistypes.h b/src/wrapped/generated/wrappedlibvorbistypes.h
index 0e0c11c6..b5c9d27c 100644
--- a/src/wrapped/generated/wrappedlibvorbistypes.h
+++ b/src/wrapped/generated/wrappedlibvorbistypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvorbisTYPES_H_
 #define __wrappedlibvorbisTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibvorbisundefs.h b/src/wrapped/generated/wrappedlibvorbisundefs.h
index 7e6b7f11..60164467 100644
--- a/src/wrapped/generated/wrappedlibvorbisundefs.h
+++ b/src/wrapped/generated/wrappedlibvorbisundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibvorbisUNDEFS_H_
 #define __wrappedlibvorbisUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibx11defs.h b/src/wrapped/generated/wrappedlibx11defs.h
index 3fcf1bb2..e02e9dab 100644
--- a/src/wrapped/generated/wrappedlibx11defs.h
+++ b/src/wrapped/generated/wrappedlibx11defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11DEFS_H_
 #define __wrappedlibx11DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibx11types.h b/src/wrapped/generated/wrappedlibx11types.h
index 0643bca1..ef5ac6ed 100644
--- a/src/wrapped/generated/wrappedlibx11types.h
+++ b/src/wrapped/generated/wrappedlibx11types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11TYPES_H_
 #define __wrappedlibx11TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibx11undefs.h b/src/wrapped/generated/wrappedlibx11undefs.h
index 5336f8cc..5e4e1ba1 100644
--- a/src/wrapped/generated/wrappedlibx11undefs.h
+++ b/src/wrapped/generated/wrappedlibx11undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11UNDEFS_H_
 #define __wrappedlibx11UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibx11xcbdefs.h b/src/wrapped/generated/wrappedlibx11xcbdefs.h
index 392db82e..b8cc6c1d 100644
--- a/src/wrapped/generated/wrappedlibx11xcbdefs.h
+++ b/src/wrapped/generated/wrappedlibx11xcbdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11xcbDEFS_H_
 #define __wrappedlibx11xcbDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibx11xcbtypes.h b/src/wrapped/generated/wrappedlibx11xcbtypes.h
index f526437c..fab861bf 100644
--- a/src/wrapped/generated/wrappedlibx11xcbtypes.h
+++ b/src/wrapped/generated/wrappedlibx11xcbtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11xcbTYPES_H_
 #define __wrappedlibx11xcbTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibx11xcbundefs.h b/src/wrapped/generated/wrappedlibx11xcbundefs.h
index 378628e7..99e9d215 100644
--- a/src/wrapped/generated/wrappedlibx11xcbundefs.h
+++ b/src/wrapped/generated/wrappedlibx11xcbundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibx11xcbUNDEFS_H_
 #define __wrappedlibx11xcbUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxaudefs.h b/src/wrapped/generated/wrappedlibxaudefs.h
index da2e8b55..4baa6969 100644
--- a/src/wrapped/generated/wrappedlibxaudefs.h
+++ b/src/wrapped/generated/wrappedlibxaudefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxauDEFS_H_
 #define __wrappedlibxauDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxautypes.h b/src/wrapped/generated/wrappedlibxautypes.h
index 6743b0d7..eeda0bd6 100644
--- a/src/wrapped/generated/wrappedlibxautypes.h
+++ b/src/wrapped/generated/wrappedlibxautypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxauTYPES_H_
 #define __wrappedlibxauTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxauundefs.h b/src/wrapped/generated/wrappedlibxauundefs.h
index 6726547e..52ade216 100644
--- a/src/wrapped/generated/wrappedlibxauundefs.h
+++ b/src/wrapped/generated/wrappedlibxauundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxauUNDEFS_H_
 #define __wrappedlibxauUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdefs.h b/src/wrapped/generated/wrappedlibxcbdefs.h
index 5a771e28..1166a4a0 100644
--- a/src/wrapped/generated/wrappedlibxcbdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbDEFS_H_
 #define __wrappedlibxcbDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri2defs.h b/src/wrapped/generated/wrappedlibxcbdri2defs.h
index d694c86e..fbb9b391 100644
--- a/src/wrapped/generated/wrappedlibxcbdri2defs.h
+++ b/src/wrapped/generated/wrappedlibxcbdri2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri2DEFS_H_
 #define __wrappedlibxcbdri2DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri2types.h b/src/wrapped/generated/wrappedlibxcbdri2types.h
index 724afcb0..2ce496c1 100644
--- a/src/wrapped/generated/wrappedlibxcbdri2types.h
+++ b/src/wrapped/generated/wrappedlibxcbdri2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri2TYPES_H_
 #define __wrappedlibxcbdri2TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri2undefs.h b/src/wrapped/generated/wrappedlibxcbdri2undefs.h
index 9a5354db..316085f4 100644
--- a/src/wrapped/generated/wrappedlibxcbdri2undefs.h
+++ b/src/wrapped/generated/wrappedlibxcbdri2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri2UNDEFS_H_
 #define __wrappedlibxcbdri2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri3defs.h b/src/wrapped/generated/wrappedlibxcbdri3defs.h
index 2adbb053..aef53987 100644
--- a/src/wrapped/generated/wrappedlibxcbdri3defs.h
+++ b/src/wrapped/generated/wrappedlibxcbdri3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri3DEFS_H_
 #define __wrappedlibxcbdri3DEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri3types.h b/src/wrapped/generated/wrappedlibxcbdri3types.h
index 8a98ca39..f86f7425 100644
--- a/src/wrapped/generated/wrappedlibxcbdri3types.h
+++ b/src/wrapped/generated/wrappedlibxcbdri3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri3TYPES_H_
 #define __wrappedlibxcbdri3TYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbdri3undefs.h b/src/wrapped/generated/wrappedlibxcbdri3undefs.h
index 1e53f0dc..27fa8333 100644
--- a/src/wrapped/generated/wrappedlibxcbdri3undefs.h
+++ b/src/wrapped/generated/wrappedlibxcbdri3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbdri3UNDEFS_H_
 #define __wrappedlibxcbdri3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbglxdefs.h b/src/wrapped/generated/wrappedlibxcbglxdefs.h
index 45b43a0e..7069cfa6 100644
--- a/src/wrapped/generated/wrappedlibxcbglxdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbglxdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbglxDEFS_H_
 #define __wrappedlibxcbglxDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbglxtypes.h b/src/wrapped/generated/wrappedlibxcbglxtypes.h
index a08179d2..a7f2d4a3 100644
--- a/src/wrapped/generated/wrappedlibxcbglxtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbglxtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbglxTYPES_H_
 #define __wrappedlibxcbglxTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbglxundefs.h b/src/wrapped/generated/wrappedlibxcbglxundefs.h
index 160ac2aa..3958f4c3 100644
--- a/src/wrapped/generated/wrappedlibxcbglxundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbglxundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbglxUNDEFS_H_
 #define __wrappedlibxcbglxUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbicccmdefs.h b/src/wrapped/generated/wrappedlibxcbicccmdefs.h
index 0844378b..9c224585 100644
--- a/src/wrapped/generated/wrappedlibxcbicccmdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbicccmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbicccmDEFS_H_
 #define __wrappedlibxcbicccmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbicccmtypes.h b/src/wrapped/generated/wrappedlibxcbicccmtypes.h
index 690d2eb2..cef79fd0 100644
--- a/src/wrapped/generated/wrappedlibxcbicccmtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbicccmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbicccmTYPES_H_
 #define __wrappedlibxcbicccmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbicccmundefs.h b/src/wrapped/generated/wrappedlibxcbicccmundefs.h
index e2d168b7..f7a51894 100644
--- a/src/wrapped/generated/wrappedlibxcbicccmundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbicccmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbicccmUNDEFS_H_
 #define __wrappedlibxcbicccmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbimagedefs.h b/src/wrapped/generated/wrappedlibxcbimagedefs.h
index 12f14b6d..2657164c 100644
--- a/src/wrapped/generated/wrappedlibxcbimagedefs.h
+++ b/src/wrapped/generated/wrappedlibxcbimagedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbimageDEFS_H_
 #define __wrappedlibxcbimageDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbimagetypes.h b/src/wrapped/generated/wrappedlibxcbimagetypes.h
index b75288f5..08b684bb 100644
--- a/src/wrapped/generated/wrappedlibxcbimagetypes.h
+++ b/src/wrapped/generated/wrappedlibxcbimagetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbimageTYPES_H_
 #define __wrappedlibxcbimageTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbimageundefs.h b/src/wrapped/generated/wrappedlibxcbimageundefs.h
index 3f712d6e..1f0f85c1 100644
--- a/src/wrapped/generated/wrappedlibxcbimageundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbimageundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbimageUNDEFS_H_
 #define __wrappedlibxcbimageUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbkeysymsdefs.h b/src/wrapped/generated/wrappedlibxcbkeysymsdefs.h
index 5e62ba8c..288ba494 100644
--- a/src/wrapped/generated/wrappedlibxcbkeysymsdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbkeysymsdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbkeysymsDEFS_H_
 #define __wrappedlibxcbkeysymsDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbkeysymstypes.h b/src/wrapped/generated/wrappedlibxcbkeysymstypes.h
index 805be0fb..09346c21 100644
--- a/src/wrapped/generated/wrappedlibxcbkeysymstypes.h
+++ b/src/wrapped/generated/wrappedlibxcbkeysymstypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbkeysymsTYPES_H_
 #define __wrappedlibxcbkeysymsTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbkeysymsundefs.h b/src/wrapped/generated/wrappedlibxcbkeysymsundefs.h
index f0743229..e5023d19 100644
--- a/src/wrapped/generated/wrappedlibxcbkeysymsundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbkeysymsundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbkeysymsUNDEFS_H_
 #define __wrappedlibxcbkeysymsUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbpresentdefs.h b/src/wrapped/generated/wrappedlibxcbpresentdefs.h
index 67e569dc..b8016aaa 100644
--- a/src/wrapped/generated/wrappedlibxcbpresentdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbpresentdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbpresentDEFS_H_
 #define __wrappedlibxcbpresentDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbpresenttypes.h b/src/wrapped/generated/wrappedlibxcbpresenttypes.h
index b62ad12b..244211ef 100644
--- a/src/wrapped/generated/wrappedlibxcbpresenttypes.h
+++ b/src/wrapped/generated/wrappedlibxcbpresenttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbpresentTYPES_H_
 #define __wrappedlibxcbpresentTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbpresentundefs.h b/src/wrapped/generated/wrappedlibxcbpresentundefs.h
index cd2706de..65dbd349 100644
--- a/src/wrapped/generated/wrappedlibxcbpresentundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbpresentundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbpresentUNDEFS_H_
 #define __wrappedlibxcbpresentUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrandrdefs.h b/src/wrapped/generated/wrappedlibxcbrandrdefs.h
index e30c812e..bcafe585 100644
--- a/src/wrapped/generated/wrappedlibxcbrandrdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrandrdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrandrDEFS_H_
 #define __wrappedlibxcbrandrDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrandrtypes.h b/src/wrapped/generated/wrappedlibxcbrandrtypes.h
index 2bbe6e63..e0f9ac4a 100644
--- a/src/wrapped/generated/wrappedlibxcbrandrtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbrandrtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrandrTYPES_H_
 #define __wrappedlibxcbrandrTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrandrundefs.h b/src/wrapped/generated/wrappedlibxcbrandrundefs.h
index e0d7e0c4..48ded6a3 100644
--- a/src/wrapped/generated/wrappedlibxcbrandrundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrandrundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrandrUNDEFS_H_
 #define __wrappedlibxcbrandrUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrenderdefs.h b/src/wrapped/generated/wrappedlibxcbrenderdefs.h
index a2387e12..472ea27c 100644
--- a/src/wrapped/generated/wrappedlibxcbrenderdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrenderdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderDEFS_H_
 #define __wrappedlibxcbrenderDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrendertypes.h b/src/wrapped/generated/wrappedlibxcbrendertypes.h
index b0fcf777..c2a59540 100644
--- a/src/wrapped/generated/wrappedlibxcbrendertypes.h
+++ b/src/wrapped/generated/wrappedlibxcbrendertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderTYPES_H_
 #define __wrappedlibxcbrenderTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrenderundefs.h b/src/wrapped/generated/wrappedlibxcbrenderundefs.h
index 93e92008..7e509d5a 100644
--- a/src/wrapped/generated/wrappedlibxcbrenderundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrenderundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderUNDEFS_H_
 #define __wrappedlibxcbrenderUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrenderutildefs.h b/src/wrapped/generated/wrappedlibxcbrenderutildefs.h
index 2238bacc..a566a6ca 100644
--- a/src/wrapped/generated/wrappedlibxcbrenderutildefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrenderutildefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderutilDEFS_H_
 #define __wrappedlibxcbrenderutilDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrenderutiltypes.h b/src/wrapped/generated/wrappedlibxcbrenderutiltypes.h
index df31844d..4d03fd08 100644
--- a/src/wrapped/generated/wrappedlibxcbrenderutiltypes.h
+++ b/src/wrapped/generated/wrappedlibxcbrenderutiltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderutilTYPES_H_
 #define __wrappedlibxcbrenderutilTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbrenderutilundefs.h b/src/wrapped/generated/wrappedlibxcbrenderutilundefs.h
index c52065ff..3ad9e996 100644
--- a/src/wrapped/generated/wrappedlibxcbrenderutilundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbrenderutilundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbrenderutilUNDEFS_H_
 #define __wrappedlibxcbrenderutilUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshapedefs.h b/src/wrapped/generated/wrappedlibxcbshapedefs.h
index 7dc9f1b4..1eb2e31b 100644
--- a/src/wrapped/generated/wrappedlibxcbshapedefs.h
+++ b/src/wrapped/generated/wrappedlibxcbshapedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshapeDEFS_H_
 #define __wrappedlibxcbshapeDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshapetypes.h b/src/wrapped/generated/wrappedlibxcbshapetypes.h
index ab37cd3d..74e98085 100644
--- a/src/wrapped/generated/wrappedlibxcbshapetypes.h
+++ b/src/wrapped/generated/wrappedlibxcbshapetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshapeTYPES_H_
 #define __wrappedlibxcbshapeTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshapeundefs.h b/src/wrapped/generated/wrappedlibxcbshapeundefs.h
index fe2041e7..a9149fbe 100644
--- a/src/wrapped/generated/wrappedlibxcbshapeundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbshapeundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshapeUNDEFS_H_
 #define __wrappedlibxcbshapeUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshmdefs.h b/src/wrapped/generated/wrappedlibxcbshmdefs.h
index f1122251..bf86d0ff 100644
--- a/src/wrapped/generated/wrappedlibxcbshmdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbshmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshmDEFS_H_
 #define __wrappedlibxcbshmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshmtypes.h b/src/wrapped/generated/wrappedlibxcbshmtypes.h
index 2be03706..fd13036e 100644
--- a/src/wrapped/generated/wrappedlibxcbshmtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbshmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshmTYPES_H_
 #define __wrappedlibxcbshmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbshmundefs.h b/src/wrapped/generated/wrappedlibxcbshmundefs.h
index af41002f..7d18fb53 100644
--- a/src/wrapped/generated/wrappedlibxcbshmundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbshmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbshmUNDEFS_H_
 #define __wrappedlibxcbshmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbsyncdefs.h b/src/wrapped/generated/wrappedlibxcbsyncdefs.h
index 64589a28..87b2abe4 100644
--- a/src/wrapped/generated/wrappedlibxcbsyncdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbsyncdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbsyncDEFS_H_
 #define __wrappedlibxcbsyncDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbsynctypes.h b/src/wrapped/generated/wrappedlibxcbsynctypes.h
index 2d4af018..0e24589b 100644
--- a/src/wrapped/generated/wrappedlibxcbsynctypes.h
+++ b/src/wrapped/generated/wrappedlibxcbsynctypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbsyncTYPES_H_
 #define __wrappedlibxcbsyncTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbsyncundefs.h b/src/wrapped/generated/wrappedlibxcbsyncundefs.h
index d1062ff2..4240384e 100644
--- a/src/wrapped/generated/wrappedlibxcbsyncundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbsyncundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbsyncUNDEFS_H_
 #define __wrappedlibxcbsyncUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbtypes.h b/src/wrapped/generated/wrappedlibxcbtypes.h
index 1aabe6a5..4829c514 100644
--- a/src/wrapped/generated/wrappedlibxcbtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbTYPES_H_
 #define __wrappedlibxcbTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbundefs.h b/src/wrapped/generated/wrappedlibxcbundefs.h
index 53a046d7..29283a22 100644
--- a/src/wrapped/generated/wrappedlibxcbundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbUNDEFS_H_
 #define __wrappedlibxcbUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbutildefs.h b/src/wrapped/generated/wrappedlibxcbutildefs.h
index cca4d423..20fcb0df 100644
--- a/src/wrapped/generated/wrappedlibxcbutildefs.h
+++ b/src/wrapped/generated/wrappedlibxcbutildefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbutilDEFS_H_
 #define __wrappedlibxcbutilDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbutiltypes.h b/src/wrapped/generated/wrappedlibxcbutiltypes.h
index 277f3aff..4f0a54c3 100644
--- a/src/wrapped/generated/wrappedlibxcbutiltypes.h
+++ b/src/wrapped/generated/wrappedlibxcbutiltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbutilTYPES_H_
 #define __wrappedlibxcbutilTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbutilundefs.h b/src/wrapped/generated/wrappedlibxcbutilundefs.h
index 7a4fbc24..20091328 100644
--- a/src/wrapped/generated/wrappedlibxcbutilundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbutilundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbutilUNDEFS_H_
 #define __wrappedlibxcbutilUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxfixesdefs.h b/src/wrapped/generated/wrappedlibxcbxfixesdefs.h
index ded8dae5..e2fce411 100644
--- a/src/wrapped/generated/wrappedlibxcbxfixesdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxfixesdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxfixesDEFS_H_
 #define __wrappedlibxcbxfixesDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxfixestypes.h b/src/wrapped/generated/wrappedlibxcbxfixestypes.h
index 47db47e3..2b4e11a4 100644
--- a/src/wrapped/generated/wrappedlibxcbxfixestypes.h
+++ b/src/wrapped/generated/wrappedlibxcbxfixestypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxfixesTYPES_H_
 #define __wrappedlibxcbxfixesTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxfixesundefs.h b/src/wrapped/generated/wrappedlibxcbxfixesundefs.h
index 5579cf86..75cffbab 100644
--- a/src/wrapped/generated/wrappedlibxcbxfixesundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxfixesundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxfixesUNDEFS_H_
 #define __wrappedlibxcbxfixesUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxineramadefs.h b/src/wrapped/generated/wrappedlibxcbxineramadefs.h
index 632b2d87..336055b0 100644
--- a/src/wrapped/generated/wrappedlibxcbxineramadefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxineramadefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxineramaDEFS_H_
 #define __wrappedlibxcbxineramaDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxineramatypes.h b/src/wrapped/generated/wrappedlibxcbxineramatypes.h
index 37d4a9af..53f3fff8 100644
--- a/src/wrapped/generated/wrappedlibxcbxineramatypes.h
+++ b/src/wrapped/generated/wrappedlibxcbxineramatypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxineramaTYPES_H_
 #define __wrappedlibxcbxineramaTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxineramaundefs.h b/src/wrapped/generated/wrappedlibxcbxineramaundefs.h
index 2efadb92..7af1d107 100644
--- a/src/wrapped/generated/wrappedlibxcbxineramaundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxineramaundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxineramaUNDEFS_H_
 #define __wrappedlibxcbxineramaUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxkbdefs.h b/src/wrapped/generated/wrappedlibxcbxkbdefs.h
index 22871e06..6abac59e 100644
--- a/src/wrapped/generated/wrappedlibxcbxkbdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxkbdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxkbDEFS_H_
 #define __wrappedlibxcbxkbDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxkbtypes.h b/src/wrapped/generated/wrappedlibxcbxkbtypes.h
index 291af715..add3a4d5 100644
--- a/src/wrapped/generated/wrappedlibxcbxkbtypes.h
+++ b/src/wrapped/generated/wrappedlibxcbxkbtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxkbTYPES_H_
 #define __wrappedlibxcbxkbTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxkbundefs.h b/src/wrapped/generated/wrappedlibxcbxkbundefs.h
index c73939cc..7b3203b3 100644
--- a/src/wrapped/generated/wrappedlibxcbxkbundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxkbundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxkbUNDEFS_H_
 #define __wrappedlibxcbxkbUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxtestdefs.h b/src/wrapped/generated/wrappedlibxcbxtestdefs.h
index ae14b062..3d89e3e4 100644
--- a/src/wrapped/generated/wrappedlibxcbxtestdefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxtestdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxtestDEFS_H_
 #define __wrappedlibxcbxtestDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxtesttypes.h b/src/wrapped/generated/wrappedlibxcbxtesttypes.h
index 5a6af7b9..b7a4c275 100644
--- a/src/wrapped/generated/wrappedlibxcbxtesttypes.h
+++ b/src/wrapped/generated/wrappedlibxcbxtesttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxtestTYPES_H_
 #define __wrappedlibxcbxtestTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcbxtestundefs.h b/src/wrapped/generated/wrappedlibxcbxtestundefs.h
index c44f1020..a87259b3 100644
--- a/src/wrapped/generated/wrappedlibxcbxtestundefs.h
+++ b/src/wrapped/generated/wrappedlibxcbxtestundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcbxtestUNDEFS_H_
 #define __wrappedlibxcbxtestUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcompositedefs.h b/src/wrapped/generated/wrappedlibxcompositedefs.h
index 6b579631..7632fa38 100644
--- a/src/wrapped/generated/wrappedlibxcompositedefs.h
+++ b/src/wrapped/generated/wrappedlibxcompositedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcompositeDEFS_H_
 #define __wrappedlibxcompositeDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcompositetypes.h b/src/wrapped/generated/wrappedlibxcompositetypes.h
index 4f5a1a0a..abbb179c 100644
--- a/src/wrapped/generated/wrappedlibxcompositetypes.h
+++ b/src/wrapped/generated/wrappedlibxcompositetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcompositeTYPES_H_
 #define __wrappedlibxcompositeTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcompositeundefs.h b/src/wrapped/generated/wrappedlibxcompositeundefs.h
index 8ea1f98f..747336df 100644
--- a/src/wrapped/generated/wrappedlibxcompositeundefs.h
+++ b/src/wrapped/generated/wrappedlibxcompositeundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcompositeUNDEFS_H_
 #define __wrappedlibxcompositeUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcursordefs.h b/src/wrapped/generated/wrappedlibxcursordefs.h
index 7b4352ed..b8451886 100644
--- a/src/wrapped/generated/wrappedlibxcursordefs.h
+++ b/src/wrapped/generated/wrappedlibxcursordefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcursorDEFS_H_
 #define __wrappedlibxcursorDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxcursortypes.h b/src/wrapped/generated/wrappedlibxcursortypes.h
index 5251a828..d08f0e09 100644
--- a/src/wrapped/generated/wrappedlibxcursortypes.h
+++ b/src/wrapped/generated/wrappedlibxcursortypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcursorTYPES_H_
 #define __wrappedlibxcursorTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxcursorundefs.h b/src/wrapped/generated/wrappedlibxcursorundefs.h
index 2c59d589..625083c0 100644
--- a/src/wrapped/generated/wrappedlibxcursorundefs.h
+++ b/src/wrapped/generated/wrappedlibxcursorundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxcursorUNDEFS_H_
 #define __wrappedlibxcursorUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxdamagedefs.h b/src/wrapped/generated/wrappedlibxdamagedefs.h
index d98b818b..dcd913e5 100644
--- a/src/wrapped/generated/wrappedlibxdamagedefs.h
+++ b/src/wrapped/generated/wrappedlibxdamagedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdamageDEFS_H_
 #define __wrappedlibxdamageDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxdamagetypes.h b/src/wrapped/generated/wrappedlibxdamagetypes.h
index f94073e8..4534ac7f 100644
--- a/src/wrapped/generated/wrappedlibxdamagetypes.h
+++ b/src/wrapped/generated/wrappedlibxdamagetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdamageTYPES_H_
 #define __wrappedlibxdamageTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxdamageundefs.h b/src/wrapped/generated/wrappedlibxdamageundefs.h
index 5082820a..6e9c5180 100644
--- a/src/wrapped/generated/wrappedlibxdamageundefs.h
+++ b/src/wrapped/generated/wrappedlibxdamageundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdamageUNDEFS_H_
 #define __wrappedlibxdamageUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxdmcpdefs.h b/src/wrapped/generated/wrappedlibxdmcpdefs.h
index 768ea5a9..1a38235b 100644
--- a/src/wrapped/generated/wrappedlibxdmcpdefs.h
+++ b/src/wrapped/generated/wrappedlibxdmcpdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdmcpDEFS_H_
 #define __wrappedlibxdmcpDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxdmcptypes.h b/src/wrapped/generated/wrappedlibxdmcptypes.h
index dc696e8d..42240da2 100644
--- a/src/wrapped/generated/wrappedlibxdmcptypes.h
+++ b/src/wrapped/generated/wrappedlibxdmcptypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdmcpTYPES_H_
 #define __wrappedlibxdmcpTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxdmcpundefs.h b/src/wrapped/generated/wrappedlibxdmcpundefs.h
index 5eac771d..a02aa8fb 100644
--- a/src/wrapped/generated/wrappedlibxdmcpundefs.h
+++ b/src/wrapped/generated/wrappedlibxdmcpundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxdmcpUNDEFS_H_
 #define __wrappedlibxdmcpUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxextdefs.h b/src/wrapped/generated/wrappedlibxextdefs.h
index 641bab95..fa720de1 100644
--- a/src/wrapped/generated/wrappedlibxextdefs.h
+++ b/src/wrapped/generated/wrappedlibxextdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxextDEFS_H_
 #define __wrappedlibxextDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxexttypes.h b/src/wrapped/generated/wrappedlibxexttypes.h
index bad0994c..f0850bc3 100644
--- a/src/wrapped/generated/wrappedlibxexttypes.h
+++ b/src/wrapped/generated/wrappedlibxexttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxextTYPES_H_
 #define __wrappedlibxextTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxextundefs.h b/src/wrapped/generated/wrappedlibxextundefs.h
index ae79faf9..450c54a4 100644
--- a/src/wrapped/generated/wrappedlibxextundefs.h
+++ b/src/wrapped/generated/wrappedlibxextundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxextUNDEFS_H_
 #define __wrappedlibxextUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxfixesdefs.h b/src/wrapped/generated/wrappedlibxfixesdefs.h
index 717878b4..dc2e7385 100644
--- a/src/wrapped/generated/wrappedlibxfixesdefs.h
+++ b/src/wrapped/generated/wrappedlibxfixesdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxfixesDEFS_H_
 #define __wrappedlibxfixesDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxfixestypes.h b/src/wrapped/generated/wrappedlibxfixestypes.h
index 03788268..3b7d7bd1 100644
--- a/src/wrapped/generated/wrappedlibxfixestypes.h
+++ b/src/wrapped/generated/wrappedlibxfixestypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxfixesTYPES_H_
 #define __wrappedlibxfixesTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxfixesundefs.h b/src/wrapped/generated/wrappedlibxfixesundefs.h
index 96fda763..4b337f45 100644
--- a/src/wrapped/generated/wrappedlibxfixesundefs.h
+++ b/src/wrapped/generated/wrappedlibxfixesundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxfixesUNDEFS_H_
 #define __wrappedlibxfixesUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxftdefs.h b/src/wrapped/generated/wrappedlibxftdefs.h
index 01e1b097..4d502436 100644
--- a/src/wrapped/generated/wrappedlibxftdefs.h
+++ b/src/wrapped/generated/wrappedlibxftdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxftDEFS_H_
 #define __wrappedlibxftDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxfttypes.h b/src/wrapped/generated/wrappedlibxfttypes.h
index 5faf166f..02257e5a 100644
--- a/src/wrapped/generated/wrappedlibxfttypes.h
+++ b/src/wrapped/generated/wrappedlibxfttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxftTYPES_H_
 #define __wrappedlibxftTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxftundefs.h b/src/wrapped/generated/wrappedlibxftundefs.h
index 477fa524..9dcf4085 100644
--- a/src/wrapped/generated/wrappedlibxftundefs.h
+++ b/src/wrapped/generated/wrappedlibxftundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxftUNDEFS_H_
 #define __wrappedlibxftUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxidefs.h b/src/wrapped/generated/wrappedlibxidefs.h
index 34e2f5a3..44187512 100644
--- a/src/wrapped/generated/wrappedlibxidefs.h
+++ b/src/wrapped/generated/wrappedlibxidefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxiDEFS_H_
 #define __wrappedlibxiDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxitypes.h b/src/wrapped/generated/wrappedlibxitypes.h
index 07f59aa6..49c66e04 100644
--- a/src/wrapped/generated/wrappedlibxitypes.h
+++ b/src/wrapped/generated/wrappedlibxitypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxiTYPES_H_
 #define __wrappedlibxiTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxiundefs.h b/src/wrapped/generated/wrappedlibxiundefs.h
index 32eb913c..8e333992 100644
--- a/src/wrapped/generated/wrappedlibxiundefs.h
+++ b/src/wrapped/generated/wrappedlibxiundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxiUNDEFS_H_
 #define __wrappedlibxiUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxmudefs.h b/src/wrapped/generated/wrappedlibxmudefs.h
index 1c298691..bf45cf4b 100644
--- a/src/wrapped/generated/wrappedlibxmudefs.h
+++ b/src/wrapped/generated/wrappedlibxmudefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxmuDEFS_H_
 #define __wrappedlibxmuDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxmutypes.h b/src/wrapped/generated/wrappedlibxmutypes.h
index f7ce1640..bd88c9c2 100644
--- a/src/wrapped/generated/wrappedlibxmutypes.h
+++ b/src/wrapped/generated/wrappedlibxmutypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxmuTYPES_H_
 #define __wrappedlibxmuTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxmuundefs.h b/src/wrapped/generated/wrappedlibxmuundefs.h
index 56203daf..f4225ef7 100644
--- a/src/wrapped/generated/wrappedlibxmuundefs.h
+++ b/src/wrapped/generated/wrappedlibxmuundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxmuUNDEFS_H_
 #define __wrappedlibxmuUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxpmdefs.h b/src/wrapped/generated/wrappedlibxpmdefs.h
index 757bd367..52db306b 100644
--- a/src/wrapped/generated/wrappedlibxpmdefs.h
+++ b/src/wrapped/generated/wrappedlibxpmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpmDEFS_H_
 #define __wrappedlibxpmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxpmtypes.h b/src/wrapped/generated/wrappedlibxpmtypes.h
index 58dd946a..ce89da1e 100644
--- a/src/wrapped/generated/wrappedlibxpmtypes.h
+++ b/src/wrapped/generated/wrappedlibxpmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpmTYPES_H_
 #define __wrappedlibxpmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxpmundefs.h b/src/wrapped/generated/wrappedlibxpmundefs.h
index 2a0ca106..125dc1b3 100644
--- a/src/wrapped/generated/wrappedlibxpmundefs.h
+++ b/src/wrapped/generated/wrappedlibxpmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpmUNDEFS_H_
 #define __wrappedlibxpmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxpresentdefs.h b/src/wrapped/generated/wrappedlibxpresentdefs.h
index 2fddbffe..7e3263d6 100644
--- a/src/wrapped/generated/wrappedlibxpresentdefs.h
+++ b/src/wrapped/generated/wrappedlibxpresentdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpresentDEFS_H_
 #define __wrappedlibxpresentDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxpresenttypes.h b/src/wrapped/generated/wrappedlibxpresenttypes.h
index a4ac15cd..02ffcd5c 100644
--- a/src/wrapped/generated/wrappedlibxpresenttypes.h
+++ b/src/wrapped/generated/wrappedlibxpresenttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpresentTYPES_H_
 #define __wrappedlibxpresentTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxpresentundefs.h b/src/wrapped/generated/wrappedlibxpresentundefs.h
index 67bd3276..4d2f7603 100644
--- a/src/wrapped/generated/wrappedlibxpresentundefs.h
+++ b/src/wrapped/generated/wrappedlibxpresentundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxpresentUNDEFS_H_
 #define __wrappedlibxpresentUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxrandrdefs.h b/src/wrapped/generated/wrappedlibxrandrdefs.h
index 59699be6..cbe4faca 100644
--- a/src/wrapped/generated/wrappedlibxrandrdefs.h
+++ b/src/wrapped/generated/wrappedlibxrandrdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrandrDEFS_H_
 #define __wrappedlibxrandrDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxrandrtypes.h b/src/wrapped/generated/wrappedlibxrandrtypes.h
index a452dadd..5e21da6b 100644
--- a/src/wrapped/generated/wrappedlibxrandrtypes.h
+++ b/src/wrapped/generated/wrappedlibxrandrtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrandrTYPES_H_
 #define __wrappedlibxrandrTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxrandrundefs.h b/src/wrapped/generated/wrappedlibxrandrundefs.h
index 11a79de5..23195247 100644
--- a/src/wrapped/generated/wrappedlibxrandrundefs.h
+++ b/src/wrapped/generated/wrappedlibxrandrundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrandrUNDEFS_H_
 #define __wrappedlibxrandrUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxrenderdefs.h b/src/wrapped/generated/wrappedlibxrenderdefs.h
index 63ce38e9..aa0cd3b1 100644
--- a/src/wrapped/generated/wrappedlibxrenderdefs.h
+++ b/src/wrapped/generated/wrappedlibxrenderdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrenderDEFS_H_
 #define __wrappedlibxrenderDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxrendertypes.h b/src/wrapped/generated/wrappedlibxrendertypes.h
index 8d95b96e..e58be09e 100644
--- a/src/wrapped/generated/wrappedlibxrendertypes.h
+++ b/src/wrapped/generated/wrappedlibxrendertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrenderTYPES_H_
 #define __wrappedlibxrenderTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxrenderundefs.h b/src/wrapped/generated/wrappedlibxrenderundefs.h
index 2bd5bf31..2f70cb4a 100644
--- a/src/wrapped/generated/wrappedlibxrenderundefs.h
+++ b/src/wrapped/generated/wrappedlibxrenderundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxrenderUNDEFS_H_
 #define __wrappedlibxrenderUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxssdefs.h b/src/wrapped/generated/wrappedlibxssdefs.h
index 256147e2..b27aed70 100644
--- a/src/wrapped/generated/wrappedlibxssdefs.h
+++ b/src/wrapped/generated/wrappedlibxssdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxssDEFS_H_
 #define __wrappedlibxssDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxsstypes.h b/src/wrapped/generated/wrappedlibxsstypes.h
index bae07635..6fa27607 100644
--- a/src/wrapped/generated/wrappedlibxsstypes.h
+++ b/src/wrapped/generated/wrappedlibxsstypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxssTYPES_H_
 #define __wrappedlibxssTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxssundefs.h b/src/wrapped/generated/wrappedlibxssundefs.h
index 8b258344..a7c216bc 100644
--- a/src/wrapped/generated/wrappedlibxssundefs.h
+++ b/src/wrapped/generated/wrappedlibxssundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxssUNDEFS_H_
 #define __wrappedlibxssUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxtdefs.h b/src/wrapped/generated/wrappedlibxtdefs.h
index 1974d630..e481cd4b 100644
--- a/src/wrapped/generated/wrappedlibxtdefs.h
+++ b/src/wrapped/generated/wrappedlibxtdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtDEFS_H_
 #define __wrappedlibxtDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxtstdefs.h b/src/wrapped/generated/wrappedlibxtstdefs.h
index d77bc1ea..1ea75afa 100644
--- a/src/wrapped/generated/wrappedlibxtstdefs.h
+++ b/src/wrapped/generated/wrappedlibxtstdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtstDEFS_H_
 #define __wrappedlibxtstDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxtsttypes.h b/src/wrapped/generated/wrappedlibxtsttypes.h
index 0ae450d9..8b8caed5 100644
--- a/src/wrapped/generated/wrappedlibxtsttypes.h
+++ b/src/wrapped/generated/wrappedlibxtsttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtstTYPES_H_
 #define __wrappedlibxtstTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxtstundefs.h b/src/wrapped/generated/wrappedlibxtstundefs.h
index 2825dcb7..07995f50 100644
--- a/src/wrapped/generated/wrappedlibxtstundefs.h
+++ b/src/wrapped/generated/wrappedlibxtstundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtstUNDEFS_H_
 #define __wrappedlibxtstUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxttypes.h b/src/wrapped/generated/wrappedlibxttypes.h
index 4e36bcb9..cc5251c0 100644
--- a/src/wrapped/generated/wrappedlibxttypes.h
+++ b/src/wrapped/generated/wrappedlibxttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtTYPES_H_
 #define __wrappedlibxtTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxtundefs.h b/src/wrapped/generated/wrappedlibxtundefs.h
index 7893de97..397f7aea 100644
--- a/src/wrapped/generated/wrappedlibxtundefs.h
+++ b/src/wrapped/generated/wrappedlibxtundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxtUNDEFS_H_
 #define __wrappedlibxtUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxxf86vmdefs.h b/src/wrapped/generated/wrappedlibxxf86vmdefs.h
index 92f62bbb..2cdacf75 100644
--- a/src/wrapped/generated/wrappedlibxxf86vmdefs.h
+++ b/src/wrapped/generated/wrappedlibxxf86vmdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxxf86vmDEFS_H_
 #define __wrappedlibxxf86vmDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibxxf86vmtypes.h b/src/wrapped/generated/wrappedlibxxf86vmtypes.h
index c335cfea..ba9916a4 100644
--- a/src/wrapped/generated/wrappedlibxxf86vmtypes.h
+++ b/src/wrapped/generated/wrappedlibxxf86vmtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxxf86vmTYPES_H_
 #define __wrappedlibxxf86vmTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibxxf86vmundefs.h b/src/wrapped/generated/wrappedlibxxf86vmundefs.h
index db0a66d4..b17dbc02 100644
--- a/src/wrapped/generated/wrappedlibxxf86vmundefs.h
+++ b/src/wrapped/generated/wrappedlibxxf86vmundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibxxf86vmUNDEFS_H_
 #define __wrappedlibxxf86vmUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibzdefs.h b/src/wrapped/generated/wrappedlibzdefs.h
index 1272f72a..a2e71171 100644
--- a/src/wrapped/generated/wrappedlibzdefs.h
+++ b/src/wrapped/generated/wrappedlibzdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibzDEFS_H_
 #define __wrappedlibzDEFS_H_
diff --git a/src/wrapped/generated/wrappedlibztypes.h b/src/wrapped/generated/wrappedlibztypes.h
index 9d04b021..5ec5fb19 100644
--- a/src/wrapped/generated/wrappedlibztypes.h
+++ b/src/wrapped/generated/wrappedlibztypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibzTYPES_H_
 #define __wrappedlibzTYPES_H_
diff --git a/src/wrapped/generated/wrappedlibzundefs.h b/src/wrapped/generated/wrappedlibzundefs.h
index 64adf3df..bf682b01 100644
--- a/src/wrapped/generated/wrappedlibzundefs.h
+++ b/src/wrapped/generated/wrappedlibzundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlibzUNDEFS_H_
 #define __wrappedlibzUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedlzmadefs.h b/src/wrapped/generated/wrappedlzmadefs.h
index 92fc1ea0..d7ac1d65 100644
--- a/src/wrapped/generated/wrappedlzmadefs.h
+++ b/src/wrapped/generated/wrappedlzmadefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlzmaDEFS_H_
 #define __wrappedlzmaDEFS_H_
diff --git a/src/wrapped/generated/wrappedlzmatypes.h b/src/wrapped/generated/wrappedlzmatypes.h
index a2d6d8cc..cda2b1c0 100644
--- a/src/wrapped/generated/wrappedlzmatypes.h
+++ b/src/wrapped/generated/wrappedlzmatypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlzmaTYPES_H_
 #define __wrappedlzmaTYPES_H_
@@ -11,7 +11,9 @@
 #define ADDED_FUNCTIONS() 
 #endif
 
+typedef void (*vFp_t)(void*);
 typedef void (*vFpp_t)(void*, void*);
+typedef int32_t (*iFpi_t)(void*, int32_t);
 typedef int32_t (*iFpU_t)(void*, uint64_t);
 typedef int32_t (*iFpp_t)(void*, void*);
 typedef int32_t (*iFpui_t)(void*, uint32_t, int32_t);
@@ -22,7 +24,9 @@ typedef int32_t (*iFpppppL_t)(void*, void*, void*, void*, void*, uintptr_t);
 typedef int32_t (*iFpupppLppL_t)(void*, uint32_t, void*, void*, void*, uintptr_t, void*, void*, uintptr_t);
 
 #define SUPER() ADDED_FUNCTIONS() \
+	GO(lzma_end, vFp_t) \
 	GO(lzma_index_end, vFpp_t) \
+	GO(lzma_code, iFpi_t) \
 	GO(lzma_alone_decoder, iFpU_t) \
 	GO(lzma_alone_encoder, iFpp_t) \
 	GO(lzma_raw_decoder, iFpp_t) \
diff --git a/src/wrapped/generated/wrappedlzmaundefs.h b/src/wrapped/generated/wrappedlzmaundefs.h
index 3bd25b31..1e3a2d65 100644
--- a/src/wrapped/generated/wrappedlzmaundefs.h
+++ b/src/wrapped/generated/wrappedlzmaundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedlzmaUNDEFS_H_
 #define __wrappedlzmaUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedmpg123defs.h b/src/wrapped/generated/wrappedmpg123defs.h
index d3e048b1..1010106c 100644
--- a/src/wrapped/generated/wrappedmpg123defs.h
+++ b/src/wrapped/generated/wrappedmpg123defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedmpg123DEFS_H_
 #define __wrappedmpg123DEFS_H_
diff --git a/src/wrapped/generated/wrappedmpg123types.h b/src/wrapped/generated/wrappedmpg123types.h
index 3d560740..647ae724 100644
--- a/src/wrapped/generated/wrappedmpg123types.h
+++ b/src/wrapped/generated/wrappedmpg123types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedmpg123TYPES_H_
 #define __wrappedmpg123TYPES_H_
diff --git a/src/wrapped/generated/wrappedmpg123undefs.h b/src/wrapped/generated/wrappedmpg123undefs.h
index e67e108e..1a11a6a9 100644
--- a/src/wrapped/generated/wrappedmpg123undefs.h
+++ b/src/wrapped/generated/wrappedmpg123undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedmpg123UNDEFS_H_
 #define __wrappedmpg123UNDEFS_H_
diff --git a/src/wrapped/generated/wrappednotifydefs.h b/src/wrapped/generated/wrappednotifydefs.h
index dfa4fbd8..2835a095 100644
--- a/src/wrapped/generated/wrappednotifydefs.h
+++ b/src/wrapped/generated/wrappednotifydefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednotifyDEFS_H_
 #define __wrappednotifyDEFS_H_
diff --git a/src/wrapped/generated/wrappednotifytypes.h b/src/wrapped/generated/wrappednotifytypes.h
index dec7c56d..c44cad04 100644
--- a/src/wrapped/generated/wrappednotifytypes.h
+++ b/src/wrapped/generated/wrappednotifytypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednotifyTYPES_H_
 #define __wrappednotifyTYPES_H_
diff --git a/src/wrapped/generated/wrappednotifyundefs.h b/src/wrapped/generated/wrappednotifyundefs.h
index 7e4c84e0..c3a891a3 100644
--- a/src/wrapped/generated/wrappednotifyundefs.h
+++ b/src/wrapped/generated/wrappednotifyundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednotifyUNDEFS_H_
 #define __wrappednotifyUNDEFS_H_
diff --git a/src/wrapped/generated/wrappednsldefs.h b/src/wrapped/generated/wrappednsldefs.h
index 9c9d1114..8b86939d 100644
--- a/src/wrapped/generated/wrappednsldefs.h
+++ b/src/wrapped/generated/wrappednsldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednslDEFS_H_
 #define __wrappednslDEFS_H_
diff --git a/src/wrapped/generated/wrappednsltypes.h b/src/wrapped/generated/wrappednsltypes.h
index af6bf15a..b1b68df2 100644
--- a/src/wrapped/generated/wrappednsltypes.h
+++ b/src/wrapped/generated/wrappednsltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednslTYPES_H_
 #define __wrappednslTYPES_H_
diff --git a/src/wrapped/generated/wrappednslundefs.h b/src/wrapped/generated/wrappednslundefs.h
index 6a14c91d..6342bb7d 100644
--- a/src/wrapped/generated/wrappednslundefs.h
+++ b/src/wrapped/generated/wrappednslundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednslUNDEFS_H_
 #define __wrappednslUNDEFS_H_
diff --git a/src/wrapped/generated/wrappednspr4defs.h b/src/wrapped/generated/wrappednspr4defs.h
index 579a78b5..cd26e6fd 100644
--- a/src/wrapped/generated/wrappednspr4defs.h
+++ b/src/wrapped/generated/wrappednspr4defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednspr4DEFS_H_
 #define __wrappednspr4DEFS_H_
diff --git a/src/wrapped/generated/wrappednspr4types.h b/src/wrapped/generated/wrappednspr4types.h
index 821f06b5..f1df2b71 100644
--- a/src/wrapped/generated/wrappednspr4types.h
+++ b/src/wrapped/generated/wrappednspr4types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednspr4TYPES_H_
 #define __wrappednspr4TYPES_H_
diff --git a/src/wrapped/generated/wrappednspr4undefs.h b/src/wrapped/generated/wrappednspr4undefs.h
index f21df381..df4ec187 100644
--- a/src/wrapped/generated/wrappednspr4undefs.h
+++ b/src/wrapped/generated/wrappednspr4undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednspr4UNDEFS_H_
 #define __wrappednspr4UNDEFS_H_
diff --git a/src/wrapped/generated/wrappednss3defs.h b/src/wrapped/generated/wrappednss3defs.h
index 4cf8ad68..babcddd7 100644
--- a/src/wrapped/generated/wrappednss3defs.h
+++ b/src/wrapped/generated/wrappednss3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednss3DEFS_H_
 #define __wrappednss3DEFS_H_
diff --git a/src/wrapped/generated/wrappednss3types.h b/src/wrapped/generated/wrappednss3types.h
index 68cf306b..665f0cc2 100644
--- a/src/wrapped/generated/wrappednss3types.h
+++ b/src/wrapped/generated/wrappednss3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednss3TYPES_H_
 #define __wrappednss3TYPES_H_
diff --git a/src/wrapped/generated/wrappednss3undefs.h b/src/wrapped/generated/wrappednss3undefs.h
index c8bda4af..5023571c 100644
--- a/src/wrapped/generated/wrappednss3undefs.h
+++ b/src/wrapped/generated/wrappednss3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednss3UNDEFS_H_
 #define __wrappednss3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappednssutil3defs.h b/src/wrapped/generated/wrappednssutil3defs.h
index a835becf..686b9361 100644
--- a/src/wrapped/generated/wrappednssutil3defs.h
+++ b/src/wrapped/generated/wrappednssutil3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednssutil3DEFS_H_
 #define __wrappednssutil3DEFS_H_
diff --git a/src/wrapped/generated/wrappednssutil3types.h b/src/wrapped/generated/wrappednssutil3types.h
index a08abb70..33b0cfbe 100644
--- a/src/wrapped/generated/wrappednssutil3types.h
+++ b/src/wrapped/generated/wrappednssutil3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednssutil3TYPES_H_
 #define __wrappednssutil3TYPES_H_
diff --git a/src/wrapped/generated/wrappednssutil3undefs.h b/src/wrapped/generated/wrappednssutil3undefs.h
index 3e076f85..2e89d841 100644
--- a/src/wrapped/generated/wrappednssutil3undefs.h
+++ b/src/wrapped/generated/wrappednssutil3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappednssutil3UNDEFS_H_
 #define __wrappednssutil3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedopenaldefs.h b/src/wrapped/generated/wrappedopenaldefs.h
index 525e368e..3f858d81 100644
--- a/src/wrapped/generated/wrappedopenaldefs.h
+++ b/src/wrapped/generated/wrappedopenaldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedopenalDEFS_H_
 #define __wrappedopenalDEFS_H_
diff --git a/src/wrapped/generated/wrappedopenaltypes.h b/src/wrapped/generated/wrappedopenaltypes.h
index f9304598..82fd5958 100644
--- a/src/wrapped/generated/wrappedopenaltypes.h
+++ b/src/wrapped/generated/wrappedopenaltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedopenalTYPES_H_
 #define __wrappedopenalTYPES_H_
diff --git a/src/wrapped/generated/wrappedopenalundefs.h b/src/wrapped/generated/wrappedopenalundefs.h
index da8e12fa..b07c369c 100644
--- a/src/wrapped/generated/wrappedopenalundefs.h
+++ b/src/wrapped/generated/wrappedopenalundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedopenalUNDEFS_H_
 #define __wrappedopenalUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpangocairodefs.h b/src/wrapped/generated/wrappedpangocairodefs.h
index 01404dea..6889b738 100644
--- a/src/wrapped/generated/wrappedpangocairodefs.h
+++ b/src/wrapped/generated/wrappedpangocairodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangocairoDEFS_H_
 #define __wrappedpangocairoDEFS_H_
diff --git a/src/wrapped/generated/wrappedpangocairotypes.h b/src/wrapped/generated/wrappedpangocairotypes.h
index 5402f4e4..0d75a472 100644
--- a/src/wrapped/generated/wrappedpangocairotypes.h
+++ b/src/wrapped/generated/wrappedpangocairotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangocairoTYPES_H_
 #define __wrappedpangocairoTYPES_H_
diff --git a/src/wrapped/generated/wrappedpangocairoundefs.h b/src/wrapped/generated/wrappedpangocairoundefs.h
index 3bbc6771..ac194a05 100644
--- a/src/wrapped/generated/wrappedpangocairoundefs.h
+++ b/src/wrapped/generated/wrappedpangocairoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangocairoUNDEFS_H_
 #define __wrappedpangocairoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpangodefs.h b/src/wrapped/generated/wrappedpangodefs.h
index 5d52cf3b..c0d40d2e 100644
--- a/src/wrapped/generated/wrappedpangodefs.h
+++ b/src/wrapped/generated/wrappedpangodefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoDEFS_H_
 #define __wrappedpangoDEFS_H_
diff --git a/src/wrapped/generated/wrappedpangoft2defs.h b/src/wrapped/generated/wrappedpangoft2defs.h
index 380f00a7..28aeda1f 100644
--- a/src/wrapped/generated/wrappedpangoft2defs.h
+++ b/src/wrapped/generated/wrappedpangoft2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoft2DEFS_H_
 #define __wrappedpangoft2DEFS_H_
diff --git a/src/wrapped/generated/wrappedpangoft2types.h b/src/wrapped/generated/wrappedpangoft2types.h
index 1bceb024..99bdd9ef 100644
--- a/src/wrapped/generated/wrappedpangoft2types.h
+++ b/src/wrapped/generated/wrappedpangoft2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoft2TYPES_H_
 #define __wrappedpangoft2TYPES_H_
diff --git a/src/wrapped/generated/wrappedpangoft2undefs.h b/src/wrapped/generated/wrappedpangoft2undefs.h
index 33398df2..f05c5b15 100644
--- a/src/wrapped/generated/wrappedpangoft2undefs.h
+++ b/src/wrapped/generated/wrappedpangoft2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoft2UNDEFS_H_
 #define __wrappedpangoft2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpangotypes.h b/src/wrapped/generated/wrappedpangotypes.h
index 71065885..fc50a486 100644
--- a/src/wrapped/generated/wrappedpangotypes.h
+++ b/src/wrapped/generated/wrappedpangotypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoTYPES_H_
 #define __wrappedpangoTYPES_H_
diff --git a/src/wrapped/generated/wrappedpangoundefs.h b/src/wrapped/generated/wrappedpangoundefs.h
index 37f84815..a25d907f 100644
--- a/src/wrapped/generated/wrappedpangoundefs.h
+++ b/src/wrapped/generated/wrappedpangoundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpangoUNDEFS_H_
 #define __wrappedpangoUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedplc4defs.h b/src/wrapped/generated/wrappedplc4defs.h
index aa279879..e1a7c9c6 100644
--- a/src/wrapped/generated/wrappedplc4defs.h
+++ b/src/wrapped/generated/wrappedplc4defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplc4DEFS_H_
 #define __wrappedplc4DEFS_H_
diff --git a/src/wrapped/generated/wrappedplc4types.h b/src/wrapped/generated/wrappedplc4types.h
index 06f7382c..c9bd1362 100644
--- a/src/wrapped/generated/wrappedplc4types.h
+++ b/src/wrapped/generated/wrappedplc4types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplc4TYPES_H_
 #define __wrappedplc4TYPES_H_
diff --git a/src/wrapped/generated/wrappedplc4undefs.h b/src/wrapped/generated/wrappedplc4undefs.h
index fff2663c..237c8627 100644
--- a/src/wrapped/generated/wrappedplc4undefs.h
+++ b/src/wrapped/generated/wrappedplc4undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplc4UNDEFS_H_
 #define __wrappedplc4UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedplds4defs.h b/src/wrapped/generated/wrappedplds4defs.h
index 92f008d3..a21627e7 100644
--- a/src/wrapped/generated/wrappedplds4defs.h
+++ b/src/wrapped/generated/wrappedplds4defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplds4DEFS_H_
 #define __wrappedplds4DEFS_H_
diff --git a/src/wrapped/generated/wrappedplds4types.h b/src/wrapped/generated/wrappedplds4types.h
index 00370f62..4632bfb0 100644
--- a/src/wrapped/generated/wrappedplds4types.h
+++ b/src/wrapped/generated/wrappedplds4types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplds4TYPES_H_
 #define __wrappedplds4TYPES_H_
diff --git a/src/wrapped/generated/wrappedplds4undefs.h b/src/wrapped/generated/wrappedplds4undefs.h
index 02de4706..8575f79b 100644
--- a/src/wrapped/generated/wrappedplds4undefs.h
+++ b/src/wrapped/generated/wrappedplds4undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedplds4UNDEFS_H_
 #define __wrappedplds4UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpng16defs.h b/src/wrapped/generated/wrappedpng16defs.h
index 61811af2..8d8def5d 100644
--- a/src/wrapped/generated/wrappedpng16defs.h
+++ b/src/wrapped/generated/wrappedpng16defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpng16DEFS_H_
 #define __wrappedpng16DEFS_H_
diff --git a/src/wrapped/generated/wrappedpng16types.h b/src/wrapped/generated/wrappedpng16types.h
index 32aaec85..4ffeb67a 100644
--- a/src/wrapped/generated/wrappedpng16types.h
+++ b/src/wrapped/generated/wrappedpng16types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpng16TYPES_H_
 #define __wrappedpng16TYPES_H_
diff --git a/src/wrapped/generated/wrappedpng16undefs.h b/src/wrapped/generated/wrappedpng16undefs.h
index 9c3e3ff7..2a5307d2 100644
--- a/src/wrapped/generated/wrappedpng16undefs.h
+++ b/src/wrapped/generated/wrappedpng16undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpng16UNDEFS_H_
 #define __wrappedpng16UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpulsedefs.h b/src/wrapped/generated/wrappedpulsedefs.h
index 20969d83..9871becf 100644
--- a/src/wrapped/generated/wrappedpulsedefs.h
+++ b/src/wrapped/generated/wrappedpulsedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulseDEFS_H_
 #define __wrappedpulseDEFS_H_
diff --git a/src/wrapped/generated/wrappedpulsesimpledefs.h b/src/wrapped/generated/wrappedpulsesimpledefs.h
index a2b91418..2829278d 100644
--- a/src/wrapped/generated/wrappedpulsesimpledefs.h
+++ b/src/wrapped/generated/wrappedpulsesimpledefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulsesimpleDEFS_H_
 #define __wrappedpulsesimpleDEFS_H_
diff --git a/src/wrapped/generated/wrappedpulsesimpletypes.h b/src/wrapped/generated/wrappedpulsesimpletypes.h
index 1397bb50..97a2b492 100644
--- a/src/wrapped/generated/wrappedpulsesimpletypes.h
+++ b/src/wrapped/generated/wrappedpulsesimpletypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulsesimpleTYPES_H_
 #define __wrappedpulsesimpleTYPES_H_
diff --git a/src/wrapped/generated/wrappedpulsesimpleundefs.h b/src/wrapped/generated/wrappedpulsesimpleundefs.h
index 89a47abc..3a7e8271 100644
--- a/src/wrapped/generated/wrappedpulsesimpleundefs.h
+++ b/src/wrapped/generated/wrappedpulsesimpleundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulsesimpleUNDEFS_H_
 #define __wrappedpulsesimpleUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedpulsetypes.h b/src/wrapped/generated/wrappedpulsetypes.h
index f260a91d..a24120dc 100644
--- a/src/wrapped/generated/wrappedpulsetypes.h
+++ b/src/wrapped/generated/wrappedpulsetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulseTYPES_H_
 #define __wrappedpulseTYPES_H_
diff --git a/src/wrapped/generated/wrappedpulseundefs.h b/src/wrapped/generated/wrappedpulseundefs.h
index cbd71377..ae1b3000 100644
--- a/src/wrapped/generated/wrappedpulseundefs.h
+++ b/src/wrapped/generated/wrappedpulseundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedpulseUNDEFS_H_
 #define __wrappedpulseUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1defs.h b/src/wrapped/generated/wrappedsdl1defs.h
index b057928c..fdc74ada 100644
--- a/src/wrapped/generated/wrappedsdl1defs.h
+++ b/src/wrapped/generated/wrappedsdl1defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1DEFS_H_
 #define __wrappedsdl1DEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1imagedefs.h b/src/wrapped/generated/wrappedsdl1imagedefs.h
index d532fa62..1cd4bb7c 100644
--- a/src/wrapped/generated/wrappedsdl1imagedefs.h
+++ b/src/wrapped/generated/wrappedsdl1imagedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1imageDEFS_H_
 #define __wrappedsdl1imageDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1imagetypes.h b/src/wrapped/generated/wrappedsdl1imagetypes.h
index 9c973a2b..533e2092 100644
--- a/src/wrapped/generated/wrappedsdl1imagetypes.h
+++ b/src/wrapped/generated/wrappedsdl1imagetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1imageTYPES_H_
 #define __wrappedsdl1imageTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1imageundefs.h b/src/wrapped/generated/wrappedsdl1imageundefs.h
index 5052e28e..b3b39790 100644
--- a/src/wrapped/generated/wrappedsdl1imageundefs.h
+++ b/src/wrapped/generated/wrappedsdl1imageundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1imageUNDEFS_H_
 #define __wrappedsdl1imageUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1mixerdefs.h b/src/wrapped/generated/wrappedsdl1mixerdefs.h
index 526fb869..eb854ec8 100644
--- a/src/wrapped/generated/wrappedsdl1mixerdefs.h
+++ b/src/wrapped/generated/wrappedsdl1mixerdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1mixerDEFS_H_
 #define __wrappedsdl1mixerDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1mixertypes.h b/src/wrapped/generated/wrappedsdl1mixertypes.h
index 09535f61..d02a2f1a 100644
--- a/src/wrapped/generated/wrappedsdl1mixertypes.h
+++ b/src/wrapped/generated/wrappedsdl1mixertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1mixerTYPES_H_
 #define __wrappedsdl1mixerTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1mixerundefs.h b/src/wrapped/generated/wrappedsdl1mixerundefs.h
index 1e57174b..9bf2f36f 100644
--- a/src/wrapped/generated/wrappedsdl1mixerundefs.h
+++ b/src/wrapped/generated/wrappedsdl1mixerundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1mixerUNDEFS_H_
 #define __wrappedsdl1mixerUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1netdefs.h b/src/wrapped/generated/wrappedsdl1netdefs.h
index b2760ba1..fa4c1430 100644
--- a/src/wrapped/generated/wrappedsdl1netdefs.h
+++ b/src/wrapped/generated/wrappedsdl1netdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1netDEFS_H_
 #define __wrappedsdl1netDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1nettypes.h b/src/wrapped/generated/wrappedsdl1nettypes.h
index a5549989..c96b1486 100644
--- a/src/wrapped/generated/wrappedsdl1nettypes.h
+++ b/src/wrapped/generated/wrappedsdl1nettypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1netTYPES_H_
 #define __wrappedsdl1netTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1netundefs.h b/src/wrapped/generated/wrappedsdl1netundefs.h
index 383c180b..732ff0a8 100644
--- a/src/wrapped/generated/wrappedsdl1netundefs.h
+++ b/src/wrapped/generated/wrappedsdl1netundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1netUNDEFS_H_
 #define __wrappedsdl1netUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1sounddefs.h b/src/wrapped/generated/wrappedsdl1sounddefs.h
index 6ebf8218..618fd9b6 100644
--- a/src/wrapped/generated/wrappedsdl1sounddefs.h
+++ b/src/wrapped/generated/wrappedsdl1sounddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1soundDEFS_H_
 #define __wrappedsdl1soundDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1soundtypes.h b/src/wrapped/generated/wrappedsdl1soundtypes.h
index c60c6f0f..dc5ad357 100644
--- a/src/wrapped/generated/wrappedsdl1soundtypes.h
+++ b/src/wrapped/generated/wrappedsdl1soundtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1soundTYPES_H_
 #define __wrappedsdl1soundTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1soundundefs.h b/src/wrapped/generated/wrappedsdl1soundundefs.h
index 15a300d6..e7fe29a4 100644
--- a/src/wrapped/generated/wrappedsdl1soundundefs.h
+++ b/src/wrapped/generated/wrappedsdl1soundundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1soundUNDEFS_H_
 #define __wrappedsdl1soundUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1ttfdefs.h b/src/wrapped/generated/wrappedsdl1ttfdefs.h
index 48749da1..6bd5057c 100644
--- a/src/wrapped/generated/wrappedsdl1ttfdefs.h
+++ b/src/wrapped/generated/wrappedsdl1ttfdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1ttfDEFS_H_
 #define __wrappedsdl1ttfDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1ttftypes.h b/src/wrapped/generated/wrappedsdl1ttftypes.h
index a63be208..2400dbe4 100644
--- a/src/wrapped/generated/wrappedsdl1ttftypes.h
+++ b/src/wrapped/generated/wrappedsdl1ttftypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1ttfTYPES_H_
 #define __wrappedsdl1ttfTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1ttfundefs.h b/src/wrapped/generated/wrappedsdl1ttfundefs.h
index 6e57e12e..40c86781 100644
--- a/src/wrapped/generated/wrappedsdl1ttfundefs.h
+++ b/src/wrapped/generated/wrappedsdl1ttfundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1ttfUNDEFS_H_
 #define __wrappedsdl1ttfUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl1types.h b/src/wrapped/generated/wrappedsdl1types.h
index 7d5f6e3b..447e9ea4 100644
--- a/src/wrapped/generated/wrappedsdl1types.h
+++ b/src/wrapped/generated/wrappedsdl1types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1TYPES_H_
 #define __wrappedsdl1TYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl1undefs.h b/src/wrapped/generated/wrappedsdl1undefs.h
index 8fc24676..c646f3de 100644
--- a/src/wrapped/generated/wrappedsdl1undefs.h
+++ b/src/wrapped/generated/wrappedsdl1undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl1UNDEFS_H_
 #define __wrappedsdl1UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2defs.h b/src/wrapped/generated/wrappedsdl2defs.h
index 15b561be..c055edd7 100644
--- a/src/wrapped/generated/wrappedsdl2defs.h
+++ b/src/wrapped/generated/wrappedsdl2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2DEFS_H_
 #define __wrappedsdl2DEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2imagedefs.h b/src/wrapped/generated/wrappedsdl2imagedefs.h
index 58be586a..130fc080 100644
--- a/src/wrapped/generated/wrappedsdl2imagedefs.h
+++ b/src/wrapped/generated/wrappedsdl2imagedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2imageDEFS_H_
 #define __wrappedsdl2imageDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2imagetypes.h b/src/wrapped/generated/wrappedsdl2imagetypes.h
index 09ea454a..e7b72aff 100644
--- a/src/wrapped/generated/wrappedsdl2imagetypes.h
+++ b/src/wrapped/generated/wrappedsdl2imagetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2imageTYPES_H_
 #define __wrappedsdl2imageTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl2imageundefs.h b/src/wrapped/generated/wrappedsdl2imageundefs.h
index 11b0da8f..1abfded3 100644
--- a/src/wrapped/generated/wrappedsdl2imageundefs.h
+++ b/src/wrapped/generated/wrappedsdl2imageundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2imageUNDEFS_H_
 #define __wrappedsdl2imageUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2mixerdefs.h b/src/wrapped/generated/wrappedsdl2mixerdefs.h
index 51ba9561..c9621dbc 100644
--- a/src/wrapped/generated/wrappedsdl2mixerdefs.h
+++ b/src/wrapped/generated/wrappedsdl2mixerdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2mixerDEFS_H_
 #define __wrappedsdl2mixerDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2mixertypes.h b/src/wrapped/generated/wrappedsdl2mixertypes.h
index 9360d791..a411d86e 100644
--- a/src/wrapped/generated/wrappedsdl2mixertypes.h
+++ b/src/wrapped/generated/wrappedsdl2mixertypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2mixerTYPES_H_
 #define __wrappedsdl2mixerTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl2mixerundefs.h b/src/wrapped/generated/wrappedsdl2mixerundefs.h
index 81e1fe10..1077cd04 100644
--- a/src/wrapped/generated/wrappedsdl2mixerundefs.h
+++ b/src/wrapped/generated/wrappedsdl2mixerundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2mixerUNDEFS_H_
 #define __wrappedsdl2mixerUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2netdefs.h b/src/wrapped/generated/wrappedsdl2netdefs.h
index 20d2eb67..0b3c7cae 100644
--- a/src/wrapped/generated/wrappedsdl2netdefs.h
+++ b/src/wrapped/generated/wrappedsdl2netdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2netDEFS_H_
 #define __wrappedsdl2netDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2nettypes.h b/src/wrapped/generated/wrappedsdl2nettypes.h
index 225e34d7..883810b2 100644
--- a/src/wrapped/generated/wrappedsdl2nettypes.h
+++ b/src/wrapped/generated/wrappedsdl2nettypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2netTYPES_H_
 #define __wrappedsdl2netTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl2netundefs.h b/src/wrapped/generated/wrappedsdl2netundefs.h
index acb432c5..4c58c27b 100644
--- a/src/wrapped/generated/wrappedsdl2netundefs.h
+++ b/src/wrapped/generated/wrappedsdl2netundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2netUNDEFS_H_
 #define __wrappedsdl2netUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2ttfdefs.h b/src/wrapped/generated/wrappedsdl2ttfdefs.h
index 5922368f..f4a9707b 100644
--- a/src/wrapped/generated/wrappedsdl2ttfdefs.h
+++ b/src/wrapped/generated/wrappedsdl2ttfdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2ttfDEFS_H_
 #define __wrappedsdl2ttfDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2ttftypes.h b/src/wrapped/generated/wrappedsdl2ttftypes.h
index 3fcc4f8a..dd5d1ee9 100644
--- a/src/wrapped/generated/wrappedsdl2ttftypes.h
+++ b/src/wrapped/generated/wrappedsdl2ttftypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2ttfTYPES_H_
 #define __wrappedsdl2ttfTYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl2ttfundefs.h b/src/wrapped/generated/wrappedsdl2ttfundefs.h
index 520e8f70..d904d0ba 100644
--- a/src/wrapped/generated/wrappedsdl2ttfundefs.h
+++ b/src/wrapped/generated/wrappedsdl2ttfundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2ttfUNDEFS_H_
 #define __wrappedsdl2ttfUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsdl2types.h b/src/wrapped/generated/wrappedsdl2types.h
index 9b120983..efdc055b 100644
--- a/src/wrapped/generated/wrappedsdl2types.h
+++ b/src/wrapped/generated/wrappedsdl2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2TYPES_H_
 #define __wrappedsdl2TYPES_H_
diff --git a/src/wrapped/generated/wrappedsdl2undefs.h b/src/wrapped/generated/wrappedsdl2undefs.h
index 34e94daf..2ca63484 100644
--- a/src/wrapped/generated/wrappedsdl2undefs.h
+++ b/src/wrapped/generated/wrappedsdl2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsdl2UNDEFS_H_
 #define __wrappedsdl2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsecret1defs.h b/src/wrapped/generated/wrappedsecret1defs.h
index 31e5404d..aa50e8a1 100644
--- a/src/wrapped/generated/wrappedsecret1defs.h
+++ b/src/wrapped/generated/wrappedsecret1defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsecret1DEFS_H_
 #define __wrappedsecret1DEFS_H_
diff --git a/src/wrapped/generated/wrappedsecret1types.h b/src/wrapped/generated/wrappedsecret1types.h
index ef76399d..3fce0222 100644
--- a/src/wrapped/generated/wrappedsecret1types.h
+++ b/src/wrapped/generated/wrappedsecret1types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsecret1TYPES_H_
 #define __wrappedsecret1TYPES_H_
diff --git a/src/wrapped/generated/wrappedsecret1undefs.h b/src/wrapped/generated/wrappedsecret1undefs.h
index 795a0927..8fa910a2 100644
--- a/src/wrapped/generated/wrappedsecret1undefs.h
+++ b/src/wrapped/generated/wrappedsecret1undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsecret1UNDEFS_H_
 #define __wrappedsecret1UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedselinuxdefs.h b/src/wrapped/generated/wrappedselinuxdefs.h
index 8c048159..7e443cc2 100644
--- a/src/wrapped/generated/wrappedselinuxdefs.h
+++ b/src/wrapped/generated/wrappedselinuxdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedselinuxDEFS_H_
 #define __wrappedselinuxDEFS_H_
diff --git a/src/wrapped/generated/wrappedselinuxtypes.h b/src/wrapped/generated/wrappedselinuxtypes.h
index 5e6aa376..734f4949 100644
--- a/src/wrapped/generated/wrappedselinuxtypes.h
+++ b/src/wrapped/generated/wrappedselinuxtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedselinuxTYPES_H_
 #define __wrappedselinuxTYPES_H_
diff --git a/src/wrapped/generated/wrappedselinuxundefs.h b/src/wrapped/generated/wrappedselinuxundefs.h
index 3e21b645..826d2b86 100644
--- a/src/wrapped/generated/wrappedselinuxundefs.h
+++ b/src/wrapped/generated/wrappedselinuxundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedselinuxUNDEFS_H_
 #define __wrappedselinuxUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsmime3defs.h b/src/wrapped/generated/wrappedsmime3defs.h
index 4956dc80..92d7c9d4 100644
--- a/src/wrapped/generated/wrappedsmime3defs.h
+++ b/src/wrapped/generated/wrappedsmime3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmime3DEFS_H_
 #define __wrappedsmime3DEFS_H_
diff --git a/src/wrapped/generated/wrappedsmime3types.h b/src/wrapped/generated/wrappedsmime3types.h
index bd52a266..b1a82c3c 100644
--- a/src/wrapped/generated/wrappedsmime3types.h
+++ b/src/wrapped/generated/wrappedsmime3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmime3TYPES_H_
 #define __wrappedsmime3TYPES_H_
diff --git a/src/wrapped/generated/wrappedsmime3undefs.h b/src/wrapped/generated/wrappedsmime3undefs.h
index d2e45000..b83b45e5 100644
--- a/src/wrapped/generated/wrappedsmime3undefs.h
+++ b/src/wrapped/generated/wrappedsmime3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmime3UNDEFS_H_
 #define __wrappedsmime3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsmpeg2defs.h b/src/wrapped/generated/wrappedsmpeg2defs.h
index b710c9e7..2fbf24cd 100644
--- a/src/wrapped/generated/wrappedsmpeg2defs.h
+++ b/src/wrapped/generated/wrappedsmpeg2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpeg2DEFS_H_
 #define __wrappedsmpeg2DEFS_H_
diff --git a/src/wrapped/generated/wrappedsmpeg2types.h b/src/wrapped/generated/wrappedsmpeg2types.h
index eb2905dd..8e3e683e 100644
--- a/src/wrapped/generated/wrappedsmpeg2types.h
+++ b/src/wrapped/generated/wrappedsmpeg2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpeg2TYPES_H_
 #define __wrappedsmpeg2TYPES_H_
diff --git a/src/wrapped/generated/wrappedsmpeg2undefs.h b/src/wrapped/generated/wrappedsmpeg2undefs.h
index cbe83980..e759a2db 100644
--- a/src/wrapped/generated/wrappedsmpeg2undefs.h
+++ b/src/wrapped/generated/wrappedsmpeg2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpeg2UNDEFS_H_
 #define __wrappedsmpeg2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsmpegdefs.h b/src/wrapped/generated/wrappedsmpegdefs.h
index 332c6566..2c29a30a 100644
--- a/src/wrapped/generated/wrappedsmpegdefs.h
+++ b/src/wrapped/generated/wrappedsmpegdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpegDEFS_H_
 #define __wrappedsmpegDEFS_H_
diff --git a/src/wrapped/generated/wrappedsmpegtypes.h b/src/wrapped/generated/wrappedsmpegtypes.h
index 4857a962..d043287a 100644
--- a/src/wrapped/generated/wrappedsmpegtypes.h
+++ b/src/wrapped/generated/wrappedsmpegtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpegTYPES_H_
 #define __wrappedsmpegTYPES_H_
diff --git a/src/wrapped/generated/wrappedsmpegundefs.h b/src/wrapped/generated/wrappedsmpegundefs.h
index 745f559b..acd26ce5 100644
--- a/src/wrapped/generated/wrappedsmpegundefs.h
+++ b/src/wrapped/generated/wrappedsmpegundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsmpegUNDEFS_H_
 #define __wrappedsmpegUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedsoftokn3defs.h b/src/wrapped/generated/wrappedsoftokn3defs.h
index 41002cc7..6227d43a 100644
--- a/src/wrapped/generated/wrappedsoftokn3defs.h
+++ b/src/wrapped/generated/wrappedsoftokn3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsoftokn3DEFS_H_
 #define __wrappedsoftokn3DEFS_H_
diff --git a/src/wrapped/generated/wrappedsoftokn3types.h b/src/wrapped/generated/wrappedsoftokn3types.h
index ed075f46..16b6efb2 100644
--- a/src/wrapped/generated/wrappedsoftokn3types.h
+++ b/src/wrapped/generated/wrappedsoftokn3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsoftokn3TYPES_H_
 #define __wrappedsoftokn3TYPES_H_
diff --git a/src/wrapped/generated/wrappedsoftokn3undefs.h b/src/wrapped/generated/wrappedsoftokn3undefs.h
index b58a2a39..56250624 100644
--- a/src/wrapped/generated/wrappedsoftokn3undefs.h
+++ b/src/wrapped/generated/wrappedsoftokn3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedsoftokn3UNDEFS_H_
 #define __wrappedsoftokn3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedssl3defs.h b/src/wrapped/generated/wrappedssl3defs.h
index 8216a17f..e267611f 100644
--- a/src/wrapped/generated/wrappedssl3defs.h
+++ b/src/wrapped/generated/wrappedssl3defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedssl3DEFS_H_
 #define __wrappedssl3DEFS_H_
diff --git a/src/wrapped/generated/wrappedssl3types.h b/src/wrapped/generated/wrappedssl3types.h
index 36d2f19f..397c4c6b 100644
--- a/src/wrapped/generated/wrappedssl3types.h
+++ b/src/wrapped/generated/wrappedssl3types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedssl3TYPES_H_
 #define __wrappedssl3TYPES_H_
diff --git a/src/wrapped/generated/wrappedssl3undefs.h b/src/wrapped/generated/wrappedssl3undefs.h
index 6097bdf3..961a0491 100644
--- a/src/wrapped/generated/wrappedssl3undefs.h
+++ b/src/wrapped/generated/wrappedssl3undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedssl3UNDEFS_H_
 #define __wrappedssl3UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbbinddefs.h b/src/wrapped/generated/wrappedtbbbinddefs.h
index 68313639..cab9ecfc 100644
--- a/src/wrapped/generated/wrappedtbbbinddefs.h
+++ b/src/wrapped/generated/wrappedtbbbinddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbbindDEFS_H_
 #define __wrappedtbbbindDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbbindtypes.h b/src/wrapped/generated/wrappedtbbbindtypes.h
index fddbb6c5..0ba646af 100644
--- a/src/wrapped/generated/wrappedtbbbindtypes.h
+++ b/src/wrapped/generated/wrappedtbbbindtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbbindTYPES_H_
 #define __wrappedtbbbindTYPES_H_
diff --git a/src/wrapped/generated/wrappedtbbbindundefs.h b/src/wrapped/generated/wrappedtbbbindundefs.h
index d92da691..5c0a98f5 100644
--- a/src/wrapped/generated/wrappedtbbbindundefs.h
+++ b/src/wrapped/generated/wrappedtbbbindundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbbindUNDEFS_H_
 #define __wrappedtbbbindUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbmallocdefs.h b/src/wrapped/generated/wrappedtbbmallocdefs.h
index 66107c5b..f2c8cdb1 100644
--- a/src/wrapped/generated/wrappedtbbmallocdefs.h
+++ b/src/wrapped/generated/wrappedtbbmallocdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocDEFS_H_
 #define __wrappedtbbmallocDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbmallocproxydefs.h b/src/wrapped/generated/wrappedtbbmallocproxydefs.h
index 36ccfc6d..ebf3d7b4 100644
--- a/src/wrapped/generated/wrappedtbbmallocproxydefs.h
+++ b/src/wrapped/generated/wrappedtbbmallocproxydefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocproxyDEFS_H_
 #define __wrappedtbbmallocproxyDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbmallocproxytypes.h b/src/wrapped/generated/wrappedtbbmallocproxytypes.h
index 6d9eb5a0..f073210a 100644
--- a/src/wrapped/generated/wrappedtbbmallocproxytypes.h
+++ b/src/wrapped/generated/wrappedtbbmallocproxytypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocproxyTYPES_H_
 #define __wrappedtbbmallocproxyTYPES_H_
diff --git a/src/wrapped/generated/wrappedtbbmallocproxyundefs.h b/src/wrapped/generated/wrappedtbbmallocproxyundefs.h
index 21aeb872..fd918bd3 100644
--- a/src/wrapped/generated/wrappedtbbmallocproxyundefs.h
+++ b/src/wrapped/generated/wrappedtbbmallocproxyundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocproxyUNDEFS_H_
 #define __wrappedtbbmallocproxyUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedtbbmalloctypes.h b/src/wrapped/generated/wrappedtbbmalloctypes.h
index 8e4a3a96..990bff1e 100644
--- a/src/wrapped/generated/wrappedtbbmalloctypes.h
+++ b/src/wrapped/generated/wrappedtbbmalloctypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocTYPES_H_
 #define __wrappedtbbmallocTYPES_H_
diff --git a/src/wrapped/generated/wrappedtbbmallocundefs.h b/src/wrapped/generated/wrappedtbbmallocundefs.h
index 99607226..107b5d1c 100644
--- a/src/wrapped/generated/wrappedtbbmallocundefs.h
+++ b/src/wrapped/generated/wrappedtbbmallocundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtbbmallocUNDEFS_H_
 #define __wrappedtbbmallocUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedtcmallocminimaldefs.h b/src/wrapped/generated/wrappedtcmallocminimaldefs.h
index c292791b..3761435e 100644
--- a/src/wrapped/generated/wrappedtcmallocminimaldefs.h
+++ b/src/wrapped/generated/wrappedtcmallocminimaldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtcmallocminimalDEFS_H_
 #define __wrappedtcmallocminimalDEFS_H_
diff --git a/src/wrapped/generated/wrappedtcmallocminimaltypes.h b/src/wrapped/generated/wrappedtcmallocminimaltypes.h
index 0a6d537d..88049970 100644
--- a/src/wrapped/generated/wrappedtcmallocminimaltypes.h
+++ b/src/wrapped/generated/wrappedtcmallocminimaltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtcmallocminimalTYPES_H_
 #define __wrappedtcmallocminimalTYPES_H_
diff --git a/src/wrapped/generated/wrappedtcmallocminimalundefs.h b/src/wrapped/generated/wrappedtcmallocminimalundefs.h
index bbffd60d..24f7091b 100644
--- a/src/wrapped/generated/wrappedtcmallocminimalundefs.h
+++ b/src/wrapped/generated/wrappedtcmallocminimalundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedtcmallocminimalUNDEFS_H_
 #define __wrappedtcmallocminimalUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedudev0defs.h b/src/wrapped/generated/wrappedudev0defs.h
index 10e7efb3..6c71537c 100644
--- a/src/wrapped/generated/wrappedudev0defs.h
+++ b/src/wrapped/generated/wrappedudev0defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev0DEFS_H_
 #define __wrappedudev0DEFS_H_
diff --git a/src/wrapped/generated/wrappedudev0types.h b/src/wrapped/generated/wrappedudev0types.h
index 7673cd70..74d5ebe7 100644
--- a/src/wrapped/generated/wrappedudev0types.h
+++ b/src/wrapped/generated/wrappedudev0types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev0TYPES_H_
 #define __wrappedudev0TYPES_H_
diff --git a/src/wrapped/generated/wrappedudev0undefs.h b/src/wrapped/generated/wrappedudev0undefs.h
index e4c659e6..7c52dd4d 100644
--- a/src/wrapped/generated/wrappedudev0undefs.h
+++ b/src/wrapped/generated/wrappedudev0undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev0UNDEFS_H_
 #define __wrappedudev0UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedudev1defs.h b/src/wrapped/generated/wrappedudev1defs.h
index 7232b08b..178a7bfe 100644
--- a/src/wrapped/generated/wrappedudev1defs.h
+++ b/src/wrapped/generated/wrappedudev1defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev1DEFS_H_
 #define __wrappedudev1DEFS_H_
diff --git a/src/wrapped/generated/wrappedudev1types.h b/src/wrapped/generated/wrappedudev1types.h
index c7113d9c..d5d41fda 100644
--- a/src/wrapped/generated/wrappedudev1types.h
+++ b/src/wrapped/generated/wrappedudev1types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev1TYPES_H_
 #define __wrappedudev1TYPES_H_
diff --git a/src/wrapped/generated/wrappedudev1undefs.h b/src/wrapped/generated/wrappedudev1undefs.h
index f8f1e8a6..d92a2c2d 100644
--- a/src/wrapped/generated/wrappedudev1undefs.h
+++ b/src/wrapped/generated/wrappedudev1undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedudev1UNDEFS_H_
 #define __wrappedudev1UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedunwinddefs.h b/src/wrapped/generated/wrappedunwinddefs.h
index 276d3135..d7e0db0d 100644
--- a/src/wrapped/generated/wrappedunwinddefs.h
+++ b/src/wrapped/generated/wrappedunwinddefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedunwindDEFS_H_
 #define __wrappedunwindDEFS_H_
diff --git a/src/wrapped/generated/wrappedunwindtypes.h b/src/wrapped/generated/wrappedunwindtypes.h
index fce6101f..612b0e21 100644
--- a/src/wrapped/generated/wrappedunwindtypes.h
+++ b/src/wrapped/generated/wrappedunwindtypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedunwindTYPES_H_
 #define __wrappedunwindTYPES_H_
diff --git a/src/wrapped/generated/wrappedunwindundefs.h b/src/wrapped/generated/wrappedunwindundefs.h
index 0f6577d2..4b4a6e1f 100644
--- a/src/wrapped/generated/wrappedunwindundefs.h
+++ b/src/wrapped/generated/wrappedunwindundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedunwindUNDEFS_H_
 #define __wrappedunwindUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedutildefs.h b/src/wrapped/generated/wrappedutildefs.h
index 8de0f7e0..861a0625 100644
--- a/src/wrapped/generated/wrappedutildefs.h
+++ b/src/wrapped/generated/wrappedutildefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedutilDEFS_H_
 #define __wrappedutilDEFS_H_
diff --git a/src/wrapped/generated/wrappedutiltypes.h b/src/wrapped/generated/wrappedutiltypes.h
index 46928736..41502beb 100644
--- a/src/wrapped/generated/wrappedutiltypes.h
+++ b/src/wrapped/generated/wrappedutiltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedutilTYPES_H_
 #define __wrappedutilTYPES_H_
diff --git a/src/wrapped/generated/wrappedutilundefs.h b/src/wrapped/generated/wrappedutilundefs.h
index 38dfed5a..72ddbcee 100644
--- a/src/wrapped/generated/wrappedutilundefs.h
+++ b/src/wrapped/generated/wrappedutilundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedutilUNDEFS_H_
 #define __wrappedutilUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedvorbisfiledefs.h b/src/wrapped/generated/wrappedvorbisfiledefs.h
index 02f75b6e..bff87036 100644
--- a/src/wrapped/generated/wrappedvorbisfiledefs.h
+++ b/src/wrapped/generated/wrappedvorbisfiledefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvorbisfileDEFS_H_
 #define __wrappedvorbisfileDEFS_H_
diff --git a/src/wrapped/generated/wrappedvorbisfiletypes.h b/src/wrapped/generated/wrappedvorbisfiletypes.h
index 1ae49be7..9f2354cc 100644
--- a/src/wrapped/generated/wrappedvorbisfiletypes.h
+++ b/src/wrapped/generated/wrappedvorbisfiletypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvorbisfileTYPES_H_
 #define __wrappedvorbisfileTYPES_H_
diff --git a/src/wrapped/generated/wrappedvorbisfileundefs.h b/src/wrapped/generated/wrappedvorbisfileundefs.h
index 34eb2061..6eec569f 100644
--- a/src/wrapped/generated/wrappedvorbisfileundefs.h
+++ b/src/wrapped/generated/wrappedvorbisfileundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvorbisfileUNDEFS_H_
 #define __wrappedvorbisfileUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedvulkandefs.h b/src/wrapped/generated/wrappedvulkandefs.h
index e0bc55e2..868303ca 100644
--- a/src/wrapped/generated/wrappedvulkandefs.h
+++ b/src/wrapped/generated/wrappedvulkandefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvulkanDEFS_H_
 #define __wrappedvulkanDEFS_H_
diff --git a/src/wrapped/generated/wrappedvulkantypes.h b/src/wrapped/generated/wrappedvulkantypes.h
index 5431cbe2..41b18752 100644
--- a/src/wrapped/generated/wrappedvulkantypes.h
+++ b/src/wrapped/generated/wrappedvulkantypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvulkanTYPES_H_
 #define __wrappedvulkanTYPES_H_
diff --git a/src/wrapped/generated/wrappedvulkanundefs.h b/src/wrapped/generated/wrappedvulkanundefs.h
index 69f770bd..9383f239 100644
--- a/src/wrapped/generated/wrappedvulkanundefs.h
+++ b/src/wrapped/generated/wrappedvulkanundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedvulkanUNDEFS_H_
 #define __wrappedvulkanUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandclientdefs.h b/src/wrapped/generated/wrappedwaylandclientdefs.h
index 7d581341..4bc32b5d 100644
--- a/src/wrapped/generated/wrappedwaylandclientdefs.h
+++ b/src/wrapped/generated/wrappedwaylandclientdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandclientDEFS_H_
 #define __wrappedwaylandclientDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandclienttypes.h b/src/wrapped/generated/wrappedwaylandclienttypes.h
index 45524611..1ae5078b 100644
--- a/src/wrapped/generated/wrappedwaylandclienttypes.h
+++ b/src/wrapped/generated/wrappedwaylandclienttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandclientTYPES_H_
 #define __wrappedwaylandclientTYPES_H_
diff --git a/src/wrapped/generated/wrappedwaylandclientundefs.h b/src/wrapped/generated/wrappedwaylandclientundefs.h
index 4bee48c9..4b55d457 100644
--- a/src/wrapped/generated/wrappedwaylandclientundefs.h
+++ b/src/wrapped/generated/wrappedwaylandclientundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandclientUNDEFS_H_
 #define __wrappedwaylandclientUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandcursordefs.h b/src/wrapped/generated/wrappedwaylandcursordefs.h
index 9dd5b1ff..7992556b 100644
--- a/src/wrapped/generated/wrappedwaylandcursordefs.h
+++ b/src/wrapped/generated/wrappedwaylandcursordefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandcursorDEFS_H_
 #define __wrappedwaylandcursorDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandcursortypes.h b/src/wrapped/generated/wrappedwaylandcursortypes.h
index d45e67b2..5da6dc2d 100644
--- a/src/wrapped/generated/wrappedwaylandcursortypes.h
+++ b/src/wrapped/generated/wrappedwaylandcursortypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandcursorTYPES_H_
 #define __wrappedwaylandcursorTYPES_H_
diff --git a/src/wrapped/generated/wrappedwaylandcursorundefs.h b/src/wrapped/generated/wrappedwaylandcursorundefs.h
index 1afa8344..e3d8cfb9 100644
--- a/src/wrapped/generated/wrappedwaylandcursorundefs.h
+++ b/src/wrapped/generated/wrappedwaylandcursorundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandcursorUNDEFS_H_
 #define __wrappedwaylandcursorUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandegldefs.h b/src/wrapped/generated/wrappedwaylandegldefs.h
index 9126638c..075f1984 100644
--- a/src/wrapped/generated/wrappedwaylandegldefs.h
+++ b/src/wrapped/generated/wrappedwaylandegldefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandeglDEFS_H_
 #define __wrappedwaylandeglDEFS_H_
diff --git a/src/wrapped/generated/wrappedwaylandegltypes.h b/src/wrapped/generated/wrappedwaylandegltypes.h
index eca8a4f4..de1f9a83 100644
--- a/src/wrapped/generated/wrappedwaylandegltypes.h
+++ b/src/wrapped/generated/wrappedwaylandegltypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandeglTYPES_H_
 #define __wrappedwaylandeglTYPES_H_
diff --git a/src/wrapped/generated/wrappedwaylandeglundefs.h b/src/wrapped/generated/wrappedwaylandeglundefs.h
index bf0a0f39..c06d0d2f 100644
--- a/src/wrapped/generated/wrappedwaylandeglundefs.h
+++ b/src/wrapped/generated/wrappedwaylandeglundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedwaylandeglUNDEFS_H_
 #define __wrappedwaylandeglUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxineramadefs.h b/src/wrapped/generated/wrappedxineramadefs.h
index eff7c01a..c491e411 100644
--- a/src/wrapped/generated/wrappedxineramadefs.h
+++ b/src/wrapped/generated/wrappedxineramadefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxineramaDEFS_H_
 #define __wrappedxineramaDEFS_H_
diff --git a/src/wrapped/generated/wrappedxineramatypes.h b/src/wrapped/generated/wrappedxineramatypes.h
index aa9664f9..cc1b29f4 100644
--- a/src/wrapped/generated/wrappedxineramatypes.h
+++ b/src/wrapped/generated/wrappedxineramatypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxineramaTYPES_H_
 #define __wrappedxineramaTYPES_H_
diff --git a/src/wrapped/generated/wrappedxineramaundefs.h b/src/wrapped/generated/wrappedxineramaundefs.h
index f8ad30eb..9800e58d 100644
--- a/src/wrapped/generated/wrappedxineramaundefs.h
+++ b/src/wrapped/generated/wrappedxineramaundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxineramaUNDEFS_H_
 #define __wrappedxineramaUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxkbcommondefs.h b/src/wrapped/generated/wrappedxkbcommondefs.h
index e1fca776..cdcefc50 100644
--- a/src/wrapped/generated/wrappedxkbcommondefs.h
+++ b/src/wrapped/generated/wrappedxkbcommondefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonDEFS_H_
 #define __wrappedxkbcommonDEFS_H_
diff --git a/src/wrapped/generated/wrappedxkbcommontypes.h b/src/wrapped/generated/wrappedxkbcommontypes.h
index 5fde591a..3e23f596 100644
--- a/src/wrapped/generated/wrappedxkbcommontypes.h
+++ b/src/wrapped/generated/wrappedxkbcommontypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonTYPES_H_
 #define __wrappedxkbcommonTYPES_H_
diff --git a/src/wrapped/generated/wrappedxkbcommonundefs.h b/src/wrapped/generated/wrappedxkbcommonundefs.h
index 0a15a202..91f5b67e 100644
--- a/src/wrapped/generated/wrappedxkbcommonundefs.h
+++ b/src/wrapped/generated/wrappedxkbcommonundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonUNDEFS_H_
 #define __wrappedxkbcommonUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxkbcommonx11defs.h b/src/wrapped/generated/wrappedxkbcommonx11defs.h
index e19b2bf7..3ea78f83 100644
--- a/src/wrapped/generated/wrappedxkbcommonx11defs.h
+++ b/src/wrapped/generated/wrappedxkbcommonx11defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonx11DEFS_H_
 #define __wrappedxkbcommonx11DEFS_H_
diff --git a/src/wrapped/generated/wrappedxkbcommonx11types.h b/src/wrapped/generated/wrappedxkbcommonx11types.h
index 49e12e1f..db20d0b6 100644
--- a/src/wrapped/generated/wrappedxkbcommonx11types.h
+++ b/src/wrapped/generated/wrappedxkbcommonx11types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonx11TYPES_H_
 #define __wrappedxkbcommonx11TYPES_H_
diff --git a/src/wrapped/generated/wrappedxkbcommonx11undefs.h b/src/wrapped/generated/wrappedxkbcommonx11undefs.h
index 28bd4357..3175142d 100644
--- a/src/wrapped/generated/wrappedxkbcommonx11undefs.h
+++ b/src/wrapped/generated/wrappedxkbcommonx11undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxkbcommonx11UNDEFS_H_
 #define __wrappedxkbcommonx11UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxml2defs.h b/src/wrapped/generated/wrappedxml2defs.h
index 433c7dcd..056acc2f 100644
--- a/src/wrapped/generated/wrappedxml2defs.h
+++ b/src/wrapped/generated/wrappedxml2defs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxml2DEFS_H_
 #define __wrappedxml2DEFS_H_
diff --git a/src/wrapped/generated/wrappedxml2types.h b/src/wrapped/generated/wrappedxml2types.h
index b39a1161..5dfabefb 100644
--- a/src/wrapped/generated/wrappedxml2types.h
+++ b/src/wrapped/generated/wrappedxml2types.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxml2TYPES_H_
 #define __wrappedxml2TYPES_H_
diff --git a/src/wrapped/generated/wrappedxml2undefs.h b/src/wrapped/generated/wrappedxml2undefs.h
index 7a7f7824..bdc063fe 100644
--- a/src/wrapped/generated/wrappedxml2undefs.h
+++ b/src/wrapped/generated/wrappedxml2undefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxml2UNDEFS_H_
 #define __wrappedxml2UNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxshmfencedefs.h b/src/wrapped/generated/wrappedxshmfencedefs.h
index c15c43af..9c096e8c 100644
--- a/src/wrapped/generated/wrappedxshmfencedefs.h
+++ b/src/wrapped/generated/wrappedxshmfencedefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxshmfenceDEFS_H_
 #define __wrappedxshmfenceDEFS_H_
diff --git a/src/wrapped/generated/wrappedxshmfencetypes.h b/src/wrapped/generated/wrappedxshmfencetypes.h
index 1efa0a96..4ce0133c 100644
--- a/src/wrapped/generated/wrappedxshmfencetypes.h
+++ b/src/wrapped/generated/wrappedxshmfencetypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxshmfenceTYPES_H_
 #define __wrappedxshmfenceTYPES_H_
diff --git a/src/wrapped/generated/wrappedxshmfenceundefs.h b/src/wrapped/generated/wrappedxshmfenceundefs.h
index 886fad9e..6378ce06 100644
--- a/src/wrapped/generated/wrappedxshmfenceundefs.h
+++ b/src/wrapped/generated/wrappedxshmfenceundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxshmfenceUNDEFS_H_
 #define __wrappedxshmfenceUNDEFS_H_
diff --git a/src/wrapped/generated/wrappedxsltdefs.h b/src/wrapped/generated/wrappedxsltdefs.h
index 7c49b3c3..b3ddf570 100644
--- a/src/wrapped/generated/wrappedxsltdefs.h
+++ b/src/wrapped/generated/wrappedxsltdefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxsltDEFS_H_
 #define __wrappedxsltDEFS_H_
diff --git a/src/wrapped/generated/wrappedxslttypes.h b/src/wrapped/generated/wrappedxslttypes.h
index 83337e16..4446efa9 100644
--- a/src/wrapped/generated/wrappedxslttypes.h
+++ b/src/wrapped/generated/wrappedxslttypes.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxsltTYPES_H_
 #define __wrappedxsltTYPES_H_
diff --git a/src/wrapped/generated/wrappedxsltundefs.h b/src/wrapped/generated/wrappedxsltundefs.h
index 169227af..1ab7297c 100644
--- a/src/wrapped/generated/wrappedxsltundefs.h
+++ b/src/wrapped/generated/wrappedxsltundefs.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __wrappedxsltUNDEFS_H_
 #define __wrappedxsltUNDEFS_H_
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 129dc37a..8852b3cf 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #include <stdio.h>
 #include <stdlib.h>
@@ -72,6 +72,7 @@ typedef int32_t (*iFL_t)(uintptr_t);
 typedef int32_t (*iFp_t)(void*);
 typedef int32_t (*iFO_t)(int32_t);
 typedef int32_t (*iFS_t)(void*);
+typedef int32_t (*iFP_t)(void*);
 typedef int64_t (*IFv_t)(void);
 typedef int64_t (*IFi_t)(int32_t);
 typedef int64_t (*IFI_t)(int64_t);
@@ -194,6 +195,7 @@ typedef void (*vFpL_t)(void*, uintptr_t);
 typedef void (*vFpp_t)(void*, void*);
 typedef void (*vFpS_t)(void*, void*);
 typedef void (*vFSi_t)(void*, int32_t);
+typedef int8_t (*cFpi_t)(void*, int32_t);
 typedef int8_t (*cFpp_t)(void*, void*);
 typedef int16_t (*wFpi_t)(void*, int32_t);
 typedef int32_t (*iFEi_t)(x64emu_t*, int32_t);
@@ -253,6 +255,7 @@ typedef uint32_t (*uFEp_t)(x64emu_t*, void*);
 typedef uint32_t (*uFii_t)(int32_t, int32_t);
 typedef uint32_t (*uFiu_t)(int32_t, uint32_t);
 typedef uint32_t (*uFip_t)(int32_t, void*);
+typedef uint32_t (*uFui_t)(uint32_t, int32_t);
 typedef uint32_t (*uFuu_t)(uint32_t, uint32_t);
 typedef uint32_t (*uFup_t)(uint32_t, void*);
 typedef uint32_t (*uFpw_t)(void*, int16_t);
@@ -267,6 +270,7 @@ typedef uint32_t (*uFpp_t)(void*, void*);
 typedef uint64_t (*UFEp_t)(x64emu_t*, void*);
 typedef uint64_t (*UFuu_t)(uint32_t, uint32_t);
 typedef uint64_t (*UFpi_t)(void*, int32_t);
+typedef uint64_t (*UFpU_t)(void*, uint64_t);
 typedef uint64_t (*UFpp_t)(void*, void*);
 typedef float (*fFEp_t)(x64emu_t*, void*);
 typedef float (*fFif_t)(int32_t, float);
@@ -274,6 +278,7 @@ typedef float (*fFfi_t)(float, int32_t);
 typedef float (*fFff_t)(float, float);
 typedef float (*fFfD_t)(float, long double);
 typedef float (*fFfp_t)(float, void*);
+typedef float (*fFpu_t)(void*, uint32_t);
 typedef float (*fFpp_t)(void*, void*);
 typedef double (*dFid_t)(int32_t, double);
 typedef double (*dFdi_t)(double, int32_t);
@@ -315,7 +320,6 @@ typedef void* (*pFiI_t)(int32_t, int64_t);
 typedef void* (*pFiu_t)(int32_t, uint32_t);
 typedef void* (*pFip_t)(int32_t, void*);
 typedef void* (*pFiV_t)(int32_t, void*);
-typedef void* (*pFII_t)(int64_t, int64_t);
 typedef void* (*pFui_t)(uint32_t, int32_t);
 typedef void* (*pFuu_t)(uint32_t, uint32_t);
 typedef void* (*pFup_t)(uint32_t, void*);
@@ -323,6 +327,8 @@ typedef void* (*pFUU_t)(uint64_t, uint64_t);
 typedef void* (*pFdi_t)(double, int32_t);
 typedef void* (*pFdd_t)(double, double);
 typedef void* (*pFli_t)(intptr_t, int32_t);
+typedef void* (*pFll_t)(intptr_t, intptr_t);
+typedef void* (*pFlp_t)(intptr_t, void*);
 typedef void* (*pFLi_t)(uintptr_t, int32_t);
 typedef void* (*pFLC_t)(uintptr_t, uint8_t);
 typedef void* (*pFLu_t)(uintptr_t, uint32_t);
@@ -438,6 +444,7 @@ typedef void (*vFpUp_t)(void*, uint64_t, void*);
 typedef void (*vFpff_t)(void*, float, float);
 typedef void (*vFpdu_t)(void*, double, uint32_t);
 typedef void (*vFpdd_t)(void*, double, double);
+typedef void (*vFpdp_t)(void*, double, void*);
 typedef void (*vFpll_t)(void*, intptr_t, intptr_t);
 typedef void (*vFplp_t)(void*, intptr_t, void*);
 typedef void (*vFpLi_t)(void*, uintptr_t, int32_t);
@@ -452,6 +459,7 @@ typedef void (*vFppd_t)(void*, void*, double);
 typedef void (*vFppl_t)(void*, void*, intptr_t);
 typedef void (*vFppL_t)(void*, void*, uintptr_t);
 typedef void (*vFppp_t)(void*, void*, void*);
+typedef int8_t (*cFpdp_t)(void*, double, void*);
 typedef int16_t (*wFppp_t)(void*, void*, void*);
 typedef int32_t (*iFEiw_t)(x64emu_t*, int32_t, int16_t);
 typedef int32_t (*iFEip_t)(x64emu_t*, int32_t, void*);
@@ -491,6 +499,7 @@ typedef int32_t (*iFipO_t)(int32_t, void*, int32_t);
 typedef int32_t (*iFCuW_t)(uint8_t, uint32_t, uint16_t);
 typedef int32_t (*iFuwp_t)(uint32_t, int16_t, void*);
 typedef int32_t (*iFuip_t)(uint32_t, int32_t, void*);
+typedef int32_t (*iFuWp_t)(uint32_t, uint16_t, void*);
 typedef int32_t (*iFuui_t)(uint32_t, uint32_t, int32_t);
 typedef int32_t (*iFuuu_t)(uint32_t, uint32_t, uint32_t);
 typedef int32_t (*iFuup_t)(uint32_t, uint32_t, void*);
@@ -586,6 +595,7 @@ typedef uint32_t (*uFpuu_t)(void*, uint32_t, uint32_t);
 typedef uint32_t (*uFpuL_t)(void*, uint32_t, uintptr_t);
 typedef uint32_t (*uFpup_t)(void*, uint32_t, void*);
 typedef uint32_t (*uFpfu_t)(void*, float, uint32_t);
+typedef uint32_t (*uFpli_t)(void*, intptr_t, int32_t);
 typedef uint32_t (*uFpLu_t)(void*, uintptr_t, uint32_t);
 typedef uint32_t (*uFpLL_t)(void*, uintptr_t, uintptr_t);
 typedef uint32_t (*uFpLp_t)(void*, uintptr_t, void*);
@@ -604,6 +614,7 @@ typedef float (*fFppp_t)(void*, void*, void*);
 typedef double (*dFuud_t)(uint32_t, uint32_t, double);
 typedef double (*dFddd_t)(double, double, double);
 typedef double (*dFddp_t)(double, double, void*);
+typedef double (*dFpii_t)(void*, int32_t, int32_t);
 typedef double (*dFpdd_t)(void*, double, double);
 typedef double (*dFppi_t)(void*, void*, int32_t);
 typedef double (*dFppu_t)(void*, void*, uint32_t);
@@ -670,6 +681,7 @@ typedef void* (*pFuup_t)(uint32_t, uint32_t, void*);
 typedef void* (*pFulu_t)(uint32_t, intptr_t, uint32_t);
 typedef void* (*pFulp_t)(uint32_t, intptr_t, void*);
 typedef void* (*pFupi_t)(uint32_t, void*, int32_t);
+typedef void* (*pFupu_t)(uint32_t, void*, uint32_t);
 typedef void* (*pFupl_t)(uint32_t, void*, intptr_t);
 typedef void* (*pFupL_t)(uint32_t, void*, uintptr_t);
 typedef void* (*pFupp_t)(uint32_t, void*, void*);
@@ -681,6 +693,7 @@ typedef void* (*pFlpi_t)(intptr_t, void*, int32_t);
 typedef void* (*pFLup_t)(uintptr_t, uint32_t, void*);
 typedef void* (*pFLLp_t)(uintptr_t, uintptr_t, void*);
 typedef void* (*pFLpi_t)(uintptr_t, void*, int32_t);
+typedef void* (*pFLpp_t)(uintptr_t, void*, void*);
 typedef void* (*pFpii_t)(void*, int32_t, int32_t);
 typedef void* (*pFpiu_t)(void*, int32_t, uint32_t);
 typedef void* (*pFpid_t)(void*, int32_t, double);
@@ -690,6 +703,7 @@ typedef void* (*pFpip_t)(void*, int32_t, void*);
 typedef void* (*pFpCi_t)(void*, uint8_t, int32_t);
 typedef void* (*pFpCC_t)(void*, uint8_t, uint8_t);
 typedef void* (*pFpCu_t)(void*, uint8_t, uint32_t);
+typedef void* (*pFpWi_t)(void*, uint16_t, int32_t);
 typedef void* (*pFpWW_t)(void*, uint16_t, uint16_t);
 typedef void* (*pFpWp_t)(void*, uint16_t, void*);
 typedef void* (*pFpui_t)(void*, uint32_t, int32_t);
@@ -826,6 +840,7 @@ typedef void (*vFLuui_t)(uintptr_t, uint32_t, uint32_t, int32_t);
 typedef void (*vFLppi_t)(uintptr_t, void*, void*, int32_t);
 typedef void (*vFpiii_t)(void*, int32_t, int32_t, int32_t);
 typedef void (*vFpiiu_t)(void*, int32_t, int32_t, uint32_t);
+typedef void (*vFpiid_t)(void*, int32_t, int32_t, double);
 typedef void (*vFpiip_t)(void*, int32_t, int32_t, void*);
 typedef void (*vFpiui_t)(void*, int32_t, uint32_t, int32_t);
 typedef void (*vFpiuu_t)(void*, int32_t, uint32_t, uint32_t);
@@ -889,10 +904,12 @@ typedef void (*vFpppd_t)(void*, void*, void*, double);
 typedef void (*vFpppl_t)(void*, void*, void*, intptr_t);
 typedef void (*vFpppL_t)(void*, void*, void*, uintptr_t);
 typedef void (*vFpppp_t)(void*, void*, void*, void*);
+typedef int8_t (*cFpipp_t)(void*, int32_t, void*, void*);
 typedef int32_t (*iFEiip_t)(x64emu_t*, int32_t, int32_t, void*);
 typedef int32_t (*iFEiiN_t)(x64emu_t*, int32_t, int32_t, ...);
 typedef int32_t (*iFEipp_t)(x64emu_t*, int32_t, void*, void*);
 typedef int32_t (*iFEipV_t)(x64emu_t*, int32_t, void*, void*);
+typedef int32_t (*iFEipA_t)(x64emu_t*, int32_t, void*, void*);
 typedef int32_t (*iFEupu_t)(x64emu_t*, uint32_t, void*, uint32_t);
 typedef int32_t (*iFEupp_t)(x64emu_t*, uint32_t, void*, void*);
 typedef int32_t (*iFEpii_t)(x64emu_t*, void*, int32_t, int32_t);
@@ -930,6 +947,7 @@ typedef int32_t (*iFilli_t)(int32_t, intptr_t, intptr_t, int32_t);
 typedef int32_t (*iFillu_t)(int32_t, intptr_t, intptr_t, uint32_t);
 typedef int32_t (*iFipii_t)(int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iFipip_t)(int32_t, void*, int32_t, void*);
+typedef int32_t (*iFipWp_t)(int32_t, void*, uint16_t, void*);
 typedef int32_t (*iFipui_t)(int32_t, void*, uint32_t, int32_t);
 typedef int32_t (*iFipuL_t)(int32_t, void*, uint32_t, uintptr_t);
 typedef int32_t (*iFipup_t)(int32_t, void*, uint32_t, void*);
@@ -937,18 +955,21 @@ typedef int32_t (*iFipLi_t)(int32_t, void*, uintptr_t, int32_t);
 typedef int32_t (*iFipLu_t)(int32_t, void*, uintptr_t, uint32_t);
 typedef int32_t (*iFipLp_t)(int32_t, void*, uintptr_t, void*);
 typedef int32_t (*iFippi_t)(int32_t, void*, void*, int32_t);
-typedef int32_t (*iFippu_t)(int32_t, void*, void*, uint32_t);
 typedef int32_t (*iFippL_t)(int32_t, void*, void*, uintptr_t);
 typedef int32_t (*iFippp_t)(int32_t, void*, void*, void*);
 typedef int32_t (*iFipON_t)(int32_t, void*, int32_t, ...);
 typedef int32_t (*iFuiup_t)(uint32_t, int32_t, uint32_t, void*);
 typedef int32_t (*iFuipp_t)(uint32_t, int32_t, void*, void*);
+typedef int32_t (*iFuWWp_t)(uint32_t, uint16_t, uint16_t, void*);
 typedef int32_t (*iFuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t);
 typedef int32_t (*iFuupi_t)(uint32_t, uint32_t, void*, int32_t);
+typedef int32_t (*iFuupp_t)(uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFupLp_t)(uint32_t, void*, uintptr_t, void*);
 typedef int32_t (*iFuppi_t)(uint32_t, void*, void*, int32_t);
+typedef int32_t (*iFuppu_t)(uint32_t, void*, void*, uint32_t);
 typedef int32_t (*iFuppp_t)(uint32_t, void*, void*, void*);
 typedef int32_t (*iFLLiW_t)(uintptr_t, uintptr_t, int32_t, uint16_t);
+typedef int32_t (*iFLppp_t)(uintptr_t, void*, void*, void*);
 typedef int32_t (*iFpwww_t)(void*, int16_t, int16_t, int16_t);
 typedef int32_t (*iFpwpp_t)(void*, int16_t, void*, void*);
 typedef int32_t (*iFpiii_t)(void*, int32_t, int32_t, int32_t);
@@ -995,6 +1016,7 @@ typedef int32_t (*iFpUup_t)(void*, uint64_t, uint32_t, void*);
 typedef int32_t (*iFpUUU_t)(void*, uint64_t, uint64_t, uint64_t);
 typedef int32_t (*iFpULp_t)(void*, uint64_t, uintptr_t, void*);
 typedef int32_t (*iFpUpp_t)(void*, uint64_t, void*, void*);
+typedef int32_t (*iFpdip_t)(void*, double, int32_t, void*);
 typedef int32_t (*iFplii_t)(void*, intptr_t, int32_t, int32_t);
 typedef int32_t (*iFplip_t)(void*, intptr_t, int32_t, void*);
 typedef int32_t (*iFplpi_t)(void*, intptr_t, void*, int32_t);
@@ -1050,6 +1072,7 @@ typedef int64_t (*IFSIii_t)(void*, int64_t, int32_t, int32_t);
 typedef uint8_t (*CFuuff_t)(uint32_t, uint32_t, float, float);
 typedef uint8_t (*CFpiii_t)(void*, int32_t, int32_t, int32_t);
 typedef uint8_t (*CFpupp_t)(void*, uint32_t, void*, void*);
+typedef uint8_t (*CFpLLi_t)(void*, uintptr_t, uintptr_t, int32_t);
 typedef uint8_t (*CFppip_t)(void*, void*, int32_t, void*);
 typedef uint32_t (*uFEipp_t)(x64emu_t*, int32_t, void*, void*);
 typedef uint32_t (*uFEupp_t)(x64emu_t*, uint32_t, void*, void*);
@@ -1070,6 +1093,7 @@ typedef uint32_t (*uFpupu_t)(void*, uint32_t, void*, uint32_t);
 typedef uint32_t (*uFpupp_t)(void*, uint32_t, void*, void*);
 typedef uint32_t (*uFppiu_t)(void*, void*, int32_t, uint32_t);
 typedef uint32_t (*uFppip_t)(void*, void*, int32_t, void*);
+typedef uint32_t (*uFppuu_t)(void*, void*, uint32_t, uint32_t);
 typedef uint32_t (*uFpplp_t)(void*, void*, intptr_t, void*);
 typedef uint32_t (*uFppLp_t)(void*, void*, uintptr_t, void*);
 typedef uint32_t (*uFpppi_t)(void*, void*, void*, int32_t);
@@ -1137,13 +1161,13 @@ typedef void* (*pFiiuu_t)(int32_t, int32_t, uint32_t, uint32_t);
 typedef void* (*pFiiup_t)(int32_t, int32_t, uint32_t, void*);
 typedef void* (*pFiiLp_t)(int32_t, int32_t, uintptr_t, void*);
 typedef void* (*pFiipi_t)(int32_t, int32_t, void*, int32_t);
-typedef void* (*pFiipp_t)(int32_t, int32_t, void*, void*);
 typedef void* (*pFiIIi_t)(int32_t, int64_t, int64_t, int32_t);
 typedef void* (*pFillu_t)(int32_t, intptr_t, intptr_t, uint32_t);
 typedef void* (*pFipii_t)(int32_t, void*, int32_t, int32_t);
 typedef void* (*pFipip_t)(int32_t, void*, int32_t, void*);
 typedef void* (*pFippi_t)(int32_t, void*, void*, int32_t);
 typedef void* (*pFippu_t)(int32_t, void*, void*, uint32_t);
+typedef void* (*pFippp_t)(int32_t, void*, void*, void*);
 typedef void* (*pFuuii_t)(uint32_t, uint32_t, int32_t, int32_t);
 typedef void* (*pFuuip_t)(uint32_t, uint32_t, int32_t, void*);
 typedef void* (*pFuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t);
@@ -1156,6 +1180,9 @@ typedef void* (*pFdddd_t)(double, double, double, double);
 typedef void* (*pFDipp_t)(long double, int32_t, void*, void*);
 typedef void* (*pFlfff_t)(intptr_t, float, float, float);
 typedef void* (*pFLiip_t)(uintptr_t, int32_t, int32_t, void*);
+typedef void* (*pFLLup_t)(uintptr_t, uintptr_t, uint32_t, void*);
+typedef void* (*pFLLpp_t)(uintptr_t, uintptr_t, void*, void*);
+typedef void* (*pFLppp_t)(uintptr_t, void*, void*, void*);
 typedef void* (*pFpiii_t)(void*, int32_t, int32_t, int32_t);
 typedef void* (*pFpiiu_t)(void*, int32_t, int32_t, uint32_t);
 typedef void* (*pFpiip_t)(void*, int32_t, int32_t, void*);
@@ -1183,8 +1210,10 @@ typedef void* (*pFpupu_t)(void*, uint32_t, void*, uint32_t);
 typedef void* (*pFpupp_t)(void*, uint32_t, void*, void*);
 typedef void* (*pFpdIU_t)(void*, double, int64_t, uint64_t);
 typedef void* (*pFplil_t)(void*, intptr_t, int32_t, intptr_t);
+typedef void* (*pFplip_t)(void*, intptr_t, int32_t, void*);
 typedef void* (*pFplpl_t)(void*, intptr_t, void*, intptr_t);
 typedef void* (*pFplpp_t)(void*, intptr_t, void*, void*);
+typedef void* (*pFpLii_t)(void*, uintptr_t, int32_t, int32_t);
 typedef void* (*pFpLip_t)(void*, uintptr_t, int32_t, void*);
 typedef void* (*pFpLup_t)(void*, uintptr_t, uint32_t, void*);
 typedef void* (*pFpLLp_t)(void*, uintptr_t, uintptr_t, void*);
@@ -1383,6 +1412,7 @@ typedef void (*vFpLpiL_t)(void*, uintptr_t, void*, int32_t, uintptr_t);
 typedef void (*vFppiii_t)(void*, void*, int32_t, int32_t, int32_t);
 typedef void (*vFppiiu_t)(void*, void*, int32_t, int32_t, uint32_t);
 typedef void (*vFppiip_t)(void*, void*, int32_t, int32_t, void*);
+typedef void (*vFppiui_t)(void*, void*, int32_t, uint32_t, int32_t);
 typedef void (*vFppiup_t)(void*, void*, int32_t, uint32_t, void*);
 typedef void (*vFppiff_t)(void*, void*, int32_t, float, float);
 typedef void (*vFppidd_t)(void*, void*, int32_t, double, double);
@@ -1395,6 +1425,7 @@ typedef void (*vFppuuu_t)(void*, void*, uint32_t, uint32_t, uint32_t);
 typedef void (*vFppuup_t)(void*, void*, uint32_t, uint32_t, void*);
 typedef void (*vFppudd_t)(void*, void*, uint32_t, double, double);
 typedef void (*vFppupi_t)(void*, void*, uint32_t, void*, int32_t);
+typedef void (*vFppupu_t)(void*, void*, uint32_t, void*, uint32_t);
 typedef void (*vFppupp_t)(void*, void*, uint32_t, void*, void*);
 typedef void (*vFppfff_t)(void*, void*, float, float, float);
 typedef void (*vFppddp_t)(void*, void*, double, double, void*);
@@ -1404,6 +1435,7 @@ typedef void (*vFpppip_t)(void*, void*, void*, int32_t, void*);
 typedef void (*vFpppui_t)(void*, void*, void*, uint32_t, int32_t);
 typedef void (*vFpppuu_t)(void*, void*, void*, uint32_t, uint32_t);
 typedef void (*vFpppup_t)(void*, void*, void*, uint32_t, void*);
+typedef void (*vFpppff_t)(void*, void*, void*, float, float);
 typedef void (*vFpppdd_t)(void*, void*, void*, double, double);
 typedef void (*vFppppi_t)(void*, void*, void*, void*, int32_t);
 typedef void (*vFppppu_t)(void*, void*, void*, void*, uint32_t);
@@ -1411,6 +1443,7 @@ typedef void (*vFppppL_t)(void*, void*, void*, void*, uintptr_t);
 typedef void (*vFppppp_t)(void*, void*, void*, void*, void*);
 typedef int32_t (*iFEiipp_t)(x64emu_t*, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFEiipV_t)(x64emu_t*, int32_t, int32_t, void*, void*);
+typedef int32_t (*iFEiipA_t)(x64emu_t*, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFEippi_t)(x64emu_t*, int32_t, void*, void*, int32_t);
 typedef int32_t (*iFEippL_t)(x64emu_t*, int32_t, void*, void*, uintptr_t);
 typedef int32_t (*iFEippp_t)(x64emu_t*, int32_t, void*, void*, void*);
@@ -1452,8 +1485,10 @@ typedef int32_t (*iFippLi_t)(int32_t, void*, void*, uintptr_t, int32_t);
 typedef int32_t (*iFippLp_t)(int32_t, void*, void*, uintptr_t, void*);
 typedef int32_t (*iFipppi_t)(int32_t, void*, void*, void*, int32_t);
 typedef int32_t (*iFipppp_t)(int32_t, void*, void*, void*, void*);
+typedef int32_t (*iFuuupp_t)(uint32_t, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFuppLp_t)(uint32_t, void*, void*, uintptr_t, void*);
 typedef int32_t (*iFLppip_t)(uintptr_t, void*, void*, int32_t, void*);
+typedef int32_t (*iFLpppp_t)(uintptr_t, void*, void*, void*, void*);
 typedef int32_t (*iFpwwww_t)(void*, int16_t, int16_t, int16_t, int16_t);
 typedef int32_t (*iFpwppp_t)(void*, int16_t, void*, void*, void*);
 typedef int32_t (*iFpiiii_t)(void*, int32_t, int32_t, int32_t, int32_t);
@@ -1485,11 +1520,14 @@ typedef int32_t (*iFpuuip_t)(void*, uint32_t, uint32_t, int32_t, void*);
 typedef int32_t (*iFpuuui_t)(void*, uint32_t, uint32_t, uint32_t, int32_t);
 typedef int32_t (*iFpuuup_t)(void*, uint32_t, uint32_t, uint32_t, void*);
 typedef int32_t (*iFpuuLL_t)(void*, uint32_t, uint32_t, uintptr_t, uintptr_t);
+typedef int32_t (*iFpuupp_t)(void*, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpulup_t)(void*, uint32_t, intptr_t, uint32_t, void*);
 typedef int32_t (*iFpulpp_t)(void*, uint32_t, intptr_t, void*, void*);
 typedef int32_t (*iFpupiU_t)(void*, uint32_t, void*, int32_t, uint64_t);
+typedef int32_t (*iFpupui_t)(void*, uint32_t, void*, uint32_t, int32_t);
 typedef int32_t (*iFpupuu_t)(void*, uint32_t, void*, uint32_t, uint32_t);
 typedef int32_t (*iFpupup_t)(void*, uint32_t, void*, uint32_t, void*);
+typedef int32_t (*iFpuppL_t)(void*, uint32_t, void*, void*, uintptr_t);
 typedef int32_t (*iFpuppp_t)(void*, uint32_t, void*, void*, void*);
 typedef int32_t (*iFpUiUi_t)(void*, uint64_t, int32_t, uint64_t, int32_t);
 typedef int32_t (*iFpUupp_t)(void*, uint64_t, uint32_t, void*, void*);
@@ -1518,6 +1556,7 @@ typedef int32_t (*iFppiup_t)(void*, void*, int32_t, uint32_t, void*);
 typedef int32_t (*iFppiLi_t)(void*, void*, int32_t, uintptr_t, int32_t);
 typedef int32_t (*iFppiLL_t)(void*, void*, int32_t, uintptr_t, uintptr_t);
 typedef int32_t (*iFppipi_t)(void*, void*, int32_t, void*, int32_t);
+typedef int32_t (*iFppipu_t)(void*, void*, int32_t, void*, uint32_t);
 typedef int32_t (*iFppipp_t)(void*, void*, int32_t, void*, void*);
 typedef int32_t (*iFppuwp_t)(void*, void*, uint32_t, int16_t, void*);
 typedef int32_t (*iFppuip_t)(void*, void*, uint32_t, int32_t, void*);
@@ -1557,9 +1596,11 @@ typedef uint32_t (*uFuiiii_t)(uint32_t, int32_t, int32_t, int32_t, int32_t);
 typedef uint32_t (*uFLpppL_t)(uintptr_t, void*, void*, void*, uintptr_t);
 typedef uint32_t (*uFpCCCC_t)(void*, uint8_t, uint8_t, uint8_t, uint8_t);
 typedef uint32_t (*uFpWuip_t)(void*, uint16_t, uint32_t, int32_t, void*);
+typedef uint32_t (*uFpuuui_t)(void*, uint32_t, uint32_t, uint32_t, int32_t);
 typedef uint32_t (*uFpuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef uint32_t (*uFpuupp_t)(void*, uint32_t, uint32_t, void*, void*);
 typedef uint32_t (*uFpupuu_t)(void*, uint32_t, void*, uint32_t, uint32_t);
+typedef uint32_t (*uFpuppp_t)(void*, uint32_t, void*, void*, void*);
 typedef uint32_t (*uFppipp_t)(void*, void*, int32_t, void*, void*);
 typedef uint32_t (*uFppuup_t)(void*, void*, uint32_t, uint32_t, void*);
 typedef uint32_t (*uFppupp_t)(void*, void*, uint32_t, void*, void*);
@@ -1589,6 +1630,7 @@ typedef uintptr_t (*LFpLpuu_t)(void*, uintptr_t, void*, uint32_t, uint32_t);
 typedef uintptr_t (*LFpLppL_t)(void*, uintptr_t, void*, void*, uintptr_t);
 typedef uintptr_t (*LFpLppp_t)(void*, uintptr_t, void*, void*, void*);
 typedef uintptr_t (*LFppLLp_t)(void*, void*, uintptr_t, uintptr_t, void*);
+typedef uintptr_t (*LFppLpL_t)(void*, void*, uintptr_t, void*, uintptr_t);
 typedef uintptr_t (*LFpppii_t)(void*, void*, void*, int32_t, int32_t);
 typedef uintptr_t (*LFppppp_t)(void*, void*, void*, void*, void*);
 typedef void* (*pFEpiii_t)(x64emu_t*, void*, int32_t, int32_t, int32_t);
@@ -1625,6 +1667,7 @@ typedef void* (*pFpiipp_t)(void*, int32_t, int32_t, void*, void*);
 typedef void* (*pFpiCCC_t)(void*, int32_t, uint8_t, uint8_t, uint8_t);
 typedef void* (*pFpiuuu_t)(void*, int32_t, uint32_t, uint32_t, uint32_t);
 typedef void* (*pFpiupp_t)(void*, int32_t, uint32_t, void*, void*);
+typedef void* (*pFpiLip_t)(void*, int32_t, uintptr_t, int32_t, void*);
 typedef void* (*pFpipip_t)(void*, int32_t, void*, int32_t, void*);
 typedef void* (*pFpipup_t)(void*, int32_t, void*, uint32_t, void*);
 typedef void* (*pFpippi_t)(void*, int32_t, void*, void*, int32_t);
@@ -1639,14 +1682,17 @@ typedef void* (*pFpuuWW_t)(void*, uint32_t, uint32_t, uint16_t, uint16_t);
 typedef void* (*pFpuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef void* (*pFpuuup_t)(void*, uint32_t, uint32_t, uint32_t, void*);
 typedef void* (*pFpupii_t)(void*, uint32_t, void*, int32_t, int32_t);
+typedef void* (*pFpuppu_t)(void*, uint32_t, void*, void*, uint32_t);
 typedef void* (*pFpuppp_t)(void*, uint32_t, void*, void*, void*);
 typedef void* (*pFpUdii_t)(void*, uint64_t, double, int32_t, int32_t);
 typedef void* (*pFpfffi_t)(void*, float, float, float, int32_t);
 typedef void* (*pFpdddd_t)(void*, double, double, double, double);
 typedef void* (*pFplppp_t)(void*, intptr_t, void*, void*, void*);
 typedef void* (*pFpLiii_t)(void*, uintptr_t, int32_t, int32_t, int32_t);
+typedef void* (*pFpLLip_t)(void*, uintptr_t, uintptr_t, int32_t, void*);
 typedef void* (*pFpLLLp_t)(void*, uintptr_t, uintptr_t, uintptr_t, void*);
 typedef void* (*pFpLpii_t)(void*, uintptr_t, void*, int32_t, int32_t);
+typedef void* (*pFpLpip_t)(void*, uintptr_t, void*, int32_t, void*);
 typedef void* (*pFppiii_t)(void*, void*, int32_t, int32_t, int32_t);
 typedef void* (*pFppiiu_t)(void*, void*, int32_t, int32_t, uint32_t);
 typedef void* (*pFppiip_t)(void*, void*, int32_t, int32_t, void*);
@@ -1661,11 +1707,13 @@ typedef void* (*pFppuup_t)(void*, void*, uint32_t, uint32_t, void*);
 typedef void* (*pFppupp_t)(void*, void*, uint32_t, void*, void*);
 typedef void* (*pFppddu_t)(void*, void*, double, double, uint32_t);
 typedef void* (*pFppLii_t)(void*, void*, uintptr_t, int32_t, int32_t);
+typedef void* (*pFppLLi_t)(void*, void*, uintptr_t, uintptr_t, int32_t);
+typedef void* (*pFppLpp_t)(void*, void*, uintptr_t, void*, void*);
 typedef void* (*pFpppii_t)(void*, void*, void*, int32_t, int32_t);
 typedef void* (*pFpppip_t)(void*, void*, void*, int32_t, void*);
-typedef void* (*pFpppIi_t)(void*, void*, void*, int64_t, int32_t);
 typedef void* (*pFpppui_t)(void*, void*, void*, uint32_t, int32_t);
 typedef void* (*pFpppup_t)(void*, void*, void*, uint32_t, void*);
+typedef void* (*pFpppli_t)(void*, void*, void*, intptr_t, int32_t);
 typedef void* (*pFpppLi_t)(void*, void*, void*, uintptr_t, int32_t);
 typedef void* (*pFppppi_t)(void*, void*, void*, void*, int32_t);
 typedef void* (*pFppppu_t)(void*, void*, void*, void*, uint32_t);
@@ -1689,6 +1737,7 @@ typedef void (*vFEiiipp_t)(x64emu_t*, int32_t, int32_t, int32_t, void*, void*);
 typedef void (*vFEpiLpp_t)(x64emu_t*, void*, int32_t, uintptr_t, void*, void*);
 typedef void (*vFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*);
 typedef void (*vFEpuipp_t)(x64emu_t*, void*, uint32_t, int32_t, void*, void*);
+typedef void (*vFEpuipV_t)(x64emu_t*, void*, uint32_t, int32_t, void*, void*);
 typedef void (*vFEpupup_t)(x64emu_t*, void*, uint32_t, void*, uint32_t, void*);
 typedef void (*vFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*);
 typedef void (*vFEpLLpp_t)(x64emu_t*, void*, uintptr_t, uintptr_t, void*, void*);
@@ -1778,11 +1827,14 @@ typedef void (*vFpuiiii_t)(void*, uint32_t, int32_t, int32_t, int32_t, int32_t);
 typedef void (*vFpuiiiu_t)(void*, uint32_t, int32_t, int32_t, int32_t, uint32_t);
 typedef void (*vFpuiipp_t)(void*, uint32_t, int32_t, int32_t, void*, void*);
 typedef void (*vFpuuuiu_t)(void*, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
+typedef void (*vFpuuuup_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void*);
+typedef void (*vFpuuupp_t)(void*, uint32_t, uint32_t, uint32_t, void*, void*);
 typedef void (*vFpuupuu_t)(void*, uint32_t, uint32_t, void*, uint32_t, uint32_t);
 typedef void (*vFpuuppp_t)(void*, uint32_t, uint32_t, void*, void*, void*);
 typedef void (*vFpudddd_t)(void*, uint32_t, double, double, double, double);
 typedef void (*vFpupiUu_t)(void*, uint32_t, void*, int32_t, uint64_t, uint32_t);
 typedef void (*vFpupuuu_t)(void*, uint32_t, void*, uint32_t, uint32_t, uint32_t);
+typedef void (*vFpupupu_t)(void*, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef void (*vFpuppuu_t)(void*, uint32_t, void*, void*, uint32_t, uint32_t);
 typedef void (*vFpupppp_t)(void*, uint32_t, void*, void*, void*, void*);
 typedef void (*vFpUiuup_t)(void*, uint64_t, int32_t, uint32_t, uint32_t, void*);
@@ -1841,11 +1893,13 @@ typedef int32_t (*iFEpippi_t)(x64emu_t*, void*, int32_t, void*, void*, int32_t);
 typedef int32_t (*iFEpIppp_t)(x64emu_t*, void*, int64_t, void*, void*, void*);
 typedef int32_t (*iFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*);
 typedef int32_t (*iFEpUppp_t)(x64emu_t*, void*, uint64_t, void*, void*, void*);
+typedef int32_t (*iFEppppi_t)(x64emu_t*, void*, void*, void*, void*, int32_t);
 typedef int32_t (*iFEppppp_t)(x64emu_t*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFiiiipp_t)(int32_t, int32_t, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFiiiuwp_t)(int32_t, int32_t, int32_t, uint32_t, int16_t, void*);
 typedef int32_t (*iFiWiipi_t)(int32_t, uint16_t, int32_t, int32_t, void*, int32_t);
+typedef int32_t (*iFilpppp_t)(int32_t, intptr_t, void*, void*, void*, void*);
 typedef int32_t (*iFiLpppi_t)(int32_t, uintptr_t, void*, void*, void*, int32_t);
 typedef int32_t (*iFipiipi_t)(int32_t, void*, int32_t, int32_t, void*, int32_t);
 typedef int32_t (*iFipipip_t)(int32_t, void*, int32_t, void*, int32_t, void*);
@@ -1870,17 +1924,23 @@ typedef int32_t (*iFpiCCpu_t)(void*, int32_t, uint8_t, uint8_t, void*, uint32_t)
 typedef int32_t (*iFpiuuup_t)(void*, int32_t, uint32_t, uint32_t, uint32_t, void*);
 typedef int32_t (*iFpiuupp_t)(void*, int32_t, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpipipi_t)(void*, int32_t, void*, int32_t, void*, int32_t);
+typedef int32_t (*iFpipipp_t)(void*, int32_t, void*, int32_t, void*, void*);
 typedef int32_t (*iFpipupp_t)(void*, int32_t, void*, uint32_t, void*, void*);
 typedef int32_t (*iFpippip_t)(void*, int32_t, void*, void*, int32_t, void*);
+typedef int32_t (*iFpippup_t)(void*, int32_t, void*, void*, uint32_t, void*);
 typedef int32_t (*iFpipppL_t)(void*, int32_t, void*, void*, void*, uintptr_t);
 typedef int32_t (*iFpipppp_t)(void*, int32_t, void*, void*, void*, void*);
 typedef int32_t (*iFpCiipp_t)(void*, uint8_t, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFpCpipu_t)(void*, uint8_t, void*, int32_t, void*, uint32_t);
+typedef int32_t (*iFpWipip_t)(void*, uint16_t, int32_t, void*, int32_t, void*);
 typedef int32_t (*iFpWpppp_t)(void*, uint16_t, void*, void*, void*, void*);
 typedef int32_t (*iFpuiCpp_t)(void*, uint32_t, int32_t, uint8_t, void*, void*);
 typedef int32_t (*iFpuippp_t)(void*, uint32_t, int32_t, void*, void*, void*);
 typedef int32_t (*iFpuuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
+typedef int32_t (*iFpuuuup_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void*);
+typedef int32_t (*iFpuuupp_t)(void*, uint32_t, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpuupuu_t)(void*, uint32_t, uint32_t, void*, uint32_t, uint32_t);
+typedef int32_t (*iFpuuppp_t)(void*, uint32_t, uint32_t, void*, void*, void*);
 typedef int32_t (*iFpuLLpp_t)(void*, uint32_t, uintptr_t, uintptr_t, void*, void*);
 typedef int32_t (*iFpupuui_t)(void*, uint32_t, void*, uint32_t, uint32_t, int32_t);
 typedef int32_t (*iFpupLpL_t)(void*, uint32_t, void*, uintptr_t, void*, uintptr_t);
@@ -1889,6 +1949,7 @@ typedef int32_t (*iFpUuuLp_t)(void*, uint64_t, uint32_t, uint32_t, uintptr_t, vo
 typedef int32_t (*iFpUuupp_t)(void*, uint64_t, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpUUUip_t)(void*, uint64_t, uint64_t, uint64_t, int32_t, void*);
 typedef int32_t (*iFpUUUUp_t)(void*, uint64_t, uint64_t, uint64_t, uint64_t, void*);
+typedef int32_t (*iFpdpipp_t)(void*, double, void*, int32_t, void*, void*);
 typedef int32_t (*iFpLiiiL_t)(void*, uintptr_t, int32_t, int32_t, int32_t, uintptr_t);
 typedef int32_t (*iFpLiiip_t)(void*, uintptr_t, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFpLiiuu_t)(void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t);
@@ -1907,9 +1968,11 @@ typedef int32_t (*iFppiiip_t)(void*, void*, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFppiipi_t)(void*, void*, int32_t, int32_t, void*, int32_t);
 typedef int32_t (*iFppiipp_t)(void*, void*, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFppiupp_t)(void*, void*, int32_t, uint32_t, void*, void*);
+typedef int32_t (*iFppilpp_t)(void*, void*, int32_t, intptr_t, void*, void*);
 typedef int32_t (*iFppipii_t)(void*, void*, int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iFppipiL_t)(void*, void*, int32_t, void*, int32_t, uintptr_t);
 typedef int32_t (*iFppipip_t)(void*, void*, int32_t, void*, int32_t, void*);
+typedef int32_t (*iFppippu_t)(void*, void*, int32_t, void*, void*, uint32_t);
 typedef int32_t (*iFppIppp_t)(void*, void*, int64_t, void*, void*, void*);
 typedef int32_t (*iFppuiii_t)(void*, void*, uint32_t, int32_t, int32_t, int32_t);
 typedef int32_t (*iFppuIII_t)(void*, void*, uint32_t, int64_t, int64_t, int64_t);
@@ -1922,12 +1985,15 @@ typedef int32_t (*iFpplppi_t)(void*, void*, intptr_t, void*, void*, int32_t);
 typedef int32_t (*iFppLupp_t)(void*, void*, uintptr_t, uint32_t, void*, void*);
 typedef int32_t (*iFppLLiL_t)(void*, void*, uintptr_t, uintptr_t, int32_t, uintptr_t);
 typedef int32_t (*iFppLLup_t)(void*, void*, uintptr_t, uintptr_t, uint32_t, void*);
+typedef int32_t (*iFppLLpp_t)(void*, void*, uintptr_t, uintptr_t, void*, void*);
 typedef int32_t (*iFppLpLp_t)(void*, void*, uintptr_t, void*, uintptr_t, void*);
 typedef int32_t (*iFppLppp_t)(void*, void*, uintptr_t, void*, void*, void*);
 typedef int32_t (*iFpppiuu_t)(void*, void*, void*, int32_t, uint32_t, uint32_t);
 typedef int32_t (*iFpppipi_t)(void*, void*, void*, int32_t, void*, int32_t);
+typedef int32_t (*iFpppipu_t)(void*, void*, void*, int32_t, void*, uint32_t);
 typedef int32_t (*iFpppipp_t)(void*, void*, void*, int32_t, void*, void*);
 typedef int32_t (*iFpppuii_t)(void*, void*, void*, uint32_t, int32_t, int32_t);
+typedef int32_t (*iFpppuup_t)(void*, void*, void*, uint32_t, uint32_t, void*);
 typedef int32_t (*iFpppupu_t)(void*, void*, void*, uint32_t, void*, uint32_t);
 typedef int32_t (*iFpppupp_t)(void*, void*, void*, uint32_t, void*, void*);
 typedef int32_t (*iFpppLpp_t)(void*, void*, void*, uintptr_t, void*, void*);
@@ -1936,6 +2002,7 @@ typedef int32_t (*iFppppiu_t)(void*, void*, void*, void*, int32_t, uint32_t);
 typedef int32_t (*iFppppip_t)(void*, void*, void*, void*, int32_t, void*);
 typedef int32_t (*iFppppup_t)(void*, void*, void*, void*, uint32_t, void*);
 typedef int32_t (*iFpppppi_t)(void*, void*, void*, void*, void*, int32_t);
+typedef int32_t (*iFpppppL_t)(void*, void*, void*, void*, void*, uintptr_t);
 typedef int32_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFEiippp_t)(x64emu_t*, int32_t, int32_t, void*, void*, void*);
 typedef uint32_t (*uFEiuppp_t)(x64emu_t*, int32_t, uint32_t, void*, void*, void*);
@@ -1950,6 +2017,9 @@ typedef uint32_t (*uFpWuipp_t)(void*, uint16_t, uint32_t, int32_t, void*, void*)
 typedef uint32_t (*uFpWuuCp_t)(void*, uint16_t, uint32_t, uint32_t, uint8_t, void*);
 typedef uint32_t (*uFpuippp_t)(void*, uint32_t, int32_t, void*, void*, void*);
 typedef uint32_t (*uFpuuuup_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void*);
+typedef uint32_t (*uFpuuupp_t)(void*, uint32_t, uint32_t, uint32_t, void*, void*);
+typedef uint32_t (*uFpuuppp_t)(void*, uint32_t, uint32_t, void*, void*, void*);
+typedef uint32_t (*uFpupupu_t)(void*, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef uint32_t (*uFppippp_t)(void*, void*, int32_t, void*, void*, void*);
 typedef uint32_t (*uFppuuup_t)(void*, void*, uint32_t, uint32_t, uint32_t, void*);
 typedef uint32_t (*uFppuupu_t)(void*, void*, uint32_t, uint32_t, void*, uint32_t);
@@ -1972,6 +2042,7 @@ typedef uintptr_t (*LFEppppi_t)(x64emu_t*, void*, void*, void*, void*, int32_t);
 typedef uintptr_t (*LFpipipi_t)(void*, int32_t, void*, int32_t, void*, int32_t);
 typedef uintptr_t (*LFpLippp_t)(void*, uintptr_t, int32_t, void*, void*, void*);
 typedef uintptr_t (*LFpLLLLL_t)(void*, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+typedef uintptr_t (*LFppLLpL_t)(void*, void*, uintptr_t, uintptr_t, void*, uintptr_t);
 typedef uintptr_t (*LFSpLiip_t)(void*, void*, uintptr_t, int32_t, int32_t, void*);
 typedef void* (*pFEpiupp_t)(x64emu_t*, void*, int32_t, uint32_t, void*, void*);
 typedef void* (*pFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*);
@@ -1990,14 +2061,17 @@ typedef void* (*pFiiiiid_t)(int32_t, int32_t, int32_t, int32_t, int32_t, double)
 typedef void* (*pFipippp_t)(int32_t, void*, int32_t, void*, void*, void*);
 typedef void* (*pFWCiWCi_t)(uint16_t, uint8_t, int32_t, uint16_t, uint8_t, int32_t);
 typedef void* (*pFuuipip_t)(uint32_t, uint32_t, int32_t, void*, int32_t, void*);
+typedef void* (*pFuuuiip_t)(uint32_t, uint32_t, uint32_t, int32_t, int32_t, void*);
 typedef void* (*pFuuuuii_t)(uint32_t, uint32_t, uint32_t, uint32_t, int32_t, int32_t);
 typedef void* (*pFuuuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef void* (*pFuuuuup_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void*);
+typedef void* (*pFuuppuu_t)(uint32_t, uint32_t, void*, void*, uint32_t, uint32_t);
 typedef void* (*pFdddddd_t)(double, double, double, double, double, double);
 typedef void* (*pFpiiiiu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32_t);
 typedef void* (*pFpiiipp_t)(void*, int32_t, int32_t, int32_t, void*, void*);
 typedef void* (*pFpiiCCC_t)(void*, int32_t, int32_t, uint8_t, uint8_t, uint8_t);
 typedef void* (*pFpiUUUU_t)(void*, int32_t, uint64_t, uint64_t, uint64_t, uint64_t);
+typedef void* (*pFpipipp_t)(void*, int32_t, void*, int32_t, void*, void*);
 typedef void* (*pFpippip_t)(void*, int32_t, void*, void*, int32_t, void*);
 typedef void* (*pFpipppp_t)(void*, int32_t, void*, void*, void*, void*);
 typedef void* (*pFpCuuCC_t)(void*, uint8_t, uint32_t, uint32_t, uint8_t, uint8_t);
@@ -2008,18 +2082,26 @@ typedef void* (*pFpuuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, uint3
 typedef void* (*pFpuuupu_t)(void*, uint32_t, uint32_t, uint32_t, void*, uint32_t);
 typedef void* (*pFpuuUUU_t)(void*, uint32_t, uint32_t, uint64_t, uint64_t, uint64_t);
 typedef void* (*pFpupuui_t)(void*, uint32_t, void*, uint32_t, uint32_t, int32_t);
+typedef void* (*pFpuppip_t)(void*, uint32_t, void*, void*, int32_t, void*);
 typedef void* (*pFpupppp_t)(void*, uint32_t, void*, void*, void*, void*);
 typedef void* (*pFplpppp_t)(void*, intptr_t, void*, void*, void*, void*);
+typedef void* (*pFpLuLpp_t)(void*, uintptr_t, uint32_t, uintptr_t, void*, void*);
+typedef void* (*pFpLpLLi_t)(void*, uintptr_t, void*, uintptr_t, uintptr_t, int32_t);
 typedef void* (*pFpLppii_t)(void*, uintptr_t, void*, void*, int32_t, int32_t);
+typedef void* (*pFpLppip_t)(void*, uintptr_t, void*, void*, int32_t, void*);
+typedef void* (*pFpLppup_t)(void*, uintptr_t, void*, void*, uint32_t, void*);
 typedef void* (*pFppiiii_t)(void*, void*, int32_t, int32_t, int32_t, int32_t);
 typedef void* (*pFppiipp_t)(void*, void*, int32_t, int32_t, void*, void*);
 typedef void* (*pFppiCCC_t)(void*, void*, int32_t, uint8_t, uint8_t, uint8_t);
 typedef void* (*pFppiupp_t)(void*, void*, int32_t, uint32_t, void*, void*);
+typedef void* (*pFppilpp_t)(void*, void*, int32_t, intptr_t, void*, void*);
 typedef void* (*pFppipip_t)(void*, void*, int32_t, void*, int32_t, void*);
 typedef void* (*pFppippi_t)(void*, void*, int32_t, void*, void*, int32_t);
 typedef void* (*pFppippp_t)(void*, void*, int32_t, void*, void*, void*);
+typedef void* (*pFppuupp_t)(void*, void*, uint32_t, uint32_t, void*, void*);
 typedef void* (*pFppupii_t)(void*, void*, uint32_t, void*, int32_t, int32_t);
 typedef void* (*pFppuppp_t)(void*, void*, uint32_t, void*, void*, void*);
+typedef void* (*pFpplplp_t)(void*, void*, intptr_t, void*, intptr_t, void*);
 typedef void* (*pFpplppp_t)(void*, void*, intptr_t, void*, void*, void*);
 typedef void* (*pFpppiup_t)(void*, void*, void*, int32_t, uint32_t, void*);
 typedef void* (*pFpppupp_t)(void*, void*, void*, uint32_t, void*, void*);
@@ -2104,6 +2186,7 @@ typedef void (*vFpipipii_t)(void*, int32_t, void*, int32_t, void*, int32_t, int3
 typedef void (*vFpippppu_t)(void*, int32_t, void*, void*, void*, void*, uint32_t);
 typedef void (*vFpuuuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef void (*vFpuuUUuu_t)(void*, uint32_t, uint32_t, uint64_t, uint64_t, uint32_t, uint32_t);
+typedef void (*vFpuupupu_t)(void*, uint32_t, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef void (*vFpuupppp_t)(void*, uint32_t, uint32_t, void*, void*, void*, void*);
 typedef void (*vFpupuuup_t)(void*, uint32_t, void*, uint32_t, uint32_t, uint32_t, void*);
 typedef void (*vFpupppui_t)(void*, uint32_t, void*, void*, void*, uint32_t, int32_t);
@@ -2138,6 +2221,7 @@ typedef void (*vFpppiipp_t)(void*, void*, void*, int32_t, int32_t, void*, void*)
 typedef void (*vFpppiupi_t)(void*, void*, void*, int32_t, uint32_t, void*, int32_t);
 typedef void (*vFpppippi_t)(void*, void*, void*, int32_t, void*, void*, int32_t);
 typedef void (*vFpppuuuu_t)(void*, void*, void*, uint32_t, uint32_t, uint32_t, uint32_t);
+typedef void (*vFpppffff_t)(void*, void*, void*, float, float, float, float);
 typedef void (*vFppppiip_t)(void*, void*, void*, void*, int32_t, int32_t, void*);
 typedef void (*vFppppiui_t)(void*, void*, void*, void*, int32_t, uint32_t, int32_t);
 typedef void (*vFppppipi_t)(void*, void*, void*, void*, int32_t, void*, int32_t);
@@ -2154,6 +2238,7 @@ typedef int32_t (*iFEpppiiu_t)(x64emu_t*, void*, void*, void*, int32_t, int32_t,
 typedef int32_t (*iFEpppppL_t)(x64emu_t*, void*, void*, void*, void*, void*, uintptr_t);
 typedef int32_t (*iFEpppppp_t)(x64emu_t*, void*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFiiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
+typedef int32_t (*iFipupupi_t)(int32_t, void*, uint32_t, void*, uint32_t, void*, int32_t);
 typedef int32_t (*iFpiiiiii_t)(void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
 typedef int32_t (*iFpiiiiip_t)(void*, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFpiiiuwp_t)(void*, int32_t, int32_t, int32_t, uint32_t, int16_t, void*);
@@ -2164,10 +2249,12 @@ typedef int32_t (*iFpiuLiii_t)(void*, int32_t, uint32_t, uintptr_t, int32_t, int
 typedef int32_t (*iFpiupppp_t)(void*, int32_t, uint32_t, void*, void*, void*, void*);
 typedef int32_t (*iFpiLuupp_t)(void*, int32_t, uintptr_t, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpiLuppp_t)(void*, int32_t, uintptr_t, uint32_t, void*, void*, void*);
+typedef int32_t (*iFpipiiip_t)(void*, int32_t, void*, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iFpipipip_t)(void*, int32_t, void*, int32_t, void*, int32_t, void*);
 typedef int32_t (*iFpipippp_t)(void*, int32_t, void*, int32_t, void*, void*, void*);
 typedef int32_t (*iFpippLpp_t)(void*, int32_t, void*, void*, uintptr_t, void*, void*);
 typedef int32_t (*iFpippppW_t)(void*, int32_t, void*, void*, void*, void*, uint16_t);
+typedef int32_t (*iFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*);
 typedef int32_t (*iFpIIpppp_t)(void*, int64_t, int64_t, void*, void*, void*, void*);
 typedef int32_t (*iFpWCiWCi_t)(void*, uint16_t, uint8_t, int32_t, uint16_t, uint8_t, int32_t);
 typedef int32_t (*iFpWppppW_t)(void*, uint16_t, void*, void*, void*, void*, uint16_t);
@@ -2213,6 +2300,7 @@ typedef int32_t (*iFpppiuwu_t)(void*, void*, void*, int32_t, uint32_t, int16_t,
 typedef int32_t (*iFpppippi_t)(void*, void*, void*, int32_t, void*, void*, int32_t);
 typedef int32_t (*iFpppippp_t)(void*, void*, void*, int32_t, void*, void*, void*);
 typedef int32_t (*iFpppuiii_t)(void*, void*, void*, uint32_t, int32_t, int32_t, int32_t);
+typedef int32_t (*iFpppLppp_t)(void*, void*, void*, uintptr_t, void*, void*, void*);
 typedef int32_t (*iFppppilp_t)(void*, void*, void*, void*, int32_t, intptr_t, void*);
 typedef int32_t (*iFppppipp_t)(void*, void*, void*, void*, int32_t, void*, void*);
 typedef int32_t (*iFppppdpu_t)(void*, void*, void*, void*, double, void*, uint32_t);
@@ -2227,6 +2315,8 @@ typedef uint32_t (*uFEpppppp_t)(x64emu_t*, void*, void*, void*, void*, void*, vo
 typedef uint32_t (*uFiiiuuuu_t)(int32_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef uint32_t (*uFuippppp_t)(uint32_t, int32_t, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*);
+typedef uint32_t (*uFpuuuupp_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void*, void*);
+typedef uint32_t (*uFpuuuppp_t)(void*, uint32_t, uint32_t, uint32_t, void*, void*, void*);
 typedef uint32_t (*uFpuupppp_t)(void*, uint32_t, uint32_t, void*, void*, void*, void*);
 typedef uint32_t (*uFppiuppp_t)(void*, void*, int32_t, uint32_t, void*, void*, void*);
 typedef uint32_t (*uFppuuuup_t)(void*, void*, uint32_t, uint32_t, uint32_t, uint32_t, void*);
@@ -2260,28 +2350,37 @@ typedef void* (*pFpuupwwC_t)(void*, uint32_t, uint32_t, void*, int16_t, int16_t,
 typedef void* (*pFpupiipp_t)(void*, uint32_t, void*, int32_t, int32_t, void*, void*);
 typedef void* (*pFpuppipp_t)(void*, uint32_t, void*, void*, int32_t, void*, void*);
 typedef void* (*pFplppppp_t)(void*, intptr_t, void*, void*, void*, void*, void*);
+typedef void* (*pFpLLppup_t)(void*, uintptr_t, uintptr_t, void*, void*, uint32_t, void*);
+typedef void* (*pFpLpipip_t)(void*, uintptr_t, void*, int32_t, void*, int32_t, void*);
+typedef void* (*pFpLpLLiL_t)(void*, uintptr_t, void*, uintptr_t, uintptr_t, int32_t, uintptr_t);
 typedef void* (*pFpLppiip_t)(void*, uintptr_t, void*, void*, int32_t, int32_t, void*);
+typedef void* (*pFpLppLLi_t)(void*, uintptr_t, void*, void*, uintptr_t, uintptr_t, int32_t);
 typedef void* (*pFppiiipp_t)(void*, void*, int32_t, int32_t, int32_t, void*, void*);
 typedef void* (*pFppiiCCC_t)(void*, void*, int32_t, int32_t, uint8_t, uint8_t, uint8_t);
+typedef void* (*pFppiippp_t)(void*, void*, int32_t, int32_t, void*, void*, void*);
 typedef void* (*pFppipipp_t)(void*, void*, int32_t, void*, int32_t, void*, void*);
 typedef void* (*pFppipLpp_t)(void*, void*, int32_t, void*, uintptr_t, void*, void*);
 typedef void* (*pFppuippp_t)(void*, void*, uint32_t, int32_t, void*, void*, void*);
 typedef void* (*pFppuuupp_t)(void*, void*, uint32_t, uint32_t, uint32_t, void*, void*);
 typedef void* (*pFppuuppp_t)(void*, void*, uint32_t, uint32_t, void*, void*, void*);
+typedef void* (*pFppuLLip_t)(void*, void*, uint32_t, uintptr_t, uintptr_t, int32_t, void*);
 typedef void* (*pFppliuip_t)(void*, void*, intptr_t, int32_t, uint32_t, int32_t, void*);
 typedef void* (*pFpplipup_t)(void*, void*, intptr_t, int32_t, void*, uint32_t, void*);
 typedef void* (*pFppLipip_t)(void*, void*, uintptr_t, int32_t, void*, int32_t, void*);
+typedef void* (*pFppLLiLi_t)(void*, void*, uintptr_t, uintptr_t, int32_t, uintptr_t, int32_t);
 typedef void* (*pFpppccci_t)(void*, void*, void*, int8_t, int8_t, int8_t, int32_t);
 typedef void* (*pFpppiiii_t)(void*, void*, void*, int32_t, int32_t, int32_t, int32_t);
 typedef void* (*pFpppCCCi_t)(void*, void*, void*, uint8_t, uint8_t, uint8_t, int32_t);
 typedef void* (*pFpppuipp_t)(void*, void*, void*, uint32_t, int32_t, void*, void*);
 typedef void* (*pFpppuuui_t)(void*, void*, void*, uint32_t, uint32_t, uint32_t, int32_t);
 typedef void* (*pFpppuupp_t)(void*, void*, void*, uint32_t, uint32_t, void*, void*);
+typedef void* (*pFpppupup_t)(void*, void*, void*, uint32_t, void*, uint32_t, void*);
 typedef void* (*pFpppuppp_t)(void*, void*, void*, uint32_t, void*, void*, void*);
 typedef void* (*pFpppfffi_t)(void*, void*, void*, float, float, float, int32_t);
 typedef void* (*pFpppdddi_t)(void*, void*, void*, double, double, double, int32_t);
 typedef void* (*pFpppllli_t)(void*, void*, void*, intptr_t, intptr_t, intptr_t, int32_t);
 typedef void* (*pFpppLLLi_t)(void*, void*, void*, uintptr_t, uintptr_t, uintptr_t, int32_t);
+typedef void* (*pFppppiii_t)(void*, void*, void*, void*, int32_t, int32_t, int32_t);
 typedef void* (*pFppppuuu_t)(void*, void*, void*, void*, uint32_t, uint32_t, uint32_t);
 typedef void* (*pFpppppuu_t)(void*, void*, void*, void*, void*, uint32_t, uint32_t);
 typedef void* (*pFppppppu_t)(void*, void*, void*, void*, void*, void*, uint32_t);
@@ -2328,6 +2427,7 @@ typedef void (*vFuuuuuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, u
 typedef void (*vFuuufffff_t)(uint32_t, uint32_t, uint32_t, float, float, float, float, float);
 typedef void (*vFffffffff_t)(float, float, float, float, float, float, float, float);
 typedef void (*vFpiiiiiii_t)(void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
+typedef void (*vFpiiiiiip_t)(void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
 typedef void (*vFpiiiipii_t)(void*, int32_t, int32_t, int32_t, int32_t, void*, int32_t, int32_t);
 typedef void (*vFpiiULipp_t)(void*, int32_t, int32_t, uint64_t, uintptr_t, int32_t, void*, void*);
 typedef void (*vFpiUuupup_t)(void*, int32_t, uint64_t, uint32_t, uint32_t, void*, uint32_t, void*);
@@ -2365,7 +2465,10 @@ typedef int32_t (*iFiiiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int
 typedef int32_t (*iFiiupiupi_t)(int32_t, int32_t, uint32_t, void*, int32_t, uint32_t, void*, int32_t);
 typedef int32_t (*iFipippppp_t)(int32_t, void*, int32_t, void*, void*, void*, void*, void*);
 typedef int32_t (*iFuuuuuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
+typedef int32_t (*iFdiippppL_t)(double, int32_t, int32_t, void*, void*, void*, void*, uintptr_t);
+typedef int32_t (*iFpipiipip_t)(void*, int32_t, void*, int32_t, int32_t, void*, int32_t, void*);
 typedef int32_t (*iFpippuuii_t)(void*, int32_t, void*, void*, uint32_t, uint32_t, int32_t, int32_t);
+typedef int32_t (*iFpippuupp_t)(void*, int32_t, void*, void*, uint32_t, uint32_t, void*, void*);
 typedef int32_t (*iFpCCWWpWu_t)(void*, uint8_t, uint8_t, uint16_t, uint16_t, void*, uint16_t, uint32_t);
 typedef int32_t (*iFpWCuWCuu_t)(void*, uint16_t, uint8_t, uint32_t, uint16_t, uint8_t, uint32_t, uint32_t);
 typedef int32_t (*iFpWWipppp_t)(void*, uint16_t, uint16_t, int32_t, void*, void*, void*, void*);
@@ -2375,6 +2478,8 @@ typedef int32_t (*iFpuuiiiii_t)(void*, uint32_t, uint32_t, int32_t, int32_t, int
 typedef int32_t (*iFpuuipppp_t)(void*, uint32_t, uint32_t, int32_t, void*, void*, void*, void*);
 typedef int32_t (*iFpuuupupu_t)(void*, uint32_t, uint32_t, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef int32_t (*iFpuupuupp_t)(void*, uint32_t, uint32_t, void*, uint32_t, uint32_t, void*, void*);
+typedef int32_t (*iFpuuppiip_t)(void*, uint32_t, uint32_t, void*, void*, int32_t, int32_t, void*);
+typedef int32_t (*iFpuuppppp_t)(void*, uint32_t, uint32_t, void*, void*, void*, void*, void*);
 typedef int32_t (*iFpupppWWu_t)(void*, uint32_t, void*, void*, void*, uint16_t, uint16_t, uint32_t);
 typedef int32_t (*iFpupppppp_t)(void*, uint32_t, void*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFpUuuLpUi_t)(void*, uint64_t, uint32_t, uint32_t, uintptr_t, void*, uint64_t, int32_t);
@@ -2384,8 +2489,10 @@ typedef int32_t (*iFpLLLiipi_t)(void*, uintptr_t, uintptr_t, uintptr_t, int32_t,
 typedef int32_t (*iFpLLppppp_t)(void*, uintptr_t, uintptr_t, void*, void*, void*, void*, void*);
 typedef int32_t (*iFpLpipppp_t)(void*, uintptr_t, void*, int32_t, void*, void*, void*, void*);
 typedef int32_t (*iFpLppLpip_t)(void*, uintptr_t, void*, void*, uintptr_t, void*, int32_t, void*);
+typedef int32_t (*iFpLpppupu_t)(void*, uintptr_t, void*, void*, void*, uint32_t, void*, uint32_t);
 typedef int32_t (*iFpLpppppp_t)(void*, uintptr_t, void*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFppiiipip_t)(void*, void*, int32_t, int32_t, int32_t, void*, int32_t, void*);
+typedef int32_t (*iFppillppp_t)(void*, void*, int32_t, intptr_t, intptr_t, void*, void*, void*);
 typedef int32_t (*iFppIIIppp_t)(void*, void*, int64_t, int64_t, int64_t, void*, void*, void*);
 typedef int32_t (*iFppuiiuuu_t)(void*, void*, uint32_t, int32_t, int32_t, uint32_t, uint32_t, uint32_t);
 typedef int32_t (*iFppuuuuuu_t)(void*, void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
@@ -2393,6 +2500,7 @@ typedef int32_t (*iFppuppppp_t)(void*, void*, uint32_t, void*, void*, void*, voi
 typedef int32_t (*iFpppiiipi_t)(void*, void*, void*, int32_t, int32_t, int32_t, void*, int32_t);
 typedef int32_t (*iFpppiiipp_t)(void*, void*, void*, int32_t, int32_t, int32_t, void*, void*);
 typedef int32_t (*iFpppipipi_t)(void*, void*, void*, int32_t, void*, int32_t, void*, int32_t);
+typedef int32_t (*iFppppiiup_t)(void*, void*, void*, void*, int32_t, int32_t, uint32_t, void*);
 typedef int32_t (*iFppppippp_t)(void*, void*, void*, void*, int32_t, void*, void*, void*);
 typedef int32_t (*iFppppppii_t)(void*, void*, void*, void*, void*, void*, int32_t, int32_t);
 typedef int32_t (*iFpppppppi_t)(void*, void*, void*, void*, void*, void*, void*, int32_t);
@@ -2406,12 +2514,13 @@ typedef uint32_t (*uFEppppppp_t)(x64emu_t*, void*, void*, void*, void*, void*, v
 typedef uint32_t (*uFuipppppp_t)(uint32_t, int32_t, void*, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFuupuuiuf_t)(uint32_t, uint32_t, void*, uint32_t, uint32_t, int32_t, uint32_t, float);
 typedef uint32_t (*uFulpppppp_t)(uint32_t, intptr_t, void*, void*, void*, void*, void*, void*);
+typedef uint32_t (*uFpuupupuu_t)(void*, uint32_t, uint32_t, void*, uint32_t, void*, uint32_t, uint32_t);
 typedef uint32_t (*uFpupuuuCp_t)(void*, uint32_t, void*, uint32_t, uint32_t, uint32_t, uint8_t, void*);
 typedef uint32_t (*uFppuuuupp_t)(void*, void*, uint32_t, uint32_t, uint32_t, uint32_t, void*, void*);
 typedef uint32_t (*uFppuuuppu_t)(void*, void*, uint32_t, uint32_t, uint32_t, void*, void*, uint32_t);
 typedef uint32_t (*uFppuppppp_t)(void*, void*, uint32_t, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFpppppupp_t)(void*, void*, void*, void*, void*, uint32_t, void*, void*);
-typedef uintptr_t (*LFELpLpLpi_t)(x64emu_t*, uintptr_t, void*, uintptr_t, void*, uintptr_t, void*, int32_t);
+typedef uintptr_t (*LFELpupupu_t)(x64emu_t*, uintptr_t, void*, uint32_t, void*, uint32_t, void*, uint32_t);
 typedef uintptr_t (*LFEpiupppp_t)(x64emu_t*, void*, int32_t, uint32_t, void*, void*, void*, void*);
 typedef uintptr_t (*LFpLpuuLLu_t)(void*, uintptr_t, void*, uint32_t, uint32_t, uintptr_t, uintptr_t, uint32_t);
 typedef void* (*pFEiplllpp_t)(x64emu_t*, int32_t, void*, intptr_t, intptr_t, intptr_t, void*, void*);
@@ -2439,7 +2548,14 @@ typedef void* (*pFpuuupwwp_t)(void*, uint32_t, uint32_t, uint32_t, void*, int16_
 typedef void* (*pFpupppppp_t)(void*, uint32_t, void*, void*, void*, void*, void*, void*);
 typedef void* (*pFpdwwWWui_t)(void*, double, int16_t, int16_t, uint16_t, uint16_t, uint32_t, int32_t);
 typedef void* (*pFplpppppp_t)(void*, intptr_t, void*, void*, void*, void*, void*, void*);
+typedef void* (*pFpLuLpLip_t)(void*, uintptr_t, uint32_t, uintptr_t, void*, uintptr_t, int32_t, void*);
+typedef void* (*pFpLpipLup_t)(void*, uintptr_t, void*, int32_t, void*, uintptr_t, uint32_t, void*);
+typedef void* (*pFpLpLLiLi_t)(void*, uintptr_t, void*, uintptr_t, uintptr_t, int32_t, uintptr_t, int32_t);
+typedef void* (*pFpLppuLLp_t)(void*, uintptr_t, void*, void*, uint32_t, uintptr_t, uintptr_t, void*);
+typedef void* (*pFpLppLLiL_t)(void*, uintptr_t, void*, void*, uintptr_t, uintptr_t, int32_t, uintptr_t);
 typedef void* (*pFppiiiiii_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
+typedef void* (*pFpppipipi_t)(void*, void*, void*, int32_t, void*, int32_t, void*, int32_t);
+typedef void* (*pFppplippp_t)(void*, void*, void*, intptr_t, int32_t, void*, void*, void*);
 typedef void* (*pFppppuppp_t)(void*, void*, void*, void*, uint32_t, void*, void*, void*);
 typedef void* (*pFpppppupp_t)(void*, void*, void*, void*, void*, uint32_t, void*, void*);
 typedef int32_t (*iWEpuuiipp_t)(x64emu_t*, void*, uint32_t, uint32_t, int32_t, int32_t, void*, void*);
@@ -2479,6 +2595,7 @@ typedef void (*vFddddddddd_t)(double, double, double, double, double, double, do
 typedef void (*vFpiuippppi_t)(void*, int32_t, uint32_t, int32_t, void*, void*, void*, void*, int32_t);
 typedef void (*vFpipiuiipp_t)(void*, int32_t, void*, int32_t, uint32_t, int32_t, int32_t, void*, void*);
 typedef void (*vFpipppiipi_t)(void*, int32_t, void*, void*, void*, int32_t, int32_t, void*, int32_t);
+typedef void (*vFpuuuuuuuu_t)(void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
 typedef void (*vFpLpppippp_t)(void*, uintptr_t, void*, void*, void*, int32_t, void*, void*, void*);
 typedef void (*vFppiiiiiii_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
 typedef void (*vFppiiiiipi_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, void*, int32_t);
@@ -2499,6 +2616,7 @@ typedef void (*vFppUUiUUUU_t)(void*, void*, uint64_t, uint64_t, int32_t, uint64_
 typedef void (*vFppddddudd_t)(void*, void*, double, double, double, double, uint32_t, double, double);
 typedef void (*vFpplpppppi_t)(void*, void*, intptr_t, void*, void*, void*, void*, void*, int32_t);
 typedef void (*vFpppiiiiii_t)(void*, void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
+typedef void (*vFpppffffff_t)(void*, void*, void*, float, float, float, float, float, float);
 typedef void (*vFppppipiip_t)(void*, void*, void*, void*, int32_t, void*, int32_t, int32_t, void*);
 typedef void (*vFpppppippp_t)(void*, void*, void*, void*, void*, int32_t, void*, void*, void*);
 typedef int32_t (*iFEpiiiiipi_t)(x64emu_t*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, void*, int32_t);
@@ -2519,6 +2637,7 @@ typedef int32_t (*iFpduuuLuLp_t)(void*, double, uint32_t, uint32_t, uint32_t, ui
 typedef int32_t (*iFpLiuiiLLL_t)(void*, uintptr_t, int32_t, uint32_t, int32_t, int32_t, uintptr_t, uintptr_t, uintptr_t);
 typedef int32_t (*iFpLLiiuuii_t)(void*, uintptr_t, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, int32_t, int32_t);
 typedef int32_t (*iFpLpiiuuii_t)(void*, uintptr_t, void*, int32_t, int32_t, uint32_t, uint32_t, int32_t, int32_t);
+typedef int32_t (*iFpLpppupup_t)(void*, uintptr_t, void*, void*, void*, uint32_t, void*, uint32_t, void*);
 typedef int32_t (*iFpLppppppp_t)(void*, uintptr_t, void*, void*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFppiiiiiii_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
 typedef int32_t (*iFppippippp_t)(void*, void*, int32_t, void*, void*, int32_t, void*, void*, void*);
@@ -2533,6 +2652,7 @@ typedef int32_t (*iFppppppppp_t)(void*, void*, void*, void*, void*, void*, void*
 typedef uint32_t (*uFEipippppp_t)(x64emu_t*, int32_t, void*, int32_t, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFEpppufppp_t)(x64emu_t*, void*, void*, void*, uint32_t, float, void*, void*, void*);
 typedef uint32_t (*uFuulpiuiuf_t)(uint32_t, uint32_t, intptr_t, void*, int32_t, uint32_t, int32_t, uint32_t, float);
+typedef uint32_t (*uFpuupuppuu_t)(void*, uint32_t, uint32_t, void*, uint32_t, void*, void*, uint32_t, uint32_t);
 typedef uint32_t (*uFppLpLuppp_t)(void*, void*, uintptr_t, void*, uintptr_t, uint32_t, void*, void*, void*);
 typedef uint32_t (*uFppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*);
 typedef intptr_t (*lFpppipiipp_t)(void*, void*, void*, int32_t, void*, int32_t, int32_t, void*, void*);
@@ -2550,6 +2670,8 @@ typedef void* (*pFpiiCpWWup_t)(void*, int32_t, int32_t, uint8_t, void*, uint16_t
 typedef void* (*pFpCuWCCuuu_t)(void*, uint8_t, uint32_t, uint16_t, uint8_t, uint8_t, uint32_t, uint32_t, uint32_t);
 typedef void* (*pFpuuwwWWww_t)(void*, uint32_t, uint32_t, int16_t, int16_t, uint16_t, uint16_t, int16_t, int16_t);
 typedef void* (*pFpupuuuuup_t)(void*, uint32_t, void*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, void*);
+typedef void* (*pFpLpLLipui_t)(void*, uintptr_t, void*, uintptr_t, uintptr_t, int32_t, void*, uint32_t, int32_t);
+typedef void* (*pFpLppLLiLi_t)(void*, uintptr_t, void*, void*, uintptr_t, uintptr_t, int32_t, uintptr_t, int32_t);
 typedef void* (*pFppiiiiiip_t)(void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, void*);
 typedef void* (*pFppipppppp_t)(void*, void*, int32_t, void*, void*, void*, void*, void*, void*);
 typedef void* (*pFpppiiiiii_t)(void*, void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
@@ -2598,6 +2720,7 @@ typedef void (*vFppuuppppii_t)(void*, void*, uint32_t, uint32_t, void*, void*, v
 typedef void (*vFppuppuiiii_t)(void*, void*, uint32_t, void*, void*, uint32_t, int32_t, int32_t, int32_t, int32_t);
 typedef void (*vFppupppiiii_t)(void*, void*, uint32_t, void*, void*, void*, int32_t, int32_t, int32_t, int32_t);
 typedef void (*vFppdddddddd_t)(void*, void*, double, double, double, double, double, double, double, double);
+typedef void (*vFppppppppii_t)(void*, void*, void*, void*, void*, void*, void*, void*, int32_t, int32_t);
 typedef void (*vFpppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
 typedef int32_t (*iFEpiiiiippp_t)(x64emu_t*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, void*, void*, void*);
 typedef int32_t (*iFEpupppLppL_t)(x64emu_t*, void*, uint32_t, void*, void*, void*, uintptr_t, void*, void*, uintptr_t);
@@ -2612,7 +2735,9 @@ typedef int32_t (*iFppuuiiiiii_t)(void*, void*, uint32_t, uint32_t, int32_t, int
 typedef int32_t (*iFppuuiiuupi_t)(void*, void*, uint32_t, uint32_t, int32_t, int32_t, uint32_t, uint32_t, void*, int32_t);
 typedef int32_t (*iFpppiiipipi_t)(void*, void*, void*, int32_t, int32_t, int32_t, void*, int32_t, void*, int32_t);
 typedef int32_t (*iFpppLLipppp_t)(void*, void*, void*, uintptr_t, uintptr_t, int32_t, void*, void*, void*, void*);
+typedef int32_t (*iFpppppiiuup_t)(void*, void*, void*, void*, void*, int32_t, int32_t, uint32_t, uint32_t, void*);
 typedef int32_t (*iFpppppppipi_t)(void*, void*, void*, void*, void*, void*, void*, int32_t, void*, int32_t);
+typedef int32_t (*iFpppppppppu_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, uint32_t);
 typedef uint32_t (*uFpddpippppp_t)(void*, double, double, void*, int32_t, void*, void*, void*, void*, void*);
 typedef uint32_t (*uFpppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
 typedef void* (*pFEiippppppp_t)(x64emu_t*, int32_t, int32_t, void*, void*, void*, void*, void*, void*, void*);
@@ -2623,6 +2748,7 @@ typedef void* (*pFpuwwWWuCuu_t)(void*, uint32_t, int16_t, int16_t, uint16_t, uin
 typedef void* (*pFpuuuwwwwWW_t)(void*, uint32_t, uint32_t, uint32_t, int16_t, int16_t, int16_t, int16_t, uint16_t, uint16_t);
 typedef void* (*pFpuuuWWWCCi_t)(void*, uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, uint16_t, uint8_t, uint8_t, int32_t);
 typedef void* (*pFplllllllll_t)(void*, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t);
+typedef void* (*pFppippLLLip_t)(void*, void*, int32_t, void*, void*, uintptr_t, uintptr_t, uintptr_t, int32_t, void*);
 typedef void* (*pFppuiipuuii_t)(void*, void*, uint32_t, int32_t, int32_t, void*, uint32_t, uint32_t, int32_t, int32_t);
 typedef void* (*pFpppiiiiiii_t)(void*, void*, void*, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
 typedef void* (*pFpppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
@@ -2669,6 +2795,7 @@ typedef int32_t (*iFpLipiiiippp_t)(void*, uintptr_t, int32_t, void*, int32_t, in
 typedef int32_t (*iFpLLpiiuuiiL_t)(void*, uintptr_t, uintptr_t, void*, int32_t, int32_t, uint32_t, uint32_t, int32_t, int32_t, uintptr_t);
 typedef int32_t (*iFppippipppip_t)(void*, void*, int32_t, void*, void*, int32_t, void*, void*, void*, int32_t, void*);
 typedef int32_t (*iFpppiiuuiiuu_t)(void*, void*, void*, int32_t, int32_t, uint32_t, uint32_t, int32_t, int32_t, uint32_t, uint32_t);
+typedef int32_t (*iFpppppiiuupp_t)(void*, void*, void*, void*, void*, int32_t, int32_t, uint32_t, uint32_t, void*, void*);
 typedef uint32_t (*uFEpLiupppLuV_t)(x64emu_t*, void*, uintptr_t, int32_t, uint32_t, void*, void*, void*, uintptr_t, uint32_t, void*);
 typedef uint32_t (*uFEpLippppLup_t)(x64emu_t*, void*, uintptr_t, int32_t, void*, void*, void*, void*, uintptr_t, uint32_t, void*);
 typedef uint32_t (*uFEpLippppLuA_t)(x64emu_t*, void*, uintptr_t, int32_t, void*, void*, void*, void*, uintptr_t, uint32_t, void*);
@@ -2714,6 +2841,7 @@ typedef void* (*pFWWiCCCCiipup_t)(uint16_t, uint16_t, int32_t, uint8_t, uint8_t,
 typedef void* (*pFpCuuWWwwCCup_t)(void*, uint8_t, uint32_t, uint32_t, uint16_t, uint16_t, int16_t, int16_t, uint8_t, uint8_t, uint32_t, void*);
 typedef void* (*pFpuuuWWWWWWWW_t)(void*, uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t);
 typedef void* (*pFppiiuuuiupLp_t)(void*, void*, int32_t, int32_t, uint32_t, uint32_t, uint32_t, int32_t, uint32_t, void*, uintptr_t, void*);
+typedef void* (*pFppippLLLiLpp_t)(void*, void*, int32_t, void*, void*, uintptr_t, uintptr_t, uintptr_t, int32_t, uintptr_t, void*, void*);
 typedef void* (*pFpppppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
 typedef void (*vFEpppppppiippp_t)(x64emu_t*, void*, void*, void*, void*, void*, void*, void*, int32_t, int32_t, void*, void*, void*);
 typedef void (*vFuiiiiiiiiiuup_t)(uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, void*);
@@ -2735,6 +2863,7 @@ typedef uint32_t (*uFippuuuulllipp_t)(int32_t, void*, void*, uint32_t, uint32_t,
 typedef uint32_t (*uFppppuuupppppp_t)(void*, void*, void*, void*, uint32_t, uint32_t, uint32_t, void*, void*, void*, void*, void*, void*);
 typedef void* (*pFpCuuwwWWWWuup_t)(void*, uint8_t, uint32_t, uint32_t, int16_t, int16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint32_t, uint32_t, void*);
 typedef void* (*pFpuupppwwwwWWC_t)(void*, uint32_t, uint32_t, void*, void*, void*, int16_t, int16_t, int16_t, int16_t, uint16_t, uint16_t, uint8_t);
+typedef void* (*pFppLppppiiLpip_t)(void*, void*, uintptr_t, void*, void*, void*, void*, int32_t, int32_t, uintptr_t, void*, int32_t, void*);
 typedef void* (*pFpppppppuipppp_t)(void*, void*, void*, void*, void*, void*, void*, uint32_t, int32_t, void*, void*, void*, void*);
 typedef void* (*pFppppppppppppp_t)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
 typedef void (*vFippppppppppppp_t)(int32_t, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*);
@@ -2840,6 +2969,7 @@ void iFL(x64emu_t *emu, uintptr_t fcn) { iFL_t fn = (iFL_t)fcn; R_RAX=(int32_t)f
 void iFp(x64emu_t *emu, uintptr_t fcn) { iFp_t fn = (iFp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI); }
 void iFO(x64emu_t *emu, uintptr_t fcn) { iFO_t fn = (iFO_t)fcn; R_RAX=(int32_t)fn(of_convert((int32_t)R_RDI)); }
 void iFS(x64emu_t *emu, uintptr_t fcn) { iFS_t fn = (iFS_t)fcn; R_RAX=(int32_t)fn(io_convert((void*)R_RDI)); }
+void iFP(x64emu_t *emu, uintptr_t fcn) { iFP_t fn = (iFP_t)fcn; R_RAX=(int32_t)fn(*(void**)(R_RSP + 8)); }
 void IFv(x64emu_t *emu, uintptr_t fcn) { IFv_t fn = (IFv_t)fcn; R_RAX=(int64_t)fn(); }
 void IFi(x64emu_t *emu, uintptr_t fcn) { IFi_t fn = (IFi_t)fcn; R_RAX=(int64_t)fn((int32_t)R_RDI); }
 void IFI(x64emu_t *emu, uintptr_t fcn) { IFI_t fn = (IFI_t)fcn; R_RAX=(int64_t)fn((int64_t)R_RDI); }
@@ -2962,6 +3092,7 @@ void vFpL(x64emu_t *emu, uintptr_t fcn) { vFpL_t fn = (vFpL_t)fcn; fn((void*)R_R
 void vFpp(x64emu_t *emu, uintptr_t fcn) { vFpp_t fn = (vFpp_t)fcn; fn((void*)R_RDI, (void*)R_RSI); }
 void vFpS(x64emu_t *emu, uintptr_t fcn) { vFpS_t fn = (vFpS_t)fcn; fn((void*)R_RDI, io_convert((void*)R_RSI)); }
 void vFSi(x64emu_t *emu, uintptr_t fcn) { vFSi_t fn = (vFSi_t)fcn; fn(io_convert((void*)R_RDI), (int32_t)R_RSI); }
+void cFpi(x64emu_t *emu, uintptr_t fcn) { cFpi_t fn = (cFpi_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI); }
 void cFpp(x64emu_t *emu, uintptr_t fcn) { cFpp_t fn = (cFpp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI); }
 void wFpi(x64emu_t *emu, uintptr_t fcn) { wFpi_t fn = (wFpi_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI); }
 void iFEi(x64emu_t *emu, uintptr_t fcn) { iFEi_t fn = (iFEi_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI); }
@@ -3021,6 +3152,7 @@ void uFEp(x64emu_t *emu, uintptr_t fcn) { uFEp_t fn = (uFEp_t)fcn; R_RAX=(uint32
 void uFii(x64emu_t *emu, uintptr_t fcn) { uFii_t fn = (uFii_t)fcn; R_RAX=(uint32_t)fn((int32_t)R_RDI, (int32_t)R_RSI); }
 void uFiu(x64emu_t *emu, uintptr_t fcn) { uFiu_t fn = (uFiu_t)fcn; R_RAX=(uint32_t)fn((int32_t)R_RDI, (uint32_t)R_RSI); }
 void uFip(x64emu_t *emu, uintptr_t fcn) { uFip_t fn = (uFip_t)fcn; R_RAX=(uint32_t)fn((int32_t)R_RDI, (void*)R_RSI); }
+void uFui(x64emu_t *emu, uintptr_t fcn) { uFui_t fn = (uFui_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI); }
 void uFuu(x64emu_t *emu, uintptr_t fcn) { uFuu_t fn = (uFuu_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI); }
 void uFup(x64emu_t *emu, uintptr_t fcn) { uFup_t fn = (uFup_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (void*)R_RSI); }
 void uFpw(x64emu_t *emu, uintptr_t fcn) { uFpw_t fn = (uFpw_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (int16_t)R_RSI); }
@@ -3035,6 +3167,7 @@ void uFpp(x64emu_t *emu, uintptr_t fcn) { uFpp_t fn = (uFpp_t)fcn; R_RAX=(uint32
 void UFEp(x64emu_t *emu, uintptr_t fcn) { UFEp_t fn = (UFEp_t)fcn; R_RAX=fn(emu, (void*)R_RDI); }
 void UFuu(x64emu_t *emu, uintptr_t fcn) { UFuu_t fn = (UFuu_t)fcn; R_RAX=fn((uint32_t)R_RDI, (uint32_t)R_RSI); }
 void UFpi(x64emu_t *emu, uintptr_t fcn) { UFpi_t fn = (UFpi_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI); }
+void UFpU(x64emu_t *emu, uintptr_t fcn) { UFpU_t fn = (UFpU_t)fcn; R_RAX=fn((void*)R_RDI, (uint64_t)R_RSI); }
 void UFpp(x64emu_t *emu, uintptr_t fcn) { UFpp_t fn = (UFpp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI); }
 void fFEp(x64emu_t *emu, uintptr_t fcn) { fFEp_t fn = (fFEp_t)fcn; emu->xmm[0].f[0]=fn(emu, (void*)R_RDI); }
 void fFif(x64emu_t *emu, uintptr_t fcn) { fFif_t fn = (fFif_t)fcn; emu->xmm[0].f[0]=fn((int32_t)R_RDI, emu->xmm[0].f[0]); }
@@ -3042,6 +3175,7 @@ void fFfi(x64emu_t *emu, uintptr_t fcn) { fFfi_t fn = (fFfi_t)fcn; emu->xmm[0].f
 void fFff(x64emu_t *emu, uintptr_t fcn) { fFff_t fn = (fFff_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], emu->xmm[1].f[0]); }
 void fFfD(x64emu_t *emu, uintptr_t fcn) { fFfD_t fn = (fFfD_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], LD2localLD((void*)(R_RSP + 8))); }
 void fFfp(x64emu_t *emu, uintptr_t fcn) { fFfp_t fn = (fFfp_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], (void*)R_RDI); }
+void fFpu(x64emu_t *emu, uintptr_t fcn) { fFpu_t fn = (fFpu_t)fcn; emu->xmm[0].f[0]=fn((void*)R_RDI, (uint32_t)R_RSI); }
 void fFpp(x64emu_t *emu, uintptr_t fcn) { fFpp_t fn = (fFpp_t)fcn; emu->xmm[0].f[0]=fn((void*)R_RDI, (void*)R_RSI); }
 void dFid(x64emu_t *emu, uintptr_t fcn) { dFid_t fn = (dFid_t)fcn; emu->xmm[0].d[0]=fn((int32_t)R_RDI, emu->xmm[0].d[0]); }
 void dFdi(x64emu_t *emu, uintptr_t fcn) { dFdi_t fn = (dFdi_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], (int32_t)R_RDI); }
@@ -3083,7 +3217,6 @@ void pFiI(x64emu_t *emu, uintptr_t fcn) { pFiI_t fn = (pFiI_t)fcn; R_RAX=(uintpt
 void pFiu(x64emu_t *emu, uintptr_t fcn) { pFiu_t fn = (pFiu_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (uint32_t)R_RSI); }
 void pFip(x64emu_t *emu, uintptr_t fcn) { pFip_t fn = (pFip_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI); }
 void pFiV(x64emu_t *emu, uintptr_t fcn) { pFiV_t fn = (pFiV_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)(R_RSP + 8)); }
-void pFII(x64emu_t *emu, uintptr_t fcn) { pFII_t fn = (pFII_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI, (int64_t)R_RSI); }
 void pFui(x64emu_t *emu, uintptr_t fcn) { pFui_t fn = (pFui_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (int32_t)R_RSI); }
 void pFuu(x64emu_t *emu, uintptr_t fcn) { pFuu_t fn = (pFuu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI); }
 void pFup(x64emu_t *emu, uintptr_t fcn) { pFup_t fn = (pFup_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI); }
@@ -3091,6 +3224,8 @@ void pFUU(x64emu_t *emu, uintptr_t fcn) { pFUU_t fn = (pFUU_t)fcn; R_RAX=(uintpt
 void pFdi(x64emu_t *emu, uintptr_t fcn) { pFdi_t fn = (pFdi_t)fcn; R_RAX=(uintptr_t)fn(emu->xmm[0].d[0], (int32_t)R_RDI); }
 void pFdd(x64emu_t *emu, uintptr_t fcn) { pFdd_t fn = (pFdd_t)fcn; R_RAX=(uintptr_t)fn(emu->xmm[0].d[0], emu->xmm[1].d[0]); }
 void pFli(x64emu_t *emu, uintptr_t fcn) { pFli_t fn = (pFli_t)fcn; R_RAX=(uintptr_t)fn((intptr_t)R_RDI, (int32_t)R_RSI); }
+void pFll(x64emu_t *emu, uintptr_t fcn) { pFll_t fn = (pFll_t)fcn; R_RAX=(uintptr_t)fn((intptr_t)R_RDI, (intptr_t)R_RSI); }
+void pFlp(x64emu_t *emu, uintptr_t fcn) { pFlp_t fn = (pFlp_t)fcn; R_RAX=(uintptr_t)fn((intptr_t)R_RDI, (void*)R_RSI); }
 void pFLi(x64emu_t *emu, uintptr_t fcn) { pFLi_t fn = (pFLi_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (int32_t)R_RSI); }
 void pFLC(x64emu_t *emu, uintptr_t fcn) { pFLC_t fn = (pFLC_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uint8_t)R_RSI); }
 void pFLu(x64emu_t *emu, uintptr_t fcn) { pFLu_t fn = (pFLu_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uint32_t)R_RSI); }
@@ -3206,6 +3341,7 @@ void vFpUp(x64emu_t *emu, uintptr_t fcn) { vFpUp_t fn = (vFpUp_t)fcn; fn((void*)
 void vFpff(x64emu_t *emu, uintptr_t fcn) { vFpff_t fn = (vFpff_t)fcn; fn((void*)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0]); }
 void vFpdu(x64emu_t *emu, uintptr_t fcn) { vFpdu_t fn = (vFpdu_t)fcn; fn((void*)R_RDI, emu->xmm[0].d[0], (uint32_t)R_RSI); }
 void vFpdd(x64emu_t *emu, uintptr_t fcn) { vFpdd_t fn = (vFpdd_t)fcn; fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0]); }
+void vFpdp(x64emu_t *emu, uintptr_t fcn) { vFpdp_t fn = (vFpdp_t)fcn; fn((void*)R_RDI, emu->xmm[0].d[0], (void*)R_RSI); }
 void vFpll(x64emu_t *emu, uintptr_t fcn) { vFpll_t fn = (vFpll_t)fcn; fn((void*)R_RDI, (intptr_t)R_RSI, (intptr_t)R_RDX); }
 void vFplp(x64emu_t *emu, uintptr_t fcn) { vFplp_t fn = (vFplp_t)fcn; fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX); }
 void vFpLi(x64emu_t *emu, uintptr_t fcn) { vFpLi_t fn = (vFpLi_t)fcn; fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX); }
@@ -3220,6 +3356,7 @@ void vFppd(x64emu_t *emu, uintptr_t fcn) { vFppd_t fn = (vFppd_t)fcn; fn((void*)
 void vFppl(x64emu_t *emu, uintptr_t fcn) { vFppl_t fn = (vFppl_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX); }
 void vFppL(x64emu_t *emu, uintptr_t fcn) { vFppL_t fn = (vFppL_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); }
 void vFppp(x64emu_t *emu, uintptr_t fcn) { vFppp_t fn = (vFppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); }
+void cFpdp(x64emu_t *emu, uintptr_t fcn) { cFpdp_t fn = (cFpdp_t)fcn; R_RAX=fn((void*)R_RDI, emu->xmm[0].d[0], (void*)R_RSI); }
 void wFppp(x64emu_t *emu, uintptr_t fcn) { wFppp_t fn = (wFppp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void iFEiw(x64emu_t *emu, uintptr_t fcn) { iFEiw_t fn = (iFEiw_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int16_t)R_RSI); }
 void iFEip(x64emu_t *emu, uintptr_t fcn) { iFEip_t fn = (iFEip_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI); }
@@ -3259,6 +3396,7 @@ void iFipO(x64emu_t *emu, uintptr_t fcn) { iFipO_t fn = (iFipO_t)fcn; R_RAX=(int
 void iFCuW(x64emu_t *emu, uintptr_t fcn) { iFCuW_t fn = (iFCuW_t)fcn; R_RAX=(int32_t)fn((uint8_t)R_RDI, (uint32_t)R_RSI, (uint16_t)R_RDX); }
 void iFuwp(x64emu_t *emu, uintptr_t fcn) { iFuwp_t fn = (iFuwp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (int16_t)R_RSI, (void*)R_RDX); }
 void iFuip(x64emu_t *emu, uintptr_t fcn) { iFuip_t fn = (iFuip_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX); }
+void iFuWp(x64emu_t *emu, uintptr_t fcn) { iFuWp_t fn = (iFuWp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint16_t)R_RSI, (void*)R_RDX); }
 void iFuui(x64emu_t *emu, uintptr_t fcn) { iFuui_t fn = (iFuui_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX); }
 void iFuuu(x64emu_t *emu, uintptr_t fcn) { iFuuu_t fn = (iFuuu_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX); }
 void iFuup(x64emu_t *emu, uintptr_t fcn) { iFuup_t fn = (iFuup_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX); }
@@ -3354,6 +3492,7 @@ void uFpuu(x64emu_t *emu, uintptr_t fcn) { uFpuu_t fn = (uFpuu_t)fcn; R_RAX=(uin
 void uFpuL(x64emu_t *emu, uintptr_t fcn) { uFpuL_t fn = (uFpuL_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uintptr_t)R_RDX); }
 void uFpup(x64emu_t *emu, uintptr_t fcn) { uFpup_t fn = (uFpup_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX); }
 void uFpfu(x64emu_t *emu, uintptr_t fcn) { uFpfu_t fn = (uFpfu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, emu->xmm[0].f[0], (uint32_t)R_RSI); }
+void uFpli(x64emu_t *emu, uintptr_t fcn) { uFpli_t fn = (uFpli_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX); }
 void uFpLu(x64emu_t *emu, uintptr_t fcn) { uFpLu_t fn = (uFpLu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uint32_t)R_RDX); }
 void uFpLL(x64emu_t *emu, uintptr_t fcn) { uFpLL_t fn = (uFpLL_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX); }
 void uFpLp(x64emu_t *emu, uintptr_t fcn) { uFpLp_t fn = (uFpLp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); }
@@ -3372,6 +3511,7 @@ void fFppp(x64emu_t *emu, uintptr_t fcn) { fFppp_t fn = (fFppp_t)fcn; emu->xmm[0
 void dFuud(x64emu_t *emu, uintptr_t fcn) { dFuud_t fn = (dFuud_t)fcn; emu->xmm[0].d[0]=fn((uint32_t)R_RDI, (uint32_t)R_RSI, emu->xmm[0].d[0]); }
 void dFddd(x64emu_t *emu, uintptr_t fcn) { dFddd_t fn = (dFddd_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0]); }
 void dFddp(x64emu_t *emu, uintptr_t fcn) { dFddp_t fn = (dFddp_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0], (void*)R_RDI); }
+void dFpii(x64emu_t *emu, uintptr_t fcn) { dFpii_t fn = (dFpii_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX); }
 void dFpdd(x64emu_t *emu, uintptr_t fcn) { dFpdd_t fn = (dFpdd_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0]); }
 void dFppi(x64emu_t *emu, uintptr_t fcn) { dFppi_t fn = (dFppi_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX); }
 void dFppu(x64emu_t *emu, uintptr_t fcn) { dFppu_t fn = (dFppu_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); }
@@ -3438,6 +3578,7 @@ void pFuup(x64emu_t *emu, uintptr_t fcn) { pFuup_t fn = (pFuup_t)fcn; R_RAX=(uin
 void pFulu(x64emu_t *emu, uintptr_t fcn) { pFulu_t fn = (pFulu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (intptr_t)R_RSI, (uint32_t)R_RDX); }
 void pFulp(x64emu_t *emu, uintptr_t fcn) { pFulp_t fn = (pFulp_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (intptr_t)R_RSI, (void*)R_RDX); }
 void pFupi(x64emu_t *emu, uintptr_t fcn) { pFupi_t fn = (pFupi_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX); }
+void pFupu(x64emu_t *emu, uintptr_t fcn) { pFupu_t fn = (pFupu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); }
 void pFupl(x64emu_t *emu, uintptr_t fcn) { pFupl_t fn = (pFupl_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI, (intptr_t)R_RDX); }
 void pFupL(x64emu_t *emu, uintptr_t fcn) { pFupL_t fn = (pFupL_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); }
 void pFupp(x64emu_t *emu, uintptr_t fcn) { pFupp_t fn = (pFupp_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
@@ -3449,6 +3590,7 @@ void pFlpi(x64emu_t *emu, uintptr_t fcn) { pFlpi_t fn = (pFlpi_t)fcn; R_RAX=(uin
 void pFLup(x64emu_t *emu, uintptr_t fcn) { pFLup_t fn = (pFLup_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX); }
 void pFLLp(x64emu_t *emu, uintptr_t fcn) { pFLLp_t fn = (pFLLp_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); }
 void pFLpi(x64emu_t *emu, uintptr_t fcn) { pFLpi_t fn = (pFLpi_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX); }
+void pFLpp(x64emu_t *emu, uintptr_t fcn) { pFLpp_t fn = (pFLpp_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void pFpii(x64emu_t *emu, uintptr_t fcn) { pFpii_t fn = (pFpii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX); }
 void pFpiu(x64emu_t *emu, uintptr_t fcn) { pFpiu_t fn = (pFpiu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX); }
 void pFpid(x64emu_t *emu, uintptr_t fcn) { pFpid_t fn = (pFpid_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, emu->xmm[0].d[0]); }
@@ -3458,6 +3600,7 @@ void pFpip(x64emu_t *emu, uintptr_t fcn) { pFpip_t fn = (pFpip_t)fcn; R_RAX=(uin
 void pFpCi(x64emu_t *emu, uintptr_t fcn) { pFpCi_t fn = (pFpCi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (int32_t)R_RDX); }
 void pFpCC(x64emu_t *emu, uintptr_t fcn) { pFpCC_t fn = (pFpCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX); }
 void pFpCu(x64emu_t *emu, uintptr_t fcn) { pFpCu_t fn = (pFpCu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX); }
+void pFpWi(x64emu_t *emu, uintptr_t fcn) { pFpWi_t fn = (pFpWi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint16_t)R_RSI, (int32_t)R_RDX); }
 void pFpWW(x64emu_t *emu, uintptr_t fcn) { pFpWW_t fn = (pFpWW_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX); }
 void pFpWp(x64emu_t *emu, uintptr_t fcn) { pFpWp_t fn = (pFpWp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint16_t)R_RSI, (void*)R_RDX); }
 void pFpui(x64emu_t *emu, uintptr_t fcn) { pFpui_t fn = (pFpui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX); }
@@ -3594,6 +3737,7 @@ void vFLuui(x64emu_t *emu, uintptr_t fcn) { vFLuui_t fn = (vFLuui_t)fcn; fn((uin
 void vFLppi(x64emu_t *emu, uintptr_t fcn) { vFLppi_t fn = (vFLppi_t)fcn; fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
 void vFpiii(x64emu_t *emu, uintptr_t fcn) { vFpiii_t fn = (vFpiii_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void vFpiiu(x64emu_t *emu, uintptr_t fcn) { vFpiiu_t fn = (vFpiiu_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX); }
+void vFpiid(x64emu_t *emu, uintptr_t fcn) { vFpiid_t fn = (vFpiid_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, emu->xmm[0].d[0]); }
 void vFpiip(x64emu_t *emu, uintptr_t fcn) { vFpiip_t fn = (vFpiip_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void vFpiui(x64emu_t *emu, uintptr_t fcn) { vFpiui_t fn = (vFpiui_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX); }
 void vFpiuu(x64emu_t *emu, uintptr_t fcn) { vFpiuu_t fn = (vFpiuu_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX); }
@@ -3657,10 +3801,12 @@ void vFpppd(x64emu_t *emu, uintptr_t fcn) { vFpppd_t fn = (vFpppd_t)fcn; fn((voi
 void vFpppl(x64emu_t *emu, uintptr_t fcn) { vFpppl_t fn = (vFpppl_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (intptr_t)R_RCX); }
 void vFpppL(x64emu_t *emu, uintptr_t fcn) { vFpppL_t fn = (vFpppL_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); }
 void vFpppp(x64emu_t *emu, uintptr_t fcn) { vFpppp_t fn = (vFpppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void cFpipp(x64emu_t *emu, uintptr_t fcn) { cFpipp_t fn = (cFpipp_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFEiip(x64emu_t *emu, uintptr_t fcn) { iFEiip_t fn = (iFEiip_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX); }
 void iFEiiN(x64emu_t *emu, uintptr_t fcn) { iFEiiN_t fn = (iFEiiN_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX); }
 void iFEipp(x64emu_t *emu, uintptr_t fcn) { iFEipp_t fn = (iFEipp_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void iFEipV(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)(R_RSP + 8)); }
+void iFEipA(x64emu_t *emu, uintptr_t fcn) { iFEipA_t fn = (iFEipA_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void iFEupu(x64emu_t *emu, uintptr_t fcn) { iFEupu_t fn = (iFEupu_t)fcn; R_RAX=(int32_t)fn(emu, (uint32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); }
 void iFEupp(x64emu_t *emu, uintptr_t fcn) { iFEupp_t fn = (iFEupp_t)fcn; R_RAX=(int32_t)fn(emu, (uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void iFEpii(x64emu_t *emu, uintptr_t fcn) { iFEpii_t fn = (iFEpii_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX); }
@@ -3698,6 +3844,7 @@ void iFilli(x64emu_t *emu, uintptr_t fcn) { iFilli_t fn = (iFilli_t)fcn; R_RAX=(
 void iFillu(x64emu_t *emu, uintptr_t fcn) { iFillu_t fn = (iFillu_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (intptr_t)R_RSI, (intptr_t)R_RDX, (uint32_t)R_RCX); }
 void iFipii(x64emu_t *emu, uintptr_t fcn) { iFipii_t fn = (iFipii_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void iFipip(x64emu_t *emu, uintptr_t fcn) { iFipip_t fn = (iFipip_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
+void iFipWp(x64emu_t *emu, uintptr_t fcn) { iFipWp_t fn = (iFipWp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uint16_t)R_RDX, (void*)R_RCX); }
 void iFipui(x64emu_t *emu, uintptr_t fcn) { iFipui_t fn = (iFipui_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX); }
 void iFipuL(x64emu_t *emu, uintptr_t fcn) { iFipuL_t fn = (iFipuL_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX); }
 void iFipup(x64emu_t *emu, uintptr_t fcn) { iFipup_t fn = (iFipup_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX); }
@@ -3705,18 +3852,21 @@ void iFipLi(x64emu_t *emu, uintptr_t fcn) { iFipLi_t fn = (iFipLi_t)fcn; R_RAX=(
 void iFipLu(x64emu_t *emu, uintptr_t fcn) { iFipLu_t fn = (iFipLu_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX); }
 void iFipLp(x64emu_t *emu, uintptr_t fcn) { iFipLp_t fn = (iFipLp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
 void iFippi(x64emu_t *emu, uintptr_t fcn) { iFippi_t fn = (iFippi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
-void iFippu(x64emu_t *emu, uintptr_t fcn) { iFippu_t fn = (iFippu_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX); }
 void iFippL(x64emu_t *emu, uintptr_t fcn) { iFippL_t fn = (iFippL_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); }
 void iFippp(x64emu_t *emu, uintptr_t fcn) { iFippp_t fn = (iFippp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFipON(x64emu_t *emu, uintptr_t fcn) { iFipON_t fn = (iFipON_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, of_convert((int32_t)R_RDX), (void*)R_RCX); }
 void iFuiup(x64emu_t *emu, uintptr_t fcn) { iFuiup_t fn = (iFuiup_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX); }
 void iFuipp(x64emu_t *emu, uintptr_t fcn) { iFuipp_t fn = (iFuipp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void iFuWWp(x64emu_t *emu, uintptr_t fcn) { iFuWWp_t fn = (iFuWWp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX, (void*)R_RCX); }
 void iFuuuu(x64emu_t *emu, uintptr_t fcn) { iFuuuu_t fn = (iFuuuu_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX); }
 void iFuupi(x64emu_t *emu, uintptr_t fcn) { iFuupi_t fn = (iFuupi_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
+void iFuupp(x64emu_t *emu, uintptr_t fcn) { iFuupp_t fn = (iFuupp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFupLp(x64emu_t *emu, uintptr_t fcn) { iFupLp_t fn = (iFupLp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
 void iFuppi(x64emu_t *emu, uintptr_t fcn) { iFuppi_t fn = (iFuppi_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
+void iFuppu(x64emu_t *emu, uintptr_t fcn) { iFuppu_t fn = (iFuppu_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX); }
 void iFuppp(x64emu_t *emu, uintptr_t fcn) { iFuppp_t fn = (iFuppp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFLLiW(x64emu_t *emu, uintptr_t fcn) { iFLLiW_t fn = (iFLLiW_t)fcn; R_RAX=(int32_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (uint16_t)R_RCX); }
+void iFLppp(x64emu_t *emu, uintptr_t fcn) { iFLppp_t fn = (iFLppp_t)fcn; R_RAX=(int32_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFpwww(x64emu_t *emu, uintptr_t fcn) { iFpwww_t fn = (iFpwww_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int16_t)R_RSI, (int16_t)R_RDX, (int16_t)R_RCX); }
 void iFpwpp(x64emu_t *emu, uintptr_t fcn) { iFpwpp_t fn = (iFpwpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int16_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFpiii(x64emu_t *emu, uintptr_t fcn) { iFpiii_t fn = (iFpiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
@@ -3763,6 +3913,7 @@ void iFpUup(x64emu_t *emu, uintptr_t fcn) { iFpUup_t fn = (iFpUup_t)fcn; R_RAX=(
 void iFpUUU(x64emu_t *emu, uintptr_t fcn) { iFpUUU_t fn = (iFpUUU_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX); }
 void iFpULp(x64emu_t *emu, uintptr_t fcn) { iFpULp_t fn = (iFpULp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
 void iFpUpp(x64emu_t *emu, uintptr_t fcn) { iFpUpp_t fn = (iFpUpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void iFpdip(x64emu_t *emu, uintptr_t fcn) { iFpdip_t fn = (iFpdip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, emu->xmm[0].d[0], (int32_t)R_RSI, (void*)R_RDX); }
 void iFplii(x64emu_t *emu, uintptr_t fcn) { iFplii_t fn = (iFplii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void iFplip(x64emu_t *emu, uintptr_t fcn) { iFplip_t fn = (iFplip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void iFplpi(x64emu_t *emu, uintptr_t fcn) { iFplpi_t fn = (iFplpi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
@@ -3818,6 +3969,7 @@ void IFSIii(x64emu_t *emu, uintptr_t fcn) { IFSIii_t fn = (IFSIii_t)fcn; R_RAX=(
 void CFuuff(x64emu_t *emu, uintptr_t fcn) { CFuuff_t fn = (CFuuff_t)fcn; R_RAX=(unsigned char)fn((uint32_t)R_RDI, (uint32_t)R_RSI, emu->xmm[0].f[0], emu->xmm[1].f[0]); }
 void CFpiii(x64emu_t *emu, uintptr_t fcn) { CFpiii_t fn = (CFpiii_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void CFpupp(x64emu_t *emu, uintptr_t fcn) { CFpupp_t fn = (CFpupp_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void CFpLLi(x64emu_t *emu, uintptr_t fcn) { CFpLLi_t fn = (CFpLLi_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX); }
 void CFppip(x64emu_t *emu, uintptr_t fcn) { CFppip_t fn = (CFppip_t)fcn; R_RAX=(unsigned char)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void uFEipp(x64emu_t *emu, uintptr_t fcn) { uFEipp_t fn = (uFEipp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void uFEupp(x64emu_t *emu, uintptr_t fcn) { uFEupp_t fn = (uFEupp_t)fcn; R_RAX=(uint32_t)fn(emu, (uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
@@ -3838,6 +3990,7 @@ void uFpupu(x64emu_t *emu, uintptr_t fcn) { uFpupu_t fn = (uFpupu_t)fcn; R_RAX=(
 void uFpupp(x64emu_t *emu, uintptr_t fcn) { uFpupp_t fn = (uFpupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void uFppiu(x64emu_t *emu, uintptr_t fcn) { uFppiu_t fn = (uFppiu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX); }
 void uFppip(x64emu_t *emu, uintptr_t fcn) { uFppip_t fn = (uFppip_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
+void uFppuu(x64emu_t *emu, uintptr_t fcn) { uFppuu_t fn = (uFppuu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX); }
 void uFpplp(x64emu_t *emu, uintptr_t fcn) { uFpplp_t fn = (uFpplp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (void*)R_RCX); }
 void uFppLp(x64emu_t *emu, uintptr_t fcn) { uFppLp_t fn = (uFppLp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
 void uFpppi(x64emu_t *emu, uintptr_t fcn) { uFpppi_t fn = (uFpppi_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
@@ -3905,13 +4058,13 @@ void pFiiuu(x64emu_t *emu, uintptr_t fcn) { pFiiuu_t fn = (pFiiuu_t)fcn; R_RAX=(
 void pFiiup(x64emu_t *emu, uintptr_t fcn) { pFiiup_t fn = (pFiiup_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX); }
 void pFiiLp(x64emu_t *emu, uintptr_t fcn) { pFiiLp_t fn = (pFiiLp_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
 void pFiipi(x64emu_t *emu, uintptr_t fcn) { pFiipi_t fn = (pFiipi_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
-void pFiipp(x64emu_t *emu, uintptr_t fcn) { pFiipp_t fn = (pFiipp_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void pFiIIi(x64emu_t *emu, uintptr_t fcn) { pFiIIi_t fn = (pFiIIi_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (int32_t)R_RCX); }
 void pFillu(x64emu_t *emu, uintptr_t fcn) { pFillu_t fn = (pFillu_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (intptr_t)R_RSI, (intptr_t)R_RDX, (uint32_t)R_RCX); }
 void pFipii(x64emu_t *emu, uintptr_t fcn) { pFipii_t fn = (pFipii_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void pFipip(x64emu_t *emu, uintptr_t fcn) { pFipip_t fn = (pFipip_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void pFippi(x64emu_t *emu, uintptr_t fcn) { pFippi_t fn = (pFippi_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
 void pFippu(x64emu_t *emu, uintptr_t fcn) { pFippu_t fn = (pFippu_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX); }
+void pFippp(x64emu_t *emu, uintptr_t fcn) { pFippp_t fn = (pFippp_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void pFuuii(x64emu_t *emu, uintptr_t fcn) { pFuuii_t fn = (pFuuii_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void pFuuip(x64emu_t *emu, uintptr_t fcn) { pFuuip_t fn = (pFuuip_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void pFuuuu(x64emu_t *emu, uintptr_t fcn) { pFuuuu_t fn = (pFuuuu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX); }
@@ -3924,6 +4077,9 @@ void pFdddd(x64emu_t *emu, uintptr_t fcn) { pFdddd_t fn = (pFdddd_t)fcn; R_RAX=(
 void pFDipp(x64emu_t *emu, uintptr_t fcn) { pFDipp_t fn = (pFDipp_t)fcn; R_RAX=(uintptr_t)fn(LD2localLD((void*)(R_RSP + 8)), (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void pFlfff(x64emu_t *emu, uintptr_t fcn) { pFlfff_t fn = (pFlfff_t)fcn; R_RAX=(uintptr_t)fn((intptr_t)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0]); }
 void pFLiip(x64emu_t *emu, uintptr_t fcn) { pFLiip_t fn = (pFLiip_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
+void pFLLup(x64emu_t *emu, uintptr_t fcn) { pFLLup_t fn = (pFLLup_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX); }
+void pFLLpp(x64emu_t *emu, uintptr_t fcn) { pFLLpp_t fn = (pFLLpp_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void pFLppp(x64emu_t *emu, uintptr_t fcn) { pFLppp_t fn = (pFLppp_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void pFpiii(x64emu_t *emu, uintptr_t fcn) { pFpiii_t fn = (pFpiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void pFpiiu(x64emu_t *emu, uintptr_t fcn) { pFpiiu_t fn = (pFpiiu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX); }
 void pFpiip(x64emu_t *emu, uintptr_t fcn) { pFpiip_t fn = (pFpiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
@@ -3951,8 +4107,10 @@ void pFpupu(x64emu_t *emu, uintptr_t fcn) { pFpupu_t fn = (pFpupu_t)fcn; R_RAX=(
 void pFpupp(x64emu_t *emu, uintptr_t fcn) { pFpupp_t fn = (pFpupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void pFpdIU(x64emu_t *emu, uintptr_t fcn) { pFpdIU_t fn = (pFpdIU_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, emu->xmm[0].d[0], (int64_t)R_RSI, (uint64_t)R_RDX); }
 void pFplil(x64emu_t *emu, uintptr_t fcn) { pFplil_t fn = (pFplil_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX, (intptr_t)R_RCX); }
+void pFplip(x64emu_t *emu, uintptr_t fcn) { pFplip_t fn = (pFplip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void pFplpl(x64emu_t *emu, uintptr_t fcn) { pFplpl_t fn = (pFplpl_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (intptr_t)R_RCX); }
 void pFplpp(x64emu_t *emu, uintptr_t fcn) { pFplpp_t fn = (pFplpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
+void pFpLii(x64emu_t *emu, uintptr_t fcn) { pFpLii_t fn = (pFpLii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
 void pFpLip(x64emu_t *emu, uintptr_t fcn) { pFpLip_t fn = (pFpLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); }
 void pFpLup(x64emu_t *emu, uintptr_t fcn) { pFpLup_t fn = (pFpLup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX); }
 void pFpLLp(x64emu_t *emu, uintptr_t fcn) { pFpLLp_t fn = (pFpLLp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX); }
@@ -4151,6 +4309,7 @@ void vFpLpiL(x64emu_t *emu, uintptr_t fcn) { vFpLpiL_t fn = (vFpLpiL_t)fcn; fn((
 void vFppiii(x64emu_t *emu, uintptr_t fcn) { vFppiii_t fn = (vFppiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
 void vFppiiu(x64emu_t *emu, uintptr_t fcn) { vFppiiu_t fn = (vFppiiu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8); }
 void vFppiip(x64emu_t *emu, uintptr_t fcn) { vFppiip_t fn = (vFppiip_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
+void vFppiui(x64emu_t *emu, uintptr_t fcn) { vFppiui_t fn = (vFppiui_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void vFppiup(x64emu_t *emu, uintptr_t fcn) { vFppiup_t fn = (vFppiup_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void vFppiff(x64emu_t *emu, uintptr_t fcn) { vFppiff_t fn = (vFppiff_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0]); }
 void vFppidd(x64emu_t *emu, uintptr_t fcn) { vFppidd_t fn = (vFppidd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, emu->xmm[0].d[0], emu->xmm[1].d[0]); }
@@ -4163,6 +4322,7 @@ void vFppuuu(x64emu_t *emu, uintptr_t fcn) { vFppuuu_t fn = (vFppuuu_t)fcn; fn((
 void vFppuup(x64emu_t *emu, uintptr_t fcn) { vFppuup_t fn = (vFppuup_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void vFppudd(x64emu_t *emu, uintptr_t fcn) { vFppudd_t fn = (vFppudd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, emu->xmm[0].d[0], emu->xmm[1].d[0]); }
 void vFppupi(x64emu_t *emu, uintptr_t fcn) { vFppupi_t fn = (vFppupi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
+void vFppupu(x64emu_t *emu, uintptr_t fcn) { vFppupu_t fn = (vFppupu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8); }
 void vFppupp(x64emu_t *emu, uintptr_t fcn) { vFppupp_t fn = (vFppupp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void vFppfff(x64emu_t *emu, uintptr_t fcn) { vFppfff_t fn = (vFppfff_t)fcn; fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0]); }
 void vFppddp(x64emu_t *emu, uintptr_t fcn) { vFppddp_t fn = (vFppddp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], (void*)R_RDX); }
@@ -4172,6 +4332,7 @@ void vFpppip(x64emu_t *emu, uintptr_t fcn) { vFpppip_t fn = (vFpppip_t)fcn; fn((
 void vFpppui(x64emu_t *emu, uintptr_t fcn) { vFpppui_t fn = (vFpppui_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void vFpppuu(x64emu_t *emu, uintptr_t fcn) { vFpppuu_t fn = (vFpppuu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
 void vFpppup(x64emu_t *emu, uintptr_t fcn) { vFpppup_t fn = (vFpppup_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
+void vFpppff(x64emu_t *emu, uintptr_t fcn) { vFpppff_t fn = (vFpppff_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0]); }
 void vFpppdd(x64emu_t *emu, uintptr_t fcn) { vFpppdd_t fn = (vFpppdd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].d[0], emu->xmm[1].d[0]); }
 void vFppppi(x64emu_t *emu, uintptr_t fcn) { vFppppi_t fn = (vFppppi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
 void vFppppu(x64emu_t *emu, uintptr_t fcn) { vFppppu_t fn = (vFppppu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8); }
@@ -4179,6 +4340,7 @@ void vFppppL(x64emu_t *emu, uintptr_t fcn) { vFppppL_t fn = (vFppppL_t)fcn; fn((
 void vFppppp(x64emu_t *emu, uintptr_t fcn) { vFppppp_t fn = (vFppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFEiipp(x64emu_t *emu, uintptr_t fcn) { iFEiipp_t fn = (iFEiipp_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFEiipV(x64emu_t *emu, uintptr_t fcn) { iFEiipV_t fn = (iFEiipV_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)(R_RSP + 8)); }
+void iFEiipA(x64emu_t *emu, uintptr_t fcn) { iFEiipA_t fn = (iFEiipA_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX); }
 void iFEippi(x64emu_t *emu, uintptr_t fcn) { iFEippi_t fn = (iFEippi_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX); }
 void iFEippL(x64emu_t *emu, uintptr_t fcn) { iFEippL_t fn = (iFEippL_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); }
 void iFEippp(x64emu_t *emu, uintptr_t fcn) { iFEippp_t fn = (iFEippp_t)fcn; R_RAX=(int32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); }
@@ -4220,8 +4382,10 @@ void iFippLi(x64emu_t *emu, uintptr_t fcn) { iFippLi_t fn = (iFippLi_t)fcn; R_RA
 void iFippLp(x64emu_t *emu, uintptr_t fcn) { iFippLp_t fn = (iFippLp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8); }
 void iFipppi(x64emu_t *emu, uintptr_t fcn) { iFipppi_t fn = (iFipppi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
 void iFipppp(x64emu_t *emu, uintptr_t fcn) { iFipppp_t fn = (iFipppp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
+void iFuuupp(x64emu_t *emu, uintptr_t fcn) { iFuuupp_t fn = (iFuuupp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFuppLp(x64emu_t *emu, uintptr_t fcn) { iFuppLp_t fn = (iFuppLp_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8); }
 void iFLppip(x64emu_t *emu, uintptr_t fcn) { iFLppip_t fn = (iFLppip_t)fcn; R_RAX=(int32_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
+void iFLpppp(x64emu_t *emu, uintptr_t fcn) { iFLpppp_t fn = (iFLpppp_t)fcn; R_RAX=(int32_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpwwww(x64emu_t *emu, uintptr_t fcn) { iFpwwww_t fn = (iFpwwww_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int16_t)R_RSI, (int16_t)R_RDX, (int16_t)R_RCX, (int16_t)R_R8); }
 void iFpwppp(x64emu_t *emu, uintptr_t fcn) { iFpwppp_t fn = (iFpwppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int16_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpiiii(x64emu_t *emu, uintptr_t fcn) { iFpiiii_t fn = (iFpiiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
@@ -4253,11 +4417,14 @@ void iFpuuip(x64emu_t *emu, uintptr_t fcn) { iFpuuip_t fn = (iFpuuip_t)fcn; R_RA
 void iFpuuui(x64emu_t *emu, uintptr_t fcn) { iFpuuui_t fn = (iFpuuui_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void iFpuuup(x64emu_t *emu, uintptr_t fcn) { iFpuuup_t fn = (iFpuuup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void iFpuuLL(x64emu_t *emu, uintptr_t fcn) { iFpuuLL_t fn = (iFpuuLL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8); }
+void iFpuupp(x64emu_t *emu, uintptr_t fcn) { iFpuupp_t fn = (iFpuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpulup(x64emu_t *emu, uintptr_t fcn) { iFpulup_t fn = (iFpulup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (intptr_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void iFpulpp(x64emu_t *emu, uintptr_t fcn) { iFpulpp_t fn = (iFpulpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpupiU(x64emu_t *emu, uintptr_t fcn) { iFpupiU_t fn = (iFpupiU_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint64_t)R_R8); }
+void iFpupui(x64emu_t *emu, uintptr_t fcn) { iFpupui_t fn = (iFpupui_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void iFpupuu(x64emu_t *emu, uintptr_t fcn) { iFpupuu_t fn = (iFpupuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
 void iFpupup(x64emu_t *emu, uintptr_t fcn) { iFpupup_t fn = (iFpupup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
+void iFpuppL(x64emu_t *emu, uintptr_t fcn) { iFpuppL_t fn = (iFpuppL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); }
 void iFpuppp(x64emu_t *emu, uintptr_t fcn) { iFpuppp_t fn = (iFpuppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpUiUi(x64emu_t *emu, uintptr_t fcn) { iFpUiUi_t fn = (iFpUiUi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int32_t)R_RDX, (uint64_t)R_RCX, (int32_t)R_R8); }
 void iFpUupp(x64emu_t *emu, uintptr_t fcn) { iFpUupp_t fn = (iFpUupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
@@ -4286,6 +4453,7 @@ void iFppiup(x64emu_t *emu, uintptr_t fcn) { iFppiup_t fn = (iFppiup_t)fcn; R_RA
 void iFppiLi(x64emu_t *emu, uintptr_t fcn) { iFppiLi_t fn = (iFppiLi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uintptr_t)R_RCX, (int32_t)R_R8); }
 void iFppiLL(x64emu_t *emu, uintptr_t fcn) { iFppiLL_t fn = (iFppiLL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8); }
 void iFppipi(x64emu_t *emu, uintptr_t fcn) { iFppipi_t fn = (iFppipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
+void iFppipu(x64emu_t *emu, uintptr_t fcn) { iFppipu_t fn = (iFppipu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8); }
 void iFppipp(x64emu_t *emu, uintptr_t fcn) { iFppipp_t fn = (iFppipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFppuwp(x64emu_t *emu, uintptr_t fcn) { iFppuwp_t fn = (iFppuwp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int16_t)R_RCX, (void*)R_R8); }
 void iFppuip(x64emu_t *emu, uintptr_t fcn) { iFppuip_t fn = (iFppuip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
@@ -4325,9 +4493,11 @@ void uFuiiii(x64emu_t *emu, uintptr_t fcn) { uFuiiii_t fn = (uFuiiii_t)fcn; R_RA
 void uFLpppL(x64emu_t *emu, uintptr_t fcn) { uFLpppL_t fn = (uFLpppL_t)fcn; R_RAX=(uint32_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); }
 void uFpCCCC(x64emu_t *emu, uintptr_t fcn) { uFpCCCC_t fn = (uFpCCCC_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8); }
 void uFpWuip(x64emu_t *emu, uintptr_t fcn) { uFpWuip_t fn = (uFpWuip_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
+void uFpuuui(x64emu_t *emu, uintptr_t fcn) { uFpuuui_t fn = (uFpuuui_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void uFpuuuu(x64emu_t *emu, uintptr_t fcn) { uFpuuuu_t fn = (uFpuuuu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
 void uFpuupp(x64emu_t *emu, uintptr_t fcn) { uFpuupp_t fn = (uFpuupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFpupuu(x64emu_t *emu, uintptr_t fcn) { uFpupuu_t fn = (uFpupuu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
+void uFpuppp(x64emu_t *emu, uintptr_t fcn) { uFpuppp_t fn = (uFpuppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFppipp(x64emu_t *emu, uintptr_t fcn) { uFppipp_t fn = (uFppipp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFppuup(x64emu_t *emu, uintptr_t fcn) { uFppuup_t fn = (uFppuup_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void uFppupp(x64emu_t *emu, uintptr_t fcn) { uFppupp_t fn = (uFppupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
@@ -4357,6 +4527,7 @@ void LFpLpuu(x64emu_t *emu, uintptr_t fcn) { LFpLpuu_t fn = (LFpLpuu_t)fcn; R_RA
 void LFpLppL(x64emu_t *emu, uintptr_t fcn) { LFpLppL_t fn = (LFpLppL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); }
 void LFpLppp(x64emu_t *emu, uintptr_t fcn) { LFpLppp_t fn = (LFpLppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void LFppLLp(x64emu_t *emu, uintptr_t fcn) { LFppLLp_t fn = (LFppLLp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8); }
+void LFppLpL(x64emu_t *emu, uintptr_t fcn) { LFppLpL_t fn = (LFppLpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); }
 void LFpppii(x64emu_t *emu, uintptr_t fcn) { LFpppii_t fn = (LFpppii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
 void LFppppp(x64emu_t *emu, uintptr_t fcn) { LFppppp_t fn = (LFppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFEpiii(x64emu_t *emu, uintptr_t fcn) { pFEpiii_t fn = (pFEpiii_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX); }
@@ -4393,6 +4564,7 @@ void pFpiipp(x64emu_t *emu, uintptr_t fcn) { pFpiipp_t fn = (pFpiipp_t)fcn; R_RA
 void pFpiCCC(x64emu_t *emu, uintptr_t fcn) { pFpiCCC_t fn = (pFpiCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint8_t)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8); }
 void pFpiuuu(x64emu_t *emu, uintptr_t fcn) { pFpiuuu_t fn = (pFpiuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
 void pFpiupp(x64emu_t *emu, uintptr_t fcn) { pFpiupp_t fn = (pFpiupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
+void pFpiLip(x64emu_t *emu, uintptr_t fcn) { pFpiLip_t fn = (pFpiLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
 void pFpipip(x64emu_t *emu, uintptr_t fcn) { pFpipip_t fn = (pFpipip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
 void pFpipup(x64emu_t *emu, uintptr_t fcn) { pFpipup_t fn = (pFpipup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void pFpippi(x64emu_t *emu, uintptr_t fcn) { pFpippi_t fn = (pFpippi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
@@ -4407,14 +4579,17 @@ void pFpuuWW(x64emu_t *emu, uintptr_t fcn) { pFpuuWW_t fn = (pFpuuWW_t)fcn; R_RA
 void pFpuuuu(x64emu_t *emu, uintptr_t fcn) { pFpuuuu_t fn = (pFpuuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
 void pFpuuup(x64emu_t *emu, uintptr_t fcn) { pFpuuup_t fn = (pFpuuup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void pFpupii(x64emu_t *emu, uintptr_t fcn) { pFpupii_t fn = (pFpupii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
+void pFpuppu(x64emu_t *emu, uintptr_t fcn) { pFpuppu_t fn = (pFpuppu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8); }
 void pFpuppp(x64emu_t *emu, uintptr_t fcn) { pFpuppp_t fn = (pFpuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFpUdii(x64emu_t *emu, uintptr_t fcn) { pFpUdii_t fn = (pFpUdii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, emu->xmm[0].d[0], (int32_t)R_RDX, (int32_t)R_RCX); }
 void pFpfffi(x64emu_t *emu, uintptr_t fcn) { pFpfffi_t fn = (pFpfffi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], (int32_t)R_RSI); }
 void pFpdddd(x64emu_t *emu, uintptr_t fcn) { pFpdddd_t fn = (pFpdddd_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0]); }
 void pFplppp(x64emu_t *emu, uintptr_t fcn) { pFplppp_t fn = (pFplppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFpLiii(x64emu_t *emu, uintptr_t fcn) { pFpLiii_t fn = (pFpLiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
+void pFpLLip(x64emu_t *emu, uintptr_t fcn) { pFpLLip_t fn = (pFpLLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
 void pFpLLLp(x64emu_t *emu, uintptr_t fcn) { pFpLLLp_t fn = (pFpLLLp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8); }
 void pFpLpii(x64emu_t *emu, uintptr_t fcn) { pFpLpii_t fn = (pFpLpii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
+void pFpLpip(x64emu_t *emu, uintptr_t fcn) { pFpLpip_t fn = (pFpLpip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
 void pFppiii(x64emu_t *emu, uintptr_t fcn) { pFppiii_t fn = (pFppiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
 void pFppiiu(x64emu_t *emu, uintptr_t fcn) { pFppiiu_t fn = (pFppiiu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8); }
 void pFppiip(x64emu_t *emu, uintptr_t fcn) { pFppiip_t fn = (pFppiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
@@ -4429,11 +4604,13 @@ void pFppuup(x64emu_t *emu, uintptr_t fcn) { pFppuup_t fn = (pFppuup_t)fcn; R_RA
 void pFppupp(x64emu_t *emu, uintptr_t fcn) { pFppupp_t fn = (pFppupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFppddu(x64emu_t *emu, uintptr_t fcn) { pFppddu_t fn = (pFppddu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], (uint32_t)R_RDX); }
 void pFppLii(x64emu_t *emu, uintptr_t fcn) { pFppLii_t fn = (pFppLii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
+void pFppLLi(x64emu_t *emu, uintptr_t fcn) { pFppLLi_t fn = (pFppLLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (int32_t)R_R8); }
+void pFppLpp(x64emu_t *emu, uintptr_t fcn) { pFppLpp_t fn = (pFppLpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFpppii(x64emu_t *emu, uintptr_t fcn) { pFpppii_t fn = (pFpppii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8); }
 void pFpppip(x64emu_t *emu, uintptr_t fcn) { pFpppip_t fn = (pFpppip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8); }
-void pFpppIi(x64emu_t *emu, uintptr_t fcn) { pFpppIi_t fn = (pFpppIi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int64_t)R_RCX, (int32_t)R_R8); }
 void pFpppui(x64emu_t *emu, uintptr_t fcn) { pFpppui_t fn = (pFpppui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
 void pFpppup(x64emu_t *emu, uintptr_t fcn) { pFpppup_t fn = (pFpppup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
+void pFpppli(x64emu_t *emu, uintptr_t fcn) { pFpppli_t fn = (pFpppli_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (intptr_t)R_RCX, (int32_t)R_R8); }
 void pFpppLi(x64emu_t *emu, uintptr_t fcn) { pFpppLi_t fn = (pFpppLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (int32_t)R_R8); }
 void pFppppi(x64emu_t *emu, uintptr_t fcn) { pFppppi_t fn = (pFppppi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
 void pFppppu(x64emu_t *emu, uintptr_t fcn) { pFppppu_t fn = (pFppppu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8); }
@@ -4457,6 +4634,7 @@ void vFEiiipp(x64emu_t *emu, uintptr_t fcn) { vFEiiipp_t fn = (vFEiiipp_t)fcn; f
 void vFEpiLpp(x64emu_t *emu, uintptr_t fcn) { vFEpiLpp_t fn = (vFEpiLpp_t)fcn; fn(emu, (void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void vFEpippp(x64emu_t *emu, uintptr_t fcn) { vFEpippp_t fn = (vFEpippp_t)fcn; fn(emu, (void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void vFEpuipp(x64emu_t *emu, uintptr_t fcn) { vFEpuipp_t fn = (vFEpuipp_t)fcn; fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
+void vFEpuipV(x64emu_t *emu, uintptr_t fcn) { vFEpuipV_t fn = (vFEpuipV_t)fcn; fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)(R_RSP + 8)); }
 void vFEpupup(x64emu_t *emu, uintptr_t fcn) { vFEpupup_t fn = (vFEpupup_t)fcn; fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
 void vFEpuppp(x64emu_t *emu, uintptr_t fcn) { vFEpuppp_t fn = (vFEpuppp_t)fcn; fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void vFEpLLpp(x64emu_t *emu, uintptr_t fcn) { vFEpLLpp_t fn = (vFEpLLpp_t)fcn; fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
@@ -4546,11 +4724,14 @@ void vFpuiiii(x64emu_t *emu, uintptr_t fcn) { vFpuiiii_t fn = (vFpuiiii_t)fcn; f
 void vFpuiiiu(x64emu_t *emu, uintptr_t fcn) { vFpuiiiu_t fn = (vFpuiiiu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9); }
 void vFpuiipp(x64emu_t *emu, uintptr_t fcn) { vFpuiipp_t fn = (vFpuiipp_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFpuuuiu(x64emu_t *emu, uintptr_t fcn) { vFpuuuiu_t fn = (vFpuuuiu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9); }
+void vFpuuuup(x64emu_t *emu, uintptr_t fcn) { vFpuuuup_t fn = (vFpuuuup_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
+void vFpuuupp(x64emu_t *emu, uintptr_t fcn) { vFpuuupp_t fn = (vFpuuupp_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFpuupuu(x64emu_t *emu, uintptr_t fcn) { vFpuupuu_t fn = (vFpuupuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
 void vFpuuppp(x64emu_t *emu, uintptr_t fcn) { vFpuuppp_t fn = (vFpuuppp_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFpudddd(x64emu_t *emu, uintptr_t fcn) { vFpudddd_t fn = (vFpudddd_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0]); }
 void vFpupiUu(x64emu_t *emu, uintptr_t fcn) { vFpupiUu_t fn = (vFpupiUu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint64_t)R_R8, (uint32_t)R_R9); }
 void vFpupuuu(x64emu_t *emu, uintptr_t fcn) { vFpupuuu_t fn = (vFpupuuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
+void vFpupupu(x64emu_t *emu, uintptr_t fcn) { vFpupupu_t fn = (vFpupupu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void vFpuppuu(x64emu_t *emu, uintptr_t fcn) { vFpuppuu_t fn = (vFpuppuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
 void vFpupppp(x64emu_t *emu, uintptr_t fcn) { vFpupppp_t fn = (vFpupppp_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void vFpUiuup(x64emu_t *emu, uintptr_t fcn) { vFpUiuup_t fn = (vFpUiuup_t)fcn; fn((void*)R_RDI, (uint64_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
@@ -4609,11 +4790,13 @@ void iFEpippi(x64emu_t *emu, uintptr_t fcn) { iFEpippi_t fn = (iFEpippi_t)fcn; R
 void iFEpIppp(x64emu_t *emu, uintptr_t fcn) { iFEpIppp_t fn = (iFEpIppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFEpuppp(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFEpUppp(x64emu_t *emu, uintptr_t fcn) { iFEpUppp_t fn = (iFEpUppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
+void iFEppppi(x64emu_t *emu, uintptr_t fcn) { iFEppppi_t fn = (iFEppppi_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); }
 void iFEppppp(x64emu_t *emu, uintptr_t fcn) { iFEppppp_t fn = (iFEppppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiip_t fn = (iFiiiiip_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void iFiiiipp(x64emu_t *emu, uintptr_t fcn) { iFiiiipp_t fn = (iFiiiipp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFiiiuwp(x64emu_t *emu, uintptr_t fcn) { iFiiiuwp_t fn = (iFiiiuwp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (int16_t)R_R8, (void*)R_R9); }
 void iFiWiipi(x64emu_t *emu, uintptr_t fcn) { iFiWiipi_t fn = (iFiWiipi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (uint16_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
+void iFilpppp(x64emu_t *emu, uintptr_t fcn) { iFilpppp_t fn = (iFilpppp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFiLpppi(x64emu_t *emu, uintptr_t fcn) { iFiLpppi_t fn = (iFiLpppi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9); }
 void iFipiipi(x64emu_t *emu, uintptr_t fcn) { iFipiipi_t fn = (iFipiipi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
 void iFipipip(x64emu_t *emu, uintptr_t fcn) { iFipipip_t fn = (iFipipip_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
@@ -4638,17 +4821,23 @@ void iFpiCCpu(x64emu_t *emu, uintptr_t fcn) { iFpiCCpu_t fn = (iFpiCCpu_t)fcn; R
 void iFpiuuup(x64emu_t *emu, uintptr_t fcn) { iFpiuuup_t fn = (iFpiuuup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void iFpiuupp(x64emu_t *emu, uintptr_t fcn) { iFpiuupp_t fn = (iFpiuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpipipi(x64emu_t *emu, uintptr_t fcn) { iFpipipi_t fn = (iFpipipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
+void iFpipipp(x64emu_t *emu, uintptr_t fcn) { iFpipipp_t fn = (iFpipipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpipupp(x64emu_t *emu, uintptr_t fcn) { iFpipupp_t fn = (iFpipupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpippip(x64emu_t *emu, uintptr_t fcn) { iFpippip_t fn = (iFpippip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
+void iFpippup(x64emu_t *emu, uintptr_t fcn) { iFpippup_t fn = (iFpippup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void iFpipppL(x64emu_t *emu, uintptr_t fcn) { iFpipppL_t fn = (iFpipppL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9); }
 void iFpipppp(x64emu_t *emu, uintptr_t fcn) { iFpipppp_t fn = (iFpipppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpCiipp(x64emu_t *emu, uintptr_t fcn) { iFpCiipp_t fn = (iFpCiipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint8_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpCpipu(x64emu_t *emu, uintptr_t fcn) { iFpCpipu_t fn = (iFpCpipu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint8_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
+void iFpWipip(x64emu_t *emu, uintptr_t fcn) { iFpWipip_t fn = (iFpWipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void iFpWpppp(x64emu_t *emu, uintptr_t fcn) { iFpWpppp_t fn = (iFpWpppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpuiCpp(x64emu_t *emu, uintptr_t fcn) { iFpuiCpp_t fn = (iFpuiCpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (uint8_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpuippp(x64emu_t *emu, uintptr_t fcn) { iFpuippp_t fn = (iFpuippp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpuuuuu(x64emu_t *emu, uintptr_t fcn) { iFpuuuuu_t fn = (iFpuuuuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
+void iFpuuuup(x64emu_t *emu, uintptr_t fcn) { iFpuuuup_t fn = (iFpuuuup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
+void iFpuuupp(x64emu_t *emu, uintptr_t fcn) { iFpuuupp_t fn = (iFpuuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpuupuu(x64emu_t *emu, uintptr_t fcn) { iFpuupuu_t fn = (iFpuupuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
+void iFpuuppp(x64emu_t *emu, uintptr_t fcn) { iFpuuppp_t fn = (iFpuuppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpuLLpp(x64emu_t *emu, uintptr_t fcn) { iFpuLLpp_t fn = (iFpuLLpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpupuui(x64emu_t *emu, uintptr_t fcn) { iFpupuui_t fn = (iFpupuui_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (int32_t)R_R9); }
 void iFpupLpL(x64emu_t *emu, uintptr_t fcn) { iFpupLpL_t fn = (iFpupLpL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (uintptr_t)R_R9); }
@@ -4657,6 +4846,7 @@ void iFpUuuLp(x64emu_t *emu, uintptr_t fcn) { iFpUuuLp_t fn = (iFpUuuLp_t)fcn; R
 void iFpUuupp(x64emu_t *emu, uintptr_t fcn) { iFpUuupp_t fn = (iFpUuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpUUUip(x64emu_t *emu, uintptr_t fcn) { iFpUUUip_t fn = (iFpUUUip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void iFpUUUUp(x64emu_t *emu, uintptr_t fcn) { iFpUUUUp_t fn = (iFpUUUUp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (void*)R_R9); }
+void iFpdpipp(x64emu_t *emu, uintptr_t fcn) { iFpdpipp_t fn = (iFpdpipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, emu->xmm[0].d[0], (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void iFpLiiiL(x64emu_t *emu, uintptr_t fcn) { iFpLiiiL_t fn = (iFpLiiiL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uintptr_t)R_R9); }
 void iFpLiiip(x64emu_t *emu, uintptr_t fcn) { iFpLiiip_t fn = (iFpLiiip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void iFpLiiuu(x64emu_t *emu, uintptr_t fcn) { iFpLiiuu_t fn = (iFpLiiuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
@@ -4675,9 +4865,11 @@ void iFppiiip(x64emu_t *emu, uintptr_t fcn) { iFppiiip_t fn = (iFppiiip_t)fcn; R
 void iFppiipi(x64emu_t *emu, uintptr_t fcn) { iFppiipi_t fn = (iFppiipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
 void iFppiipp(x64emu_t *emu, uintptr_t fcn) { iFppiipp_t fn = (iFppiipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppiupp(x64emu_t *emu, uintptr_t fcn) { iFppiupp_t fn = (iFppiupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
+void iFppilpp(x64emu_t *emu, uintptr_t fcn) { iFppilpp_t fn = (iFppilpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (intptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppipii(x64emu_t *emu, uintptr_t fcn) { iFppipii_t fn = (iFppipii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
 void iFppipiL(x64emu_t *emu, uintptr_t fcn) { iFppipiL_t fn = (iFppipiL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uintptr_t)R_R9); }
 void iFppipip(x64emu_t *emu, uintptr_t fcn) { iFppipip_t fn = (iFppipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
+void iFppippu(x64emu_t *emu, uintptr_t fcn) { iFppippu_t fn = (iFppippu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void iFppIppp(x64emu_t *emu, uintptr_t fcn) { iFppIppp_t fn = (iFppIppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppuiii(x64emu_t *emu, uintptr_t fcn) { iFppuiii_t fn = (iFppuiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
 void iFppuIII(x64emu_t *emu, uintptr_t fcn) { iFppuIII_t fn = (iFppuIII_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (int64_t)R_R9); }
@@ -4690,12 +4882,15 @@ void iFpplppi(x64emu_t *emu, uintptr_t fcn) { iFpplppi_t fn = (iFpplppi_t)fcn; R
 void iFppLupp(x64emu_t *emu, uintptr_t fcn) { iFppLupp_t fn = (iFppLupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppLLiL(x64emu_t *emu, uintptr_t fcn) { iFppLLiL_t fn = (iFppLLiL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (int32_t)R_R8, (uintptr_t)R_R9); }
 void iFppLLup(x64emu_t *emu, uintptr_t fcn) { iFppLLup_t fn = (iFppLLup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
+void iFppLLpp(x64emu_t *emu, uintptr_t fcn) { iFppLLpp_t fn = (iFppLLpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppLpLp(x64emu_t *emu, uintptr_t fcn) { iFppLpLp_t fn = (iFppLpLp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9); }
 void iFppLppp(x64emu_t *emu, uintptr_t fcn) { iFppLppp_t fn = (iFppLppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpppiuu(x64emu_t *emu, uintptr_t fcn) { iFpppiuu_t fn = (iFpppiuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
 void iFpppipi(x64emu_t *emu, uintptr_t fcn) { iFpppipi_t fn = (iFpppipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
+void iFpppipu(x64emu_t *emu, uintptr_t fcn) { iFpppipu_t fn = (iFpppipu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void iFpppipp(x64emu_t *emu, uintptr_t fcn) { iFpppipp_t fn = (iFpppipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpppuii(x64emu_t *emu, uintptr_t fcn) { iFpppuii_t fn = (iFpppuii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
+void iFpppuup(x64emu_t *emu, uintptr_t fcn) { iFpppuup_t fn = (iFpppuup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void iFpppupu(x64emu_t *emu, uintptr_t fcn) { iFpppupu_t fn = (iFpppupu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void iFpppupp(x64emu_t *emu, uintptr_t fcn) { iFpppupp_t fn = (iFpppupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFpppLpp(x64emu_t *emu, uintptr_t fcn) { iFpppLpp_t fn = (iFpppLpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
@@ -4704,6 +4899,7 @@ void iFppppiu(x64emu_t *emu, uintptr_t fcn) { iFppppiu_t fn = (iFppppiu_t)fcn; R
 void iFppppip(x64emu_t *emu, uintptr_t fcn) { iFppppip_t fn = (iFppppip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void iFppppup(x64emu_t *emu, uintptr_t fcn) { iFppppup_t fn = (iFppppup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void iFpppppi(x64emu_t *emu, uintptr_t fcn) { iFpppppi_t fn = (iFpppppi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9); }
+void iFpppppL(x64emu_t *emu, uintptr_t fcn) { iFpppppL_t fn = (iFpppppL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9); }
 void iFpppppp(x64emu_t *emu, uintptr_t fcn) { iFpppppp_t fn = (iFpppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void uFEiippp(x64emu_t *emu, uintptr_t fcn) { uFEiippp_t fn = (uFEiippp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void uFEiuppp(x64emu_t *emu, uintptr_t fcn) { uFEiuppp_t fn = (uFEiuppp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
@@ -4718,6 +4914,9 @@ void uFpWuipp(x64emu_t *emu, uintptr_t fcn) { uFpWuipp_t fn = (uFpWuipp_t)fcn; R
 void uFpWuuCp(x64emu_t *emu, uintptr_t fcn) { uFpWuuCp_t fn = (uFpWuuCp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint8_t)R_R8, (void*)R_R9); }
 void uFpuippp(x64emu_t *emu, uintptr_t fcn) { uFpuippp_t fn = (uFpuippp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void uFpuuuup(x64emu_t *emu, uintptr_t fcn) { uFpuuuup_t fn = (uFpuuuup_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
+void uFpuuupp(x64emu_t *emu, uintptr_t fcn) { uFpuuupp_t fn = (uFpuuupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
+void uFpuuppp(x64emu_t *emu, uintptr_t fcn) { uFpuuppp_t fn = (uFpuuppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
+void uFpupupu(x64emu_t *emu, uintptr_t fcn) { uFpupupu_t fn = (uFpupupu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void uFppippp(x64emu_t *emu, uintptr_t fcn) { uFppippp_t fn = (uFppippp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void uFppuuup(x64emu_t *emu, uintptr_t fcn) { uFppuuup_t fn = (uFppuuup_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void uFppuupu(x64emu_t *emu, uintptr_t fcn) { uFppuupu_t fn = (uFppuupu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
@@ -4740,6 +4939,7 @@ void LFEppppi(x64emu_t *emu, uintptr_t fcn) { LFEppppi_t fn = (LFEppppi_t)fcn; R
 void LFpipipi(x64emu_t *emu, uintptr_t fcn) { LFpipipi_t fn = (LFpipipi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9); }
 void LFpLippp(x64emu_t *emu, uintptr_t fcn) { LFpLippp_t fn = (LFpLippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void LFpLLLLL(x64emu_t *emu, uintptr_t fcn) { LFpLLLLL_t fn = (LFpLLLLL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9); }
+void LFppLLpL(x64emu_t *emu, uintptr_t fcn) { LFppLLpL_t fn = (LFppLLpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (uintptr_t)R_R9); }
 void LFSpLiip(x64emu_t *emu, uintptr_t fcn) { LFSpLiip_t fn = (LFSpLiip_t)fcn; R_RAX=(uintptr_t)fn(io_convert((void*)R_RDI), (void*)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void pFEpiupp(x64emu_t *emu, uintptr_t fcn) { pFEpiupp_t fn = (pFEpiupp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
 void pFEpippp(x64emu_t *emu, uintptr_t fcn) { pFEpippp_t fn = (pFEpippp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
@@ -4758,14 +4958,17 @@ void pFiiiiid(x64emu_t *emu, uintptr_t fcn) { pFiiiiid_t fn = (pFiiiiid_t)fcn; R
 void pFipippp(x64emu_t *emu, uintptr_t fcn) { pFipippp_t fn = (pFipippp_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFWCiWCi(x64emu_t *emu, uintptr_t fcn) { pFWCiWCi_t fn = (pFWCiWCi_t)fcn; R_RAX=(uintptr_t)fn((uint16_t)R_RDI, (uint8_t)R_RSI, (int32_t)R_RDX, (uint16_t)R_RCX, (uint8_t)R_R8, (int32_t)R_R9); }
 void pFuuipip(x64emu_t *emu, uintptr_t fcn) { pFuuipip_t fn = (pFuuipip_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
+void pFuuuiip(x64emu_t *emu, uintptr_t fcn) { pFuuuiip_t fn = (pFuuuiip_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void pFuuuuii(x64emu_t *emu, uintptr_t fcn) { pFuuuuii_t fn = (pFuuuuii_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
 void pFuuuuuu(x64emu_t *emu, uintptr_t fcn) { pFuuuuuu_t fn = (pFuuuuuu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
 void pFuuuuup(x64emu_t *emu, uintptr_t fcn) { pFuuuuup_t fn = (pFuuuuup_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
+void pFuuppuu(x64emu_t *emu, uintptr_t fcn) { pFuuppuu_t fn = (pFuuppuu_t)fcn; R_RAX=(uintptr_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9); }
 void pFdddddd(x64emu_t *emu, uintptr_t fcn) { pFdddddd_t fn = (pFdddddd_t)fcn; R_RAX=(uintptr_t)fn(emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0], emu->xmm[4].d[0], emu->xmm[5].d[0]); }
 void pFpiiiiu(x64emu_t *emu, uintptr_t fcn) { pFpiiiiu_t fn = (pFpiiiiu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9); }
 void pFpiiipp(x64emu_t *emu, uintptr_t fcn) { pFpiiipp_t fn = (pFpiiipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFpiiCCC(x64emu_t *emu, uintptr_t fcn) { pFpiiCCC_t fn = (pFpiiCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9); }
 void pFpiUUUU(x64emu_t *emu, uintptr_t fcn) { pFpiUUUU_t fn = (pFpiUUUU_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9); }
+void pFpipipp(x64emu_t *emu, uintptr_t fcn) { pFpipipp_t fn = (pFpipipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFpippip(x64emu_t *emu, uintptr_t fcn) { pFpippip_t fn = (pFpippip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void pFpipppp(x64emu_t *emu, uintptr_t fcn) { pFpipppp_t fn = (pFpipppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFpCuuCC(x64emu_t *emu, uintptr_t fcn) { pFpCuuCC_t fn = (pFpCuuCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9); }
@@ -4776,18 +4979,26 @@ void pFpuuuuu(x64emu_t *emu, uintptr_t fcn) { pFpuuuuu_t fn = (pFpuuuuu_t)fcn; R
 void pFpuuupu(x64emu_t *emu, uintptr_t fcn) { pFpuuupu_t fn = (pFpuuupu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9); }
 void pFpuuUUU(x64emu_t *emu, uintptr_t fcn) { pFpuuUUU_t fn = (pFpuuUUU_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9); }
 void pFpupuui(x64emu_t *emu, uintptr_t fcn) { pFpupuui_t fn = (pFpupuui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (int32_t)R_R9); }
+void pFpuppip(x64emu_t *emu, uintptr_t fcn) { pFpuppip_t fn = (pFpuppip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void pFpupppp(x64emu_t *emu, uintptr_t fcn) { pFpupppp_t fn = (pFpupppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFplpppp(x64emu_t *emu, uintptr_t fcn) { pFplpppp_t fn = (pFplpppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
+void pFpLuLpp(x64emu_t *emu, uintptr_t fcn) { pFpLuLpp_t fn = (pFpLuLpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
+void pFpLpLLi(x64emu_t *emu, uintptr_t fcn) { pFpLpLLi_t fn = (pFpLpLLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9); }
 void pFpLppii(x64emu_t *emu, uintptr_t fcn) { pFpLppii_t fn = (pFpLppii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
+void pFpLppip(x64emu_t *emu, uintptr_t fcn) { pFpLppip_t fn = (pFpLppip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
+void pFpLppup(x64emu_t *emu, uintptr_t fcn) { pFpLppup_t fn = (pFpLppup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void pFppiiii(x64emu_t *emu, uintptr_t fcn) { pFppiiii_t fn = (pFppiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
 void pFppiipp(x64emu_t *emu, uintptr_t fcn) { pFppiipp_t fn = (pFppiipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFppiCCC(x64emu_t *emu, uintptr_t fcn) { pFppiCCC_t fn = (pFppiCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9); }
 void pFppiupp(x64emu_t *emu, uintptr_t fcn) { pFppiupp_t fn = (pFppiupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
+void pFppilpp(x64emu_t *emu, uintptr_t fcn) { pFppilpp_t fn = (pFppilpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (intptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFppipip(x64emu_t *emu, uintptr_t fcn) { pFppipip_t fn = (pFppipip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9); }
 void pFppippi(x64emu_t *emu, uintptr_t fcn) { pFppippi_t fn = (pFppippi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9); }
 void pFppippp(x64emu_t *emu, uintptr_t fcn) { pFppippp_t fn = (pFppippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
+void pFppuupp(x64emu_t *emu, uintptr_t fcn) { pFppuupp_t fn = (pFppuupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFppupii(x64emu_t *emu, uintptr_t fcn) { pFppupii_t fn = (pFppupii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9); }
 void pFppuppp(x64emu_t *emu, uintptr_t fcn) { pFppuppp_t fn = (pFppuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
+void pFpplplp(x64emu_t *emu, uintptr_t fcn) { pFpplplp_t fn = (pFpplplp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (intptr_t)R_R8, (void*)R_R9); }
 void pFpplppp(x64emu_t *emu, uintptr_t fcn) { pFpplppp_t fn = (pFpplppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void pFpppiup(x64emu_t *emu, uintptr_t fcn) { pFpppiup_t fn = (pFpppiup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9); }
 void pFpppupp(x64emu_t *emu, uintptr_t fcn) { pFpppupp_t fn = (pFpppupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9); }
@@ -4872,6 +5083,7 @@ void vFpipipii(x64emu_t *emu, uintptr_t fcn) { vFpipipii_t fn = (vFpipipii_t)fcn
 void vFpippppu(x64emu_t *emu, uintptr_t fcn) { vFpippppu_t fn = (vFpippppu_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void vFpuuuuuu(x64emu_t *emu, uintptr_t fcn) { vFpuuuuuu_t fn = (vFpuuuuuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void vFpuuUUuu(x64emu_t *emu, uintptr_t fcn) { vFpuuUUuu_t fn = (vFpuuUUuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
+void vFpuupupu(x64emu_t *emu, uintptr_t fcn) { vFpuupupu_t fn = (vFpuupupu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void vFpuupppp(x64emu_t *emu, uintptr_t fcn) { vFpuupppp_t fn = (vFpuupppp_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void vFpupuuup(x64emu_t *emu, uintptr_t fcn) { vFpupuuup_t fn = (vFpupuuup_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8)); }
 void vFpupppui(x64emu_t *emu, uintptr_t fcn) { vFpupppui_t fn = (vFpupppui_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
@@ -4906,6 +5118,7 @@ void vFpppiipp(x64emu_t *emu, uintptr_t fcn) { vFpppiipp_t fn = (vFpppiipp_t)fcn
 void vFpppiupi(x64emu_t *emu, uintptr_t fcn) { vFpppiupi_t fn = (vFpppiupi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
 void vFpppippi(x64emu_t *emu, uintptr_t fcn) { vFpppippi_t fn = (vFpppippi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
 void vFpppuuuu(x64emu_t *emu, uintptr_t fcn) { vFpppuuuu_t fn = (vFpppuuuu_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
+void vFpppffff(x64emu_t *emu, uintptr_t fcn) { vFpppffff_t fn = (vFpppffff_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], emu->xmm[3].f[0]); }
 void vFppppiip(x64emu_t *emu, uintptr_t fcn) { vFppppiip_t fn = (vFppppiip_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void vFppppiui(x64emu_t *emu, uintptr_t fcn) { vFppppiui_t fn = (vFppppiui_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void vFppppipi(x64emu_t *emu, uintptr_t fcn) { vFppppipi_t fn = (vFppppipi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
@@ -4922,6 +5135,7 @@ void iFEpppiiu(x64emu_t *emu, uintptr_t fcn) { iFEpppiiu_t fn = (iFEpppiiu_t)fcn
 void iFEpppppL(x64emu_t *emu, uintptr_t fcn) { iFEpppppL_t fn = (iFEpppppL_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9); }
 void iFEpppppp(x64emu_t *emu, uintptr_t fcn) { iFEpppppp_t fn = (iFEpppppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFiiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiiip_t fn = (iFiiiiiip_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
+void iFipupupi(x64emu_t *emu, uintptr_t fcn) { iFipupupi_t fn = (iFipupupi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
 void iFpiiiiii(x64emu_t *emu, uintptr_t fcn) { iFpiiiiii_t fn = (iFpiiiiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void iFpiiiiip(x64emu_t *emu, uintptr_t fcn) { iFpiiiiip_t fn = (iFpiiiiip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void iFpiiiuwp(x64emu_t *emu, uintptr_t fcn) { iFpiiiuwp_t fn = (iFpiiiuwp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (int16_t)R_R9, *(void**)(R_RSP + 8)); }
@@ -4932,10 +5146,12 @@ void iFpiuLiii(x64emu_t *emu, uintptr_t fcn) { iFpiuLiii_t fn = (iFpiuLiii_t)fcn
 void iFpiupppp(x64emu_t *emu, uintptr_t fcn) { iFpiupppp_t fn = (iFpiupppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpiLuupp(x64emu_t *emu, uintptr_t fcn) { iFpiLuupp_t fn = (iFpiLuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpiLuppp(x64emu_t *emu, uintptr_t fcn) { iFpiLuppp_t fn = (iFpiLuppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (uintptr_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void iFpipiiip(x64emu_t *emu, uintptr_t fcn) { iFpipiiip_t fn = (iFpipiiip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void iFpipipip(x64emu_t *emu, uintptr_t fcn) { iFpipipip_t fn = (iFpipipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void iFpipippp(x64emu_t *emu, uintptr_t fcn) { iFpipippp_t fn = (iFpipippp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpippLpp(x64emu_t *emu, uintptr_t fcn) { iFpippLpp_t fn = (iFpippLpp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpippppW(x64emu_t *emu, uintptr_t fcn) { iFpippppW_t fn = (iFpippppW_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint16_t*)(R_RSP + 8)); }
+void iFpippppp(x64emu_t *emu, uintptr_t fcn) { iFpippppp_t fn = (iFpippppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpIIpppp(x64emu_t *emu, uintptr_t fcn) { iFpIIpppp_t fn = (iFpIIpppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpWCiWCi(x64emu_t *emu, uintptr_t fcn) { iFpWCiWCi_t fn = (iFpWCiWCi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint8_t)R_RDX, (int32_t)R_RCX, (uint16_t)R_R8, (uint8_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void iFpWppppW(x64emu_t *emu, uintptr_t fcn) { iFpWppppW_t fn = (iFpWppppW_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint16_t*)(R_RSP + 8)); }
@@ -4981,6 +5197,7 @@ void iFpppiuwu(x64emu_t *emu, uintptr_t fcn) { iFpppiuwu_t fn = (iFpppiuwu_t)fcn
 void iFpppippi(x64emu_t *emu, uintptr_t fcn) { iFpppippi_t fn = (iFpppippi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
 void iFpppippp(x64emu_t *emu, uintptr_t fcn) { iFpppippp_t fn = (iFpppippp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFpppuiii(x64emu_t *emu, uintptr_t fcn) { iFpppuiii_t fn = (iFpppuiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
+void iFpppLppp(x64emu_t *emu, uintptr_t fcn) { iFpppLppp_t fn = (iFpppLppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFppppilp(x64emu_t *emu, uintptr_t fcn) { iFppppilp_t fn = (iFppppilp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (intptr_t)R_R9, *(void**)(R_RSP + 8)); }
 void iFppppipp(x64emu_t *emu, uintptr_t fcn) { iFppppipp_t fn = (iFppppipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void iFppppdpu(x64emu_t *emu, uintptr_t fcn) { iFppppdpu_t fn = (iFppppdpu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, emu->xmm[0].d[0], (void*)R_R8, (uint32_t)R_R9); }
@@ -4995,6 +5212,8 @@ void uFEpppppp(x64emu_t *emu, uintptr_t fcn) { uFEpppppp_t fn = (uFEpppppp_t)fcn
 void uFiiiuuuu(x64emu_t *emu, uintptr_t fcn) { uFiiiuuuu_t fn = (uFiiiuuuu_t)fcn; R_RAX=(uint32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void uFuippppp(x64emu_t *emu, uintptr_t fcn) { uFuippppp_t fn = (uFuippppp_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void uFpippppp(x64emu_t *emu, uintptr_t fcn) { uFpippppp_t fn = (uFpippppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void uFpuuuupp(x64emu_t *emu, uintptr_t fcn) { uFpuuuupp_t fn = (uFpuuuupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void uFpuuuppp(x64emu_t *emu, uintptr_t fcn) { uFpuuuppp_t fn = (uFpuuuppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void uFpuupppp(x64emu_t *emu, uintptr_t fcn) { uFpuupppp_t fn = (uFpuupppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void uFppiuppp(x64emu_t *emu, uintptr_t fcn) { uFppiuppp_t fn = (uFppiuppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void uFppuuuup(x64emu_t *emu, uintptr_t fcn) { uFppuuuup_t fn = (uFppuuuup_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8)); }
@@ -5028,28 +5247,37 @@ void pFpuupwwC(x64emu_t *emu, uintptr_t fcn) { pFpuupwwC_t fn = (pFpuupwwC_t)fcn
 void pFpupiipp(x64emu_t *emu, uintptr_t fcn) { pFpupiipp_t fn = (pFpupiipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpuppipp(x64emu_t *emu, uintptr_t fcn) { pFpuppipp_t fn = (pFpuppipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFplppppp(x64emu_t *emu, uintptr_t fcn) { pFplppppp_t fn = (pFplppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void pFpLLppup(x64emu_t *emu, uintptr_t fcn) { pFpLLppup_t fn = (pFpLLppup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8)); }
+void pFpLpipip(x64emu_t *emu, uintptr_t fcn) { pFpLpipip_t fn = (pFpLpipip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
+void pFpLpLLiL(x64emu_t *emu, uintptr_t fcn) { pFpLpLLiL_t fn = (pFpLpLLiL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(uintptr_t*)(R_RSP + 8)); }
 void pFpLppiip(x64emu_t *emu, uintptr_t fcn) { pFpLppiip_t fn = (pFpLppiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
+void pFpLppLLi(x64emu_t *emu, uintptr_t fcn) { pFpLppLLi_t fn = (pFpLppLLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFppiiipp(x64emu_t *emu, uintptr_t fcn) { pFppiiipp_t fn = (pFppiiipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppiiCCC(x64emu_t *emu, uintptr_t fcn) { pFppiiCCC_t fn = (pFppiiCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(uint8_t*)(R_RSP + 8)); }
+void pFppiippp(x64emu_t *emu, uintptr_t fcn) { pFppiippp_t fn = (pFppiippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppipipp(x64emu_t *emu, uintptr_t fcn) { pFppipipp_t fn = (pFppipipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppipLpp(x64emu_t *emu, uintptr_t fcn) { pFppipLpp_t fn = (pFppipLpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppuippp(x64emu_t *emu, uintptr_t fcn) { pFppuippp_t fn = (pFppuippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppuuupp(x64emu_t *emu, uintptr_t fcn) { pFppuuupp_t fn = (pFppuuupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFppuuppp(x64emu_t *emu, uintptr_t fcn) { pFppuuppp_t fn = (pFppuuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void pFppuLLip(x64emu_t *emu, uintptr_t fcn) { pFppuLLip_t fn = (pFppuLLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void pFppliuip(x64emu_t *emu, uintptr_t fcn) { pFppliuip_t fn = (pFppliuip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
 void pFpplipup(x64emu_t *emu, uintptr_t fcn) { pFpplipup_t fn = (pFpplipup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8)); }
 void pFppLipip(x64emu_t *emu, uintptr_t fcn) { pFppLipip_t fn = (pFppLipip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8)); }
+void pFppLLiLi(x64emu_t *emu, uintptr_t fcn) { pFppLLiLi_t fn = (pFppLLiLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (uintptr_t)R_RCX, (int32_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppccci(x64emu_t *emu, uintptr_t fcn) { pFpppccci_t fn = (pFpppccci_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int8_t)R_RCX, (int8_t)R_R8, (int8_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppiiii(x64emu_t *emu, uintptr_t fcn) { pFpppiiii_t fn = (pFpppiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppCCCi(x64emu_t *emu, uintptr_t fcn) { pFpppCCCi_t fn = (pFpppCCCi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint8_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppuipp(x64emu_t *emu, uintptr_t fcn) { pFpppuipp_t fn = (pFpppuipp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpppuuui(x64emu_t *emu, uintptr_t fcn) { pFpppuuui_t fn = (pFpppuuui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppuupp(x64emu_t *emu, uintptr_t fcn) { pFpppuupp_t fn = (pFpppuupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
+void pFpppupup(x64emu_t *emu, uintptr_t fcn) { pFpppupup_t fn = (pFpppupup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8)); }
 void pFpppuppp(x64emu_t *emu, uintptr_t fcn) { pFpppuppp_t fn = (pFpppuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpppfffi(x64emu_t *emu, uintptr_t fcn) { pFpppfffi_t fn = (pFpppfffi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], (int32_t)R_RCX); }
 void pFpppdddi(x64emu_t *emu, uintptr_t fcn) { pFpppdddi_t fn = (pFpppdddi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], (int32_t)R_RCX); }
 void pFpppllli(x64emu_t *emu, uintptr_t fcn) { pFpppllli_t fn = (pFpppllli_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (intptr_t)R_RCX, (intptr_t)R_R8, (intptr_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFpppLLLi(x64emu_t *emu, uintptr_t fcn) { pFpppLLLi_t fn = (pFpppLLLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8)); }
+void pFppppiii(x64emu_t *emu, uintptr_t fcn) { pFppppiii_t fn = (pFppppiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFppppuuu(x64emu_t *emu, uintptr_t fcn) { pFppppuuu_t fn = (pFppppuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void pFpppppuu(x64emu_t *emu, uintptr_t fcn) { pFpppppuu_t fn = (pFpppppuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void pFppppppu(x64emu_t *emu, uintptr_t fcn) { pFppppppu_t fn = (pFppppppu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8)); }
@@ -5096,6 +5324,7 @@ void vFuuuuuuuu(x64emu_t *emu, uintptr_t fcn) { vFuuuuuuuu_t fn = (vFuuuuuuuu_t)
 void vFuuufffff(x64emu_t *emu, uintptr_t fcn) { vFuuufffff_t fn = (vFuuufffff_t)fcn; fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], emu->xmm[3].f[0], emu->xmm[4].f[0]); }
 void vFffffffff(x64emu_t *emu, uintptr_t fcn) { vFffffffff_t fn = (vFffffffff_t)fcn; fn(emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], emu->xmm[3].f[0], emu->xmm[4].f[0], emu->xmm[5].f[0], emu->xmm[6].f[0], emu->xmm[7].f[0]); }
 void vFpiiiiiii(x64emu_t *emu, uintptr_t fcn) { vFpiiiiiii_t fn = (vFpiiiiiii_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void vFpiiiiiip(x64emu_t *emu, uintptr_t fcn) { vFpiiiiiip_t fn = (vFpiiiiiip_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void vFpiiiipii(x64emu_t *emu, uintptr_t fcn) { vFpiiiipii_t fn = (vFpiiiipii_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
 void vFpiiULipp(x64emu_t *emu, uintptr_t fcn) { vFpiiULipp_t fn = (vFpiiULipp_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (uint64_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void vFpiUuupup(x64emu_t *emu, uintptr_t fcn) { vFpiUuupup_t fn = (vFpiUuupup_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (uint64_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
@@ -5133,7 +5362,10 @@ void iFiiiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiiiip_t fn = (iFiiiiiiip_t)
 void iFiiupiupi(x64emu_t *emu, uintptr_t fcn) { iFiiupiupi_t fn = (iFiiupiupi_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
 void iFipippppp(x64emu_t *emu, uintptr_t fcn) { iFipippppp_t fn = (iFipippppp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFuuuuuuuu(x64emu_t *emu, uintptr_t fcn) { iFuuuuuuuu_t fn = (iFuuuuuuuu_t)fcn; R_RAX=(int32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
+void iFdiippppL(x64emu_t *emu, uintptr_t fcn) { iFdiippppL_t fn = (iFdiippppL_t)fcn; R_RAX=(int32_t)fn(emu->xmm[0].d[0], (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(uintptr_t*)(R_RSP + 8)); }
+void iFpipiipip(x64emu_t *emu, uintptr_t fcn) { iFpipiipip_t fn = (iFpipiipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpippuuii(x64emu_t *emu, uintptr_t fcn) { iFpippuuii_t fn = (iFpippuuii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void iFpippuupp(x64emu_t *emu, uintptr_t fcn) { iFpippuupp_t fn = (iFpippuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpCCWWpWu(x64emu_t *emu, uintptr_t fcn) { iFpCCWWpWu_t fn = (iFpCCWWpWu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint16_t)R_RCX, (uint16_t)R_R8, (void*)R_R9, *(uint16_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFpWCuWCuu(x64emu_t *emu, uintptr_t fcn) { iFpWCuWCuu_t fn = (iFpWCuWCuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint8_t)R_RDX, (uint32_t)R_RCX, (uint16_t)R_R8, (uint8_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFpWWipppp(x64emu_t *emu, uintptr_t fcn) { iFpWWipppp_t fn = (iFpWWipppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint16_t)R_RSI, (uint16_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
@@ -5143,6 +5375,8 @@ void iFpuuiiiii(x64emu_t *emu, uintptr_t fcn) { iFpuuiiiii_t fn = (iFpuuiiiii_t)
 void iFpuuipppp(x64emu_t *emu, uintptr_t fcn) { iFpuuipppp_t fn = (iFpuuipppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpuuupupu(x64emu_t *emu, uintptr_t fcn) { iFpuuupupu_t fn = (iFpuuupupu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFpuupuupp(x64emu_t *emu, uintptr_t fcn) { iFpuupuupp_t fn = (iFpuupuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void iFpuuppiip(x64emu_t *emu, uintptr_t fcn) { iFpuuppiip_t fn = (iFpuuppiip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void iFpuuppppp(x64emu_t *emu, uintptr_t fcn) { iFpuuppppp_t fn = (iFpuuppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpupppWWu(x64emu_t *emu, uintptr_t fcn) { iFpupppWWu_t fn = (iFpupppWWu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFpupppppp(x64emu_t *emu, uintptr_t fcn) { iFpupppppp_t fn = (iFpupppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpUuuLpUi(x64emu_t *emu, uintptr_t fcn) { iFpUuuLpUi_t fn = (iFpUuuLpUi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(uint64_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
@@ -5152,8 +5386,10 @@ void iFpLLLiipi(x64emu_t *emu, uintptr_t fcn) { iFpLLLiipi_t fn = (iFpLLLiipi_t)
 void iFpLLppppp(x64emu_t *emu, uintptr_t fcn) { iFpLLppppp_t fn = (iFpLLppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpLpipppp(x64emu_t *emu, uintptr_t fcn) { iFpLpipppp_t fn = (iFpLpipppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpLppLpip(x64emu_t *emu, uintptr_t fcn) { iFpLppLpip_t fn = (iFpLppLpip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void iFpLpppupu(x64emu_t *emu, uintptr_t fcn) { iFpLpppupu_t fn = (iFpLpppupu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFpLpppppp(x64emu_t *emu, uintptr_t fcn) { iFpLpppppp_t fn = (iFpLpppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFppiiipip(x64emu_t *emu, uintptr_t fcn) { iFppiiipip_t fn = (iFppiiipip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void iFppillppp(x64emu_t *emu, uintptr_t fcn) { iFppillppp_t fn = (iFppillppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (intptr_t)R_RCX, (intptr_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFppIIIppp(x64emu_t *emu, uintptr_t fcn) { iFppIIIppp_t fn = (iFppIIIppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (int64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFppuiiuuu(x64emu_t *emu, uintptr_t fcn) { iFppuiiuuu_t fn = (iFppuiiuuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void iFppuuuuuu(x64emu_t *emu, uintptr_t fcn) { iFppuuuuuu_t fn = (iFppuuuuuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
@@ -5161,6 +5397,7 @@ void iFppuppppp(x64emu_t *emu, uintptr_t fcn) { iFppuppppp_t fn = (iFppuppppp_t)
 void iFpppiiipi(x64emu_t *emu, uintptr_t fcn) { iFpppiiipi_t fn = (iFpppiiipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
 void iFpppiiipp(x64emu_t *emu, uintptr_t fcn) { iFpppiiipp_t fn = (iFpppiiipp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFpppipipi(x64emu_t *emu, uintptr_t fcn) { iFpppipipi_t fn = (iFpppipipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void iFppppiiup(x64emu_t *emu, uintptr_t fcn) { iFppppiiup_t fn = (iFppppiiup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFppppippp(x64emu_t *emu, uintptr_t fcn) { iFppppippp_t fn = (iFppppippp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iFppppppii(x64emu_t *emu, uintptr_t fcn) { iFppppppii_t fn = (iFppppppii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
 void iFpppppppi(x64emu_t *emu, uintptr_t fcn) { iFpppppppi_t fn = (iFpppppppi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
@@ -5174,12 +5411,13 @@ void uFEppppppp(x64emu_t *emu, uintptr_t fcn) { uFEppppppp_t fn = (uFEppppppp_t)
 void uFuipppppp(x64emu_t *emu, uintptr_t fcn) { uFuipppppp_t fn = (uFuipppppp_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFuupuuiuf(x64emu_t *emu, uintptr_t fcn) { uFuupuuiuf_t fn = (uFuupuuiuf_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (int32_t)R_R9, *(uint32_t*)(R_RSP + 8), emu->xmm[0].f[0]); }
 void uFulpppppp(x64emu_t *emu, uintptr_t fcn) { uFulpppppp_t fn = (uFulpppppp_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void uFpuupupuu(x64emu_t *emu, uintptr_t fcn) { uFpuupupuu_t fn = (uFpuupupuu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void uFpupuuuCp(x64emu_t *emu, uintptr_t fcn) { uFpupuuuCp_t fn = (uFpupuuuCp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint8_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFppuuuupp(x64emu_t *emu, uintptr_t fcn) { uFppuuuupp_t fn = (uFppuuuupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFppuuuppu(x64emu_t *emu, uintptr_t fcn) { uFppuuuppu_t fn = (uFppuuuppu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void uFppuppppp(x64emu_t *emu, uintptr_t fcn) { uFppuppppp_t fn = (uFppuppppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFpppppupp(x64emu_t *emu, uintptr_t fcn) { uFpppppupp_t fn = (uFpppppupp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
-void LFELpLpLpi(x64emu_t *emu, uintptr_t fcn) { LFELpLpLpi_t fn = (LFELpLpLpi_t)fcn; R_RAX=(uintptr_t)fn(emu, (uintptr_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8)); }
+void LFELpupupu(x64emu_t *emu, uintptr_t fcn) { LFELpupupu_t fn = (LFELpupupu_t)fcn; R_RAX=(uintptr_t)fn(emu, (uintptr_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8)); }
 void LFEpiupppp(x64emu_t *emu, uintptr_t fcn) { LFEpiupppp_t fn = (LFEpiupppp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void LFpLpuuLLu(x64emu_t *emu, uintptr_t fcn) { LFpLpuuLLu_t fn = (LFpLpuuLLu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uintptr_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16)); }
 void pFEiplllpp(x64emu_t *emu, uintptr_t fcn) { pFEiplllpp_t fn = (pFEiplllpp_t)fcn; R_RAX=(uintptr_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (intptr_t)R_RCX, (intptr_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
@@ -5207,7 +5445,14 @@ void pFpuuupwwp(x64emu_t *emu, uintptr_t fcn) { pFpuuupwwp_t fn = (pFpuuupwwp_t)
 void pFpupppppp(x64emu_t *emu, uintptr_t fcn) { pFpupppppp_t fn = (pFpupppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void pFpdwwWWui(x64emu_t *emu, uintptr_t fcn) { pFpdwwWWui_t fn = (pFpdwwWWui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, emu->xmm[0].d[0], (int16_t)R_RSI, (int16_t)R_RDX, (uint16_t)R_RCX, (uint16_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8)); }
 void pFplpppppp(x64emu_t *emu, uintptr_t fcn) { pFplpppppp_t fn = (pFplpppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void pFpLuLpLip(x64emu_t *emu, uintptr_t fcn) { pFpLuLpLip_t fn = (pFpLuLpLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uint32_t)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void pFpLpipLup(x64emu_t *emu, uintptr_t fcn) { pFpLpipLup_t fn = (pFpLpipLup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void pFpLpLLiLi(x64emu_t *emu, uintptr_t fcn) { pFpLpLLiLi_t fn = (pFpLpLLiLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void pFpLppuLLp(x64emu_t *emu, uintptr_t fcn) { pFpLppuLLp_t fn = (pFpLppuLLp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uintptr_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(void**)(R_RSP + 16)); }
+void pFpLppLLiL(x64emu_t *emu, uintptr_t fcn) { pFpLppLLiL_t fn = (pFpLppLLiL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16)); }
 void pFppiiiiii(x64emu_t *emu, uintptr_t fcn) { pFppiiiiii_t fn = (pFppiiiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void pFpppipipi(x64emu_t *emu, uintptr_t fcn) { pFpppipipi_t fn = (pFpppipipi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
+void pFppplippp(x64emu_t *emu, uintptr_t fcn) { pFppplippp_t fn = (pFppplippp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (intptr_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void pFppppuppp(x64emu_t *emu, uintptr_t fcn) { pFppppuppp_t fn = (pFppppuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void pFpppppupp(x64emu_t *emu, uintptr_t fcn) { pFpppppupp_t fn = (pFpppppupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void iWEpuuiipp(x64emu_t *emu, uintptr_t fcn) { iWEpuuiipp_t fn = (iWEpuuiipp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RCX, (uint32_t)R_RDX, (uint32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56)); }
@@ -5247,6 +5492,7 @@ void vFddddddddd(x64emu_t *emu, uintptr_t fcn) { vFddddddddd_t fn = (vFddddddddd
 void vFpiuippppi(x64emu_t *emu, uintptr_t fcn) { vFpiuippppi_t fn = (vFpiuippppi_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void vFpipiuiipp(x64emu_t *emu, uintptr_t fcn) { vFpipiuiipp_t fn = (vFpipiuiipp_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void vFpipppiipi(x64emu_t *emu, uintptr_t fcn) { vFpipppiipi_t fn = (vFpipppiipi_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
+void vFpuuuuuuuu(x64emu_t *emu, uintptr_t fcn) { vFpuuuuuuuu_t fn = (vFpuuuuuuuu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24)); }
 void vFpLpppippp(x64emu_t *emu, uintptr_t fcn) { vFpLpppippp_t fn = (vFpLpppippp_t)fcn; fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void vFppiiiiiii(x64emu_t *emu, uintptr_t fcn) { vFppiiiiiii_t fn = (vFppiiiiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void vFppiiiiipi(x64emu_t *emu, uintptr_t fcn) { vFppiiiiipi_t fn = (vFppiiiiipi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
@@ -5267,6 +5513,7 @@ void vFppUUiUUUU(x64emu_t *emu, uintptr_t fcn) { vFppUUiUUUU_t fn = (vFppUUiUUUU
 void vFppddddudd(x64emu_t *emu, uintptr_t fcn) { vFppddddudd_t fn = (vFppddddudd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0], (uint32_t)R_RDX, emu->xmm[4].d[0], emu->xmm[5].d[0]); }
 void vFpplpppppi(x64emu_t *emu, uintptr_t fcn) { vFpplpppppi_t fn = (vFpplpppppi_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void vFpppiiiiii(x64emu_t *emu, uintptr_t fcn) { vFpppiiiiii_t fn = (vFpppiiiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
+void vFpppffffff(x64emu_t *emu, uintptr_t fcn) { vFpppffffff_t fn = (vFpppffffff_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0], emu->xmm[3].f[0], emu->xmm[4].f[0], emu->xmm[5].f[0]); }
 void vFppppipiip(x64emu_t *emu, uintptr_t fcn) { vFppppipiip_t fn = (vFppppipiip_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void vFpppppippp(x64emu_t *emu, uintptr_t fcn) { vFpppppippp_t fn = (vFpppppippp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void iFEpiiiiipi(x64emu_t *emu, uintptr_t fcn) { iFEpiiiiipi_t fn = (iFEpiiiiipi_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16)); }
@@ -5287,6 +5534,7 @@ void iFpduuuLuLp(x64emu_t *emu, uintptr_t fcn) { iFpduuuLuLp_t fn = (iFpduuuLuLp
 void iFpLiuiiLLL(x64emu_t *emu, uintptr_t fcn) { iFpLiuiiLLL_t fn = (iFpLiuiiLLL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(uintptr_t*)(R_RSP + 24)); }
 void iFpLLiiuuii(x64emu_t *emu, uintptr_t fcn) { iFpLLiiuuii_t fn = (iFpLLiiuuii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void iFpLpiiuuii(x64emu_t *emu, uintptr_t fcn) { iFpLpiiuuii_t fn = (iFpLpiiuuii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
+void iFpLpppupup(x64emu_t *emu, uintptr_t fcn) { iFpLpppupup_t fn = (iFpLpppupup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void iFpLppppppp(x64emu_t *emu, uintptr_t fcn) { iFpLppppppp_t fn = (iFpLppppppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void iFppiiiiiii(x64emu_t *emu, uintptr_t fcn) { iFppiiiiiii_t fn = (iFppiiiiiii_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void iFppippippp(x64emu_t *emu, uintptr_t fcn) { iFppippippp_t fn = (iFppippippp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
@@ -5301,6 +5549,7 @@ void iFppppppppp(x64emu_t *emu, uintptr_t fcn) { iFppppppppp_t fn = (iFppppppppp
 void uFEipippppp(x64emu_t *emu, uintptr_t fcn) { uFEipippppp_t fn = (uFEipippppp_t)fcn; R_RAX=(uint32_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFEpppufppp(x64emu_t *emu, uintptr_t fcn) { uFEpppufppp_t fn = (uFEpppufppp_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, emu->xmm[0].f[0], (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void uFuulpiuiuf(x64emu_t *emu, uintptr_t fcn) { uFuulpiuiuf_t fn = (uFuulpiuiuf_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (intptr_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), emu->xmm[0].f[0]); }
+void uFpuupuppuu(x64emu_t *emu, uintptr_t fcn) { uFpuupuppuu_t fn = (uFpuupuppuu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24)); }
 void uFppLpLuppp(x64emu_t *emu, uintptr_t fcn) { uFppLpLuppp_t fn = (uFppLpLuppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (uint32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void uFppppppppp(x64emu_t *emu, uintptr_t fcn) { uFppppppppp_t fn = (uFppppppppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void lFpppipiipp(x64emu_t *emu, uintptr_t fcn) { lFpppipiipp_t fn = (lFpppipiipp_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (void*)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
@@ -5318,6 +5567,8 @@ void pFpiiCpWWup(x64emu_t *emu, uintptr_t fcn) { pFpiiCpWWup_t fn = (pFpiiCpWWup
 void pFpCuWCCuuu(x64emu_t *emu, uintptr_t fcn) { pFpCuWCCuuu_t fn = (pFpCuWCCuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (uint16_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24)); }
 void pFpuuwwWWww(x64emu_t *emu, uintptr_t fcn) { pFpuuwwWWww_t fn = (pFpuuwwWWww_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (int16_t)R_RCX, (int16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(int16_t*)(R_RSP + 16), *(int16_t*)(R_RSP + 24)); }
 void pFpupuuuuup(x64emu_t *emu, uintptr_t fcn) { pFpupuuuuup_t fn = (pFpupuuuuup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); }
+void pFpLpLLipui(x64emu_t *emu, uintptr_t fcn) { pFpLpLLipui_t fn = (pFpLpLLipui_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
+void pFpLppLLiLi(x64emu_t *emu, uintptr_t fcn) { pFpLppLLiLi_t fn = (pFpLppLLiLi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8, (uintptr_t)R_R9, *(int32_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
 void pFppiiiiiip(x64emu_t *emu, uintptr_t fcn) { pFppiiiiiip_t fn = (pFppiiiiiip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void pFppipppppp(x64emu_t *emu, uintptr_t fcn) { pFppipppppp_t fn = (pFppipppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void pFpppiiiiii(x64emu_t *emu, uintptr_t fcn) { pFpppiiiiii_t fn = (pFpppiiiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24)); }
@@ -5366,6 +5617,7 @@ void vFppuuppppii(x64emu_t *emu, uintptr_t fcn) { vFppuuppppii_t fn = (vFppuuppp
 void vFppuppuiiii(x64emu_t *emu, uintptr_t fcn) { vFppuppuiiii_t fn = (vFppuppuiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uint32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void vFppupppiiii(x64emu_t *emu, uintptr_t fcn) { vFppupppiiii_t fn = (vFppupppiiii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void vFppdddddddd(x64emu_t *emu, uintptr_t fcn) { vFppdddddddd_t fn = (vFppdddddddd_t)fcn; fn((void*)R_RDI, (void*)R_RSI, emu->xmm[0].d[0], emu->xmm[1].d[0], emu->xmm[2].d[0], emu->xmm[3].d[0], emu->xmm[4].d[0], emu->xmm[5].d[0], emu->xmm[6].d[0], emu->xmm[7].d[0]); }
+void vFppppppppii(x64emu_t *emu, uintptr_t fcn) { vFppppppppii_t fn = (vFppppppppii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void vFpppppppppp(x64emu_t *emu, uintptr_t fcn) { vFpppppppppp_t fn = (vFpppppppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); }
 void iFEpiiiiippp(x64emu_t *emu, uintptr_t fcn) { iFEpiiiiippp_t fn = (iFEpiiiiippp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
 void iFEpupppLppL(x64emu_t *emu, uintptr_t fcn) { iFEpupppLppL_t fn = (iFEpupppLppL_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(uintptr_t*)(R_RSP + 24)); }
@@ -5380,7 +5632,9 @@ void iFppuuiiiiii(x64emu_t *emu, uintptr_t fcn) { iFppuuiiiiii_t fn = (iFppuuiii
 void iFppuuiiuupi(x64emu_t *emu, uintptr_t fcn) { iFppuuiiuupi_t fn = (iFppuuiiuupi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void iFpppiiipipi(x64emu_t *emu, uintptr_t fcn) { iFpppiiipipi_t fn = (iFpppiiipipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void iFpppLLipppp(x64emu_t *emu, uintptr_t fcn) { iFpppLLipppp_t fn = (iFpppLLipppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (uintptr_t)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); }
+void iFpppppiiuup(x64emu_t *emu, uintptr_t fcn) { iFpppppiiuup_t fn = (iFpppppiiuup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); }
 void iFpppppppipi(x64emu_t *emu, uintptr_t fcn) { iFpppppppipi_t fn = (iFpppppppipi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(void**)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
+void iFpppppppppu(x64emu_t *emu, uintptr_t fcn) { iFpppppppppu_t fn = (iFpppppppppu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(uint32_t*)(R_RSP + 32)); }
 void uFpddpippppp(x64emu_t *emu, uintptr_t fcn) { uFpddpippppp_t fn = (uFpddpippppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, emu->xmm[0].d[0], emu->xmm[1].d[0], (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16)); }
 void uFpppppppppp(x64emu_t *emu, uintptr_t fcn) { uFpppppppppp_t fn = (uFpppppppppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); }
 void pFEiippppppp(x64emu_t *emu, uintptr_t fcn) { pFEiippppppp_t fn = (pFEiippppppp_t)fcn; R_RAX=(uintptr_t)fn(emu, (int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24)); }
@@ -5391,6 +5645,7 @@ void pFpuwwWWuCuu(x64emu_t *emu, uintptr_t fcn) { pFpuwwWWuCuu_t fn = (pFpuwwWWu
 void pFpuuuwwwwWW(x64emu_t *emu, uintptr_t fcn) { pFpuuuwwwwWW_t fn = (pFpuuuwwwwWW_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int16_t)R_R8, (int16_t)R_R9, *(int16_t*)(R_RSP + 8), *(int16_t*)(R_RSP + 16), *(uint16_t*)(R_RSP + 24), *(uint16_t*)(R_RSP + 32)); }
 void pFpuuuWWWCCi(x64emu_t *emu, uintptr_t fcn) { pFpuuuWWWCCi_t fn = (pFpuuuWWWCCi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint8_t*)(R_RSP + 16), *(uint8_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void pFplllllllll(x64emu_t *emu, uintptr_t fcn) { pFplllllllll_t fn = (pFplllllllll_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (intptr_t)R_RDX, (intptr_t)R_RCX, (intptr_t)R_R8, (intptr_t)R_R9, *(intptr_t*)(R_RSP + 8), *(intptr_t*)(R_RSP + 16), *(intptr_t*)(R_RSP + 24), *(intptr_t*)(R_RSP + 32)); }
+void pFppippLLLip(x64emu_t *emu, uintptr_t fcn) { pFppippLLLip_t fn = (pFppippLLLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); }
 void pFppuiipuuii(x64emu_t *emu, uintptr_t fcn) { pFppuiipuuii_t fn = (pFppuiipuuii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void pFpppiiiiiii(x64emu_t *emu, uintptr_t fcn) { pFpppiiiiiii_t fn = (pFpppiiiiiii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32)); }
 void pFpppppppppp(x64emu_t *emu, uintptr_t fcn) { pFpppppppppp_t fn = (pFpppppppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32)); }
@@ -5437,6 +5692,7 @@ void iFpLipiiiippp(x64emu_t *emu, uintptr_t fcn) { iFpLipiiiippp_t fn = (iFpLipi
 void iFpLLpiiuuiiL(x64emu_t *emu, uintptr_t fcn) { iFpLLpiiuuiiL_t fn = (iFpLLpiiuuiiL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32), *(uintptr_t*)(R_RSP + 40)); }
 void iFppippipppip(x64emu_t *emu, uintptr_t fcn) { iFppippipppip_t fn = (iFppippipppip_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(int32_t*)(R_RSP + 32), *(void**)(R_RSP + 40)); }
 void iFpppiiuuiiuu(x64emu_t *emu, uintptr_t fcn) { iFpppiiuuiiuu_t fn = (iFpppiiuuiiuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(uint32_t*)(R_RSP + 32), *(uint32_t*)(R_RSP + 40)); }
+void iFpppppiiuupp(x64emu_t *emu, uintptr_t fcn) { iFpppppiiuupp_t fn = (iFpppppiiuupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40)); }
 void uFEpLiupppLuV(x64emu_t *emu, uintptr_t fcn) { uFEpLiupppLuV_t fn = (uFEpLiupppLuV_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (uint32_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), (void*)(R_RSP + 32)); }
 void uFEpLippppLup(x64emu_t *emu, uintptr_t fcn) { uFEpLippppLup_t fn = (uFEpLippppLup_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); }
 void uFEpLippppLuA(x64emu_t *emu, uintptr_t fcn) { uFEpLippppLuA_t fn = (uFEpLippppLuA_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), *(void**)(R_RSP + 32)); }
@@ -5482,6 +5738,7 @@ void pFWWiCCCCiipup(x64emu_t *emu, uintptr_t fcn) { pFWWiCCCCiipup_t fn = (pFWWi
 void pFpCuuWWwwCCup(x64emu_t *emu, uintptr_t fcn) { pFpCuuWWwwCCup_t fn = (pFpCuuWWwwCCup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint16_t)R_R8, (uint16_t)R_R9, *(int16_t*)(R_RSP + 8), *(int16_t*)(R_RSP + 16), *(uint8_t*)(R_RSP + 24), *(uint8_t*)(R_RSP + 32), *(uint32_t*)(R_RSP + 40), *(void**)(R_RSP + 48)); }
 void pFpuuuWWWWWWWW(x64emu_t *emu, uintptr_t fcn) { pFpuuuWWWWWWWW_t fn = (pFpuuuWWWWWWWW_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (uint16_t)R_R8, (uint16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint16_t*)(R_RSP + 16), *(uint16_t*)(R_RSP + 24), *(uint16_t*)(R_RSP + 32), *(uint16_t*)(R_RSP + 40), *(uint16_t*)(R_RSP + 48)); }
 void pFppiiuuuiupLp(x64emu_t *emu, uintptr_t fcn) { pFppiiuuuiupLp_t fn = (pFppiiuuuiupLp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(uint32_t*)(R_RSP + 24), *(void**)(R_RSP + 32), *(uintptr_t*)(R_RSP + 40), *(void**)(R_RSP + 48)); }
+void pFppippLLLiLpp(x64emu_t *emu, uintptr_t fcn) { pFppippLLLiLpp_t fn = (pFppippLLLiLpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (uintptr_t)R_R9, *(uintptr_t*)(R_RSP + 8), *(uintptr_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(uintptr_t*)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48)); }
 void pFpppppppppppp(x64emu_t *emu, uintptr_t fcn) { pFpppppppppppp_t fn = (pFpppppppppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48)); }
 void vFEpppppppiippp(x64emu_t *emu, uintptr_t fcn) { vFEpppppppiippp_t fn = (vFEpppppppiippp_t)fcn; fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48)); }
 void vFuiiiiiiiiiuup(x64emu_t *emu, uintptr_t fcn) { vFuiiiiiiiiiuup_t fn = (vFuiiiiiiiiiuup_t)fcn; fn((uint32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9, *(int32_t*)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(int32_t*)(R_RSP + 32), *(uint32_t*)(R_RSP + 40), *(uint32_t*)(R_RSP + 48), *(void**)(R_RSP + 56)); }
@@ -5503,6 +5760,7 @@ void uFippuuuulllipp(x64emu_t *emu, uintptr_t fcn) { uFippuuuulllipp_t fn = (uFi
 void uFppppuuupppppp(x64emu_t *emu, uintptr_t fcn) { uFppppuuupppppp_t fn = (uFppppuuupppppp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint32_t)R_R8, (uint32_t)R_R9, *(uint32_t*)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56)); }
 void pFpCuuwwWWWWuup(x64emu_t *emu, uintptr_t fcn) { pFpCuuwwWWWWuup_t fn = (pFpCuuwwWWWWuup_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX, (int16_t)R_R8, (int16_t)R_R9, *(uint16_t*)(R_RSP + 8), *(uint16_t*)(R_RSP + 16), *(uint16_t*)(R_RSP + 24), *(uint16_t*)(R_RSP + 32), *(uint32_t*)(R_RSP + 40), *(uint32_t*)(R_RSP + 48), *(void**)(R_RSP + 56)); }
 void pFpuupppwwwwWWC(x64emu_t *emu, uintptr_t fcn) { pFpuupppwwwwWWC_t fn = (pFpuupppwwwwWWC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(int16_t*)(R_RSP + 8), *(int16_t*)(R_RSP + 16), *(int16_t*)(R_RSP + 24), *(int16_t*)(R_RSP + 32), *(uint16_t*)(R_RSP + 40), *(uint16_t*)(R_RSP + 48), *(uint8_t*)(R_RSP + 56)); }
+void pFppLppppiiLpip(x64emu_t *emu, uintptr_t fcn) { pFppLppppiiLpip_t fn = (pFppLppppiiLpip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(int32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(uintptr_t*)(R_RSP + 32), *(void**)(R_RSP + 40), *(int32_t*)(R_RSP + 48), *(void**)(R_RSP + 56)); }
 void pFpppppppuipppp(x64emu_t *emu, uintptr_t fcn) { pFpppppppuipppp_t fn = (pFpppppppuipppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(uint32_t*)(R_RSP + 16), *(int32_t*)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56)); }
 void pFppppppppppppp(x64emu_t *emu, uintptr_t fcn) { pFppppppppppppp_t fn = (pFppppppppppppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56)); }
 void vFippppppppppppp(x64emu_t *emu, uintptr_t fcn) { vFippppppppppppp_t fn = (vFippppppppppppp_t)fcn; fn((int32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8), *(void**)(R_RSP + 16), *(void**)(R_RSP + 24), *(void**)(R_RSP + 32), *(void**)(R_RSP + 40), *(void**)(R_RSP + 48), *(void**)(R_RSP + 56), *(void**)(R_RSP + 64)); }
@@ -5720,6 +5978,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpl) return 1;
 	if (fun == &vFpL) return 1;
 	if (fun == &vFpp) return 1;
+	if (fun == &cFpi) return 1;
 	if (fun == &cFpp) return 1;
 	if (fun == &wFpi) return 1;
 	if (fun == &iFwp) return 1;
@@ -5772,6 +6031,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFii) return 1;
 	if (fun == &uFiu) return 1;
 	if (fun == &uFip) return 1;
+	if (fun == &uFui) return 1;
 	if (fun == &uFuu) return 1;
 	if (fun == &uFup) return 1;
 	if (fun == &uFpw) return 1;
@@ -5785,11 +6045,13 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFpp) return 1;
 	if (fun == &UFuu) return 1;
 	if (fun == &UFpi) return 1;
+	if (fun == &UFpU) return 1;
 	if (fun == &UFpp) return 1;
 	if (fun == &fFif) return -2;
 	if (fun == &fFfi) return -2;
 	if (fun == &fFff) return -3;
 	if (fun == &fFfp) return -2;
+	if (fun == &fFpu) return -1;
 	if (fun == &fFpp) return -1;
 	if (fun == &dFid) return -2;
 	if (fun == &dFdi) return -2;
@@ -5821,7 +6083,6 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFiI) return 1;
 	if (fun == &pFiu) return 1;
 	if (fun == &pFip) return 1;
-	if (fun == &pFII) return 1;
 	if (fun == &pFui) return 1;
 	if (fun == &pFuu) return 1;
 	if (fun == &pFup) return 1;
@@ -5829,6 +6090,8 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFdi) return 2;
 	if (fun == &pFdd) return 3;
 	if (fun == &pFli) return 1;
+	if (fun == &pFll) return 1;
+	if (fun == &pFlp) return 1;
 	if (fun == &pFLi) return 1;
 	if (fun == &pFLC) return 1;
 	if (fun == &pFLu) return 1;
@@ -5926,6 +6189,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpff) return 3;
 	if (fun == &vFpdu) return 2;
 	if (fun == &vFpdd) return 3;
+	if (fun == &vFpdp) return 2;
 	if (fun == &vFpll) return 1;
 	if (fun == &vFplp) return 1;
 	if (fun == &vFpLi) return 1;
@@ -5940,6 +6204,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFppl) return 1;
 	if (fun == &vFppL) return 1;
 	if (fun == &vFppp) return 1;
+	if (fun == &cFpdp) return 2;
 	if (fun == &wFppp) return 1;
 	if (fun == &iFwww) return 1;
 	if (fun == &iFwpp) return 1;
@@ -5963,6 +6228,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFCuW) return 1;
 	if (fun == &iFuwp) return 1;
 	if (fun == &iFuip) return 1;
+	if (fun == &iFuWp) return 1;
 	if (fun == &iFuui) return 1;
 	if (fun == &iFuuu) return 1;
 	if (fun == &iFuup) return 1;
@@ -6050,6 +6316,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFpuL) return 1;
 	if (fun == &uFpup) return 1;
 	if (fun == &uFpfu) return 2;
+	if (fun == &uFpli) return 1;
 	if (fun == &uFpLu) return 1;
 	if (fun == &uFpLL) return 1;
 	if (fun == &uFpLp) return 1;
@@ -6068,6 +6335,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &dFuud) return -2;
 	if (fun == &dFddd) return -4;
 	if (fun == &dFddp) return -3;
+	if (fun == &dFpii) return -1;
 	if (fun == &dFpdd) return -3;
 	if (fun == &dFppi) return -1;
 	if (fun == &dFppu) return -1;
@@ -6120,6 +6388,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFulu) return 1;
 	if (fun == &pFulp) return 1;
 	if (fun == &pFupi) return 1;
+	if (fun == &pFupu) return 1;
 	if (fun == &pFupl) return 1;
 	if (fun == &pFupL) return 1;
 	if (fun == &pFupp) return 1;
@@ -6130,6 +6399,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFLup) return 1;
 	if (fun == &pFLLp) return 1;
 	if (fun == &pFLpi) return 1;
+	if (fun == &pFLpp) return 1;
 	if (fun == &pFpii) return 1;
 	if (fun == &pFpiu) return 1;
 	if (fun == &pFpid) return 2;
@@ -6139,6 +6409,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFpCi) return 1;
 	if (fun == &pFpCC) return 1;
 	if (fun == &pFpCu) return 1;
+	if (fun == &pFpWi) return 1;
 	if (fun == &pFpWW) return 1;
 	if (fun == &pFpWp) return 1;
 	if (fun == &pFpui) return 1;
@@ -6247,6 +6518,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFLppi) return 1;
 	if (fun == &vFpiii) return 1;
 	if (fun == &vFpiiu) return 1;
+	if (fun == &vFpiid) return 2;
 	if (fun == &vFpiip) return 1;
 	if (fun == &vFpiui) return 1;
 	if (fun == &vFpiuu) return 1;
@@ -6310,6 +6582,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpppl) return 1;
 	if (fun == &vFpppL) return 1;
 	if (fun == &vFpppp) return 1;
+	if (fun == &cFpipp) return 1;
 	if (fun == &iFwwww) return 1;
 	if (fun == &iFwppp) return 1;
 	if (fun == &iFiiii) return 1;
@@ -6327,6 +6600,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFillu) return 1;
 	if (fun == &iFipii) return 1;
 	if (fun == &iFipip) return 1;
+	if (fun == &iFipWp) return 1;
 	if (fun == &iFipui) return 1;
 	if (fun == &iFipuL) return 1;
 	if (fun == &iFipup) return 1;
@@ -6334,17 +6608,20 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFipLu) return 1;
 	if (fun == &iFipLp) return 1;
 	if (fun == &iFippi) return 1;
-	if (fun == &iFippu) return 1;
 	if (fun == &iFippL) return 1;
 	if (fun == &iFippp) return 1;
 	if (fun == &iFuiup) return 1;
 	if (fun == &iFuipp) return 1;
+	if (fun == &iFuWWp) return 1;
 	if (fun == &iFuuuu) return 1;
 	if (fun == &iFuupi) return 1;
+	if (fun == &iFuupp) return 1;
 	if (fun == &iFupLp) return 1;
 	if (fun == &iFuppi) return 1;
+	if (fun == &iFuppu) return 1;
 	if (fun == &iFuppp) return 1;
 	if (fun == &iFLLiW) return 1;
+	if (fun == &iFLppp) return 1;
 	if (fun == &iFpwww) return 1;
 	if (fun == &iFpwpp) return 1;
 	if (fun == &iFpiii) return 1;
@@ -6389,6 +6666,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpUUU) return 1;
 	if (fun == &iFpULp) return 1;
 	if (fun == &iFpUpp) return 1;
+	if (fun == &iFpdip) return 2;
 	if (fun == &iFplii) return 1;
 	if (fun == &iFplip) return 1;
 	if (fun == &iFplpi) return 1;
@@ -6441,6 +6719,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &CFuuff) return 3;
 	if (fun == &CFpiii) return 1;
 	if (fun == &CFpupp) return 1;
+	if (fun == &CFpLLi) return 1;
 	if (fun == &CFppip) return 1;
 	if (fun == &uFiiii) return 1;
 	if (fun == &uFiiuu) return 1;
@@ -6457,6 +6736,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFpupp) return 1;
 	if (fun == &uFppiu) return 1;
 	if (fun == &uFppip) return 1;
+	if (fun == &uFppuu) return 1;
 	if (fun == &uFpplp) return 1;
 	if (fun == &uFppLp) return 1;
 	if (fun == &uFpppi) return 1;
@@ -6509,13 +6789,13 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFiiup) return 1;
 	if (fun == &pFiiLp) return 1;
 	if (fun == &pFiipi) return 1;
-	if (fun == &pFiipp) return 1;
 	if (fun == &pFiIIi) return 1;
 	if (fun == &pFillu) return 1;
 	if (fun == &pFipii) return 1;
 	if (fun == &pFipip) return 1;
 	if (fun == &pFippi) return 1;
 	if (fun == &pFippu) return 1;
+	if (fun == &pFippp) return 1;
 	if (fun == &pFuuii) return 1;
 	if (fun == &pFuuip) return 1;
 	if (fun == &pFuuuu) return 1;
@@ -6527,6 +6807,9 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFdddd) return 5;
 	if (fun == &pFlfff) return 4;
 	if (fun == &pFLiip) return 1;
+	if (fun == &pFLLup) return 1;
+	if (fun == &pFLLpp) return 1;
+	if (fun == &pFLppp) return 1;
 	if (fun == &pFpiii) return 1;
 	if (fun == &pFpiiu) return 1;
 	if (fun == &pFpiip) return 1;
@@ -6554,8 +6837,10 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFpupp) return 1;
 	if (fun == &pFpdIU) return 2;
 	if (fun == &pFplil) return 1;
+	if (fun == &pFplip) return 1;
 	if (fun == &pFplpl) return 1;
 	if (fun == &pFplpp) return 1;
+	if (fun == &pFpLii) return 1;
 	if (fun == &pFpLip) return 1;
 	if (fun == &pFpLup) return 1;
 	if (fun == &pFpLLp) return 1;
@@ -6722,6 +7007,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFppiii) return 1;
 	if (fun == &vFppiiu) return 1;
 	if (fun == &vFppiip) return 1;
+	if (fun == &vFppiui) return 1;
 	if (fun == &vFppiup) return 1;
 	if (fun == &vFppiff) return 3;
 	if (fun == &vFppidd) return 3;
@@ -6734,6 +7020,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFppuup) return 1;
 	if (fun == &vFppudd) return 3;
 	if (fun == &vFppupi) return 1;
+	if (fun == &vFppupu) return 1;
 	if (fun == &vFppupp) return 1;
 	if (fun == &vFppfff) return 4;
 	if (fun == &vFppddp) return 3;
@@ -6743,6 +7030,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpppui) return 1;
 	if (fun == &vFpppuu) return 1;
 	if (fun == &vFpppup) return 1;
+	if (fun == &vFpppff) return 3;
 	if (fun == &vFpppdd) return 3;
 	if (fun == &vFppppi) return 1;
 	if (fun == &vFppppu) return 1;
@@ -6767,8 +7055,10 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFippLp) return 1;
 	if (fun == &iFipppi) return 1;
 	if (fun == &iFipppp) return 1;
+	if (fun == &iFuuupp) return 1;
 	if (fun == &iFuppLp) return 1;
 	if (fun == &iFLppip) return 1;
+	if (fun == &iFLpppp) return 1;
 	if (fun == &iFpwwww) return 1;
 	if (fun == &iFpwppp) return 1;
 	if (fun == &iFpiiii) return 1;
@@ -6800,11 +7090,14 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpuuui) return 1;
 	if (fun == &iFpuuup) return 1;
 	if (fun == &iFpuuLL) return 1;
+	if (fun == &iFpuupp) return 1;
 	if (fun == &iFpulup) return 1;
 	if (fun == &iFpulpp) return 1;
 	if (fun == &iFpupiU) return 1;
+	if (fun == &iFpupui) return 1;
 	if (fun == &iFpupuu) return 1;
 	if (fun == &iFpupup) return 1;
+	if (fun == &iFpuppL) return 1;
 	if (fun == &iFpuppp) return 1;
 	if (fun == &iFpUiUi) return 1;
 	if (fun == &iFpUupp) return 1;
@@ -6833,6 +7126,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFppiLi) return 1;
 	if (fun == &iFppiLL) return 1;
 	if (fun == &iFppipi) return 1;
+	if (fun == &iFppipu) return 1;
 	if (fun == &iFppipp) return 1;
 	if (fun == &iFppuwp) return 1;
 	if (fun == &iFppuip) return 1;
@@ -6867,9 +7161,11 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFLpppL) return 1;
 	if (fun == &uFpCCCC) return 1;
 	if (fun == &uFpWuip) return 1;
+	if (fun == &uFpuuui) return 1;
 	if (fun == &uFpuuuu) return 1;
 	if (fun == &uFpuupp) return 1;
 	if (fun == &uFpupuu) return 1;
+	if (fun == &uFpuppp) return 1;
 	if (fun == &uFppipp) return 1;
 	if (fun == &uFppuup) return 1;
 	if (fun == &uFppupp) return 1;
@@ -6897,6 +7193,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &LFpLppL) return 1;
 	if (fun == &LFpLppp) return 1;
 	if (fun == &LFppLLp) return 1;
+	if (fun == &LFppLpL) return 1;
 	if (fun == &LFpppii) return 1;
 	if (fun == &LFppppp) return 1;
 	if (fun == &pFiiiii) return 1;
@@ -6921,6 +7218,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFpiCCC) return 1;
 	if (fun == &pFpiuuu) return 1;
 	if (fun == &pFpiupp) return 1;
+	if (fun == &pFpiLip) return 1;
 	if (fun == &pFpipip) return 1;
 	if (fun == &pFpipup) return 1;
 	if (fun == &pFpippi) return 1;
@@ -6935,14 +7233,17 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFpuuuu) return 1;
 	if (fun == &pFpuuup) return 1;
 	if (fun == &pFpupii) return 1;
+	if (fun == &pFpuppu) return 1;
 	if (fun == &pFpuppp) return 1;
 	if (fun == &pFpUdii) return 2;
 	if (fun == &pFpfffi) return 4;
 	if (fun == &pFpdddd) return 5;
 	if (fun == &pFplppp) return 1;
 	if (fun == &pFpLiii) return 1;
+	if (fun == &pFpLLip) return 1;
 	if (fun == &pFpLLLp) return 1;
 	if (fun == &pFpLpii) return 1;
+	if (fun == &pFpLpip) return 1;
 	if (fun == &pFppiii) return 1;
 	if (fun == &pFppiiu) return 1;
 	if (fun == &pFppiip) return 1;
@@ -6957,11 +7258,13 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFppupp) return 1;
 	if (fun == &pFppddu) return 3;
 	if (fun == &pFppLii) return 1;
+	if (fun == &pFppLLi) return 1;
+	if (fun == &pFppLpp) return 1;
 	if (fun == &pFpppii) return 1;
 	if (fun == &pFpppip) return 1;
-	if (fun == &pFpppIi) return 1;
 	if (fun == &pFpppui) return 1;
 	if (fun == &pFpppup) return 1;
+	if (fun == &pFpppli) return 1;
 	if (fun == &pFpppLi) return 1;
 	if (fun == &pFppppi) return 1;
 	if (fun == &pFppppu) return 1;
@@ -7047,11 +7350,14 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpuiiiu) return 1;
 	if (fun == &vFpuiipp) return 1;
 	if (fun == &vFpuuuiu) return 1;
+	if (fun == &vFpuuuup) return 1;
+	if (fun == &vFpuuupp) return 1;
 	if (fun == &vFpuupuu) return 1;
 	if (fun == &vFpuuppp) return 1;
 	if (fun == &vFpudddd) return 5;
 	if (fun == &vFpupiUu) return 1;
 	if (fun == &vFpupuuu) return 1;
+	if (fun == &vFpupupu) return 1;
 	if (fun == &vFpuppuu) return 1;
 	if (fun == &vFpupppp) return 1;
 	if (fun == &vFpUiuup) return 1;
@@ -7102,6 +7408,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFiiiipp) return 1;
 	if (fun == &iFiiiuwp) return 1;
 	if (fun == &iFiWiipi) return 1;
+	if (fun == &iFilpppp) return 1;
 	if (fun == &iFiLpppi) return 1;
 	if (fun == &iFipiipi) return 1;
 	if (fun == &iFipipip) return 1;
@@ -7125,17 +7432,23 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpiuuup) return 1;
 	if (fun == &iFpiuupp) return 1;
 	if (fun == &iFpipipi) return 1;
+	if (fun == &iFpipipp) return 1;
 	if (fun == &iFpipupp) return 1;
 	if (fun == &iFpippip) return 1;
+	if (fun == &iFpippup) return 1;
 	if (fun == &iFpipppL) return 1;
 	if (fun == &iFpipppp) return 1;
 	if (fun == &iFpCiipp) return 1;
 	if (fun == &iFpCpipu) return 1;
+	if (fun == &iFpWipip) return 1;
 	if (fun == &iFpWpppp) return 1;
 	if (fun == &iFpuiCpp) return 1;
 	if (fun == &iFpuippp) return 1;
 	if (fun == &iFpuuuuu) return 1;
+	if (fun == &iFpuuuup) return 1;
+	if (fun == &iFpuuupp) return 1;
 	if (fun == &iFpuupuu) return 1;
+	if (fun == &iFpuuppp) return 1;
 	if (fun == &iFpuLLpp) return 1;
 	if (fun == &iFpupuui) return 1;
 	if (fun == &iFpupLpL) return 1;
@@ -7144,6 +7457,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpUuupp) return 1;
 	if (fun == &iFpUUUip) return 1;
 	if (fun == &iFpUUUUp) return 1;
+	if (fun == &iFpdpipp) return 2;
 	if (fun == &iFpLiiiL) return 1;
 	if (fun == &iFpLiiip) return 1;
 	if (fun == &iFpLiiuu) return 1;
@@ -7162,9 +7476,11 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFppiipi) return 1;
 	if (fun == &iFppiipp) return 1;
 	if (fun == &iFppiupp) return 1;
+	if (fun == &iFppilpp) return 1;
 	if (fun == &iFppipii) return 1;
 	if (fun == &iFppipiL) return 1;
 	if (fun == &iFppipip) return 1;
+	if (fun == &iFppippu) return 1;
 	if (fun == &iFppIppp) return 1;
 	if (fun == &iFppuiii) return 1;
 	if (fun == &iFppuIII) return 1;
@@ -7177,12 +7493,15 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFppLupp) return 1;
 	if (fun == &iFppLLiL) return 1;
 	if (fun == &iFppLLup) return 1;
+	if (fun == &iFppLLpp) return 1;
 	if (fun == &iFppLpLp) return 1;
 	if (fun == &iFppLppp) return 1;
 	if (fun == &iFpppiuu) return 1;
 	if (fun == &iFpppipi) return 1;
+	if (fun == &iFpppipu) return 1;
 	if (fun == &iFpppipp) return 1;
 	if (fun == &iFpppuii) return 1;
+	if (fun == &iFpppuup) return 1;
 	if (fun == &iFpppupu) return 1;
 	if (fun == &iFpppupp) return 1;
 	if (fun == &iFpppLpp) return 1;
@@ -7191,6 +7510,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFppppip) return 1;
 	if (fun == &iFppppup) return 1;
 	if (fun == &iFpppppi) return 1;
+	if (fun == &iFpppppL) return 1;
 	if (fun == &iFpppppp) return 1;
 	if (fun == &uFuuuuuu) return 1;
 	if (fun == &uFupuufp) return 2;
@@ -7201,6 +7521,9 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFpWuuCp) return 1;
 	if (fun == &uFpuippp) return 1;
 	if (fun == &uFpuuuup) return 1;
+	if (fun == &uFpuuupp) return 1;
+	if (fun == &uFpuuppp) return 1;
+	if (fun == &uFpupupu) return 1;
 	if (fun == &uFppippp) return 1;
 	if (fun == &uFppuuup) return 1;
 	if (fun == &uFppuupu) return 1;
@@ -7219,19 +7542,23 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &LFpipipi) return 1;
 	if (fun == &LFpLippp) return 1;
 	if (fun == &LFpLLLLL) return 1;
+	if (fun == &LFppLLpL) return 1;
 	if (fun == &pFiiiiii) return 1;
 	if (fun == &pFiiiiid) return 2;
 	if (fun == &pFipippp) return 1;
 	if (fun == &pFWCiWCi) return 1;
 	if (fun == &pFuuipip) return 1;
+	if (fun == &pFuuuiip) return 1;
 	if (fun == &pFuuuuii) return 1;
 	if (fun == &pFuuuuuu) return 1;
 	if (fun == &pFuuuuup) return 1;
+	if (fun == &pFuuppuu) return 1;
 	if (fun == &pFdddddd) return 7;
 	if (fun == &pFpiiiiu) return 1;
 	if (fun == &pFpiiipp) return 1;
 	if (fun == &pFpiiCCC) return 1;
 	if (fun == &pFpiUUUU) return 1;
+	if (fun == &pFpipipp) return 1;
 	if (fun == &pFpippip) return 1;
 	if (fun == &pFpipppp) return 1;
 	if (fun == &pFpCuuCC) return 1;
@@ -7242,18 +7569,26 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &pFpuuupu) return 1;
 	if (fun == &pFpuuUUU) return 1;
 	if (fun == &pFpupuui) return 1;
+	if (fun == &pFpuppip) return 1;
 	if (fun == &pFpupppp) return 1;
 	if (fun == &pFplpppp) return 1;
+	if (fun == &pFpLuLpp) return 1;
+	if (fun == &pFpLpLLi) return 1;
 	if (fun == &pFpLppii) return 1;
+	if (fun == &pFpLppip) return 1;
+	if (fun == &pFpLppup) return 1;
 	if (fun == &pFppiiii) return 1;
 	if (fun == &pFppiipp) return 1;
 	if (fun == &pFppiCCC) return 1;
 	if (fun == &pFppiupp) return 1;
+	if (fun == &pFppilpp) return 1;
 	if (fun == &pFppipip) return 1;
 	if (fun == &pFppippi) return 1;
 	if (fun == &pFppippp) return 1;
+	if (fun == &pFppuupp) return 1;
 	if (fun == &pFppupii) return 1;
 	if (fun == &pFppuppp) return 1;
+	if (fun == &pFpplplp) return 1;
 	if (fun == &pFpplppp) return 1;
 	if (fun == &pFpppiup) return 1;
 	if (fun == &pFpppupp) return 1;
@@ -7278,6 +7613,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFpdddddd) return 7;
 	if (fun == &vFppddddu) return 5;
 	if (fun == &vFppddpiu) return 3;
+	if (fun == &vFpppffff) return 5;
 	if (fun == &iFppppdpu) return 2;
 	if (fun == &pFifffppp) return 4;
 	if (fun == &pFfiiiiid) return 3;
@@ -7293,6 +7629,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &vFuffffffff) return 9;
 	if (fun == &vFffCCCCfff) return 6;
 	if (fun == &vFppddddudd) return 7;
+	if (fun == &vFpppffffff) return 7;
 	if (fun == &iFdddpppppp) return 4;
 	if (fun == &vFuffiiffiip) return 5;
 	if (fun == &vFuddiiddiip) return 5;
@@ -7303,3 +7640,21 @@ int isSimpleWrapper(wrapper_t fun) {
 #endif
 	return 0;
 }
+
+int isRetX87Wrapper(wrapper_t fun) {
+	if (fun == &DFDi) return 1;
+	if (fun == &DFDD) return 1;
+	if (fun == &DFDp) return 1;
+	if (fun == &DFpp) return 1;
+	if (fun == &DFppi) return 1;
+	if (fun == &DFppp) return 1;
+#if defined(HAVE_LD80BITS)
+	if (fun == &DFD) return 1;
+#endif
+#if !defined(HAVE_LD80BITS)
+	if (fun == &KFK) return 1;
+	if (fun == &KFKK) return 1;
+	if (fun == &KFKp) return 1;
+#endif
+	return 0;
+}
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 0de8baad..5ca6d94a 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -1,5 +1,5 @@
 /*******************************************************************
- * File automatically generated by rebuild_wrappers.py (v2.2.0.17) *
+ * File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
  *******************************************************************/
 #ifndef __WRAPPER_H_
 #define __WRAPPER_H_
@@ -73,6 +73,7 @@ void iFL(x64emu_t *emu, uintptr_t fnc);
 void iFp(x64emu_t *emu, uintptr_t fnc);
 void iFO(x64emu_t *emu, uintptr_t fnc);
 void iFS(x64emu_t *emu, uintptr_t fnc);
+void iFP(x64emu_t *emu, uintptr_t fnc);
 void IFv(x64emu_t *emu, uintptr_t fnc);
 void IFi(x64emu_t *emu, uintptr_t fnc);
 void IFI(x64emu_t *emu, uintptr_t fnc);
@@ -195,6 +196,7 @@ void vFpL(x64emu_t *emu, uintptr_t fnc);
 void vFpp(x64emu_t *emu, uintptr_t fnc);
 void vFpS(x64emu_t *emu, uintptr_t fnc);
 void vFSi(x64emu_t *emu, uintptr_t fnc);
+void cFpi(x64emu_t *emu, uintptr_t fnc);
 void cFpp(x64emu_t *emu, uintptr_t fnc);
 void wFpi(x64emu_t *emu, uintptr_t fnc);
 void iFEi(x64emu_t *emu, uintptr_t fnc);
@@ -254,6 +256,7 @@ void uFEp(x64emu_t *emu, uintptr_t fnc);
 void uFii(x64emu_t *emu, uintptr_t fnc);
 void uFiu(x64emu_t *emu, uintptr_t fnc);
 void uFip(x64emu_t *emu, uintptr_t fnc);
+void uFui(x64emu_t *emu, uintptr_t fnc);
 void uFuu(x64emu_t *emu, uintptr_t fnc);
 void uFup(x64emu_t *emu, uintptr_t fnc);
 void uFpw(x64emu_t *emu, uintptr_t fnc);
@@ -268,6 +271,7 @@ void uFpp(x64emu_t *emu, uintptr_t fnc);
 void UFEp(x64emu_t *emu, uintptr_t fnc);
 void UFuu(x64emu_t *emu, uintptr_t fnc);
 void UFpi(x64emu_t *emu, uintptr_t fnc);
+void UFpU(x64emu_t *emu, uintptr_t fnc);
 void UFpp(x64emu_t *emu, uintptr_t fnc);
 void fFEp(x64emu_t *emu, uintptr_t fnc);
 void fFif(x64emu_t *emu, uintptr_t fnc);
@@ -275,6 +279,7 @@ void fFfi(x64emu_t *emu, uintptr_t fnc);
 void fFff(x64emu_t *emu, uintptr_t fnc);
 void fFfD(x64emu_t *emu, uintptr_t fnc);
 void fFfp(x64emu_t *emu, uintptr_t fnc);
+void fFpu(x64emu_t *emu, uintptr_t fnc);
 void fFpp(x64emu_t *emu, uintptr_t fnc);
 void dFid(x64emu_t *emu, uintptr_t fnc);
 void dFdi(x64emu_t *emu, uintptr_t fnc);
@@ -316,7 +321,6 @@ void pFiI(x64emu_t *emu, uintptr_t fnc);
 void pFiu(x64emu_t *emu, uintptr_t fnc);
 void pFip(x64emu_t *emu, uintptr_t fnc);
 void pFiV(x64emu_t *emu, uintptr_t fnc);
-void pFII(x64emu_t *emu, uintptr_t fnc);
 void pFui(x64emu_t *emu, uintptr_t fnc);
 void pFuu(x64emu_t *emu, uintptr_t fnc);
 void pFup(x64emu_t *emu, uintptr_t fnc);
@@ -324,6 +328,8 @@ void pFUU(x64emu_t *emu, uintptr_t fnc);
 void pFdi(x64emu_t *emu, uintptr_t fnc);
 void pFdd(x64emu_t *emu, uintptr_t fnc);
 void pFli(x64emu_t *emu, uintptr_t fnc);
+void pFll(x64emu_t *emu, uintptr_t fnc);
+void pFlp(x64emu_t *emu, uintptr_t fnc);
 void pFLi(x64emu_t *emu, uintptr_t fnc);
 void pFLC(x64emu_t *emu, uintptr_t fnc);
 void pFLu(x64emu_t *emu, uintptr_t fnc);
@@ -439,6 +445,7 @@ void vFpUp(x64emu_t *emu, uintptr_t fnc);
 void vFpff(x64emu_t *emu, uintptr_t fnc);
 void vFpdu(x64emu_t *emu, uintptr_t fnc);
 void vFpdd(x64emu_t *emu, uintptr_t fnc);
+void vFpdp(x64emu_t *emu, uintptr_t fnc);
 void vFpll(x64emu_t *emu, uintptr_t fnc);
 void vFplp(x64emu_t *emu, uintptr_t fnc);
 void vFpLi(x64emu_t *emu, uintptr_t fnc);
@@ -453,6 +460,7 @@ void vFppd(x64emu_t *emu, uintptr_t fnc);
 void vFppl(x64emu_t *emu, uintptr_t fnc);
 void vFppL(x64emu_t *emu, uintptr_t fnc);
 void vFppp(x64emu_t *emu, uintptr_t fnc);
+void cFpdp(x64emu_t *emu, uintptr_t fnc);
 void wFppp(x64emu_t *emu, uintptr_t fnc);
 void iFEiw(x64emu_t *emu, uintptr_t fnc);
 void iFEip(x64emu_t *emu, uintptr_t fnc);
@@ -492,6 +500,7 @@ void iFipO(x64emu_t *emu, uintptr_t fnc);
 void iFCuW(x64emu_t *emu, uintptr_t fnc);
 void iFuwp(x64emu_t *emu, uintptr_t fnc);
 void iFuip(x64emu_t *emu, uintptr_t fnc);
+void iFuWp(x64emu_t *emu, uintptr_t fnc);
 void iFuui(x64emu_t *emu, uintptr_t fnc);
 void iFuuu(x64emu_t *emu, uintptr_t fnc);
 void iFuup(x64emu_t *emu, uintptr_t fnc);
@@ -587,6 +596,7 @@ void uFpuu(x64emu_t *emu, uintptr_t fnc);
 void uFpuL(x64emu_t *emu, uintptr_t fnc);
 void uFpup(x64emu_t *emu, uintptr_t fnc);
 void uFpfu(x64emu_t *emu, uintptr_t fnc);
+void uFpli(x64emu_t *emu, uintptr_t fnc);
 void uFpLu(x64emu_t *emu, uintptr_t fnc);
 void uFpLL(x64emu_t *emu, uintptr_t fnc);
 void uFpLp(x64emu_t *emu, uintptr_t fnc);
@@ -605,6 +615,7 @@ void fFppp(x64emu_t *emu, uintptr_t fnc);
 void dFuud(x64emu_t *emu, uintptr_t fnc);
 void dFddd(x64emu_t *emu, uintptr_t fnc);
 void dFddp(x64emu_t *emu, uintptr_t fnc);
+void dFpii(x64emu_t *emu, uintptr_t fnc);
 void dFpdd(x64emu_t *emu, uintptr_t fnc);
 void dFppi(x64emu_t *emu, uintptr_t fnc);
 void dFppu(x64emu_t *emu, uintptr_t fnc);
@@ -671,6 +682,7 @@ void pFuup(x64emu_t *emu, uintptr_t fnc);
 void pFulu(x64emu_t *emu, uintptr_t fnc);
 void pFulp(x64emu_t *emu, uintptr_t fnc);
 void pFupi(x64emu_t *emu, uintptr_t fnc);
+void pFupu(x64emu_t *emu, uintptr_t fnc);
 void pFupl(x64emu_t *emu, uintptr_t fnc);
 void pFupL(x64emu_t *emu, uintptr_t fnc);
 void pFupp(x64emu_t *emu, uintptr_t fnc);
@@ -682,6 +694,7 @@ void pFlpi(x64emu_t *emu, uintptr_t fnc);
 void pFLup(x64emu_t *emu, uintptr_t fnc);
 void pFLLp(x64emu_t *emu, uintptr_t fnc);
 void pFLpi(x64emu_t *emu, uintptr_t fnc);
+void pFLpp(x64emu_t *emu, uintptr_t fnc);
 void pFpii(x64emu_t *emu, uintptr_t fnc);
 void pFpiu(x64emu_t *emu, uintptr_t fnc);
 void pFpid(x64emu_t *emu, uintptr_t fnc);
@@ -691,6 +704,7 @@ void pFpip(x64emu_t *emu, uintptr_t fnc);
 void pFpCi(x64emu_t *emu, uintptr_t fnc);
 void pFpCC(x64emu_t *emu, uintptr_t fnc);
 void pFpCu(x64emu_t *emu, uintptr_t fnc);
+void pFpWi(x64emu_t *emu, uintptr_t fnc);
 void pFpWW(x64emu_t *emu, uintptr_t fnc);
 void pFpWp(x64emu_t *emu, uintptr_t fnc);
 void pFpui(x64emu_t *emu, uintptr_t fnc);
@@ -827,6 +841,7 @@ void vFLuui(x64emu_t *emu, uintptr_t fnc);
 void vFLppi(x64emu_t *emu, uintptr_t fnc);
 void vFpiii(x64emu_t *emu, uintptr_t fnc);
 void vFpiiu(x64emu_t *emu, uintptr_t fnc);
+void vFpiid(x64emu_t *emu, uintptr_t fnc);
 void vFpiip(x64emu_t *emu, uintptr_t fnc);
 void vFpiui(x64emu_t *emu, uintptr_t fnc);
 void vFpiuu(x64emu_t *emu, uintptr_t fnc);
@@ -890,10 +905,12 @@ void vFpppd(x64emu_t *emu, uintptr_t fnc);
 void vFpppl(x64emu_t *emu, uintptr_t fnc);
 void vFpppL(x64emu_t *emu, uintptr_t fnc);
 void vFpppp(x64emu_t *emu, uintptr_t fnc);
+void cFpipp(x64emu_t *emu, uintptr_t fnc);
 void iFEiip(x64emu_t *emu, uintptr_t fnc);
 void iFEiiN(x64emu_t *emu, uintptr_t fnc);
 void iFEipp(x64emu_t *emu, uintptr_t fnc);
 void iFEipV(x64emu_t *emu, uintptr_t fnc);
+void iFEipA(x64emu_t *emu, uintptr_t fnc);
 void iFEupu(x64emu_t *emu, uintptr_t fnc);
 void iFEupp(x64emu_t *emu, uintptr_t fnc);
 void iFEpii(x64emu_t *emu, uintptr_t fnc);
@@ -931,6 +948,7 @@ void iFilli(x64emu_t *emu, uintptr_t fnc);
 void iFillu(x64emu_t *emu, uintptr_t fnc);
 void iFipii(x64emu_t *emu, uintptr_t fnc);
 void iFipip(x64emu_t *emu, uintptr_t fnc);
+void iFipWp(x64emu_t *emu, uintptr_t fnc);
 void iFipui(x64emu_t *emu, uintptr_t fnc);
 void iFipuL(x64emu_t *emu, uintptr_t fnc);
 void iFipup(x64emu_t *emu, uintptr_t fnc);
@@ -938,18 +956,21 @@ void iFipLi(x64emu_t *emu, uintptr_t fnc);
 void iFipLu(x64emu_t *emu, uintptr_t fnc);
 void iFipLp(x64emu_t *emu, uintptr_t fnc);
 void iFippi(x64emu_t *emu, uintptr_t fnc);
-void iFippu(x64emu_t *emu, uintptr_t fnc);
 void iFippL(x64emu_t *emu, uintptr_t fnc);
 void iFippp(x64emu_t *emu, uintptr_t fnc);
 void iFipON(x64emu_t *emu, uintptr_t fnc);
 void iFuiup(x64emu_t *emu, uintptr_t fnc);
 void iFuipp(x64emu_t *emu, uintptr_t fnc);
+void iFuWWp(x64emu_t *emu, uintptr_t fnc);
 void iFuuuu(x64emu_t *emu, uintptr_t fnc);
 void iFuupi(x64emu_t *emu, uintptr_t fnc);
+void iFuupp(x64emu_t *emu, uintptr_t fnc);
 void iFupLp(x64emu_t *emu, uintptr_t fnc);
 void iFuppi(x64emu_t *emu, uintptr_t fnc);
+void iFuppu(x64emu_t *emu, uintptr_t fnc);
 void iFuppp(x64emu_t *emu, uintptr_t fnc);
 void iFLLiW(x64emu_t *emu, uintptr_t fnc);
+void iFLppp(x64emu_t *emu, uintptr_t fnc);
 void iFpwww(x64emu_t *emu, uintptr_t fnc);
 void iFpwpp(x64emu_t *emu, uintptr_t fnc);
 void iFpiii(x64emu_t *emu, uintptr_t fnc);
@@ -996,6 +1017,7 @@ void iFpUup(x64emu_t *emu, uintptr_t fnc);
 void iFpUUU(x64emu_t *emu, uintptr_t fnc);
 void iFpULp(x64emu_t *emu, uintptr_t fnc);
 void iFpUpp(x64emu_t *emu, uintptr_t fnc);
+void iFpdip(x64emu_t *emu, uintptr_t fnc);
 void iFplii(x64emu_t *emu, uintptr_t fnc);
 void iFplip(x64emu_t *emu, uintptr_t fnc);
 void iFplpi(x64emu_t *emu, uintptr_t fnc);
@@ -1051,6 +1073,7 @@ void IFSIii(x64emu_t *emu, uintptr_t fnc);
 void CFuuff(x64emu_t *emu, uintptr_t fnc);
 void CFpiii(x64emu_t *emu, uintptr_t fnc);
 void CFpupp(x64emu_t *emu, uintptr_t fnc);
+void CFpLLi(x64emu_t *emu, uintptr_t fnc);
 void CFppip(x64emu_t *emu, uintptr_t fnc);
 void uFEipp(x64emu_t *emu, uintptr_t fnc);
 void uFEupp(x64emu_t *emu, uintptr_t fnc);
@@ -1071,6 +1094,7 @@ void uFpupu(x64emu_t *emu, uintptr_t fnc);
 void uFpupp(x64emu_t *emu, uintptr_t fnc);
 void uFppiu(x64emu_t *emu, uintptr_t fnc);
 void uFppip(x64emu_t *emu, uintptr_t fnc);
+void uFppuu(x64emu_t *emu, uintptr_t fnc);
 void uFpplp(x64emu_t *emu, uintptr_t fnc);
 void uFppLp(x64emu_t *emu, uintptr_t fnc);
 void uFpppi(x64emu_t *emu, uintptr_t fnc);
@@ -1138,13 +1162,13 @@ void pFiiuu(x64emu_t *emu, uintptr_t fnc);
 void pFiiup(x64emu_t *emu, uintptr_t fnc);
 void pFiiLp(x64emu_t *emu, uintptr_t fnc);
 void pFiipi(x64emu_t *emu, uintptr_t fnc);
-void pFiipp(x64emu_t *emu, uintptr_t fnc);
 void pFiIIi(x64emu_t *emu, uintptr_t fnc);
 void pFillu(x64emu_t *emu, uintptr_t fnc);
 void pFipii(x64emu_t *emu, uintptr_t fnc);
 void pFipip(x64emu_t *emu, uintptr_t fnc);
 void pFippi(x64emu_t *emu, uintptr_t fnc);
 void pFippu(x64emu_t *emu, uintptr_t fnc);
+void pFippp(x64emu_t *emu, uintptr_t fnc);
 void pFuuii(x64emu_t *emu, uintptr_t fnc);
 void pFuuip(x64emu_t *emu, uintptr_t fnc);
 void pFuuuu(x64emu_t *emu, uintptr_t fnc);
@@ -1157,6 +1181,9 @@ void pFdddd(x64emu_t *emu, uintptr_t fnc);
 void pFDipp(x64emu_t *emu, uintptr_t fnc);
 void pFlfff(x64emu_t *emu, uintptr_t fnc);
 void pFLiip(x64emu_t *emu, uintptr_t fnc);
+void pFLLup(x64emu_t *emu, uintptr_t fnc);
+void pFLLpp(x64emu_t *emu, uintptr_t fnc);
+void pFLppp(x64emu_t *emu, uintptr_t fnc);
 void pFpiii(x64emu_t *emu, uintptr_t fnc);
 void pFpiiu(x64emu_t *emu, uintptr_t fnc);
 void pFpiip(x64emu_t *emu, uintptr_t fnc);
@@ -1184,8 +1211,10 @@ void pFpupu(x64emu_t *emu, uintptr_t fnc);
 void pFpupp(x64emu_t *emu, uintptr_t fnc);
 void pFpdIU(x64emu_t *emu, uintptr_t fnc);
 void pFplil(x64emu_t *emu, uintptr_t fnc);
+void pFplip(x64emu_t *emu, uintptr_t fnc);
 void pFplpl(x64emu_t *emu, uintptr_t fnc);
 void pFplpp(x64emu_t *emu, uintptr_t fnc);
+void pFpLii(x64emu_t *emu, uintptr_t fnc);
 void pFpLip(x64emu_t *emu, uintptr_t fnc);
 void pFpLup(x64emu_t *emu, uintptr_t fnc);
 void pFpLLp(x64emu_t *emu, uintptr_t fnc);
@@ -1384,6 +1413,7 @@ void vFpLpiL(x64emu_t *emu, uintptr_t fnc);
 void vFppiii(x64emu_t *emu, uintptr_t fnc);
 void vFppiiu(x64emu_t *emu, uintptr_t fnc);
 void vFppiip(x64emu_t *emu, uintptr_t fnc);
+void vFppiui(x64emu_t *emu, uintptr_t fnc);
 void vFppiup(x64emu_t *emu, uintptr_t fnc);
 void vFppiff(x64emu_t *emu, uintptr_t fnc);
 void vFppidd(x64emu_t *emu, uintptr_t fnc);
@@ -1396,6 +1426,7 @@ void vFppuuu(x64emu_t *emu, uintptr_t fnc);
 void vFppuup(x64emu_t *emu, uintptr_t fnc);
 void vFppudd(x64emu_t *emu, uintptr_t fnc);
 void vFppupi(x64emu_t *emu, uintptr_t fnc);
+void vFppupu(x64emu_t *emu, uintptr_t fnc);
 void vFppupp(x64emu_t *emu, uintptr_t fnc);
 void vFppfff(x64emu_t *emu, uintptr_t fnc);
 void vFppddp(x64emu_t *emu, uintptr_t fnc);
@@ -1405,6 +1436,7 @@ void vFpppip(x64emu_t *emu, uintptr_t fnc);
 void vFpppui(x64emu_t *emu, uintptr_t fnc);
 void vFpppuu(x64emu_t *emu, uintptr_t fnc);
 void vFpppup(x64emu_t *emu, uintptr_t fnc);
+void vFpppff(x64emu_t *emu, uintptr_t fnc);
 void vFpppdd(x64emu_t *emu, uintptr_t fnc);
 void vFppppi(x64emu_t *emu, uintptr_t fnc);
 void vFppppu(x64emu_t *emu, uintptr_t fnc);
@@ -1412,6 +1444,7 @@ void vFppppL(x64emu_t *emu, uintptr_t fnc);
 void vFppppp(x64emu_t *emu, uintptr_t fnc);
 void iFEiipp(x64emu_t *emu, uintptr_t fnc);
 void iFEiipV(x64emu_t *emu, uintptr_t fnc);
+void iFEiipA(x64emu_t *emu, uintptr_t fnc);
 void iFEippi(x64emu_t *emu, uintptr_t fnc);
 void iFEippL(x64emu_t *emu, uintptr_t fnc);
 void iFEippp(x64emu_t *emu, uintptr_t fnc);
@@ -1453,8 +1486,10 @@ void iFippLi(x64emu_t *emu, uintptr_t fnc);
 void iFippLp(x64emu_t *emu, uintptr_t fnc);
 void iFipppi(x64emu_t *emu, uintptr_t fnc);
 void iFipppp(x64emu_t *emu, uintptr_t fnc);
+void iFuuupp(x64emu_t *emu, uintptr_t fnc);
 void iFuppLp(x64emu_t *emu, uintptr_t fnc);
 void iFLppip(x64emu_t *emu, uintptr_t fnc);
+void iFLpppp(x64emu_t *emu, uintptr_t fnc);
 void iFpwwww(x64emu_t *emu, uintptr_t fnc);
 void iFpwppp(x64emu_t *emu, uintptr_t fnc);
 void iFpiiii(x64emu_t *emu, uintptr_t fnc);
@@ -1486,11 +1521,14 @@ void iFpuuip(x64emu_t *emu, uintptr_t fnc);
 void iFpuuui(x64emu_t *emu, uintptr_t fnc);
 void iFpuuup(x64emu_t *emu, uintptr_t fnc);
 void iFpuuLL(x64emu_t *emu, uintptr_t fnc);
+void iFpuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpulup(x64emu_t *emu, uintptr_t fnc);
 void iFpulpp(x64emu_t *emu, uintptr_t fnc);
 void iFpupiU(x64emu_t *emu, uintptr_t fnc);
+void iFpupui(x64emu_t *emu, uintptr_t fnc);
 void iFpupuu(x64emu_t *emu, uintptr_t fnc);
 void iFpupup(x64emu_t *emu, uintptr_t fnc);
+void iFpuppL(x64emu_t *emu, uintptr_t fnc);
 void iFpuppp(x64emu_t *emu, uintptr_t fnc);
 void iFpUiUi(x64emu_t *emu, uintptr_t fnc);
 void iFpUupp(x64emu_t *emu, uintptr_t fnc);
@@ -1519,6 +1557,7 @@ void iFppiup(x64emu_t *emu, uintptr_t fnc);
 void iFppiLi(x64emu_t *emu, uintptr_t fnc);
 void iFppiLL(x64emu_t *emu, uintptr_t fnc);
 void iFppipi(x64emu_t *emu, uintptr_t fnc);
+void iFppipu(x64emu_t *emu, uintptr_t fnc);
 void iFppipp(x64emu_t *emu, uintptr_t fnc);
 void iFppuwp(x64emu_t *emu, uintptr_t fnc);
 void iFppuip(x64emu_t *emu, uintptr_t fnc);
@@ -1558,9 +1597,11 @@ void uFuiiii(x64emu_t *emu, uintptr_t fnc);
 void uFLpppL(x64emu_t *emu, uintptr_t fnc);
 void uFpCCCC(x64emu_t *emu, uintptr_t fnc);
 void uFpWuip(x64emu_t *emu, uintptr_t fnc);
+void uFpuuui(x64emu_t *emu, uintptr_t fnc);
 void uFpuuuu(x64emu_t *emu, uintptr_t fnc);
 void uFpuupp(x64emu_t *emu, uintptr_t fnc);
 void uFpupuu(x64emu_t *emu, uintptr_t fnc);
+void uFpuppp(x64emu_t *emu, uintptr_t fnc);
 void uFppipp(x64emu_t *emu, uintptr_t fnc);
 void uFppuup(x64emu_t *emu, uintptr_t fnc);
 void uFppupp(x64emu_t *emu, uintptr_t fnc);
@@ -1590,6 +1631,7 @@ void LFpLpuu(x64emu_t *emu, uintptr_t fnc);
 void LFpLppL(x64emu_t *emu, uintptr_t fnc);
 void LFpLppp(x64emu_t *emu, uintptr_t fnc);
 void LFppLLp(x64emu_t *emu, uintptr_t fnc);
+void LFppLpL(x64emu_t *emu, uintptr_t fnc);
 void LFpppii(x64emu_t *emu, uintptr_t fnc);
 void LFppppp(x64emu_t *emu, uintptr_t fnc);
 void pFEpiii(x64emu_t *emu, uintptr_t fnc);
@@ -1626,6 +1668,7 @@ void pFpiipp(x64emu_t *emu, uintptr_t fnc);
 void pFpiCCC(x64emu_t *emu, uintptr_t fnc);
 void pFpiuuu(x64emu_t *emu, uintptr_t fnc);
 void pFpiupp(x64emu_t *emu, uintptr_t fnc);
+void pFpiLip(x64emu_t *emu, uintptr_t fnc);
 void pFpipip(x64emu_t *emu, uintptr_t fnc);
 void pFpipup(x64emu_t *emu, uintptr_t fnc);
 void pFpippi(x64emu_t *emu, uintptr_t fnc);
@@ -1640,14 +1683,17 @@ void pFpuuWW(x64emu_t *emu, uintptr_t fnc);
 void pFpuuuu(x64emu_t *emu, uintptr_t fnc);
 void pFpuuup(x64emu_t *emu, uintptr_t fnc);
 void pFpupii(x64emu_t *emu, uintptr_t fnc);
+void pFpuppu(x64emu_t *emu, uintptr_t fnc);
 void pFpuppp(x64emu_t *emu, uintptr_t fnc);
 void pFpUdii(x64emu_t *emu, uintptr_t fnc);
 void pFpfffi(x64emu_t *emu, uintptr_t fnc);
 void pFpdddd(x64emu_t *emu, uintptr_t fnc);
 void pFplppp(x64emu_t *emu, uintptr_t fnc);
 void pFpLiii(x64emu_t *emu, uintptr_t fnc);
+void pFpLLip(x64emu_t *emu, uintptr_t fnc);
 void pFpLLLp(x64emu_t *emu, uintptr_t fnc);
 void pFpLpii(x64emu_t *emu, uintptr_t fnc);
+void pFpLpip(x64emu_t *emu, uintptr_t fnc);
 void pFppiii(x64emu_t *emu, uintptr_t fnc);
 void pFppiiu(x64emu_t *emu, uintptr_t fnc);
 void pFppiip(x64emu_t *emu, uintptr_t fnc);
@@ -1662,11 +1708,13 @@ void pFppuup(x64emu_t *emu, uintptr_t fnc);
 void pFppupp(x64emu_t *emu, uintptr_t fnc);
 void pFppddu(x64emu_t *emu, uintptr_t fnc);
 void pFppLii(x64emu_t *emu, uintptr_t fnc);
+void pFppLLi(x64emu_t *emu, uintptr_t fnc);
+void pFppLpp(x64emu_t *emu, uintptr_t fnc);
 void pFpppii(x64emu_t *emu, uintptr_t fnc);
 void pFpppip(x64emu_t *emu, uintptr_t fnc);
-void pFpppIi(x64emu_t *emu, uintptr_t fnc);
 void pFpppui(x64emu_t *emu, uintptr_t fnc);
 void pFpppup(x64emu_t *emu, uintptr_t fnc);
+void pFpppli(x64emu_t *emu, uintptr_t fnc);
 void pFpppLi(x64emu_t *emu, uintptr_t fnc);
 void pFppppi(x64emu_t *emu, uintptr_t fnc);
 void pFppppu(x64emu_t *emu, uintptr_t fnc);
@@ -1690,6 +1738,7 @@ void vFEiiipp(x64emu_t *emu, uintptr_t fnc);
 void vFEpiLpp(x64emu_t *emu, uintptr_t fnc);
 void vFEpippp(x64emu_t *emu, uintptr_t fnc);
 void vFEpuipp(x64emu_t *emu, uintptr_t fnc);
+void vFEpuipV(x64emu_t *emu, uintptr_t fnc);
 void vFEpupup(x64emu_t *emu, uintptr_t fnc);
 void vFEpuppp(x64emu_t *emu, uintptr_t fnc);
 void vFEpLLpp(x64emu_t *emu, uintptr_t fnc);
@@ -1779,11 +1828,14 @@ void vFpuiiii(x64emu_t *emu, uintptr_t fnc);
 void vFpuiiiu(x64emu_t *emu, uintptr_t fnc);
 void vFpuiipp(x64emu_t *emu, uintptr_t fnc);
 void vFpuuuiu(x64emu_t *emu, uintptr_t fnc);
+void vFpuuuup(x64emu_t *emu, uintptr_t fnc);
+void vFpuuupp(x64emu_t *emu, uintptr_t fnc);
 void vFpuupuu(x64emu_t *emu, uintptr_t fnc);
 void vFpuuppp(x64emu_t *emu, uintptr_t fnc);
 void vFpudddd(x64emu_t *emu, uintptr_t fnc);
 void vFpupiUu(x64emu_t *emu, uintptr_t fnc);
 void vFpupuuu(x64emu_t *emu, uintptr_t fnc);
+void vFpupupu(x64emu_t *emu, uintptr_t fnc);
 void vFpuppuu(x64emu_t *emu, uintptr_t fnc);
 void vFpupppp(x64emu_t *emu, uintptr_t fnc);
 void vFpUiuup(x64emu_t *emu, uintptr_t fnc);
@@ -1842,11 +1894,13 @@ void iFEpippi(x64emu_t *emu, uintptr_t fnc);
 void iFEpIppp(x64emu_t *emu, uintptr_t fnc);
 void iFEpuppp(x64emu_t *emu, uintptr_t fnc);
 void iFEpUppp(x64emu_t *emu, uintptr_t fnc);
+void iFEppppi(x64emu_t *emu, uintptr_t fnc);
 void iFEppppp(x64emu_t *emu, uintptr_t fnc);
 void iFiiiiip(x64emu_t *emu, uintptr_t fnc);
 void iFiiiipp(x64emu_t *emu, uintptr_t fnc);
 void iFiiiuwp(x64emu_t *emu, uintptr_t fnc);
 void iFiWiipi(x64emu_t *emu, uintptr_t fnc);
+void iFilpppp(x64emu_t *emu, uintptr_t fnc);
 void iFiLpppi(x64emu_t *emu, uintptr_t fnc);
 void iFipiipi(x64emu_t *emu, uintptr_t fnc);
 void iFipipip(x64emu_t *emu, uintptr_t fnc);
@@ -1871,17 +1925,23 @@ void iFpiCCpu(x64emu_t *emu, uintptr_t fnc);
 void iFpiuuup(x64emu_t *emu, uintptr_t fnc);
 void iFpiuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpipipi(x64emu_t *emu, uintptr_t fnc);
+void iFpipipp(x64emu_t *emu, uintptr_t fnc);
 void iFpipupp(x64emu_t *emu, uintptr_t fnc);
 void iFpippip(x64emu_t *emu, uintptr_t fnc);
+void iFpippup(x64emu_t *emu, uintptr_t fnc);
 void iFpipppL(x64emu_t *emu, uintptr_t fnc);
 void iFpipppp(x64emu_t *emu, uintptr_t fnc);
 void iFpCiipp(x64emu_t *emu, uintptr_t fnc);
 void iFpCpipu(x64emu_t *emu, uintptr_t fnc);
+void iFpWipip(x64emu_t *emu, uintptr_t fnc);
 void iFpWpppp(x64emu_t *emu, uintptr_t fnc);
 void iFpuiCpp(x64emu_t *emu, uintptr_t fnc);
 void iFpuippp(x64emu_t *emu, uintptr_t fnc);
 void iFpuuuuu(x64emu_t *emu, uintptr_t fnc);
+void iFpuuuup(x64emu_t *emu, uintptr_t fnc);
+void iFpuuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpuupuu(x64emu_t *emu, uintptr_t fnc);
+void iFpuuppp(x64emu_t *emu, uintptr_t fnc);
 void iFpuLLpp(x64emu_t *emu, uintptr_t fnc);
 void iFpupuui(x64emu_t *emu, uintptr_t fnc);
 void iFpupLpL(x64emu_t *emu, uintptr_t fnc);
@@ -1890,6 +1950,7 @@ void iFpUuuLp(x64emu_t *emu, uintptr_t fnc);
 void iFpUuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpUUUip(x64emu_t *emu, uintptr_t fnc);
 void iFpUUUUp(x64emu_t *emu, uintptr_t fnc);
+void iFpdpipp(x64emu_t *emu, uintptr_t fnc);
 void iFpLiiiL(x64emu_t *emu, uintptr_t fnc);
 void iFpLiiip(x64emu_t *emu, uintptr_t fnc);
 void iFpLiiuu(x64emu_t *emu, uintptr_t fnc);
@@ -1908,9 +1969,11 @@ void iFppiiip(x64emu_t *emu, uintptr_t fnc);
 void iFppiipi(x64emu_t *emu, uintptr_t fnc);
 void iFppiipp(x64emu_t *emu, uintptr_t fnc);
 void iFppiupp(x64emu_t *emu, uintptr_t fnc);
+void iFppilpp(x64emu_t *emu, uintptr_t fnc);
 void iFppipii(x64emu_t *emu, uintptr_t fnc);
 void iFppipiL(x64emu_t *emu, uintptr_t fnc);
 void iFppipip(x64emu_t *emu, uintptr_t fnc);
+void iFppippu(x64emu_t *emu, uintptr_t fnc);
 void iFppIppp(x64emu_t *emu, uintptr_t fnc);
 void iFppuiii(x64emu_t *emu, uintptr_t fnc);
 void iFppuIII(x64emu_t *emu, uintptr_t fnc);
@@ -1923,12 +1986,15 @@ void iFpplppi(x64emu_t *emu, uintptr_t fnc);
 void iFppLupp(x64emu_t *emu, uintptr_t fnc);
 void iFppLLiL(x64emu_t *emu, uintptr_t fnc);
 void iFppLLup(x64emu_t *emu, uintptr_t fnc);
+void iFppLLpp(x64emu_t *emu, uintptr_t fnc);
 void iFppLpLp(x64emu_t *emu, uintptr_t fnc);
 void iFppLppp(x64emu_t *emu, uintptr_t fnc);
 void iFpppiuu(x64emu_t *emu, uintptr_t fnc);
 void iFpppipi(x64emu_t *emu, uintptr_t fnc);
+void iFpppipu(x64emu_t *emu, uintptr_t fnc);
 void iFpppipp(x64emu_t *emu, uintptr_t fnc);
 void iFpppuii(x64emu_t *emu, uintptr_t fnc);
+void iFpppuup(x64emu_t *emu, uintptr_t fnc);
 void iFpppupu(x64emu_t *emu, uintptr_t fnc);
 void iFpppupp(x64emu_t *emu, uintptr_t fnc);
 void iFpppLpp(x64emu_t *emu, uintptr_t fnc);
@@ -1937,6 +2003,7 @@ void iFppppiu(x64emu_t *emu, uintptr_t fnc);
 void iFppppip(x64emu_t *emu, uintptr_t fnc);
 void iFppppup(x64emu_t *emu, uintptr_t fnc);
 void iFpppppi(x64emu_t *emu, uintptr_t fnc);
+void iFpppppL(x64emu_t *emu, uintptr_t fnc);
 void iFpppppp(x64emu_t *emu, uintptr_t fnc);
 void uFEiippp(x64emu_t *emu, uintptr_t fnc);
 void uFEiuppp(x64emu_t *emu, uintptr_t fnc);
@@ -1951,6 +2018,9 @@ void uFpWuipp(x64emu_t *emu, uintptr_t fnc);
 void uFpWuuCp(x64emu_t *emu, uintptr_t fnc);
 void uFpuippp(x64emu_t *emu, uintptr_t fnc);
 void uFpuuuup(x64emu_t *emu, uintptr_t fnc);
+void uFpuuupp(x64emu_t *emu, uintptr_t fnc);
+void uFpuuppp(x64emu_t *emu, uintptr_t fnc);
+void uFpupupu(x64emu_t *emu, uintptr_t fnc);
 void uFppippp(x64emu_t *emu, uintptr_t fnc);
 void uFppuuup(x64emu_t *emu, uintptr_t fnc);
 void uFppuupu(x64emu_t *emu, uintptr_t fnc);
@@ -1973,6 +2043,7 @@ void LFEppppi(x64emu_t *emu, uintptr_t fnc);
 void LFpipipi(x64emu_t *emu, uintptr_t fnc);
 void LFpLippp(x64emu_t *emu, uintptr_t fnc);
 void LFpLLLLL(x64emu_t *emu, uintptr_t fnc);
+void LFppLLpL(x64emu_t *emu, uintptr_t fnc);
 void LFSpLiip(x64emu_t *emu, uintptr_t fnc);
 void pFEpiupp(x64emu_t *emu, uintptr_t fnc);
 void pFEpippp(x64emu_t *emu, uintptr_t fnc);
@@ -1991,14 +2062,17 @@ void pFiiiiid(x64emu_t *emu, uintptr_t fnc);
 void pFipippp(x64emu_t *emu, uintptr_t fnc);
 void pFWCiWCi(x64emu_t *emu, uintptr_t fnc);
 void pFuuipip(x64emu_t *emu, uintptr_t fnc);
+void pFuuuiip(x64emu_t *emu, uintptr_t fnc);
 void pFuuuuii(x64emu_t *emu, uintptr_t fnc);
 void pFuuuuuu(x64emu_t *emu, uintptr_t fnc);
 void pFuuuuup(x64emu_t *emu, uintptr_t fnc);
+void pFuuppuu(x64emu_t *emu, uintptr_t fnc);
 void pFdddddd(x64emu_t *emu, uintptr_t fnc);
 void pFpiiiiu(x64emu_t *emu, uintptr_t fnc);
 void pFpiiipp(x64emu_t *emu, uintptr_t fnc);
 void pFpiiCCC(x64emu_t *emu, uintptr_t fnc);
 void pFpiUUUU(x64emu_t *emu, uintptr_t fnc);
+void pFpipipp(x64emu_t *emu, uintptr_t fnc);
 void pFpippip(x64emu_t *emu, uintptr_t fnc);
 void pFpipppp(x64emu_t *emu, uintptr_t fnc);
 void pFpCuuCC(x64emu_t *emu, uintptr_t fnc);
@@ -2009,18 +2083,26 @@ void pFpuuuuu(x64emu_t *emu, uintptr_t fnc);
 void pFpuuupu(x64emu_t *emu, uintptr_t fnc);
 void pFpuuUUU(x64emu_t *emu, uintptr_t fnc);
 void pFpupuui(x64emu_t *emu, uintptr_t fnc);
+void pFpuppip(x64emu_t *emu, uintptr_t fnc);
 void pFpupppp(x64emu_t *emu, uintptr_t fnc);
 void pFplpppp(x64emu_t *emu, uintptr_t fnc);
+void pFpLuLpp(x64emu_t *emu, uintptr_t fnc);
+void pFpLpLLi(x64emu_t *emu, uintptr_t fnc);
 void pFpLppii(x64emu_t *emu, uintptr_t fnc);
+void pFpLppip(x64emu_t *emu, uintptr_t fnc);
+void pFpLppup(x64emu_t *emu, uintptr_t fnc);
 void pFppiiii(x64emu_t *emu, uintptr_t fnc);
 void pFppiipp(x64emu_t *emu, uintptr_t fnc);
 void pFppiCCC(x64emu_t *emu, uintptr_t fnc);
 void pFppiupp(x64emu_t *emu, uintptr_t fnc);
+void pFppilpp(x64emu_t *emu, uintptr_t fnc);
 void pFppipip(x64emu_t *emu, uintptr_t fnc);
 void pFppippi(x64emu_t *emu, uintptr_t fnc);
 void pFppippp(x64emu_t *emu, uintptr_t fnc);
+void pFppuupp(x64emu_t *emu, uintptr_t fnc);
 void pFppupii(x64emu_t *emu, uintptr_t fnc);
 void pFppuppp(x64emu_t *emu, uintptr_t fnc);
+void pFpplplp(x64emu_t *emu, uintptr_t fnc);
 void pFpplppp(x64emu_t *emu, uintptr_t fnc);
 void pFpppiup(x64emu_t *emu, uintptr_t fnc);
 void pFpppupp(x64emu_t *emu, uintptr_t fnc);
@@ -2105,6 +2187,7 @@ void vFpipipii(x64emu_t *emu, uintptr_t fnc);
 void vFpippppu(x64emu_t *emu, uintptr_t fnc);
 void vFpuuuuuu(x64emu_t *emu, uintptr_t fnc);
 void vFpuuUUuu(x64emu_t *emu, uintptr_t fnc);
+void vFpuupupu(x64emu_t *emu, uintptr_t fnc);
 void vFpuupppp(x64emu_t *emu, uintptr_t fnc);
 void vFpupuuup(x64emu_t *emu, uintptr_t fnc);
 void vFpupppui(x64emu_t *emu, uintptr_t fnc);
@@ -2139,6 +2222,7 @@ void vFpppiipp(x64emu_t *emu, uintptr_t fnc);
 void vFpppiupi(x64emu_t *emu, uintptr_t fnc);
 void vFpppippi(x64emu_t *emu, uintptr_t fnc);
 void vFpppuuuu(x64emu_t *emu, uintptr_t fnc);
+void vFpppffff(x64emu_t *emu, uintptr_t fnc);
 void vFppppiip(x64emu_t *emu, uintptr_t fnc);
 void vFppppiui(x64emu_t *emu, uintptr_t fnc);
 void vFppppipi(x64emu_t *emu, uintptr_t fnc);
@@ -2155,6 +2239,7 @@ void iFEpppiiu(x64emu_t *emu, uintptr_t fnc);
 void iFEpppppL(x64emu_t *emu, uintptr_t fnc);
 void iFEpppppp(x64emu_t *emu, uintptr_t fnc);
 void iFiiiiiip(x64emu_t *emu, uintptr_t fnc);
+void iFipupupi(x64emu_t *emu, uintptr_t fnc);
 void iFpiiiiii(x64emu_t *emu, uintptr_t fnc);
 void iFpiiiiip(x64emu_t *emu, uintptr_t fnc);
 void iFpiiiuwp(x64emu_t *emu, uintptr_t fnc);
@@ -2165,10 +2250,12 @@ void iFpiuLiii(x64emu_t *emu, uintptr_t fnc);
 void iFpiupppp(x64emu_t *emu, uintptr_t fnc);
 void iFpiLuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpiLuppp(x64emu_t *emu, uintptr_t fnc);
+void iFpipiiip(x64emu_t *emu, uintptr_t fnc);
 void iFpipipip(x64emu_t *emu, uintptr_t fnc);
 void iFpipippp(x64emu_t *emu, uintptr_t fnc);
 void iFpippLpp(x64emu_t *emu, uintptr_t fnc);
 void iFpippppW(x64emu_t *emu, uintptr_t fnc);
+void iFpippppp(x64emu_t *emu, uintptr_t fnc);
 void iFpIIpppp(x64emu_t *emu, uintptr_t fnc);
 void iFpWCiWCi(x64emu_t *emu, uintptr_t fnc);
 void iFpWppppW(x64emu_t *emu, uintptr_t fnc);
@@ -2214,6 +2301,7 @@ void iFpppiuwu(x64emu_t *emu, uintptr_t fnc);
 void iFpppippi(x64emu_t *emu, uintptr_t fnc);
 void iFpppippp(x64emu_t *emu, uintptr_t fnc);
 void iFpppuiii(x64emu_t *emu, uintptr_t fnc);
+void iFpppLppp(x64emu_t *emu, uintptr_t fnc);
 void iFppppilp(x64emu_t *emu, uintptr_t fnc);
 void iFppppipp(x64emu_t *emu, uintptr_t fnc);
 void iFppppdpu(x64emu_t *emu, uintptr_t fnc);
@@ -2228,6 +2316,8 @@ void uFEpppppp(x64emu_t *emu, uintptr_t fnc);
 void uFiiiuuuu(x64emu_t *emu, uintptr_t fnc);
 void uFuippppp(x64emu_t *emu, uintptr_t fnc);
 void uFpippppp(x64emu_t *emu, uintptr_t fnc);
+void uFpuuuupp(x64emu_t *emu, uintptr_t fnc);
+void uFpuuuppp(x64emu_t *emu, uintptr_t fnc);
 void uFpuupppp(x64emu_t *emu, uintptr_t fnc);
 void uFppiuppp(x64emu_t *emu, uintptr_t fnc);
 void uFppuuuup(x64emu_t *emu, uintptr_t fnc);
@@ -2261,28 +2351,37 @@ void pFpuupwwC(x64emu_t *emu, uintptr_t fnc);
 void pFpupiipp(x64emu_t *emu, uintptr_t fnc);
 void pFpuppipp(x64emu_t *emu, uintptr_t fnc);
 void pFplppppp(x64emu_t *emu, uintptr_t fnc);
+void pFpLLppup(x64emu_t *emu, uintptr_t fnc);
+void pFpLpipip(x64emu_t *emu, uintptr_t fnc);
+void pFpLpLLiL(x64emu_t *emu, uintptr_t fnc);
 void pFpLppiip(x64emu_t *emu, uintptr_t fnc);
+void pFpLppLLi(x64emu_t *emu, uintptr_t fnc);
 void pFppiiipp(x64emu_t *emu, uintptr_t fnc);
 void pFppiiCCC(x64emu_t *emu, uintptr_t fnc);
+void pFppiippp(x64emu_t *emu, uintptr_t fnc);
 void pFppipipp(x64emu_t *emu, uintptr_t fnc);
 void pFppipLpp(x64emu_t *emu, uintptr_t fnc);
 void pFppuippp(x64emu_t *emu, uintptr_t fnc);
 void pFppuuupp(x64emu_t *emu, uintptr_t fnc);
 void pFppuuppp(x64emu_t *emu, uintptr_t fnc);
+void pFppuLLip(x64emu_t *emu, uintptr_t fnc);
 void pFppliuip(x64emu_t *emu, uintptr_t fnc);
 void pFpplipup(x64emu_t *emu, uintptr_t fnc);
 void pFppLipip(x64emu_t *emu, uintptr_t fnc);
+void pFppLLiLi(x64emu_t *emu, uintptr_t fnc);
 void pFpppccci(x64emu_t *emu, uintptr_t fnc);
 void pFpppiiii(x64emu_t *emu, uintptr_t fnc);
 void pFpppCCCi(x64emu_t *emu, uintptr_t fnc);
 void pFpppuipp(x64emu_t *emu, uintptr_t fnc);
 void pFpppuuui(x64emu_t *emu, uintptr_t fnc);
 void pFpppuupp(x64emu_t *emu, uintptr_t fnc);
+void pFpppupup(x64emu_t *emu, uintptr_t fnc);
 void pFpppuppp(x64emu_t *emu, uintptr_t fnc);
 void pFpppfffi(x64emu_t *emu, uintptr_t fnc);
 void pFpppdddi(x64emu_t *emu, uintptr_t fnc);
 void pFpppllli(x64emu_t *emu, uintptr_t fnc);
 void pFpppLLLi(x64emu_t *emu, uintptr_t fnc);
+void pFppppiii(x64emu_t *emu, uintptr_t fnc);
 void pFppppuuu(x64emu_t *emu, uintptr_t fnc);
 void pFpppppuu(x64emu_t *emu, uintptr_t fnc);
 void pFppppppu(x64emu_t *emu, uintptr_t fnc);
@@ -2329,6 +2428,7 @@ void vFuuuuuuuu(x64emu_t *emu, uintptr_t fnc);
 void vFuuufffff(x64emu_t *emu, uintptr_t fnc);
 void vFffffffff(x64emu_t *emu, uintptr_t fnc);
 void vFpiiiiiii(x64emu_t *emu, uintptr_t fnc);
+void vFpiiiiiip(x64emu_t *emu, uintptr_t fnc);
 void vFpiiiipii(x64emu_t *emu, uintptr_t fnc);
 void vFpiiULipp(x64emu_t *emu, uintptr_t fnc);
 void vFpiUuupup(x64emu_t *emu, uintptr_t fnc);
@@ -2366,7 +2466,10 @@ void iFiiiiiiip(x64emu_t *emu, uintptr_t fnc);
 void iFiiupiupi(x64emu_t *emu, uintptr_t fnc);
 void iFipippppp(x64emu_t *emu, uintptr_t fnc);
 void iFuuuuuuuu(x64emu_t *emu, uintptr_t fnc);
+void iFdiippppL(x64emu_t *emu, uintptr_t fnc);
+void iFpipiipip(x64emu_t *emu, uintptr_t fnc);
 void iFpippuuii(x64emu_t *emu, uintptr_t fnc);
+void iFpippuupp(x64emu_t *emu, uintptr_t fnc);
 void iFpCCWWpWu(x64emu_t *emu, uintptr_t fnc);
 void iFpWCuWCuu(x64emu_t *emu, uintptr_t fnc);
 void iFpWWipppp(x64emu_t *emu, uintptr_t fnc);
@@ -2376,6 +2479,8 @@ void iFpuuiiiii(x64emu_t *emu, uintptr_t fnc);
 void iFpuuipppp(x64emu_t *emu, uintptr_t fnc);
 void iFpuuupupu(x64emu_t *emu, uintptr_t fnc);
 void iFpuupuupp(x64emu_t *emu, uintptr_t fnc);
+void iFpuuppiip(x64emu_t *emu, uintptr_t fnc);
+void iFpuuppppp(x64emu_t *emu, uintptr_t fnc);
 void iFpupppWWu(x64emu_t *emu, uintptr_t fnc);
 void iFpupppppp(x64emu_t *emu, uintptr_t fnc);
 void iFpUuuLpUi(x64emu_t *emu, uintptr_t fnc);
@@ -2385,8 +2490,10 @@ void iFpLLLiipi(x64emu_t *emu, uintptr_t fnc);
 void iFpLLppppp(x64emu_t *emu, uintptr_t fnc);
 void iFpLpipppp(x64emu_t *emu, uintptr_t fnc);
 void iFpLppLpip(x64emu_t *emu, uintptr_t fnc);
+void iFpLpppupu(x64emu_t *emu, uintptr_t fnc);
 void iFpLpppppp(x64emu_t *emu, uintptr_t fnc);
 void iFppiiipip(x64emu_t *emu, uintptr_t fnc);
+void iFppillppp(x64emu_t *emu, uintptr_t fnc);
 void iFppIIIppp(x64emu_t *emu, uintptr_t fnc);
 void iFppuiiuuu(x64emu_t *emu, uintptr_t fnc);
 void iFppuuuuuu(x64emu_t *emu, uintptr_t fnc);
@@ -2394,6 +2501,7 @@ void iFppuppppp(x64emu_t *emu, uintptr_t fnc);
 void iFpppiiipi(x64emu_t *emu, uintptr_t fnc);
 void iFpppiiipp(x64emu_t *emu, uintptr_t fnc);
 void iFpppipipi(x64emu_t *emu, uintptr_t fnc);
+void iFppppiiup(x64emu_t *emu, uintptr_t fnc);
 void iFppppippp(x64emu_t *emu, uintptr_t fnc);
 void iFppppppii(x64emu_t *emu, uintptr_t fnc);
 void iFpppppppi(x64emu_t *emu, uintptr_t fnc);
@@ -2407,12 +2515,13 @@ void uFEppppppp(x64emu_t *emu, uintptr_t fnc);
 void uFuipppppp(x64emu_t *emu, uintptr_t fnc);
 void uFuupuuiuf(x64emu_t *emu, uintptr_t fnc);
 void uFulpppppp(x64emu_t *emu, uintptr_t fnc);
+void uFpuupupuu(x64emu_t *emu, uintptr_t fnc);
 void uFpupuuuCp(x64emu_t *emu, uintptr_t fnc);
 void uFppuuuupp(x64emu_t *emu, uintptr_t fnc);
 void uFppuuuppu(x64emu_t *emu, uintptr_t fnc);
 void uFppuppppp(x64emu_t *emu, uintptr_t fnc);
 void uFpppppupp(x64emu_t *emu, uintptr_t fnc);
-void LFELpLpLpi(x64emu_t *emu, uintptr_t fnc);
+void LFELpupupu(x64emu_t *emu, uintptr_t fnc);
 void LFEpiupppp(x64emu_t *emu, uintptr_t fnc);
 void LFpLpuuLLu(x64emu_t *emu, uintptr_t fnc);
 void pFEiplllpp(x64emu_t *emu, uintptr_t fnc);
@@ -2440,7 +2549,14 @@ void pFpuuupwwp(x64emu_t *emu, uintptr_t fnc);
 void pFpupppppp(x64emu_t *emu, uintptr_t fnc);
 void pFpdwwWWui(x64emu_t *emu, uintptr_t fnc);
 void pFplpppppp(x64emu_t *emu, uintptr_t fnc);
+void pFpLuLpLip(x64emu_t *emu, uintptr_t fnc);
+void pFpLpipLup(x64emu_t *emu, uintptr_t fnc);
+void pFpLpLLiLi(x64emu_t *emu, uintptr_t fnc);
+void pFpLppuLLp(x64emu_t *emu, uintptr_t fnc);
+void pFpLppLLiL(x64emu_t *emu, uintptr_t fnc);
 void pFppiiiiii(x64emu_t *emu, uintptr_t fnc);
+void pFpppipipi(x64emu_t *emu, uintptr_t fnc);
+void pFppplippp(x64emu_t *emu, uintptr_t fnc);
 void pFppppuppp(x64emu_t *emu, uintptr_t fnc);
 void pFpppppupp(x64emu_t *emu, uintptr_t fnc);
 void iWEpuuiipp(x64emu_t *emu, uintptr_t fnc);
@@ -2480,6 +2596,7 @@ void vFddddddddd(x64emu_t *emu, uintptr_t fnc);
 void vFpiuippppi(x64emu_t *emu, uintptr_t fnc);
 void vFpipiuiipp(x64emu_t *emu, uintptr_t fnc);
 void vFpipppiipi(x64emu_t *emu, uintptr_t fnc);
+void vFpuuuuuuuu(x64emu_t *emu, uintptr_t fnc);
 void vFpLpppippp(x64emu_t *emu, uintptr_t fnc);
 void vFppiiiiiii(x64emu_t *emu, uintptr_t fnc);
 void vFppiiiiipi(x64emu_t *emu, uintptr_t fnc);
@@ -2500,6 +2617,7 @@ void vFppUUiUUUU(x64emu_t *emu, uintptr_t fnc);
 void vFppddddudd(x64emu_t *emu, uintptr_t fnc);
 void vFpplpppppi(x64emu_t *emu, uintptr_t fnc);
 void vFpppiiiiii(x64emu_t *emu, uintptr_t fnc);
+void vFpppffffff(x64emu_t *emu, uintptr_t fnc);
 void vFppppipiip(x64emu_t *emu, uintptr_t fnc);
 void vFpppppippp(x64emu_t *emu, uintptr_t fnc);
 void iFEpiiiiipi(x64emu_t *emu, uintptr_t fnc);
@@ -2520,6 +2638,7 @@ void iFpduuuLuLp(x64emu_t *emu, uintptr_t fnc);
 void iFpLiuiiLLL(x64emu_t *emu, uintptr_t fnc);
 void iFpLLiiuuii(x64emu_t *emu, uintptr_t fnc);
 void iFpLpiiuuii(x64emu_t *emu, uintptr_t fnc);
+void iFpLpppupup(x64emu_t *emu, uintptr_t fnc);
 void iFpLppppppp(x64emu_t *emu, uintptr_t fnc);
 void iFppiiiiiii(x64emu_t *emu, uintptr_t fnc);
 void iFppippippp(x64emu_t *emu, uintptr_t fnc);
@@ -2534,6 +2653,7 @@ void iFppppppppp(x64emu_t *emu, uintptr_t fnc);
 void uFEipippppp(x64emu_t *emu, uintptr_t fnc);
 void uFEpppufppp(x64emu_t *emu, uintptr_t fnc);
 void uFuulpiuiuf(x64emu_t *emu, uintptr_t fnc);
+void uFpuupuppuu(x64emu_t *emu, uintptr_t fnc);
 void uFppLpLuppp(x64emu_t *emu, uintptr_t fnc);
 void uFppppppppp(x64emu_t *emu, uintptr_t fnc);
 void lFpppipiipp(x64emu_t *emu, uintptr_t fnc);
@@ -2551,6 +2671,8 @@ void pFpiiCpWWup(x64emu_t *emu, uintptr_t fnc);
 void pFpCuWCCuuu(x64emu_t *emu, uintptr_t fnc);
 void pFpuuwwWWww(x64emu_t *emu, uintptr_t fnc);
 void pFpupuuuuup(x64emu_t *emu, uintptr_t fnc);
+void pFpLpLLipui(x64emu_t *emu, uintptr_t fnc);
+void pFpLppLLiLi(x64emu_t *emu, uintptr_t fnc);
 void pFppiiiiiip(x64emu_t *emu, uintptr_t fnc);
 void pFppipppppp(x64emu_t *emu, uintptr_t fnc);
 void pFpppiiiiii(x64emu_t *emu, uintptr_t fnc);
@@ -2599,6 +2721,7 @@ void vFppuuppppii(x64emu_t *emu, uintptr_t fnc);
 void vFppuppuiiii(x64emu_t *emu, uintptr_t fnc);
 void vFppupppiiii(x64emu_t *emu, uintptr_t fnc);
 void vFppdddddddd(x64emu_t *emu, uintptr_t fnc);
+void vFppppppppii(x64emu_t *emu, uintptr_t fnc);
 void vFpppppppppp(x64emu_t *emu, uintptr_t fnc);
 void iFEpiiiiippp(x64emu_t *emu, uintptr_t fnc);
 void iFEpupppLppL(x64emu_t *emu, uintptr_t fnc);
@@ -2613,7 +2736,9 @@ void iFppuuiiiiii(x64emu_t *emu, uintptr_t fnc);
 void iFppuuiiuupi(x64emu_t *emu, uintptr_t fnc);
 void iFpppiiipipi(x64emu_t *emu, uintptr_t fnc);
 void iFpppLLipppp(x64emu_t *emu, uintptr_t fnc);
+void iFpppppiiuup(x64emu_t *emu, uintptr_t fnc);
 void iFpppppppipi(x64emu_t *emu, uintptr_t fnc);
+void iFpppppppppu(x64emu_t *emu, uintptr_t fnc);
 void uFpddpippppp(x64emu_t *emu, uintptr_t fnc);
 void uFpppppppppp(x64emu_t *emu, uintptr_t fnc);
 void pFEiippppppp(x64emu_t *emu, uintptr_t fnc);
@@ -2624,6 +2749,7 @@ void pFpuwwWWuCuu(x64emu_t *emu, uintptr_t fnc);
 void pFpuuuwwwwWW(x64emu_t *emu, uintptr_t fnc);
 void pFpuuuWWWCCi(x64emu_t *emu, uintptr_t fnc);
 void pFplllllllll(x64emu_t *emu, uintptr_t fnc);
+void pFppippLLLip(x64emu_t *emu, uintptr_t fnc);
 void pFppuiipuuii(x64emu_t *emu, uintptr_t fnc);
 void pFpppiiiiiii(x64emu_t *emu, uintptr_t fnc);
 void pFpppppppppp(x64emu_t *emu, uintptr_t fnc);
@@ -2670,6 +2796,7 @@ void iFpLipiiiippp(x64emu_t *emu, uintptr_t fnc);
 void iFpLLpiiuuiiL(x64emu_t *emu, uintptr_t fnc);
 void iFppippipppip(x64emu_t *emu, uintptr_t fnc);
 void iFpppiiuuiiuu(x64emu_t *emu, uintptr_t fnc);
+void iFpppppiiuupp(x64emu_t *emu, uintptr_t fnc);
 void uFEpLiupppLuV(x64emu_t *emu, uintptr_t fnc);
 void uFEpLippppLup(x64emu_t *emu, uintptr_t fnc);
 void uFEpLippppLuA(x64emu_t *emu, uintptr_t fnc);
@@ -2715,6 +2842,7 @@ void pFWWiCCCCiipup(x64emu_t *emu, uintptr_t fnc);
 void pFpCuuWWwwCCup(x64emu_t *emu, uintptr_t fnc);
 void pFpuuuWWWWWWWW(x64emu_t *emu, uintptr_t fnc);
 void pFppiiuuuiupLp(x64emu_t *emu, uintptr_t fnc);
+void pFppippLLLiLpp(x64emu_t *emu, uintptr_t fnc);
 void pFpppppppppppp(x64emu_t *emu, uintptr_t fnc);
 void vFEpppppppiippp(x64emu_t *emu, uintptr_t fnc);
 void vFuiiiiiiiiiuup(x64emu_t *emu, uintptr_t fnc);
@@ -2736,6 +2864,7 @@ void uFippuuuulllipp(x64emu_t *emu, uintptr_t fnc);
 void uFppppuuupppppp(x64emu_t *emu, uintptr_t fnc);
 void pFpCuuwwWWWWuup(x64emu_t *emu, uintptr_t fnc);
 void pFpuupppwwwwWWC(x64emu_t *emu, uintptr_t fnc);
+void pFppLppppiiLpip(x64emu_t *emu, uintptr_t fnc);
 void pFpppppppuipppp(x64emu_t *emu, uintptr_t fnc);
 void pFppppppppppppp(x64emu_t *emu, uintptr_t fnc);
 void vFippppppppppppp(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedatk.c b/src/wrapped/wrappedatk.c
index d6b71c31..773212d9 100644
--- a/src/wrapped/wrappedatk.c
+++ b/src/wrapped/wrappedatk.c
@@ -44,7 +44,7 @@ GO(4)
 static uintptr_t my_AtkEventListenerInit_fct_##A = 0;               \
 static void my_AtkEventListenerInit_##A()                           \
 {                                                                   \
-    RunFunction(my_context, my_AtkEventListenerInit_fct_##A, 0);    \
+    RunFunctionFmt(my_AtkEventListenerInit_fct_##A, "");            \
 }
 SUPER()
 #undef GO
@@ -66,7 +66,7 @@ static void* find_AtkEventListenerInit_Fct(void* fct)
 static uintptr_t my_AtkEventListener_fct_##A = 0;               \
 static void my_AtkEventListener_##A(void* a)                    \
 {                                                               \
-    RunFunction(my_context, my_AtkEventListener_fct_##A, 1, a); \
+    RunFunctionFmt(my_AtkEventListener_fct_##A, "p", a);            \
 }
 SUPER()
 #undef GO
@@ -88,7 +88,7 @@ static void* find_AtkEventListener_Fct(void* fct)
 static uintptr_t my_AtkKeySnoopFunc_fct_##A = 0;                                \
 static int my_AtkKeySnoopFunc_##A(void* a, void* b)                             \
 {                                                                               \
-    return (int)RunFunction(my_context, my_AtkKeySnoopFunc_fct_##A, 2, a, b);   \
+    return (int)RunFunctionFmt(my_AtkKeySnoopFunc_fct_##A, "pp", a, b);             \
 }
 SUPER()
 #undef GO
@@ -110,7 +110,7 @@ static void* find_AtkKeySnoopFunc_Fct(void* fct)
 static uintptr_t my_GSignalEmissionHook_fct_##A = 0;                                    \
 static int my_GSignalEmissionHook_##A(void* a, uint32_t b, void* c, void* d)            \
 {                                                                                       \
-    return (int)RunFunction(my_context, my_GSignalEmissionHook_fct_##A, 4, a, b, c, d); \
+    return (int)RunFunctionFmt(my_GSignalEmissionHook_fct_##A, "pupp", a, b, c, d);             \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedatomic_private.h b/src/wrapped/wrappedatomic_private.h
index 2f8bb767..f98dea62 100644
--- a/src/wrapped/wrappedatomic_private.h
+++ b/src/wrapped/wrappedatomic_private.h
@@ -77,7 +77,7 @@ GO(__atomic_load, vFppi)
 //GO(__atomic_or_fetch_4, 
 //GO(__atomic_or_fetch_8, 
 //GO(atomic_signal_fence, 
-//GO(__atomic_store, 
+GO(__atomic_store, vFppi)
 //GO(__atomic_store_1, 
 //GO(__atomic_store_16, 
 //GO(__atomic_store_2, 
diff --git a/src/wrapped/wrappedatspi.c b/src/wrapped/wrappedatspi.c
index dcf9aa1f..ee1bd0d5 100644
--- a/src/wrapped/wrappedatspi.c
+++ b/src/wrapped/wrappedatspi.c
@@ -40,7 +40,7 @@ GO(4)
 static uintptr_t my_GDestroyNotify_fct_##A = 0;                 \
 static void my_GDestroyNotify_##A(void* a)                      \
 {                                                               \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, a);   \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", a);    \
 }
 SUPER()
 #undef GO
@@ -62,7 +62,7 @@ static void* find_GDestroyNotify_Fct(void* fct)
 static uintptr_t my_AtspiEventListenerCB_fct_##A = 0;                   \
 static void my_AtspiEventListenerCB_##A(void* a, void* b)               \
 {                                                                       \
-    RunFunction(my_context, my_AtspiEventListenerCB_fct_##A, 2, a, b);  \
+    RunFunctionFmt(my_AtspiEventListenerCB_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedbz2.c b/src/wrapped/wrappedbz2.c
index e3ff920e..85033983 100644
--- a/src/wrapped/wrappedbz2.c
+++ b/src/wrapped/wrappedbz2.c
@@ -37,7 +37,7 @@ GO(4)
 static uintptr_t my_alloc_fct_##A = 0;                                          \
 static void* my_alloc_##A(void* opaque, int m, int n)                           \
 {                                                                               \
-    return (void*)RunFunction(my_context, my_alloc_fct_##A, 3, opaque, m, n);   \
+    return (void*)RunFunctionFmt(my_alloc_fct_##A, "pii", opaque, m, n);  \
 }
 SUPER()
 #undef GO
@@ -69,7 +69,7 @@ static void* reverse_alloc_Fct(void* fct)
 static uintptr_t my_free_fct_##A = 0;                       \
 static void my_free_##A(void* opaque, void* p)              \
 {                                                           \
-    RunFunction(my_context, my_free_fct_##A, 2, opaque, p); \
+    RunFunctionFmt(my_free_fct_##A, "pp", opaque, p); \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedcap.c b/src/wrapped/wrappedcap.c
new file mode 100644
index 00000000..a7a3686d
--- /dev/null
+++ b/src/wrapped/wrappedcap.c
@@ -0,0 +1,18 @@
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <dlfcn.h>
+
+#include "wrappedlibs.h"
+
+#include "wrapper.h"
+#include "bridge.h"
+#include "librarian/library_private.h"
+#include "x64emu.h"
+
+const char* capName = "libcap.so.2";
+#define LIBNAME cap
+
+#include "wrappedlib_init.h"
+
diff --git a/src/wrapped/wrappedcap_private.h b/src/wrapped/wrappedcap_private.h
new file mode 100644
index 00000000..c523ad64
--- /dev/null
+++ b/src/wrapped/wrappedcap_private.h
@@ -0,0 +1,62 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error Meh....
+#endif
+
+//GO(cap_clear, 
+//GO(cap_clear_flag, 
+//GO(cap_compare, 
+//GO(cap_copy_ext, 
+//GO(cap_copy_int, 
+//GO(cap_drop_bound, 
+//GO(cap_dup, 
+//GO(cap_free, 
+//GO(cap_from_name, 
+//GO(cap_from_text, 
+//GO(cap_get_ambient, 
+//GO(cap_get_bound, 
+//GO(cap_get_fd, 
+//GO(cap_get_file, 
+//GO(cap_get_flag, 
+//GO(cap_get_mode, 
+//GO(cap_get_nsowner, 
+//GO(capgetp, 
+//GO(cap_get_pid, 
+//GO(cap_get_proc, 
+//GO(cap_get_secbits, 
+//GO(cap_iab_fill, 
+//GO(cap_iab_from_text, 
+//GO(cap_iab_get_proc, 
+//GO(cap_iab_get_vector, 
+//GO(cap_iab_init, 
+//GO(cap_iab_set_proc, 
+//GO(cap_iab_set_vector, 
+//GO(cap_iab_to_text, 
+//GO(cap_init, 
+//GO(cap_launch, 
+//GO(cap_launcher_callback, 
+//GO(cap_launcher_set_chroot, 
+//GO(cap_launcher_setgroups, 
+//GO(cap_launcher_set_iab, 
+//GO(cap_launcher_set_mode, 
+//GO(cap_launcher_setuid, 
+//GO(cap_max_bits, 
+//GO(cap_mode_name, 
+//GO(cap_new_launcher, 
+//GO(cap_reset_ambient, 
+//GO(cap_set_ambient, 
+//GO(cap_set_fd, 
+//GO(cap_set_file, 
+//GO(cap_set_flag, 
+//GO(cap_setgroups, 
+//GO(cap_set_mode, 
+//GO(cap_set_nsowner, 
+//GO(capsetp, 
+//GO(cap_set_proc, 
+//GO(cap_set_secbits, 
+//GO(cap_set_syscall, 
+//GO(cap_setuid, 
+//GO(cap_size, 
+//GO(cap_to_name, 
+//GO(cap_to_text, 
+//GO(_libcap_strdup, 
+//GOW(psx_load_syscalls, 
diff --git a/src/wrapped/wrappedcrypto.c b/src/wrapped/wrappedcrypto.c
index 21941bbf..d768555d 100644
--- a/src/wrapped/wrappedcrypto.c
+++ b/src/wrapped/wrappedcrypto.c
@@ -35,12 +35,180 @@ GO(2)   \
 GO(3)   \
 GO(4)
 
+// BIO_meth_set_write
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_write_fct_##A = 0;             \
+static int my_BIO_meth_set_write_##A(void* a, void* b, int c)   \
+{                                                               \
+    return (int)RunFunctionFmt(my_BIO_meth_set_write_fct_##A, "ppi", a, b, c);  \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_write_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_write_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_write_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_write_fct_##A == 0) {my_BIO_meth_set_write_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_write_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_write callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_read
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_read_fct_##A = 0;          \
+static int my_BIO_meth_set_read_##A(void* a, void* b, int c)\
+{                                                           \
+    return (int)RunFunctionFmt(my_BIO_meth_set_read_fct_##A, "ppi", a, b, c);   \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_read_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_read_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_read_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_read_fct_##A == 0) {my_BIO_meth_set_read_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_read_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_read callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_puts
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_puts_fct_##A = 0;      \
+static int my_BIO_meth_set_puts_##A(void* a, void* b)   \
+{                                                       \
+    return (int)RunFunctionFmt(my_BIO_meth_set_puts_fct_##A, "pp", a, b);   \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_puts_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_puts_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_puts_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_puts_fct_##A == 0) {my_BIO_meth_set_puts_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_puts_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_puts callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_gets
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_gets_fct_##A = 0;          \
+static int my_BIO_meth_set_gets_##A(void* a, void* b, int c)\
+{                                                           \
+    return (int)RunFunctionFmt(my_BIO_meth_set_gets_fct_##A, "ppi", a, b, c);   \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_gets_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_gets_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_gets_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_gets_fct_##A == 0) {my_BIO_meth_set_gets_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_gets_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_gets callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_ctrl
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_ctrl_fct_##A = 0;                      \
+static long my_BIO_meth_set_ctrl_##A(void* a, int b, long c, void* d)   \
+{                                                                       \
+    return (long)RunFunctionFmt(my_BIO_meth_set_ctrl_fct_##A, "pilp", a, b, c, d);  \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_ctrl_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_ctrl_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_ctrl_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_ctrl_fct_##A == 0) {my_BIO_meth_set_ctrl_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_ctrl_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_ctrl callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_create
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_create_fct_##A = 0;\
+static int my_BIO_meth_set_create_##A(void* a)      \
+{                                                   \
+    return (int)RunFunctionFmt(my_BIO_meth_set_create_fct_##A, "p", a); \
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_create_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_create_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_create_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_create_fct_##A == 0) {my_BIO_meth_set_create_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_create_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_create callback\n");
+    return NULL;
+}
+
+// BIO_meth_set_destroy
+#define GO(A)   \
+static uintptr_t my_BIO_meth_set_destroy_fct_##A = 0;   \
+static int my_BIO_meth_set_destroy_##A(void* a)         \
+{                                                       \
+    return (int)RunFunctionFmt(my_BIO_meth_set_destroy_fct_##A, "p", a);\
+}
+SUPER()
+#undef GO
+static void* find_BIO_meth_set_destroy_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_BIO_meth_set_destroy_fct_##A == (uintptr_t)fct) return my_BIO_meth_set_destroy_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_BIO_meth_set_destroy_fct_##A == 0) {my_BIO_meth_set_destroy_fct_##A = (uintptr_t)fct; return my_BIO_meth_set_destroy_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto BIO_meth_set_destroy callback\n");
+    return NULL;
+}
+
 // ENGINE_ctrl_cb
 #define GO(A)   \
-static uintptr_t my_ENGINE_ctrl_cb_fct_##A = 0;                                                      \
-static void my_ENGINE_ctrl_cb_##A()                    \
-{                                                                                                   \
-    RunFunction(my_context, my_ENGINE_ctrl_cb_fct_##A, 0);  \
+static uintptr_t my_ENGINE_ctrl_cb_fct_##A = 0; \
+static void my_ENGINE_ctrl_cb_##A()             \
+{                                               \
+    RunFunctionFmt(my_ENGINE_ctrl_cb_fct_##A, "");  \
 }
 SUPER()
 #undef GO
@@ -64,7 +232,7 @@ static void* find_ENGINE_ctrl_cb_Fct(void* fct)
 static uintptr_t my_cmp_fnc_fct_##A = 0;                                \
 static int my_cmp_fnc_##A(void* a, void* b)                             \
 {                                                                       \
-    return (int)RunFunction(my_context, my_cmp_fnc_fct_##A, 2, a, b);   \
+    return (int)RunFunctionFmt(my_cmp_fnc_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -88,7 +256,7 @@ static void* find_cmp_fnc_Fct(void* fct)
 static uintptr_t my_free_fnc_fct_##A = 0;               \
 static void my_free_fnc_##A(void* p)                    \
 {                                                       \
-    RunFunction(my_context, my_free_fnc_fct_##A, 1, p); \
+    RunFunctionFmt(my_free_fnc_fct_##A, "p", p); \
 }
 SUPER()
 #undef GO
@@ -112,7 +280,7 @@ static void* find_free_fnc_Fct(void* fct)
 static uintptr_t my_id_func_fct_##A = 0;                                    \
 static unsigned long my_id_func_##A()                                       \
 {                                                                           \
-    return (unsigned long)RunFunction(my_context, my_id_func_fct_##A, 0);   \
+    return (unsigned long)RunFunctionFmt(my_id_func_fct_##A, "");   \
 }
 SUPER()
 #undef GO
@@ -136,7 +304,7 @@ static void* find_id_func_Fct(void* fct)
 static uintptr_t my_lock_func_fct_##A = 0;                              \
 static void my_lock_func_##A(int mode, int n, void* f, int l)           \
 {                                                                       \
-    RunFunction(my_context, my_lock_func_fct_##A, 4, mode, n, f, l);    \
+    RunFunctionFmt(my_lock_func_fct_##A, "iipi", mode, n, f, l);    \
 }
 SUPER()
 #undef GO
@@ -160,7 +328,7 @@ static void* find_lock_func_Fct(void* fct)
 static uintptr_t my_passphrase_fct_##A = 0;                                             \
 static int my_passphrase_##A(void* buff, int size, int rw, void* u)                     \
 {                                                                                       \
-    return (int)RunFunction(my_context, my_passphrase_fct_##A, 4, buff, size, rw, u);   \
+    return (int)RunFunctionFmt(my_passphrase_fct_##A, "piip", buff, size, rw, u);   \
 }
 SUPER()
 #undef GO
@@ -184,7 +352,7 @@ static void* find_passphrase_Fct(void* fct)
 static uintptr_t my_xnew_fct_##A = 0;                           \
 static void* my_xnew_##A()                                      \
 {                                                               \
-    return (void*)RunFunction(my_context, my_xnew_fct_##A, 0);  \
+    return (void*)RunFunctionFmt(my_xnew_fct_##A, "");  \
 }
 SUPER()
 #undef GO
@@ -208,7 +376,7 @@ static void* find_xnew_Fct(void* fct)
 static uintptr_t my_d2i_fct_##A = 0;                            \
 static void* my_d2i_##A()                                       \
 {                                                               \
-    return (void*)RunFunction(my_context, my_d2i_fct_##A, 0);   \
+    return (void*)RunFunctionFmt(my_d2i_fct_##A, "");   \
 }
 SUPER()
 #undef GO
@@ -232,7 +400,7 @@ static void* find_d2i_Fct(void* fct)
 static uintptr_t my_i2d_fct_##A = 0;                        \
 static int my_i2d_##A()                                     \
 {                                                           \
-    return (int)RunFunction(my_context, my_i2d_fct_##A, 0); \
+    return (int)RunFunctionFmt(my_i2d_fct_##A, ""); \
 }
 SUPER()
 #undef GO
@@ -256,7 +424,7 @@ static void* find_i2d_Fct(void* fct)
 static uintptr_t my_pem_password_cb_fct_##A = 0;                                    \
 static int my_pem_password_cb_##A(void* a, int b, int c, void* d)                   \
 {                                                                                   \
-    return (int)RunFunction(my_context, my_pem_password_cb_fct_##A, 4, a, b, c, d); \
+    return (int)RunFunctionFmt(my_pem_password_cb_fct_##A, "piip", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -275,12 +443,37 @@ static void* find_pem_password_cb_Fct(void* fct)
     return NULL;
 }
 
+// ctx_verify_cb
+#define GO(A)   \
+static uintptr_t my_ctx_verify_cb_fct_##A = 0;                          \
+static int my_ctx_verify_cb_##A(int a, void* b)                         \
+{                                                                       \
+    return (int)RunFunctionFmt(my_ctx_verify_cb_fct_##A, "ip", a, b);   \
+}
+SUPER()
+#undef GO
+static void* find_ctx_verify_cb_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_ctx_verify_cb_fct_##A == (uintptr_t)fct) return my_ctx_verify_cb_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_ctx_verify_cb_fct_##A == 0) {my_ctx_verify_cb_fct_##A = (uintptr_t)fct; return my_ctx_verify_cb_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libcrypto ctx_verify_cb callback\n");
+    return NULL;
+}
+
+
 // verify_cb
 #define GO(A)   \
 static uintptr_t my_verify_cb_fct_##A = 0;                              \
 static int my_verify_cb_##A(int a, void* b)                             \
 {                                                                       \
-    return (int)RunFunction(my_context, my_verify_cb_fct_##A, 2, a, b); \
+    return (int)RunFunctionFmt(my_verify_cb_fct_##A, "ip", a, b); \
 }
 SUPER()
 #undef GO
@@ -301,6 +494,42 @@ static void* find_verify_cb_Fct(void* fct)
 
 #undef SUPER
 
+EXPORT int32_t my_BIO_meth_set_write(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_write(biom, find_BIO_meth_set_write_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_read(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_read(biom, find_BIO_meth_set_read_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_puts(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_puts(biom, find_BIO_meth_set_puts_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_gets(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_gets(biom, find_BIO_meth_set_gets_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_ctrl(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_ctrl(biom, find_BIO_meth_set_ctrl_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_create(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_create(biom, find_BIO_meth_set_create_Fct(cb));
+}
+EXPORT int32_t my_BIO_meth_set_destroy(x64emu_t* emu, void* biom, void* cb)
+{
+    (void)emu;
+    return my->BIO_meth_set_destroy(biom, find_BIO_meth_set_destroy_Fct(cb));
+}
+
 EXPORT int32_t my_ENGINE_ctrl(x64emu_t* emu, void* e, int32_t cmd, int32_t i, void* p, void* f)
 {
     (void)emu;
@@ -373,6 +602,13 @@ EXPORT int my_PEM_write_bio_RSAPrivateKey(x64emu_t* emu, void* bp, void* x, void
     return my->PEM_write_bio_RSAPrivateKey(bp, x, e, str, len, find_passphrase_Fct(cb), u);
 }
 
+
+EXPORT int my_PEM_write_bio_PrivateKey(x64emu_t* emu, void* bp, void* x, void* e, void* str, int len, void* cb, void* u)
+{
+    (void)emu;
+    return my->PEM_write_bio_PrivateKey(bp, x, e, str, len, find_passphrase_Fct(cb), u);
+}
+
 EXPORT int my_PEM_write_bio_ECPrivateKey(x64emu_t* emu, void* bp, void* x, void* e, void* str, int len, void* cb, void* u)
 {
     (void)emu;
@@ -409,6 +645,25 @@ EXPORT void* my_PEM_read_bio_PKCS7(x64emu_t* emu, void* bp, void* x, void* cb, v
     return my->PEM_read_bio_PKCS7(bp, x, find_pem_password_cb_Fct(cb), u);
 }
 
+EXPORT void* my_PEM_read_bio_PrivateKey(x64emu_t* emu, void* bp, void* x, void* cb, void* u)
+{
+    (void)emu;
+    return my->PEM_read_bio_PrivateKey(bp, x, find_pem_password_cb_Fct(cb), u);
+}
+
+
+EXPORT void* my_PEM_read_bio_PUBKEY(x64emu_t* emu, void* bp, void* x, void* cb, void* u)
+{
+    (void)emu;
+    return my->PEM_read_bio_PUBKEY(bp, x, find_pem_password_cb_Fct(cb), u);
+}
+
+EXPORT void* my_PEM_read_bio_DHparams(x64emu_t* emu, void* bp, void* x, void* cb, void* u)
+{
+    (void)emu;
+    return my->PEM_read_bio_DHparams(bp, x, find_pem_password_cb_Fct(cb), u);
+}
+
 EXPORT void* my_PEM_read_bio_X509(x64emu_t* emu, void* bp, void* x, void* cb, void* u)
 {
     (void)emu;
@@ -442,7 +697,14 @@ EXPORT void* my_PEM_read_bio_X509_CERT_PAIR(x64emu_t* emu, void* bp, void* x, vo
 EXPORT void my_X509_STORE_CTX_set_verify_cb(x64emu_t* emu, void* ctx, void* cb)
 {
     (void)emu;
-    my->X509_STORE_CTX_set_verify_cb(ctx, find_verify_cb_Fct(cb));
+    my->X509_STORE_CTX_set_verify_cb(ctx, find_ctx_verify_cb_Fct(cb));
+}
+
+
+EXPORT void my_X509_STORE_set_verify_cb(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->X509_STORE_set_verify_cb(ctx, find_verify_cb_Fct(cb));
 }
 
 EXPORT void my_OPENSSL_sk_pop_free(x64emu_t* emu, void* s, void* cb)
diff --git a/src/wrapped/wrappedcrypto3.c b/src/wrapped/wrappedcrypto3.c
index 442237a1..a6317af8 100644
--- a/src/wrapped/wrappedcrypto3.c
+++ b/src/wrapped/wrappedcrypto3.c
@@ -17,6 +17,7 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 #include "callback.h"
+#include "myalign.h"
 
 const char* crypto3Name = "libcrypto.so.3";
 #define LIBNAME crypto3
@@ -35,10 +36,10 @@ GO(4)
 
 // ENGINE_ctrl_cb
 #define GO(A)   \
-static uintptr_t my3_ENGINE_ctrl_cb_fct_##A = 0;                                                      \
-static void my3_ENGINE_ctrl_cb_##A()                    \
-{                                                                                                   \
-    RunFunction(my_context, my3_ENGINE_ctrl_cb_fct_##A, 0);  \
+static uintptr_t my3_ENGINE_ctrl_cb_fct_##A = 0;            \
+static void my3_ENGINE_ctrl_cb_##A()                        \
+{                                                           \
+    RunFunctionFmt(my3_ENGINE_ctrl_cb_fct_##A, "");   \
 }
 SUPER()
 #undef GO
@@ -61,8 +62,8 @@ static void* find_ENGINE_ctrl_cb_Fct(void* fct)
 #define GO(A)   \
 static uintptr_t my3_cmp_fnc_fct_##A = 0;                                \
 static int my3_cmp_fnc_##A(void* a, void* b)                             \
-{                                                                       \
-    return (int)RunFunction(my_context, my3_cmp_fnc_fct_##A, 2, a, b);   \
+{                                                                        \
+    return (int)RunFunctionFmt(my3_cmp_fnc_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -86,7 +87,7 @@ static void* find_cmp_fnc_Fct(void* fct)
 static uintptr_t my3_free_fnc_fct_##A = 0;               \
 static void my3_free_fnc_##A(void* p)                    \
 {                                                       \
-    RunFunction(my_context, my3_free_fnc_fct_##A, 1, p); \
+    RunFunctionFmt(my3_free_fnc_fct_##A, "p", p); \
 }
 SUPER()
 #undef GO
@@ -110,7 +111,7 @@ static void* find_free_fnc_Fct(void* fct)
 static uintptr_t my3_id_func_fct_##A = 0;                                    \
 static unsigned long my3_id_func_##A()                                       \
 {                                                                           \
-    return (unsigned long)RunFunction(my_context, my3_id_func_fct_##A, 0);   \
+    return (unsigned long)RunFunctionFmt(my3_id_func_fct_##A, "");   \
 }
 SUPER()
 #undef GO
@@ -134,7 +135,7 @@ static void* find_id_func_Fct(void* fct)
 static uintptr_t my3_lock_func_fct_##A = 0;                              \
 static void my3_lock_func_##A(int mode, int n, void* f, int l)           \
 {                                                                       \
-    RunFunction(my_context, my3_lock_func_fct_##A, 4, mode, n, f, l);    \
+    RunFunctionFmt(my3_lock_func_fct_##A, "iipi", mode, n, f, l);    \
 }
 SUPER()
 #undef GO
@@ -158,7 +159,7 @@ static void* find_lock_func_Fct(void* fct)
 static uintptr_t my3_passphrase_fct_##A = 0;                                             \
 static int my3_passphrase_##A(void* buff, int size, int rw, void* u)                     \
 {                                                                                       \
-    return (int)RunFunction(my_context, my3_passphrase_fct_##A, 4, buff, size, rw, u);   \
+    return (int)RunFunctionFmt(my3_passphrase_fct_##A, "piip", buff, size, rw, u);   \
 }
 SUPER()
 #undef GO
@@ -182,7 +183,7 @@ static void* find_passphrase_Fct(void* fct)
 static uintptr_t my3_xnew_fct_##A = 0;                           \
 static void* my3_xnew_##A()                                      \
 {                                                               \
-    return (void*)RunFunction(my_context, my3_xnew_fct_##A, 0);  \
+    return (void*)RunFunctionFmt(my3_xnew_fct_##A, "");  \
 }
 SUPER()
 #undef GO
@@ -206,7 +207,7 @@ static void* find_xnew_Fct(void* fct)
 static uintptr_t my3_d2i_fct_##A = 0;                            \
 static void* my3_d2i_##A()                                       \
 {                                                               \
-    return (void*)RunFunction(my_context, my3_d2i_fct_##A, 0);   \
+    return (void*)RunFunctionFmt(my3_d2i_fct_##A, "");   \
 }
 SUPER()
 #undef GO
@@ -230,7 +231,7 @@ static void* find_d2i_Fct(void* fct)
 static uintptr_t my3_i2d_fct_##A = 0;                        \
 static int my3_i2d_##A()                                     \
 {                                                           \
-    return (int)RunFunction(my_context, my3_i2d_fct_##A, 0); \
+    return (int)RunFunctionFmt(my3_i2d_fct_##A, ""); \
 }
 SUPER()
 #undef GO
@@ -254,7 +255,7 @@ static void* find_i2d_Fct(void* fct)
 static uintptr_t my3_pem_password_cb_fct_##A = 0;                                    \
 static int my3_pem_password_cb_##A(void* a, int b, int c, void* d)                   \
 {                                                                                   \
-    return (int)RunFunction(my_context, my3_pem_password_cb_fct_##A, 4, a, b, c, d); \
+    return (int)RunFunctionFmt(my3_pem_password_cb_fct_##A, "piip", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -275,10 +276,10 @@ static void* find_pem_password_cb_Fct(void* fct)
 
 // verify_cb
 #define GO(A)   \
-static uintptr_t my3_verify_cb_fct_##A = 0;                              \
-static int my3_verify_cb_##A(int a, void* b)                             \
-{                                                                       \
-    return (int)RunFunction(my_context, my3_verify_cb_fct_##A, 2, a, b); \
+static uintptr_t my3_verify_cb_fct_##A = 0;                                     \
+static int my3_verify_cb_##A(int a, void* b)                                    \
+{                                                                               \
+    return (int)RunFunctionFmt(my3_verify_cb_fct_##A, "ip", a, b);  \
 }
 SUPER()
 #undef GO
@@ -437,6 +438,24 @@ EXPORT void my3_OPENSSL_sk_pop_free(x64emu_t* emu, void* s, void* cb)
     my->OPENSSL_sk_pop_free(s, find_free_fnc_Fct(cb));
 }
 
+EXPORT void my3_ERR_set_error(x64emu_t* emu, int lib, int reason, void* fmt, uintptr_t* b)
+{
+    myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3);
+    PREPARE_VALIST;
+    my->ERR_vset_error(lib, reason, fmt, VARARGS);
+}
+EXPORT void my3_ERR_vset_error(x64emu_t* emu, int lib, int reason, void* fmt, x64_va_list_t b)
+{
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(b);
+    #else
+    myStackAlignValist(emu, (const char*)fmt, emu->scratch, b);
+    PREPARE_VALIST;
+    #endif
+    my->ERR_vset_error(lib, reason, fmt, VARARGS);
+}
+
+
 #define CUSTOM_INIT \
     SETALT(my3_);   \
     getMy(lib);
diff --git a/src/wrapped/wrappedcrypto3_private.h b/src/wrapped/wrappedcrypto3_private.h
index 3e2db7cc..40a0c185 100644
--- a/src/wrapped/wrappedcrypto3_private.h
+++ b/src/wrapped/wrappedcrypto3_private.h
@@ -369,6 +369,7 @@ GO(BIO_sock_init, iFv)
 //GO(BIO_s_socket, 
 GO(BIO_tell, iFp)
 GO(BIO_test_flags, iFpi)
+GO(BIO_up_ref, iFp)
 GO(BIO_vfree, vFp)
 //GO(BIO_vprintf, 
 //GO(BIO_vsnprintf, 
@@ -1191,13 +1192,18 @@ GO(DSA_free, vFp)
 GO(DSA_generate_key, iFp)
 //GO(DSA_generate_parameters, 
 GO(DSA_generate_parameters_ex, iFpipippp)
+GO(DSA_get0_key, vFppp)
+GO(DSA_get0_pqg, vFpppp)
 //GO(DSA_get_default_method, 
 //GO(DSA_get_ex_data, 
 //GO(DSA_get_ex_new_index, 
+GO(DSA_get_method, pFp)
 GO(DSA_new, pFv)
 //GO(DSA_new_method, 
 GO(DSA_OpenSSL, pFv)
 //GO(dsa_paramgen_check_g, 
+GO(DSA_set0_key, iFppp)
+GO(DSA_set0_pqg, iFppp)
 //GO(DSAparams_dup, 
 //GO(DSAparams_print, 
 //GO(DSAparams_print_fp, 
@@ -1690,6 +1696,7 @@ GO(ERR_load_PKCS7_strings, vFv)
 //GO(ERR_load_UI_strings, 
 //GO(ERR_load_X509_strings, 
 //GO(ERR_load_X509V3_strings, 
+GO(ERR_new, vFv)
 GO(ERR_peek_error, LFv)
 GO(ERR_peek_error_line, LFpp)
 GO(ERR_peek_error_line_data, LFpppp)
@@ -1705,6 +1712,9 @@ GO(ERR_reason_error_string, pFu)
 //GO(ERR_release_err_state_table, 
 //GO(ERR_remove_state, 
 GO(ERR_remove_thread_state, vFp)
+GO(ERR_set_debug, vFpip)
+GOM(ERR_set_error, vFEiipV)
+GOM(ERR_vset_error, vFEiipA)
 //GO(ERR_set_error_data, 
 //GO(ERR_set_implementation, 
 //GO(ERR_set_mark, 
@@ -1789,6 +1799,8 @@ GO(EVP_aes_256_gcm, pFv)
 //GO(EVP_cast5_cfb64, 
 //GO(EVP_cast5_ecb, 
 //GO(EVP_cast5_ofb, 
+GO(EVP_chacha20, pFv)
+GO(EVP_chacha20_poly1305, pFv)
 //GO(EVP_Cipher, 
 GO(EVP_CIPHER_asn1_to_param, iFpp)
 //GO(EVP_CIPHER_block_size, 
@@ -1801,12 +1813,15 @@ GO(EVP_CIPHER_CTX_ctrl, iFpiip)
 //GO(EVP_CIPHER_CTX_flags, 
 GO(EVP_CIPHER_CTX_free, vFp)
 //GO(EVP_CIPHER_CTX_get_app_data, 
+GO(EVP_CIPHER_CTX_get_original_iv, iFppL)
+GO(EVP_CIPHER_CTX_get_updated_iv, iFppL)
 GO(EVP_CIPHER_CTX_init, vFp)
 //GO(EVP_CIPHER_CTX_iv_length, 
 //GO(EVP_CIPHER_CTX_key_length, 
 GO(EVP_CIPHER_CTX_new, pFv)
 //GO(EVP_CIPHER_CTX_nid, 
 //GO(EVP_CIPHER_CTX_rand_key, 
+GO(EVP_CIPHER_CTX_reset, iFp)
 //GO(EVP_CIPHER_CTX_set_app_data, 
 //GO(EVP_CIPHER_CTX_set_flags, 
 GO(EVP_CIPHER_CTX_set_key_length, iFpi)
@@ -1912,9 +1927,9 @@ GO(EVP_MD_CTX_set_flags, vFpi)
 //GO(EVP_MD_do_all, 
 //GO(EVP_MD_do_all_sorted, 
 //GO(EVP_MD_flags, 
+GO(EVP_MD_get_size, iFp)
 GO(EVP_md_null, pFv)
 GO(EVP_MD_pkey_type, iFp)
-GO(EVP_MD_size, iFp)
 GO(EVP_MD_type, iFp)
 //GO(EVP_OpenFinal, 
 //GO(EVP_OpenInit, 
@@ -1923,8 +1938,9 @@ GO(EVP_MD_type, iFp)
 //GO(EVP_PBE_CipherInit, 
 //GO(EVP_PBE_cleanup, 
 //GO(EVP_PBE_find, 
-//GO(EVP_PKCS82PKEY, 
-//GO(EVP_PKEY2PKCS8, 
+GO(EVP_PKCS82PKEY, pFp)
+GO(EVP_PKCS82PKEY_ex, pFppp)
+GO(EVP_PKEY2PKCS8, pFp)
 //GO(EVP_PKEY2PKCS8_broken, 
 //GO(EVP_PKEY_add1_attr, 
 //GO(EVP_PKEY_add1_attr_by_NID, 
@@ -1956,8 +1972,8 @@ GO(EVP_PKEY_CTX_ctrl, iFpiiiip)
 GO(EVP_PKEY_CTX_ctrl_str, iFppp)
 GO(EVP_PKEY_CTX_dup, pFp)
 GO(EVP_PKEY_CTX_free, vFp)
-//GO(EVP_PKEY_CTX_get0_peerkey, 
-//GO(EVP_PKEY_CTX_get0_pkey, 
+GO(EVP_PKEY_CTX_get0_peerkey, pFp)
+GO(EVP_PKEY_CTX_get0_pkey, pFp)
 GO(EVP_PKEY_CTX_get_app_data, pFp)
 //GO(EVP_PKEY_CTX_get_cb, 
 //GO(EVP_PKEY_CTX_get_data, 
@@ -1969,19 +1985,26 @@ GO(EVP_PKEY_CTX_new_id, pFip)
 GO(EVP_PKEY_CTX_set_app_data, vFpp)
 //GO(EVP_PKEY_CTX_set_cb, 
 //GO(EVP_PKEY_CTX_set_data, 
-//GO(EVP_PKEY_decrypt, 
-//GO(EVP_PKEY_decrypt_init, 
+GO(EVP_PKEY_CTX_set_rsa_keygen_bits, iFpi)
+GO(EVP_PKEY_CTX_set_rsa_oaep_md, iFpp)
+GO(EVP_PKEY_CTX_set_rsa_padding, iFpi)
+GO(EVP_PKEY_CTX_set_rsa_pss_saltlen, iFpi)
+GO(EVP_PKEY_CTX_set_signature_md, iFpp)
+GO(EVP_PKEY_check, iFp)
+GO(EVP_PKEY_decrypt, iFppppL)
+GO(EVP_PKEY_decrypt_init, iFp)
 //GO(EVP_PKEY_decrypt_old, 
 //GO(EVP_PKEY_delete_attr, 
 GO(EVP_PKEY_derive, iFppp)
 GO(EVP_PKEY_derive_init, iFp)
 GO(EVP_PKEY_derive_set_peer, iFppi)
-//GO(EVP_PKEY_encrypt, 
-//GO(EVP_PKEY_encrypt_init, 
+GO(EVP_PKEY_encrypt, iFppppL)
+GO(EVP_PKEY_encrypt_init, iFp)
 //GO(EVP_PKEY_encrypt_old, 
 GO(EVP_PKEY_free, vFp)
 //GO(EVP_PKEY_get0, 
 //GO(EVP_PKEY_get0_asn1, 
+GO(EVP_PKEY_get0_RSA, pFp)
 //GO(EVP_PKEY_get1_DH, 
 GO(EVP_PKEY_get1_DSA, pFp)
 GO(EVP_PKEY_get1_EC_KEY, pFp)
@@ -1990,7 +2013,9 @@ GO(EVP_PKEY_get1_RSA, pFp)
 //GO(EVP_PKEY_get_attr_by_NID, 
 //GO(EVP_PKEY_get_attr_by_OBJ, 
 //GO(EVP_PKEY_get_attr_count, 
+GO(EVP_PKEY_get_base_id, iFp)
 //GO(EVP_PKEY_get_default_digest_nid, 
+GO(EVP_PKEY_get_size, iFp)
 //GO(EVP_PKEY_id, 
 GO(EVP_PKEY_keygen, iFpp)
 GO(EVP_PKEY_keygen_init, iFp)
@@ -2022,6 +2047,7 @@ GO(EVP_PKEY_paramgen_init, iFp)
 //GO(EVP_PKEY_print_params, 
 //GO(EVP_PKEY_print_private, 
 //GO(EVP_PKEY_print_public, 
+GO(EVP_PKEY_public_check, iFp)
 //GO(EVP_PKEY_save_parameters, 
 //GO(EVP_PKEY_set1_DH, 
 GO(EVP_PKEY_set1_DSA, iFpp)
@@ -2110,7 +2136,9 @@ GO(GENERAL_SUBTREE_new, pFv)
 GO(HMAC, pFppipLpp)
 GO(HMAC_CTX_cleanup, vFp)
 GO(HMAC_CTX_copy, iFpp)
+GO(HMAC_CTX_free, vFp)
 GO(HMAC_CTX_init, vFp)
+GO(HMAC_CTX_new, pFv)
 GO(HMAC_CTX_set_flags, vFpL)
 GO(HMAC_Final, iFppp)
 GO(HMAC_Init, iFppip)
@@ -2639,6 +2667,7 @@ GO(OPENSSL_strcasecmp, iFpp)
 GO(OPENSSL_strncasecmp, iFppL)
 //GO(OPENSSL_uni2asc, 
 //GO(OPENSSL_wipe_cpu, 
+GO(OpenSSL_version_num, LFv)
 //GO(_ossl_096_des_random_seed, 
 //GO(_ossl_old_crypt, 
 //GO(_ossl_old_des_cbc_cksum, 
@@ -2677,6 +2706,7 @@ GO(OPENSSL_strncasecmp, iFppL)
 //GO(_ossl_old_des_string_to_2keys, 
 //GO(_ossl_old_des_string_to_key, 
 //GO(_ossl_old_des_xcbc_encrypt, 
+GO(OSSL_PROVIDER_try_load, pFppi)
 //GO(OTHERNAME_cmp, 
 //GO(OTHERNAME_free, 
 //GO(OTHERNAME_new, 
@@ -2867,8 +2897,8 @@ GO(PKCS12_PBE_keyivgen, iFppipppi)
 //GO(PKCS5_PBE_keyivgen, 
 //GO(PKCS5_pbe_set, 
 //GO(PKCS5_pbe_set0_algor, 
-//GO(PKCS5_PBKDF2_HMAC, 
-//GO(PKCS5_PBKDF2_HMAC_SHA1, 
+GO(PKCS5_PBKDF2_HMAC, iFpipiipip)
+GO(PKCS5_PBKDF2_HMAC_SHA1, iFpipiiip)
 //GO(PKCS5_pbkdf2_set, 
 //GO(PKCS5_v2_PBE_keyivgen, 
 //GO(PKCS5_v2_PBKDF2_keyivgen, 
@@ -2948,8 +2978,8 @@ GO(PKCS7_signatureVerify, iFpppp)
 //GO(PKCS8_encrypt, 
 //GO(PKCS8_pkey_get0, 
 //GO(PKCS8_pkey_set0, 
-//GO(PKCS8_PRIV_KEY_INFO_free, 
-//GO(PKCS8_PRIV_KEY_INFO_new, 
+GO(PKCS8_PRIV_KEY_INFO_free, vFp)
+GO(PKCS8_PRIV_KEY_INFO_new, pFv)
 //GO(PKCS8_set_broken, 
 //GO(PKEY_USAGE_PERIOD_free, 
 //GO(PKEY_USAGE_PERIOD_new, 
@@ -3028,11 +3058,15 @@ GO(RSA_check_key, iFp)
 GO(RSA_free, vFp)
 //GO(RSA_generate_key, 
 GO(RSA_generate_key_ex, iFpipp)
+GO(RSA_get0_crt_params, vFpppp)
+GO(RSA_get0_factors, vFppp)
+GO(RSA_get0_key, vFpppp)
 //GO(RSA_get_default_method, 
 //GO(RSA_get_ex_data, 
 //GO(RSA_get_ex_new_index, 
 GO(RSA_get_method, pFp)
 //GO(RSA_memory_lock, 
+GO(RSA_meth_get_flags, iFp)
 GO(RSA_new, pFv)
 GO(RSA_new_method, pFp)
 //GO(RSA_null_method, 
@@ -3056,6 +3090,7 @@ GO(RSA_new_method, pFp)
 //GO(RSA_padding_check_X931, 
 GO(RSA_PKCS1_OpenSSL, pFv)
 GO(RSA_PKCS1_SSLeay, pFv)
+GO(RSA_pkey_ctx_ctrl, iFpiiip)
 //GO(RSA_print, 
 //GO(RSA_print_fp, 
 GO(RSA_private_decrypt, iFipppi)
@@ -3066,6 +3101,9 @@ GO(RSA_private_encrypt, iFipppi)
 GO(RSA_public_decrypt, iFipppi)
 GO(RSA_public_encrypt, iFipppi)
 //GO(RSAPublicKey_dup, 
+GO(RSA_set0_crt_params, iFpppp)
+GO(RSA_set0_factors, iFppp)
+GO(RSA_set0_key, iFpppp)
 //GO(RSA_set_default_method, 
 //GO(RSA_set_ex_data, 
 GO(RSA_set_method, iFpp)
@@ -3073,6 +3111,7 @@ GO(RSA_set_method, iFpp)
 GO(RSA_sign, iFipuppp)
 GO(RSA_sign_ASN1_OCTET_STRING, iFipuppp)
 GO(RSA_size, iFp)
+GO(RSA_test_flags, iFpi)
 GO(RSA_up_ref, iFp)
 GO(RSA_verify, iFipupup)
 GO(RSA_verify_ASN1_OCTET_STRING, iFipupup)
@@ -3416,7 +3455,7 @@ GO(X509_add1_ext_i2d, iFpipiL)
 //GO(X509_check_akid, 
 //GO(X509_check_ca, 
 //GO(X509_check_email, 
-//GO(X509_check_host, 
+GO(X509_check_host, iFppLup)
 //GO(X509_check_ip, 
 //GO(X509_check_ip_asc, 
 GO(X509_check_issued, iFpp)
@@ -3440,6 +3479,7 @@ GO(X509_CRL_add1_ext_i2d, iFpipiL)
 GO(X509_CRL_free, vFp)
 //GO(X509_CRL_get0_by_cert, 
 //GO(X509_CRL_get0_by_serial, 
+GO(X509_CRL_get0_nextUpdate, pFp)
 //GO(X509_CRL_get_ext, 
 //GO(X509_CRL_get_ext_by_critical, 
 //GO(X509_CRL_get_ext_by_NID, 
@@ -3484,8 +3524,9 @@ GO(X509_EXTENSION_set_object, iFpp)
 //GO(X509_find_by_issuer_and_serial, 
 //GO(X509_find_by_subject, 
 GO(X509_free, vFp)
-//GO(X509_get0_pubkey_bitstr, 
+GO(X509_get0_pubkey_bitstr, pFp)
 //GO(X509_get0_signature, 
+GO(X509_get0_tbs_sigalg, pFp)
 //GO(X509_get1_email, 
 //GO(X509_get1_ocsp, 
 //GO(X509_get_default_cert_area, 
@@ -3505,12 +3546,15 @@ GO(X509_get_ext_d2i, pFpipp)
 GO(X509_get_issuer_name, pFp)
 GO(X509_get_pubkey, pFp)
 //GO(X509_get_pubkey_parameters, 
-GO(X509_get_serialNumber, pFp)
+GO(X509_get0_notAfter, pFp)
+GO(X509_get0_notBefore, pFp)
+GO(X509_get0_pubkey, pFp)
 GO(X509_get0_serialNumber, pFp)
+GO(X509_get_serialNumber, pFp)
 //GO(X509_get_signature_nid, 
 GO(X509_get_subject_name, pFp)
+GO(X509_get_version, lFp)
 GO(X509_get_X509_PUBKEY, pFp)
-GO(X509_get0_pubkey, pFp)
 //GO(X509_gmtime_adj, 
 //GO(X509_http_nbio, 
 //GO(X509_INFO_free, 
@@ -3556,6 +3600,7 @@ GO(X509_NAME_ENTRY_get_object, pFp)
 GO(X509_NAME_ENTRY_set_data, iFpipi)
 GO(X509_NAME_ENTRY_set_object, iFpp)
 GO(X509_NAME_free, vFp)
+GO(X509_NAME_get0_der, iFppp)
 GO(X509_NAME_get_entry, pFpi)
 GO(X509_NAME_get_index_by_NID, iFpii)
 GO(X509_NAME_get_index_by_OBJ, iFppi)
@@ -3663,6 +3708,8 @@ GO(X509_REVOKED_get_ext_d2i, pFpipp)
 //GO(X509_REVOKED_new, 
 //GO(X509_REVOKED_set_revocationDate, 
 //GO(X509_REVOKED_set_serialNumber, 
+GO(X509_set1_notAfter, iFpp)
+GO(X509_set1_notBefore, iFpp)
 //GO(X509_set_ex_data, 
 GO(X509_set_issuer_name, iFpp)
 //GO(X509_set_notAfter, 
@@ -3687,7 +3734,10 @@ GO(X509_STORE_CTX_free, vFp)
 GO(X509_STORE_CTX_get0_param, pFp)
 //GO(X509_STORE_CTX_get0_parent_ctx, 
 //GO(X509_STORE_CTX_get0_policy_tree, 
-//GO(X509_STORE_CTX_get0_store, 
+GO(X509_STORE_CTX_get0_cert, pFp)
+GO(X509_STORE_CTX_get0_chain, pFp)
+GO(X509_STORE_CTX_get0_store, pFp)
+GO(X509_STORE_CTX_get0_untrusted, pFp)
 GO(X509_STORE_CTX_get1_chain, pFp)
 GO(X509_STORE_CTX_get1_issuer, iFppp)
 GO(X509_STORE_CTX_get_chain, pFp)
@@ -3717,6 +3767,7 @@ GO(X509_STORE_CTX_set_purpose, iFpi)
 GOM(X509_STORE_CTX_set_verify_cb, vFEpp)
 //GO(X509_STORE_CTX_trusted_stack, 
 GO(X509_STORE_free, vFp)
+GO(X509_STORE_get0_param, pFp)
 //GO(X509_STORE_get1_certs, 
 //GO(X509_STORE_get1_crls, 
 //GO(X509_STORE_get_by_subject, 
@@ -3751,6 +3802,7 @@ GO(X509_subject_name_hash_old, LFp)
 //GO(X509_TRUST_get_trust, 
 //GO(X509_TRUST_set, 
 //GO(X509_TRUST_set_default, 
+GO(X509_up_ref, iFp)
 GO(X509V3_add1_i2d, iFpipiL)
 //GO(X509v3_add_ext, 
 //GO(X509V3_add_standard_extensions, 
diff --git a/src/wrapped/wrappedcrypto_private.h b/src/wrapped/wrappedcrypto_private.h
index 7c127fc8..ab3b3ba2 100644
--- a/src/wrapped/wrappedcrypto_private.h
+++ b/src/wrapped/wrappedcrypto_private.h
@@ -96,7 +96,7 @@ GOM(ASN1_i2d_bio, iFEppp)
 //GO(ASN1_i2d_fp, 
 //GO(ASN1_IA5STRING_free, 
 //GO(ASN1_IA5STRING_new, 
-//GO(ASN1_INTEGER_cmp, 
+GO(ASN1_INTEGER_cmp, iFpp)
 //GO(ASN1_INTEGER_dup, 
 GO(ASN1_INTEGER_free, vFp)
 GO(ASN1_INTEGER_get, lFp)
@@ -172,6 +172,7 @@ GO(ASN1_STRING_data, pFp)
 GO(ASN1_STRING_dup, pFp)
 GO(ASN1_STRING_free, vFp)
 //GO(ASN1_STRING_get_default_mask, 
+GO(ASN1_STRING_get0_data, pFp)
 GO(ASN1_STRING_length, iFp)
 //GO(ASN1_STRING_length_set, 
 //GO(ASN1_STRING_new, 
@@ -255,12 +256,14 @@ GO(BASIC_CONSTRAINTS_new, pFv)
 //GO(BF_options, 
 //GO(BF_set_key, 
 //GO(BIO_accept, 
+GO(BIO_ADDR_free, vFp)
+GO(BIO_ADDR_new, pFv)
 //GO(BIO_asn1_get_prefix, 
 //GO(BIO_asn1_get_suffix, 
 //GO(BIO_asn1_set_prefix, 
 //GO(BIO_asn1_set_suffix, 
 //GO(BIO_callback_ctrl, 
-//GO(BIO_clear_flags, 
+GO(BIO_clear_flags, vFpi)
 //GO(BIO_CONNECT_free, 
 //GO(BIO_CONNECT_new, 
 //GO(BIO_copy_next_retry, 
@@ -299,17 +302,28 @@ GO(BIO_free_all, vFp)
 //GO(BIO_get_callback, 
 //GO(BIO_get_callback_arg, 
 GO(BIO_get_close, iFp)
-//GO(BIO_get_ex_data, 
+GO(BIO_get_data, pFp)
+GO(BIO_get_ex_data, pFpi)
 //GO(BIO_get_ex_new_index, 
 //GO(BIO_gethostbyname, 
 //GO(BIO_get_host_ip, 
 //GO(BIO_get_port, 
 //GO(BIO_get_retry_BIO, 
 //GO(BIO_get_retry_reason, 
+GO(BIO_get_shutdown, iFp)
 GO(BIO_gets, iFppi)
 //GO(BIO_hex_string, 
 //GO(BIO_indent, 
 GO(BIO_int_ctrl, lFpili)
+GO(BIO_meth_free, vFp)
+GO(BIO_meth_new, pFip)
+GOM(BIO_meth_set_write, iFEpp)
+GOM(BIO_meth_set_read, iFEpp)
+GOM(BIO_meth_set_puts, iFEpp)
+GOM(BIO_meth_set_gets, iFEpp)
+GOM(BIO_meth_set_ctrl, iFEpp)
+GOM(BIO_meth_set_create, iFEpp)
+GOM(BIO_meth_set_destroy, iFEpp)
 //GO(BIO_method_name, 
 //GO(BIO_method_type, 
 GO(BIO_new, pFp)
@@ -350,8 +364,11 @@ GO(BIO_set, iFpp)
 //GO(BIO_set_callback_arg, 
 GO(BIO_set_close, iFpl)
 //GO(BIO_set_cipher, 
-//GO(BIO_set_ex_data, 
-//GO(BIO_set_flags, 
+GO(BIO_set_data, vFpp)
+GO(BIO_set_ex_data, iFpip)
+GO(BIO_set_flags, vFpi)
+GO(BIO_set_init, vFpi)
+GO(BIO_set_shutdown, vFpi)
 //GO(BIO_set_tcp_ndelay, 
 //GO(BIO_s_fd, 
 //GO(BIO_s_file, 
@@ -462,6 +479,7 @@ GO(BN_is_bit_set, iFpi)
 //GO(BN_is_prime_ex, 
 //GO(BN_is_prime_fasttest, 
 //GO(BN_is_prime_fasttest_ex, 
+GO(BN_is_word, iFpL)
 GO(BN_is_zero, iFp) 
 //GO(BN_kronecker, 
 GO(BN_lshift, iFppi)
@@ -848,7 +866,7 @@ GO(CRYPTO_free, vFppi)
 //GO(CRYPTO_get_dynlock_value, 
 //GO(CRYPTO_get_ex_data, 
 //GO(CRYPTO_get_ex_data_implementation, 
-//GO(CRYPTO_get_ex_new_index, 
+GO(CRYPTO_get_ex_new_index, iFilpppp)
 //GO(CRYPTO_get_id_callback, 
 //GO(CRYPTO_get_locked_mem_ex_functions, 
 //GO(CRYPTO_get_locked_mem_functions, 
@@ -1148,7 +1166,8 @@ GO(DES_set_odd_parity, vFp)
 GO(DES_string_to_2keys, vFppp)
 GO(DES_string_to_key, vFpp)
 GO(DES_xcbc_encrypt, vFpplppppi)
-//GO(DH_check, 
+GO(DH_bits, iFp)
+GO(DH_check, iFpp)
 //GO(DH_check_pub_key, 
 //GO(DH_compute_key, 
 //GO(DH_compute_key_padded, 
@@ -1156,6 +1175,7 @@ GO(DH_free, vFp)
 //GO(DH_generate_key, 
 //GO(DH_generate_parameters, 
 //GO(DH_generate_parameters_ex, 
+GO(DH_get0_pqg, vFpppp)
 //GO(DH_get_1024_160, 
 //GO(DH_get_2048_224, 
 //GO(DH_get_2048_256, 
@@ -1185,6 +1205,7 @@ GO(DH_new, pFv)
 //GO(DIST_POINT_set_dpname, 
 //GO(dsa_builtin_paramgen, 
 //GO(dsa_builtin_paramgen2, 
+GO(DSA_bits, iFp)
 //GO(DSA_do_sign, 
 //GO(DSA_do_verify, 
 //GO(DSA_dup_DH, 
@@ -1954,7 +1975,7 @@ GO(EVP_MD_type, iFp)
 //GO(EVP_PKEY_asn1_set_private, 
 //GO(EVP_PKEY_asn1_set_public, 
 GO(EVP_PKEY_assign, iFpip)
-//GO(EVP_PKEY_base_id, 
+GO(EVP_PKEY_base_id, iFp)
 //GO(EVP_PKEY_bits, 
 GO(EVP_PKEY_cmp, iFpp)
 GO(EVP_PKEY_cmp_parameters, iFpp)
@@ -1989,7 +2010,7 @@ GO(EVP_PKEY_derive_set_peer, iFppi)
 GO(EVP_PKEY_free, vFp)
 //GO(EVP_PKEY_get0, 
 //GO(EVP_PKEY_get0_asn1, 
-//GO(EVP_PKEY_get1_DH, 
+GO(EVP_PKEY_get1_DH, pFp)
 GO(EVP_PKEY_get1_DSA, pFp)
 GO(EVP_PKEY_get1_EC_KEY, pFp)
 GO(EVP_PKEY_get1_RSA, pFp)
@@ -2024,13 +2045,14 @@ GO(EVP_PKEY_keygen_init, iFp)
 GO(EVP_PKEY_missing_parameters, iFp)
 GO(EVP_PKEY_new, pFv)
 GO(EVP_PKEY_new_mac_key, pFippi)
+GO(EVP_PKEY_param_check, iFp)
 GO(EVP_PKEY_paramgen, iFpp)
 GO(EVP_PKEY_paramgen_init, iFp)
 //GO(EVP_PKEY_print_params, 
 //GO(EVP_PKEY_print_private, 
 //GO(EVP_PKEY_print_public, 
 //GO(EVP_PKEY_save_parameters, 
-//GO(EVP_PKEY_set1_DH, 
+GO(EVP_PKEY_set1_DH, iFpp)
 GO(EVP_PKEY_set1_DSA, iFpp)
 GO(EVP_PKEY_set1_EC_KEY, iFpp)
 GO(EVP_PKEY_set1_RSA, iFpp)
@@ -2492,7 +2514,7 @@ GO(OBJ_txt2obj, pFpi)
 //GO(OCSP_archive_cutoff_new, 
 //GO(OCSP_basic_add1_cert, 
 //GO(OCSP_basic_add1_nonce, 
-//GO(OCSP_basic_add1_status, 
+GO(OCSP_basic_add1_status, pFppiippp)
 //GO(OCSP_BASICRESP_add1_ext_i2d, 
 //GO(OCSP_BASICRESP_add_ext, 
 //GO(OCSP_BASICRESP_delete_ext, 
@@ -2503,8 +2525,8 @@ GO(OCSP_BASICRESP_free, vFp)
 //GO(OCSP_BASICRESP_get_ext_by_NID, 
 //GO(OCSP_BASICRESP_get_ext_by_OBJ, 
 //GO(OCSP_BASICRESP_get_ext_count, 
-//GO(OCSP_BASICRESP_new, 
-//GO(OCSP_basic_sign, 
+GO(OCSP_BASICRESP_new, pFv)
+GO(OCSP_basic_sign, iFpppppL)
 GO(OCSP_basic_verify, iFpppL)
 //GO(OCSP_CERTID_dup, 
 GO(OCSP_CERTID_free, vFp)
@@ -2515,14 +2537,14 @@ GO(OCSP_CERTID_free, vFp)
 //GO(OCSP_cert_status_str, 
 GO(OCSP_cert_to_id, pFppp)
 GO(OCSP_check_nonce, iFpp)
-//GO(OCSP_check_validity, 
+GO(OCSP_check_validity, iFppll)
 //GO(OCSP_copy_nonce, 
 //GO(OCSP_CRLID_free, 
 //GO(OCSP_crlID_new, 
 //GO(OCSP_CRLID_new, 
 //GO(OCSP_crl_reason_str, 
-//GO(OCSP_id_cmp, 
-//GO(OCSP_id_get0_info, 
+GO(OCSP_id_cmp, iFpp)
+GO(OCSP_id_get0_info, iFppppp)
 //GO(OCSP_id_issuer_cmp, 
 //GO(OCSP_ONEREQ_add1_ext_i2d, 
 //GO(OCSP_ONEREQ_add_ext, 
@@ -2571,21 +2593,22 @@ GO(OCSP_REQUEST_new, pFv)
 //GO(OCSP_request_verify, 
 //GO(OCSP_RESPBYTES_free, 
 //GO(OCSP_RESPBYTES_new, 
-//GO(OCSP_resp_count, 
+GO(OCSP_resp_count, iFp)
 //GO(OCSP_RESPDATA_free, 
 //GO(OCSP_RESPDATA_new, 
 //GO(OCSP_resp_find, 
 GO(OCSP_resp_find_status, iFppppppp)
-//GO(OCSP_resp_get0, 
+GO(OCSP_resp_get0, pFpi)
+GO(OCSP_resp_get0_certs, pFp)
 //GO(OCSP_RESPID_free, 
 //GO(OCSP_RESPID_new, 
-//GO(OCSP_response_create, 
+GO(OCSP_response_create, pFip)
 GO(OCSP_RESPONSE_free, vFp)
 GO(OCSP_response_get1_basic, pFp)
 GO(OCSP_RESPONSE_new, pFv)
 //GO(OCSP_RESPONSE_print, 
-//GO(OCSP_response_status, 
-//GO(OCSP_response_status_str, 
+GO(OCSP_response_status, iFp)
+GO(OCSP_response_status_str, pFl)
 //GO(OCSP_REVOKEDINFO_free, 
 //GO(OCSP_REVOKEDINFO_new, 
 //GO(OCSP_sendreq_bio, 
@@ -2596,11 +2619,12 @@ GO(OCSP_RESPONSE_new, pFv)
 //GO(OCSP_set_max_response_length, 
 //GO(OCSP_SIGNATURE_free, 
 //GO(OCSP_SIGNATURE_new, 
-//GO(OCSP_single_get0_status, 
+GO(OCSP_single_get0_status, iFppppp)
 //GO(OCSP_SINGLERESP_add1_ext_i2d, 
 //GO(OCSP_SINGLERESP_add_ext, 
 //GO(OCSP_SINGLERESP_delete_ext, 
 //GO(OCSP_SINGLERESP_free, 
+GO(OCSP_SINGLERESP_get0_id, pFp)
 //GO(OCSP_SINGLERESP_get1_ext_d2i, 
 //GO(OCSP_SINGLERESP_get_ext, 
 //GO(OCSP_SINGLERESP_get_ext_by_critical, 
@@ -2647,6 +2671,7 @@ GO(OPENSSL_sk_value, pFpi)  //1.1+
 //GO(OPENSSL_strcasecmp, 
 //GO(OPENSSL_strncasecmp, 
 //GO(OPENSSL_uni2asc, 
+GO(OpenSSL_version, pFi)
 GO(OpenSSL_version_num, LFv)
 //GO(OPENSSL_wipe_cpu, 
 //GO(_ossl_096_des_random_seed, 
@@ -2710,7 +2735,7 @@ GO(OpenSSL_version_num, LFv)
 //GO(PEM_read, 
 //GO(PEM_read_bio, 
 //GO(PEM_read_bio_CMS, 
-//GO(PEM_read_bio_DHparams, 
+GOM(PEM_read_bio_DHparams, pFEpppp)
 //GO(PEM_read_bio_DSAparams, 
 GOM(PEM_read_bio_DSAPrivateKey, pFEpppp)
 GOM(PEM_read_bio_DSA_PUBKEY, pFEpppp)
@@ -2722,8 +2747,8 @@ GOM(PEM_read_bio_EC_PUBKEY, pFEpppp)
 GOM(PEM_read_bio_PKCS7, pFEpppp)
 //GO(PEM_read_bio_PKCS8, 
 //GO(PEM_read_bio_PKCS8_PRIV_KEY_INFO, 
-//GO(PEM_read_bio_PrivateKey, 
-//GO(PEM_read_bio_PUBKEY, 
+GOM(PEM_read_bio_PrivateKey, pFEpppp)
+GOM(PEM_read_bio_PUBKEY, pFEpppp)
 GOM(PEM_read_bio_RSAPrivateKey, pFEpppp)
 GOM(PEM_read_bio_RSA_PUBKEY, pFEpppp)
 //GO(PEM_read_bio_RSAPublicKey, 
@@ -2781,8 +2806,8 @@ GO(PEM_write_bio_EC_PUBKEY, iFpp)
 //GO(PEM_write_bio_PKCS8PrivateKey, 
 //GO(PEM_write_bio_PKCS8PrivateKey_nid, 
 //GO(PEM_write_bio_PKCS8_PRIV_KEY_INFO, 
-//GO(PEM_write_bio_PrivateKey, 
-//GO(PEM_write_bio_PUBKEY, 
+GOM(PEM_write_bio_PrivateKey, iFEppppipp)
+GO(PEM_write_bio_PUBKEY, iFpp)
 GOM(PEM_write_bio_RSAPrivateKey, iFEppppipp)
 GO(PEM_write_bio_RSA_PUBKEY, iFpp)
 //GO(PEM_write_bio_RSAPublicKey, 
@@ -3031,6 +3056,7 @@ GO(RAND_write_file, iFp)
 //GO(RIPEMD160_Init, 
 //GO(RIPEMD160_Transform, 
 //GO(RIPEMD160_Update, 
+GO(RSA_bits, iFp)
 //GO(RSA_blinding_off, 
 //GO(RSA_blinding_on, 
 GO(RSA_check_key, iFp)
@@ -3555,7 +3581,9 @@ GO(X509_get_version, lFp)
 GO(X509_get0_notAfter, pFp)
 GO(X509_get0_notBefore, pFp)
 GO(X509_get0_pubkey, pFp)
-//GO(X509_gmtime_adj, 
+GO(X509_getm_notBefore, pFp)
+GO(X509_getm_notAfter, pFp)
+GO(X509_gmtime_adj, pFpl)
 //GO(X509_http_nbio, 
 //GO(X509_INFO_free, 
 //GO(X509_INFO_new, 
@@ -3745,7 +3773,7 @@ GO(X509_STORE_CTX_get_chain, pFp)
 GO(X509_STORE_CTX_get_current_cert, pFp)
 GO(X509_STORE_CTX_get_error, iFp)
 GO(X509_STORE_CTX_get_error_depth, iFp)
-//GO(X509_STORE_CTX_get_ex_data, 
+GO(X509_STORE_CTX_get_ex_data, pFpi)
 //GO(X509_STORE_CTX_get_ex_new_index, 
 //GO(X509_STORE_CTX_get_explicit_policy, 
 GO(X509_STORE_CTX_init, iFpppp)
@@ -3770,7 +3798,8 @@ GOM(X509_STORE_CTX_set_verify_cb, vFEpp)
 GO(X509_STORE_free, vFp)
 //GO(X509_STORE_get1_certs, 
 //GO(X509_STORE_get1_crls, 
-//GO(X509_STORE_get_by_subject, 
+//GO(X509_STORE_get_by_subject,
+GO(X509_STORE_get_ex_data, pFpi) 
 GO(X509_STORE_load_file, iFpp)
 GO(X509_STORE_load_path, iFpp)
 GO(X509_STORE_load_store, iFpp)
@@ -3779,11 +3808,12 @@ GO(X509_STORE_new, pFv)
 //GO(X509_STORE_set1_param, 
 //GO(X509_STORE_set_default_paths, 
 GO(X509_STORE_set_depth, iFpi)
+GO(X509_STORE_set_ex_data, iFpip)
 GO(X509_STORE_set_flags, iFpL)
 //GO(X509_STORE_set_lookup_crls_cb, 
 GO(X509_STORE_set_purpose, iFpi)
 GO(X509_STORE_set_trust, iFpi)
-//GO(X509_STORE_set_verify_cb, 
+GOM(X509_STORE_set_verify_cb, vFEpp)
 //GO(X509_subject_name_cmp, 
 GO(X509_subject_name_hash, LFp)
 GO(X509_subject_name_hash_old, LFp)
diff --git a/src/wrapped/wrappedcurl.c b/src/wrapped/wrappedcurl.c
index ceda973b..490d7f8d 100644
--- a/src/wrapped/wrappedcurl.c
+++ b/src/wrapped/wrappedcurl.c
@@ -346,7 +346,7 @@ typedef enum {
 static uintptr_t my_write_fct_##A = 0;   \
 static size_t my_write_##A(char* ptr, size_t size, size_t nmemb, void* userdata)     \
 {                                       \
-    return (size_t)RunFunction(my_context, my_write_fct_##A, 4, ptr, size, nmemb, userdata);\
+    return (size_t)RunFunctionFmt(my_write_fct_##A, "pLLp", ptr, size, nmemb, userdata);\
 }
 SUPER()
 #undef GO
@@ -369,7 +369,7 @@ static void* find_write_Fct(void* fct)
 static uintptr_t my_read_fct_##A = 0;   \
 static size_t my_read_##A(char* buffer, size_t size, size_t nitems, void* userdata)     \
 {                                       \
-    return (size_t)RunFunction(my_context, my_read_fct_##A, 4, buffer, size, nitems, userdata);\
+    return (size_t)RunFunctionFmt(my_read_fct_##A, "pLLp", buffer, size, nitems, userdata);\
 }
 SUPER()
 #undef GO
@@ -392,7 +392,7 @@ static void* find_read_Fct(void* fct)
 static uintptr_t my_ioctl_fct_##A = 0;   \
 static size_t my_ioctl_##A(void* handle, int32_t fnc, void* userdata)     \
 {                                       \
-    return (size_t)RunFunction(my_context, my_ioctl_fct_##A, 3, handle, fnc, userdata);\
+    return (size_t)RunFunctionFmt(my_ioctl_fct_##A, "pip", handle, fnc, userdata);\
 }
 SUPER()
 #undef GO
@@ -415,7 +415,7 @@ static void* find_ioctl_Fct(void* fct)
 static uintptr_t my_seek_fct_##A = 0;   \
 static int32_t my_seek_##A(void* userdata, int64_t off, int32_t origin)     \
 {                                       \
-    return (int32_t)RunFunction(my_context, my_seek_fct_##A, 4, userdata, (off&0xffffffff), ((off>>32)&0xffffffff), origin);\
+    return (int32_t)RunFunctionFmt(my_seek_fct_##A, "pIi", userdata, off, origin);\
 }
 SUPER()
 #undef GO
@@ -438,7 +438,7 @@ static void* find_seek_Fct(void* fct)
 static uintptr_t my_header_fct_##A = 0;   \
 static size_t my_header_##A(char* buffer, size_t size, size_t nitems, void* userdata)     \
 {                                       \
-    return (size_t)RunFunction(my_context, my_header_fct_##A, 4, buffer, size, nitems, userdata);\
+    return (size_t)RunFunctionFmt(my_header_fct_##A, "pLLp", buffer, size, nitems, userdata);\
 }
 SUPER()
 #undef GO
@@ -461,7 +461,7 @@ static void* find_header_Fct(void* fct)
 static uintptr_t my_progress_fct_##A = 0;   \
 static int my_progress_##A(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)     \
 {                                       \
-    return (int)RunFunction(my_context, my_progress_fct_##A, 5, clientp, dltotal, dlnow, ultotal, ulnow);\
+    return (int)RunFunctionFmt(my_progress_fct_##A, "pdddd", clientp, dltotal, dlnow, ultotal, ulnow);\
 }
 SUPER()
 #undef GO
@@ -484,7 +484,7 @@ static void* find_progress_Fct(void* fct)
 static uintptr_t my_progress_int_fct_##A = 0;   \
 static int my_progress_int_##A(void *clientp, uint64_t dltotal, uint64_t dlnow, uint64_t ultotal, uint64_t ulnow)     \
 {                                       \
-    return (int)RunFunction(my_context, my_progress_int_fct_##A, 5, clientp, dltotal, dlnow, ultotal, ulnow);\
+    return (int)RunFunctionFmt(my_progress_int_fct_##A, "pUUUU", clientp, dltotal, dlnow, ultotal, ulnow);\
 }
 SUPER()
 #undef GO
@@ -507,7 +507,7 @@ static void* find_progress_int_Fct(void* fct)
 static uintptr_t my_socket_fct_##A = 0;                                         \
 static int my_socket_##A(void *a, int b, int c, void* d, void* e)               \
 {                                                                               \
-    return (int)RunFunction(my_context, my_socket_fct_##A, 5, a, b, c, d, e);   \
+    return (int)RunFunctionFmt(my_socket_fct_##A, "piipp", a, b, c, d, e);   \
 }
 SUPER()
 #undef GO
@@ -530,7 +530,7 @@ static void* find_socket_Fct(void* fct)
 static uintptr_t my_timer_fct_##A = 0;                                  \
 static int my_timer_##A(void *a, long b, void* c)                       \
 {                                                                       \
-    return (int)RunFunction(my_context, my_timer_fct_##A, 3, a, b, c);  \
+    return (int)RunFunctionFmt(my_timer_fct_##A, "plp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -553,7 +553,7 @@ static void* find_timer_Fct(void* fct)
 static uintptr_t my_push_fct_##A = 0;                                       \
 static int my_push_##A(void *a, void* b, size_t c, void* d, void* e)        \
 {                                                                           \
-    return (int)RunFunction(my_context, my_push_fct_##A, 5, a, b, c, d, e); \
+    return (int)RunFunctionFmt(my_push_fct_##A, "ppLpp", a, b, c, d, e); \
 }
 SUPER()
 #undef GO
@@ -576,7 +576,7 @@ static void* find_push_Fct(void* fct)
 static uintptr_t my_debug_fct_##A = 0;                                          \
 static int my_debug_##A(void *a, int b, void* c, size_t d, void* e)             \
 {                                                                               \
-    return (int)RunFunction(my_context, my_debug_fct_##A, 5, a, b, c, d, e);    \
+    return (int)RunFunctionFmt(my_debug_fct_##A, "pipLp", a, b, c, d, e);    \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedd3dadapter9.c b/src/wrapped/wrappedd3dadapter9.c
index c43331dc..3701bbaa 100644
--- a/src/wrapped/wrappedd3dadapter9.c
+++ b/src/wrapped/wrappedd3dadapter9.c
@@ -225,7 +225,7 @@ static void freeMy()
 #define GOV(ns, ret, fn, args, call) \
     static uintptr_t my_##ns##_##fn##_fct = 0; \
     static ret my_##ns##_##fn(UNPACK args) { \
-        ret r = (ret)RunFunctionWindows(my_context, my_##ns##_##fn##_fct, UNPACK call); \
+        ret r = (ret)RunFunctionWindows(my_##ns##_##fn##_fct, UNPACK call); \
 /* no closing brace */
 
 #define GOV_1(ns, ret, fn, t1) \
@@ -319,13 +319,13 @@ typedef struct my_Direct3D9 {
 unsigned my_Direct3D9_AddRef(void *This)
 {
     my_Direct3D9 *my = This;
-    return RunFunctionWindows(my_context, (uintptr_t)(*my->real)->AddRef, 1, my->real);
+    return RunFunctionWindows((uintptr_t)(*my->real)->AddRef, 1, my->real);
 }
 
 unsigned my_Direct3D9_Release(void *This)
 {
     my_Direct3D9 *my = This;
-    return RunFunctionWindows(my_context, (uintptr_t)(*my->real)->Release, 1, my->real);
+    return RunFunctionWindows((uintptr_t)(*my->real)->Release, 1, my->real);
 }
 
 IDirect3D9Vtbl my_Direct3D9_vtbl = {
@@ -341,13 +341,13 @@ typedef struct my_Direct3D9Ex {
 unsigned my_Direct3D9Ex_AddRef(void *This)
 {
     my_Direct3D9Ex *my = This;
-    return RunFunction(my_context, (uintptr_t)(*my->real)->AddRef, 1, my->real);
+    return RunFunctionFmt((uintptr_t)(*my->real)->AddRef, "p", my->real);
 }
 
 unsigned my_Direct3D9Ex_Release(void *This)
 {
     my_Direct3D9Ex *my = This;
-    return RunFunction(my_context, (uintptr_t)(*my->real)->Release, 1, my->real);
+    return RunFunctionFmt((uintptr_t)(*my->real)->Release, "p", my->real);
 }
 
 IDirect3D9ExVtbl my_Direct3D9Ex_vtbl = {
diff --git a/src/wrapped/wrappeddbus.c b/src/wrapped/wrappeddbus.c
index 5f554771..7f040916 100644
--- a/src/wrapped/wrappeddbus.c
+++ b/src/wrapped/wrappeddbus.c
@@ -38,7 +38,7 @@ GO(3)
 static uintptr_t my_DBusFreeFunction_fct_##A = 0;               \
 static void my_DBusFreeFunction_##A(void* p)                    \
 {                                                               \
-    RunFunction(my_context, my_DBusFreeFunction_fct_##A, 1, p); \
+    RunFunctionFmt(my_DBusFreeFunction_fct_##A, "p", p); \
 }
 SUPER()
 #undef GO
@@ -60,7 +60,7 @@ static void* find_DBusFreeFunction_Fct(void* fct)
 static uintptr_t my_DBusHandleMessageFunction_fct_##A = 0;                              \
 static int my_DBusHandleMessageFunction_##A(void* a, void* b, void* c)                  \
 {                                                                                       \
-    return RunFunction(my_context, my_DBusHandleMessageFunction_fct_##A, 3, a, b, c);   \
+    return RunFunctionFmt(my_DBusHandleMessageFunction_fct_##A, "ppp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -82,7 +82,7 @@ static void* find_DBusHandleMessageFunction_Fct(void* fct)
 static uintptr_t my_DBusAddTimeoutFunction_fct_##A = 0;                         \
 static int my_DBusAddTimeoutFunction_##A(void* a, void* b)                      \
 {                                                                               \
-    return RunFunction(my_context, my_DBusAddTimeoutFunction_fct_##A, 2, a, b); \
+    return RunFunctionFmt(my_DBusAddTimeoutFunction_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -104,7 +104,7 @@ static void* find_DBusAddTimeoutFunction_Fct(void* fct)
 static uintptr_t my_DBusRemoveTimeoutFunction_fct_##A = 0;                  \
 static void my_DBusRemoveTimeoutFunction_##A(void* a, void* b)              \
 {                                                                           \
-    RunFunction(my_context, my_DBusRemoveTimeoutFunction_fct_##A, 2, a, b); \
+    RunFunctionFmt(my_DBusRemoveTimeoutFunction_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -126,7 +126,7 @@ static void* find_DBusRemoveTimeoutFunction_Fct(void* fct)
 static uintptr_t my_DBusTimeoutToggledFunction_fct_##A = 0;                     \
 static void my_DBusTimeoutToggledFunction_##A(void* a, void* b)                 \
 {                                                                               \
-    RunFunction(my_context, my_DBusTimeoutToggledFunction_fct_##A, 2, a, b);    \
+    RunFunctionFmt(my_DBusTimeoutToggledFunction_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -148,7 +148,7 @@ static void* find_DBusTimeoutToggledFunction_Fct(void* fct)
 static uintptr_t my_DBusWakeupMainFunction_fct_##A = 0;                 \
 static void my_DBusWakeupMainFunction_##A(void* a)                      \
 {                                                                       \
-    RunFunction(my_context, my_DBusWakeupMainFunction_fct_##A, 1, a);   \
+    RunFunctionFmt(my_DBusWakeupMainFunction_fct_##A, "p", a);   \
 }
 SUPER()
 #undef GO
@@ -171,7 +171,7 @@ static void* find_DBusWakeupMainFunction_Fct(void* fct)
 static uintptr_t my_DBusPendingCallNotifyFunction_fct_##A = 0;   \
 static void my_DBusPendingCallNotifyFunction_##A(void* pending, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusPendingCallNotifyFunction_fct_##A, 2, pending, data);\
+    RunFunctionFmt(my_DBusPendingCallNotifyFunction_fct_##A, "pp", pending, data);\
 }
 SUPER()
 #undef GO
@@ -194,7 +194,7 @@ static void* findDBusPendingCallNotifyFunctionFct(void* fct)
 static uintptr_t my_DBusDispatchStatusFunction_fct_##A = 0;   \
 static void my_DBusDispatchStatusFunction_##A(void* connection, int new_status, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusDispatchStatusFunction_fct_##A, 3, connection, new_status, data);\
+    RunFunctionFmt(my_DBusDispatchStatusFunction_fct_##A, "pip", connection, new_status, data);\
 }
 SUPER()
 #undef GO
@@ -217,7 +217,7 @@ static void* findDBusDispatchStatusFunctionFct(void* fct)
 static uintptr_t my_DBusAddWatchFunction_fct_##A = 0;   \
 static int my_DBusAddWatchFunction_##A(void* watch, void* data)     \
 {                                       \
-    return (int)RunFunction(my_context, my_DBusAddWatchFunction_fct_##A, 2, watch, data);\
+    return (int)RunFunctionFmt(my_DBusAddWatchFunction_fct_##A, "pp", watch, data);\
 }
 SUPER()
 #undef GO
@@ -240,7 +240,7 @@ static void* findDBusAddWatchFunctionFct(void* fct)
 static uintptr_t my_DBusRemoveWatchFunction_fct_##A = 0;   \
 static void my_DBusRemoveWatchFunction_##A(void* watch, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusRemoveWatchFunction_fct_##A, 2, watch, data);\
+    RunFunctionFmt(my_DBusRemoveWatchFunction_fct_##A, "pp", watch, data);\
 }
 SUPER()
 #undef GO
@@ -263,7 +263,7 @@ static void* findDBusRemoveWatchFunctionFct(void* fct)
 static uintptr_t my_DBusWatchToggledFunction_fct_##A = 0;   \
 static void my_DBusWatchToggledFunction_##A(void* watch, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusWatchToggledFunction_fct_##A, 2, watch, data);\
+    RunFunctionFmt(my_DBusWatchToggledFunction_fct_##A, "pp", watch, data);\
 }
 SUPER()
 #undef GO
@@ -286,7 +286,7 @@ static void* findDBusWatchToggledFunctionFct(void* fct)
 static uintptr_t my_DBusObjectPathUnregisterFunction_fct_##A = 0;   \
 static void my_DBusObjectPathUnregisterFunction_##A(void* connection, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusObjectPathUnregisterFunction_fct_##A, 2, connection, data);\
+    RunFunctionFmt(my_DBusObjectPathUnregisterFunction_fct_##A, "pp", connection, data);\
 }
 SUPER()
 #undef GO
@@ -309,7 +309,7 @@ static void* findDBusObjectPathUnregisterFunctionFct(void* fct)
 static uintptr_t my_DBusObjectPathMessageFunction_fct_##A = 0;   \
 static void my_DBusObjectPathMessageFunction_##A(void* connection, void* message, void* data)     \
 {                                       \
-    RunFunction(my_context, my_DBusObjectPathMessageFunction_fct_##A, 3, connection, message, data);\
+    RunFunctionFmt(my_DBusObjectPathMessageFunction_fct_##A, "ppp", connection, message, data);\
 }
 SUPER()
 #undef GO
@@ -332,7 +332,7 @@ static void* findDBusObjectPathMessageFunctionFct(void* fct)
 static uintptr_t my_dbus_internal_pad_fct_##A = 0;   \
 static void my_dbus_internal_pad_##A(void* a, void* b, void* c, void* d)     \
 {                                       \
-    RunFunction(my_context, my_dbus_internal_pad_fct_##A, 4, a, b, c, d);\
+    RunFunctionFmt(my_dbus_internal_pad_fct_##A, "pppp", a, b, c, d);\
 }
 SUPER()
 #undef GO
@@ -355,7 +355,7 @@ static void* finddbus_internal_padFct(void* fct)
 static uintptr_t my_DBusNewConnectionFunction_fct_##A = 0;                      \
 static void my_DBusNewConnectionFunction_##A(void* a, void* b, void* c)         \
 {                                                                               \
-    RunFunction(my_context, my_DBusNewConnectionFunction_fct_##A, 3, a, b, c);  \
+    RunFunctionFmt(my_DBusNewConnectionFunction_fct_##A, "pppp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -560,6 +560,22 @@ EXPORT int my_dbus_connection_try_register_object_path(x64emu_t* emu, void* conn
     return my->dbus_connection_try_register_object_path(connection, path, vtable?&vt:NULL, data, error);
 }
 
+EXPORT int my_dbus_connection_register_fallback(x64emu_t* emu, void* connection, void* path, my_DBusObjectPathVTable_t* vtable, void* data)
+{
+    (void)emu;
+    my_DBusObjectPathVTable_t vt = {0};
+    if(vtable) {
+        vt.unregister_function = findDBusObjectPathUnregisterFunctionFct(vtable->unregister_function);
+        vt.message_function = findDBusObjectPathMessageFunctionFct(vtable->message_function);
+        vt.pad1 = finddbus_internal_padFct(vtable->pad1);
+        vt.pad2 = finddbus_internal_padFct(vtable->pad2);
+        vt.pad3 = finddbus_internal_padFct(vtable->pad3);
+        vt.pad4 = finddbus_internal_padFct(vtable->pad4);
+    }
+
+    return my->dbus_connection_register_fallback(connection, path, vtable?&vt:NULL, data);
+}
+
 EXPORT int my_dbus_connection_set_data(x64emu_t* emu, void* connection, int slot, void* data, void* free_func)
 {
     (void)emu;
diff --git a/src/wrapped/wrappeddbus_private.h b/src/wrapped/wrappeddbus_private.h
index 5c546fd2..ccbe2a9b 100644
--- a/src/wrapped/wrappeddbus_private.h
+++ b/src/wrapped/wrappeddbus_private.h
@@ -54,7 +54,7 @@ GO(dbus_connection_preallocate_send, pFp)
 GO(dbus_connection_read_write, iFpi)
 GO(dbus_connection_read_write_dispatch, iFpi)
 GO(dbus_connection_ref, pFp)
-//GO(dbus_connection_register_fallback, 
+GOM(dbus_connection_register_fallback, iFEpppp)
 //GO(dbus_connection_register_object_path, 
 GOM(dbus_connection_remove_filter, vFEppp)
 GO(dbus_connection_return_message, vFpp)
diff --git a/src/wrapped/wrappeddbusglib1.c b/src/wrapped/wrappeddbusglib1.c
index b6680460..6c9555a2 100644
--- a/src/wrapped/wrappeddbusglib1.c
+++ b/src/wrapped/wrappeddbusglib1.c
@@ -33,10 +33,10 @@ const char* dbusglib1Name = "libdbus-glib-1.so.2";
 
 // GDestroyNotify
 #define GO(A)   \
-static uintptr_t my_GDestroyNotify_fct_##A = 0;   \
-static void my_GDestroyNotify_##A(void* data)     \
-{                                       \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, data);\
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                         \
+static void my_GDestroyNotify_##A(void* data)                           \
+{                                                                       \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", data);         \
 }
 SUPER()
 #undef GO
@@ -56,10 +56,10 @@ static void* findGDestroyNotifyFct(void* fct)
 
 // GClosureNotify
 #define GO(A)   \
-static uintptr_t my_GClosureNotify_fct_##A = 0;   \
-static void my_GClosureNotify_##A(void* data, void* closure)     \
-{                                       \
-    RunFunction(my_context, my_GClosureNotify_fct_##A, 2, data, closure);\
+static uintptr_t my_GClosureNotify_fct_##A = 0;                                 \
+static void my_GClosureNotify_##A(void* data, void* closure)                    \
+{                                                                               \
+    RunFunctionFmt(my_GClosureNotify_fct_##A, "pp", data, closure);       \
 }
 SUPER()
 #undef GO
@@ -79,10 +79,10 @@ static void* findGClosureNotifyFct(void* fct)
 
 // DBusGProxyCallNotify
 #define GO(A)   \
-static uintptr_t my_DBusGProxyCallNotify_fct_##A = 0;   \
-static void my_DBusGProxyCallNotify_##A(void* proxy, void* call_id, void* data)     \
-{                                       \
-    RunFunction(my_context, my_DBusGProxyCallNotify_fct_##A, 3, proxy, call_id, data);\
+static uintptr_t my_DBusGProxyCallNotify_fct_##A = 0;                                           \
+static void my_DBusGProxyCallNotify_##A(void* proxy, void* call_id, void* data)                 \
+{                                                                                               \
+    RunFunctionFmt(my_DBusGProxyCallNotify_fct_##A, "ppp", proxy, call_id, data);         \
 }
 SUPER()
 #undef GO
@@ -102,10 +102,10 @@ static void* findDBusGProxyCallNotifyFct(void* fct)
 
 // GCallback
 #define GO(A)   \
-static uintptr_t my_GCallback_fct_##A = 0;   \
-static void my_GCallback_##A(void* a, void* b, void* c, void* d)     \
-{                                       \
-    RunFunction(my_context, my_GCallback_fct_##A, 4, a, b, c, d);\
+static uintptr_t my_GCallback_fct_##A = 0;                                  \
+static void my_GCallback_##A(void* a, void* b, void* c, void* d)            \
+{                                                                           \
+    RunFunctionFmt(my_GCallback_fct_##A, "pppp", a, b, c, d);         \
 }
 SUPER()
 #undef GO
@@ -125,10 +125,10 @@ static void* findGCallbackFct(void* fct)
 
 // DBusGTypeSpecializedCollectionIterator
 #define GO(A)   \
-static uintptr_t my_DBusGTypeSpecializedCollectionIterator_fct_##A = 0;                     \
-static void my_DBusGTypeSpecializedCollectionIterator_##A(void* a, void* b)                 \
-{                                                                                           \
-    RunFunction(my_context, my_DBusGTypeSpecializedCollectionIterator_fct_##A, 2, a, b);    \
+static uintptr_t my_DBusGTypeSpecializedCollectionIterator_fct_##A = 0;                         \
+static void my_DBusGTypeSpecializedCollectionIterator_##A(void* a, void* b)                     \
+{                                                                                               \
+    RunFunctionFmt(my_DBusGTypeSpecializedCollectionIterator_fct_##A, "pp", a, b);        \
 }
 SUPER()
 #undef GO
@@ -147,10 +147,10 @@ static void* findDBusGTypeSpecializedCollectionIteratorFct(void* fct)
 }
 // DBusGTypeSpecializedMapIterator
 #define GO(A)   \
-static uintptr_t my_DBusGTypeSpecializedMapIterator_fct_##A = 0;                        \
-static void my_DBusGTypeSpecializedMapIterator_##A(void* a, void* b, void* c)           \
-{                                                                                       \
-    RunFunction(my_context, my_DBusGTypeSpecializedMapIterator_fct_##A, 3, a, b, c);    \
+static uintptr_t my_DBusGTypeSpecializedMapIterator_fct_##A = 0;                            \
+static void my_DBusGTypeSpecializedMapIterator_##A(void* a, void* b, void* c)               \
+{                                                                                           \
+    RunFunctionFmt(my_DBusGTypeSpecializedMapIterator_fct_##A, "ppp", a, b, c);       \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedexpat.c b/src/wrapped/wrappedexpat.c
index 4891e375..783b0ca0 100644
--- a/src/wrapped/wrappedexpat.c
+++ b/src/wrapped/wrappedexpat.c
@@ -34,10 +34,10 @@ GO(4)
 
 // Start ...
 #define GO(A)   \
-static uintptr_t my_Start_fct_##A = 0;                                              \
-static void* my_Start_##A(void* data, void* name, void* attr)                       \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_Start_fct_##A, 3, data, name, attr);   \
+static uintptr_t my_Start_fct_##A = 0;                                                      \
+static void* my_Start_##A(void* data, void* name, void* attr)                               \
+{                                                                                           \
+    return (void*)RunFunctionFmt(my_Start_fct_##A, "ppp", data, name, attr);          \
 }
 SUPER()
 #undef GO
@@ -56,10 +56,10 @@ static void* find_Start_Fct(void* fct)
 }
 // End ...
 #define GO(A)   \
-static uintptr_t my_End_fct_##A = 0;                       \
-static void my_End_##A(void* data, void* name)             \
-{                                                          \
-    RunFunction(my_context, my_End_fct_##A, 2, data, name);\
+static uintptr_t my_End_fct_##A = 0;                                \
+static void my_End_##A(void* data, void* name)                      \
+{                                                                   \
+    RunFunctionFmt(my_End_fct_##A, "pp", data, name);         \
 }
 SUPER()
 #undef GO
@@ -78,10 +78,10 @@ static void* find_End_Fct(void* fct)
 }
 // CharData ...
 #define GO(A)   \
-static uintptr_t my_CharData_fct_##A = 0;                       \
-static void my_CharData_##A(void* data, void* s, int l)         \
-{                                                               \
-    RunFunction(my_context, my_CharData_fct_##A, 3, data, s, l);\
+static uintptr_t my_CharData_fct_##A = 0;                               \
+static void my_CharData_##A(void* data, void* s, int l)                 \
+{                                                                       \
+    RunFunctionFmt(my_CharData_fct_##A, "ppi", data, s, l);       \
 }
 SUPER()
 #undef GO
@@ -100,10 +100,10 @@ static void* find_CharData_Fct(void* fct)
 }
 // StartNamespaceDecl ...
 #define GO(A)   \
-static uintptr_t my_StartNamespaceDecl_fct_##A = 0;                                 \
-static void my_StartNamespaceDecl_##A(void* data, void* name, void* attr)           \
-{                                                                               \
-    RunFunction(my_context, my_StartNamespaceDecl_fct_##A, 3, data, name, attr);    \
+static uintptr_t my_StartNamespaceDecl_fct_##A = 0;                                     \
+static void my_StartNamespaceDecl_##A(void* data, void* name, void* attr)               \
+{                                                                                       \
+    RunFunctionFmt(my_StartNamespaceDecl_fct_##A, "ppp", data, name, attr);       \
 }
 SUPER()
 #undef GO
@@ -122,10 +122,10 @@ static void* find_StartNamespaceDecl_Fct(void* fct)
 }
 // EndNamespaceDecl ...
 #define GO(A)   \
-static uintptr_t my_EndNamespaceDecl_fct_##A = 0;                       \
-static void my_EndNamespaceDecl_##A(void* data, void* name)             \
-{                                                          \
-    RunFunction(my_context, my_EndNamespaceDecl_fct_##A, 2, data, name);\
+static uintptr_t my_EndNamespaceDecl_fct_##A = 0;                               \
+static void my_EndNamespaceDecl_##A(void* data, void* name)                     \
+{                                                                               \
+    RunFunctionFmt(my_EndNamespaceDecl_fct_##A, "pp", data, name);        \
 }
 SUPER()
 #undef GO
@@ -144,10 +144,10 @@ static void* find_EndNamespaceDecl_Fct(void* fct)
 }
 // StartElement ...
 #define GO(A)   \
-static uintptr_t my_StartElement_fct_##A = 0;                                 \
-static void my_StartElement_##A(void* data, void* name, void* attr)           \
-{                                                                               \
-    RunFunction(my_context, my_StartElement_fct_##A, 3, data, name, attr);    \
+static uintptr_t my_StartElement_fct_##A = 0;                                       \
+static void my_StartElement_##A(void* data, void* name, void* attr)                 \
+{                                                                                   \
+    RunFunctionFmt(my_StartElement_fct_##A, "ppp", data, name, attr);         \
 }
 SUPER()
 #undef GO
@@ -166,10 +166,10 @@ static void* find_StartElement_Fct(void* fct)
 }
 // EndElement ...
 #define GO(A)   \
-static uintptr_t my_EndElement_fct_##A = 0;                       \
-static void my_EndElement_##A(void* data, void* name)             \
-{                                                          \
-    RunFunction(my_context, my_EndElement_fct_##A, 2, data, name);\
+static uintptr_t my_EndElement_fct_##A = 0;                                 \
+static void my_EndElement_##A(void* data, void* name)                       \
+{                                                                           \
+    RunFunctionFmt(my_EndElement_fct_##A, "pp", data, name);          \
 }
 SUPER()
 #undef GO
@@ -188,10 +188,10 @@ static void* find_EndElement_Fct(void* fct)
 }
 // CharacterData ...
 #define GO(A)   \
-static uintptr_t my_CharacterData_fct_##A = 0;                              \
-static void my_CharacterData_##A(void* data, void* name, int len)           \
-{                                                                           \
-    RunFunction(my_context, my_CharacterData_fct_##A, 3, data, name, len);  \
+static uintptr_t my_CharacterData_fct_##A = 0;                                    \
+static void my_CharacterData_##A(void* data, void* name, int len)                 \
+{                                                                                 \
+    RunFunctionFmt(my_CharacterData_fct_##A, "ppi", data, name, len);         \
 }
 SUPER()
 #undef GO
@@ -210,10 +210,10 @@ static void* find_CharacterData_Fct(void* fct)
 }
 // ProcessingInstruction ...
 #define GO(A)   \
-static uintptr_t my_ProcessingInstruction_fct_##A = 0;                      \
-static void my_ProcessingInstruction_##A(void* a, void* b, void* c)         \
-{                                                                           \
-    RunFunction(my_context, my_ProcessingInstruction_fct_##A, 3, a, b, c);  \
+static uintptr_t my_ProcessingInstruction_fct_##A = 0;                            \
+static void my_ProcessingInstruction_##A(void* a, void* b, void* c)               \
+{                                                                                 \
+    RunFunctionFmt(my_ProcessingInstruction_fct_##A, "ppp", a, b, c);         \
 }
 SUPER()
 #undef GO
@@ -232,10 +232,10 @@ static void* find_ProcessingInstruction_Fct(void* fct)
 }
 // Comment ...
 #define GO(A)   \
-static uintptr_t my_Comment_fct_##A = 0;                    \
-static void my_Comment_##A(void* a, void* b)                \
-{                                                           \
-    RunFunction(my_context, my_Comment_fct_##A, 2, a, b);   \
+static uintptr_t my_Comment_fct_##A = 0;                        \
+static void my_Comment_##A(void* a, void* b)                    \
+{                                                               \
+    RunFunctionFmt(my_Comment_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -254,10 +254,10 @@ static void* find_Comment_Fct(void* fct)
 }
 // StartCdataSection ...
 #define GO(A)   \
-static uintptr_t my_StartCdataSection_fct_##A = 0;                     \
-static void my_StartCdataSection_##A(void* data)                       \
-{                                                                      \
-    RunFunction(my_context, my_StartCdataSection_fct_##A, 1, data);    \
+static uintptr_t my_StartCdataSection_fct_##A = 0;                       \
+static void my_StartCdataSection_##A(void* data)                         \
+{                                                                        \
+    RunFunctionFmt(my_StartCdataSection_fct_##A, "p", data);      \
 }
 SUPER()
 #undef GO
@@ -276,10 +276,10 @@ static void* find_StartCdataSection_Fct(void* fct)
 }
 // EndCdataSection ...
 #define GO(A)   \
-static uintptr_t my_EndCdataSection_fct_##A = 0;                   \
-static void my_EndCdataSection_##A(void* data)                     \
-{                                                                  \
-    RunFunction(my_context, my_EndCdataSection_fct_##A, 1, data);  \
+static uintptr_t my_EndCdataSection_fct_##A = 0;                       \
+static void my_EndCdataSection_##A(void* data)                         \
+{                                                                      \
+    RunFunctionFmt(my_EndCdataSection_fct_##A, "p", data);        \
 }
 SUPER()
 #undef GO
@@ -298,10 +298,10 @@ static void* find_EndCdataSection_Fct(void* fct)
 }
 // Default ...
 #define GO(A)   \
-static uintptr_t my_Default_fct_##A = 0;                              \
-static void my_Default_##A(void* data, void* name, int len)           \
-{                                                                     \
-    RunFunction(my_context, my_Default_fct_##A, 3, data, name, len);  \
+static uintptr_t my_Default_fct_##A = 0;                                    \
+static void my_Default_##A(void* data, void* name, int len)                 \
+{                                                                           \
+    RunFunctionFmt(my_Default_fct_##A, "ppi", data, name, len);       \
 }
 SUPER()
 #undef GO
@@ -320,10 +320,10 @@ static void* find_Default_Fct(void* fct)
 }
 // StartDoctypeDecl ...
 #define GO(A)   \
-static uintptr_t my_StartDoctypeDecl_fct_##A = 0;                               \
-static void my_StartDoctypeDecl_##A(void* a, void* b, void* c, void* d, int e)  \
-{                                                                               \
-    RunFunction(my_context, my_StartDoctypeDecl_fct_##A, 5, a, b, c, d, e);     \
+static uintptr_t my_StartDoctypeDecl_fct_##A = 0;                                    \
+static void my_StartDoctypeDecl_##A(void* a, void* b, void* c, void* d, int e)       \
+{                                                                                    \
+    RunFunctionFmt(my_StartDoctypeDecl_fct_##A, "ppppi", a, b, c, d, e);      \
 }
 SUPER()
 #undef GO
@@ -342,10 +342,10 @@ static void* find_StartDoctypeDecl_Fct(void* fct)
 }
 // EndDoctypeDecl ...
 #define GO(A)   \
-static uintptr_t my_EndDoctypeDecl_fct_##A = 0;                     \
-static void my_EndDoctypeDecl_##A(void* data)                       \
-{                                                                   \
-    RunFunction(my_context, my_EndDoctypeDecl_fct_##A, 1, data);    \
+static uintptr_t my_EndDoctypeDecl_fct_##A = 0;                       \
+static void my_EndDoctypeDecl_##A(void* data)                         \
+{                                                                     \
+    RunFunctionFmt(my_EndDoctypeDecl_fct_##A, "p", data);         \
 }
 SUPER()
 #undef GO
@@ -364,10 +364,10 @@ static void* find_EndDoctypeDecl_Fct(void* fct)
 }
 // EntityDecl ...
 #define GO(A)   \
-static uintptr_t my_EntityDecl_fct_##A = 0;                                                                 \
-static void my_EntityDecl_##A(void* a, void* b, int c, void* d, int e, void* f, void* g, void* h, void* i)  \
-{                                                                                                           \
-    RunFunction(my_context, my_EntityDecl_fct_##A, 9, a, b, c, d, e, f, g, h, i);                           \
+static uintptr_t my_EntityDecl_fct_##A = 0;                                                                \
+static void my_EntityDecl_##A(void* a, void* b, int c, void* d, int e, void* f, void* g, void* h, void* i) \
+{                                                                                                          \
+    RunFunctionFmt(my_EntityDecl_fct_##A, "ppipipppp", a, b, c, d, e, f, g, h, i);                    \
 }
 SUPER()
 #undef GO
@@ -386,10 +386,10 @@ static void* find_EntityDecl_Fct(void* fct)
 }
 // ElementDecl ...
 #define GO(A)   \
-static uintptr_t my_ElementDecl_fct_##A = 0;                        \
-static void my_ElementDecl_##A(void* a, void* b, void* c)           \
-{                                                                   \
-    RunFunction(my_context, my_ElementDecl_fct_##A, 3, a, b, c);    \
+static uintptr_t my_ElementDecl_fct_##A = 0;                            \
+static void my_ElementDecl_##A(void* a, void* b, void* c)               \
+{                                                                       \
+    RunFunctionFmt(my_ElementDecl_fct_##A, "ppp", a, b, c);       \
 }
 SUPER()
 #undef GO
@@ -408,10 +408,10 @@ static void* find_ElementDecl_Fct(void* fct)
 }
 // UnknownEncoding ...
 #define GO(A)   \
-static uintptr_t my_UnknownEncoding_fct_##A = 0;                                    \
-static int my_UnknownEncoding_##A(void* a, void* b, void* c)                        \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_UnknownEncoding_fct_##A, 3, a, b, c);    \
+static uintptr_t my_UnknownEncoding_fct_##A = 0;                                        \
+static int my_UnknownEncoding_##A(void* a, void* b, void* c)                            \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_UnknownEncoding_fct_##A, "ppp", a, b, c);       \
 }
 SUPER()
 #undef GO
@@ -433,7 +433,7 @@ static void* find_UnknownEncoding_Fct(void* fct)
 static uintptr_t my_UnparsedEntityDecl_fct_##A = 0;                                         \
 static void my_UnparsedEntityDecl_##A(void* a, void* b, void* c, void* d, void* e, void* f) \
 {                                                                                           \
-    RunFunction(my_context, my_UnparsedEntityDecl_fct_##A, 6, a, b, c, d, e, f);            \
+    RunFunctionFmt(my_UnparsedEntityDecl_fct_##A, "pppppp", a, b, c, d, e, f);        \
 }
 SUPER()
 #undef GO
@@ -452,10 +452,10 @@ static void* find_UnparsedEntityDecl_Fct(void* fct)
 }
 // NotationDecl ...
 #define GO(A)   \
-static uintptr_t my_NotationDecl_fct_##A = 0;                                   \
-static void my_NotationDecl_##A(void* a, void* b, void* c, void* d, void* e)    \
-{                                                                               \
-    RunFunction(my_context, my_NotationDecl_fct_##A, 5, a, b, c, d, e);         \
+static uintptr_t my_NotationDecl_fct_##A = 0;                                    \
+static void my_NotationDecl_##A(void* a, void* b, void* c, void* d, void* e)     \
+{                                                                                \
+    RunFunctionFmt(my_NotationDecl_fct_##A, "ppppp", a, b, c, d, e);      \
 }
 SUPER()
 #undef GO
@@ -474,10 +474,10 @@ static void* find_NotationDecl_Fct(void* fct)
 }
 // NotStandalone ...
 #define GO(A)   \
-static uintptr_t my_NotStandalone_fct_##A = 0;                              \
-static int my_NotStandalone_##A(void* data)                                 \
-{                                                                           \
-    return (int)RunFunction(my_context, my_NotStandalone_fct_##A, 1, data); \
+static uintptr_t my_NotStandalone_fct_##A = 0;                                   \
+static int my_NotStandalone_##A(void* data)                                      \
+{                                                                                \
+    return (int)RunFunctionFmt(my_NotStandalone_fct_##A, "p", data);      \
 }
 SUPER()
 #undef GO
@@ -496,10 +496,10 @@ static void* find_NotStandalone_Fct(void* fct)
 }
 // ExternalEntityRef ...
 #define GO(A)   \
-static uintptr_t my_ExternalEntityRef_fct_##A = 0;                                          \
-static int my_ExternalEntityRef_##A(void* a, void* b, void* c, void* d, void* e)            \
-{                                                                                           \
-    return (int)RunFunction(my_context, my_ExternalEntityRef_fct_##A, 5, a, b, c, d, e);    \
+static uintptr_t my_ExternalEntityRef_fct_##A = 0;                                                \
+static int my_ExternalEntityRef_##A(void* a, void* b, void* c, void* d, void* e)                  \
+{                                                                                                 \
+    return (int)RunFunctionFmt(my_ExternalEntityRef_fct_##A, "ppppp", a, b, c, d, e);         \
 }
 SUPER()
 #undef GO
@@ -518,10 +518,10 @@ static void* find_ExternalEntityRef_Fct(void* fct)
 }
 // XmlDecl ...
 #define GO(A)   \
-static uintptr_t my_XmlDecl_fct_##A = 0;                        \
-static void my_XmlDecl_##A(void* a, void* b, void* c, int d)    \
-{                                                               \
-    RunFunction(my_context, my_XmlDecl_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_XmlDecl_fct_##A = 0;                                \
+static void my_XmlDecl_##A(void* a, void* b, void* c, int d)            \
+{                                                                       \
+    RunFunctionFmt(my_XmlDecl_fct_##A, "pppi", a, b, c, d);       \
 }
 SUPER()
 #undef GO
@@ -543,7 +543,7 @@ static void* find_XmlDecl_Fct(void* fct)
 static uintptr_t my_AttlistDecl_fct_##A = 0;                                        \
 static void my_AttlistDecl_##A(void* a, void* b, void* c, void* d, void* e, int f)  \
 {                                                                                   \
-    RunFunction(my_context, my_AttlistDecl_fct_##A, 6, a, b, c, d, e, f);           \
+    RunFunctionFmt(my_AttlistDecl_fct_##A, "pppppi", a, b, c, d, e, f);       \
 }
 SUPER()
 #undef GO
@@ -562,10 +562,10 @@ static void* find_AttlistDecl_Fct(void* fct)
 }
 // SkippedEntity ...
 #define GO(A)   \
-static uintptr_t my_SkippedEntity_fct_##A = 0;                      \
-static void my_SkippedEntity_##A(void* a, void* b, int c)           \
-{                                                                   \
-    RunFunction(my_context, my_SkippedEntity_fct_##A, 3, a, b, c);  \
+static uintptr_t my_SkippedEntity_fct_##A = 0;                            \
+static void my_SkippedEntity_##A(void* a, void* b, int c)                 \
+{                                                                         \
+    RunFunctionFmt(my_SkippedEntity_fct_##A, "ppi", a, b, c);         \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedfaudio.c b/src/wrapped/wrappedfaudio.c
index ae4d3379..619799ec 100644
--- a/src/wrapped/wrappedfaudio.c
+++ b/src/wrapped/wrappedfaudio.c
@@ -34,10 +34,10 @@ GO(4)
 
 // FAudioMalloc ...
 #define GO(A)   \
-static uintptr_t my_FAudioMalloc_fct_##A = 0;                               \
-static void* my_FAudioMalloc_##A(size_t a)                                  \
-{                                                                           \
-    return (void*)RunFunction(my_context, my_FAudioMalloc_fct_##A, 1, a);   \
+static uintptr_t my_FAudioMalloc_fct_##A = 0;                                  \
+static void* my_FAudioMalloc_##A(size_t a)                                     \
+{                                                                              \
+    return (void*)RunFunctionFmt(my_FAudioMalloc_fct_##A, "L", a);        \
 }
 SUPER()
 #undef GO
@@ -56,10 +56,10 @@ static void* find_FAudioMalloc_Fct(void* fct)
 }
 // FAudioFree ...
 #define GO(A)   \
-static uintptr_t my_FAudioFree_fct_##A = 0;                 \
-static void my_FAudioFree_##A(void* a)                      \
-{                                                           \
-    RunFunction(my_context, my_FAudioFree_fct_##A, 1, a);   \
+static uintptr_t my_FAudioFree_fct_##A = 0;                    \
+static void my_FAudioFree_##A(void* a)                         \
+{                                                              \
+    RunFunctionFmt(my_FAudioFree_fct_##A, "p", a);        \
 }
 SUPER()
 #undef GO
@@ -78,10 +78,10 @@ static void* find_FAudioFree_Fct(void* fct)
 }
 // FAudioRealloc ...
 #define GO(A)   \
-static uintptr_t my_FAudioRealloc_fct_##A = 0;                                  \
-static void* my_FAudioRealloc_##A(void* a, size_t b)                            \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_FAudioRealloc_fct_##A, 2, a, b);   \
+static uintptr_t my_FAudioRealloc_fct_##A = 0;                                      \
+static void* my_FAudioRealloc_##A(void* a, size_t b)                                \
+{                                                                                   \
+    return (void*)RunFunctionFmt(my_FAudioRealloc_fct_##A, "pL", a, b);       \
 }
 SUPER()
 #undef GO
@@ -100,10 +100,10 @@ static void* find_FAudioRealloc_Fct(void* fct)
 }
 // OnCriticalErrorFunc ...
 #define GO(A)   \
-static uintptr_t my_OnCriticalErrorFunc_fct_##A = 0;                    \
-static void my_OnCriticalErrorFunc_##A(void* a, uint32_t b)             \
-{                                                                       \
-    RunFunction(my_context, my_OnCriticalErrorFunc_fct_##A, 2, a, b);   \
+static uintptr_t my_OnCriticalErrorFunc_fct_##A = 0;                        \
+static void my_OnCriticalErrorFunc_##A(void* a, uint32_t b)                 \
+{                                                                           \
+    RunFunctionFmt(my_OnCriticalErrorFunc_fct_##A, "pu", a, b);       \
 }
 SUPER()
 #undef GO
@@ -122,10 +122,10 @@ static void* find_OnCriticalErrorFunc_Fct(void* fct)
 }
 // OnProcessingPassEndFunc ...
 #define GO(A)   \
-static uintptr_t my_OnProcessingPassEndFunc_fct_##A = 0;                \
-static void my_OnProcessingPassEndFunc_##A(void* a)                     \
-{                                                                       \
-    RunFunction(my_context, my_OnProcessingPassEndFunc_fct_##A, 1, a);  \
+static uintptr_t my_OnProcessingPassEndFunc_fct_##A = 0;                    \
+static void my_OnProcessingPassEndFunc_##A(void* a)                         \
+{                                                                           \
+    RunFunctionFmt(my_OnProcessingPassEndFunc_fct_##A, "p", a);       \
 }
 SUPER()
 #undef GO
@@ -144,10 +144,10 @@ static void* find_OnProcessingPassEndFunc_Fct(void* fct)
 }
 // OnProcessingPassStartFunc ...
 #define GO(A)   \
-static uintptr_t my_OnProcessingPassStartFunc_fct_##A = 0;                \
-static void my_OnProcessingPassStartFunc_##A(void* a)                     \
-{                                                                       \
-    RunFunction(my_context, my_OnProcessingPassStartFunc_fct_##A, 1, a);  \
+static uintptr_t my_OnProcessingPassStartFunc_fct_##A = 0;                    \
+static void my_OnProcessingPassStartFunc_##A(void* a)                         \
+{                                                                             \
+    RunFunctionFmt(my_OnProcessingPassStartFunc_fct_##A, "p", a);         \
 }
 SUPER()
 #undef GO
@@ -172,10 +172,10 @@ typedef struct my_FAudioEngineCallback_s
 } my_FAudioEngineCallback_t;
 // OnBufferEndFunc ...
 #define GO(A)   \
-static uintptr_t my_OnBufferEndFunc_fct_##A = 0;                    \
-static void my_OnBufferEndFunc_##A(void* a, void* b)                \
-{                                                                   \
-    RunFunction(my_context, my_OnBufferEndFunc_fct_##A, 2, a, b);   \
+static uintptr_t my_OnBufferEndFunc_fct_##A = 0;                        \
+static void my_OnBufferEndFunc_##A(void* a, void* b)                    \
+{                                                                       \
+    RunFunctionFmt(my_OnBufferEndFunc_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -194,10 +194,10 @@ static void* find_OnBufferEndFunc_Fct(void* fct)
 }
 // OnBufferStartFunc ...
 #define GO(A)   \
-static uintptr_t my_OnBufferStartFunc_fct_##A = 0;                    \
-static void my_OnBufferStartFunc_##A(void* a, void* b)                \
-{                                                                   \
-    RunFunction(my_context, my_OnBufferStartFunc_fct_##A, 2, a, b);   \
+static uintptr_t my_OnBufferStartFunc_fct_##A = 0;                        \
+static void my_OnBufferStartFunc_##A(void* a, void* b)                    \
+{                                                                         \
+    RunFunctionFmt(my_OnBufferStartFunc_fct_##A, "pp", a, b);         \
 }
 SUPER()
 #undef GO
@@ -216,10 +216,10 @@ static void* find_OnBufferStartFunc_Fct(void* fct)
 }
 // OnLoopEndFunc ...
 #define GO(A)   \
-static uintptr_t my_OnLoopEndFunc_fct_##A = 0;                    \
-static void my_OnLoopEndFunc_##A(void* a, void* b)                \
-{                                                                   \
-    RunFunction(my_context, my_OnLoopEndFunc_fct_##A, 2, a, b);   \
+static uintptr_t my_OnLoopEndFunc_fct_##A = 0;                        \
+static void my_OnLoopEndFunc_##A(void* a, void* b)                    \
+{                                                                     \
+    RunFunctionFmt(my_OnLoopEndFunc_fct_##A, "pp", a, b);         \
 }
 SUPER()
 #undef GO
@@ -238,10 +238,10 @@ static void* find_OnLoopEndFunc_Fct(void* fct)
 }
 // OnStreamEndFunc ...
 #define GO(A)   \
-static uintptr_t my_OnStreamEndFunc_fct_##A = 0;                \
-static void my_OnStreamEndFunc_##A(void* a)                     \
-{                                                               \
-    RunFunction(my_context, my_OnStreamEndFunc_fct_##A, 1, a);  \
+static uintptr_t my_OnStreamEndFunc_fct_##A = 0;                    \
+static void my_OnStreamEndFunc_##A(void* a)                         \
+{                                                                   \
+    RunFunctionFmt(my_OnStreamEndFunc_fct_##A, "p", a);       \
 }
 SUPER()
 #undef GO
@@ -260,10 +260,10 @@ static void* find_OnStreamEndFunc_Fct(void* fct)
 }
 // OnVoiceErrorFunc ...
 #define GO(A)   \
-static uintptr_t my_OnVoiceErrorFunc_fct_##A = 0;                       \
-static void my_OnVoiceErrorFunc_##A(void* a, void* b, uint32_t c)       \
-{                                                                       \
-    RunFunction(my_context, my_OnVoiceErrorFunc_fct_##A, 3, a, b, c);   \
+static uintptr_t my_OnVoiceErrorFunc_fct_##A = 0;                            \
+static void my_OnVoiceErrorFunc_##A(void* a, void* b, uint32_t c)            \
+{                                                                            \
+    RunFunctionFmt(my_OnVoiceErrorFunc_fct_##A, "ppu", a, b, c);      \
 }
 SUPER()
 #undef GO
@@ -282,10 +282,10 @@ static void* find_OnVoiceErrorFunc_Fct(void* fct)
 }
 // OnVoiceProcessingPassEndFunc ...
 #define GO(A)   \
-static uintptr_t my_OnVoiceProcessingPassEndFunc_fct_##A = 0;                \
-static void my_OnVoiceProcessingPassEndFunc_##A(void* a)                     \
-{                                                               \
-    RunFunction(my_context, my_OnVoiceProcessingPassEndFunc_fct_##A, 1, a);  \
+static uintptr_t my_OnVoiceProcessingPassEndFunc_fct_##A = 0;                    \
+static void my_OnVoiceProcessingPassEndFunc_##A(void* a)                         \
+{                                                                                \
+    RunFunctionFmt(my_OnVoiceProcessingPassEndFunc_fct_##A, "p", a);      \
 }
 SUPER()
 #undef GO
@@ -304,10 +304,10 @@ static void* find_OnVoiceProcessingPassEndFunc_Fct(void* fct)
 }
 // OnVoiceProcessingPassStartFunc ...
 #define GO(A)   \
-static uintptr_t my_OnVoiceProcessingPassStartFunc_fct_##A = 0;                     \
-static void my_OnVoiceProcessingPassStartFunc_##A(void* a, uint32_t b)              \
-{                                                                                   \
-    RunFunction(my_context, my_OnVoiceProcessingPassStartFunc_fct_##A, 2, a, b);    \
+static uintptr_t my_OnVoiceProcessingPassStartFunc_fct_##A = 0;                        \
+static void my_OnVoiceProcessingPassStartFunc_##A(void* a, uint32_t b)                 \
+{                                                                                      \
+    RunFunctionFmt(my_OnVoiceProcessingPassStartFunc_fct_##A, "pu", a, b);        \
 }
 SUPER()
 #undef GO
@@ -336,10 +336,10 @@ typedef struct my_FAudioVoiceCallback_s
 } my_FAudioVoiceCallback_t;
 // FAudioEngineCallEXT ...
 #define GO(A)   \
-static uintptr_t my_FAudioEngineCallEXT_fct_##A = 0;                    \
-static void my_FAudioEngineCallEXT_##A(void* a, void* b)                \
-{                                                                       \
-    RunFunction(my_context, my_FAudioEngineCallEXT_fct_##A, 2, a, b);   \
+static uintptr_t my_FAudioEngineCallEXT_fct_##A = 0;                        \
+static void my_FAudioEngineCallEXT_##A(void* a, void* b)                    \
+{                                                                           \
+    RunFunctionFmt(my_FAudioEngineCallEXT_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -358,10 +358,10 @@ static void* find_FAudioEngineCallEXT_Fct(void* fct)
 }
 // FAudioEngineProcedureEXT ...
 #define GO(A)   \
-static uintptr_t my_FAudioEngineProcedureEXT_fct_##A = 0;                                                       \
-static void my_FAudioEngineProcedureEXT_##A(void* a, void* b, void* c, void* d)                                 \
-{                                                                                                               \
-    RunFunction(my_context, my_FAudioEngineProcedureEXT_fct_##A, 4, find_FAudioEngineCallEXT_Fct(a), b, c, d);  \
+static uintptr_t my_FAudioEngineProcedureEXT_fct_##A = 0;                                                              \
+static void my_FAudioEngineProcedureEXT_##A(void* a, void* b, void* c, void* d)                                        \
+{                                                                                                                      \
+    RunFunctionFmt(my_FAudioEngineProcedureEXT_fct_##A, "pppp", find_FAudioEngineCallEXT_Fct(a), b, c, d);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedflac.c b/src/wrapped/wrappedflac.c
index 4bff742f..bc1919ca 100644
--- a/src/wrapped/wrappedflac.c
+++ b/src/wrapped/wrappedflac.c
@@ -51,10 +51,10 @@ GO(7)
 
 // read_write
 #define GO(A)   \
-static uintptr_t my_read_write_fct_##A = 0;   \
-static unsigned long my_read_write_##A(void* ptr, unsigned long size, unsigned long nmemb, void* handle)     \
-{                                       \
-    return RunFunction(my_context, my_read_write_fct_##A, 4, ptr, size, nmemb, handle);\
+static uintptr_t my_read_write_fct_##A = 0;                                                              \
+static unsigned long my_read_write_##A(void* ptr, unsigned long size, unsigned long nmemb, void* handle) \
+{                                                                                                        \
+    return RunFunctionFmt(my_read_write_fct_##A, "pLLp", ptr, size, nmemb, handle);               \
 }
 SUPER()
 #undef GO
@@ -73,10 +73,10 @@ static void* findread_writeFct(void* fct)
 }
 // seek
 #define GO(A)   \
-static uintptr_t my_seek_fct_##A = 0;   \
-static int my_seek_##A(void* ptr, int64_t offset, int whence)     \
-{                                       \
-    return (int)RunFunction(my_context, my_seek_fct_##A, 3, ptr, offset, whence);\
+static uintptr_t my_seek_fct_##A = 0;                                                    \
+static int my_seek_##A(void* ptr, int64_t offset, int whence)                            \
+{                                                                                        \
+    return (int)RunFunctionFmt(my_seek_fct_##A, "pIi", ptr, offset, whence);      \
 }
 SUPER()
 #undef GO
@@ -95,10 +95,10 @@ static void* findseekFct(void* fct)
 }
 // close_eof
 #define GO(A)   \
-static uintptr_t my_close_eof_fct_##A = 0;   \
-static int my_close_eof_##A(void* ptr)     \
-{                   \
-    return (int)RunFunction(my_context, my_close_eof_fct_##A, 1, ptr);\
+static uintptr_t my_close_eof_fct_##A = 0;                                  \
+static int my_close_eof_##A(void* ptr)                                      \
+{                                                                           \
+    return (int)RunFunctionFmt(my_close_eof_fct_##A, "p", ptr);       \
 }
 SUPER()
 #undef GO
@@ -117,10 +117,10 @@ static void* findclose_eofFct(void* fct)
 }
 // tell
 #define GO(A)   \
-static uintptr_t my_tell_fct_##A = 0;   \
-static long my_tell_##A(void* ptr)     \
-{                                       \
-    return (long)RunFunction(my_context, my_tell_fct_##A, 1, ptr);\
+static uintptr_t my_tell_fct_##A = 0;                                   \
+static long my_tell_##A(void* ptr)                                      \
+{                                                                       \
+    return (long)RunFunctionFmt(my_tell_fct_##A, "p", ptr);       \
 }
 SUPER()
 #undef GO
@@ -138,11 +138,11 @@ static void* findtellFct(void* fct)
     return NULL;
 }
 // Read
-#define GO(A)                                                                               \
-static uintptr_t my_Read_fct_##A = 0;                                                       \
-static int my_Read_##A(void* decoder, void* buffer, size_t* bytes, void* data)              \
-{                                                                                           \
-    return (int)RunFunction(my_context, my_Read_fct_##A, 4, decoder, buffer, bytes, data);  \
+#define GO(A)   \
+static uintptr_t my_Read_fct_##A = 0;                                                              \
+static int my_Read_##A(void* decoder, void* buffer, size_t* bytes, void* data)                     \
+{                                                                                                  \
+    return (int)RunFunctionFmt(my_Read_fct_##A, "pppp", decoder, buffer, bytes, data);        \
 }
 SUPER()
 #undef GO
@@ -160,11 +160,11 @@ static void* findReadFct(void* fct)
     return NULL;
 }
 // Seek
-#define GO(A)                                                                       \
-static uintptr_t my_Seek_fct_##A = 0;                                               \
-static int my_Seek_##A(void* decoder, uint64_t offset, void* data)                  \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_Seek_fct_##A, 3, decoder, offset, data); \
+#define GO(A)   \
+static uintptr_t my_Seek_fct_##A = 0;                                                      \
+static int my_Seek_##A(void* decoder, uint64_t offset, void* data)                         \
+{                                                                                          \
+    return (int)RunFunctionFmt(my_Seek_fct_##A, "pUp", decoder, offset, data);        \
 }
 SUPER()
 #undef GO
@@ -182,11 +182,11 @@ static void* findSeekFct(void* fct)
     return NULL;
 }
 // Tell
-#define GO(A)                                                                       \
-static uintptr_t my_Tell_fct_##A = 0;                                               \
-static int my_Tell_##A(void* decoder, uint64_t *offset, void* data)                 \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_Tell_fct_##A, 3, decoder, offset, data); \
+#define GO(A)   \
+static uintptr_t my_Tell_fct_##A = 0;                                                      \
+static int my_Tell_##A(void* decoder, uint64_t *offset, void* data)                        \
+{                                                                                          \
+    return (int)RunFunctionFmt(my_Tell_fct_##A, "ppp", decoder, offset, data);        \
 }
 SUPER()
 #undef GO
@@ -204,11 +204,11 @@ static void* findTellFct(void* fct)
     return NULL;
 }
 // Length
-#define GO(A)                                                                           \
-static uintptr_t my_Length_fct_##A = 0;                                                 \
-static int my_Length_##A(void* decoder, uint64_t *length, void* data)                   \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_Length_fct_##A, 3, decoder, length, data);   \
+#define GO(A)                                                                                \
+static uintptr_t my_Length_fct_##A = 0;                                                      \
+static int my_Length_##A(void* decoder, uint64_t *length, void* data)                        \
+{                                                                                            \
+    return (int)RunFunctionFmt(my_Length_fct_##A, "ppp", decoder, length, data);      \
 }
 SUPER()
 #undef GO
@@ -226,11 +226,11 @@ static void* findLengthFct(void* fct)
     return NULL;
 }
 // Eof
-#define GO(A)                                                               \
-static uintptr_t my_Eof_fct_##A = 0;                                        \
-static int my_Eof_##A(void* decoder, void* data)                            \
-{                                                                           \
-    return (int)RunFunction(my_context, my_Eof_fct_##A, 2, decoder, data);  \
+#define GO(A)   \
+static uintptr_t my_Eof_fct_##A = 0;                                             \
+static int my_Eof_##A(void* decoder, void* data)                                 \
+{                                                                                \
+    return (int)RunFunctionFmt(my_Eof_fct_##A, "pp", decoder, data);      \
 }
 SUPER()
 #undef GO
@@ -248,11 +248,11 @@ static void* findEofFct(void* fct)
     return NULL;
 }
 // Write
-#define GO(A)                                                                               \
-static uintptr_t my_Write_fct_##A = 0;                                                      \
-static int my_Write_##A(void* decoder, void* frame, void* buffer, void* data)               \
-{                                                                                           \
-    return (int)RunFunction(my_context, my_Write_fct_##A, 4, decoder, frame, buffer, data); \
+#define GO(A)   \
+static uintptr_t my_Write_fct_##A = 0;                                                              \
+static int my_Write_##A(void* decoder, void* frame, void* buffer, void* data)                       \
+{                                                                                                   \
+    return (int)RunFunctionFmt(my_Write_fct_##A, "pppp", decoder, frame, buffer, data);       \
 }
 SUPER()
 #undef GO
@@ -270,11 +270,11 @@ static void* findWriteFct(void* fct)
     return NULL;
 }
 // Metadata
-#define GO(A)                                                                               \
-static uintptr_t my_Metadata_fct_##A = 0;                                                   \
-static int my_Metadata_##A(void* decoder, void* metadata, void* data)                       \
-{                                                                                           \
-    return (int)RunFunction(my_context, my_Metadata_fct_##A, 3, decoder, metadata, data);   \
+#define GO(A)   \
+static uintptr_t my_Metadata_fct_##A = 0;                                                        \
+static int my_Metadata_##A(void* decoder, void* metadata, void* data)                            \
+{                                                                                                \
+    return (int)RunFunctionFmt(my_Metadata_fct_##A, "ppp", decoder, metadata, data);      \
 }
 SUPER()
 #undef GO
@@ -292,11 +292,11 @@ static void* findMetadataFct(void* fct)
     return NULL;
 }
 // Error
-#define GO(A)                                                               \
-static uintptr_t my_Error_fct_##A = 0;                                      \
-static void my_Error_##A(void* decoder, int status, void* data)             \
-{                                                                           \
-    RunFunction(my_context, my_Error_fct_##A, 3, decoder, status, data);    \
+#define GO(A)   \
+static uintptr_t my_Error_fct_##A = 0;                                          \
+static void my_Error_##A(void* decoder, int status, void* data)                 \
+{                                                                               \
+    RunFunctionFmt(my_Error_fct_##A, "pip", decoder, status, data);       \
 }
 SUPER()
 #undef GO
@@ -317,7 +317,7 @@ static void* findErrorFct(void* fct)
 
 #undef SUPER
 
-EXPORT int my_FLAC__metadata_chain_read_with_callbacks(x64emu_t* emu, void* chain, void* handle, 
+EXPORT int my_FLAC__metadata_chain_read_with_callbacks(x64emu_t* emu, void* chain, void* handle,
     void* read_fnc, void* write_fnc, void* seek_fnc, void* tell_fnc, void* eof_fnc, void* close_fnc)
 {
     flac_callbacks cbs = {0};
@@ -332,10 +332,10 @@ EXPORT int my_FLAC__metadata_chain_read_with_callbacks(x64emu_t* emu, void* chai
 }
 
 EXPORT int my_FLAC__stream_decoder_init_stream(x64emu_t* emu, void* decoder,
-    void* read_fnc, void* seek_fnc, void* tell_fnc, void* length_fnc, void* eof_fnc, 
+    void* read_fnc, void* seek_fnc, void* tell_fnc, void* length_fnc, void* eof_fnc,
     void* write_fnc, void* metadata_fnc, void* error_fnc, void* data)
 {
-    int ret =  my->FLAC__stream_decoder_init_stream(decoder, 
+    int ret =  my->FLAC__stream_decoder_init_stream(decoder,
         findReadFct(read_fnc), findSeekFct(seek_fnc), findTellFct(tell_fnc),
         findLengthFct(length_fnc), findEofFct(eof_fnc), findWriteFct(write_fnc),
         findMetadataFct(metadata_fnc), findErrorFct(error_fnc), data);
diff --git a/src/wrapped/wrappedfreetype.c b/src/wrapped/wrappedfreetype.c
index aacad276..4ced9be3 100644
--- a/src/wrapped/wrappedfreetype.c
+++ b/src/wrapped/wrappedfreetype.c
@@ -133,10 +133,10 @@ GO(4)
 
 // FT_Generic_Finalizer
 #define GO(A)   \
-static uintptr_t my_FT_Generic_Finalizer_fct_##A = 0;                       \
-static void my_FT_Generic_Finalizer_##A(void* object)                       \
-{                                                                           \
-    RunFunction(my_context, my_FT_Generic_Finalizer_fct_##A, 1, object);    \
+static uintptr_t my_FT_Generic_Finalizer_fct_##A = 0;                         \
+static void my_FT_Generic_Finalizer_##A(void* object)                         \
+{                                                                             \
+    RunFunctionFmt(my_FT_Generic_Finalizer_fct_##A, "p", object);         \
 }
 SUPER()
 #undef GO
@@ -156,15 +156,15 @@ static void* find_FT_Generic_Finalizer_Fct(void* fct)
 }
 // FTC_Face_Requester
 #define GO(A)   \
-static uintptr_t my_FTC_Face_Requester_fct_##A = 0;                                                     \
-static int my_FTC_Face_Requester_##A(void* face_id, void* lib, void* req, void* aface)                  \
-{                                                                                                       \
-    int ret = (int)RunFunction(my_context, my_FTC_Face_Requester_fct_##A, 4, face_id, lib, req, aface); \
-    if(aface && *(void**)aface) {                                                                       \
-        FT_FaceRec_t *f = *(FT_FaceRec_t**)aface;                                                       \
-        f->generic.finalizer = find_FT_Generic_Finalizer_Fct(f->generic.finalizer);                     \
-    }                                                                                                   \
-    return ret;                                                                                         \
+static uintptr_t my_FTC_Face_Requester_fct_##A = 0;                                                             \
+static int my_FTC_Face_Requester_##A(void* face_id, void* lib, void* req, void* aface)                          \
+{                                                                                                               \
+    int ret = (int)RunFunctionFmt(my_FTC_Face_Requester_fct_##A, "pppp", face_id, lib, req, aface);       \
+    if(aface && *(void**)aface) {                                                                               \
+        FT_FaceRec_t *f = *(FT_FaceRec_t**)aface;                                                               \
+        f->generic.finalizer = find_FT_Generic_Finalizer_Fct(f->generic.finalizer);                             \
+    }                                                                                                           \
+    return ret;                                                                                                 \
 }
 SUPER()
 #undef GO
@@ -184,10 +184,10 @@ static void* find_FTC_Face_Requester_Fct(void* fct)
 }
 // FT_Alloc
 #define GO(A)   \
-static uintptr_t my_FT_Alloc_fct_##A = 0;                                       \
-static void* my_FT_Alloc_##A(void* memory, long size)                           \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_FT_Alloc_fct_##A, 2, memory, size);\
+static uintptr_t my_FT_Alloc_fct_##A = 0;                                              \
+static void* my_FT_Alloc_##A(void* memory, long size)                                  \
+{                                                                                      \
+    return (void*)RunFunctionFmt(my_FT_Alloc_fct_##A, "pl", memory, size);        \
 }
 SUPER()
 #undef GO
@@ -207,10 +207,10 @@ static void* find_FT_Alloc_Fct(void* fct)
 }
 // FT_Free
 #define GO(A)   \
-static uintptr_t my_FT_Free_fct_##A = 0;                        \
-static void my_FT_Free_##A(void* memory, void* p)               \
-{                                                               \
-    RunFunction(my_context, my_FT_Free_fct_##A, 2, memory, p);  \
+static uintptr_t my_FT_Free_fct_##A = 0;                             \
+static void my_FT_Free_##A(void* memory, void* p)                    \
+{                                                                    \
+    RunFunctionFmt(my_FT_Free_fct_##A, "pp", memory, p);      \
 }
 SUPER()
 #undef GO
@@ -230,10 +230,10 @@ static void* find_FT_Free_Fct(void* fct)
 }
 // FT_Realloc
 #define GO(A)   \
-static uintptr_t my_FT_Realloc_fct_##A = 0;                                                 \
-static void* my_FT_Realloc_##A(void* memory, long cur, long size, void* p)                  \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_FT_Realloc_fct_##A, 4, memory, cur, size, p);  \
+static uintptr_t my_FT_Realloc_fct_##A = 0;                                                        \
+static void* my_FT_Realloc_##A(void* memory, long cur, long size, void* p)                         \
+{                                                                                                  \
+    return (void*)RunFunctionFmt(my_FT_Realloc_fct_##A, "pllp", memory, cur, size, p);        \
 }
 SUPER()
 #undef GO
@@ -253,10 +253,10 @@ static void* find_FT_Realloc_Fct(void* fct)
 }
 // FT_Outline_MoveToFunc
 #define GO(A)   \
-static uintptr_t my_FT_Outline_MoveToFunc_fct_##A = 0;                                  \
-static int my_FT_Outline_MoveToFunc_##A(void* to, void* user)                           \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_FT_Outline_MoveToFunc_fct_##A, 2, to, user); \
+static uintptr_t my_FT_Outline_MoveToFunc_fct_##A = 0;                                        \
+static int my_FT_Outline_MoveToFunc_##A(void* to, void* user)                                 \
+{                                                                                             \
+    return (int)RunFunctionFmt(my_FT_Outline_MoveToFunc_fct_##A, "pp", to, user);         \
 }
 SUPER()
 #undef GO
@@ -277,10 +277,10 @@ static void* find_FT_Outline_MoveToFunc_Fct(void* fct)
 
 // FT_Outline_LineToFunc
 #define GO(A)   \
-static uintptr_t my_FT_Outline_LineToFunc_fct_##A = 0;                                  \
-static int my_FT_Outline_LineToFunc_##A(void* to, void* user)                           \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_FT_Outline_LineToFunc_fct_##A, 2, to, user); \
+static uintptr_t my_FT_Outline_LineToFunc_fct_##A = 0;                                        \
+static int my_FT_Outline_LineToFunc_##A(void* to, void* user)                                 \
+{                                                                                             \
+    return (int)RunFunctionFmt(my_FT_Outline_LineToFunc_fct_##A, "pp", to, user);         \
 }
 SUPER()
 #undef GO
@@ -301,10 +301,10 @@ static void* find_FT_Outline_LineToFunc_Fct(void* fct)
 
 // FT_Outline_ConicToFunc
 #define GO(A)   \
-static uintptr_t my_FT_Outline_ConicToFunc_fct_##A = 0;                                         \
-static int my_FT_Outline_ConicToFunc_##A(void* ctl, void* to, void* user)                       \
-{                                                                                               \
-    return (int)RunFunction(my_context, my_FT_Outline_ConicToFunc_fct_##A, 3, ctl, to, user);   \
+static uintptr_t my_FT_Outline_ConicToFunc_fct_##A = 0;                                              \
+static int my_FT_Outline_ConicToFunc_##A(void* ctl, void* to, void* user)                            \
+{                                                                                                    \
+    return (int)RunFunctionFmt(my_FT_Outline_ConicToFunc_fct_##A, "ppp", ctl, to, user);      \
 }
 SUPER()
 #undef GO
@@ -325,10 +325,10 @@ static void* find_FT_Outline_ConicToFunc_Fct(void* fct)
 
 // FT_Outline_CubicToFunc
 #define GO(A)   \
-static uintptr_t my_FT_Outline_CubicToFunc_fct_##A = 0;                                                 \
-static int my_FT_Outline_CubicToFunc_##A(void* ctl1, void* ctl2, void* to, void* user)                  \
-{                                                                                                       \
-    return (int)RunFunction(my_context, my_FT_Outline_CubicToFunc_fct_##A, 4, ctl1, ctl2, to, user);    \
+static uintptr_t my_FT_Outline_CubicToFunc_fct_##A = 0;                                                      \
+static int my_FT_Outline_CubicToFunc_##A(void* ctl1, void* ctl2, void* to, void* user)                       \
+{                                                                                                            \
+    return (int)RunFunctionFmt(my_FT_Outline_CubicToFunc_fct_##A, "pppp", ctl1, ctl2, to, user);      \
 }
 SUPER()
 #undef GO
@@ -378,13 +378,13 @@ static FT_MemoryRec_t* find_FT_MemoryRec_Struct(FT_MemoryRec_t* s)
 static uintptr_t my_iofunc = 0;
 static unsigned long my_FT_Stream_IoFunc(FT_StreamRec_t* stream, unsigned long offset, unsigned char* buffer, unsigned long count )
 {
-    return (unsigned long)RunFunction(my_context, my_iofunc, 4, stream, offset, buffer, count);
+    return (unsigned long)RunFunctionFmt(my_iofunc, "pLpL", stream, offset, buffer, count)        ;
 }
 
 static uintptr_t my_closefunc = 0;
 static void my_FT_Stream_CloseFunc(FT_StreamRec_t* stream)
 {
-    RunFunction(my_context, my_closefunc, 1, stream);
+    RunFunctionFmt(my_closefunc, "p", stream)     ;
 }
 
 EXPORT int my_FT_Open_Face(x64emu_t* emu, void* library, FT_Open_Args_t* args, long face_index, void* aface)
diff --git a/src/wrapped/wrappedgconf2.c b/src/wrapped/wrappedgconf2.c
index 6e656f71..ec651e6e 100644
--- a/src/wrapped/wrappedgconf2.c
+++ b/src/wrapped/wrappedgconf2.c
@@ -34,10 +34,10 @@ GO(3)
 
 // GFreeFct
 #define GO(A)   \
-static uintptr_t my_GFreeFct_fct_##A = 0;               \
-static void my_GFreeFct_##A(void* a)                    \
-{                                                       \
-    RunFunction(my_context, my_GFreeFct_fct_##A, 1, a); \
+static uintptr_t my_GFreeFct_fct_##A = 0;                    \
+static void my_GFreeFct_##A(void* a)                         \
+{                                                            \
+    RunFunctionFmt(my_GFreeFct_fct_##A, "p", a);      \
 }
 SUPER()
 #undef GO
@@ -56,10 +56,10 @@ static void* findGFreeFctFct(void* fct)
 }
 // GConfClientNotifyFunc
 #define GO(A)   \
-static uintptr_t my_GConfClientNotifyFunc_fct_##A = 0;                          \
-static void my_GConfClientNotifyFunc_##A(void* a, uint32_t b, void* c, void* d) \
-{                                                                               \
-    RunFunction(my_context, my_GConfClientNotifyFunc_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_GConfClientNotifyFunc_fct_##A = 0;                                \
+static void my_GConfClientNotifyFunc_##A(void* a, uint32_t b, void* c, void* d)       \
+{                                                                                     \
+    RunFunctionFmt(my_GConfClientNotifyFunc_fct_##A, "pupp", a, b, c, d);         \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedgcrypt_private.h b/src/wrapped/wrappedgcrypt_private.h
index 07830c3d..39b2e55e 100644
--- a/src/wrapped/wrappedgcrypt_private.h
+++ b/src/wrapped/wrappedgcrypt_private.h
@@ -201,7 +201,7 @@ GO(gcry_sexp_find_token, pFppL)
 //GO(gcry_sexp_new, 
 //GO(gcry_sexp_nth, 
 //GO(gcry_sexp_nth_buffer, 
-//GO(gcry_sexp_nth_data, 
+GO(gcry_sexp_nth_data, pFpip)
 GO(gcry_sexp_nth_mpi, pFpii)
 //GO(gcry_sexp_nth_string, 
 //GO(gcry_sexp_prepend, 
diff --git a/src/wrapped/wrappedgdk3.c b/src/wrapped/wrappedgdk3.c
index 671301b9..aea28c68 100644
--- a/src/wrapped/wrappedgdk3.c
+++ b/src/wrapped/wrappedgdk3.c
@@ -37,10 +37,10 @@ GO(3)
 
 // GdkFilterFunc
 #define GO(A)   \
-static uintptr_t my_filter_fct_##A = 0;   \
-static int my_filter_##A(void* xevent, void* event, void* data)     \
-{                                       \
-    return (int)RunFunction(my_context, my_filter_fct_##A, 3, xevent, event, data);\
+static uintptr_t my_filter_fct_##A = 0;                                                    \
+static int my_filter_##A(void* xevent, void* event, void* data)                            \
+{                                                                                          \
+    return (int)RunFunctionFmt(my_filter_fct_##A, "ppp", xevent, event, data);        \
 }
 SUPER()
 #undef GO
@@ -54,14 +54,60 @@ static void* findFilterFct(void* fct)
     #define GO(A) if(my_filter_fct_##A == 0) {my_filter_fct_##A = (uintptr_t)fct; return my_filter_##A; }
     SUPER()
     #undef GO
-    printf_log(LOG_NONE, "Warning, no more slot for gtk-2 GdkFilterFunc callback\n");
+    printf_log(LOG_NONE, "Warning, no more slot for gdk-3 GdkFilterFunc callback\n");
+    return NULL;
+}
+// GSourceFunc
+#define GO(A)   \
+static uintptr_t my_GSourceFunc_fct_##A = 0;                                \
+static int my_GSourceFunc_##A(void* a)                                      \
+{                                                                           \
+    return (int)RunFunctionFmt(my_GSourceFunc_fct_##A, "p", a);       \
+}
+SUPER()
+#undef GO
+static void* findGSourceFunc(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_GSourceFunc_fct_##A == (uintptr_t)fct) return my_GSourceFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GSourceFunc_fct_##A == 0) {my_GSourceFunc_fct_##A = (uintptr_t)fct; return my_GSourceFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for gdk-3 GSourceFunc callback\n");
+    return NULL;
+}
+// GDestroyNotify
+#define GO(A)   \
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                         \
+static void my_GDestroyNotify_##A(void* data)                           \
+{                                                                       \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", data);         \
+}
+SUPER()
+#undef GO
+static void* findGDestroyNotifyFct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_GDestroyNotify_fct_##A == (uintptr_t)fct) return my_GDestroyNotify_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GDestroyNotify_fct_##A == 0) {my_GDestroyNotify_fct_##A = (uintptr_t)fct; return my_GDestroyNotify_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for gdk-3 GDestroyNotify callback\n");
     return NULL;
 }
 
+#undef SUPER
+
 
 static void my3_event_handler(void* event, my_signal_t* sig)
 {
-    RunFunction(my_context, sig->c_handler, 2, event, sig->data);
+    RunFunctionFmt(sig->c_handler, "pp", event, sig->data)        ;
 }
 
 EXPORT void my3_gdk_event_handler_set(x64emu_t* emu, void* func, void* data, void* notify)
@@ -76,7 +122,7 @@ EXPORT void my3_gdk_event_handler_set(x64emu_t* emu, void* func, void* data, voi
 
 static void my3_input_function(my_signal_t* sig, int source, int condition)
 {
-    RunFunction(my_context, sig->c_handler, 3, sig->data, source, condition);
+    RunFunctionFmt(sig->c_handler, "pii", sig->data, source, condition)       ;
 }
 
 EXPORT int my3_gdk_input_add(x64emu_t* emu, int source, int condition, void* f, void* data)
@@ -92,7 +138,7 @@ EXPORT int my3_gdk_input_add_full(x64emu_t* emu, int source, int condition, void
 {
     if(!f)
         return my->gdk_input_add_full(source, condition, f, data, notify);
-    
+
     my_signal_t* sig = new_mysignal(f, data, notify);
     return my->gdk_input_add_full(source, condition, my3_input_function, sig, my_signal_delete);
 }
@@ -120,6 +166,11 @@ EXPORT void my3_gdk_window_remove_filter(x64emu_t* emu, void* window, void* f, v
     my->gdk_window_remove_filter(window, findFilterFct(f), data);
 }
 
+EXPORT uint32_t my3_gdk_threads_add_idle_full(x64emu_t* emu, int priority, void* f, void* data, void* d)
+{
+    return my->gdk_threads_add_idle_full(priority, findGSourceFunc(f), data, findGDestroyNotifyFct(d));
+}
+
 #define PRE_INIT    \
     if(box64_nogtk) \
         return -1;
diff --git a/src/wrapped/wrappedgdk3_private.h b/src/wrapped/wrappedgdk3_private.h
index 298dbc9e..97455ee0 100644
--- a/src/wrapped/wrappedgdk3_private.h
+++ b/src/wrapped/wrappedgdk3_private.h
@@ -227,6 +227,7 @@ GO(gdk_event_get_modifier_state, iFp)
 GO(gdk_event_get_root_coords, iFppp)
 GO(gdk_event_get_screen, pFp)
 GO(gdk_event_get_state, iFpp)
+GO(gdk_event_get_source_device, pFp)
 GO(gdk_event_get_surface, pFp)
 GO(gdk_event_get_time, uFp)
 GO(gdk_event_get_type, iFv)
@@ -304,6 +305,11 @@ GO(gdk_get_display_arg_name, pFv)
 GO(gdk_get_program_class, pFv)
 GO(gdk_get_show_events, iFv)
 GO(gdk_get_use_xshm, iFv)
+GO(gdk_gl_context_get_type, LFv)
+GO(gdk_gl_context_clear_current, vFv)
+GO(gdk_gl_context_get_current, pFv)
+GO(gdk_gl_context_make_current, vFp)
+GO(gdk_gl_context_realize, iFpp)
 GO(gdk_grab_status_get_type, iFv)
 GO(gdk_gravity_get_type, iFv)
 GO(gdk_image_get, pFpiiii)
@@ -559,7 +565,7 @@ GO(gdk_texture_download, vFppL)
 GO(gdk_texture_get_width, uFp)
 GO(gdk_texture_get_height, uFp)
 //GOM(gdk_threads_add_idle, uFEpp)
-//GOM(gdk_threads_add_idle_full, uFEippp)
+GOM(gdk_threads_add_idle_full, uFEippp)
 //GOM(gdk_threads_add_timeout, uFEupp)
 //GOM(gdk_threads_add_timeout_full, uFEiuppp)
 //GOM(gdk_threads_add_timeout_seconds, uFEupp)
@@ -611,6 +617,7 @@ GO(gdk_window_configure_finished, vFp)
 GO(gdk_window_constrain_size, vFpuiipp)
 GO(gdk_window_coords_from_parent, vFpddpp)
 GO(gdk_window_coords_to_parent, vFpddpp)
+GO(gdk_window_create_gl_context, pFpp)
 GO(gdk_window_create_similar_image_surface, pFpiiii)
 GO(gdk_window_create_similar_surface, pFpuii)
 GO(gdk_window_deiconify, vFp)
@@ -704,6 +711,7 @@ GO(gdk_window_restack, vFppi)
 GO(gdk_window_scroll, vFpii)
 GO(gdk_window_set_accept_focus, vFpi)
 GO(gdk_window_set_background, vFpp)
+GO(gdk_window_set_background_rgba, vFpp)
 GO(gdk_window_set_back_pixmap, vFppi)
 GO(gdk_window_set_child_input_shapes, vFp)
 GO(gdk_window_set_child_shapes, vFp)
diff --git a/src/wrapped/wrappedgdkpixbuf2.c b/src/wrapped/wrappedgdkpixbuf2.c
index 1f82399d..34770c8c 100644
--- a/src/wrapped/wrappedgdkpixbuf2.c
+++ b/src/wrapped/wrappedgdkpixbuf2.c
@@ -32,10 +32,10 @@ GO(3)
 
 // destroy_pixbuf
 #define GO(A)   \
-static uintptr_t my_destroy_pixbuf_fct_##A = 0;                             \
-static void my_destroy_pixbuf_##A(void* pixels, void* data)                 \
-{                                                                           \
-    RunFunction(my_context, my_destroy_pixbuf_fct_##A, 2, pixels, data);    \
+static uintptr_t my_destroy_pixbuf_fct_##A = 0;                                \
+static void my_destroy_pixbuf_##A(void* pixels, void* data)                    \
+{                                                                              \
+    RunFunctionFmt(my_destroy_pixbuf_fct_##A, "pp", pixels, data);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedgdkx112.c b/src/wrapped/wrappedgdkx112.c
index 4f3aeba4..cb627311 100644
--- a/src/wrapped/wrappedgdkx112.c
+++ b/src/wrapped/wrappedgdkx112.c
@@ -37,10 +37,10 @@ GO(3)
 
 // GdkFilterFunc
 #define GO(A)   \
-static uintptr_t my_filter_fct_##A = 0;   \
-static int my_filter_##A(void* xevent, void* event, void* data)     \
-{                                       \
-    return (int)RunFunction(my_context, my_filter_fct_##A, 3, xevent, event, data);\
+static uintptr_t my_filter_fct_##A = 0;                                                    \
+static int my_filter_##A(void* xevent, void* event, void* data)                            \
+{                                                                                          \
+    return (int)RunFunctionFmt(my_filter_fct_##A, "ppp", xevent, event, data); \
 }
 SUPER()
 #undef GO
@@ -61,7 +61,7 @@ static void* findFilterFct(void* fct)
 
 static void my_event_handler(void* event, my_signal_t* sig)
 {
-    RunFunction(my_context, sig->c_handler, 2, event, sig->data);
+    RunFunctionFmt(sig->c_handler, "pp", event, sig->data);
 }
 
 EXPORT void my_gdk_event_handler_set(x64emu_t* emu, void* func, void* data, void* notify)
@@ -76,7 +76,7 @@ EXPORT void my_gdk_event_handler_set(x64emu_t* emu, void* func, void* data, void
 
 static void my_input_function(my_signal_t* sig, int source, int condition)
 {
-    RunFunction(my_context, sig->c_handler, 3, sig->data, source, condition);
+    RunFunctionFmt(sig->c_handler, "pii", sig->data, source, condition);
 }
 
 EXPORT int my_gdk_input_add(x64emu_t* emu, int source, int condition, void* f, void* data)
@@ -92,7 +92,7 @@ EXPORT int my_gdk_input_add_full(x64emu_t* emu, int source, int condition, void*
 {
     if(!f)
         return my->gdk_input_add_full(source, condition, f, data, notify);
-    
+
     my_signal_t* sig = new_mysignal(f, data, notify);
     return my->gdk_input_add_full(source, condition, my_input_function, sig, my_signal_delete);
 }
diff --git a/src/wrapped/wrappedgio2.c b/src/wrapped/wrappedgio2.c
index ef379ef1..e4837e7e 100644
--- a/src/wrapped/wrappedgio2.c
+++ b/src/wrapped/wrappedgio2.c
@@ -26,8 +26,9 @@ const char* gio2Name = "libgio-2.0.so.0";
 typedef size_t(*LFv_t)(void);
 
 #define ADDED_FUNCTIONS() \
- GO(g_application_get_type, LFv_t)           \
- 
+ GO(g_application_get_type, LFv_t)          \
+ GO(g_dbus_proxy_get_type, LFv_t)           \
+
 #include "wrappedgio2types.h"
 
 #include "wrappercallback.h"
@@ -40,10 +41,10 @@ GO(3)
 
 // GAsyncReadyCallback
 #define GO(A)   \
-static uintptr_t my_GAsyncReadyCallback_fct_##A = 0;   \
-static void my_GAsyncReadyCallback_##A(void* source, void* res, void* data)     \
-{                                       \
-    RunFunction(my_context, my_GAsyncReadyCallback_fct_##A, 3, source, res, data);\
+static uintptr_t my_GAsyncReadyCallback_fct_##A = 0;                                      \
+static void my_GAsyncReadyCallback_##A(void* source, void* res, void* data)               \
+{                                                                                         \
+    RunFunctionFmt(my_GAsyncReadyCallback_fct_##A, "ppp", source, res, data); \
 }
 SUPER()
 #undef GO
@@ -63,10 +64,10 @@ static void* findGAsyncReadyCallbackFct(void* fct)
 
 // GDestroyNotify
 #define GO(A)   \
-static uintptr_t my_GDestroyNotify_fct_##A = 0;   \
-static void my_GDestroyNotify_##A(void* data)     \
-{                                       \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, data);\
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                       \
+static void my_GDestroyNotify_##A(void* data)                         \
+{                                                                     \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -86,10 +87,10 @@ static void* findGDestroyNotifyFct(void* fct)
 
 // GDBusProxyTypeFunc
 #define GO(A)   \
-static uintptr_t my_GDBusProxyTypeFunc_fct_##A = 0;   \
-static int my_GDBusProxyTypeFunc_##A(void* manager, void* path, void* name, void* data)     \
-{                                       \
-    return (int)RunFunction(my_context, my_GDBusProxyTypeFunc_fct_##A, 4, manager, path, name, data);\
+static uintptr_t my_GDBusProxyTypeFunc_fct_##A = 0;                                                           \
+static int my_GDBusProxyTypeFunc_##A(void* manager, void* path, void* name, void* data)                       \
+{                                                                                                             \
+    return (int)RunFunctionFmt(my_GDBusProxyTypeFunc_fct_##A, "pppp", manager, path, name, data); \
 }
 SUPER()
 #undef GO
@@ -109,10 +110,10 @@ static void* findGDBusProxyTypeFuncFct(void* fct)
 
 // GSimpleAsyncThreadFunc
 #define GO(A)   \
-static uintptr_t my_GSimpleAsyncThreadFunc_fct_##A = 0;   \
-static void my_GSimpleAsyncThreadFunc_##A(void* res, void* object, void* cancellable)     \
-{                                       \
-    RunFunction(my_context, my_GSimpleAsyncThreadFunc_fct_##A, 3, res, object, cancellable);\
+static uintptr_t my_GSimpleAsyncThreadFunc_fct_##A = 0;                                             \
+static void my_GSimpleAsyncThreadFunc_##A(void* res, void* object, void* cancellable)               \
+{                                                                                                   \
+    RunFunctionFmt(my_GSimpleAsyncThreadFunc_fct_##A, "ppp", res, object, cancellable); \
 }
 SUPER()
 #undef GO
@@ -132,10 +133,10 @@ static void* findGSimpleAsyncThreadFuncFct(void* fct)
 
 // GCallback
 #define GO(A)   \
-static uintptr_t my_GCallback_fct_##A = 0;   \
-static void my_GCallback_##A(void* a, void* b, void* c, void* d)     \
-{                                       \
-    RunFunction(my_context, my_GCallback_fct_##A, 4, a, b, c, d);\
+static uintptr_t my_GCallback_fct_##A = 0;                                \
+static void my_GCallback_##A(void* a, void* b, void* c, void* d)          \
+{                                                                         \
+    RunFunctionFmt(my_GCallback_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -155,10 +156,10 @@ static void* findGCallbackFct(void* fct)
 
 // GDBusSignalCallback
 #define GO(A)   \
-static uintptr_t my_GDBusSignalCallback_fct_##A = 0;   \
-static void my_GDBusSignalCallback_##A(void* connection, void* sender, void* object, void* interface, void* signal, void* param, void* data)     \
-{                                       \
-    RunFunction(my_context, my_GDBusSignalCallback_fct_##A, 7, connection, sender, object, interface, signal, param, data);\
+static uintptr_t my_GDBusSignalCallback_fct_##A = 0;                                                                                         \
+static void my_GDBusSignalCallback_##A(void* connection, void* sender, void* object, void* interface, void* signal, void* param, void* data) \
+{                                                                                                                                            \
+    RunFunctionFmt(my_GDBusSignalCallback_fct_##A, "ppppppp", connection, sender, object, interface, signal, param, data);       \
 }
 SUPER()
 #undef GO
@@ -178,10 +179,10 @@ static void* findGDBusSignalCallbackFct(void* fct)
 
 // GDBusMessageFilterFunction
 #define GO(A)   \
-static uintptr_t my_GDBusMessageFilterFunction_fct_##A = 0;   \
-static void my_GDBusMessageFilterFunction_##A(void* connection, void* message, int incoming, void* data)     \
-{                                       \
-    RunFunction(my_context, my_GDBusMessageFilterFunction_fct_##A, 4, connection, message, incoming, data);\
+static uintptr_t my_GDBusMessageFilterFunction_fct_##A = 0;                                                         \
+static void my_GDBusMessageFilterFunction_##A(void* connection, void* message, int incoming, void* data)            \
+{                                                                                                                   \
+    RunFunctionFmt(my_GDBusMessageFilterFunction_fct_##A, "ppip", connection, message, incoming, data); \
 }
 SUPER()
 #undef GO
@@ -201,10 +202,10 @@ static void* findGDBusMessageFilterFunctionFct(void* fct)
 
 // GBusNameAppearedCallback
 #define GO(A)   \
-static uintptr_t my_GBusNameAppearedCallback_fct_##A = 0;   \
-static void my_GBusNameAppearedCallback_##A(void* connection, void* name, void* owner, void* data)  \
-{                                       \
-    RunFunction(my_context, my_GBusNameAppearedCallback_fct_##A, 4, connection, name, owner, data); \
+static uintptr_t my_GBusNameAppearedCallback_fct_##A = 0;                                                   \
+static void my_GBusNameAppearedCallback_##A(void* connection, void* name, void* owner, void* data)          \
+{                                                                                                           \
+    RunFunctionFmt(my_GBusNameAppearedCallback_fct_##A, "pppp", connection, name, owner, data); \
 }
 SUPER()
 #undef GO
@@ -224,10 +225,10 @@ static void* findGBusNameAppearedCallbackFct(void* fct)
 
 // GBusNameVanishedCallback
 #define GO(A)   \
-static uintptr_t my_GBusNameVanishedCallback_fct_##A = 0;   \
-static void my_GBusNameVanishedCallback_##A(void* connection, void* name, void* data)       \
-{                                       \
-    RunFunction(my_context, my_GBusNameVanishedCallback_fct_##A, 3, connection, name, data);\
+static uintptr_t my_GBusNameVanishedCallback_fct_##A = 0;                                           \
+static void my_GBusNameVanishedCallback_##A(void* connection, void* name, void* data)               \
+{                                                                                                   \
+    RunFunctionFmt(my_GBusNameVanishedCallback_fct_##A, "ppp", connection, name, data); \
 }
 SUPER()
 #undef GO
@@ -247,10 +248,10 @@ static void* findGBusNameVanishedCallbackFct(void* fct)
 
 // GBusAcquiredCallback
 #define GO(A)   \
-static uintptr_t my_GBusAcquiredCallback_fct_##A = 0;   \
-static void my_GBusAcquiredCallback_##A(void* connection, void* name, void* data)       \
-{                                       \
-    RunFunction(my_context, my_GBusAcquiredCallback_fct_##A, 3, connection, name, data);\
+static uintptr_t my_GBusAcquiredCallback_fct_##A = 0;                                           \
+static void my_GBusAcquiredCallback_##A(void* connection, void* name, void* data)               \
+{                                                                                               \
+    RunFunctionFmt(my_GBusAcquiredCallback_fct_##A, "ppp", connection, name, data); \
 }
 SUPER()
 #undef GO
@@ -270,10 +271,10 @@ static void* findGBusAcquiredCallbackFct(void* fct)
 
 // GBusNameAcquiredCallback
 #define GO(A)   \
-static uintptr_t my_GBusNameAcquiredCallback_fct_##A = 0;   \
-static void my_GBusNameAcquiredCallback_##A(void* connection, void* name, void* data)       \
-{                                       \
-    RunFunction(my_context, my_GBusNameAcquiredCallback_fct_##A, 3, connection, name, data);\
+static uintptr_t my_GBusNameAcquiredCallback_fct_##A = 0;                                           \
+static void my_GBusNameAcquiredCallback_##A(void* connection, void* name, void* data)               \
+{                                                                                                   \
+    RunFunctionFmt(my_GBusNameAcquiredCallback_fct_##A, "ppp", connection, name, data); \
 }
 SUPER()
 #undef GO
@@ -293,10 +294,10 @@ static void* findGBusNameAcquiredCallbackFct(void* fct)
 
 // GBusNameLostCallback
 #define GO(A)   \
-static uintptr_t my_GBusNameLostCallback_fct_##A = 0;   \
-static void my_GBusNameLostCallback_##A(void* connection, void* name, void* data)       \
-{                                       \
-    RunFunction(my_context, my_GBusNameLostCallback_fct_##A, 3, connection, name, data);\
+static uintptr_t my_GBusNameLostCallback_fct_##A = 0;                                           \
+static void my_GBusNameLostCallback_##A(void* connection, void* name, void* data)               \
+{                                                                                               \
+    RunFunctionFmt(my_GBusNameLostCallback_fct_##A, "ppp", connection, name, data); \
 }
 SUPER()
 #undef GO
@@ -322,24 +323,24 @@ typedef struct my_GDBusInterfaceVTable_s {
   int       (*set_property)   (void* connection, void* sender, void* object_path, void* interface_name, void* value, void* error, void* user_data);
 } my_GDBusInterfaceVTable_t;
 
-#define GO(A) \
+#define GO(A)   \
 static my_GDBusInterfaceVTable_t     my_GDBusInterfaceVTable_##A = {0};   \
 static my_GDBusInterfaceVTable_t   *ref_GDBusInterfaceVTable_##A = NULL;
 SUPER()
 #undef GO
 // then the static functions callback that may be used with the structure, but dispatch also have a callback...
 #define GO(A)   \
-static uintptr_t fct_funcs_method_call_##A = 0;                   \
-static void my_funcs_method_call_##A(void* connection, void* sender, void* object_path, void* interface_name, void* method_name, void* invocation, void* user_data) {               \
-    RunFunction(my_context, fct_funcs_method_call_##A, 8, connection, sender, object_path, interface_name, method_name, invocation, user_data);                \
-}   \
-static uintptr_t fct_funcs_get_property_##A = 0;                        \
-static void* my_funcs_get_property_##A(void* connection, void* sender, void* object_path, void* interface_name, void* error, void* user_data) {                     \
-    return (void*)RunFunction(my_context, fct_funcs_get_property_##A, 7, connection, sender, object_path, interface_name, error, user_data);                        \
-}   \
-static uintptr_t fct_funcs_set_property_##A = 0;                        \
-static int my_funcs_set_property_##A(void* connection, void* sender, void* object_path, void* interface_name, void* value, void* error, void* user_data) {          \
-    return (int)RunFunction(my_context, fct_funcs_set_property_##A, 8, connection, sender, object_path, interface_name, value, error, user_data);                   \
+static uintptr_t fct_funcs_method_call_##A = 0; \
+static void my_funcs_method_call_##A(void* connection, void* sender, void* object_path, void* interface_name, void* method_name, void* parameters, void* invocation, void* user_data) { \
+    RunFunctionFmt(fct_funcs_method_call_##A, "pppppppp", connection, sender, object_path, interface_name, method_name, parameters, invocation, user_data); \
+} \
+static uintptr_t fct_funcs_get_property_##A = 0; \
+static void* my_funcs_get_property_##A(void* connection, void* sender, void* object_path, void* interface_name, void* property_name, void* error, void* user_data) { \
+    return (void*)RunFunctionFmt(fct_funcs_get_property_##A, "ppppppp", connection, sender, object_path, interface_name, property_name, error, user_data); \
+} \
+static uintptr_t fct_funcs_set_property_##A = 0; \
+static int my_funcs_set_property_##A(void* connection, void* sender, void* object_path, void* interface_name, void* property_name, void* value, void* error, void* user_data) { \
+    return (int)RunFunctionFmt(fct_funcs_set_property_##A, "pppppppp", connection, sender, object_path, interface_name, property_name, value, error, user_data); \
 }
 
 SUPER()
@@ -368,6 +369,16 @@ static my_GDBusInterfaceVTable_t* findFreeGDBusInterfaceVTable(my_GDBusInterface
 }
 #undef SUPER
 
+EXPORT void* my_g_task_new(x64emu_t* emu, void* source_object, void* cancellable, void* cb, void* data)
+{
+    return my->g_task_new(source_object, cancellable, findGAsyncReadyCallbackFct(cb), data);
+}
+
+EXPORT void my_g_task_return_pointer(x64emu_t* emu, void* task, void* result, void* destroy)
+{
+    my->g_task_return_pointer(task, result, findGDestroyNotifyFct(destroy));
+}
+
 EXPORT void my_g_dbus_proxy_new(x64emu_t* emu, void* connection, int flags, void* info, void* name, void* path, void* interface, void* cancellable, void* cb, void* data)
 {
     my->g_dbus_proxy_new(connection, flags, info, name, path, interface, cancellable, findGAsyncReadyCallbackFct(cb), data);
@@ -567,8 +578,22 @@ EXPORT void my_g_simple_async_result_set_error(x64emu_t* emu, void* simple, void
 
 EXPORT void* my_g_initable_new(x64emu_t* emu, void* type, void* cancel, void* err, void* first, uintptr_t* b)
 {
-    myStackAlign(emu, first, b, emu->scratch, R_EAX, 4);
+    #if 0
+    // look for number of pairs
+    int n = 1;
+    emu->scratch[0] = (uint64_t)first;
+    emu->scratch[1] = getVArgs(emu, 4, b, 0);
+    while(getVArgs(emu, 4, b, n)) {
+        emu->scratch[n+1] = getVArgs(emu, 4, b, n);
+        emu->scratch[n+2] = getVArgs(emu, 4, b, n+1);
+        n+=2;
+    }
+    emu->scratch[n+1] = 0;
+    emu->scratch[n+2] = 0;
     PREPARE_VALIST;
+    #else
+    CREATE_VALIST_FROM_VAARG(b, emu->scratch, 4);
+    #endif
     return my->g_initable_new_valist(type, first, VARARGS, cancel, err);
 }
 
@@ -582,14 +607,23 @@ EXPORT void* my_g_initable_new_valist(x64emu_t* emu, void* type, void* first, x6
     return my->g_initable_new_valist(type, first, VARARGS, cancel, err);
 }
 
+EXPORT void my_g_task_return_new_error(x64emu_t* emu, void* task, uint32_t domain, int code, void *fmt, va_list b)
+{
+    char* tmp;
+    int dummy = vasprintf(&tmp, fmt, b);
+    (void)dummy;
+    my->g_task_return_new_error(task, domain, code, tmp);
+    free(tmp);
+}
 
 #define PRE_INIT    \
     if(box64_nogtk) \
         return -1;
 
 #define CUSTOM_INIT \
-    getMy(lib);                         \
-    SetGApplicationID(my->g_application_get_type());            \
+    getMy(lib);                                         \
+    SetGApplicationID(my->g_application_get_type());    \
+    SetGDBusProxyID(my->g_dbus_proxy_get_type());       \
     setNeededLibs(lib, 1, "libgmodule-2.0.so.0");
 
 #define CUSTOM_FINI \
diff --git a/src/wrapped/wrappedgio2_private.h b/src/wrapped/wrappedgio2_private.h
index bb5c80eb..560b2518 100644
--- a/src/wrapped/wrappedgio2_private.h
+++ b/src/wrapped/wrappedgio2_private.h
@@ -135,7 +135,7 @@ GO(g_async_initable_new_finish, pFppp)
 GOM(g_async_initable_new_valist_async, vFEipAippp)
 GOM(g_async_initable_newv_async, vFEiupippp)
 GO(g_async_result_get_source_object, pFp)
-//GO(g_async_result_get_type, 
+GO(g_async_result_get_type, LFv)
 GO(g_async_result_get_user_data, pFp)
 GO(g_async_result_is_tagged, iFpp)
 //GO(g_async_result_legacy_propagate_error, 
@@ -341,7 +341,7 @@ GO(g_dbus_error_encode_gerror, pFp)
 //GO(g_dbus_error_get_type, 
 GO(g_dbus_error_is_remote_error, iFp)
 GO(g_dbus_error_new_for_dbus_error, pFpp)
-//GO(g_dbus_error_quark, 
+GO(g_dbus_error_quark, uFv)
 //GO(g_dbus_error_register_error, 
 GO(g_dbus_error_register_error_domain, vFpppu)
 //GO(g_dbus_error_set_dbus_error, 
@@ -1322,7 +1322,7 @@ GO(g_settings_get_int, iFpp)
 GO(g_settings_get_string, pFpp)
 GO(g_settings_get_strv, pFpp)
 GO(g_settings_get_type, pFv)
-//GO(g_settings_get_uint, 
+GO(g_settings_get_uint, uFpp)
 GO(g_settings_get_user_value, pFpp)
 GO(g_settings_get_value, pFpp)
 GO(g_settings_is_writable, iFpp)
@@ -1623,10 +1623,10 @@ GO(g_task_get_priority, iFp)
 //GO(g_task_get_source_object, 
 GO(g_task_get_source_tag, pFp)
 //GO(g_task_get_task_data, 
-//GO(g_task_get_type, 
+GO(g_task_get_type, LFv)
 //GO(g_task_had_error, 
 GO(g_task_is_valid, iFpp)
-//GO(g_task_new, 
+GOM(g_task_new, pFEpppp)
 GO(g_task_propagate_boolean, iFpp)
 GO(g_task_propagate_int, lFpp)
 GO(g_task_propagate_pointer, pFpp)
@@ -1636,8 +1636,8 @@ GO(g_task_return_boolean, vFpi)
 GO(g_task_return_error, vFpp)
 //GO(g_task_return_error_if_cancelled, 
 GO(g_task_return_int, vFpl)
-//GO(g_task_return_new_error, 
-//GO(g_task_return_pointer, 
+GOM(g_task_return_new_error, vFEpuipV)
+GOM(g_task_return_pointer, vFEppp)
 //GO(g_task_run_in_thread, 
 //GO(g_task_run_in_thread_sync, 
 //GO(g_task_set_check_cancellable, 
diff --git a/src/wrapped/wrappedglib2.c b/src/wrapped/wrappedglib2.c
index 30bfbdd6..5614314d 100644
--- a/src/wrapped/wrappedglib2.c
+++ b/src/wrapped/wrappedglib2.c
@@ -57,7 +57,7 @@ EXPORT void* my_g_build_filename(x64emu_t* emu, void* first, uintptr_t* b)
 
 static int my_timeout_cb(my_signal_t* sig)
 {
-    return (int)RunFunction(my_context, sig->c_handler, 1, sig->data);
+    return (int)RunFunctionFmt(sig->c_handler, "p", sig->data);
 }
 EXPORT uint32_t my_g_timeout_add(x64emu_t* emu, uint32_t interval, void* func, void* data)
 {
@@ -89,10 +89,10 @@ GO(9)   \
 
 // GCopyFct
 #define GO(A)   \
-static uintptr_t my_copy_fct_##A = 0;   \
-static void* my_copy_##A(void* data)     \
-{                                       \
-    return (void*)RunFunction(my_context, my_copy_fct_##A, 1, data);\
+static uintptr_t my_copy_fct_##A = 0;                                     \
+static void* my_copy_##A(void* data)                                      \
+{                                                                         \
+    return (void*)RunFunctionFmt(my_copy_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -111,10 +111,10 @@ static void* findCopyFct(void* fct)
 }
 // GFreeFct
 #define GO(A)   \
-static uintptr_t my_free_fct_##A = 0;   \
-static void my_free_##A(void* data)     \
-{                                       \
-    RunFunction(my_context, my_free_fct_##A, 1, data);\
+static uintptr_t my_free_fct_##A = 0;                       \
+static void my_free_##A(void* data)                         \
+{                                                           \
+    RunFunctionFmt(my_free_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -133,10 +133,10 @@ static void* findFreeFct(void* fct)
 }
 // GDuplicateFct
 #define GO(A)   \
-static uintptr_t my_duplicate_fct_##A = 0;   \
-static void* my_duplicate_##A(void* data)     \
-{                                       \
-    return (void*)RunFunction(my_context, my_duplicate_fct_##A, 1, data);\
+static uintptr_t my_duplicate_fct_##A = 0;                                     \
+static void* my_duplicate_##A(void* data)                                      \
+{                                                                              \
+    return (void*)RunFunctionFmt(my_duplicate_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -155,35 +155,35 @@ static void* findDuplicateFct(void* fct)
 }
 // GSourceFuncs....
 // g_source_new callback. First the structure GSourceFuncs statics, with paired x64 source pointer
-#define GO(A) \
+#define GO(A)   \
 static my_GSourceFuncs_t     my_gsourcefuncs_##A = {0};   \
 static my_GSourceFuncs_t   *ref_gsourcefuncs_##A = NULL;
 SUPER()
 #undef GO
 // then the static functions callback that may be used with the structure, but dispatch also have a callback...
 #define GO(A)   \
-static uintptr_t fct_funcs_prepare_##A = 0;                                             \
-static int my_funcs_prepare_##A(void* source, int *timeout_) {                          \
-    return (int)RunFunction(my_context, fct_funcs_prepare_##A, 2, source, timeout_);    \
-}   \
-static uintptr_t fct_funcs_check_##A = 0;                                   \
-static int my_funcs_check_##A(void* source) {                               \
-    return (int)RunFunction(my_context, fct_funcs_check_##A, 1, source);    \
-}   \
-static uintptr_t fct_funcs_dispatch_cb_##A = 0;                                         \
-static int my_funcs_dispatch_cb_##A(void* a, void* b, void* c, void* d) {               \
-    return (int)RunFunction(my_context, fct_funcs_dispatch_cb_##A, 4, a, b, c, d);      \
-}   \
-static uintptr_t fct_funcs_dispatch_##A = 0;  \
-static int my_funcs_dispatch_##A(void* source, void* cb, void* data) {   \
-    uintptr_t old = fct_funcs_dispatch_cb_##A;  \
-    fct_funcs_dispatch_cb_##A = (uintptr_t)cb;  \
-    return (int)RunFunction(my_context, fct_funcs_dispatch_##A, 3, source, cb?my_funcs_dispatch_cb_##A:NULL, data);    \
-    fct_funcs_dispatch_cb_##A = old;    \
-}   \
-static uintptr_t fct_funcs_finalize_##A = 0;  \
-static int my_funcs_finalize_##A(void* source) {   \
-    return (int)RunFunction(my_context, fct_funcs_finalize_##A, 1, source);    \
+static uintptr_t fct_funcs_prepare_##A = 0;                                                \
+static int my_funcs_prepare_##A(void* source, int *timeout_) {                             \
+    return (int)RunFunctionFmt(fct_funcs_prepare_##A, "pp", source, timeout_); \
+}                                                                                          \
+static uintptr_t fct_funcs_check_##A = 0;                                     \
+static int my_funcs_check_##A(void* source) {                                 \
+    return (int)RunFunctionFmt(fct_funcs_check_##A, "p", source); \
+}                                                                             \
+static uintptr_t fct_funcs_dispatch_cb_##A = 0;                                            \
+static int my_funcs_dispatch_cb_##A(void* a, void* b, void* c, void* d) {                  \
+    return (int)RunFunctionFmt(fct_funcs_dispatch_cb_##A, "pppp", a, b, c, d); \
+}                                                                                          \
+static uintptr_t fct_funcs_dispatch_##A = 0;                           \
+static int my_funcs_dispatch_##A(void* source, void* cb, void* data) { \
+    uintptr_t old = fct_funcs_dispatch_cb_##A;                         \
+    fct_funcs_dispatch_cb_##A = (uintptr_t)cb;                         \
+    return (int)RunFunctionFmt(fct_funcs_dispatch_##A, "ppp", source, cb?my_funcs_dispatch_cb_##A:NULL, data); \
+    fct_funcs_dispatch_cb_##A = old;                                   \
+}                                                                      \
+static uintptr_t fct_funcs_finalize_##A = 0;                           \
+static int my_funcs_finalize_##A(void* source) {                       \
+    return (int)RunFunctionFmt(fct_funcs_finalize_##A, "p", source); \
 }
 SUPER()
 #undef GO
@@ -214,10 +214,10 @@ static my_GSourceFuncs_t* findFreeGSourceFuncs(my_GSourceFuncs_t* fcts)
 
 // PollFunc ...
 #define GO(A)   \
-static uintptr_t my_poll_fct_##A = 0;   \
-static int my_poll_##A(void* ufds, uint32_t nfsd, int32_t timeout_)     \
-{                                       \
-    return RunFunction(my_context, my_poll_fct_##A, 3, ufds, nfsd, timeout_);\
+static uintptr_t my_poll_fct_##A = 0;                                                \
+static int my_poll_##A(void* ufds, uint32_t nfsd, int32_t timeout_)                  \
+{                                                                                    \
+    return RunFunctionFmt(my_poll_fct_##A, "pui", ufds, nfsd, timeout_); \
 }
 SUPER()
 #undef GO
@@ -246,10 +246,10 @@ static void* reversePollFct(void* fct)
 
 // GHashFunc ...
 #define GO(A)   \
-static uintptr_t my_hashfunc_fct_##A = 0;   \
-static uint32_t my_hashfunc_##A(void* key)     \
-{                                       \
-    return (uint32_t)RunFunction(my_context, my_hashfunc_fct_##A, 1, key);\
+static uintptr_t my_hashfunc_fct_##A = 0;                                       \
+static uint32_t my_hashfunc_##A(void* key)                                      \
+{                                                                               \
+    return (uint32_t)RunFunctionFmt(my_hashfunc_fct_##A, "p", key); \
 }
 SUPER()
 #undef GO
@@ -268,10 +268,10 @@ static void* findHashFct(void* fct)
 }
 // GEqualFunc ...
 #define GO(A)   \
-static uintptr_t my_equalfunc_fct_##A = 0;   \
-static int my_equalfunc_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_equalfunc_fct_##A, 2, a, b);\
+static uintptr_t my_equalfunc_fct_##A = 0;                               \
+static int my_equalfunc_##A(void* a, void* b)                            \
+{                                                                        \
+    return RunFunctionFmt(my_equalfunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -290,10 +290,10 @@ static void* findEqualFct(void* fct)
 }
 // GDestroyFunc ...
 #define GO(A)   \
-static uintptr_t my_destroyfunc_fct_##A = 0;   \
-static int my_destroyfunc_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_destroyfunc_fct_##A, 2, a, b);\
+static uintptr_t my_destroyfunc_fct_##A = 0;                               \
+static int my_destroyfunc_##A(void* a, void* b)                            \
+{                                                                          \
+    return RunFunctionFmt(my_destroyfunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -312,10 +312,10 @@ static void* findDestroyFct(void* fct)
 }
 // GSpawnChildSetupFunc ...
 #define GO(A)   \
-static uintptr_t my_spwnchildsetup_fct_##A = 0;   \
-static void my_spwnchildsetup_##A(void* data)     \
-{                                       \
-    RunFunction(my_context, my_spwnchildsetup_fct_##A, 1, data);\
+static uintptr_t my_spwnchildsetup_fct_##A = 0;                       \
+static void my_spwnchildsetup_##A(void* data)                         \
+{                                                                     \
+    RunFunctionFmt(my_spwnchildsetup_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -334,10 +334,10 @@ static void* findSpawnChildSetupFct(void* fct)
 }
 // GSourceFunc ...
 #define GO(A)   \
-static uintptr_t my_GSourceFunc_fct_##A = 0;   \
-static void my_GSourceFunc_##A(void* a, void* b, void* c, void* d)     \
-{                                       \
-    RunFunction(my_context, my_GSourceFunc_fct_##A, 4, a, b, c, d);\
+static uintptr_t my_GSourceFunc_fct_##A = 0;                                \
+static void my_GSourceFunc_##A(void* a, void* b, void* c, void* d)          \
+{                                                                           \
+    RunFunctionFmt(my_GSourceFunc_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -356,10 +356,10 @@ static void* findGSourceFuncFct(void* fct)
 }
 // GCompareFunc ...
 #define GO(A)   \
-static uintptr_t my_GCompareFunc_fct_##A = 0;   \
-static int my_GCompareFunc_##A(void* a, void* b)     \
-{                                       \
-    return (int)RunFunction(my_context, my_GCompareFunc_fct_##A, 2, a, b);\
+static uintptr_t my_GCompareFunc_fct_##A = 0;                                    \
+static int my_GCompareFunc_##A(void* a, void* b)                                 \
+{                                                                                \
+    return (int)RunFunctionFmt(my_GCompareFunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -378,10 +378,10 @@ static void* findGCompareFuncFct(void* fct)
 }
 // GCompareDataFunc ...
 #define GO(A)   \
-static uintptr_t my_GCompareDataFunc_fct_##A = 0;                   \
-static int my_GCompareDataFunc_##A(void* a, void* b, void* data)    \
-{                                       \
-    return (int)RunFunction(my_context, my_GCompareDataFunc_fct_##A, 3, a, b, data);\
+static uintptr_t my_GCompareDataFunc_fct_##A = 0;                                           \
+static int my_GCompareDataFunc_##A(void* a, void* b, void* data)                            \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GCompareDataFunc_fct_##A, "ppp", a, b, data); \
 }
 SUPER()
 #undef GO
@@ -400,10 +400,10 @@ static void* findGCompareDataFuncFct(void* fct)
 }
 // GCompletionFunc ...
 #define GO(A)   \
-static uintptr_t my_GCompletionFunc_fct_##A = 0;                            \
-static void* my_GCompletionFunc_##A(void* a)                                \
-{                                                                           \
-    return (void*)RunFunction(my_context, my_GCompletionFunc_fct_##A, 1, a);\
+static uintptr_t my_GCompletionFunc_fct_##A = 0;                                  \
+static void* my_GCompletionFunc_##A(void* a)                                      \
+{                                                                                 \
+    return (void*)RunFunctionFmt(my_GCompletionFunc_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -422,10 +422,10 @@ static void* findGCompletionFct(void* fct)
 }
 // GCompletionStrncmpFunc ...
 #define GO(A)   \
-static uintptr_t my_GCompletionStrncmpFunc_fct_##A = 0;                                 \
-static int my_GCompletionStrncmpFunc_##A(void* a, void* b, unsigned long n)             \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GCompletionStrncmpFunc_fct_##A, 3, a, b, n); \
+static uintptr_t my_GCompletionStrncmpFunc_fct_##A = 0;                                        \
+static int my_GCompletionStrncmpFunc_##A(void* a, void* b, unsigned long n)                    \
+{                                                                                              \
+    return (int)RunFunctionFmt(my_GCompletionStrncmpFunc_fct_##A, "ppL", a, b, n); \
 }
 SUPER()
 #undef GO
@@ -444,10 +444,10 @@ static void* findGCompletionStrncmpFuncFct(void* fct)
 }
 // GIOFunc ...
 #define GO(A)   \
-static uintptr_t my_GIOFunc_fct_##A = 0;                                 \
-static int my_GIOFunc_##A(void* a, int b, void* c)             \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GIOFunc_fct_##A, 3, a, b, c); \
+static uintptr_t my_GIOFunc_fct_##A = 0;                                        \
+static int my_GIOFunc_##A(void* a, int b, void* c)                              \
+{                                                                               \
+    return (int)RunFunctionFmt(my_GIOFunc_fct_##A, "pip", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -466,10 +466,10 @@ static void* findGIOFuncFct(void* fct)
 }
 // GDestroyNotify ...
 #define GO(A)   \
-static uintptr_t my_GDestroyNotify_fct_##A = 0;                 \
-static void my_GDestroyNotify_##A(void* a)                      \
-{                                                               \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, a);   \
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                    \
+static void my_GDestroyNotify_##A(void* a)                         \
+{                                                                  \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -488,10 +488,10 @@ static void* findGDestroyNotifyFct(void* fct)
 }
 // GFunc ...
 #define GO(A)   \
-static uintptr_t my_GFunc_fct_##A = 0;                  \
-static void my_GFunc_##A(void* a, void* b)              \
-{                                                       \
-    RunFunction(my_context, my_GFunc_fct_##A, 2, a, b); \
+static uintptr_t my_GFunc_fct_##A = 0;                        \
+static void my_GFunc_##A(void* a, void* b)                    \
+{                                                             \
+    RunFunctionFmt(my_GFunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -510,10 +510,10 @@ static void* findGFuncFct(void* fct)
 }
 // GHFunc ...
 #define GO(A)   \
-static uintptr_t my_GHFunc_fct_##A = 0;                     \
-static void my_GHFunc_##A(void* a, void* b, void* c)        \
-{                                                           \
-    RunFunction(my_context, my_GHFunc_fct_##A, 3, a, b, c); \
+static uintptr_t my_GHFunc_fct_##A = 0;                            \
+static void my_GHFunc_##A(void* a, void* b, void* c)               \
+{                                                                  \
+    RunFunctionFmt(my_GHFunc_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -532,10 +532,10 @@ static void* findGHFuncFct(void* fct)
 }
 // GHRFunc ...
 #define GO(A)   \
-static uintptr_t my_GHRFunc_fct_##A = 0;                            \
-static int my_GHRFunc_##A(void* a, void* b, void* c)                \
-{                                                                   \
-    return RunFunction(my_context, my_GHRFunc_fct_##A, 3, a, b, c); \
+static uintptr_t my_GHRFunc_fct_##A = 0;                                 \
+static int my_GHRFunc_##A(void* a, void* b, void* c)                     \
+{                                                                        \
+    return RunFunctionFmt(my_GHRFunc_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -554,10 +554,10 @@ static void* findGHRFuncFct(void* fct)
 }
 // GChildWatchFunc ...
 #define GO(A)   \
-static uintptr_t my_GChildWatchFunc_fct_##A = 0;                        \
-static void my_GChildWatchFunc_##A(int a, int b, void* c)               \
-{                                                                       \
-    RunFunction(my_context, my_GChildWatchFunc_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GChildWatchFunc_fct_##A = 0;                            \
+static void my_GChildWatchFunc_##A(int a, int b, void* c)                   \
+{                                                                           \
+    RunFunctionFmt(my_GChildWatchFunc_fct_##A, "iip", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -576,10 +576,10 @@ static void* findGChildWatchFuncFct(void* fct)
 }
 // GLogFunc ...
 #define GO(A)   \
-static uintptr_t my_GLogFunc_fct_##A = 0;                           \
-static void my_GLogFunc_##A(void* a, int b, void* c, void* d)       \
-{                                                                   \
-    RunFunction(my_context, my_GLogFunc_fct_##A, 4, a, b, c, d);    \
+static uintptr_t my_GLogFunc_fct_##A = 0;                                \
+static void my_GLogFunc_##A(void* a, int b, void* c, void* d)            \
+{                                                                        \
+    RunFunctionFmt(my_GLogFunc_fct_##A, "pipp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -606,10 +606,10 @@ static void* reverseGLogFuncFct(void* fct)
 }
 // GPrintFunc ...
 #define GO(A)   \
-static uintptr_t my_GPrintFunc_fct_##A = 0;                     \
-static void my_GPrintFunc_##A(void* a)                          \
-{                                                               \
-    RunFunction(my_context, my_GPrintFunc_fct_##A, 1, a);       \
+static uintptr_t my_GPrintFunc_fct_##A = 0;                    \
+static void my_GPrintFunc_##A(void* a)                         \
+{                                                              \
+    RunFunctionFmt(my_GPrintFunc_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -636,10 +636,10 @@ static void* reverseGPrintFuncFct(void* fct)
 }
 // GOptionArg ...
 #define GO(A)   \
-static uintptr_t my_GOptionArg_fct_##A = 0;                                     \
-static int my_GOptionArg_##A(void* a, void* b, void* c, void* d)                \
-{                                                                               \
-    return (int)RunFunction(my_context, my_GOptionArg_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_GOptionArg_fct_##A = 0;                                            \
+static int my_GOptionArg_##A(void* a, void* b, void* c, void* d)                       \
+{                                                                                      \
+    return (int)RunFunctionFmt(my_GOptionArg_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -666,10 +666,10 @@ static void* reverseGOptionArgFct(void* fct)
 }
 // GNodeTraverseFunc ...
 #define GO(A)   \
-static uintptr_t my_GNodeTraverseFunc_fct_##A = 0;                              \
-static int my_GNodeTraverseFunc_##A(void* a, void* b)                           \
-{                                                                               \
-    return (int)RunFunction(my_context, my_GNodeTraverseFunc_fct_##A, 2, a, b); \
+static uintptr_t my_GNodeTraverseFunc_fct_##A = 0;                                    \
+static int my_GNodeTraverseFunc_##A(void* a, void* b)                                 \
+{                                                                                     \
+    return (int)RunFunctionFmt(my_GNodeTraverseFunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -688,10 +688,10 @@ static void* findGNodeTraverseFuncFct(void* fct)
 }
 // GThreadFunc ...
 #define GO(A)   \
-static uintptr_t my_GThreadFunc_fct_##A = 0;                            \
-static void* my_GThreadFunc_##A(void* a)                                \
-{                                                                       \
-    return (void*)RunFunction(my_context, my_GThreadFunc_fct_##A, 1, a);\
+static uintptr_t my_GThreadFunc_fct_##A = 0;                                  \
+static void* my_GThreadFunc_##A(void* a)                                      \
+{                                                                             \
+    return (void*)RunFunctionFmt(my_GThreadFunc_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -863,7 +863,7 @@ EXPORT void* my_g_main_context_get_poll_func(x64emu_t* emu, void* context)
     // needs to bridge....
     return (void*)AddCheckBridge(my_lib->w.bridge, iFpui, ret, 0, NULL);
 }
-    
+
 EXPORT void my_g_main_context_set_poll_func(x64emu_t* emu, void* context, void* func)
 {
     my->g_main_context_set_poll_func(context, findPollFct(func));
@@ -896,17 +896,17 @@ EXPORT void my_g_hash_table_foreach(x64emu_t* emu, void* table, void* f, void* d
 
 EXPORT uint32_t my_g_hash_table_foreach_remove(x64emu_t* emu, void* table, void* f, void* data)
 {
-    
+
     return my->g_hash_table_foreach_remove(table, findGHRFuncFct(f), data);
 }
 EXPORT uint32_t my_g_hash_table_foreach_steal(x64emu_t* emu, void* table, void* f, void* data)
 {
-    
+
     return my->g_hash_table_foreach_steal(table, findGHRFuncFct(f), data);
 }
 EXPORT void* my_g_hash_table_find(x64emu_t* emu, void* table, void* f, void* data)
 {
-    
+
     return my->g_hash_table_find(table, findGHRFuncFct(f), data);
 }
 
diff --git a/src/wrapped/wrappedglib2_private.h b/src/wrapped/wrappedglib2_private.h
index b148298e..0102e01d 100644
--- a/src/wrapped/wrappedglib2_private.h
+++ b/src/wrapped/wrappedglib2_private.h
@@ -754,7 +754,7 @@ GO(g_nullify_pointer, vFp)
 //GO(g_once_impl, 
 GO(g_once_init_enter, iFp)
 GO(g_once_init_enter_impl, iFp)
-GO(g_once_init_leave, vFpL)
+GO(g_once_init_leave, vFpi)
 GO(g_on_error_query, vFp)
 GO(g_on_error_stack_trace, vFp)
 GO(g_open, iFpii)
@@ -1263,7 +1263,7 @@ GO(g_test_trap_fork, iFLu)
 GO(g_test_trap_subprocess, vFpLu)
 GOM(g_thread_create, pFEppip)
 GOM(g_thread_create_full, pFEppLiiip)
-//GO(g_thread_error_quark, 
+GO(g_thread_error_quark, pFv)
 GO(g_thread_exit, vFp)
 GOM(g_thread_foreach, vFEpp)
 GO(g_thread_get_initialized, iFv)
diff --git a/src/wrapped/wrappedgnutls.c b/src/wrapped/wrappedgnutls.c
index cc89e69c..dd4cde20 100644
--- a/src/wrapped/wrappedgnutls.c
+++ b/src/wrapped/wrappedgnutls.c
@@ -35,10 +35,10 @@ GO(4)
 
 // gnutls_log
 #define GO(A)   \
-static uintptr_t my_gnutls_log_fct_##A = 0;                       \
-static void my_gnutls_log_##A(int level, const char* p)           \
-{                                                                 \
-    RunFunction(my_context, my_gnutls_log_fct_##A, 2, level, p);  \
+static uintptr_t my_gnutls_log_fct_##A = 0;                            \
+static void my_gnutls_log_##A(int level, const char* p)                \
+{                                                                      \
+    RunFunctionFmt(my_gnutls_log_fct_##A, "ip", level, p);        \
 }
 SUPER()
 #undef GO
@@ -59,10 +59,10 @@ static void* find_gnutls_log_Fct(void* fct)
 
 // pullpush
 #define GO(A)   \
-static uintptr_t my_pullpush_fct_##A = 0;                                   \
-static long my_pullpush_##A(void* p, void* d, size_t l)                     \
-{                                                                           \
-    return (long)RunFunction(my_context, my_pullpush_fct_##A, 3, p, d, l);  \
+static uintptr_t my_pullpush_fct_##A = 0;                                         \
+static long my_pullpush_##A(void* p, void* d, size_t l)                           \
+{                                                                                 \
+    return (long)RunFunctionFmt(my_pullpush_fct_##A, "ppL", p, d, l);         \
 }
 SUPER()
 #undef GO
@@ -83,10 +83,10 @@ static void* find_pullpush_Fct(void* fct)
 
 // timeout
 #define GO(A)   \
-static uintptr_t my_timeout_fct_##A = 0;                                \
-static int my_timeout_##A(void* p, uint32_t t)                          \
-{                                                                       \
-    return (int)RunFunction(my_context, my_timeout_fct_##A, 2, p, t);   \
+static uintptr_t my_timeout_fct_##A = 0;                                    \
+static int my_timeout_##A(void* p, uint32_t t)                              \
+{                                                                           \
+    return (int)RunFunctionFmt(my_timeout_fct_##A, "pu", p, t);       \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedgnutls_private.h b/src/wrapped/wrappedgnutls_private.h
index 3697259b..13363b03 100644
--- a/src/wrapped/wrappedgnutls_private.h
+++ b/src/wrapped/wrappedgnutls_private.h
@@ -189,6 +189,8 @@ GO(gnutls_dtls_set_timeouts, vFpuu)
 //GO(gnutls_ecc_curve_get_pk, 
 //GO(gnutls_ecc_curve_get_size, 
 //GO(gnutls_ecc_curve_list, 
+GO(_gnutls_ecdh_compute_key, iFppp)
+GO(gnutls_ecdh_compute_key, iFppp)
 //GO(gnutls_encode_ber_digest_info, 
 //GO(_gnutls_encode_ber_rs_raw, 
 //GO(gnutls_error_is_fatal, 
@@ -560,6 +562,7 @@ GO(gnutls_privkey_import_rsa_raw, iFppppppppp)
 GO(gnutls_privkey_init, iFp)
 //GO(gnutls_privkey_set_flags, 
 //GO(gnutls_privkey_set_pin_function, 
+GO(gnutls_privkey_set_spki, iFppu)
 //GO(gnutls_privkey_sign_data, 
 GO(gnutls_privkey_sign_hash, iFppupp)
 //GO(gnutls_privkey_status, 
@@ -616,6 +619,7 @@ GO(gnutls_pubkey_init, iFp)
 //GO(gnutls_pubkey_print, 
 //GO(gnutls_pubkey_set_key_usage, 
 //GO(gnutls_pubkey_set_pin_function, 
+GO(gnutls_pubkey_set_spki, iFppu)
 //GO(gnutls_pubkey_verify_data2, 
 GO(gnutls_pubkey_verify_hash2, iFppupp)
 //GO(gnutls_pubkey_verify_params, 
@@ -1092,6 +1096,9 @@ GO(gnutls_x509_privkey_get_pk_algorithm2, iFpp)
 //GO(gnutls_x509_rdn_get2, 
 //GO(gnutls_x509_rdn_get_by_oid, 
 //GO(gnutls_x509_rdn_get_oid, 
+GO(gnutls_x509_spki_deinit, vFp)
+GO(gnutls_x509_spki_init, vFp)
+GO(gnutls_x509_spki_set_rsa_pss_params, vFppu)
 //GO(gnutls_x509_tlsfeatures_add, 
 //GO(gnutls_x509_tlsfeatures_check_crt, 
 //GO(gnutls_x509_tlsfeatures_deinit, 
diff --git a/src/wrapped/wrappedgobject2.c b/src/wrapped/wrappedgobject2.c
index f9fc35b9..d51a736f 100644
--- a/src/wrapped/wrappedgobject2.c
+++ b/src/wrapped/wrappedgobject2.c
@@ -67,11 +67,11 @@ static int signal_cb(void* a, void* b, void* c, void* d, void* e)
     }
     printf_log(LOG_DEBUG, "gobject2 Signal called, sig=%p, handler=%p, NArgs=%d\n", sig, sig?(void*)sig->c_handler:NULL, i);
     switch(i) {
-        case 1: return (int)RunFunction(my_context, sig->c_handler, 1, sig->data);
-        case 2: return (int)RunFunction(my_context, sig->c_handler, 2, a, sig->data);
-        case 3: return (int)RunFunction(my_context, sig->c_handler, 3, a, b, sig->data);
-        case 4: return (int)RunFunction(my_context, sig->c_handler, 4, a, b, c, sig->data);
-        case 5: return (int)RunFunction(my_context, sig->c_handler, 5, a, b, c, d, sig->data);
+        case 1: return (int)RunFunctionFmt(sig->c_handler, "p", sig->data);
+        case 2: return (int)RunFunctionFmt(sig->c_handler, "pp", a, sig->data);
+        case 3: return (int)RunFunctionFmt(sig->c_handler, "ppp", a, b, sig->data);
+        case 4: return (int)RunFunctionFmt(sig->c_handler, "pppp", a, b, c, sig->data);
+        case 5: return (int)RunFunctionFmt(sig->c_handler, "ppppp", a, b, c, d, sig->data);
     }
     printf_log(LOG_NONE, "Warning, GObject2 signal callback but no data found!\n");
     return 0;
@@ -80,47 +80,47 @@ static int signal_cb_swapped(my_signal_t* sig, void* b, void* c, void* d)
 {
     // data is in front here...
     printf_log(LOG_DEBUG, "gobject2 swaped4 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 4, sig->data, b, c, d);
+    return (int)RunFunctionFmt(sig->c_handler, "pppp", sig->data, b, c, d);
 }
 static int signal_cb_5(void* a, void* b, void* c, void* d, my_signal_t* sig)
 {
     printf_log(LOG_DEBUG, "gobject2 5 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 5, a, b, c, d, sig->data);
+    return (int)RunFunctionFmt(sig->c_handler, "ppppp", a, b, c, d, sig->data);
 }
 static int signal_cb_swapped_5(my_signal_t* sig, void* b, void* c, void* d, void* e)
 {
     // data is in front here...
     printf_log(LOG_DEBUG, "gobject2 swaped5 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 5, sig->data, b, c, d, e);
+    return (int)RunFunctionFmt(sig->c_handler, "ppppp", sig->data, b, c, d, e);
 }
 static int signal_cb_6(void* a, void* b, void* c, void* d, void* e, my_signal_t* sig)
 {
     printf_log(LOG_DEBUG, "gobject2 6 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 6, a, b, c, d, e, sig->data);
+    return (int)RunFunctionFmt(sig->c_handler, "pppppp", a, b, c, d, e, sig->data);
 }
 static int signal_cb_swapped_6(my_signal_t* sig, void* b, void* c, void* d, void* e, void* f)
 {
     // data is in front here...
     printf_log(LOG_DEBUG, "gobject2 swaped6 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 6, sig->data, b, c, d, e, f);
+    return (int)RunFunctionFmt(sig->c_handler, "pppppp", sig->data, b, c, d, e, f);
 }
 static int signal_cb_8(void* a, void* b, void* c, void* d, void* e, void* f, void* g, my_signal_t* sig)
 {
     printf_log(LOG_DEBUG, "gobject2 8 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 8, a, b, c, d, e, f, g, sig->data);
+    return (int)RunFunctionFmt(sig->c_handler, "pppppppp", a, b, c, d, e, f, g, sig->data);
 }
 static int signal_cb_swapped_8(my_signal_t* sig, void* b, void* c, void* d, void* e, void* f, void* g, void* h)
 {
     // data is in front here...
     printf_log(LOG_DEBUG, "gobject2 swaped8 Signal called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 8, sig->data, b, c, d, e, f, g, h);
+    return (int)RunFunctionFmt(sig->c_handler, "pppppppp", sig->data, b, c, d, e, f, g, h);
 }
 
 static void signal_delete(my_signal_t* sig, void* b)
 {
     uintptr_t d = sig->destroy;
     if(d) {
-        RunFunction(my_context, d, 2, sig->data, b);
+        RunFunctionFmt(d, "pp", sig->data, b);
     }
     printf_log(LOG_DEBUG, "gobject2 Signal deleted, sig=%p, destroy=%p\n", sig, (void*)d);
     free(sig);
@@ -128,7 +128,7 @@ static void signal_delete(my_signal_t* sig, void* b)
 
 static void addGObject2Alternate(library_t* lib)
 {
-    #define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->w.bridge, W, dlsym(lib->w.lib, #A), 0)
+    #define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->w.bridge, W, dlsym(lib->w.lib, #A), 0, #A)
     GO(g_cclosure_marshal_VOID__VOID,               vFppuppp);
     GO(g_cclosure_marshal_VOID__BOOLEAN,            vFppuppp);
     GO(g_cclosure_marshal_VOID__UCHAR,              vFppuppp);
@@ -174,7 +174,7 @@ static void addGObject2Alternate(library_t* lib)
     GO(g_cclosure_marshal_BOOLEAN__FLAGSv,          vFpppppip);
     GO(g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv,    vFpppppip);
     #undef GO
-    #define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->w.bridge, W, A, 0)
+    #define GO(A, W) AddAutomaticBridge(thread_get_emu(), lib->w.bridge, W, A, 0, #A)
     GO(signal_cb, iFpppp);
     GO(signal_cb_swapped, iFpppp);
     GO(signal_cb_5, iFppppp);
@@ -267,10 +267,10 @@ GO(11)  \
 GO(12)  \
 
 #define GO(A)   \
-static uintptr_t my_copy_fct_##A = 0;   \
-static void* my_copy_##A(void* data)     \
-{                                       \
-    return (void*)RunFunction(my_context, my_copy_fct_##A, 1, data);\
+static uintptr_t my_copy_fct_##A = 0;                                     \
+static void* my_copy_##A(void* data)                                      \
+{                                                                         \
+    return (void*)RunFunctionFmt(my_copy_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -288,10 +288,10 @@ static void* findCopyFct(void* fct)
 }
 
 #define GO(A)   \
-static uintptr_t my_free_fct_##A = 0;   \
-static void my_free_##A(void* data)     \
-{                                       \
-    RunFunction(my_context, my_free_fct_##A, 1, data);\
+static uintptr_t my_free_fct_##A = 0;                       \
+static void my_free_##A(void* data)                         \
+{                                                           \
+    RunFunctionFmt(my_free_fct_##A, "p", data); \
 }
 SUPER()
 #undef GO
@@ -309,10 +309,10 @@ static void* findFreeFct(void* fct)
 }
 // GSignalAccumulator
 #define GO(A)   \
-static uintptr_t my_accumulator_fct_##A = 0;   \
-static int my_accumulator_##A(void* ihint, void* return_accu, void* handler_return, void* data)     \
-{                                       \
-    return RunFunction(my_context, my_accumulator_fct_##A, 4, ihint, return_accu, handler_return, data);\
+static uintptr_t my_accumulator_fct_##A = 0;                                                                     \
+static int my_accumulator_##A(void* ihint, void* return_accu, void* handler_return, void* data)                  \
+{                                                                                                                \
+    return RunFunctionFmt(my_accumulator_fct_##A, "pppp", ihint, return_accu, handler_return, data); \
 }
 SUPER()
 #undef GO
@@ -332,10 +332,10 @@ static void* findAccumulatorFct(void* fct)
 
 // GClosureMarshal
 #define GO(A)   \
-static uintptr_t my_marshal_fct_##A = 0;   \
+static uintptr_t my_marshal_fct_##A = 0;                                                                        \
 static void my_marshal_##A(void* closure, void* return_value, uint32_t n, void* values, void* hint, void* data) \
 {                                                                                                               \
-    RunFunction(my_context, my_marshal_fct_##A, 6, closure, return_value, n, values, hint, data);               \
+    RunFunctionFmt(my_marshal_fct_##A, "ppuppp", closure, return_value, n, values, hint, data);     \
 }
 SUPER()
 #undef GO
@@ -346,7 +346,7 @@ static void* findMarshalFct(void* fct)
     #define GO(A) if(my_marshal_fct_##A == (uintptr_t)fct) return my_marshal_##A;
     SUPER()
     #undef GO
-    #define GO(A) if(my_marshal_fct_##A == 0) {AddAutomaticBridge(thread_get_emu(), my_lib->w.bridge, vFppuppp, my_marshal_##A, 0); my_marshal_fct_##A = (uintptr_t)fct; return my_marshal_##A; }
+    #define GO(A) if(my_marshal_fct_##A == 0) {AddAutomaticBridge(thread_get_emu(), my_lib->w.bridge, vFppuppp, my_marshal_##A, 0, #A); my_marshal_fct_##A = (uintptr_t)fct; return my_marshal_##A; }
     SUPER()
     #undef GO
     printf_log(LOG_NONE, "Warning, no more slot for gobject Closure Marshal callback\n");
@@ -355,10 +355,10 @@ static void* findMarshalFct(void* fct)
 
 // GClosureNotify
 #define GO(A)   \
-static uintptr_t my_GClosureNotify_fct_##A = 0;   \
-static int my_GClosureNotify_func_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_GClosureNotify_fct_##A, 2, a, b);\
+static uintptr_t my_GClosureNotify_fct_##A = 0;                               \
+static int my_GClosureNotify_func_##A(void* a, void* b)                       \
+{                                                                             \
+    return RunFunctionFmt(my_GClosureNotify_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -378,10 +378,10 @@ static void* findGClosureNotify_Fct(void* fct)
 
 // GValueTransform
 #define GO(A)   \
-static uintptr_t my_valuetransform_fct_##A = 0;                     \
-static void my_valuetransform_##A(void* src, void* dst)            \
-{                                                                   \
-    RunFunction(my_context, my_valuetransform_fct_##A, 2, src, dst);\
+static uintptr_t my_valuetransform_fct_##A = 0;                            \
+static void my_valuetransform_##A(void* src, void* dst)                    \
+{                                                                          \
+    RunFunctionFmt(my_valuetransform_fct_##A, "pp", src, dst); \
 }
 SUPER()
 #undef GO
@@ -401,10 +401,10 @@ static void* findValueTransformFct(void* fct)
 
 // GDestroyFunc ...
 #define GO(A)   \
-static uintptr_t my_destroyfunc_fct_##A = 0;   \
-static int my_destroyfunc_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_destroyfunc_fct_##A, 2, a, b);\
+static uintptr_t my_destroyfunc_fct_##A = 0;                               \
+static int my_destroyfunc_##A(void* a, void* b)                            \
+{                                                                          \
+    return RunFunctionFmt(my_destroyfunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -424,10 +424,10 @@ static void* findDestroyFct(void* fct)
 
 // GWeakNotify
 #define GO(A)   \
-static uintptr_t my_weaknotifyfunc_fct_##A = 0;   \
-static int my_weaknotifyfunc_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_weaknotifyfunc_fct_##A, 2, a, b);\
+static uintptr_t my_weaknotifyfunc_fct_##A = 0;                               \
+static int my_weaknotifyfunc_##A(void* a, void* b)                            \
+{                                                                             \
+    return RunFunctionFmt(my_weaknotifyfunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -447,10 +447,10 @@ static void* findWeakNotifyFct(void* fct)
 
 // GCallback  (generic function with 6 arguments, hopefully it's enough)
 #define GO(A)   \
-static uintptr_t my_GCallback_fct_##A = 0;                                             \
-static void* my_GCallback_##A(void* a, void* b, void* c, void* d, void* e, void* f)    \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_GCallback_fct_##A, 6, a, b, c, d, e, f);  \
+static uintptr_t my_GCallback_fct_##A = 0;                                                      \
+static void* my_GCallback_##A(void* a, void* b, void* c, void* d, void* e, void* f)             \
+{                                                                                               \
+    return (void*)RunFunctionFmt(my_GCallback_fct_##A, "pppppp", a, b, c, d, e, f); \
 }
 SUPER()
 #undef GO
@@ -481,32 +481,32 @@ typedef struct my_GParamSpecTypeInfo_s {
   int       (*values_cmp)       (void* pspec, void* value1, void* value2);
 } my_GParamSpecTypeInfo_t;
 
-#define GO(A) \
+#define GO(A)   \
 static my_GParamSpecTypeInfo_t     my_GParamSpecTypeInfo_##A = {0};   \
 static my_GParamSpecTypeInfo_t   *ref_GParamSpecTypeInfo_##A = NULL;
 SUPER()
 #undef GO
 // then the static functions callback that may be used with the structure, but dispatch also have a callback...
 #define GO(A)   \
-static uintptr_t fct_funcs_instance_init_##A = 0;                   \
-static void my_funcs_instance_init_##A(void* pspec) {               \
-    RunFunction(my_context, fct_funcs_instance_init_##A, 1, pspec); \
+static uintptr_t fct_funcs_instance_init_##A = 0;                           \
+static void my_funcs_instance_init_##A(void* pspec) {                       \
+    RunFunctionFmt(fct_funcs_instance_init_##A, "p", pspec);    \
 }   \
-static uintptr_t fct_funcs_finalize_##A = 0;                        \
-static void my_funcs_finalize_##A(void* pspec) {                    \
-    RunFunction(my_context, fct_funcs_finalize_##A, 1, pspec);      \
+static uintptr_t fct_funcs_finalize_##A = 0;                                \
+static void my_funcs_finalize_##A(void* pspec) {                            \
+    RunFunctionFmt(fct_funcs_finalize_##A, "p", pspec);         \
 }   \
-static uintptr_t fct_funcs_value_set_default_##A = 0;               \
-static void my_funcs_value_set_default_##A(void* pspec, void* value) {          \
-    RunFunction(my_context, fct_funcs_value_set_default_##A, 2, pspec, value);  \
+static uintptr_t fct_funcs_value_set_default_##A = 0;                   \
+static void my_funcs_value_set_default_##A(void* pspec, void* value) {  \
+    RunFunctionFmt(fct_funcs_value_set_default_##A, "pp", pspec, value);    \
 }   \
-static uintptr_t fct_funcs_value_validate_##A = 0;                  \
-static int my_funcs_value_validate_##A(void* pspec, void* value) {  \
-    return (int)RunFunction(my_context, fct_funcs_value_validate_##A, 2, pspec, value); \
+static uintptr_t fct_funcs_value_validate_##A = 0;                      \
+static int my_funcs_value_validate_##A(void* pspec, void* value) {      \
+    return (int)RunFunctionFmt(fct_funcs_value_validate_##A, "pp", pspec, value); \
 }   \
-static uintptr_t fct_funcs_values_cmp_##A = 0;                      \
+static uintptr_t fct_funcs_values_cmp_##A = 0;                          \
 static int my_funcs_values_cmp_##A(void* pspec, void* value1, void* value2) {   \
-    return (int)RunFunction(my_context, fct_funcs_values_cmp_##A, 3, pspec, value1, value2);    \
+    return (int)RunFunctionFmt(fct_funcs_values_cmp_##A, "ppp", pspec, value1, value2); \
 }
 
 SUPER()
@@ -540,10 +540,10 @@ static my_GParamSpecTypeInfo_t* findFreeGParamSpecTypeInfo(my_GParamSpecTypeInfo
 
 // GInterfaceInitFunc
 #define GO(A)   \
-static uintptr_t my_GInterfaceInitFunc_fct_##A = 0;                     \
-static void my_GInterfaceInitFunc_##A(void* src, void* dst)            \
-{                                                                   \
-    RunFunction(my_context, my_GInterfaceInitFunc_fct_##A, 2, src, dst);\
+static uintptr_t my_GInterfaceInitFunc_fct_##A = 0;                             \
+static void my_GInterfaceInitFunc_##A(void* src, void* dst)                     \
+{                                                                               \
+    RunFunctionFmt(my_GInterfaceInitFunc_fct_##A, "pp", src, dst);  \
 }
 SUPER()
 #undef GO
@@ -562,10 +562,10 @@ static void* findGInterfaceInitFuncFct(void* fct)
 }
 // GInterfaceFinalizeFunc
 #define GO(A)   \
-static uintptr_t my_GInterfaceFinalizeFunc_fct_##A = 0;                     \
-static void my_GInterfaceFinalizeFunc_##A(void* src, void* dst)            \
-{                                                                   \
-    RunFunction(my_context, my_GInterfaceFinalizeFunc_fct_##A, 2, src, dst);\
+static uintptr_t my_GInterfaceFinalizeFunc_fct_##A = 0;                             \
+static void my_GInterfaceFinalizeFunc_##A(void* src, void* dst)                     \
+{                                                                                   \
+    RunFunctionFmt(my_GInterfaceFinalizeFunc_fct_##A, "pp", src, dst);  \
 }
 SUPER()
 #undef GO
@@ -584,10 +584,10 @@ static void* findGInterfaceFinalizeFuncFct(void* fct)
 }
 // compare
 #define GO(A)   \
-static uintptr_t my_compare_fct_##A = 0;                                \
-static int my_compare_##A(void* a, void* b, void* data)                 \
-{                                                                       \
-    return RunFunction(my_context, my_compare_fct_##A, 3, a, b, data);  \
+static uintptr_t my_compare_fct_##A = 0;                                        \
+static int my_compare_##A(void* a, void* b, void* data)                         \
+{                                                                               \
+    return RunFunctionFmt(my_compare_fct_##A, "ppp", a, b, data);   \
 }
 SUPER()
 #undef GO
@@ -623,7 +623,7 @@ EXPORT int my_g_boxed_type_register_static(x64emu_t* emu, void* name, void* boxe
 EXPORT uint32_t my_g_signal_new(x64emu_t* emu, void* name, size_t itype, int flags, uint32_t offset, void* acc, void* accu_data, void* marsh, size_t rtype, uint32_t n, void** b)
 {
     printf_log(LOG_DEBUG, "g_signal_new for \"%s\", with offset=%d and %d args\n", (const char*)name, offset, n);
-    
+
     void* cb_acc = findAccumulatorFct(acc);
     void* cb_marsh = findMarshalFct(marsh);
     my_add_signal_offset(itype, offset, n); // register the signal for later use
@@ -644,7 +644,7 @@ EXPORT uint32_t my_g_signal_new(x64emu_t* emu, void* name, size_t itype, int fla
 EXPORT uint32_t my_g_signal_newv(x64emu_t* emu, void* name, size_t itype, int flags, void* closure, void* acc, void* accu_data, void* marsh, size_t rtype, uint32_t n, void* types)
 {
     printf_log(LOG_DEBUG, "g_signal_newv for \"%s\", with %d args\n", (const char*)name, n);
-    
+
     return my->g_signal_newv(name, itype, flags, closure, findAccumulatorFct(acc), accu_data, findMarshalFct(marsh), rtype, n, types);
 }
 
@@ -732,7 +732,7 @@ EXPORT void my_g_value_register_transform_func(x64emu_t* emu, size_t src, size_t
 static int my_signal_emission_hook(void* ihint, uint32_t n, void* values, my_signal_t* sig)
 {
     printf_log(LOG_DEBUG, "gobject2 Signal Emission Hook called, sig=%p\n", sig);
-    return (int)RunFunction(my_context, sig->c_handler, 4, ihint, n, values, sig->data);
+    return (int)RunFunctionFmt(sig->c_handler, "pupp", ihint, n, values, sig->data);
 }
 EXPORT unsigned long my_g_signal_add_emission_hook(x64emu_t* emu, uint32_t signal, void* detail, void* f, void* data, void* notify)
 {
@@ -745,7 +745,7 @@ EXPORT unsigned long my_g_signal_add_emission_hook(x64emu_t* emu, uint32_t signa
     return my->g_signal_add_emission_hook(signal, detail, my_signal_emission_hook, sig, my_signal_delete);
 }
 
-EXPORT size_t my_g_type_register_static_simple(x64emu_t* emu, size_t parent, void* name, size_t class_size, void* class_init, size_t instance_size, void* instance_init, int flags)
+EXPORT size_t my_g_type_register_static_simple(x64emu_t* emu, size_t parent, void* name, uint32_t class_size, void* class_init, uint32_t instance_size, void* instance_init, uint32_t flags)
 {
         //gobject2_my_t *my = (gobject2_my_t*)my_lib->w.p2;
 
@@ -821,7 +821,7 @@ EXPORT void my_g_signal_emit_valist(x64emu_t* emu, void* inst, uint32_t id, void
     my->g_signal_emit_valist(inst, id, quark, VARARGS);
 }
 
-EXPORT void my_g_signal_emit(x64emu_t* emu, void* inst, uint32_t id, void* quark, x64_va_list_t b)
+EXPORT void my_g_signal_emit(x64emu_t* emu, void* inst, uint32_t id, void* quark, uintptr_t* b)
 {
     CREATE_VALIST_FROM_VAARG(b, emu->scratch, 3);
     my->g_signal_emit_valist(inst, id, quark, VARARGS);
diff --git a/src/wrapped/wrappedgobject2_private.h b/src/wrapped/wrappedgobject2_private.h
index 76f0b2f6..b81d036d 100644
--- a/src/wrapped/wrappedgobject2_private.h
+++ b/src/wrapped/wrappedgobject2_private.h
@@ -338,7 +338,7 @@ GO(g_type_query, vFLp)
 //GOM(type_register_dynamic, iFEpippi)
 GOM(g_type_register_fundamental, LFELpppi)
 GOM(g_type_register_static, LFELppi)
-GOM(g_type_register_static_simple, LFELpLpLpi)
+GOM(g_type_register_static_simple, LFELpupupu)
 //GOM(g_type_remove_class_cache_func, vFEpB)
 //GOM(g_type_remove_interface_check, vFEpB)
 GO(g_type_set_qdata, vFLup)
diff --git a/src/wrapped/wrappedgomp.c b/src/wrapped/wrappedgomp.c
new file mode 100644
index 00000000..650da53a
--- /dev/null
+++ b/src/wrapped/wrappedgomp.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <dlfcn.h>
+
+#include "wrappedlibs.h"
+
+#include "wrapper.h"
+#include "bridge.h"
+#include "librarian/library_private.h"
+#include "x64emu.h"
+
+const char* gompName = "libgomp.so.1";
+#define LIBNAME gomp
+
+#include "wrappedlib_init.h"
+
diff --git a/src/wrapped/wrappedgomp_private.h b/src/wrapped/wrappedgomp_private.h
new file mode 100644
index 00000000..33b19706
--- /dev/null
+++ b/src/wrapped/wrappedgomp_private.h
@@ -0,0 +1,477 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error meh!
+#endif
+//GO(acc_async_test, 
+//GO(acc_async_test_all, 
+//GO(acc_async_test_all_h_, 
+//GO(acc_async_test_h_, 
+//GO(acc_async_wait, 
+//GO(acc_async_wait_all, 
+//GO(acc_attach, 
+//GO(acc_attach_async, 
+//GO(acc_copyin, 
+//GO(acc_copyin_32_h_, 
+//GO(acc_copyin_64_h_, 
+//GO(acc_copyin_array_h_, 
+//GO(acc_copyin_async, 
+//GO(acc_copyin_async_32_h_, 
+//GO(acc_copyin_async_64_h_, 
+//GO(acc_copyin_async_array_h_, 
+//GO(acc_copyout, 
+//GO(acc_copyout_32_h_, 
+//GO(acc_copyout_64_h_, 
+//GO(acc_copyout_array_h_, 
+//GO(acc_copyout_async, 
+//GO(acc_copyout_async_32_h_, 
+//GO(acc_copyout_async_64_h_, 
+//GO(acc_copyout_async_array_h_, 
+//GO(acc_copyout_finalize, 
+//GO(acc_copyout_finalize_32_h_, 
+//GO(acc_copyout_finalize_64_h_, 
+//GO(acc_copyout_finalize_array_h_, 
+//GO(acc_copyout_finalize_async, 
+//GO(acc_create, 
+//GO(acc_create_32_h_, 
+//GO(acc_create_64_h_, 
+//GO(acc_create_array_h_, 
+//GO(acc_create_async, 
+//GO(acc_create_async_32_h_, 
+//GO(acc_create_async_64_h_, 
+//GO(acc_create_async_array_h_, 
+//GO(acc_delete, 
+//GO(acc_delete_32_h_, 
+//GO(acc_delete_64_h_, 
+//GO(acc_delete_array_h_, 
+//GO(acc_delete_async, 
+//GO(acc_delete_async_32_h_, 
+//GO(acc_delete_async_64_h_, 
+//GO(acc_delete_async_array_h_, 
+//GO(acc_delete_finalize, 
+//GO(acc_delete_finalize_32_h_, 
+//GO(acc_delete_finalize_64_h_, 
+//GO(acc_delete_finalize_array_h_, 
+//GO(acc_delete_finalize_async, 
+//GO(acc_detach, 
+//GO(acc_detach_async, 
+//GO(acc_detach_finalize, 
+//GO(acc_detach_finalize_async, 
+//GO(acc_deviceptr, 
+//GO(acc_free, 
+//GO(acc_get_cuda_stream, 
+//GO(acc_get_current_cuda_context, 
+//GO(acc_get_current_cuda_device, 
+//GO(acc_get_device_num, 
+//GO(acc_get_device_num_h_, 
+//GO(acc_get_device_type, 
+//GO(acc_get_device_type_h_, 
+//GO(acc_get_num_devices, 
+//GO(acc_get_num_devices_h_, 
+//GO(acc_get_property, 
+//GO(acc_get_property_h_, 
+//GO(acc_get_property_string, 
+//GO(acc_get_property_string_h_, 
+//GO(acc_hostptr, 
+//GO(acc_init, 
+//GO(acc_init_h_, 
+//GO(acc_is_present, 
+//GO(acc_is_present_32_h_, 
+//GO(acc_is_present_64_h_, 
+//GO(acc_is_present_array_h_, 
+//GO(acc_malloc, 
+//GO(acc_map_data, 
+//GO(acc_memcpy_from_device, 
+//GO(acc_memcpy_from_device_async, 
+//GO(acc_memcpy_to_device, 
+//GO(acc_memcpy_to_device_async, 
+//GO(acc_on_device, 
+//GO(acc_on_device_h_, 
+//GO(acc_pcopyin, 
+//GO(acc_pcreate, 
+//GO(acc_present_or_copyin, 
+//GO(acc_present_or_copyin_32_h_, 
+//GO(acc_present_or_copyin_64_h_, 
+//GO(acc_present_or_copyin_array_h_, 
+//GO(acc_present_or_create, 
+//GO(acc_present_or_create_32_h_, 
+//GO(acc_present_or_create_64_h_, 
+//GO(acc_present_or_create_array_h_, 
+//GO(acc_prof_lookup, 
+//GO(acc_prof_register, 
+//GO(acc_prof_unregister, 
+//GO(acc_register_library, 
+//GO(acc_set_cuda_stream, 
+//GO(acc_set_device_num, 
+//GO(acc_set_device_num_h_, 
+//GO(acc_set_device_type, 
+//GO(acc_set_device_type_h_, 
+//GO(acc_shutdown, 
+//GO(acc_shutdown_h_, 
+//GO(acc_unmap_data, 
+//GO(acc_update_device, 
+//GO(acc_update_device_32_h_, 
+//GO(acc_update_device_64_h_, 
+//GO(acc_update_device_array_h_, 
+//GO(acc_update_device_async, 
+//GO(acc_update_device_async_32_h_, 
+//GO(acc_update_device_async_64_h_, 
+//GO(acc_update_device_async_array_h_, 
+//GO(acc_update_self, 
+//GO(acc_update_self_32_h_, 
+//GO(acc_update_self_64_h_, 
+//GO(acc_update_self_array_h_, 
+//GO(acc_update_self_async, 
+//GO(acc_update_self_async_32_h_, 
+//GO(acc_update_self_async_64_h_, 
+//GO(acc_update_self_async_array_h_, 
+//GO(acc_wait, 
+//GO(acc_wait_all, 
+//GO(acc_wait_all_async, 
+//GO(acc_wait_all_async_h_, 
+//GO(acc_wait_all_h_, 
+//GO(acc_wait_async, 
+//GO(acc_wait_async_h_, 
+//GO(acc_wait_h_, 
+
+//GO(GOMP_alloc, 
+//GO(GOMP_atomic_end, 
+//GO(GOMP_atomic_start, 
+//GO(GOMP_barrier, 
+//GO(GOMP_barrier_cancel, 
+//GO(GOMP_cancel, 
+//GO(GOMP_cancellation_point, 
+//GO(GOMP_critical_end, 
+//GO(GOMP_critical_name_end, 
+//GO(GOMP_critical_name_start, 
+//GO(GOMP_critical_start, 
+//GO(GOMP_doacross_post, 
+//GO(GOMP_doacross_ull_post, 
+//GO(GOMP_doacross_ull_wait, 
+//GO(GOMP_doacross_wait, 
+//GO(GOMP_error, 
+//GO(GOMP_free, 
+//GO(GOMP_loop_doacross_dynamic_start, 
+//GO(GOMP_loop_doacross_guided_start, 
+//GO(GOMP_loop_doacross_runtime_start, 
+//GO(GOMP_loop_doacross_start, 
+//GO(GOMP_loop_doacross_static_start, 
+//GO(GOMP_loop_dynamic_next, 
+//GO(GOMP_loop_dynamic_start, 
+//GO(GOMP_loop_end, 
+//GO(GOMP_loop_end_cancel, 
+//GO(GOMP_loop_end_nowait, 
+//GO(GOMP_loop_guided_next, 
+//GO(GOMP_loop_guided_start, 
+//GO(GOMP_loop_maybe_nonmonotonic_runtime_next, 
+//GO(GOMP_loop_maybe_nonmonotonic_runtime_start, 
+//GO(GOMP_loop_nonmonotonic_dynamic_next, 
+//GO(GOMP_loop_nonmonotonic_dynamic_start, 
+//GO(GOMP_loop_nonmonotonic_guided_next, 
+//GO(GOMP_loop_nonmonotonic_guided_start, 
+//GO(GOMP_loop_nonmonotonic_runtime_next, 
+//GO(GOMP_loop_nonmonotonic_runtime_start, 
+//GO(GOMP_loop_ordered_dynamic_next, 
+//GO(GOMP_loop_ordered_dynamic_start, 
+//GO(GOMP_loop_ordered_guided_next, 
+//GO(GOMP_loop_ordered_guided_start, 
+//GO(GOMP_loop_ordered_runtime_next, 
+//GO(GOMP_loop_ordered_runtime_start, 
+//GO(GOMP_loop_ordered_start, 
+//GO(GOMP_loop_ordered_static_next, 
+//GO(GOMP_loop_ordered_static_start, 
+//GO(GOMP_loop_runtime_next, 
+//GO(GOMP_loop_runtime_start, 
+//GO(GOMP_loop_start, 
+//GO(GOMP_loop_static_next, 
+//GO(GOMP_loop_static_start, 
+//GO(GOMP_loop_ull_doacross_dynamic_start, 
+//GO(GOMP_loop_ull_doacross_guided_start, 
+//GO(GOMP_loop_ull_doacross_runtime_start, 
+//GO(GOMP_loop_ull_doacross_start, 
+//GO(GOMP_loop_ull_doacross_static_start, 
+//GO(GOMP_loop_ull_dynamic_next, 
+//GO(GOMP_loop_ull_dynamic_start, 
+//GO(GOMP_loop_ull_guided_next, 
+//GO(GOMP_loop_ull_guided_start, 
+//GO(GOMP_loop_ull_maybe_nonmonotonic_runtime_next, 
+//GO(GOMP_loop_ull_maybe_nonmonotonic_runtime_start, 
+//GO(GOMP_loop_ull_nonmonotonic_dynamic_next, 
+//GO(GOMP_loop_ull_nonmonotonic_dynamic_start, 
+//GO(GOMP_loop_ull_nonmonotonic_guided_next, 
+//GO(GOMP_loop_ull_nonmonotonic_guided_start, 
+//GO(GOMP_loop_ull_nonmonotonic_runtime_next, 
+//GO(GOMP_loop_ull_nonmonotonic_runtime_start, 
+//GO(GOMP_loop_ull_ordered_dynamic_next, 
+//GO(GOMP_loop_ull_ordered_dynamic_start, 
+//GO(GOMP_loop_ull_ordered_guided_next, 
+//GO(GOMP_loop_ull_ordered_guided_start, 
+//GO(GOMP_loop_ull_ordered_runtime_next, 
+//GO(GOMP_loop_ull_ordered_runtime_start, 
+//GO(GOMP_loop_ull_ordered_start, 
+//GO(GOMP_loop_ull_ordered_static_next, 
+//GO(GOMP_loop_ull_ordered_static_start, 
+//GO(GOMP_loop_ull_runtime_next, 
+//GO(GOMP_loop_ull_runtime_start, 
+//GO(GOMP_loop_ull_start, 
+//GO(GOMP_loop_ull_static_next, 
+//GO(GOMP_loop_ull_static_start, 
+//GO(GOMP_offload_register, 
+//GO(GOMP_offload_register_ver, 
+//GO(GOMP_offload_unregister, 
+//GO(GOMP_offload_unregister_ver, 
+//GO(GOMP_ordered_end, 
+//GO(GOMP_ordered_start, 
+//GO(GOMP_parallel, 
+//GO(GOMP_parallel_end, 
+//GO(GOMP_parallel_loop_dynamic, 
+//GO(GOMP_parallel_loop_dynamic_start, 
+//GO(GOMP_parallel_loop_guided, 
+//GO(GOMP_parallel_loop_guided_start, 
+//GO(GOMP_parallel_loop_maybe_nonmonotonic_runtime, 
+//GO(GOMP_parallel_loop_nonmonotonic_dynamic, 
+//GO(GOMP_parallel_loop_nonmonotonic_guided, 
+//GO(GOMP_parallel_loop_nonmonotonic_runtime, 
+//GO(GOMP_parallel_loop_runtime, 
+//GO(GOMP_parallel_loop_runtime_start, 
+//GO(GOMP_parallel_loop_static, 
+//GO(GOMP_parallel_loop_static_start, 
+//GO(GOMP_parallel_reductions, 
+//GO(GOMP_parallel_sections, 
+//GO(GOMP_parallel_sections_start, 
+//GO(GOMP_parallel_start, 
+//GO(GOMP_PLUGIN_acc_default_dim, 
+//GO(GOMP_PLUGIN_acc_thread, 
+//GO(GOMP_PLUGIN_async_unmap_vars, 
+//GO(GOMP_PLUGIN_debug, 
+//GO(GOMP_PLUGIN_error, 
+//GO(GOMP_PLUGIN_fatal, 
+//GO(GOMP_PLUGIN_goacc_profiling_dispatch, 
+//GO(GOMP_PLUGIN_goacc_thread, 
+//GO(GOMP_PLUGIN_malloc, 
+//GO(GOMP_PLUGIN_malloc_cleared, 
+//GO(GOMP_PLUGIN_realloc, 
+//GO(GOMP_PLUGIN_target_rev, 
+//GO(GOMP_PLUGIN_target_task_completion, 
+//GO(GOMP_scope_start, 
+//GO(GOMP_sections2_start, 
+//GO(GOMP_sections_end, 
+//GO(GOMP_sections_end_cancel, 
+//GO(GOMP_sections_end_nowait, 
+//GO(GOMP_sections_next, 
+//GO(GOMP_sections_start, 
+//GO(GOMP_single_copy_end, 
+//GO(GOMP_single_copy_start, 
+//GO(GOMP_single_start, 
+//GO(GOMP_target, 
+//GO(GOMP_target_data, 
+//GO(GOMP_target_data_ext, 
+//GO(GOMP_target_end_data, 
+//GO(GOMP_target_enter_exit_data, 
+//GO(GOMP_target_ext, 
+//GO(GOMP_target_update, 
+//GO(GOMP_target_update_ext, 
+//GO(GOMP_task, 
+//GO(GOMP_taskgroup_end, 
+//GO(GOMP_taskgroup_reduction_register, 
+//GO(GOMP_taskgroup_reduction_unregister, 
+//GO(GOMP_taskgroup_start, 
+//GO(GOMP_taskloop, 
+//GO(GOMP_taskloop_ull, 
+//GO(GOMP_task_reduction_remap, 
+//GO(GOMP_taskwait, 
+//GO(GOMP_taskwait_depend, 
+//GO(GOMP_taskwait_depend_nowait, 
+//GO(GOMP_taskyield, 
+//GO(GOMP_teams, 
+//GO(GOMP_teams4, 
+//GO(GOMP_teams_reg, 
+//GO(GOMP_warning, 
+//GO(GOMP_workshare_task_reduction_unregister, 
+
+//GO(omp_aligned_alloc, 
+//GO(omp_aligned_calloc, 
+//GO(omp_alloc, 
+//GO(omp_calloc, 
+//GO(omp_capture_affinity, 
+//GO(omp_capture_affinity_, 
+//GO(omp_destroy_allocator, 
+//GO(omp_destroy_allocator_, 
+//GO(omp_destroy_lock@OMP_1.0
+//GO(omp_destroy_lock, 
+//GO(omp_destroy_lock_, 
+//GO(omp_destroy_lock_@OMP_1.0
+//GO(omp_destroy_nest_lock@OMP_1.0
+//GO(omp_destroy_nest_lock, 
+//GO(omp_destroy_nest_lock_, 
+//GO(omp_destroy_nest_lock_@OMP_1.0
+//GO(omp_display_affinity, 
+//GO(omp_display_affinity_, 
+//GO(omp_display_env, 
+//GO(omp_display_env_, 
+//GO(omp_display_env_8_, 
+//GO(omp_free, 
+//GO(omp_fulfill_event, 
+//GO(omp_fulfill_event_, 
+//GO(omp_get_active_level, 
+//GO(omp_get_active_level_, 
+//GO(omp_get_affinity_format, 
+//GO(omp_get_affinity_format_, 
+//GO(omp_get_ancestor_thread_num, 
+//GO(omp_get_ancestor_thread_num_, 
+//GO(omp_get_ancestor_thread_num_8_, 
+//GO(omp_get_cancellation, 
+//GO(omp_get_cancellation_, 
+//GO(omp_get_default_allocator, 
+//GO(omp_get_default_allocator_, 
+//GO(omp_get_default_device, 
+//GO(omp_get_default_device_, 
+//GO(omp_get_device_num, 
+//GO(omp_get_device_num_, 
+//GO(omp_get_dynamic, 
+//GO(omp_get_dynamic_, 
+//GO(omp_get_initial_device, 
+//GO(omp_get_initial_device_, 
+//GO(omp_get_level, 
+//GO(omp_get_level_, 
+//GO(omp_get_mapped_ptr, 
+//GO(omp_get_max_active_levels, 
+//GO(omp_get_max_active_levels_, 
+//GO(omp_get_max_task_priority, 
+//GO(omp_get_max_task_priority_, 
+//GO(omp_get_max_teams, 
+//GO(omp_get_max_teams_, 
+//GO(omp_get_max_threads, 
+//GO(omp_get_max_threads_, 
+//GO(omp_get_nested, 
+//GO(omp_get_nested_, 
+//GO(omp_get_num_devices, 
+//GO(omp_get_num_devices_, 
+//GO(omp_get_num_places, 
+//GO(omp_get_num_places_, 
+//GO(omp_get_num_procs, 
+//GO(omp_get_num_procs_, 
+//GO(omp_get_num_teams, 
+//GO(omp_get_num_teams_, 
+//GO(omp_get_num_threads, 
+//GO(omp_get_num_threads_, 
+//GO(omp_get_partition_num_places, 
+//GO(omp_get_partition_num_places_, 
+//GO(omp_get_partition_place_nums, 
+//GO(omp_get_partition_place_nums_, 
+//GO(omp_get_partition_place_nums_8_, 
+//GO(omp_get_place_num, 
+//GO(omp_get_place_num_, 
+//GO(omp_get_place_num_procs, 
+//GO(omp_get_place_num_procs_, 
+//GO(omp_get_place_num_procs_8_, 
+//GO(omp_get_place_proc_ids, 
+//GO(omp_get_place_proc_ids_, 
+//GO(omp_get_place_proc_ids_8_, 
+//GO(omp_get_proc_bind, 
+//GO(omp_get_proc_bind_, 
+//GO(omp_get_schedule, 
+//GO(omp_get_schedule_, 
+//GO(omp_get_schedule_8_, 
+//GO(omp_get_supported_active_levels, 
+//GO(omp_get_supported_active_levels_, 
+//GO(omp_get_team_num, 
+//GO(omp_get_team_num_, 
+//GO(omp_get_team_size, 
+//GO(omp_get_team_size_, 
+//GO(omp_get_team_size_8_, 
+//GO(omp_get_teams_thread_limit, 
+//GO(omp_get_teams_thread_limit_, 
+//GO(omp_get_thread_limit, 
+//GO(omp_get_thread_limit_, 
+//GO(omp_get_thread_num, 
+//GO(omp_get_thread_num_, 
+//GO(omp_get_wtick, 
+//GO(omp_get_wtick_, 
+//GO(omp_get_wtime, 
+//GO(omp_get_wtime_, 
+//GO(omp_in_explicit_task, 
+//GO(omp_in_explicit_task_, 
+//GO(omp_in_final, 
+//GO(omp_in_final_, 
+//GO(omp_init_allocator, 
+//GO(omp_init_allocator_, 
+//GO(omp_init_allocator_8_, 
+//GO(omp_init_lock, 
+//GO(omp_init_lock@OMP_1.0
+//GO(omp_init_lock_, 
+//GO(omp_init_lock_@OMP_1.0
+//GO(omp_init_nest_lock, 
+//GO(omp_init_nest_lock@OMP_1.0
+//GO(omp_init_nest_lock_, 
+//GO(omp_init_nest_lock_@OMP_1.0
+//GO(omp_in_parallel, 
+//GO(omp_in_parallel_, 
+//GO(omp_is_initial_device, 
+//GO(omp_is_initial_device_, 
+//GO(omp_pause_resource, 
+//GO(omp_pause_resource_, 
+//GO(omp_pause_resource_all, 
+//GO(omp_pause_resource_all_, 
+//GO(omp_realloc, 
+//GO(omp_set_affinity_format, 
+//GO(omp_set_affinity_format_, 
+//GO(omp_set_default_allocator, 
+//GO(omp_set_default_allocator_, 
+//GO(omp_set_default_device, 
+//GO(omp_set_default_device_, 
+//GO(omp_set_default_device_8_, 
+//GO(omp_set_dynamic, 
+//GO(omp_set_dynamic_, 
+//GO(omp_set_dynamic_8_, 
+//GO(omp_set_lock, 
+//GO(omp_set_lock@OMP_1.0
+//GO(omp_set_lock_, 
+//GO(omp_set_lock_@OMP_1.0
+//GO(omp_set_max_active_levels, 
+//GO(omp_set_max_active_levels_, 
+//GO(omp_set_max_active_levels_8_, 
+//GO(omp_set_nested, 
+//GO(omp_set_nested_, 
+//GO(omp_set_nested_8_, 
+//GO(omp_set_nest_lock@OMP_1.0
+//GO(omp_set_nest_lock, 
+//GO(omp_set_nest_lock_, 
+//GO(omp_set_nest_lock_@OMP_1.0
+//GO(omp_set_num_teams, 
+//GO(omp_set_num_teams_, 
+//GO(omp_set_num_teams_8_, 
+//GO(omp_set_num_threads, 
+//GO(omp_set_num_threads_, 
+//GO(omp_set_num_threads_8_, 
+//GO(omp_set_schedule, 
+//GO(omp_set_schedule_, 
+//GO(omp_set_schedule_8_, 
+//GO(omp_set_teams_thread_limit, 
+//GO(omp_set_teams_thread_limit_, 
+//GO(omp_set_teams_thread_limit_8_, 
+//GO(omp_target_alloc, 
+//GO(omp_target_associate_ptr, 
+//GO(omp_target_disassociate_ptr, 
+//GO(omp_target_free, 
+//GO(omp_target_is_accessible, 
+//GO(omp_target_is_present, 
+//GO(omp_target_memcpy, 
+//GO(omp_target_memcpy_async, 
+//GO(omp_target_memcpy_rect, 
+//GO(omp_target_memcpy_rect_async, 
+//GO(omp_test_lock@OMP_1.0
+//GO(omp_test_lock, 
+//GO(omp_test_lock_, 
+//GO(omp_test_lock_@OMP_1.0
+//GO(omp_test_nest_lock@OMP_1.0
+//GO(omp_test_nest_lock, 
+//GO(omp_test_nest_lock_@OMP_1.0
+//GO(omp_test_nest_lock_, 
+//GO(omp_unset_lock, 
+//GO(omp_unset_lock@OMP_1.0
+//GO(omp_unset_lock_@OMP_1.0
+//GO(omp_unset_lock_, 
+//GO(omp_unset_nest_lock, 
+//GO(omp_unset_nest_lock@OMP_1.0
+//GO(omp_unset_nest_lock_, 
+//GO(omp_unset_nest_lock_@OMP_1.0
+
diff --git a/src/wrapped/wrappedgstbase_private.h b/src/wrapped/wrappedgstbase_private.h
index facb23f6..f203a1b5 100644
--- a/src/wrapped/wrappedgstbase_private.h
+++ b/src/wrapped/wrappedgstbase_private.h
@@ -370,7 +370,7 @@ GO(gst_queue_array_push_tail_struct, vFpp)
 //GO(gst_type_find_helper_for_buffer, 
 //GO(gst_type_find_helper_for_buffer_with_extension, 
 //GO(gst_type_find_helper_for_data, 
-//GO(gst_type_find_helper_for_data_with_extension, 
+GO(gst_type_find_helper_for_data_with_extension, pFppLpp)
 //GO(gst_type_find_helper_for_extension, 
 //GO(gst_type_find_helper_get_range, 
 //GO(gst_type_find_helper_get_range_full, 
diff --git a/src/wrapped/wrappedgstreamer.c b/src/wrapped/wrappedgstreamer.c
index 7c22cc6c..8a279866 100644
--- a/src/wrapped/wrappedgstreamer.c
+++ b/src/wrapped/wrappedgstreamer.c
@@ -32,6 +32,7 @@ typedef int     (*iFpp_t)(void*, void*);
 #define ADDED_FUNCTIONS()                   \
     GO(gst_object_get_type, LFv_t)          \
     GO(gst_allocator_get_type, LFv_t)       \
+    GO(gst_task_pool_get_type, LFv_t)       \
     GO(gst_structure_new_valist, pFppA_t)   \
     GO(gst_structure_new_empty, pFp_t)      \
     GO(gst_caps_new_empty, pFv_t)           \
@@ -50,10 +51,10 @@ GO(3)   \
 
 // GDestroyFunc ...
 #define GO(A)   \
-static uintptr_t my_destroyfunc_fct_##A = 0;   \
-static int my_destroyfunc_##A(void* a, void* b)     \
-{                                       \
-    return RunFunction(my_context, my_destroyfunc_fct_##A, 2, a, b);\
+static uintptr_t my_destroyfunc_fct_##A = 0;                                \
+static int my_destroyfunc_##A(void* a, void* b)                             \
+{                                                                           \
+    return RunFunctionFmt(my_destroyfunc_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -74,10 +75,10 @@ static void* findDestroyFct(void* fct)
 }
 //GstPadActivateModeFunction
 #define GO(A)   \
-static uintptr_t my_GstPadActivateModeFunction_fct_##A = 0;                                     \
-static int my_GstPadActivateModeFunction_##A(void* a, void* b, int c, int d)                    \
-{                                                                                               \
-    return (int)RunFunction(my_context, my_GstPadActivateModeFunction_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_GstPadActivateModeFunction_fct_##A = 0;                                             \
+static int my_GstPadActivateModeFunction_##A(void* a, void* b, int c, int d)                            \
+{                                                                                                       \
+    return (int)RunFunctionFmt(my_GstPadActivateModeFunction_fct_##A, "ppii", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -97,10 +98,10 @@ static void* findGstPadActivateModeFunctionFct(void* fct)
 }
 //GstPadQueryFunction
 #define GO(A)   \
-static uintptr_t my_GstPadQueryFunction_fct_##A = 0;                                    \
-static int my_GstPadQueryFunction_##A(void* a, void* b, void* c)                        \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GstPadQueryFunction_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GstPadQueryFunction_fct_##A = 0;                                        \
+static int my_GstPadQueryFunction_##A(void* a, void* b, void* c)                            \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GstPadQueryFunction_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -120,10 +121,10 @@ static void* findGstPadQueryFunctionFct(void* fct)
 }
 //GstPadGetRangeFunction
 #define GO(A)   \
-static uintptr_t my_GstPadGetRangeFunction_fct_##A = 0;                                         \
-static int my_GstPadGetRangeFunction_##A(void* a, void* b, uint64_t c, uint32_t d, void* e)     \
-{                                                                                               \
-    return (int)RunFunction(my_context, my_GstPadGetRangeFunction_fct_##A, 5, a, b, c, d, e);   \
+static uintptr_t my_GstPadGetRangeFunction_fct_##A = 0;                                                 \
+static int my_GstPadGetRangeFunction_##A(void* a, void* b, uint64_t c, uint32_t d, void* e)             \
+{                                                                                                       \
+    return (int)RunFunctionFmt(my_GstPadGetRangeFunction_fct_##A, "ppUup", a, b, c, d, e);  \
 }
 SUPER()
 #undef GO
@@ -143,10 +144,10 @@ static void* findGstPadGetRangeFunctionFct(void* fct)
 }
 //GstPadChainFunction
 #define GO(A)   \
-static uintptr_t my_GstPadChainFunction_fct_##A = 0;                                    \
-static int my_GstPadChainFunction_##A(void* a, void* b, void* c)                        \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GstPadChainFunction_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GstPadChainFunction_fct_##A = 0;                                        \
+static int my_GstPadChainFunction_##A(void* a, void* b, void* c)                            \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GstPadChainFunction_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -166,10 +167,10 @@ static void* findGstPadChainFunctionFct(void* fct)
 }
 //GstPadEventFunction
 #define GO(A)   \
-static uintptr_t my_GstPadEventFunction_fct_##A = 0;                                    \
-static int my_GstPadEventFunction_##A(void* a, void* b, void* c)                        \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GstPadEventFunction_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GstPadEventFunction_fct_##A = 0;                                        \
+static int my_GstPadEventFunction_##A(void* a, void* b, void* c)                            \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GstPadEventFunction_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -187,10 +188,10 @@ static void* findGstPadEventFunctionFct(void* fct)
 }
 //GstBusSyncHandler
 #define GO(A)   \
-static uintptr_t my_GstBusSyncHandler_fct_##A = 0;                                    \
-static int my_GstBusSyncHandler_##A(void* a, void* b, void* c)                        \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GstBusSyncHandler_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GstBusSyncHandler_fct_##A = 0;                                          \
+static int my_GstBusSyncHandler_##A(void* a, void* b, void* c)                              \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GstBusSyncHandler_fct_##A, "ppp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -209,10 +210,10 @@ static void* findGstBusSyncHandlerFct(void* fct)
 
 //GstPluginFeatureFilter
 #define GO(A)   \
-static uintptr_t my_GstPluginFeatureFilter_fct_##A = 0;                                 \
-static int my_GstPluginFeatureFilter_##A(void* a, void* b)                              \
-{                                                                                       \
-    return (int)RunFunction(my_context, my_GstPluginFeatureFilter_fct_##A, 2, a, b);    \
+static uintptr_t my_GstPluginFeatureFilter_fct_##A = 0;                                     \
+static int my_GstPluginFeatureFilter_##A(void* a, void* b)                                  \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_GstPluginFeatureFilter_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -229,6 +230,28 @@ static void* findGstPluginFeatureFilterFct(void* fct)
     return NULL;
 }
 
+//GstCapsFilterMapFunc
+#define GO(A)   \
+static uintptr_t my_GstCapsFilterMapFunc_fct_##A = 0;                                           \
+static int my_GstCapsFilterMapFunc_##A(void* a, void* b, void* c)                               \
+{                                                                                               \
+    return (int)RunFunctionFmt(my_GstCapsFilterMapFunc_fct_##A, "ppp", a, b, c);    \
+}
+SUPER()
+#undef GO
+static void* findGstCapsFilterMapFuncFct(void* fct)
+{
+    if(!fct) return fct;
+    #define GO(A) if(my_GstCapsFilterMapFunc_fct_##A == (uintptr_t)fct) return my_GstCapsFilterMapFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GstCapsFilterMapFunc_fct_##A == 0) {my_GstCapsFilterMapFunc_fct_##A = (uintptr_t)fct; return my_GstCapsFilterMapFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for gstreamer GstCapsFilterMapFunc callback\n");
+    return NULL;
+}
+
 #undef SUPER
 
 EXPORT void my_gst_caps_set_simple(x64emu_t* emu, void* caps, void* field, void* b) {
@@ -332,7 +355,7 @@ EXPORT void* my_gst_buffer_new_wrapped_full(x64emu_t* emu, uint32_t f, void* dat
 
 EXPORT void* my_gst_structure_new(x64emu_t* emu, void* name, void* first, uint64_t* b)
 {
-    if(!first)    
+    if(!first)
         return my->gst_structure_new_empty(name);
     CREATE_VALIST_FROM_VAARG(b, emu->scratch, 2);
     return my->gst_structure_new_valist(name, first, VARARGS);
@@ -362,6 +385,11 @@ EXPORT void* my_gst_registry_feature_filter(x64emu_t* emu, void* reg, void* filt
     return my->gst_registry_feature_filter(reg, findGstPluginFeatureFilterFct(filter), first, data);
 }
 
+EXPORT int my_gst_caps_foreach(x64emu_t* emu, void* caps, void* f, void* data)
+{
+    return my->gst_caps_foreach(caps, findGstCapsFilterMapFuncFct(f), data);
+}
+
 #define PRE_INIT    \
     if(box64_nogtk) \
         return -1;
@@ -370,6 +398,7 @@ EXPORT void* my_gst_registry_feature_filter(x64emu_t* emu, void* reg, void* filt
     getMy(lib);     \
     SetGstObjectID(my->gst_object_get_type());                 \
     SetGstAllocatorID(my->gst_allocator_get_type());           \
+    SetGstTaskPoolID(my->gst_task_pool_get_type());            \
     setNeededLibs(lib, 1, "libgtk-3.so.0");
 
 #define CUSTOM_FINI \
diff --git a/src/wrapped/wrappedgstreamer_private.h b/src/wrapped/wrappedgstreamer_private.h
index aad6a81c..cd6bfd61 100644
--- a/src/wrapped/wrappedgstreamer_private.h
+++ b/src/wrapped/wrappedgstreamer_private.h
@@ -212,7 +212,7 @@ GO(gst_caps_features_to_string, pFp)
 //GO(gst_caps_filter_and_map_in_place, 
 GO(gst_caps_fixate, pFp)
 GO(gst_caps_flags_get_type, pFv)
-//GOM(gst_caps_foreach, iFEpBp)
+GOM(gst_caps_foreach, iFEppp)
 GO(gst_caps_from_string, pFp)
 GO(gst_caps_get_features, pFpu)
 GO(gst_caps_get_size, uFp)
@@ -895,7 +895,7 @@ GO(gst_meta_api_type_register, LFpp)
 //DATAB(_gst_meta_tag_memory, 
 //DATAB(_gst_meta_transform_copy, 
 //GO(gst_mini_object_add_parent, 
-//GO(gst_mini_object_copy, 
+GO(gst_mini_object_copy, pFp)
 //GO(gst_mini_object_flags_get_type, 
 GO(gst_mini_object_get_qdata, pFpp)
 //GO(gst_mini_object_init, 
@@ -1371,17 +1371,17 @@ GO(gst_stream_collection_new, pFp)
 //GO(gst_stream_error_get_type, 
 //GO(gst_stream_error_quark, 
 //GO(gst_stream_flags_get_type, 
-//GO(gst_stream_get_caps, 
+GO(gst_stream_get_caps, pFp)
 GO(gst_stream_get_stream_flags, uFp)
 GO(gst_stream_get_stream_id, pFp)
 GO(gst_stream_get_stream_type, uFp)
-//GO(gst_stream_get_tags, 
+GO(gst_stream_get_tags, pFp)
 //GO(gst_stream_get_type, 
-//GO(gst_stream_new, 
-//GO(gst_stream_set_caps, 
+GO(gst_stream_new, pFppuu)
+GO(gst_stream_set_caps, vFpp)
 GO(gst_stream_set_stream_flags, vFpu)
 GO(gst_stream_set_stream_type, vFpu)
-//GO(gst_stream_set_tags, 
+GO(gst_stream_set_tags, vFpp)
 //GO(gst_stream_status_type_get_type, 
 GO(gst_stream_type_get_name, pFu)
 //GO(gst_stream_type_get_type, 
@@ -1545,21 +1545,21 @@ GO(gst_tag_setter_set_tag_merge_mode, vFpu)
 //GO(gst_task_cleanup_all, 
 //GO(gst_task_get_pool, 
 //GO(gst_task_get_state, 
-//GO(gst_task_get_type, 
+GO(gst_task_get_type, pFv)
 //GO(gst_task_join, 
 //GO(gst_task_new, 
 //GO(gst_task_pause, 
-//GO(gst_task_pool_cleanup, 
-//GO(gst_task_pool_get_type, 
+GO(gst_task_pool_cleanup, vFp)
+GO(gst_task_pool_get_type, pFv)
 //GO(gst_task_pool_join, 
 //GO(gst_task_pool_new, 
-//GO(gst_task_pool_prepare, 
+GO(gst_task_pool_prepare, vFp)
 //GO(gst_task_pool_push, 
 //GO(gst_task_resume, 
 //GO(gst_task_set_enter_callback, 
 //GO(gst_task_set_leave_callback, 
 //GO(gst_task_set_lock, 
-//GO(gst_task_set_pool, 
+GO(gst_task_set_pool, vFpp)
 //GO(gst_task_set_state, 
 //GO(gst_task_start, 
 //GO(gst_task_state_get_type, 
diff --git a/src/wrapped/wrappedgtk3.c b/src/wrapped/wrappedgtk3.c
index b2e459d1..87a7bd7a 100644
--- a/src/wrapped/wrappedgtk3.c
+++ b/src/wrapped/wrappedgtk3.c
@@ -99,10 +99,10 @@ GO(3)
 
 // GtkMenuDetachFunc
 #define GO(A)   \
-static uintptr_t my_menudetach_fct_##A = 0;   \
-static void my_menudetach_##A(void* widget, void* menu)     \
-{                                       \
-    RunFunction(my_context, my_menudetach_fct_##A, 2, widget, menu);\
+static uintptr_t my_menudetach_fct_##A = 0;                                 \
+static void my_menudetach_##A(void* widget, void* menu)                     \
+{                                                                           \
+    RunFunctionFmt(my_menudetach_fct_##A, "pp", widget, menu);        \
 }
 SUPER()
 #undef GO
@@ -122,10 +122,10 @@ static void* findMenuDetachFct(void* fct)
 
 // GtkMenuPositionFunc
 #define GO(A)   \
-static uintptr_t my_menuposition_fct_##A = 0;   \
-static void my_menuposition_##A(void* menu, void* x, void* y, void* push_in, void* data)     \
-{                                       \
-    RunFunction(my_context, my_menuposition_fct_##A, 5, menu, x, y, push_in, data);\
+static uintptr_t my_menuposition_fct_##A = 0;                                                   \
+static void my_menuposition_##A(void* menu, void* x, void* y, void* push_in, void* data)        \
+{                                                                                               \
+    RunFunctionFmt(my_menuposition_fct_##A, "ppppp", menu, x, y, push_in, data);          \
 }
 SUPER()
 #undef GO
@@ -145,10 +145,10 @@ static void* findMenuPositionFct(void* fct)
 
 // GtkFunction
 #define GO(A)   \
-static uintptr_t my3_gtkfunction_fct_##A = 0;   \
-static int my3_gtkfunction_##A(void* data)     \
-{                                       \
-    return RunFunction(my_context, my3_gtkfunction_fct_##A, 1, data);\
+static uintptr_t my3_gtkfunction_fct_##A = 0;                               \
+static int my3_gtkfunction_##A(void* data)                                  \
+{                                                                           \
+    return RunFunctionFmt(my3_gtkfunction_fct_##A, "p", data);        \
 }
 SUPER()
 #undef GO
@@ -168,10 +168,10 @@ static void* findGtkFunctionFct(void* fct)
 
 // GtkClipboardGetFunc
 #define GO(A)   \
-static uintptr_t my_clipboardget_fct_##A = 0;   \
-static void my_clipboardget_##A(void* clipboard, void* selection, uint32_t info, void* data)     \
-{                                       \
-    RunFunction(my_context, my_clipboardget_fct_##A, 4, clipboard, selection, info, data);\
+static uintptr_t my_clipboardget_fct_##A = 0;                                                       \
+static void my_clipboardget_##A(void* clipboard, void* selection, uint32_t info, void* data)        \
+{                                                                                                   \
+    RunFunctionFmt(my_clipboardget_fct_##A, "ppup", clipboard, selection, info, data);        \
 }
 SUPER()
 #undef GO
@@ -191,10 +191,10 @@ static void* findClipboadGetFct(void* fct)
 
 // GtkClipboardClearFunc
 #define GO(A)   \
-static uintptr_t my_clipboardclear_fct_##A = 0;   \
-static void my_clipboardclear_##A(void* clipboard, void* data)     \
-{                                       \
-    RunFunction(my_context, my_clipboardclear_fct_##A, 2, clipboard, data);\
+static uintptr_t my_clipboardclear_fct_##A = 0;                                     \
+static void my_clipboardclear_##A(void* clipboard, void* data)                      \
+{                                                                                   \
+    RunFunctionFmt(my_clipboardclear_fct_##A, "pp", clipboard, data);         \
 }
 SUPER()
 #undef GO
@@ -213,11 +213,11 @@ static void* findClipboadClearFct(void* fct)
 }
 
 // GtkCallback
-#define GO(A)   \
-static uintptr_t my3_gtkcallback_fct_##A = 0;   \
-static void my3_gtkcallback_##A(void* widget, void* data)     \
-{                                       \
-    RunFunction(my_context, my3_gtkcallback_fct_##A, 2, widget, data);\
+#define GO(A)                                                                   \
+static uintptr_t my3_gtkcallback_fct_##A = 0;                                   \
+static void my3_gtkcallback_##A(void* widget, void* data)                       \
+{                                                                               \
+    RunFunctionFmt(my3_gtkcallback_fct_##A, "pp", widget, data);          \
 }
 SUPER()
 #undef GO
@@ -237,10 +237,10 @@ static void* findGtkCallbackFct(void* fct)
 
 // GtkTextCharPredicate
 #define GO(A)   \
-static uintptr_t my_textcharpredicate_fct_##A = 0;   \
-static int my_textcharpredicate_##A(uint32_t ch, void* data)     \
-{                                       \
-    return (int)RunFunction(my_context, my_textcharpredicate_fct_##A, 2, ch, data);\
+static uintptr_t my_textcharpredicate_fct_##A = 0;                                          \
+static int my_textcharpredicate_##A(uint32_t ch, void* data)                                \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_textcharpredicate_fct_##A, "up", ch, data);         \
 }
 SUPER()
 #undef GO
@@ -260,10 +260,10 @@ static void* findGtkTextCharPredicateFct(void* fct)
 
 // Toolbar
 #define GO(A)   \
-static uintptr_t my_toolbar_fct_##A = 0;   \
-static void my_toolbar_##A(void* widget, void* data)     \
-{                                       \
-    RunFunction(my_context, my_toolbar_fct_##A, 2, widget, data);\
+static uintptr_t my_toolbar_fct_##A = 0;                                \
+static void my_toolbar_##A(void* widget, void* data)                    \
+{                                                                       \
+    RunFunctionFmt(my_toolbar_fct_##A, "pp", widget, data);       \
 }
 SUPER()
 #undef GO
@@ -283,10 +283,10 @@ static void* findToolbarFct(void* fct)
 
 // Builder
 #define GO(A)   \
-static uintptr_t my_builderconnect_fct_##A = 0;   \
-static void my_builderconnect_##A(void* builder, void* object, void* signal, void* handler, void* connect, int flags, void* data)     \
-{                                       \
-    RunFunction(my_context, my_builderconnect_fct_##A, 7, builder, object, signal, handler, connect, flags, data);\
+static uintptr_t my_builderconnect_fct_##A = 0;                                                                                     \
+static void my_builderconnect_##A(void* builder, void* object, void* signal, void* handler, void* connect, int flags, void* data)   \
+{                                                                                                                                   \
+    RunFunctionFmt(my_builderconnect_fct_##A, "pppppip", builder, object, signal, handler, connect, flags, data);             \
 }
 SUPER()
 #undef GO
@@ -306,10 +306,10 @@ static void* findBuilderConnectFct(void* fct)
 
 // GtkTreeViewSearchEqualFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeViewSearchEqualFunc_fct_##A = 0;                                                     \
-static int my_GtkTreeViewSearchEqualFunc_##A(void* model, int column, void* key, void* iter, void* data)        \
-{                                                                                                               \
-    return RunFunction(my_context, my_GtkTreeViewSearchEqualFunc_fct_##A, 5, model, column, key, iter, data);   \
+static uintptr_t my_GtkTreeViewSearchEqualFunc_fct_##A = 0;                                                             \
+static int my_GtkTreeViewSearchEqualFunc_##A(void* model, int column, void* key, void* iter, void* data)                \
+{                                                                                                                       \
+    return RunFunctionFmt(my_GtkTreeViewSearchEqualFunc_fct_##A, "pippp", model, column, key, iter, data);        \
 }
 SUPER()
 #undef GO
@@ -328,10 +328,10 @@ static void* findGtkTreeViewSearchEqualFuncFct(void* fct)
 }
 // GtkTreeCellDataFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeCellDataFunc_fct_##A = 0;                                                \
-static void my_GtkTreeCellDataFunc_##A(void* tree, void* cell, void* model, void* iter, void* data) \
-{                                                                                                   \
-    RunFunction(my_context, my_GtkTreeCellDataFunc_fct_##A, 5, tree, cell, model, iter, data);      \
+static uintptr_t my_GtkTreeCellDataFunc_fct_##A = 0;                                                    \
+static void my_GtkTreeCellDataFunc_##A(void* tree, void* cell, void* model, void* iter, void* data)     \
+{                                                                                                       \
+    RunFunctionFmt(my_GtkTreeCellDataFunc_fct_##A, "ppppp", tree, cell, model, iter, data);       \
 }
 SUPER()
 #undef GO
@@ -351,10 +351,10 @@ static void* findGtkTreeCellDataFuncFct(void* fct)
 
 // GDestroyNotify
 #define GO(A)   \
-static uintptr_t my_GDestroyNotify_fct_##A = 0;                     \
-static void my_GDestroyNotify_##A(void* data)                       \
-{                                                                   \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, data);    \
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                         \
+static void my_GDestroyNotify_##A(void* data)                           \
+{                                                                       \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", data);         \
 }
 SUPER()
 #undef GO
@@ -374,10 +374,10 @@ static void* findGDestroyNotifyFct(void* fct)
 
 // GtkTreeIterCompareFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeIterCompareFunc_fct_##A = 0;                                         \
-static int my_GtkTreeIterCompareFunc_##A(void* model, void* a, void* b, void* data)             \
-{                                                                                               \
-    return RunFunction(my_context, my_GtkTreeIterCompareFunc_fct_##A, 4, model, a, b, data);    \
+static uintptr_t my_GtkTreeIterCompareFunc_fct_##A = 0;                                                 \
+static int my_GtkTreeIterCompareFunc_##A(void* model, void* a, void* b, void* data)                     \
+{                                                                                                       \
+    return RunFunctionFmt(my_GtkTreeIterCompareFunc_fct_##A, "pppp", model, a, b, data);          \
 }
 SUPER()
 #undef GO
@@ -397,10 +397,10 @@ static void* findGtkTreeIterCompareFuncFct(void* fct)
 
 // GtkPrinterFunc
 #define GO(A)   \
-static uintptr_t my_GtkPrinterFunc_fct_##A = 0;                                     \
-static int my_GtkPrinterFunc_##A(void* printer, void* data)                         \
-{                                                                                   \
-    return RunFunction(my_context, my_GtkPrinterFunc_fct_##A, 2, printer, data);    \
+static uintptr_t my_GtkPrinterFunc_fct_##A = 0;                                         \
+static int my_GtkPrinterFunc_##A(void* printer, void* data)                             \
+{                                                                                       \
+    return RunFunctionFmt(my_GtkPrinterFunc_fct_##A, "pp", printer, data);        \
 }
 SUPER()
 #undef GO
@@ -420,10 +420,10 @@ static void* findGtkPrinterFuncFct(void* fct)
 
 // GtkPrintJobCompleteHunc
 #define GO(A)   \
-static uintptr_t my_GtkPrintJobCompleteHunc_fct_##A = 0;                                \
-static void my_GtkPrintJobCompleteHunc_##A(void* job, void* data, void* error)          \
-{                                                                                       \
-    RunFunction(my_context, my_GtkPrintJobCompleteHunc_fct_##A, 3, job, data, error);   \
+static uintptr_t my_GtkPrintJobCompleteHunc_fct_##A = 0;                                        \
+static void my_GtkPrintJobCompleteHunc_##A(void* job, void* data, void* error)                  \
+{                                                                                               \
+    RunFunctionFmt(my_GtkPrintJobCompleteHunc_fct_##A, "ppp", job, data, error);          \
 }
 SUPER()
 #undef GO
@@ -441,6 +441,30 @@ static void* findGtkPrintJobCompleteHuncFct(void* fct)
     return NULL;
 }
 
+
+// GtkClipboardTextReceivedFunc
+#define GO(A)   \
+static uintptr_t my_GtkClipboardTextReceivedFunc_fct_##A = 0;                                           \
+static void my_GtkClipboardTextReceivedFunc_##A(void* clipboard, void* text, void* data)                \
+{                                                                                                       \
+    RunFunctionFmt(my_GtkClipboardTextReceivedFunc_fct_##A, "ppp", clipboard, text, data);        \
+}
+SUPER()
+#undef GO
+static void* findGtkClipboardTextReceivedFuncFct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_GtkClipboardTextReceivedFunc_fct_##A == (uintptr_t)fct) return my_GtkClipboardTextReceivedFunc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_GtkClipboardTextReceivedFunc_fct_##A == 0) {my_GtkClipboardTextReceivedFunc_fct_##A = (uintptr_t)fct; return my_GtkClipboardTextReceivedFunc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for gtk-3 GtkClipboardTextReceivedFunc callback\n");
+    return NULL;
+}
+
 #undef SUPER
 /*
 EXPORT void my3_gtk_dialog_add_buttons(x64emu_t* emu, void* dialog, void* first, uintptr_t* b)
@@ -533,7 +557,7 @@ EXPORT int my3_gtk_clipboard_set_with_owner(x64emu_t* emu, void* clipboard, void
 
 static void* my_translate_func(void* path, my_signal_t* sig)
 {
-    return (void*)RunFunction(my_context, sig->c_handler, 2, path, sig->data);
+    return (void*)RunFunctionFmt(sig->c_handler, "pp", path, sig->data)       ;
 }
 
 EXPORT void my3_gtk_stock_set_translate_func(x64emu_t* emu, void* domain, void* f, void* data, void* notify)
@@ -639,7 +663,7 @@ typedef struct my_connectargs_s {
 //defined in gobject2...
 uintptr_t my_g_signal_connect_object(x64emu_t* emu, void* instance, void* detailed, void* c_handler, void* object, uint32_t flags);
 uintptr_t my_g_signal_connect_data(x64emu_t* emu, void* instance, void* detailed, void* c_handler, void* data, void* closure, uint32_t flags);
-static void my3_gtk_builder_connect_signals_default(void* builder, void* object, 
+static void my3_gtk_builder_connect_signals_default(void* builder, void* object,
                                                     char* signal_name, char* handler_name,
                                                     void* connect_object, uint32_t flags, my_connectargs_t* args)
 {
@@ -723,6 +747,11 @@ EXPORT void my3_gtk_container_foreach(x64emu_t* emu, void* container, void* cb,
     my->gtk_container_foreach(container, findGtkCallbackFct(cb), data);
 }
 
+EXPORT void my3_gtk_clipboard_request_text(x64emu_t* emu, void* clipboard, void* f, void* data)
+{
+    my->gtk_clipboard_request_text(clipboard, findGtkClipboardTextReceivedFuncFct(f), data);
+}
+
 #define PRE_INIT    \
     if(box64_nogtk) \
         return -1;
diff --git a/src/wrapped/wrappedgtk3_private.h b/src/wrapped/wrappedgtk3_private.h
index 3c914c19..a6e4e3ee 100644
--- a/src/wrapped/wrappedgtk3_private.h
+++ b/src/wrapped/wrappedgtk3_private.h
@@ -193,7 +193,7 @@ GO(gtk_alternative_dialog_button_order, iFp)
 GO(gtk_anchor_type_get_type, pFv)
 GO(gtk_application_add_window, vFpp)
 GO(gtk_application_get_new, pFpi)
-GO(gtk_application_get_type, pFv)
+GO(gtk_application_get_type, LFv)
 GO(gtk_application_new, pFpu)
 GO(gtk_application_set_accels_for_action, vFppp)
 GO(gtk_application_window_new, pFp)
@@ -446,6 +446,7 @@ GO(gtk_check_menu_item_toggled, vFp)
 GO(gtk_check_version, pFuuu)
 GO(gtk_clipboard_clear, vFp)
 GO(gtk_clipboard_get, pFp)
+GO(gtk_clipboard_get_default, pFp)
 GO(gtk_clipboard_get_display, pFp)
 GO(gtk_clipboard_get_for_display, pFpp)
 GO(gtk_clipboard_get_owner, pFp)
@@ -454,7 +455,7 @@ GO(gtk_clipboard_get_type, pFv)
 //GOM(gtk_clipboard_request_image, vFEppp)
 //GOM(gtk_clipboard_request_rich_text, vFEpppp)
 //GOM(gtk_clipboard_request_targets, vFEppp)
-//GOM(gtk_clipboard_request_text, vFEppp)
+GOM(gtk_clipboard_request_text, vFEppp)
 //GOM(gtk_clipboard_request_uris, vFEppp)
 GO(gtk_clipboard_set_can_store, vFppi)
 GO(gtk_clipboard_set_image, vFpp)
@@ -650,6 +651,7 @@ GO(gtk_combo_set_popdown_strings, vFpp)
 GO(gtk_combo_set_use_arrows, vFpi)
 GO(gtk_combo_set_use_arrows_always, vFpi)
 GO(gtk_combo_set_value_in_list, vFpii)
+GO(gtk_container_accessible_get_type, LFv)
 GO(gtk_container_add, vFpp)
 GO(gtk_container_add_with_properties, vFpppppppppppp)    //vaarg
 GO(gtk_container_check_resize, vFp)
@@ -2649,6 +2651,7 @@ GO(gtk_settings_set_string_property, vFpppp)
 GO(gtk_shadow_type_get_type, pFv)
 GO(gtk_show_about_dialog, vFpppppppppppppppppppppppp)   //vaarg
 GO(gtk_show_uri, iFppup)
+GO(gtk_show_uri_on_window, iFppup)
 GO(gtk_side_type_get_type, pFv)
 //GO(gtk_signal_compat_matched, 
 GOM(gtk_signal_connect_full, LFEppppppii)
@@ -3824,6 +3827,8 @@ GO(gtk_widget_class_install_style_property, vFpp)
 //GOM(gtk_widget_class_install_style_property_parser, vFEppB)
 GO(gtk_widget_class_list_style_properties, pFpp)
 GO(gtk_widget_class_path, vFpppp)
+GO(gtk_widget_class_set_accessible_role, vFpu)
+GO(gtk_widget_class_set_accessible_type, vFpL)
 //GOM(gtk_widget_class_set_connect_func, vFEpBpB)
 GO(gtk_widget_compute_expand, iFpu)
 GO(gtk_widget_create_pango_context, pFp)
@@ -4000,6 +4005,7 @@ GO(gtk_widget_queue_resize_no_redraw, vFp)
 GO(gtk_widget_realize, vFp)
 GO(gtk_widget_ref, pFp)
 GO(gtk_widget_region_intersect, pFpp)
+GO(gtk_widget_register_window, vFpp)
 GO(gtk_widget_remove_accelerator, iFppuu)
 GO(gtk_widget_remove_mnemonic_label, vFpp)
 GO(gtk_widget_render_icon, pFppup)
@@ -4202,6 +4208,8 @@ GO(gtk_wrap_mode_get_type, pFv)
 GO(gtk_gesture_long_press_get_type, LFv)
 GO(gtk_gesture_single_get_type, LFv)
 GO(gtk_gesture_get_type, LFv)
+GO(gtk_gesture_rotate_new, pFp)
+GO(gtk_gesture_zoom_new, pFp)
 GO(gtk_event_controller_get_type, LFv)
 GO(gtk_stack_set_visible_child_name, vFpp)
 GO(gtk_stack_get_visible_child_name, pFp)
diff --git a/src/wrapped/wrappedgtkx112.c b/src/wrapped/wrappedgtkx112.c
index 93a29bc2..462f924f 100644
--- a/src/wrapped/wrappedgtkx112.c
+++ b/src/wrapped/wrappedgtkx112.c
@@ -150,10 +150,10 @@ GO(39)  \
 
 // GtkMenuDetachFunc
 #define GO(A)   \
-static uintptr_t my_menudetach_fct_##A = 0;   \
-static void my_menudetach_##A(void* widget, void* menu)     \
-{                                       \
-    RunFunction(my_context, my_menudetach_fct_##A, 2, widget, menu);\
+static uintptr_t my_menudetach_fct_##A = 0;                                 \
+static void my_menudetach_##A(void* widget, void* menu)                     \
+{                                                                           \
+    RunFunctionFmt(my_menudetach_fct_##A, "pp", widget, menu);        \
 }
 SUPER()
 #undef GO
@@ -173,10 +173,10 @@ static void* findMenuDetachFct(void* fct)
 
 // GtkMenuPositionFunc
 #define GO(A)   \
-static uintptr_t my_menuposition_fct_##A = 0;   \
-static void my_menuposition_##A(void* menu, void* x, void* y, void* push_in, void* data)     \
-{                                       \
-    RunFunction(my_context, my_menuposition_fct_##A, 5, menu, x, y, push_in, data);\
+static uintptr_t my_menuposition_fct_##A = 0;                                                   \
+static void my_menuposition_##A(void* menu, void* x, void* y, void* push_in, void* data)        \
+{                                                                                               \
+    RunFunctionFmt(my_menuposition_fct_##A, "ppppp", menu, x, y, push_in, data);          \
 }
 SUPER()
 #undef GO
@@ -196,10 +196,10 @@ static void* findMenuPositionFct(void* fct)
 
 // GtkFunction
 #define GO(A)   \
-static uintptr_t my_gtkfunction_fct_##A = 0;   \
-static int my_gtkfunction_##A(void* data)     \
-{                                       \
-    return RunFunction(my_context, my_gtkfunction_fct_##A, 1, data);\
+static uintptr_t my_gtkfunction_fct_##A = 0;                                \
+static int my_gtkfunction_##A(void* data)                                   \
+{                                                                           \
+    return RunFunctionFmt(my_gtkfunction_fct_##A, "p", data);         \
 }
 SUPER()
 #undef GO
@@ -219,10 +219,10 @@ static void* findGtkFunctionFct(void* fct)
 
 // GtkClipboardGetFunc
 #define GO(A)   \
-static uintptr_t my_clipboardget_fct_##A = 0;   \
-static void my_clipboardget_##A(void* clipboard, void* selection, uint32_t info, void* data)     \
-{                                       \
-    RunFunction(my_context, my_clipboardget_fct_##A, 4, clipboard, selection, info, data);\
+static uintptr_t my_clipboardget_fct_##A = 0;                                                       \
+static void my_clipboardget_##A(void* clipboard, void* selection, uint32_t info, void* data)        \
+{                                                                                                   \
+    RunFunctionFmt(my_clipboardget_fct_##A, "ppup", clipboard, selection, info, data);        \
 }
 SUPER()
 #undef GO
@@ -242,10 +242,10 @@ static void* findClipboadGetFct(void* fct)
 
 // GtkClipboardClearFunc
 #define GO(A)   \
-static uintptr_t my_clipboardclear_fct_##A = 0;   \
-static void my_clipboardclear_##A(void* clipboard, void* data)     \
-{                                       \
-    RunFunction(my_context, my_clipboardclear_fct_##A, 2, clipboard, data);\
+static uintptr_t my_clipboardclear_fct_##A = 0;                                     \
+static void my_clipboardclear_##A(void* clipboard, void* data)                      \
+{                                                                                   \
+    RunFunctionFmt(my_clipboardclear_fct_##A, "pp", clipboard, data);         \
 }
 SUPER()
 #undef GO
@@ -265,10 +265,10 @@ static void* findClipboadClearFct(void* fct)
 
 // GtkCallback
 #define GO(A)   \
-static uintptr_t my_gtkcallback_fct_##A = 0;   \
-static void my_gtkcallback_##A(void* widget, void* data)     \
-{                                       \
-    RunFunction(my_context, my_gtkcallback_fct_##A, 2, widget, data);\
+static uintptr_t my_gtkcallback_fct_##A = 0;                                \
+static void my_gtkcallback_##A(void* widget, void* data)                    \
+{                                                                           \
+    RunFunctionFmt(my_gtkcallback_fct_##A, "pp", widget, data);       \
 }
 SUPER()
 #undef GO
@@ -288,10 +288,10 @@ static void* findGtkCallbackFct(void* fct)
 
 // GtkTextCharPredicate
 #define GO(A)   \
-static uintptr_t my_textcharpredicate_fct_##A = 0;   \
-static int my_textcharpredicate_##A(uint32_t ch, void* data)     \
-{                                       \
-    return (int)RunFunction(my_context, my_textcharpredicate_fct_##A, 2, ch, data);\
+static uintptr_t my_textcharpredicate_fct_##A = 0;                                          \
+static int my_textcharpredicate_##A(uint32_t ch, void* data)                                \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_textcharpredicate_fct_##A, "up", ch, data);         \
 }
 SUPER()
 #undef GO
@@ -311,10 +311,10 @@ static void* findGtkTextCharPredicateFct(void* fct)
 
 // Toolbar
 #define GO(A)   \
-static uintptr_t my_toolbar_fct_##A = 0;   \
-static void my_toolbar_##A(void* widget, void* data)     \
-{                                       \
-    RunFunction(my_context, my_toolbar_fct_##A, 2, widget, data);\
+static uintptr_t my_toolbar_fct_##A = 0;                                \
+static void my_toolbar_##A(void* widget, void* data)                    \
+{                                                                       \
+    RunFunctionFmt(my_toolbar_fct_##A, "pp", widget, data);       \
 }
 SUPER()
 #undef GO
@@ -334,10 +334,10 @@ static void* findToolbarFct(void* fct)
 
 // Builder
 #define GO(A)   \
-static uintptr_t my_builderconnect_fct_##A = 0;   \
-static void my_builderconnect_##A(void* builder, void* object, void* signal, void* handler, void* connect, int flags, void* data)     \
-{                                       \
-    RunFunction(my_context, my_builderconnect_fct_##A, 7, builder, object, signal, handler, connect, flags, data);\
+static uintptr_t my_builderconnect_fct_##A = 0;                                                                                     \
+static void my_builderconnect_##A(void* builder, void* object, void* signal, void* handler, void* connect, int flags, void* data)   \
+{                                                                                                                                   \
+    RunFunctionFmt(my_builderconnect_fct_##A, "pppppip", builder, object, signal, handler, connect, flags, data);             \
 }
 SUPER()
 #undef GO
@@ -357,10 +357,10 @@ static void* findBuilderConnectFct(void* fct)
 
 // GtkCellLayoutDataFunc
 #define GO(A)   \
-static uintptr_t my_GtkCellLayoutDataFunc_fct_##A = 0;                                                  \
-static void my_GtkCellLayoutDataFunc_##A(void* layout, void* cell, void* tree, void* iter, void* data)  \
-{                                       \
-    RunFunction(my_context, my_GtkCellLayoutDataFunc_fct_##A, 5, layout, cell, tree, iter, data);\
+static uintptr_t my_GtkCellLayoutDataFunc_fct_##A = 0;                                                      \
+static void my_GtkCellLayoutDataFunc_##A(void* layout, void* cell, void* tree, void* iter, void* data)      \
+{                                                                                                           \
+    RunFunctionFmt(my_GtkCellLayoutDataFunc_fct_##A, "ppppp", layout, cell, tree, iter, data);        \
 }
 SUPER()
 #undef GO
@@ -380,10 +380,10 @@ static void* findGtkCellLayoutDataFuncFct(void* fct)
 
 // GtkTreeCellDataFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeCellDataFunc_fct_##A = 0;                                                  \
-static void my_GtkTreeCellDataFunc_##A(void* column, void* cell, void* tree, void* iter, void* data)  \
-{                                       \
-    RunFunction(my_context, my_GtkTreeCellDataFunc_fct_##A, 5, column, cell, tree, iter, data);\
+static uintptr_t my_GtkTreeCellDataFunc_fct_##A = 0;                                                        \
+static void my_GtkTreeCellDataFunc_##A(void* column, void* cell, void* tree, void* iter, void* data)        \
+{                                                                                                           \
+    RunFunctionFmt(my_GtkTreeCellDataFunc_fct_##A, "ppppp", column, cell, tree, iter, data);          \
 }
 SUPER()
 #undef GO
@@ -404,10 +404,10 @@ static void* findGtkTreeCellDataFuncFct(void* fct)
 
 // GDestroyNotify
 #define GO(A)   \
-static uintptr_t my_GDestroyNotify_fct_##A = 0;                     \
-static void my_GDestroyNotify_##A(void* data)                       \
-{                                                                   \
-    RunFunction(my_context, my_GDestroyNotify_fct_##A, 1, data);    \
+static uintptr_t my_GDestroyNotify_fct_##A = 0;                         \
+static void my_GDestroyNotify_##A(void* data)                           \
+{                                                                       \
+    RunFunctionFmt(my_GDestroyNotify_fct_##A, "p", data);         \
 }
 SUPER()
 #undef GO
@@ -427,10 +427,10 @@ static void* findGDestroyNotifyFct(void* fct)
 
 // GtkTreeModelForeachFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeModelForeachFunc_fct_##A = 0;                                                    \
-static int my_GtkTreeModelForeachFunc_##A(void* model, void* path, void* iter, void* data)                  \
-{                                                                                                           \
-    return (int)RunFunction(my_context, my_GtkTreeModelForeachFunc_fct_##A, 4, model, path, iter, data);    \
+static uintptr_t my_GtkTreeModelForeachFunc_fct_##A = 0;                                                            \
+static int my_GtkTreeModelForeachFunc_##A(void* model, void* path, void* iter, void* data)                          \
+{                                                                                                                   \
+    return (int)RunFunctionFmt(my_GtkTreeModelForeachFunc_fct_##A, "pppp", model, path, iter, data);          \
 }
 SUPER()
 #undef GO
@@ -450,10 +450,10 @@ static void* findGtkTreeModelForeachFuncFct(void* fct)
 
 // GtkTreeSelectionSelectedForeachFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeSelectionSelectedForeachFunc_fct_##A = 0;                                                    \
-static int my_GtkTreeSelectionSelectedForeachFunc_##A(void* selection, void* path, void* iter, void* data)                  \
-{                                                                                                           \
-    return (int)RunFunction(my_context, my_GtkTreeSelectionSelectedForeachFunc_fct_##A, 4, selection, path, iter, data);    \
+static uintptr_t my_GtkTreeSelectionSelectedForeachFunc_fct_##A = 0;                                                                \
+static int my_GtkTreeSelectionSelectedForeachFunc_##A(void* selection, void* path, void* iter, void* data)                          \
+{                                                                                                                                   \
+    return (int)RunFunctionFmt(my_GtkTreeSelectionSelectedForeachFunc_fct_##A, "pppp", selection, path, iter, data);          \
 }
 SUPER()
 #undef GO
@@ -473,10 +473,10 @@ static void* findGtkTreeSelectionSelectedForeachFuncFct(void* fct)
 
 // GtkClipboardReceivedFunc
 #define GO(A)   \
-static uintptr_t my_GtkClipboardReceivedFunc_fct_##A = 0;                                   \
-static void my_GtkClipboardReceivedFunc_##A(void* clipboard, void* sel, void* data)        \
-{                                                                                               \
-    RunFunction(my_context, my_GtkClipboardReceivedFunc_fct_##A, 3, clipboard, sel, data); \
+static uintptr_t my_GtkClipboardReceivedFunc_fct_##A = 0;                                           \
+static void my_GtkClipboardReceivedFunc_##A(void* clipboard, void* sel, void* data)                 \
+{                                                                                                   \
+    RunFunctionFmt(my_GtkClipboardReceivedFunc_fct_##A, "ppp", clipboard, sel, data);         \
 }
 SUPER()
 #undef GO
@@ -496,10 +496,10 @@ static void* findGtkClipboardReceivedFuncFct(void* fct)
 
 // GtkClipboardTextReceivedFunc
 #define GO(A)   \
-static uintptr_t my_GtkClipboardTextReceivedFunc_fct_##A = 0;                                   \
-static void my_GtkClipboardTextReceivedFunc_##A(void* clipboard, void* text, void* data)        \
-{                                                                                               \
-    RunFunction(my_context, my_GtkClipboardTextReceivedFunc_fct_##A, 3, clipboard, text, data); \
+static uintptr_t my_GtkClipboardTextReceivedFunc_fct_##A = 0;                                           \
+static void my_GtkClipboardTextReceivedFunc_##A(void* clipboard, void* text, void* data)                \
+{                                                                                                       \
+    RunFunctionFmt(my_GtkClipboardTextReceivedFunc_fct_##A, "ppp", clipboard, text, data);        \
 }
 SUPER()
 #undef GO
@@ -519,10 +519,10 @@ static void* findGtkClipboardTextReceivedFuncFct(void* fct)
 
 // GtkTreeViewSearchEqualFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeViewSearchEqualFunc_fct_##A = 0;                                                     \
-static int my_GtkTreeViewSearchEqualFunc_##A(void* model, int column, void* key, void* iter, void* data)        \
-{                                                                                                               \
-    return RunFunction(my_context, my_GtkTreeViewSearchEqualFunc_fct_##A, 5, model, column, key, iter, data);   \
+static uintptr_t my_GtkTreeViewSearchEqualFunc_fct_##A = 0;                                                             \
+static int my_GtkTreeViewSearchEqualFunc_##A(void* model, int column, void* key, void* iter, void* data)                \
+{                                                                                                                       \
+    return RunFunctionFmt(my_GtkTreeViewSearchEqualFunc_fct_##A, "pippp", model, column, key, iter, data);        \
 }
 SUPER()
 #undef GO
@@ -542,10 +542,10 @@ static void* findGtkTreeViewSearchEqualFuncFct(void* fct)
 
 // GtkTreeIterCompareFunc
 #define GO(A)   \
-static uintptr_t my_GtkTreeIterCompareFunc_fct_##A = 0;                                         \
-static int my_GtkTreeIterCompareFunc_##A(void* model, void* a, void* b, void* data)             \
-{                                                                                               \
-    return RunFunction(my_context, my_GtkTreeIterCompareFunc_fct_##A, 4, model, a, b, data);    \
+static uintptr_t my_GtkTreeIterCompareFunc_fct_##A = 0;                                                 \
+static int my_GtkTreeIterCompareFunc_##A(void* model, void* a, void* b, void* data)                     \
+{                                                                                                       \
+    return RunFunctionFmt(my_GtkTreeIterCompareFunc_fct_##A, "pppp", model, a, b, data);          \
 }
 SUPER()
 #undef GO
@@ -565,10 +565,10 @@ static void* findGtkTreeIterCompareFuncFct(void* fct)
 
 // GdkInputFunction
 #define GO(A)   \
-static uintptr_t my_GdkInputFunction_fct_##A = 0;                                  \
-static void my_GdkInputFunction_##A(void* data, int source, int cond)              \
-{                                                                                   \
-    RunFunction(my_context, my_GdkInputFunction_fct_##A, 3, data, source, cond);   \
+static uintptr_t my_GdkInputFunction_fct_##A = 0;                                       \
+static void my_GdkInputFunction_##A(void* data, int source, int cond)                   \
+{                                                                                       \
+    RunFunctionFmt(my_GdkInputFunction_fct_##A, "pii", data, source, cond);       \
 }
 SUPER()
 #undef GO
@@ -588,10 +588,10 @@ static void* findGdkInputFunctionFct(void* fct)
 
 // GtkCallbackMarshal
 #define GO(A)   \
-static uintptr_t my_GtkCallbackMarshal_fct_##A = 0;                                 \
-static void my_GtkCallbackMarshal_##A(void* obj, void* data, uint32_t n, void* args)\
-{                                                                                   \
-    RunFunction(my_context, my_GtkCallbackMarshal_fct_##A, 4, obj, data, n, args);  \
+static uintptr_t my_GtkCallbackMarshal_fct_##A = 0;                                         \
+static void my_GtkCallbackMarshal_##A(void* obj, void* data, uint32_t n, void* args)        \
+{                                                                                           \
+    RunFunctionFmt(my_GtkCallbackMarshal_fct_##A, "ppup", obj, data, n, args);        \
 }
 SUPER()
 #undef GO
@@ -610,10 +610,10 @@ static void* findGtkCallbackMarshalFct(void* fct)
 }
 // GtkPrinterFunc ...
 #define GO(A)   \
-static uintptr_t my_GtkPrinterFunc_fct_##A = 0;                         \
-static int my_GtkPrinterFunc_##A(void* a, void* b)                      \
-{                                                                       \
-    return (int)RunFunction(my_context, my_GtkPrinterFunc_fct_##A, 2, a, b); \
+static uintptr_t my_GtkPrinterFunc_fct_##A = 0;                                     \
+static int my_GtkPrinterFunc_##A(void* a, void* b)                                  \
+{                                                                                   \
+    return (int)RunFunctionFmt(my_GtkPrinterFunc_fct_##A, "pp", a, b);        \
 }
 SUPER()
 #undef GO
@@ -632,10 +632,10 @@ static void* find_GtkPrinterFunc_Fct(void* fct)
 }
 // GtkFileFilterFunc ...
 #define GO(A)   \
-static uintptr_t my_GtkFileFilterFunc_fct_##A = 0;                              \
-static int my_GtkFileFilterFunc_##A(void* a, void* b)                           \
-{                                                                               \
-    return (int)RunFunction(my_context, my_GtkFileFilterFunc_fct_##A, 2, a, b); \
+static uintptr_t my_GtkFileFilterFunc_fct_##A = 0;                                      \
+static int my_GtkFileFilterFunc_##A(void* a, void* b)                                   \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_GtkFileFilterFunc_fct_##A, "pp", a, b);         \
 }
 SUPER()
 #undef GO
@@ -654,10 +654,10 @@ static void* find_GtkFileFilterFunc_Fct(void* fct)
 }
 // GtkPrintJobCompleteFunc ...
 #define GO(A)   \
-static uintptr_t my_GtkPrintJobCompleteFunc_fct_##A = 0;                        \
-static void my_GtkPrintJobCompleteFunc_##A(void* a, void* b, void* c)           \
-{                                                                               \
-    RunFunction(my_context, my_GtkPrintJobCompleteFunc_fct_##A, 3, a, b, c);    \
+static uintptr_t my_GtkPrintJobCompleteFunc_fct_##A = 0;                            \
+static void my_GtkPrintJobCompleteFunc_##A(void* a, void* b, void* c)               \
+{                                                                                   \
+    RunFunctionFmt(my_GtkPrintJobCompleteFunc_fct_##A, "ppp", a, b, c);       \
 }
 SUPER()
 #undef GO
@@ -677,10 +677,10 @@ static void* find_GtkPrintJobCompleteFunc_Fct(void* fct)
 
 // GtkLinkButtonUri ...
 #define GO(A)   \
-static uintptr_t my_GtkLinkButtonUri_fct_##A = 0;                       \
-static void my_GtkLinkButtonUri_##A(void* a, void* b, void* c)          \
-{                                                                       \
-    RunFunction(my_context, my_GtkLinkButtonUri_fct_##A, 3, a, b, c);   \
+static uintptr_t my_GtkLinkButtonUri_fct_##A = 0;                               \
+static void my_GtkLinkButtonUri_##A(void* a, void* b, void* c)                  \
+{                                                                               \
+    RunFunctionFmt(my_GtkLinkButtonUri_fct_##A, "ppp", a, b, c);          \
 }
 SUPER()
 #undef GO
@@ -833,7 +833,7 @@ EXPORT int my_gtk_clipboard_set_with_owner(x64emu_t* emu, void* clipboard, void*
 
 static void* my_translate_func(void* path, my_signal_t* sig)
 {
-    return (void*)RunFunction(my_context, sig->c_handler, 2, path, sig->data);
+    return (void*)RunFunctionFmt(sig->c_handler, "pp", path, sig->data)       ;
 }
 
 EXPORT void my_gtk_stock_set_translate_func(x64emu_t* emu, void* domain, void* f, void* data, void* notify)
diff --git a/src/wrapped/wrappedicui18n67_private.h b/src/wrapped/wrappedicui18n67_private.h
index b32f447a..431164b6 100644
--- a/src/wrapped/wrappedicui18n67_private.h
+++ b/src/wrapped/wrappedicui18n67_private.h
@@ -3,17 +3,57 @@
 #endif
 
 GO(ucal_add_67, vFpiip)
+GO(ucal_clear_67, vFp)
+GO(ucal_clearField_67, vFpi)
+GO(ucal_clone_67, pFpp)
 GO(ucal_close_67, vFp)
+GO(ucal_countAvailable_67, iFv)
+GO(ucal_equivalentTo_67, cFpp)
 GO(ucal_get_67, iFpip)
 GO(ucal_getAttribute_67, iFpi)
+GO(ucal_getAvailable_67, pFi)
+GO(ucal_getCanonicalTimeZoneID_67, iFpipipp)
+GO(ucal_getDayOfWeekType_67, iFpip)
+GO(ucal_getDefaultTimeZone_67, iFpip)
+GO(ucal_getDSTSavings_67, iFpp)
+GO(ucal_getFieldDifference_67, iFpdip)
+GO(ucal_getGregorianChange_67, dFpp)
+GO(ucal_getHostTimeZone_67, iFpip)
 GO(ucal_getKeywordValuesForLocale_67, pFppCp)
 GO(ucal_getLimit_67, iFpiip)
+GO(ucal_getLocaleByType_67, pFpip)
+GO(ucal_getMillis_67, dFpp)
+GO(ucal_getNow_67, dFv)
 GO(ucal_getTimeZoneDisplayName_67, iFpippip)
+GO(ucal_getTimeZoneID_67, iFppip)
+GO(ucal_getTimeZoneIDForWindowsID_67, iFpippip)
+GO(ucal_getTimeZoneOffsetFromLocal_67, vFpiippp)
+GO(ucal_getTimeZoneTransitionDate_67, cFpipp)
+GO(ucal_getType_67, pFpp)
+GO(ucal_getTZDataVersion_67, pFp)
+GO(ucal_getWeekendTransition_67, iFpip)
+GO(ucal_getWindowsTimeZoneID_67, iFpipip)
+GO(ucal_inDaylightTime_67, cFpp)
+GO(ucal_isSet_67, cFpi)
+GO(ucal_isWeekend_67, cFpdp)
 GO(ucal_open_67, pFpipip)
+GO(ucal_openCountryTimeZones_67, pFpp)
+GO(ucal_openTimeZoneIDEnumeration_67, pFippp)
+GO(ucal_openTimeZones_67, pFp)
+GO(ucal_roll_67, vFpiip)
 GO(ucal_set_67, vFpii)
+GO(ucal_setAttribute_67, vFpii)
+GO(ucal_setDate_67, vFpiiip)
+GO(ucal_setDateTime_67, vFpiiiiiip)
+GO(ucal_setDefaultTimeZone_67, vFpp)
+GO(ucal_setGregorianChange_67, vFpdp)
+GO(ucal_setMillis_67, vFpdp)
+GO(ucal_setTimeZone_67, vFppip)
 
+GO(ucol_clone_67, pFpp)
 GO(ucol_close_67, vFp)
 GO(ucol_closeElements_67, vFp)
+GO(ucol_setMaxVariable_67, vFpip)
 GO(ucol_getOffset_67, iFp)
 GO(ucol_getRules_67, pFpp)
 GO(ucol_getSortKey_67, iFppipi)
@@ -32,6 +72,7 @@ GO(ucol_strcoll_67, iFppipi)
 GO(udat_close_67, vFp)
 GO(udat_countSymbols_67, iFpi)
 GO(udat_getSymbols_67, iFpiipip)
+GO(udat_format_67, iFpdpipp)
 GO(udat_open_67, pFiippipip)
 GO(udat_setCalendar_67, vFpp)
 GO(udat_toPattern_67, iFpCpip)
@@ -51,6 +92,9 @@ GO(ulocdata_getMeasurementSystem_67, iFpp)
 
 GO(usearch_close_67, vFp)
 GO(usearch_first_67, iFpp)
+GO(usearch_getBreakIterator_67, pFp)
 GO(usearch_getMatchedLength_67, iFp)
 GO(usearch_last_67, iFpp)
 GO(usearch_openFromCollator_67, pFpipippp)
+GO(usearch_setPattern_67, vFppip)
+GO(usearch_setText_67, vFppip)
diff --git a/src/wrapped/wrappedicui18n72_private.h b/src/wrapped/wrappedicui18n72_private.h
index eb6b84de..351b7e69 100644
--- a/src/wrapped/wrappedicui18n72_private.h
+++ b/src/wrapped/wrappedicui18n72_private.h
@@ -2,18 +2,61 @@
 #error meh!
 #endif
 
+// UDate is double
+// UBool is int8_t
+
 GO(ucal_add_72, vFpiip)
+GO(ucal_clear_72, vFp)
+GO(ucal_clearField_72, vFpi)
+GO(ucal_clone_72, pFpp)
 GO(ucal_close_72, vFp)
+GO(ucal_countAvailable_72, iFv)
+GO(ucal_equivalentTo_72, cFpp)
 GO(ucal_get_72, iFpip)
 GO(ucal_getAttribute_72, iFpi)
+GO(ucal_getAvailable_72, pFi)
+GO(ucal_getCanonicalTimeZoneID_72, iFpipipp)
+GO(ucal_getDayOfWeekType_72, iFpip)
+GO(ucal_getDefaultTimeZone_72, iFpip)
+GO(ucal_getDSTSavings_72, iFpp)
+GO(ucal_getFieldDifference_72, iFpdip)
+GO(ucal_getGregorianChange_72, dFpp)
+GO(ucal_getHostTimeZone_72, iFpip)
 GO(ucal_getKeywordValuesForLocale_72, pFppCp)
 GO(ucal_getLimit_72, iFpiip)
+GO(ucal_getLocaleByType_72, pFpip)
+GO(ucal_getMillis_72, dFpp)
+GO(ucal_getNow_72, dFv)
 GO(ucal_getTimeZoneDisplayName_72, iFpippip)
+GO(ucal_getTimeZoneID_72, iFppip)
+GO(ucal_getTimeZoneIDForWindowsID_72, iFpippip)
+GO(ucal_getTimeZoneOffsetFromLocal_72, vFpiippp)
+GO(ucal_getTimeZoneTransitionDate_72, cFpipp)
+GO(ucal_getType_72, pFpp)
+GO(ucal_getTZDataVersion_72, pFp)
+GO(ucal_getWeekendTransition_72, iFpip)
+GO(ucal_getWindowsTimeZoneID_72, iFpipip)
+GO(ucal_inDaylightTime_72, cFpp)
+GO(ucal_isSet_72, cFpi)
+GO(ucal_isWeekend_72, cFpdp)
 GO(ucal_open_72, pFpipip)
+GO(ucal_openCountryTimeZones_72, pFpp)
+GO(ucal_openTimeZoneIDEnumeration_72, pFippp)
+GO(ucal_openTimeZones_72, pFp)
+GO(ucal_roll_72, vFpiip)
 GO(ucal_set_72, vFpii)
+GO(ucal_setAttribute_72, vFpii)
+GO(ucal_setDate_72, vFpiiip)
+GO(ucal_setDateTime_72, vFpiiiiiip)
+GO(ucal_setDefaultTimeZone_72, vFpp)
+GO(ucal_setGregorianChange_72, vFpdp)
+GO(ucal_setMillis_72, vFpdp)
+GO(ucal_setTimeZone_72, vFppip)
 
+GO(ucol_clone_72, pFpp)
 GO(ucol_close_72, vFp)
 GO(ucol_closeElements_72, vFp)
+GO(ucol_setMaxVariable_72, vFpip)
 GO(ucol_getOffset_72, iFp)
 GO(ucol_getRules_72, pFpp)
 GO(ucol_getSortKey_72, iFppipi)
@@ -32,6 +75,7 @@ GO(ucol_strcoll_72, iFppipi)
 GO(udat_close_72, vFp)
 GO(udat_countSymbols_72, iFpi)
 GO(udat_getSymbols_72, iFpiipip)
+GO(udat_format_72, iFpdpipp)
 GO(udat_open_72, pFiippipip)
 GO(udat_setCalendar_72, vFpp)
 GO(udat_toPattern_72, iFpCpip)
@@ -51,6 +95,9 @@ GO(ulocdata_getMeasurementSystem_72, iFpp)
 
 GO(usearch_close_72, vFp)
 GO(usearch_first_72, iFpp)
+GO(usearch_getBreakIterator_72, pFp)
 GO(usearch_getMatchedLength_72, iFp)
 GO(usearch_last_72, iFpp)
 GO(usearch_openFromCollator_72, pFpipippp)
+GO(usearch_setPattern_72, vFppip)
+GO(usearch_setText_72, vFppip)
diff --git a/src/wrapped/wrappedicuuc67_private.h b/src/wrapped/wrappedicuuc67_private.h
index 8365722e..276342df 100644
--- a/src/wrapped/wrappedicuuc67_private.h
+++ b/src/wrapped/wrappedicuuc67_private.h
@@ -2,6 +2,31 @@
 #error meh!
 #endif
 
+GO(ubrk_clone_67, pFpp)
+GO(ubrk_close_67, vFp)
+GO(ubrk_countAvailable_67, iFv)
+GO(ubrk_current_67, iFp)
+GO(ubrk_first_67, iFp)
+GO(ubrk_following_67, iFpi)
+GO(ubrk_getAvailable_67, pFi)
+GO(ubrk_getBinaryRules_67, iFppip)
+GO(ubrk_getLocaleByType_67, pFpip)
+GO(ubrk_getRuleStatus_67, iFp)
+GO(ubrk_getRuleStatusVec_67, iFppip)
+GO(ubrk_isBoundary_67, cFpi)
+GO(ubrk_last_67, iFp)
+GO(ubrk_next_67, iFp)
+GO(ubrk_open_67, pFppip)
+GO(ubrk_openBinaryRules_67, pFpipip)
+GO(ubrk_openRules_67, pFpipipp)
+GO(ubrk_preceding_67, iFpi)
+GO(ubrk_previous_67, iFp)
+GO(ubrk_refreshUText_67, vFppp)
+GO(ubrk_safeClone_67, pFpppp)
+GO(ubrk_setText_67, vFppip)
+GO(ubrk_setUText_67, vFppp)
+GO(ubrk_swap_67, iFppipp)
+
 GO(ucurr_forLocale_67, iFppip)
 GO(ucurr_getName_67, pFppippp)
 
@@ -17,7 +42,7 @@ GO(uloc_getDisplayLanguage_67, iFpppip)
 GO(uloc_getDisplayName_67, iFpppip)
 GO(uloc_getISO3Country_67, pFp)
 GO(uloc_getISO3Language_67, pFp)
-GO(uloc_getKeywordValue_67, iFppip)
+GO(uloc_getKeywordValue_67, iFpppip)
 GO(uloc_getLanguage_67, iFppip)
 GO(uloc_getLCID_67, uFp)
 GO(uloc_getName_67, iFppip)
@@ -58,3 +83,4 @@ GO(u_strlen_67, iFp)
 GO(u_strncpy_67, pFppi)
 GO(u_tolower_67, uFu)
 GO(u_toupper_67, uFu)
+GO(u_uastrncpy_67, pFppi)
diff --git a/src/wrapped/wrappedicuuc72_private.h b/src/wrapped/wrappedicuuc72_private.h
index 3e74c8ba..99d2dd8b 100644
--- a/src/wrapped/wrappedicuuc72_private.h
+++ b/src/wrapped/wrappedicuuc72_private.h
@@ -2,6 +2,31 @@
 #error meh!
 #endif
 
+GO(ubrk_clone_72, pFpp)
+GO(ubrk_close_72, vFp)
+GO(ubrk_countAvailable_72, iFv)
+GO(ubrk_current_72, iFp)
+GO(ubrk_first_72, iFp)
+GO(ubrk_following_72, iFpi)
+GO(ubrk_getAvailable_72, pFi)
+GO(ubrk_getBinaryRules_72, iFppip)
+GO(ubrk_getLocaleByType_72, pFpip)
+GO(ubrk_getRuleStatus_72, iFp)
+GO(ubrk_getRuleStatusVec_72, iFppip)
+GO(ubrk_isBoundary_72, cFpi)
+GO(ubrk_last_72, iFp)
+GO(ubrk_next_72, iFp)
+GO(ubrk_open_72, pFppip)
+GO(ubrk_openBinaryRules_72, pFpipip)
+GO(ubrk_openRules_72, pFpipipp)
+GO(ubrk_preceding_72, iFpi)
+GO(ubrk_previous_72, iFp)
+GO(ubrk_refreshUText_72, vFppp)
+GO(ubrk_safeClone_72, pFpppp)
+GO(ubrk_setText_72, vFppip)
+GO(ubrk_setUText_72, vFppp)
+GO(ubrk_swap_72, iFppipp)
+
 GO(ucurr_forLocale_72, iFppip)
 GO(ucurr_getName_72, pFppippp)
 
@@ -17,7 +42,7 @@ GO(uloc_getDisplayLanguage_72, iFpppip)
 GO(uloc_getDisplayName_72, iFpppip)
 GO(uloc_getISO3Country_72, pFp)
 GO(uloc_getISO3Language_72, pFp)
-GO(uloc_getKeywordValue_72, iFppip)
+GO(uloc_getKeywordValue_72, iFpppip)
 GO(uloc_getLanguage_72, iFppip)
 GO(uloc_getLCID_72, uFp)
 GO(uloc_getName_72, iFppip)
@@ -58,3 +83,4 @@ GO(u_strlen_72, iFp)
 GO(u_strncpy_72, pFppi)
 GO(u_tolower_72, uFu)
 GO(u_toupper_72, uFu)
+GO(u_uastrncpy_72, pFppi)
diff --git a/src/wrapped/wrappedkrb5.c b/src/wrapped/wrappedkrb5.c
index 26419814..abad8c5d 100644
--- a/src/wrapped/wrappedkrb5.c
+++ b/src/wrapped/wrappedkrb5.c
@@ -34,10 +34,10 @@ GO(4)
 
 // krb5_prompter ...
 #define GO(A)   \
-static uintptr_t my_krb5_prompter_fct_##A = 0;                                      \
-static int my_krb5_prompter_##A(void* a, void* b, void* c, void* d, int e, void* f) \
-{                                                                                   \
-    return RunFunction(my_context, my_krb5_prompter_fct_##A, 6, a, b, c, d, e, f);  \
+static uintptr_t my_krb5_prompter_fct_##A = 0;                                                  \
+static int my_krb5_prompter_##A(void* a, void* b, void* c, void* d, int e, void* f)             \
+{                                                                                               \
+    return RunFunctionFmt(my_krb5_prompter_fct_##A, "ppppip", a, b, c, d, e, f);          \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedldapr.c b/src/wrapped/wrappedldapr.c
index 7b5087e4..fbaee982 100644
--- a/src/wrapped/wrappedldapr.c
+++ b/src/wrapped/wrappedldapr.c
@@ -41,10 +41,10 @@ GO(4)
 
 // LDAP_SASL_INTERACT_PROC ...
 #define GO(A)   \
-static uintptr_t my_LDAP_SASL_INTERACT_PROC_fct_##A = 0;                                \
-static int my_LDAP_SASL_INTERACT_PROC_##A(void* a, unsigned b, void* c, void* d)        \
-{                                                                                       \
-    return RunFunction(my_context, my_LDAP_SASL_INTERACT_PROC_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_LDAP_SASL_INTERACT_PROC_fct_##A = 0;                                        \
+static int my_LDAP_SASL_INTERACT_PROC_##A(void* a, unsigned b, void* c, void* d)                \
+{                                                                                               \
+    return RunFunctionFmt(my_LDAP_SASL_INTERACT_PROC_fct_##A, "pupp", a, b, c, d);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedldlinux.c b/src/wrapped/wrappedldlinux.c
index b5dc0da6..83245e93 100644
--- a/src/wrapped/wrappedldlinux.c
+++ b/src/wrapped/wrappedldlinux.c
@@ -28,6 +28,12 @@ EXPORT void* my___tls_get_addr(void* p)
     return ptr->data+GetTLSBase(my_context->elfs[t->i])+t->o;
 }
 
+EXPORT void* my___libc_stack_end;
+void stSetup(box64context_t* context)
+{
+    my___libc_stack_end = context->stack;   // is this the end, or should I add stasz?
+}
+
 // don't try to load the actual ld-linux (because name is variable), just use box64 itself, as it's linked to ld-linux
 const char* ldlinuxName = "ld-linux.so.2";
 #define LIBNAME ldlinux
@@ -37,6 +43,9 @@ const char* ldlinuxName = "ld-linux.so.2";
         lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);    \
     else
 
+#define CUSTOM_INIT         \
+    stSetup(box64);         \
+
 // define all standard library functions
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedldlinux_private.h b/src/wrapped/wrappedldlinux_private.h
index 7b863d14..9bdcccb1 100644
--- a/src/wrapped/wrappedldlinux_private.h
+++ b/src/wrapped/wrappedldlinux_private.h
@@ -14,7 +14,7 @@
 // _dl_rtld_di_serinfo
 // _dl_tls_setup
 DATA(__libc_enable_secure, sizeof(void*))
-DATA(__libc_stack_end, sizeof(void*))
+DATAM(__libc_stack_end, sizeof(void*))
 DATA(__pointer_chk_guard, sizeof(void*))
 DATAB(_r_debug, 40)
 DATA(_rtld_global, sizeof(void*))
diff --git a/src/wrapped/wrappedlibasound.c b/src/wrapped/wrappedlibasound.c
index b28a36ba..c49f3912 100644
--- a/src/wrapped/wrappedlibasound.c
+++ b/src/wrapped/wrappedlibasound.c
@@ -47,10 +47,10 @@ GO(3)
 
 // snd_async_callback_t
 #define GO(A)   \
-static uintptr_t my_async_fct_##A = 0;   \
-static void* my_async_##A(void* handler)     \
-{                                       \
-    return (void*)RunFunction(my_context, my_async_fct_##A, 1, handler);\
+static uintptr_t my_async_fct_##A = 0;                                          \
+static void* my_async_##A(void* handler)                                        \
+{                                                                               \
+    return (void*)RunFunctionFmt(my_async_fct_##A, "p", handler);         \
 }
 SUPER()
 #undef GO
@@ -69,10 +69,10 @@ static void* findAsyncFct(void* fct)
 }
 // snd_mixer_elem_callback_t
 #define GO(A)   \
-static uintptr_t my_elem_fct_##A = 0;   \
-static int my_elem_##A(void* elem, uint32_t mask)                       \
-{                                                                       \
-    return (int)RunFunction(my_context, my_elem_fct_##A, 2, elem, mask);\
+static uintptr_t my_elem_fct_##A = 0;                                           \
+static int my_elem_##A(void* elem, uint32_t mask)                               \
+{                                                                               \
+    return (int)RunFunctionFmt(my_elem_fct_##A, "pu", elem, mask);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index cc68c216..ff20404e 100644
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -24,7 +24,7 @@
 #include <poll.h>
 #include <sys/epoll.h>
 #include <ftw.h>
-#include <sys/syscall.h> 
+#include <sys/syscall.h>
 #include <sys/socket.h>
 #include <sys/utsname.h>
 #include <sys/mman.h>
@@ -131,10 +131,10 @@ GO(15)
 
 // compare
 #define GO(A)   \
-static uintptr_t my_compare_fct_##A = 0;        \
-static int my_compare_##A(void* a, void* b)     \
-{                                               \
-    return (int)RunFunction(my_context, my_compare_fct_##A, 2, a, b);\
+static uintptr_t my_compare_fct_##A = 0;                                    \
+static int my_compare_##A(void* a, void* b)                                 \
+{                                                                           \
+    return (int)RunFunctionFmt(my_compare_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -160,7 +160,7 @@ static int my_ftw64_##A(void* fpath, void* sb, int flag)    \
 {                                                           \
     struct x64_stat64 x64st;                                \
     UnalignStat64(sb, &x64st);                              \
-    return (int)RunFunction(my_context, my_ftw64_fct_##A, 3, fpath, &x64st, flag);  \
+    return (int)RunFunctionFmt(my_ftw64_fct_##A, "ppi", fpath, &x64st, flag);         \
 }
 SUPER()
 #undef GO
@@ -182,9 +182,9 @@ static void* findftw64Fct(void* fct)
 static uintptr_t my_nftw64_fct_##A = 0;                                     \
 static int my_nftw64_##A(void* fpath, void* sb, int flag, void* ftwbuff)    \
 {                                                                           \
-    struct x64_stat64 x64st;                                              \
-    UnalignStat64(sb, &x64st);                                             \
-    return (int)RunFunction(my_context, my_nftw64_fct_##A, 4, fpath, &x64st, flag, ftwbuff);   \
+    struct x64_stat64 x64st;                                                \
+    UnalignStat64(sb, &x64st);                                              \
+    return (int)RunFunctionFmt(my_nftw64_fct_##A, "ppip", fpath, &x64st, flag, ftwbuff);          \
 }
 SUPER()
 #undef GO
@@ -202,10 +202,10 @@ static void* findnftw64Fct(void* fct)
 }
 // globerr
 #define GO(A)   \
-static uintptr_t my_globerr_fct_##A = 0;                                        \
-static int my_globerr_##A(void* epath, int eerrno)                              \
-{                                                                               \
-    return (int)RunFunction(my_context, my_globerr_fct_##A, 2, epath, eerrno);  \
+static uintptr_t my_globerr_fct_##A = 0;                                                \
+static int my_globerr_##A(void* epath, int eerrno)                                      \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_globerr_fct_##A, "pi", epath, eerrno);          \
 }
 SUPER()
 #undef GO
@@ -225,10 +225,10 @@ static void* findgloberrFct(void* fct)
 }
 // free
 #define GO(A)   \
-static uintptr_t my_free_fct_##A = 0;               \
-static void my_free_##A(void* p)                    \
-{                                                   \
-    RunFunction(my_context, my_free_fct_##A, 1, p); \
+static uintptr_t my_free_fct_##A = 0;                       \
+static void my_free_##A(void* p)                            \
+{                                                           \
+    RunFunctionFmt(my_free_fct_##A, "p", p);          \
 }
 SUPER()
 #undef GO
@@ -251,10 +251,10 @@ static void* findfreeFct(void* fct)
 #undef dirent
 // filter_dir
 #define GO(A)   \
-static uintptr_t my_filter_dir_fct_##A = 0;                               \
-static int my_filter_dir_##A(const struct dirent* a)                    \
-{                                                                       \
-    return (int)RunFunction(my_context, my_filter_dir_fct_##A, 1, a);     \
+static uintptr_t my_filter_dir_fct_##A = 0;                                 \
+static int my_filter_dir_##A(const struct dirent* a)                        \
+{                                                                           \
+    return (int)RunFunctionFmt(my_filter_dir_fct_##A, "p", a);        \
 }
 SUPER()
 #undef GO
@@ -274,10 +274,10 @@ static void* findfilter_dirFct(void* fct)
 }
 // compare_dir
 #define GO(A)   \
-static uintptr_t my_compare_dir_fct_##A = 0;                                  \
-static int my_compare_dir_##A(const struct dirent* a, const struct dirent* b)    \
-{                                                                           \
-    return (int)RunFunction(my_context, my_compare_dir_fct_##A, 2, a, b);     \
+static uintptr_t my_compare_dir_fct_##A = 0;                                    \
+static int my_compare_dir_##A(const struct dirent* a, const struct dirent* b)   \
+{                                                                               \
+    return (int)RunFunctionFmt(my_compare_dir_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -299,10 +299,10 @@ static void* findcompare_dirFct(void* fct)
 
 // filter64
 #define GO(A)   \
-static uintptr_t my_filter64_fct_##A = 0;                               \
-static int my_filter64_##A(const struct dirent64* a)                    \
-{                                                                       \
-    return (int)RunFunction(my_context, my_filter64_fct_##A, 1, a);     \
+static uintptr_t my_filter64_fct_##A = 0;                                   \
+static int my_filter64_##A(const struct dirent64* a)                        \
+{                                                                           \
+    return (int)RunFunctionFmt(my_filter64_fct_##A, "p", a);          \
 }
 SUPER()
 #undef GO
@@ -325,7 +325,7 @@ static void* findfilter64Fct(void* fct)
 static uintptr_t my_compare64_fct_##A = 0;                                      \
 static int my_compare64_##A(const struct dirent64* a, const struct dirent64* b) \
 {                                                                               \
-    return (int)RunFunction(my_context, my_compare64_fct_##A, 2, a, b);         \
+    return (int)RunFunctionFmt(my_compare64_fct_##A, "pp", a, b);         \
 }
 SUPER()
 #undef GO
@@ -345,10 +345,10 @@ static void* findcompare64Fct(void* fct)
 }
 // printf_output
 #define GO(A)   \
-static uintptr_t my_printf_output_fct_##A = 0;                                  \
-static int my_printf_output_##A(void* a, void* b, void* c)                      \
-{                                                                               \
-    return (int)RunFunction(my_context, my_printf_output_fct_##A, 3, a, b, c);  \
+static uintptr_t my_printf_output_fct_##A = 0;                                          \
+static int my_printf_output_##A(void* a, void* b, void* c)                              \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_printf_output_fct_##A, "ppp", a, b, c);         \
 }
 SUPER()
 #undef GO
@@ -368,10 +368,10 @@ static void* findprintf_outputFct(void* fct)
 }
 // printf_arginfo
 #define GO(A)   \
-static uintptr_t my_printf_arginfo_fct_##A = 0;                                     \
-static int my_printf_arginfo_##A(void* a, size_t b, void* c, void* d)               \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_printf_arginfo_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_printf_arginfo_fct_##A = 0;                                             \
+static int my_printf_arginfo_##A(void* a, size_t b, void* c, void* d)                       \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_printf_arginfo_fct_##A, "pLpp", a, b, c, d);        \
 }
 SUPER()
 #undef GO
@@ -391,10 +391,10 @@ static void* findprintf_arginfoFct(void* fct)
 }
 // printf_type
 #define GO(A)   \
-static uintptr_t my_printf_type_fct_##A = 0;                   \
-static void my_printf_type_##A(void* a, va_list* b)            \
-{                                                              \
-    RunFunction(my_context, my_printf_type_fct_##A, 2, a, b);  \
+static uintptr_t my_printf_type_fct_##A = 0;                        \
+static void my_printf_type_##A(void* a, va_list* b)                 \
+{                                                                   \
+    RunFunctionFmt(my_printf_type_fct_##A, "pp", a, b);       \
 }
 SUPER()
 #undef GO
@@ -416,8 +416,8 @@ static void* findprintf_typeFct(void* fct)
 #undef SUPER
 
 // some my_XXX declare and defines
-int32_t my___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, char * *), 
-    int argc, char * * ubp_av, void (*init) (void), void (*fini) (void), 
+int32_t my___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, char * *),
+    int argc, char * * ubp_av, void (*init) (void), void (*fini) (void),
     void (*rtld_fini) (void), void (* stack_end)); // implemented in x64run_private.c
 EXPORT void my___libc_init_first(x64emu_t* emu, int argc, char* arg0, char** b)
 {
@@ -437,7 +437,7 @@ void EXPORT my___stack_chk_fail(x64emu_t* emu)
     if(cycle_log) {
         print_cycle_log(LOG_INFO);
     }
-    StopEmu(emu, buff);
+    StopEmu(emu, buff, emu->segs[_CS]==0x23);
 }
 void EXPORT my___gmon_start__(x64emu_t *emu)
 {
@@ -482,6 +482,11 @@ int my_dl_iterate_phdr(x64emu_t *emu, void* F, void *data);
 
 pid_t EXPORT my_fork(x64emu_t* emu)
 {
+    #if 1
+    emu->quit = 1;
+    emu->fork = 3;  // use regular fork...
+    return 0;
+    #else
     // execute atforks prepare functions, in reverse order
     for (int i=my_context->atfork_sz-1; i>=0; --i)
         if(my_context->atforks[i].prepare)
@@ -494,7 +499,7 @@ pid_t EXPORT my_fork(x64emu_t* emu)
     if(v<0) {
         printf_log(LOG_NONE, "BOX64: Warning, fork errored... (%d)\n", v);
         // error...
-    } else if(v>0) {  
+    } else if(v>0) {
         // execute atforks parent functions
         for (int i=0; i<my_context->atfork_sz; --i)
             if(my_context->atforks[i].parent)
@@ -507,6 +512,7 @@ pid_t EXPORT my_fork(x64emu_t* emu)
                 RunFunctionWithEmu(emu, 0, my_context->atforks[i].child, 0);
     }
     return v;
+    #endif
 }
 pid_t EXPORT my___fork(x64emu_t* emu) __attribute__((alias("my_fork")));
 pid_t EXPORT my_vfork(x64emu_t* emu)
@@ -684,32 +690,17 @@ EXPORT int my___fprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, void* b
     return vfprintf(F, fmt, VARARGS);
 }
 
-#if 0
-EXPORT int my_wprintf(x64emu_t *emu, void* fmt, void* b, va_list V) {
-    #ifndef NOALIGN
-    // need to align on arm
-    myStackAlignW((const char*)fmt, b, emu->scratch);
-    PREPARE_VALIST;
-    void* f = vwprintf;
-    return ((iFpp_t)f)(fmt, VARARGS);
+EXPORT int my_vwprintf(x64emu_t *emu, void* fmt, x64_va_list_t b) {
+    (void)emu;
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(b);
     #else
-    // other platform don't need that
-    return vwprintf((const wchar_t*)fmt, V);
-    #endif
-}
-EXPORT int my___wprintf_chk(x64emu_t *emu, int flag, void* fmt, void* b, va_list V) {
-    #ifndef NOALIGN
-    // need to align on arm
-    myStackAlignW((const char*)fmt, b, emu->scratch);
+    myStackAlignWValist(emu, (const char*)fmt, emu->scratch, b);
     PREPARE_VALIST;
-    void* f = vwprintf;
-    return ((iFpp_t)f)(fmt, VARARGS);
-    #else
-    // other platform don't need that
-    return vwprintf((const wchar_t*)fmt, V);
     #endif
+    int r = vwprintf(fmt, VARARGS);
+    return r;
 }
-#endif
 
 EXPORT int my_fwprintf(x64emu_t *emu, void* F, void* fmt, void* b)  {
     myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2);
@@ -742,19 +733,42 @@ EXPORT int my___vfwprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, x64_v
     return vfwprintf(F, fmt, VARARGS);
 }
 
-#if 0
-EXPORT int my_vwprintf(x64emu_t *emu, void* fmt, void* b) {
-    #ifndef NOALIGN
-    myStackAlignW((const char*)fmt, b, emu->scratch);
+EXPORT int my_dprintf(x64emu_t *emu, int d, void* fmt, void* b) {
+    myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2);
     PREPARE_VALIST;
-    void* f = vwprintf;
-    return ((iFpp_t)f)(fmt, VARARGS);
+    return vdprintf(d, fmt, VARARGS);
+}
+
+EXPORT int my___dprintf_chk(x64emu_t *emu, int d, int flag, void* fmt, void* b)  {
+    (void)flag;
+    myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3);
+    PREPARE_VALIST;
+    return vdprintf(d, fmt, VARARGS);
+}
+
+
+EXPORT int my_vdprintf(x64emu_t *emu, int d, void* fmt, x64_va_list_t b) {
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(b);
     #else
-    void* f = vwprintf;
-    return ((iFpp_t)f)(fmt, b);
+    myStackAlignValist(emu, (const char*)fmt, emu->scratch, b);
+    PREPARE_VALIST;
     #endif
+    return vdprintf(d, fmt, VARARGS);
 }
 
+EXPORT int my___vdprintf_chk(x64emu_t *emu, int d, int flag, void* fmt, x64_va_list_t b)  {
+    (void)flag;
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(b);
+    #else
+    myStackAlignValist(emu, (const char*)fmt, emu->scratch, b);
+    PREPARE_VALIST;
+    #endif
+    return vdprintf(d, fmt, VARARGS);
+}
+
+#if 0
 EXPORT void *my_div(void *result, int numerator, int denominator) {
     *(div_t *)result = div(numerator, denominator);
     return result;
@@ -909,6 +923,14 @@ EXPORT int my___isoc99_sscanf(x64emu_t* emu, void* stream, void* fmt, uint64_t*
   return vsscanf(stream, fmt, VARARGS);
 }
 
+EXPORT int my___isoc99_swscanf(x64emu_t* emu, void* stream, void* fmt, uint64_t* b)
+{
+  myStackAlignScanf(emu, (const char*)fmt, b, emu->scratch, 2);
+  PREPARE_VALIST;
+
+  return vswscanf(stream, fmt, VARARGS);
+}
+
 EXPORT int my_vsnprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) {
     (void)emu;
     #ifdef CONVERT_VALIST
@@ -1649,7 +1671,7 @@ EXPORT int32_t my___open(x64emu_t* emu, void* pathname, int32_t flags, uint32_t
 //            unprotectDB((uintptr_t)p, count-ret, 1);
 //            int l;
 //            do {
-//                l = read(fd, p, count-ret); 
+//                l = read(fd, p, count-ret);
 //                if(l>0) {
 //                    p+=l; ret+=l;
 //                }
@@ -1873,11 +1895,11 @@ EXPORT int32_t my_execv(x64emu_t* emu, const char* path, char* const argv[])
         int n=skip_first;
         while(argv[n]) ++n;
         int toadd = script?2:1;
-        const char** newargv = (const char**)box_calloc(n+toadd+1, sizeof(char*));
+        const char** newargv = (const char**)box_calloc(n+toadd+2, sizeof(char*));
         newargv[0] = x86?emu->context->box86path:emu->context->box64path;
         if(script) newargv[1] = emu->context->bashpath; // script needs to be launched with bash
         memcpy(newargv+toadd, argv+skip_first, sizeof(char*)*(n+toadd));
-        if(self) 
+        if(self)
             newargv[1] = emu->context->fullpath;
         else {
             // TODO check if envp is not environ and add the value on a copy
@@ -2053,7 +2075,7 @@ EXPORT int32_t my_execvp(x64emu_t* emu, const char* path, char* const argv[])
         // uname -m is redirected to box64 -m
         path = my_context->box64path;
         char *argv2[3] = { my_context->box64path, argv[1], NULL };
-        
+
         return execvp(path, argv2);
     }
 
@@ -2067,7 +2089,7 @@ EXPORT int32_t my_execl(x64emu_t* emu, const char* path)
     int x64 = FileIsX64ELF(path);
     int x86 = my_context->box86path?FileIsX86ELF(path):0;
     int script = (my_context->bashpath && FileIsShell(path))?1:0;
-    printf_log(LOG_DEBUG, "execl(\"%s\", ...), IsX86=%d, self=%d\n", path, x64, self);
+    printf_log(LOG_DEBUG, "execle(\"%s\", ...), IsX86=%d, self=%d\n", path, x64, self);
     // count argv...
     int i=0;
     while(getVargN(emu, i+1)) ++i;
@@ -2080,12 +2102,42 @@ EXPORT int32_t my_execl(x64emu_t* emu, const char* path)
     for (int k=0; k<i; ++k)
         newargv[j++] = getVargN(emu, k+1);
     if(self) newargv[1] = emu->context->fullpath;
-    printf_log(LOG_DEBUG, " => execl(\"%s\", %p [\"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[1], i?newargv[2]:"", i);
+    printf_log(LOG_DEBUG, " => execle(\"%s\", %p [\"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[1], i?newargv[2]:"", i);
     int ret = execv(newargv[0], newargv);
     box_free(newargv);
     return ret;
 }
 
+EXPORT int32_t my_execle(x64emu_t* emu, const char* path)
+{
+    int self = isProcSelf(path, "exe");
+    int x64 = FileIsX64ELF(path);
+    int x86 = my_context->box86path?FileIsX86ELF(path):0;
+    int script = (my_context->bashpath && FileIsShell(path))?1:0;
+    printf_log(LOG_DEBUG, "execl(\"%s\", ...), IsX86=%d, self=%d\n", path, x64, self);
+    // hack to update the environ var if needed
+    // count argv...
+    int i=0;
+    while(getVargN(emu, i+1)) ++i;
+    int toadd = script?2:((x64||self)?1:0);
+    char** newargv = (char**)box_calloc(i+toadd+1, sizeof(char*));
+    char** envp = (char**)getVargN(emu, i+2);
+    if(envp == my_context->envv && environ) {
+        envp = environ;
+    }
+    int j=0;
+    if ((x64 || x86 || script || self))
+        newargv[j++] = x86?emu->context->box86path:emu->context->box64path;
+    if(script) newargv[j++] = emu->context->bashpath;
+    for (int k=0; k<i; ++k)
+        newargv[j++] = getVargN(emu, k+1);
+    if(self) newargv[1] = emu->context->fullpath;
+    printf_log(LOG_DEBUG, " => execle(\"%s\", %p [\"%s\", \"%s\"...:%d], %p)\n", newargv[0], newargv, newargv[1], i?newargv[2]:"", i, envp);
+    int ret = execve(newargv[0], newargv, envp);
+    box_free(newargv);
+    return ret;
+}
+
 EXPORT int32_t my_execlp(x64emu_t* emu, const char* path)
 {
     // need to use BOX64_PATH / PATH here...
@@ -2124,7 +2176,7 @@ EXPORT int32_t my_execlp(x64emu_t* emu, const char* path)
     return ret;
 }
 
-EXPORT int32_t my_posix_spawn(x64emu_t* emu, pid_t* pid, const char* fullpath, 
+EXPORT int32_t my_posix_spawn(x64emu_t* emu, pid_t* pid, const char* fullpath,
     const posix_spawn_file_actions_t *actions, const posix_spawnattr_t* attrp,  char* const argv[], char* const envp[])
 {
     int self = isProcSelf(fullpath, "exe");
@@ -2157,13 +2209,13 @@ EXPORT int32_t my_posix_spawn(x64emu_t* emu, pid_t* pid, const char* fullpath,
         ret = posix_spawn(pid, newargv[0], actions, attrp, (char* const*)newargv, envp);
         printf_log(/*LOG_DEBUG*/LOG_INFO, "posix_spawn returned %d\n", ret);
         //box_free(newargv);
-    } else 
+    } else
         ret = posix_spawn(pid, fullpath, actions, attrp, argv, envp);
     return ret;
 }
 
 // execvp should use PATH to search for the program first
-EXPORT int32_t my_posix_spawnp(x64emu_t* emu, pid_t* pid, const char* path, 
+EXPORT int32_t my_posix_spawnp(x64emu_t* emu, pid_t* pid, const char* path,
     const posix_spawn_file_actions_t *actions, const posix_spawnattr_t* attrp,  char* const argv[], char* const envp[])
 {
     // need to use BOX64_PATH / PATH here...
@@ -2232,7 +2284,7 @@ EXPORT int32_t my___register_atfork(x64emu_t *emu, void* prepare, void* parent,
 EXPORT uint64_t my___umoddi3(uint64_t a, uint64_t b)
 {
     return a%b;
-}  
+}
 EXPORT uint64_t my___udivdi3(uint64_t a, uint64_t b)
 {
     return a/b;
@@ -2297,8 +2349,8 @@ EXPORT int32_t my_fcntl(x64emu_t* emu, int32_t a, int32_t b, void* c)
     int ret = fcntl(a, b, c);
     if(b==F_GETFL && ret!=-1)
         ret = of_unconvert(ret);
-    
-    return ret;    
+
+    return ret;
 }
 EXPORT int32_t my___fcntl(x64emu_t* emu, int32_t a, int32_t b, void* c) __attribute__((alias("my_fcntl")));
 
@@ -2371,10 +2423,10 @@ void InitCpuModel()
     my___cpu_model.__cpu_vendor = VENDOR_INTEL;
     my___cpu_model.__cpu_type = INTEL_PENTIUM_M;
     my___cpu_model.__cpu_subtype = 0; // N/A
-    my___cpu_model.__cpu_features[0] = (1<<FEATURE_CMOV) 
-                                     | (1<<FEATURE_MMX) 
-                                     | (1<<FEATURE_SSE) 
-                                     | (1<<FEATURE_SSE2) 
+    my___cpu_model.__cpu_features[0] = (1<<FEATURE_CMOV)
+                                     | (1<<FEATURE_MMX)
+                                     | (1<<FEATURE_SSE)
+                                     | (1<<FEATURE_SSE2)
                                      | (1<<FEATURE_SSE3)
                                      | (1<<FEATURE_SSSE3)
                                      | (1<<FEATURE_MOVBE)
@@ -2393,12 +2445,6 @@ void ctSetup()
     my___ctype_tolower = *(__ctype_tolower_loc());
 }
 
-EXPORT void* my___libc_stack_end;
-void stSetup(box64context_t* context)
-{
-    my___libc_stack_end = context->stack;   // is this the end, or should I add stasz?
-}
-
 EXPORT void my___register_frame_info(void* a, void* b)
 {
     // nothing
@@ -2514,7 +2560,7 @@ EXPORT int my_readlinkat(x64emu_t* emu, int fd, void* path, void* buf, size_t bu
 EXPORT void* my_mmap64(x64emu_t* emu, void *addr, unsigned long length, int prot, int flags, int fd, int64_t offset)
 {
     (void)emu;
-    if(prot&PROT_WRITE) 
+    if(prot&PROT_WRITE)
         prot|=PROT_READ;    // PROT_READ is implicit with PROT_WRITE on i386
     if(box64_log<LOG_DEBUG) {dynarec_log(LOG_DEBUG, "mmap64(%p, %lu, 0x%x, 0x%x, %d, %ld) => ", addr, length, prot, flags, fd, offset);}
     #ifndef NOALIGN
@@ -2530,7 +2576,7 @@ EXPORT void* my_mmap64(x64emu_t* emu, void *addr, unsigned long length, int prot
     #endif
     void* ret = mmap64(addr, length, prot, flags, fd, offset);
     #ifndef NOALIGN
-    if((ret!=(void*)-1) && (flags&0x40) && 
+    if((ret!=(void*)-1) && (flags&0x40) &&
       (((uintptr_t)ret>0xffffffffLL) || (box64_wine && ((uintptr_t)ret&0xffff)))) {
         printf_log(LOG_DEBUG, "Warning, mmap on 32bits didn't worked, ask %p, got %p ", addr, ret);
         munmap(ret, length);
@@ -2581,7 +2627,7 @@ EXPORT void* my_mremap(x64emu_t* emu, void* old_addr, size_t old_size, size_t ne
     uint32_t prot = getProtection((uintptr_t)old_addr)&~PROT_CUSTOM;
     if(ret==old_addr) {
         if(old_size && old_size<new_size) {
-            setProtection((uintptr_t)ret+old_size, new_size-old_size, prot);
+            setProtection_mmap((uintptr_t)ret+old_size, new_size-old_size, prot);
             #ifdef DYNAREC
             if(box64_dynarec)
                 addDBFromAddressRange((uintptr_t)ret+old_size, new_size-old_size);
@@ -2590,10 +2636,10 @@ EXPORT void* my_mremap(x64emu_t* emu, void* old_addr, size_t old_size, size_t ne
             freeProtection((uintptr_t)ret+new_size, old_size-new_size);
             #ifdef DYNAREC
             if(box64_dynarec)
-                cleanDBFromAddressRange((uintptr_t)ret+new_size, new_size-old_size, 1);
+                cleanDBFromAddressRange((uintptr_t)ret+new_size, old_size-new_size, 1);
             #endif
         } else if(!old_size) {
-            setProtection((uintptr_t)ret, new_size, prot);
+            setProtection_mmap((uintptr_t)ret, new_size, prot);
             #ifdef DYNAREC
             if(box64_dynarec)
                 addDBFromAddressRange((uintptr_t)ret, new_size);
@@ -2640,19 +2686,26 @@ EXPORT int my_mprotect(x64emu_t* emu, void *addr, unsigned long len, int prot)
 {
     (void)emu;
     dynarec_log(LOG_DEBUG, "mprotect(%p, %lu, 0x%x)\n", addr, len, prot);
-    if(prot&PROT_WRITE) 
+    if(prot&PROT_WRITE)
         prot|=PROT_READ;    // PROT_READ is implicit with PROT_WRITE on x86_64
     int ret = mprotect(addr, len, prot);
     #ifdef DYNAREC
-    if(box64_dynarec && !ret) {
+    if(box64_dynarec && !ret && len) {
         if(prot& PROT_EXEC)
             addDBFromAddressRange((uintptr_t)addr, len);
         else
-            cleanDBFromAddressRange((uintptr_t)addr, len, 0);
+            cleanDBFromAddressRange((uintptr_t)addr, len, 1);
     }
     #endif
-    if(!ret)
-        updateProtection((uintptr_t)addr, len, prot);
+    if(!ret && len) {
+        if(prot)
+            updateProtection((uintptr_t)addr, len, prot);
+        else {
+            // avoid allocating detailled protection for a no prot 0
+            freeProtection((uintptr_t)addr, len);
+            setProtection_mmap((uintptr_t)addr, len, prot);
+        }
+    }
     return ret;
 }
 
@@ -2696,7 +2749,13 @@ EXPORT int my_getopt_long_only(int argc, char* const argv[], const char* optstri
     return ret;
 }
 
-#if 0
+typedef struct {
+   void  *read;
+   void *write;
+   void  *seek;
+   void *close;
+} my_cookie_io_functions_t;
+
 typedef struct my_cookie_s {
     uintptr_t r, w, s, c;
     void* cookie;
@@ -2705,39 +2764,41 @@ typedef struct my_cookie_s {
 static ssize_t my_cookie_read(void *p, char *buf, size_t size)
 {
     my_cookie_t* cookie = (my_cookie_t*)p;
-    return (ssize_t)RunFunction(my_context, cookie->r, 3, cookie->cookie, buf, size);
+    return (ssize_t)RunFunctionFmt(cookie->r, "ppL", cookie->cookie, buf, size)       ;
 }
 static ssize_t my_cookie_write(void *p, const char *buf, size_t size)
 {
     my_cookie_t* cookie = (my_cookie_t*)p;
-    return (ssize_t)RunFunction(my_context, cookie->w, 3, cookie->cookie, buf, size);
+    return (ssize_t)RunFunctionFmt(cookie->w, "ppL", cookie->cookie, buf, size)       ;
 }
 static int my_cookie_seek(void *p, off64_t *offset, int whence)
 {
     my_cookie_t* cookie = (my_cookie_t*)p;
-    return RunFunction(my_context, cookie->s, 3, cookie->cookie, offset, whence);
+    return RunFunctionFmt(cookie->s, "ppi", cookie->cookie, offset, whence)       ;
 }
 static int my_cookie_close(void *p)
 {
     my_cookie_t* cookie = (my_cookie_t*)p;
     int ret = 0;
     if(cookie->c)
-        ret = RunFunction(my_context, cookie->c, 1, cookie->cookie);
+        ret = RunFunctionFmt(cookie->c, "p", cookie->cookie)      ;
     box_free(cookie);
     return ret;
 }
-EXPORT void* my_fopencookie(x64emu_t* emu, void* cookie, void* mode, void* read, void* write, void* seek, void* close)
+EXPORT void* my_fopencookie(x64emu_t* emu, void* cookie, void* mode, my_cookie_io_functions_t *s)
 {
-    cookie_io_functions_t io_funcs = {read?my_cookie_read:NULL, write?my_cookie_write:NULL, seek?my_cookie_seek:NULL, my_cookie_close};
+    cookie_io_functions_t io_funcs = {s->read?my_cookie_read:NULL, s->write?my_cookie_write:NULL, s->seek?my_cookie_seek:NULL, my_cookie_close};
     my_cookie_t *cb = (my_cookie_t*)box_calloc(1, sizeof(my_cookie_t));
-    cb->r = (uintptr_t)read;
-    cb->w = (uintptr_t)write;
-    cb->s = (uintptr_t)seek;
-    cb->c = (uintptr_t)close;
+    cb->r = (uintptr_t)s->read;
+    cb->w = (uintptr_t)s->write;
+    cb->s = (uintptr_t)s->seek;
+    cb->c = (uintptr_t)s->close;
     cb->cookie = cookie;
     return fopencookie(cb, mode, io_funcs);
 }
 
+#if 0
+
 EXPORT long my_prlimit64(void* pid, uint32_t res, void* new_rlim, void* old_rlim)
 {
     return syscall(__NR_prlimit64, pid, res, new_rlim, old_rlim);
@@ -2933,7 +2994,7 @@ EXPORT int my_backtrace(x64emu_t* emu, void** buffer, int size)
     buffer[0] = (void*)addr;
     while (++idx < size) {
         uintptr_t ret_addr = get_parent_registers(unwind, FindElfAddress(my_context, addr), addr, &success);
-        if (ret_addr == (uintptr_t)GetExit()) {
+        if (ret_addr == my_context->exit_bridge) {
             // TODO: do something to be able to get the function name
             buffer[idx] = (void*)ret_addr;
             success = 2;
@@ -2963,7 +3024,7 @@ EXPORT int my_backtrace_ip(x64emu_t* emu, void** buffer, int size)
     buffer[0] = (void*)addr;
     while ((++idx < size) && success) {
         uintptr_t ret_addr = get_parent_registers(unwind, FindElfAddress(my_context, addr), addr, &success);
-        if (ret_addr == (uintptr_t)GetExit()) {
+        if (ret_addr == my_context->exit_bridge) {
             // TODO: do something to be able to get the function name
             buffer[idx] = (void*)ret_addr;
             success = 2;
@@ -2994,7 +3055,7 @@ EXPORT int my_backtrace_ip(x64emu_t* emu, void** buffer, int size)
                         unwind->regs[7] += 8;
                         buffer[idx] = (void*)ret_addr;
                         success = 2;
-                    } else 
+                    } else
                         break;
                 }
             } else
@@ -3041,7 +3102,7 @@ EXPORT void my_backtrace_symbols_fd(x64emu_t* emu, uintptr_t* buffer, int size,
         if(!sz) sz=0x100;   // arbitrary value...
         if(symbname && buffer[i]>=start && (buffer[i]<(start+sz) || !sz))
             snprintf(s, 200, "%s+%ld [%p]\n", symbname, buffer[i] - start, (void*)buffer[i]);
-        else 
+        else
             snprintf(s, 200, "??? [%p]\n", (void*)buffer[i]);
         int dummy = write(fd, s, strlen(s));
         (void)dummy;
@@ -3138,8 +3199,8 @@ EXPORT int my_clone(x64emu_t* emu, void* fn, void* stack, int flags, void* args,
     void* mystack = NULL;
     clone_arg_t* arg = (clone_arg_t*)box_calloc(1, sizeof(clone_arg_t));
     x64emu_t * newemu = NewX64Emu(emu->context, R_RIP, (uintptr_t)stack, 0, 0);
-    SetupX64Emu(newemu);
-    CloneEmu(newemu, emu);
+    SetupX64Emu(newemu, emu);
+    //CloneEmu(newemu, emu);
     if(my_context->stack_clone_used) {
         printf_log(LOG_DEBUG, " no free stack_clone ");
         mystack = box_malloc(1024*1024);  // stack for own process... memory leak, but no practical way to remove it
@@ -3197,6 +3258,7 @@ EXPORT int my_register_printf_type(x64emu_t* emu, void* f)
     return my->register_printf_type(findprintf_typeFct(f));
 }
 
+extern int box64_quit;
 EXPORT void my_exit(x64emu_t* emu, int code)
 {
     if(emu->quitonexit) {
@@ -3206,6 +3268,7 @@ EXPORT void my_exit(x64emu_t* emu, int code)
         return;
     }
     emu->quit = 1;
+    box64_quit = 1;
     exit(code);
 }
 
@@ -3242,7 +3305,6 @@ EXPORT char my___libc_single_threaded = 0;
     box64->libclib = lib;   \
     /*InitCpuModel();*/         \
     ctSetup();              \
-    stSetup(box64);         \
     obstackSetup();         \
     my_environ = my__environ = my___environ = box64->envv;                      \
     my___progname_full = my_program_invocation_name = box64->argv[0];           \
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index ff3ca47b..bcef070d 100644
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -219,8 +219,8 @@ GOWM(dl_iterate_phdr, iFEpp)
 //GO(_dl_sym, 
 //GO(_dl_vsym, 
 GOW(dngettext, pFpppL)
-//GO(dprintf, iFipV)
-//GO(__dprintf_chk, 
+GOM(dprintf, iFEipV)
+GOM(__dprintf_chk, iFEiipV)
 GO(drand48, dFv)
 GO(drand48_r, iFpp)
 GOW(dup, iFi)
@@ -294,7 +294,7 @@ GO(eventfd, iFui)
 GO(eventfd_read, iFip)
 GO(eventfd_write, iFiL)
 GOM(execl, iFEpV) // First argument is also part of the variadic
-//GOM(execle, iFEpV) // First argument is also part of the variadic
+GOM(execle, iFEpV) // First argument is also part of the variadic
 GOM(execlp, iFEpV) // First argument is also part of the variadic
 GOM(execv, iFEpp)
 GOWM(execve, iFEppp)
@@ -384,7 +384,7 @@ GO(fmtmsg, iFlpippp)
 GO(fnmatch, iFppi)
 GOM(fopen, pFEpp)
 GOWM(fopen64, pFEpp)
-//GO(fopencookie, pFpp?)
+GOM(fopencookie, pFEppV)
 //GO(__fork, 
 GOWM(fork, iFEv)
 //GO(__fortify_fail, 
@@ -929,7 +929,7 @@ GOM(__isoc99_fscanf, iFEppV)
 //GO(__isoc99_fwscanf, iFppV)
 GOM(__isoc99_scanf, iFEpV)
 GOM(__isoc99_sscanf, iFEppV)
-//GO(__isoc99_swscanf, iFppV)
+GOM(__isoc99_swscanf, iFEppV)
 GOM(__isoc99_vfscanf, iFEppp)
 //GO(__isoc99_vfwscanf, iFppA)
 //GO(__isoc99_vscanf, iFpA)
@@ -1136,9 +1136,9 @@ GO(__mbrtowc, LFppLp)
 GO(mbrtowc, LFppLp)
 GOW(mbsinit, iFp)
 GO(mbsnrtowcs, LFppLLp)
-//GO(__mbsnrtowcs_chk, 
+GO(__mbsnrtowcs_chk, LFppLLpL)
 GO(mbsrtowcs, LFppLp)
-//GO(__mbsrtowcs_chk, 
+GO(__mbsrtowcs_chk, LFppLpL)
 GO(mbstowcs, LFppL)
 //GO(__mbstowcs_chk, 
 GO(mbtowc, iFppL)
@@ -1304,7 +1304,7 @@ DATA(opterr, sizeof(int))
 DATA(optind, sizeof(int))
 DATA(optopt, sizeof(int))
 GO(__overflow, iFpi)
-//GO(parse_printf_format, 
+GO(parse_printf_format, LFpLp)
 //GO(passwd2des, // Deprecated
 GO(pathconf, lFpi)
 GOW(pause, iFv)
@@ -1362,7 +1362,7 @@ GOW(posix_spawn_file_actions_destroy, iFp)
 GOW(posix_spawn_file_actions_init, iFp)
 GOM(posix_spawnp, iFEpppppp)
 GO(ppoll, iFpLpp)
-//GO(__ppoll_chk, 
+GO(__ppoll_chk, iFpuppL)
 GOWM(prctl, iFEiLLLL)
 GO(pread, IFipUI)
 GOW(__pread64, lFipLI)
@@ -1693,7 +1693,7 @@ GO(siggetmask, iFv)
 GO(sighold, iFi)
 GO(sigignore, iFi)
 GO(siginterrupt, iFii)
-//GO(sigisemptyset, iF!)
+GO(sigisemptyset, iFp)
 //GO(__sigismember, 
 GO(sigismember, iFpi)
 GOM(siglongjmp, vFEpi)
@@ -2051,8 +2051,8 @@ GO(utmpxname, iFp)
 GO(valloc, pFL)
 GOWM(vasprintf, iFEppA)
 GOM(__vasprintf_chk, iFEpipp)
-//GOW(vdprintf, iFipA)
-//GO(__vdprintf_chk, 
+GOM(vdprintf, iFEipA)
+GOM(__vdprintf_chk, iFEiipA)
 //GO(verr, vFipA)
 //GO(verrx, vFipA)
 GOW(versionsort, iFpp)
@@ -2087,7 +2087,7 @@ GOM(__vsyslog_chk, vFEiipA)
 //GO(vtimes, // Deprecated
 //GO(vwarn, vFpA)
 //GO(vwarnx, vFpA)
-//GO(vwprintf, iFpA)
+GOM(vwprintf, iFEpA)
 //GO(__vwprintf_chk, 
 //GO(vwscanf, iFpA)
 GOW(__wait, iFp)
@@ -2207,11 +2207,11 @@ GO(wmemcmp, iFppL)
 GOW(wmemcpy, pFppL)
 GO(__wmemcpy_chk, pFppLL)
 GO(wmemmove, pFppL)
-//GO(__wmemmove_chk, 
+GO(__wmemmove_chk, pFppLL)
 GOW(wmempcpy, pFppL)
 //GO(__wmempcpy_chk, 
 GO(wmemset, pFpuL)
-//GO(__wmemset_chk, 
+GO(__wmemset_chk, pFpuLL)
 GO(wordexp, iFppi)
 GO(wordfree, vFp)
 //GO(__woverflow, 
diff --git a/src/wrapped/wrappedlibcups.c b/src/wrapped/wrappedlibcups.c
index 23541940..16ea4725 100644
--- a/src/wrapped/wrappedlibcups.c
+++ b/src/wrapped/wrappedlibcups.c
@@ -36,10 +36,10 @@ GO(4)
 
 // cups_dest_cb_t ...
 #define GO(A)   \
-static uintptr_t my_cups_dest_cb_t_fct_##A = 0;                                 \
-static int my_cups_dest_cb_t_##A(void* a, uint32_t b, void* c)                  \
-{                                                                               \
-    return (int)RunFunction(my_context, my_cups_dest_cb_t_fct_##A, 3, a, b, c); \
+static uintptr_t my_cups_dest_cb_t_fct_##A = 0;                                         \
+static int my_cups_dest_cb_t_##A(void* a, uint32_t b, void* c)                          \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_cups_dest_cb_t_fct_##A, "pup", a, b, c);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c
index 9caaba56..47c47c6b 100644
--- a/src/wrapped/wrappedlibdl.c
+++ b/src/wrapped/wrappedlibdl.c
@@ -139,6 +139,8 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag)
                 }
                 IncRefCount(dl->dllibs[i].lib, emu);
                 ++dl->dllibs[i].count;
+                if(!is_local && isLibLocal(dl->dllibs[i].lib))
+                    promoteLocalLibGlobal(dl->dllibs[i].lib);
                 printf_dlsym(LOG_DEBUG, "dlopen: Recycling %s/%p count=%ld (dlopened=%ld, elf_index=%d)\n", rfilename, (void*)(i+1), dl->dllibs[i].count, dl->dllibs[i].dlopened, GetElfIndex(dl->dllibs[i].lib));
                 return (void*)(i+1);
             }
@@ -175,7 +177,7 @@ void* my_dlopen(x64emu_t* emu, void *filename, int flag)
         int bindnow = (!box64_musl && (flag&0x2))?1:0;
         needed_libs_t *tmp = new_neededlib(1);
         tmp->names[0] = rfilename;
-        if(AddNeededLib(NULL, is_local, bindnow, tmp, my_context, emu)) {
+        if(AddNeededLib(NULL, is_local, bindnow, tmp, NULL, my_context, emu)) {
             printf_dlsym(strchr(rfilename,'/')?LOG_DEBUG:LOG_INFO, "Warning: Cannot dlopen(\"%s\"/%p, %X)\n", rfilename, filename, flag);
             if(!dl->last_error)
                 dl->last_error = box_malloc(129);
@@ -267,26 +269,31 @@ int my_dlsym_lib(library_t* lib, const char* rsymbol, uintptr_t *start, uintptr_
 
     return ret;
 }
+int GetTID();
 void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
 {
     (void)emu;
+    static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+    pthread_mutex_lock(&mutex);
     dlprivate_t *dl = my_context->dlprivate;
     uintptr_t start = 0, end = 0;
     char* rsymbol = (char*)symbol;
     CLEARERR
-    printf_dlsym(LOG_DEBUG, "Call to dlsym(%p, \"%s\")%s", handle, rsymbol, dlsym_error?"":"\n");
+    printf_dlsym(LOG_DEBUG, "%04d|Call to dlsym(%p, \"%s\")%s", GetTID(), handle, rsymbol, dlsym_error?"":"\n");
     if(handle==NULL) {
         // special case, look globably
         const char* globdefver = GetMaplibDefaultVersion(my_context->maplib, NULL, 0, rsymbol);
         const char* weakdefver = GetMaplibDefaultVersion(my_context->maplib, NULL, 1, rsymbol);
         if(GetGlobalSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, NULL, -1, NULL, globdefver, weakdefver)) {
             printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
+            pthread_mutex_unlock(&mutex);
             return (void*)start;
         }
         if(!dl->last_error)
             dl->last_error = box_malloc(129);
         snprintf(dl->last_error, 129, "Symbol \"%s\" not found in %p)\n", rsymbol, handle);
         printf_dlsym(LOG_NEVER, "%p\n", NULL);
+        pthread_mutex_unlock(&mutex);
         return NULL;
     }
     if(handle==(void*)~0LL) {
@@ -296,12 +303,14 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
         elfheader_t *elf = FindElfAddress(my_context, *(uintptr_t*)R_RSP); // use return address to guess "self"
         if(GetNoSelfSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, elf, 0, -1, NULL, globdefver, weakdefver)) {
             printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
+            pthread_mutex_unlock(&mutex);
             return (void*)start;
         }
         if(!dl->last_error)
             dl->last_error = box_malloc(129);
         snprintf(dl->last_error, 129, "Symbol \"%s\" not found in %p)\n", rsymbol, handle);
         printf_dlsym(LOG_NEVER, "%p\n", NULL);
+        pthread_mutex_unlock(&mutex);
         return NULL;
     }
     size_t nlib = (size_t)handle;
@@ -312,6 +321,7 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
             dl->last_error = box_malloc(129);
         snprintf(dl->last_error, 129, "Bad handle %p)\n", handle);
         printf_dlsym(LOG_NEVER, "%p\n", NULL);
+        pthread_mutex_unlock(&mutex);
         return NULL;
     }
     if(!dl->dllibs[nlib].count || !dl->dllibs[nlib].full) {
@@ -319,6 +329,7 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
             dl->last_error = box_malloc(129);
         snprintf(dl->last_error, 129, "Bad handle %p (already closed))\n", handle);
         printf_dlsym(LOG_NEVER, "%p\n", (void*)NULL);
+        pthread_mutex_unlock(&mutex);
         return NULL;
     }
     if(dl->dllibs[nlib].lib) {
@@ -331,6 +342,7 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
             if(!dl->last_error)
                 dl->last_error = box_malloc(129);
             snprintf(dl->last_error, 129, "Symbol \"%s\" not found in %p(%s)", rsymbol, handle, GetNameLib(dl->dllibs[nlib].lib));
+            pthread_mutex_unlock(&mutex);
             return NULL;
         }
     } else {
@@ -340,15 +352,18 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
         const char* weakdefver = GetMaplibDefaultVersion(my_context->maplib, NULL, 1, rsymbol);
         if(GetGlobalSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, NULL, -1, NULL, globdefver, weakdefver)) {
             printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
+            pthread_mutex_unlock(&mutex);
             return (void*)start;
         }
         if(!dl->last_error)
             dl->last_error = box_malloc(129);
         snprintf(dl->last_error, 129, "Symbol \"%s\" not found in %p)\n", rsymbol, handle);
         printf_dlsym(LOG_NEVER, "%p\n", NULL);
+        pthread_mutex_unlock(&mutex);
         return NULL;
     }
     printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
+    pthread_mutex_unlock(&mutex);
     return (void*)start;
 }
 int my_dlclose(x64emu_t* emu, void *handle)
diff --git a/src/wrapped/wrappedlibfuse.c b/src/wrapped/wrappedlibfuse.c
index ee75fa3d..2bac5099 100644
--- a/src/wrapped/wrappedlibfuse.c
+++ b/src/wrapped/wrappedlibfuse.c
@@ -140,10 +140,10 @@ GO(3)
 
 // fuse_opt_proc
 #define GO(A)   \
-static uintptr_t my_fuse_opt_proc_fct_##A = 0;                                      \
-static int my_fuse_opt_proc_##A(void* a, void* b, int c, void* d)                   \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_fuse_opt_proc_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_fuse_opt_proc_fct_##A = 0;                                              \
+static int my_fuse_opt_proc_##A(void* a, void* b, int c, void* d)                           \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_fuse_opt_proc_fct_##A, "ppip", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -163,11 +163,11 @@ static void* findfuse_opt_procFct(void* fct)
 
 // init
 #define GO(A)   \
-static uintptr_t my_init_fct_##A = 0;                 \
-static void my_init_##A(void* a, void* b)             \
-{                                                     \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "init");               \
-    RunFunction(my_context, my_init_fct_##A, 2, a, b);\
+static uintptr_t my_init_fct_##A = 0;                           \
+static void my_init_##A(void* a, void* b)                       \
+{                                                               \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "init");           \
+    RunFunctionFmt(my_init_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -187,11 +187,11 @@ static void* find_init_Fct(void* fct)
 
 // destroy
 #define GO(A)   \
-static uintptr_t my_destroy_fct_##A = 0;                \
-static void my_destroy_##A(void* a)                     \
-{                                                       \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "destroy");                \
-    RunFunction(my_context, my_destroy_fct_##A, 1, a);  \
+static uintptr_t my_destroy_fct_##A = 0;                    \
+static void my_destroy_##A(void* a)                         \
+{                                                           \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "destroy");    \
+    RunFunctionFmt(my_destroy_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -215,7 +215,7 @@ static uintptr_t my_lookup_fct_##A = 0;
 static void my_lookup_##A(void* a, unsigned long b, const char* c)              \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s(%p, %lu, %s)\n", "lookup", a, b, c);   \
-    RunFunction(my_context, my_lookup_fct_##A, 3, a, b, c);                     \
+    RunFunctionFmt(my_lookup_fct_##A, "pLp", a, b, c);              \
 }
 SUPER()
 #undef GO
@@ -235,11 +235,11 @@ static void* find_lookup_Fct(void* fct)
 
 // forget
 #define GO(A)   \
-static uintptr_t my_forget_fct_##A = 0;                     \
-static void my_forget_##A(void* a, unsigned long b, unsigned long c)\
-{                                                           \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "forget");             \
-    RunFunction(my_context, my_forget_fct_##A, 3, a, b, c); \
+static uintptr_t my_forget_fct_##A = 0;                                 \
+static void my_forget_##A(void* a, unsigned long b, unsigned long c)    \
+{                                                                       \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "forget");                 \
+    RunFunctionFmt(my_forget_fct_##A, "pLL", a, b, c);      \
 }
 SUPER()
 #undef GO
@@ -259,11 +259,11 @@ static void* find_forget_Fct(void* fct)
 
 // getattr
 #define GO(A)   \
-static uintptr_t my_getattr_fct_##A = 0;                        \
-static void my_getattr_##A(void* a, unsigned long b, void* c)   \
-{                                                               \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "getattr");        \
-    RunFunction(my_context, my_getattr_fct_##A, 3, a, b, c);    \
+static uintptr_t my_getattr_fct_##A = 0;                            \
+static void my_getattr_##A(void* a, unsigned long b, void* c)       \
+{                                                                   \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "getattr");            \
+    RunFunctionFmt(my_getattr_fct_##A, "pLp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -283,13 +283,13 @@ static void* find_getattr_Fct(void* fct)
 
 // setattr
 #define GO(A)   \
-static uintptr_t my_setattr_fct_##A = 0;                        \
-static void my_setattr_##A(void* a, unsigned long b, struct stat* c, int d, void* e)   \
-{                                                               \
-    struct stat c_;                                             \
-    AlignStat64(c, &c_);                                        \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "setattr");        \
-    RunFunction(my_context, my_setattr_fct_##A, 5, a, b, &c_, d, e);    \
+static uintptr_t my_setattr_fct_##A = 0;                                            \
+static void my_setattr_##A(void* a, unsigned long b, struct stat* c, int d, void* e)\
+{                                                                                   \
+    struct stat c_;                                                                 \
+    AlignStat64(c, &c_);                                                            \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "setattr");                            \
+    RunFunctionFmt(my_setattr_fct_##A, "pLpip", a, b, &c_, d, e);       \
 }
 SUPER()
 #undef GO
@@ -309,11 +309,11 @@ static void* find_setattr_Fct(void* fct)
 
 // readlink
 #define GO(A)   \
-static uintptr_t my_readlink_fct_##A = 0;                   \
-static void my_readlink_##A(void* a, unsigned long b)       \
-{                                                           \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "readlink");               \
-    RunFunction(my_context, my_readlink_fct_##A, 2, a, b);  \
+static uintptr_t my_readlink_fct_##A = 0;                           \
+static void my_readlink_##A(void* a, unsigned long b)               \
+{                                                                   \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "readlink");           \
+    RunFunctionFmt(my_readlink_fct_##A, "pL", a, b);    \
 }
 SUPER()
 #undef GO
@@ -336,8 +336,8 @@ static void* find_readlink_Fct(void* fct)
 static uintptr_t my_mknod_fct_##A = 0;                                                  \
 static void my_mknod_##A(void* a, unsigned long b, const char* c, mode_t d, dev_t e)    \
 {                                                                                       \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "mknod");              \
-    RunFunction(my_context, my_mknod_fct_##A, 5, a, b, c, of_convert(d), e);            \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "mknod");                                  \
+    RunFunctionFmt(my_mknod_fct_##A, "pLpuL", a, b, c, of_convert(d), e);   \
 }
 SUPER()
 #undef GO
@@ -357,11 +357,11 @@ static void* find_mknod_Fct(void* fct)
 
 // mkdir
 #define GO(A)   \
-static uintptr_t my_mkdir_fct_##A = 0;                                      \
-static void my_mkdir_##A(void* a, unsigned long b, const char* c, mode_t d) \
-{                                                                           \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "mkdir");              \
-    RunFunction(my_context, my_mkdir_fct_##A, 4, a, b, c, of_convert(d));   \
+static uintptr_t my_mkdir_fct_##A = 0;                                              \
+static void my_mkdir_##A(void* a, unsigned long b, const char* c, mode_t d)         \
+{                                                                                   \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "mkdir");                              \
+    RunFunctionFmt(my_mkdir_fct_##A, "pLpu", a, b, c, of_convert(d));   \
 }
 SUPER()
 #undef GO
@@ -385,7 +385,7 @@ static uintptr_t my_unlink_fct_##A = 0;                             \
 static void my_unlink_##A(void* a, unsigned long b, const char* c)  \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "unlink");             \
-    RunFunction(my_context, my_unlink_fct_##A, 3, a, b, c);         \
+    RunFunctionFmt(my_unlink_fct_##A, "pLp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -405,11 +405,11 @@ static void* find_unlink_Fct(void* fct)
 
 // rmdir
 #define GO(A)   \
-static uintptr_t my_rmdir_fct_##A = 0;                             \
-static void my_rmdir_##A(void* a, unsigned long b, const char* c)  \
+static uintptr_t my_rmdir_fct_##A = 0;                              \
+static void my_rmdir_##A(void* a, unsigned long b, const char* c)   \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "rmdir");              \
-    RunFunction(my_context, my_rmdir_fct_##A, 3, a, b, c);         \
+    RunFunctionFmt(my_rmdir_fct_##A, "pLp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -429,11 +429,11 @@ static void* find_rmdir_Fct(void* fct)
 
 // symlink
 #define GO(A)   \
-static uintptr_t my_symlink_fct_##A = 0;                                            \
+static uintptr_t my_symlink_fct_##A = 0;                                \
 static void my_symlink_##A(void* a, const char* b, unsigned long c, const char* d)  \
-{                                                                                   \
+{                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "symlink");                \
-    RunFunction(my_context, my_symlink_fct_##A, 4, a, b, c, d);                     \
+    RunFunctionFmt(my_symlink_fct_##A, "ppLp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -453,11 +453,11 @@ static void* find_symlink_Fct(void* fct)
 
 // rename
 #define GO(A)   \
-static uintptr_t my_rename_fct_##A = 0;                                                             \
+static uintptr_t my_rename_fct_##A = 0;                                     \
 static void my_rename_##A(void* a, unsigned long b, const char* c, unsigned long d, const char* e)  \
-{                                                                                                   \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "rename");             \
-    RunFunction(my_context, my_rename_fct_##A, 5, a, b, c, d, e);                                   \
+{                                                                           \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "rename");                     \
+    RunFunctionFmt(my_rename_fct_##A, "pLpLp", a, b, c, d, e);  \
 }
 SUPER()
 #undef GO
@@ -477,11 +477,11 @@ static void* find_rename_Fct(void* fct)
 
 // link
 #define GO(A)   \
-static uintptr_t my_link_fct_##A = 0;                                               \
+static uintptr_t my_link_fct_##A = 0;                                   \
 static void my_link_##A(void* a, unsigned long b, unsigned long c, const char* d)   \
-{                                                                                   \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "link");               \
-    RunFunction(my_context, my_link_fct_##A, 4, a, b, c, d);                        \
+{                                                                       \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "link");                   \
+    RunFunctionFmt(my_link_fct_##A, "pLLp", a, b, c, d);    \
 }
 SUPER()
 #undef GO
@@ -501,11 +501,11 @@ static void* find_link_Fct(void* fct)
 
 // open
 #define GO(A)   \
-static uintptr_t my_open_fct_##A = 0;                           \
-static void my_open_##A(void* a, unsigned long b, const char* c)\
-{                                                               \
+static uintptr_t my_open_fct_##A = 0;                               \
+static void my_open_##A(void* a, unsigned long b, const char* c)    \
+{                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "open");               \
-    RunFunction(my_context, my_open_fct_##A, 3, a, b, c);       \
+    RunFunctionFmt(my_open_fct_##A, "pLp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -525,11 +525,11 @@ static void* find_open_Fct(void* fct)
 
 // read
 #define GO(A)   \
-static uintptr_t my_read_fct_##A = 0;                                                           \
+static uintptr_t my_read_fct_##A = 0;                                           \
 static void my_read_##A(void* a, unsigned long b, const char* c, size_t d, off_t e, void* f)    \
-{                                                                                               \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "read");               \
-    RunFunction(my_context, my_read_fct_##A, 6, a, b, c, d, e, f);                              \
+{                                                                               \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "read");                           \
+    RunFunctionFmt(my_read_fct_##A, "pLpLlp", a, b, c, d, e, f);    \
 }
 SUPER()
 #undef GO
@@ -549,11 +549,11 @@ static void* find_read_Fct(void* fct)
 
 // write
 #define GO(A)   \
-static uintptr_t my_write_fct_##A = 0;                                                          \
+static uintptr_t my_write_fct_##A = 0;                                          \
 static void my_write_##A(void* a, unsigned long b, const char* c, size_t d, off_t e, void* f)   \
-{                                                                                               \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "write");              \
-    RunFunction(my_context, my_write_fct_##A, 6, a, b, c, d, e, f);                             \
+{                                                                               \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "write");                          \
+    RunFunctionFmt(my_write_fct_##A, "pLpLlp", a, b, c, d, e, f);   \
 }
 SUPER()
 #undef GO
@@ -577,7 +577,7 @@ static uintptr_t my_flush_fct_##A = 0;                              \
 static void my_flush_##A(void* a, unsigned long b, const char* c)   \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "flush");              \
-    RunFunction(my_context, my_flush_fct_##A, 3, a, b, c);          \
+    RunFunctionFmt(my_flush_fct_##A, "pLp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -597,11 +597,11 @@ static void* find_flush_Fct(void* fct)
 
 // release
 #define GO(A)   \
-static uintptr_t my_release_fct_##A = 0;                              \
-static void my_release_##A(void* a, unsigned long b, const char* c)   \
+static uintptr_t my_release_fct_##A = 0;                            \
+static void my_release_##A(void* a, unsigned long b, const char* c) \
 {                                                                   \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "release");                \
-    RunFunction(my_context, my_release_fct_##A, 3, a, b, c);          \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "release");            \
+    RunFunctionFmt(my_release_fct_##A, "pLp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -621,11 +621,11 @@ static void* find_release_Fct(void* fct)
 
 // fsync
 #define GO(A)   \
-static uintptr_t my_fsync_fct_##A = 0;                              \
-static void my_fsync_##A(void* a, unsigned long b, int c, void* d)  \
-{                                                                   \
-    printf_log(LOG_DEBUG, "fuse: call %s\n", "fsync");              \
-    RunFunction(my_context, my_fsync_fct_##A, 4, a, b, c, d);       \
+static uintptr_t my_fsync_fct_##A = 0;                                  \
+static void my_fsync_##A(void* a, unsigned long b, int c, void* d)      \
+{                                                                       \
+    printf_log(LOG_DEBUG, "fuse: call %s\n", "fsync");                  \
+    RunFunctionFmt(my_fsync_fct_##A, "pLip", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -649,7 +649,7 @@ static uintptr_t my_opendir_fct_##A = 0;
 static void my_opendir_##A(void* a, unsigned long b, void* c)                   \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s(%p, %lu, %p)\n", "opendir", a, b, c);  \
-    RunFunction(my_context, my_opendir_fct_##A, 3, a, b, c);                    \
+    RunFunctionFmt(my_opendir_fct_##A, "pLp", a, b, c);                    \
 }
 SUPER()
 #undef GO
@@ -673,7 +673,7 @@ static uintptr_t my_readdir_fct_##A = 0;
 static void my_readdir_##A(void* a, unsigned long b, size_t c, off_t d, void* e)    \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "readdir");                \
-    RunFunction(my_context, my_readdir_fct_##A, 5, a, b, c, d, e);                  \
+    RunFunctionFmt(my_readdir_fct_##A, "pLLlp", a, b, c, d, e);                  \
 }
 SUPER()
 #undef GO
@@ -697,7 +697,7 @@ static uintptr_t my_releasedir_fct_##A = 0;
 static void my_releasedir_##A(void* a, unsigned long b, void* c)                    \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s(%p, %lu, %p)\n", "releasedir", a, b, c);   \
-    RunFunction(my_context, my_releasedir_fct_##A, 3, a, b, c);                     \
+    RunFunctionFmt(my_releasedir_fct_##A, "pLp", a, b, c);                     \
 }
 SUPER()
 #undef GO
@@ -721,7 +721,7 @@ static uintptr_t my_fsyncdir_fct_##A = 0;                               \
 static void my_fsyncdir_##A(void* a, unsigned long b, int c, void* d)   \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fsyncdir");               \
-    RunFunction(my_context, my_fsyncdir_fct_##A, 4, a, b, c, d);        \
+    RunFunctionFmt(my_fsyncdir_fct_##A, "pLip", a, b, c, d);        \
 }
 SUPER()
 #undef GO
@@ -745,7 +745,7 @@ static uintptr_t my_statfs_fct_##A = 0;                     \
 static void my_statfs_##A(void* a, unsigned long b)         \
 {                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "statfs");             \
-    RunFunction(my_context, my_statfs_fct_##A, 2, a, b);    \
+    RunFunctionFmt(my_statfs_fct_##A, "pL", a, b);    \
 }
 SUPER()
 #undef GO
@@ -769,7 +769,7 @@ static uintptr_t my_setxattr_fct_##A = 0;
 static void my_setxattr_##A(void* a, unsigned long b, const char* c, const char* d, size_t e, int f)    \
 {                                                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "setxattr");               \
-    RunFunction(my_context, my_setxattr_fct_##A, 6, a, b, c, d, e, f);                                  \
+    RunFunctionFmt(my_setxattr_fct_##A, "pLppLi", a, b, c, d, e, f);                                  \
 }
 SUPER()
 #undef GO
@@ -793,7 +793,7 @@ static uintptr_t my_getxattr_fct_##A = 0;
 static void my_getxattr_##A(void* a, unsigned long b, const char* c, const char* d, size_t e)   \
 {                                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "getxattr");               \
-    RunFunction(my_context, my_getxattr_fct_##A, 5, a, b, c, d, e);                             \
+    RunFunctionFmt(my_getxattr_fct_##A, "pLppL", a, b, c, d, e);                             \
 }
 SUPER()
 #undef GO
@@ -817,7 +817,7 @@ static uintptr_t my_listxattr_fct_##A = 0;                      \
 static void my_listxattr_##A(void* a, unsigned long b, size_t c)\
 {                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "listxattr");              \
-    RunFunction(my_context, my_listxattr_fct_##A, 3, a, b, c);  \
+    RunFunctionFmt(my_listxattr_fct_##A, "pLL", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -841,7 +841,7 @@ static uintptr_t my_removexattr_fct_##A = 0;                            \
 static void my_removexattr_##A(void* a, unsigned long b, const char* c) \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "removexattr");                \
-    RunFunction(my_context, my_removexattr_fct_##A, 3, a, b, c);        \
+    RunFunctionFmt(my_removexattr_fct_##A, "pLp", a, b, c);        \
 }
 SUPER()
 #undef GO
@@ -865,7 +865,7 @@ static uintptr_t my_access_fct_##A = 0;                     \
 static void my_access_##A(void* a, unsigned long b, int c)  \
 {                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "access");             \
-    RunFunction(my_context, my_access_fct_##A, 3, a, b, c); \
+    RunFunctionFmt(my_access_fct_##A, "pLi", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -889,7 +889,7 @@ static uintptr_t my_create_fct_##A = 0;
 static void my_create_##A(void* a, unsigned long b, const char* c, mode_t d, void* e)   \
 {                                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "create");             \
-    RunFunction(my_context, my_create_fct_##A, 5, a, b, c, of_convert(d), e);           \
+    RunFunctionFmt(my_create_fct_##A, "pLpup", a, b, c, of_convert(d), e);           \
 }
 SUPER()
 #undef GO
@@ -913,7 +913,7 @@ static uintptr_t my_getlk_fct_##A = 0;                              \
 static void my_getlk_##A(void* a, unsigned long b, void* c, void* d)\
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "getlk");              \
-    RunFunction(my_context, my_getlk_fct_##A, 4, a, b, c, d);       \
+    RunFunctionFmt(my_getlk_fct_##A, "pLpp", a, b, c, d);       \
 }
 SUPER()
 #undef GO
@@ -937,7 +937,7 @@ static uintptr_t my_setlk_fct_##A = 0;                                      \
 static void my_setlk_##A(void* a, unsigned long b, void* c, void* d, int e) \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "setlk");              \
-    RunFunction(my_context, my_setlk_fct_##A, 5, a, b, c, d, e);            \
+    RunFunctionFmt(my_setlk_fct_##A, "pLppi", a, b, c, d, e);            \
 }
 SUPER()
 #undef GO
@@ -961,7 +961,7 @@ static uintptr_t my_bmap_fct_##A = 0;                                   \
 static void my_bmap_##A(void* a, unsigned long b, size_t c, uint64_t d) \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "bmap");               \
-    RunFunction(my_context, my_bmap_fct_##A, 4, a, b, c, d);            \
+    RunFunctionFmt(my_bmap_fct_##A, "pLLU", a, b, c, d);            \
 }
 SUPER()
 #undef GO
@@ -985,7 +985,7 @@ static uintptr_t my_ioctl_fct_##A = 0;
 static void my_ioctl_##A(void* a, unsigned long b, int c, void* d, void* e, unsigned f, void* g, size_t h, size_t i)\
 {                                                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "ioctl");                                                              \
-    RunFunction(my_context, my_ioctl_fct_##A, 9, a, b, c, d, e, f, g, h, i);                                        \
+    RunFunctionFmt(my_ioctl_fct_##A, "pLippupLL", a, b, c, d, e, f, g, h, i);                                        \
 }
 SUPER()
 #undef GO
@@ -1009,7 +1009,7 @@ static uintptr_t my_poll_fct_##A = 0;                                  \
 static void my_poll_##A(void* a, unsigned long b, void* c, void* d)    \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "poll");                  \
-    RunFunction(my_context, my_poll_fct_##A, 4, a, b, c, d);           \
+    RunFunctionFmt(my_poll_fct_##A, "pLpp", a, b, c, d);           \
 }
 SUPER()
 #undef GO
@@ -1033,7 +1033,7 @@ static uintptr_t my_write_buf_fct_##A = 0;
 static void my_write_buf_##A(void* a, unsigned long b, void* c, off_t d, void* e)   \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "write_buf");                          \
-    RunFunction(my_context, my_write_buf_fct_##A, 5, a, b, c, d, e);                \
+    RunFunctionFmt(my_write_buf_fct_##A, "pLplp", a, b, c, d, e);                \
 }
 SUPER()
 #undef GO
@@ -1057,7 +1057,7 @@ static uintptr_t my_retrieve_reply_fct_##A = 0;
 static void my_retrieve_reply_##A(void* a, void* b, unsigned long c, off_t d, void* e)  \
 {                                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "retrieve_reply");                         \
-    RunFunction(my_context, my_retrieve_reply_fct_##A, 5, a, b, c, d, e);               \
+    RunFunctionFmt(my_retrieve_reply_fct_##A, "ppLlp", a, b, c, d, e);               \
 }
 SUPER()
 #undef GO
@@ -1081,7 +1081,7 @@ static uintptr_t my_forget_multi_fct_##A = 0;                       \
 static void my_forget_multi_##A(void* a, size_t b, void* c)         \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "forget_multi");       \
-    RunFunction(my_context, my_forget_multi_fct_##A, 3, a, b, c);   \
+    RunFunctionFmt(my_forget_multi_fct_##A, "pLp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1105,7 +1105,7 @@ static uintptr_t my_flock_fct_##A = 0;                              \
 static void my_flock_##A(void* a, unsigned long b, void* c, int d)  \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "flock");              \
-    RunFunction(my_context, my_flock_fct_##A, 4, a, b, c, d);       \
+    RunFunctionFmt(my_flock_fct_##A, "pLpi", a, b, c, d);       \
 }
 SUPER()
 #undef GO
@@ -1129,7 +1129,7 @@ static uintptr_t my_fallocate_fct_##A = 0;
 static void my_fallocate_##A(void* a, unsigned long b, int c, off_t d, off_t e, void* f)    \
 {                                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fallocate");                                  \
-    RunFunction(my_context, my_fallocate_fct_##A, 6, a, b, c, d, e, f);                     \
+    RunFunctionFmt(my_fallocate_fct_##A, "pLillp", a, b, c, d, e, f);                     \
 }
 SUPER()
 #undef GO
@@ -1155,7 +1155,7 @@ static int my_getattr_op_##A(const char * a, struct stat * b)
     printf_log(LOG_DEBUG, "fuse: call %s\n", "getattr_op");                         \
     struct x64_stat64 b_;                                                           \
     UnalignStat64(b, &b_);                                                          \
-    int ret = (int)RunFunction(my_context, my_getattr_op_fct_##A, 2, a, &b_);       \
+    int ret = (int)RunFunctionFmt(my_getattr_op_fct_##A, "pp", a, &b_);       \
     AlignStat64(&b_, b);                                                            \
     return ret;                                                                     \
 }
@@ -1181,7 +1181,7 @@ static uintptr_t my_readlink_op_fct_##A = 0;                            \
 static int my_readlink_op_##A(const char * a, char * b, size_t c)       \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "readlink_op");            \
-    return (int)RunFunction(my_context, my_readlink_op_fct_##A, 3, a, b, c);\
+    return (int)RunFunctionFmt(my_readlink_op_fct_##A, "ppL", a, b, c);\
 }
 SUPER()
 #undef GO
@@ -1205,7 +1205,7 @@ static uintptr_t my_getdir_op_fct_##A = 0;
 static int my_getdir_op_##A(const char * a, void* b, void* c)                                                                   \
 {                                                                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "getdir_op");                                                                      \
-    return (int)RunFunction(my_context, my_getdir_op_fct_##A, 3, a, b, AddCheckBridge(my_lib->w.bridge, iFppiU, c, 0, NULL));   \
+    return (int)RunFunctionFmt(my_getdir_op_fct_##A, "ppp", a, b, AddCheckBridge(my_lib->w.bridge, iFppiU, c, 0, NULL));   \
 }
 SUPER()
 #undef GO
@@ -1229,7 +1229,7 @@ static uintptr_t my_mknod_op_fct_##A = 0;                                   \
 static int my_mknod_op_##A(const char * a, mode_t b, dev_t c)               \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "mknod_op");                   \
-    return (int)RunFunction(my_context, my_mknod_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_mknod_op_fct_##A, "puU", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1253,7 +1253,7 @@ static uintptr_t my_mkdir_op_fct_##A = 0;                               \
 static int my_mkdir_op_##A(const char * a, mode_t b)                    \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "mkdir_op");               \
-    return (int)RunFunction(my_context, my_mkdir_op_fct_##A, 2, a, b);  \
+    return (int)RunFunctionFmt(my_mkdir_op_fct_##A, "pu", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1277,7 +1277,7 @@ static uintptr_t my_unlink_op_fct_##A = 0;                              \
 static int my_unlink_op_##A(const char * a)                             \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "unlink_op");              \
-    return (int)RunFunction(my_context, my_unlink_op_fct_##A, 1, a);    \
+    return (int)RunFunctionFmt(my_unlink_op_fct_##A, "p", a);    \
 }
 SUPER()
 #undef GO
@@ -1301,7 +1301,7 @@ static uintptr_t my_rmdir_op_fct_##A = 0;                           \
 static int my_rmdir_op_##A(const char * a)                          \
 {                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "rmdir_op");           \
-    return (int)RunFunction(my_context, my_rmdir_op_fct_##A, 1, a); \
+    return (int)RunFunctionFmt(my_rmdir_op_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -1325,7 +1325,7 @@ static uintptr_t my_symlink_op_fct_##A = 0;                                 \
 static int my_symlink_op_##A(const char * a, const char * b)                \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "symlink_op");                 \
-    return (int)RunFunction(my_context, my_symlink_op_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_symlink_op_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -1349,7 +1349,7 @@ static uintptr_t my_rename_op_fct_##A = 0;                              \
 static int my_rename_op_##A(const char * a, const char * b)             \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "rename_op");              \
-    return (int)RunFunction(my_context, my_rename_op_fct_##A, 2, a, b); \
+    return (int)RunFunctionFmt(my_rename_op_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -1373,7 +1373,7 @@ static uintptr_t my_link_op_fct_##A = 0;                                \
 static int my_link_op_##A(const char * a, const char * b)               \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "link_op");                \
-    return (int)RunFunction(my_context, my_link_op_fct_##A, 2, a, b);   \
+    return (int)RunFunctionFmt(my_link_op_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -1397,7 +1397,7 @@ static uintptr_t my_chmod_op_fct_##A = 0;                               \
 static int my_chmod_op_##A(const char * a, mode_t b)                    \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "chmod_op");               \
-    return (int)RunFunction(my_context, my_chmod_op_fct_##A, 2, a, b);  \
+    return (int)RunFunctionFmt(my_chmod_op_fct_##A, "pu", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1421,7 +1421,7 @@ static uintptr_t my_chown_op_fct_##A = 0;                                   \
 static int my_chown_op_##A(const char * a, uid_t b, gid_t c)                \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "chown_op");                   \
-    return (int)RunFunction(my_context, my_chown_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_chown_op_fct_##A, "puu", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1445,7 +1445,7 @@ static uintptr_t my_truncate_op_fct_##A = 0;                                \
 static int my_truncate_op_##A(const char * a, off_t b)                      \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "truncate_op");                \
-    return (int)RunFunction(my_context, my_truncate_op_fct_##A, 2, a, b);   \
+    return (int)RunFunctionFmt(my_truncate_op_fct_##A, "pl", a, b);   \
 }
 SUPER()
 #undef GO
@@ -1469,7 +1469,7 @@ static uintptr_t my_utime_op_fct_##A = 0;                               \
 static int my_utime_op_##A(const char * a, void* b)                     \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "utime_op");               \
-    return (int)RunFunction(my_context, my_utime_op_fct_##A, 2, a, b);  \
+    return (int)RunFunctionFmt(my_utime_op_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1493,7 +1493,7 @@ static uintptr_t my_open_op_fct_##A = 0;                                \
 static int my_open_op_##A(const char * a, void* b)                      \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "open_op");                \
-    return (int)RunFunction(my_context, my_open_op_fct_##A, 2, a, b);   \
+    return (int)RunFunctionFmt(my_open_op_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -1517,7 +1517,7 @@ static uintptr_t my_read_op_fct_##A = 0;
 static int my_read_op_##A(const char * a, char * b, size_t c, off_t d, void* e) \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "read_op");                        \
-    return (int)RunFunction(my_context, my_read_op_fct_##A, 5, a, b, c, d, e);  \
+    return (int)RunFunctionFmt(my_read_op_fct_##A, "ppLlp", a, b, c, d, e);  \
 }
 SUPER()
 #undef GO
@@ -1541,7 +1541,7 @@ static uintptr_t my_write_op_fct_##A = 0;
 static int my_write_op_##A(const char * a, const char * b, size_t c, off_t d, void* e)  \
 {                                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "write_op");                               \
-    return (int)RunFunction(my_context, my_write_op_fct_##A, 5, a, b, c, d, e);         \
+    return (int)RunFunctionFmt(my_write_op_fct_##A, "ppLlp", a, b, c, d, e);         \
 }
 SUPER()
 #undef GO
@@ -1565,7 +1565,7 @@ static uintptr_t my_statfs_op_fct_##A = 0;                              \
 static int my_statfs_op_##A(const char * a, void* b)         \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "statfs_op");              \
-    return (int)RunFunction(my_context, my_statfs_op_fct_##A, 2, a, b); \
+    return (int)RunFunctionFmt(my_statfs_op_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -1589,7 +1589,7 @@ static uintptr_t my_flush_op_fct_##A = 0;                               \
 static int my_flush_op_##A(const char * a, void* b)                     \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "flush_op");               \
-    return (int)RunFunction(my_context, my_flush_op_fct_##A, 2, a, b);  \
+    return (int)RunFunctionFmt(my_flush_op_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1613,7 +1613,7 @@ static uintptr_t my_release_op_fct_##A = 0;                                 \
 static int my_release_op_##A(const char * a, void* b)                       \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "release_op");                 \
-    return (int)RunFunction(my_context, my_release_op_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_release_op_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -1637,7 +1637,7 @@ static uintptr_t my_fsync_op_fct_##A = 0;                                   \
 static int my_fsync_op_##A(const char * a, int b, void* c)                  \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fsync_op");                   \
-    return (int)RunFunction(my_context, my_fsync_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_fsync_op_fct_##A, "pip", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1661,7 +1661,7 @@ static uintptr_t my_setxattr_op_fct_##A = 0;
 static int my_setxattr_op_##A(const char * a, const char * b, const char * c, size_t d, int e)  \
 {                                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "setxattr_op");                                    \
-    return (int)RunFunction(my_context, my_setxattr_op_fct_##A, 5, a, b, c, d, e);                  \
+    return (int)RunFunctionFmt(my_setxattr_op_fct_##A, "pppLi", a, b, c, d, e);                  \
 }
 SUPER()
 #undef GO
@@ -1685,7 +1685,7 @@ static uintptr_t my_getxattr_op_fct_##A = 0;
 static int my_getxattr_op_##A(const char * a, const char * b, char * c, size_t d)   \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "getxattr_op");                        \
-    return (int)RunFunction(my_context, my_getxattr_op_fct_##A, 4, a, b, c, d);     \
+    return (int)RunFunctionFmt(my_getxattr_op_fct_##A, "pppL", a, b, c, d);     \
 }
 SUPER()
 #undef GO
@@ -1709,7 +1709,7 @@ static uintptr_t my_listxattr_op_fct_##A = 0;
 static int my_listxattr_op_##A(const char * a, char * b, size_t c)              \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "listxattr_op");                   \
-    return (int)RunFunction(my_context, my_listxattr_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_listxattr_op_fct_##A, "ppL", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1733,7 +1733,7 @@ static uintptr_t my_removexattr_op_fct_##A = 0;
 static int my_removexattr_op_##A(const char * a, const char * b)                \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "removexattr_op");                 \
-    return (int)RunFunction(my_context, my_removexattr_op_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_removexattr_op_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -1757,7 +1757,7 @@ static uintptr_t my_opendir_op_fct_##A = 0;                                 \
 static int my_opendir_op_##A(const char * a, void* b)                       \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "opendir_op");                 \
-    return (int)RunFunction(my_context, my_opendir_op_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_opendir_op_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -1781,7 +1781,7 @@ static uintptr_t my_readdir_op_fct_##A = 0;
 static int my_readdir_op_##A(const char * a, void * b, fuse_fill_dir_t c, off_t d, void* e)                                             \
 {                                                                                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "readdir_op");                                                                             \
-    return (int)RunFunction(my_context, my_readdir_op_fct_##A, 5, a, b, AddCheckBridge(my_lib->w.bridge, iFpppUi, c, 0, NULL), d, e);   \
+    return (int)RunFunctionFmt(my_readdir_op_fct_##A, "ppplp", a, b, AddCheckBridge(my_lib->w.bridge, iFpppUi, c, 0, NULL), d, e);   \
 }
 SUPER()
 #undef GO
@@ -1805,7 +1805,7 @@ static uintptr_t my_releasedir_op_fct_##A = 0;                              \
 static int my_releasedir_op_##A(const char * a, void* b)                    \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "releasedir_op");              \
-    return (int)RunFunction(my_context, my_releasedir_op_fct_##A,2, a, b);  \
+    return (int)RunFunctionFmt(my_releasedir_op_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1829,7 +1829,7 @@ static uintptr_t my_fsyncdir_op_fct_##A = 0;                                \
 static int my_fsyncdir_op_##A(const char * a, int b, void* c)               \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fsyncdir_op");                \
-    return (int)RunFunction(my_context, my_fsyncdir_op_fct_##A, 3, a, b, c);\
+    return (int)RunFunctionFmt(my_fsyncdir_op_fct_##A, "pip", a, b, c);\
 }
 SUPER()
 #undef GO
@@ -1853,7 +1853,7 @@ static uintptr_t my_init_op_fct_##A = 0;                                \
 static void* my_init_op_##A(void* a)                                    \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "init_op");                \
-    return (void*)RunFunction(my_context, my_init_op_fct_##A, 1, a);    \
+    return (void*)RunFunctionFmt(my_init_op_fct_##A, "p", a);    \
 }
 SUPER()
 #undef GO
@@ -1877,7 +1877,7 @@ static uintptr_t my_destroy_op_fct_##A = 0;                 \
 static void my_destroy_op_##A(void * a)                     \
 {                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "destroy_op"); \
-    RunFunction(my_context, my_destroy_op_fct_##A, 1, a);   \
+    RunFunctionFmt(my_destroy_op_fct_##A, "p", a);   \
 }
 SUPER()
 #undef GO
@@ -1901,7 +1901,7 @@ static uintptr_t my_access_op_fct_##A = 0;                              \
 static int my_access_op_##A(const char * a, int b)                      \
 {                                                                       \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "access_op");              \
-    return (int)RunFunction(my_context, my_access_op_fct_##A, 2, a, b); \
+    return (int)RunFunctionFmt(my_access_op_fct_##A, "pi", a, b); \
 }
 SUPER()
 #undef GO
@@ -1925,7 +1925,7 @@ static uintptr_t my_create_op_fct_##A = 0;                                  \
 static int my_create_op_##A(const char * a, mode_t b, void* c)              \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "create_op");                  \
-    return (int)RunFunction(my_context, my_create_op_fct_##A, 3, a, b, c);  \
+    return (int)RunFunctionFmt(my_create_op_fct_##A, "pup", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -1949,7 +1949,7 @@ static uintptr_t my_ftruncate_op_fct_##A = 0;
 static int my_ftruncate_op_##A(const char * a, off_t b, void* c)                \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "ftruncate_op");                   \
-    return (int)RunFunction(my_context, my_ftruncate_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_ftruncate_op_fct_##A, "plp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1975,7 +1975,7 @@ static int my_fgetattr_op_##A(const char * a, struct stat* b, void* c)
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fgetattr_op");                        \
     struct x64_stat64 b_;                                                           \
     UnalignStat64(b, &b_);                                                          \
-    int ret = (int)RunFunction(my_context, my_fgetattr_op_fct_##A, 3, a, &b_, c);   \
+    int ret = (int)RunFunctionFmt(my_fgetattr_op_fct_##A, "ppp", a, &b_, c);   \
     AlignStat64(&b_, b);                                                            \
     return ret;                                                                     \
 }
@@ -2001,7 +2001,7 @@ static uintptr_t my_lock_op_fct_##A = 0;
 static int my_lock_op_##A(const char * a, void* b, int c, void* d)              \
 {                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "lock_op");                        \
-    return (int)RunFunction(my_context, my_lock_op_fct_##A, 4, a, b, c, d);     \
+    return (int)RunFunctionFmt(my_lock_op_fct_##A, "ppip", a, b, c, d);     \
 }
 SUPER()
 #undef GO
@@ -2025,7 +2025,7 @@ static uintptr_t my_utimens_op_fct_##A = 0;                                 \
 static int my_utimens_op_##A(const char * a, const struct timespec b[2])    \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "utimens_op");                 \
-    return (int)RunFunction(my_context, my_utimens_op_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_utimens_op_fct_##A, "pp", a, b);    \
 }
 SUPER()
 #undef GO
@@ -2049,7 +2049,7 @@ static uintptr_t my_bmap_op_fct_##A = 0;                                    \
 static int my_bmap_op_##A(const char * a, size_t b, uint64_t *c)            \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "bmap_op");                    \
-    return (int)RunFunction(my_context, my_bmap_op_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my_bmap_op_fct_##A, "pLp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -2073,7 +2073,7 @@ static uintptr_t my_ioctl_op_fct_##A = 0;
 static int my_ioctl_op_##A(const char * a, int b, void* c, void* d, unsigned int e, void* f)    \
 {                                                                                               \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "ioctl_op");                                       \
-    return (int)RunFunction(my_context, my_ioctl_op_fct_##A, 6, a, b, c, d, e, f);              \
+    return (int)RunFunctionFmt(my_ioctl_op_fct_##A, "pippup", a, b, c, d, e, f);              \
 }
 SUPER()
 #undef GO
@@ -2097,7 +2097,7 @@ static uintptr_t my_poll_op_fct_##A = 0;                                    \
 static int my_poll_op_##A(const char * a, void* b, void* c, unsigned * d)   \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "poll_op");                    \
-    return (int)RunFunction(my_context, my_poll_op_fct_##A, 4, a, b, c, d); \
+    return (int)RunFunctionFmt(my_poll_op_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -2121,7 +2121,7 @@ static uintptr_t my_write_buf_op_fct_##A = 0;
 static int my_write_buf_op_##A(const char * a, void* b, off_t c, void* d)           \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "write_buf_op");                       \
-    return (int)RunFunction(my_context, my_write_buf_op_fct_##A, 4, a, b, c, d);    \
+    return (int)RunFunctionFmt(my_write_buf_op_fct_##A, "pplp", a, b, c, d);    \
 }
 SUPER()
 #undef GO
@@ -2145,7 +2145,7 @@ static uintptr_t my_read_buf_op_fct_##A = 0;
 static int my_read_buf_op_##A(const char * a, void* b, size_t c, off_t d, void* e)  \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "read_buf_op");                        \
-    return (int)RunFunction(my_context, my_read_buf_op_fct_##A, 5, a, b, c, d, e);  \
+    return (int)RunFunctionFmt(my_read_buf_op_fct_##A, "ppLlp", a, b, c, d, e);  \
 }
 SUPER()
 #undef GO
@@ -2169,7 +2169,7 @@ static uintptr_t my_flock_op_fct_##A = 0;                                   \
 static int my_flock_op_##A(const char * a, void* b, int c)                  \
 {                                                                           \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "flock_op");                   \
-    return (int)RunFunction(my_context, my_flock_op_fct_##A, 3, a, b, c);   \
+    return (int)RunFunctionFmt(my_flock_op_fct_##A, "ppi", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -2193,7 +2193,7 @@ static uintptr_t my_fallocate_op_fct_##A = 0;
 static int my_fallocate_op_##A(const char * a, int b, off_t c, off_t d, void* e)    \
 {                                                                                   \
     printf_log(LOG_DEBUG, "fuse: call %s\n", "fallocate_op");                       \
-    return (int)RunFunction(my_context, my_fallocate_op_fct_##A, 5, a, b, c, d, e); \
+    return (int)RunFunctionFmt(my_fallocate_op_fct_##A, "pillp", a, b, c, d, e); \
 }
 SUPER()
 #undef GO
@@ -2376,5 +2376,5 @@ box64_showsegv=1;
 
 #define CUSTOM_FINI             \
     freeMy();
-    
+
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibgl.c b/src/wrapped/wrappedlibgl.c
index f210a255..1d5eb930 100644
--- a/src/wrapped/wrappedlibgl.c
+++ b/src/wrapped/wrappedlibgl.c
@@ -23,7 +23,7 @@ static library_t* my_lib = NULL;
 
 // FIXME: old wrapped* type of file, cannot use generated/wrappedlibgltypes.h
 
-EXPORT void* my_glXGetProcAddress(x64emu_t* emu, void* name) 
+EXPORT void* my_glXGetProcAddress(x64emu_t* emu, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
@@ -58,7 +58,7 @@ GO(4)
 static uintptr_t my_debug_callback_fct_##A = 0;                                                                         \
 static void my_debug_callback_##A(int32_t a, int32_t b, uint32_t c, int32_t d, int32_t e, const char* f, const void* g) \
 {                                                                                                                       \
-    RunFunction(my_context, my_debug_callback_fct_##A, 7, a, b, c, d, e, f, g);                                         \
+    RunFunctionFmt(my_debug_callback_fct_##A, "iiuiipp", a, b, c, d, e, f, g);                                    \
 }
 SUPER()
 #undef GO
@@ -80,7 +80,7 @@ static void* find_debug_callback_Fct(void* fct)
 static uintptr_t my_program_callback_fct_##A = 0;                   \
 static void my_program_callback_##A(int32_t a, void* b)             \
 {                                                                   \
-    RunFunction(my_context, my_program_callback_fct_##A, 2, a, b);  \
+    RunFunctionFmt(my_program_callback_fct_##A, "ip", a, b);  \
 }
 SUPER()
 #undef GO
@@ -359,7 +359,7 @@ void* getGLProcAddress(x64emu_t* emu, glprocaddress_t procaddr, const char* rnam
         }
         #undef GO
         #undef SUPER
-    } else 
+    } else
         symbol = procaddr(rname);
     if(!symbol) {
         printf_dlsym(LOG_DEBUG, "%p\n", NULL);
@@ -371,7 +371,7 @@ void* getGLProcAddress(x64emu_t* emu, glprocaddress_t procaddr, const char* rnam
         printf_dlsym(LOG_DEBUG, "%p\n", (void*)ret);
         return (void*)ret; // already bridged
     }
-    // get wrapper    
+    // get wrapper
     k = kh_get(symbolmap, wrappers->glwrappers, rname);
     if(k==kh_end(wrappers->glwrappers) && strstr(rname, "ARB")==NULL) {
         // try again, adding ARB at the end if not present
@@ -397,4 +397,4 @@ void* getGLProcAddress(x64emu_t* emu, glprocaddress_t procaddr, const char* rnam
     ret = AddBridge(emu->context->system, kh_value(wrappers->glwrappers, k), symbol, 0, constname);
     printf_dlsym(LOG_DEBUG, "%p\n", (void*)ret);
     return (void*)ret;
-}
\ No newline at end of file
+}
diff --git a/src/wrapped/wrappedlibglu.c b/src/wrapped/wrappedlibglu.c
index 57a2bb4e..8c370876 100644
--- a/src/wrapped/wrappedlibglu.c
+++ b/src/wrapped/wrappedlibglu.c
@@ -42,7 +42,7 @@ GO(9)   \
 static uintptr_t my_glu_callback_fct_##A = 0;                       \
 static void my_glu_callback_##A(void* a, void* b)                   \
 {                                                                   \
-    RunFunction(my_context, my_glu_callback_fct_##A, 2, a, b);  \
+    RunFunctionFmt(my_glu_callback_fct_##A, "pp", a, b);      \
 }
 SUPER()
 #undef GO
@@ -64,7 +64,7 @@ static void* findglu_callbackFct(void* fct)
 static uintptr_t my_glu_callback4_fct_##A = 0;                              \
 static void my_glu_callback4_##A(void* a, void* b, void* c, void* d)        \
 {                                                                           \
-    RunFunction(my_context, my_glu_callback4_fct_##A, 4, a, b, c, d);   \
+    RunFunctionFmt(my_glu_callback4_fct_##A, "pppp", a, b, c, d);     \
 }
 SUPER()
 #undef GO
@@ -86,7 +86,7 @@ static void* findglu_callback4Fct(void* fct)
 static uintptr_t my_glu_callback5_fct_##A = 0;                                  \
 static void my_glu_callback5_##A(void* a, void* b, void* c, void* d, void* e)   \
 {                                                                               \
-    RunFunction(my_context, my_glu_callback5_fct_##A, 5, a, b, c, d, e);    \
+    RunFunctionFmt(my_glu_callback5_fct_##A, "ppppp", a, b, c, d, e);     \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibharfbuzz.c b/src/wrapped/wrappedlibharfbuzz.c
new file mode 100644
index 00000000..8f4bb2c9
--- /dev/null
+++ b/src/wrapped/wrappedlibharfbuzz.c
@@ -0,0 +1,1217 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <dlfcn.h>
+#include "wrappedlibs.h"
+#include "wrapper.h"
+#include "bridge.h"
+#include "librarian/library_private.h"
+#include "x64emu.h"
+#include <unistd.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include "debug.h"
+#include "callback.h"
+
+const char* libharfbuzzName = "libharfbuzz.so.0";
+#define LIBNAME libharfbuzz
+
+#include "generated/wrappedlibharfbuzztypes.h"
+
+#include "wrappercallback.h"
+
+struct hb_atomic_int_t
+{
+  int v;
+};
+
+struct hb_reference_count_t
+{
+  struct hb_atomic_int_t ref_count;
+};
+
+struct hb_atomic_ptr_t {
+    void* v;
+};
+
+struct hb_object_header_t
+{
+  struct hb_reference_count_t ref_count;
+  struct hb_atomic_int_t writable;
+  struct hb_atomic_ptr_t user_data;
+};
+
+/*
+ * hb_draw_funcs_t
+ */
+
+#define HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS \
+  HB_DRAW_FUNC_IMPLEMENT (move_to) \
+  HB_DRAW_FUNC_IMPLEMENT (line_to) \
+  HB_DRAW_FUNC_IMPLEMENT (quadratic_to) \
+  HB_DRAW_FUNC_IMPLEMENT (cubic_to) \
+  HB_DRAW_FUNC_IMPLEMENT (close_path) \
+  /* ^--- Add new callbacks here */
+
+struct hb_draw_funcs_t__func {
+#define HB_DRAW_FUNC_IMPLEMENT(name) void* name;
+    HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_DRAW_FUNC_IMPLEMENT
+};
+
+struct hb_draw_funcs_t__destroy {
+#define HB_DRAW_FUNC_IMPLEMENT(name) void* name;
+    HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_DRAW_FUNC_IMPLEMENT
+};
+
+struct hb_draw_funcs_t
+{
+    struct hb_object_header_t header;
+
+    struct hb_draw_funcs_t__func func;
+
+  struct {
+#define HB_DRAW_FUNC_IMPLEMENT(name) void *name;
+    HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_DRAW_FUNC_IMPLEMENT
+  } *user_data;
+
+  struct hb_draw_funcs_t__destroy* destroy;
+};
+
+/*
+ * hb_font_funcs_t
+ */
+
+#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \
+  HB_FONT_FUNC_IMPLEMENT (get_,font_h_extents) \
+  HB_FONT_FUNC_IMPLEMENT (get_,font_v_extents) \
+  HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyph) \
+  HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyphs) \
+  HB_FONT_FUNC_IMPLEMENT (get_,variation_glyph) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advance) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advance) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advances) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advances) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_origin) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_origin) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_kerning) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_kerning) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_extents) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_contour_point) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_name) \
+  HB_FONT_FUNC_IMPLEMENT (get_,glyph_from_name) \
+  HB_FONT_FUNC_IMPLEMENT (,draw_glyph) \
+  HB_FONT_FUNC_IMPLEMENT (,paint_glyph) \
+  /* ^--- Add new callbacks here */
+
+struct hb_font_funcs_t__destroy {
+#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name;
+    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+};
+
+struct hb_font_funcs_t
+{
+    struct hb_object_header_t header;
+
+    struct {
+#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name;
+        HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+    } *user_data;
+
+    struct hb_font_funcs_t__destroy* destroy;
+
+    union get_t {
+        struct get_funcs_t {
+#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name;
+            HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+        } f;
+        void (*array[0
+#define HB_FONT_FUNC_IMPLEMENT(get_,name) +1
+            HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+        ]) ();
+    } get;
+};
+
+/*
+ * hb_unicode_funcs_t
+ */
+
+#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \
+  HB_UNICODE_FUNC_IMPLEMENT (combining_class) \
+  HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \
+  HB_UNICODE_FUNC_IMPLEMENT (general_category) \
+  HB_UNICODE_FUNC_IMPLEMENT (mirroring) \
+  HB_UNICODE_FUNC_IMPLEMENT (script) \
+  HB_UNICODE_FUNC_IMPLEMENT (compose) \
+  HB_UNICODE_FUNC_IMPLEMENT (decompose) \
+  HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \
+  /* ^--- Add new callbacks here */
+
+/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
+#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
+  HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \
+  HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
+  HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
+  HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
+  HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \
+  /* ^--- Add new simple callbacks here */
+
+
+struct hb_unicode_funcs_t__destroy {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name;
+    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+};
+
+struct hb_unicode_funcs_t
+{
+    struct hb_object_header_t header;
+    struct hb_unicode_funcs_t *parent;
+
+    struct {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name;
+        HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+    } func;
+
+    struct {
+#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name;
+        HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+    } user_data;
+
+  struct hb_unicode_funcs_t__destroy destroy;
+};
+
+#define SUPER() \
+    GO(0)   \
+    GO(1)   \
+    GO(2)   \
+    GO(3)   \
+    GO(4)   \
+    GO(5)   \
+    GO(6)   \
+    GO(7)   \
+    GO(8)   \
+    GO(9)   \
+    GO(10)  \
+    GO(11)  \
+    GO(12)  \
+
+// buffer_message
+#define GO(A)                                                       \
+static uintptr_t my_buffer_message_fct_##A = 0;                     \
+static int my_buffer_message_##A(void* a, void* b, void* c, void* d)\
+{                                                                   \
+    return (int)RunFunctionFmt(my_buffer_message_fct_##A, "pppp", a, b, c, d);  \
+}
+SUPER()
+#undef GO
+static void* find_buffer_message_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_buffer_message_fct_##A == (uintptr_t)fct) return my_buffer_message_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_buffer_message_fct_##A == 0) {my_buffer_message_fct_##A = (uintptr_t)fct; return my_buffer_message_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz buffer message callback\n");
+    return NULL;
+}
+
+// draw close path
+#define GO(A)                                                           \
+static uintptr_t my_draw_close_path_fct_##A = 0;                        \
+static void my_draw_close_path_##A(void* a, void* b, void* c, void* d)  \
+{                                                                       \
+    RunFunctionFmt(my_draw_close_path_fct_##A, "pppp", a, b, c, d);  \
+}
+SUPER()
+#undef GO
+static void* find_draw_close_path_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_draw_close_path_fct_##A == (uintptr_t)fct) return my_draw_close_path_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_draw_close_path_fct_##A == 0) {my_draw_close_path_fct_##A = (uintptr_t)fct; return my_draw_close_path_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw close path callback\n");
+    return NULL;
+}
+
+// draw cubic to
+#define GO(A)                                   \
+static uintptr_t my_draw_cubic_to_fct_##A = 0;  \
+static void my_draw_cubic_to_##A(void* a, void* b, void* c, float d1, float d2, float d3, float d4, float d5, float d6, void* e) \
+{                                               \
+    RunFunctionFmt(my_draw_cubic_to_fct_##A, "pppffffffp", a, b, c, d1, d2, d3, d4, d5, d6, e); \
+}
+SUPER()
+#undef GO
+static void* find_draw_cubic_to_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_draw_cubic_to_fct_##A == (uintptr_t)fct) return my_draw_cubic_to_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_draw_cubic_to_fct_##A == 0) {my_draw_cubic_to_fct_##A = (uintptr_t)fct; return my_draw_cubic_to_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw cubic to callback\n");
+    return NULL;
+}
+
+// draw line/move to
+#define GO(A)                                           \
+static uintptr_t my_draw_line_or_move_to_fct_##A = 0;   \
+static void my_draw_line_or_move_to_##A(void* a, void* b, void* c, float d1, float d2, void* e) \
+{                                                       \
+    RunFunctionFmt(my_draw_line_or_move_to_fct_##A, "pppffp", a, b, c, d1, d2, e);  \
+}
+SUPER()
+#undef GO
+static void* find_draw_line_or_move_to_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_draw_line_or_move_to_fct_##A == (uintptr_t)fct) return my_draw_line_or_move_to_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_draw_line_or_move_to_fct_##A == 0) {my_draw_line_or_move_to_fct_##A = (uintptr_t)fct; return my_draw_line_or_move_to_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw line/move to callback\n");
+    return NULL;
+}
+
+// draw quadratic to
+#define GO(A)                                       \
+static uintptr_t my_draw_quadratic_to_fct_##A = 0;  \
+static void my_draw_quadratic_to_##A(void* a, void* b, void* c, float d1, float d2, float d3, float d4, void* e) \
+{                                                   \
+    RunFunctionFmt(my_draw_quadratic_to_fct_##A, "pppffffp", a, b, c, d1, d2, d3, d4, e); \
+}
+SUPER()
+#undef GO
+static void* find_draw_quadratic_to_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_draw_quadratic_to_fct_##A == (uintptr_t)fct) return my_draw_quadratic_to_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_draw_quadratic_to_fct_##A == 0) {my_draw_quadratic_to_fct_##A = (uintptr_t)fct; return my_draw_quadratic_to_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw quadratic to callback\n");
+    return NULL;
+}
+
+// reference table
+#define GO(A)                                                       \
+static uintptr_t my_reference_table_fct_##A = 0;                    \
+static void* my_reference_table_##A(void* a, uint32_t b, void* c)   \
+{                                                                   \
+    return (void*)RunFunctionFmt(my_reference_table_fct_##A, "pup", a, b, c);   \
+}
+SUPER()
+#undef GO
+static void* find_reference_table_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_reference_table_fct_##A == (uintptr_t)fct) return my_reference_table_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_reference_table_fct_##A == 0) {my_reference_table_fct_##A = (uintptr_t)fct; return my_reference_table_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz reference table callback\n");
+    return NULL;
+}
+
+// unicode combining class
+#define GO(A)                                                               \
+static uintptr_t my_unicode_combining_class_fct_##A = 0;                    \
+static uint32_t my_unicode_combining_class_##A(void* a, uint32_t b, void* c)\
+{                                                                           \
+    return (uint32_t)RunFunctionFmt(my_unicode_combining_class_fct_##A, "pup", a, b, c);  \
+}
+SUPER()
+#undef GO
+static void* find_unicode_combining_class_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_combining_class_fct_##A == (uintptr_t)fct) return my_unicode_combining_class_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_combining_class_fct_##A == 0) {my_unicode_combining_class_fct_##A = (uintptr_t)fct; return my_unicode_combining_class_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode combining class callback\n");
+    return NULL;
+}
+
+// unicode compose
+#define GO(A)                                                                       \
+static uintptr_t my_unicode_compose_fct_##A = 0;                                    \
+static int my_unicode_compose_##A(void* a, uint32_t b, uint32_t c, void* d, void* e)\
+{                                                                                   \
+    return (int)RunFunctionFmt(my_unicode_compose_fct_##A, "puupp", a, b, c, d, e); \
+}
+SUPER()
+#undef GO
+static void* find_unicode_compose_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_compose_fct_##A == (uintptr_t)fct) return my_unicode_compose_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_compose_fct_##A == 0) {my_unicode_compose_fct_##A = (uintptr_t)fct; return my_unicode_compose_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode compose callback\n");
+    return NULL;
+}
+
+// unicode decompose compatibility
+#define GO(A)                                                                                   \
+static uintptr_t my_unicode_decompose_compatibility_fct_##A = 0;                                \
+static uint32_t my_unicode_decompose_compatibility_##A(void* a, uint32_t b, void* c, void* d)   \
+{                                                                                               \
+    return (uint32_t)RunFunctionFmt(my_unicode_decompose_compatibility_fct_##A, "pupp", a, b, c, d);    \
+}
+SUPER()
+#undef GO
+static void* find_unicode_decompose_compatibility_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_decompose_compatibility_fct_##A == (uintptr_t)fct) return my_unicode_decompose_compatibility_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_decompose_compatibility_fct_##A == 0) {my_unicode_decompose_compatibility_fct_##A = (uintptr_t)fct; return my_unicode_decompose_compatibility_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode decompose compatibility callback\n");
+    return NULL;
+}
+
+// unicode decompose
+#define GO(A)                                                                       \
+static uintptr_t my_unicode_decompose_fct_##A = 0;                                  \
+static int my_unicode_decompose_##A(void* a, uint32_t b, void* c, void* d, void* e) \
+{                                                                                   \
+    return (int)RunFunctionFmt(my_unicode_decompose_fct_##A, "puppp", a, b, c, d, e);   \
+}
+SUPER()
+#undef GO
+static void* find_unicode_decompose_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_decompose_fct_##A == (uintptr_t)fct) return my_unicode_decompose_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_decompose_fct_##A == 0) {my_unicode_decompose_fct_##A = (uintptr_t)fct; return my_unicode_decompose_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode decompose class callback\n");
+    return NULL;
+}
+
+// unicode eastasian width
+#define GO(A)                                                                   \
+static uintptr_t my_unicode_eastasian_width_fct_##A = 0;                        \
+static uint32_t my_unicode_eastasian_width_##A(void* a, uint32_t b, void* c)    \
+{                                                                               \
+    return (uint32_t)RunFunctionFmt(my_unicode_eastasian_width_fct_##A, "pup", a, b, c); \
+}
+SUPER()
+#undef GO
+static void* find_unicode_eastasian_width_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_eastasian_width_fct_##A == (uintptr_t)fct) return my_unicode_eastasian_width_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_eastasian_width_fct_##A == 0) {my_unicode_eastasian_width_fct_##A = (uintptr_t)fct; return my_unicode_eastasian_width_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode eastasian width callback\n");
+    return NULL;
+}
+
+// unicode general category
+#define GO(A)                                                                   \
+static uintptr_t my_unicode_general_category_fct_##A = 0;                       \
+static uint32_t my_unicode_general_category_##A(void* a, uint32_t b, void* c)   \
+{                                                                               \
+    return (uint32_t)RunFunctionFmt(my_unicode_general_category_fct_##A, "pup", a, b, c);   \
+}
+SUPER()
+#undef GO
+static void* find_unicode_general_category_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_general_category_fct_##A == (uintptr_t)fct) return my_unicode_general_category_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_general_category_fct_##A == 0) {my_unicode_general_category_fct_##A = (uintptr_t)fct; return my_unicode_general_category_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode general category callback\n");
+    return NULL;
+}
+
+// unicode mirroring
+#define GO(A)                                                           \
+static uintptr_t my_unicode_mirroring_fct_##A = 0;                      \
+static uint32_t my_unicode_mirroring_##A(void* a, uint32_t b, void* c)  \
+{                                                                       \
+    return (uint32_t)RunFunctionFmt(my_unicode_mirroring_fct_##A, "pup", a, b, c);  \
+}
+SUPER()
+#undef GO
+static void* find_unicode_mirroring_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_mirroring_fct_##A == (uintptr_t)fct) return my_unicode_mirroring_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_mirroring_fct_##A == 0) {my_unicode_mirroring_fct_##A = (uintptr_t)fct; return my_unicode_mirroring_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode mirroring callback\n");
+    return NULL;
+}
+
+// unicode script
+#define GO(A)                                                       \
+static uintptr_t my_unicode_script_fct_##A = 0;                     \
+static uint32_t my_unicode_script_##A(void* a, uint32_t b, void* c) \
+{                                                                   \
+    return (uint32_t)RunFunctionFmt(my_unicode_script_fct_##A, "pup", a, b, c); \
+}
+SUPER()
+#undef GO
+static void* find_unicode_script_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_unicode_script_fct_##A == (uintptr_t)fct) return my_unicode_script_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_unicode_script_fct_##A == 0) {my_unicode_script_fct_##A = (uintptr_t)fct; return my_unicode_script_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode script callback\n");
+    return NULL;
+}
+
+// font extents
+#define GO(A)                                                           \
+static uintptr_t my_font_extents_fct_##A = 0;                           \
+static int my_font_extents_##A(void* a, void* b, void* c, void* d) \
+{                                                                       \
+    return (int)RunFunctionFmt(my_font_extents_fct_##A, "pppp", a, b, c, d);   \
+}
+SUPER()
+#undef GO
+static void* find_font_extents_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_font_extents_fct_##A == (uintptr_t)fct) return my_font_extents_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_font_extents_fct_##A == 0) {my_font_extents_fct_##A = (uintptr_t)fct; return my_font_extents_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz font extents callback\n");
+    return NULL;
+}
+
+// glyph advance
+#define GO(A)                                                           \
+static uintptr_t my_glyph_advance_fct_##A = 0;                          \
+static int my_glyph_advance_##A(void* a, void* b, uint32_t c, void* d)  \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_advance_fct_##A, "ppup", a, b, c, d);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_advance_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_advance_fct_##A == (uintptr_t)fct) return my_glyph_advance_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_advance_fct_##A == 0) {my_glyph_advance_fct_##A = (uintptr_t)fct; return my_glyph_advance_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph advance callback\n");
+    return NULL;
+}
+
+// glyph advances
+#define GO(A)                                                           \
+static uintptr_t my_glyph_advances_fct_##A = 0;                         \
+static void my_glyph_advances_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f, uint32_t g, void* h)  \
+{                                                                       \
+    RunFunctionFmt(my_glyph_advances_fct_##A, "ppupupup", a, b, c, d, e, f, g, h);  \
+}
+SUPER()
+#undef GO
+static void* find_glyph_advances_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_advances_fct_##A == (uintptr_t)fct) return my_glyph_advances_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_advances_fct_##A == 0) {my_glyph_advances_fct_##A = (uintptr_t)fct; return my_glyph_advances_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph advances callback\n");
+    return NULL;
+}
+
+// glyph kerning
+#define GO(A)                                                           \
+static uintptr_t my_glyph_kerning_fct_##A = 0;                          \
+static int my_glyph_kerning_##A(void* a, void* b, uint32_t c, uint32_t d, void* e)  \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_kerning_fct_##A, "ppuup", a, b, c, d, e);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_kerning_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_kerning_fct_##A == (uintptr_t)fct) return my_glyph_kerning_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_kerning_fct_##A == 0) {my_glyph_kerning_fct_##A = (uintptr_t)fct; return my_glyph_kerning_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph kerning callback\n");
+    return NULL;
+}
+
+// glyph origin
+#define GO(A)                                                           \
+static uintptr_t my_glyph_origin_fct_##A = 0;                           \
+static int my_glyph_origin_##A(void* a, void* b, uint32_t c, void* d, void* e, void* f) \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_origin_fct_##A, "ppuppp", a, b, c, d, e, f);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_origin_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_origin_fct_##A == (uintptr_t)fct) return my_glyph_origin_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_origin_fct_##A == 0) {my_glyph_origin_fct_##A = (uintptr_t)fct; return my_glyph_origin_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph origin callback\n");
+    return NULL;
+}
+
+// glyph contour point
+#define GO(A)                                                           \
+static uintptr_t my_glyph_contour_pointfct_##A = 0;                     \
+static int my_glyph_contour_point##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f, void* g) \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_contour_pointfct_##A, "ppuuppp", a, b, c, d, e, f, g);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_contour_point_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_contour_pointfct_##A == (uintptr_t)fct) return my_glyph_contour_point##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_contour_pointfct_##A == 0) {my_glyph_contour_pointfct_##A = (uintptr_t)fct; return my_glyph_contour_point##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph contour point callback\n");
+    return NULL;
+}
+
+// glyph extents
+#define GO(A)                                                           \
+static uintptr_t my_glyph_extents_fct_##A = 0;                           \
+static int my_glyph_extents_##A(void* a, void* b, uint32_t c, void* d, void* e) \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_extents_fct_##A, "ppupp", a, b, c, d, e);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_extents_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_extents_fct_##A == (uintptr_t)fct) return my_glyph_extents_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_extents_fct_##A == 0) {my_glyph_extents_fct_##A = (uintptr_t)fct; return my_glyph_extents_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph extents callback\n");
+    return NULL;
+}
+
+// glyph from name
+#define GO(A)                                                           \
+static uintptr_t my_glyph_from_name_fct_##A = 0;                        \
+static int my_glyph_from_name_##A(void* a, void* b, void* c, int d, void* e, void* f)   \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_from_name_fct_##A, "pppipp", a, b, c, d, e, f); \
+}
+SUPER()
+#undef GO
+static void* find_glyph_from_name_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_from_name_fct_##A == (uintptr_t)fct) return my_glyph_from_name_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_from_name_fct_##A == 0) {my_glyph_from_name_fct_##A = (uintptr_t)fct; return my_glyph_from_name_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph from name callback\n");
+    return NULL;
+}
+
+
+
+
+
+
+// glyph
+#define GO(A)                                                           \
+static uintptr_t my_glyph_fct_##A = 0;                           \
+static int my_glyph_##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f) \
+{                                                                       \
+    return (int)RunFunctionFmt(my_glyph_fct_##A, "ppuupp", a, b, c, d, e, f);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_fct_##A == (uintptr_t)fct) return my_glyph_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_fct_##A == 0) {my_glyph_fct_##A = (uintptr_t)fct; return my_glyph_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph callback\n");
+    return NULL;
+}
+
+// glyph name
+#define GO(A)                               \
+static uintptr_t my_glyph_name_fct_##A = 0; \
+static int my_glyph_name_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f)    \
+{                                           \
+    return (int)RunFunctionFmt(my_glyph_name_fct_##A, "ppupup", a, b, c, d, e, f);  \
+}
+SUPER()
+#undef GO
+static void* find_glyph_name_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_name_fct_##A == (uintptr_t)fct) return my_glyph_name_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_name_fct_##A == 0) {my_glyph_name_fct_##A = (uintptr_t)fct; return my_glyph_name_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph origin callback\n");
+    return NULL;
+}
+
+// glyph shape
+#define GO(A)                                                           \
+static uintptr_t my_glyph_shape_fct_##A = 0;                           \
+static void my_glyph_shape_##A(void* a, void* b, uint32_t c, void* d, void* e, void* f) \
+{                                                                       \
+    RunFunctionFmt(my_glyph_shape_fct_##A, "ppuppp", a, b, c, d, e, f);   \
+}
+SUPER()
+#undef GO
+static void* find_glyph_shape_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_glyph_shape_fct_##A == (uintptr_t)fct) return my_glyph_shape_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_glyph_shape_fct_##A == 0) {my_glyph_shape_fct_##A = (uintptr_t)fct; return my_glyph_shape_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph shape callback\n");
+    return NULL;
+}
+
+// nominal glyph
+#define GO(A)                                   \
+static uintptr_t my_nominal_glyph_fct_##A = 0;  \
+static int my_nominal_glyph_##A(void* a, void* b, uint32_t c, void* d, void* e) \
+{                                               \
+    return (int)RunFunctionFmt(my_nominal_glyph_fct_##A, "ppupp", a, b, c, d, e);   \
+}
+SUPER()
+#undef GO
+static void* find_nominal_glyph_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_nominal_glyph_fct_##A == (uintptr_t)fct) return my_nominal_glyph_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_nominal_glyph_fct_##A == 0) {my_nominal_glyph_fct_##A = (uintptr_t)fct; return my_nominal_glyph_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz nominal glyph callback\n");
+    return NULL;
+}
+
+
+
+
+
+
+// nominal glyphs
+#define GO(A)                                   \
+static uintptr_t my_nominal_glyphs_fct_##A = 0; \
+static uint32_t my_nominal_glyphs_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f, uint32_t g, void* h)  \
+{                                               \
+    return (uint32_t)RunFunctionFmt(my_nominal_glyphs_fct_##A, "ppupupup", a, b, c, d, e, f, g, h); \
+}
+SUPER()
+#undef GO
+static void* find_nominal_glyphs_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_nominal_glyphs_fct_##A == (uintptr_t)fct) return my_nominal_glyphs_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_nominal_glyphs_fct_##A == 0) {my_nominal_glyphs_fct_##A = (uintptr_t)fct; return my_nominal_glyphs_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz nominal glyphs callback\n");
+    return NULL;
+}
+
+// variation glyph
+#define GO(A)                                   \
+static uintptr_t my_variation_glyph_fct_##A = 0;\
+static int my_variation_glyph_##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f) \
+{                                               \
+    return (int)RunFunctionFmt(my_variation_glyph_fct_##A, "ppuupp", a, b, c, d, e, f);   \
+}
+SUPER()
+#undef GO
+static void* find_variation_glyph_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_variation_glyph_fct_##A == (uintptr_t)fct) return my_variation_glyph_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_variation_glyph_fct_##A == 0) {my_variation_glyph_fct_##A = (uintptr_t)fct; return my_variation_glyph_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz variation glyph callback\n");
+    return NULL;
+}
+
+// destroy
+#define GO(A)                                               \
+static uintptr_t my_destroy_fct_##A = 0;                    \
+static void my_destroy_##A(void* a)                         \
+{                                                           \
+    RunFunctionFmt(my_destroy_fct_##A, "p", a); \
+}
+SUPER()
+#undef GO
+static void* find_destroy_Fct(void* fct)
+{
+    if (!fct) return NULL;
+    if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if (my_destroy_fct_##A == (uintptr_t)fct) return my_destroy_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if (my_destroy_fct_##A == 0) {my_destroy_fct_##A = (uintptr_t)fct; return my_destroy_##A;}
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz destroy callback\n");
+    return NULL;
+}
+
+#undef SUPER
+
+#define FUNC(A) \
+EXPORT void* my_##A(x64emu_t* emu, void* data, uint32_t length, uint32_t mode, void* user_data, void* destroy) \
+{                                                                           \
+    (void)emu;                                                              \
+    return my->A(data, length, mode, user_data, find_destroy_Fct(destroy)); \
+}
+
+FUNC(hb_blob_create)
+FUNC(hb_blob_create_or_fail)
+
+#undef FUNC
+
+#define FUNC(A) \
+EXPORT int my_##A(x64emu_t* emu, void* blob, void* key, void* data, void* destroy, int replace) \
+{                                                                       \
+    (void)emu;                                                          \
+    return (int)my->A(blob, key, data, find_destroy_Fct(destroy), replace);  \
+}
+
+FUNC(hb_blob_set_user_data)
+FUNC(hb_buffer_set_user_data)
+
+#undef FUNC
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* buffer, void* func, void* user_data, void* destroy) \
+{               \
+    (void)emu;  \
+    my->A(buffer, find_buffer_message_Fct(func), user_data, find_destroy_Fct(destroy));  \
+}
+
+FUNC(hb_buffer_set_message_func)
+
+#undef FUNC
+
+EXPORT void my_hb_draw_funcs_destroy(x64emu_t* emu, void* funcs)
+{
+    (void)emu;
+    struct hb_draw_funcs_t__destroy destroy = {0};
+    struct hb_draw_funcs_t* funcs_ = funcs;
+
+#define HB_DRAW_FUNC_IMPLEMENT(name) \
+    if (funcs_->destroy->name) destroy.name = find_destroy_Fct(funcs_->destroy->name);
+    HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_DRAW_FUNC_IMPLEMENT
+
+    struct hb_draw_funcs_t__destroy* original = funcs_->destroy;
+    funcs_->destroy = &destroy;
+    my->hb_draw_funcs_destroy(funcs);
+    funcs_->destroy = original;
+}
+
+EXPORT void my_hb_draw_funcs_set_close_path_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_draw_funcs_set_close_path_func(funcs, find_draw_close_path_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_draw_funcs_set_cubic_to_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_draw_funcs_set_cubic_to_func(funcs, find_draw_cubic_to_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* buffer, void* func, void* user_data, void* destroy) \
+{               \
+    (void)emu;  \
+    my->A(buffer, find_draw_line_or_move_to_Fct(func), user_data, find_destroy_Fct(destroy));  \
+}
+
+FUNC(hb_draw_funcs_set_line_to_func)
+FUNC(hb_draw_funcs_set_move_to_func)
+
+#undef FUNC
+
+EXPORT void my_hb_draw_funcs_set_quadratic_to_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_draw_funcs_set_quadratic_to_func(funcs, find_draw_quadratic_to_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void* my_hb_face_create_for_tables(x64emu_t* emu, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    return my->hb_face_create_for_tables(find_reference_table_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT int my_hb_face_set_user_data(x64emu_t* emu, void* face, void* key, void* data, void* destroy, int replace)
+{
+    (void)emu;
+    return (int)my->hb_face_set_user_data(face, key, data, find_destroy_Fct(destroy), replace);
+}
+
+EXPORT void my_hb_font_funcs_destroy(x64emu_t* emu, void* funcs)
+{
+    (void)emu;
+    struct hb_font_funcs_t__destroy destroy = {0};
+    struct hb_font_funcs_t* funcs_ = funcs;
+
+#define HB_FONT_FUNC_IMPLEMENT(get_,name) \
+    if (funcs_->destroy->name) destroy.name = find_destroy_Fct(funcs_->destroy->name);
+    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_FONT_FUNC_IMPLEMENT
+
+    struct hb_font_funcs_t__destroy* original = funcs_->destroy;
+    funcs_->destroy = &destroy;
+    my->hb_font_funcs_destroy(funcs);
+    funcs_->destroy = original;
+}
+
+EXPORT void my_hb_unicode_funcs_destroy(x64emu_t* emu, void* funcs)
+{
+    (void)emu;
+    struct hb_unicode_funcs_t__destroy destroy = {0};
+    struct hb_unicode_funcs_t* funcs_ = funcs;
+
+#define HB_UNICODE_FUNC_IMPLEMENT(name) \
+    if (funcs_->destroy.name) destroy.name = find_destroy_Fct(funcs_->destroy.name);
+    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
+#undef HB_UNICODE_FUNC_IMPLEMENT
+
+    struct hb_unicode_funcs_t__destroy original = funcs_->destroy;
+    funcs_->destroy = destroy;
+    my->hb_font_funcs_destroy(funcs);
+    funcs_->destroy = original;
+}
+
+EXPORT void my_hb_unicode_funcs_set_combining_class_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_combining_class_func(funcs, find_unicode_combining_class_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_compose_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_compose_func(funcs, find_unicode_compose_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_decompose_compatibility_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_decompose_compatibility_func(funcs, find_unicode_decompose_compatibility_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_decompose_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_decompose_func(funcs, find_unicode_decompose_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_eastasian_width_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_eastasian_width_func(funcs, find_unicode_eastasian_width_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_general_category_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_general_category_func(funcs, find_unicode_general_category_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_mirroring_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_mirroring_func(funcs, find_unicode_mirroring_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_unicode_funcs_set_script_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_unicode_funcs_set_script_func(funcs, find_unicode_script_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT int my_hb_unicode_funcs_set_user_data(x64emu_t* emu, void* funcs, void* key, void* data, void* destroy, int replace)
+{
+    (void)emu;
+    return (int)my->hb_unicode_funcs_set_user_data(funcs, key, data, find_destroy_Fct(destroy), replace);
+}
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)  \
+{               \
+    (void)emu;  \
+    my->A(funcs, find_font_extents_Fct(func), user_data, find_destroy_Fct(destroy));\
+}
+
+FUNC(hb_font_funcs_set_font_h_extents_func)
+FUNC(hb_font_funcs_set_font_v_extents_func)
+
+#undef FUNC
+
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)  \
+{               \
+    (void)emu;  \
+    my->A(funcs, find_glyph_advance_Fct(func), user_data, find_destroy_Fct(destroy));   \
+}
+
+FUNC(hb_font_funcs_set_glyph_h_advance_func)
+FUNC(hb_font_funcs_set_glyph_v_advance_func)
+
+#undef FUNC
+
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)  \
+{               \
+    (void)emu;  \
+    my->A(funcs, find_glyph_advances_Fct(func), user_data, find_destroy_Fct(destroy));  \
+}
+
+FUNC(hb_font_funcs_set_glyph_h_advances_func)
+FUNC(hb_font_funcs_set_glyph_v_advances_func)
+
+#undef FUNC
+
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)  \
+{               \
+    (void)emu;  \
+    my->A(funcs, find_glyph_kerning_Fct(func), user_data, find_destroy_Fct(destroy));   \
+}
+
+FUNC(hb_font_funcs_set_glyph_h_kerning_func)
+FUNC(hb_font_funcs_set_glyph_v_kerning_func)
+
+#undef FUNC
+
+
+#define FUNC(A) \
+EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)  \
+{               \
+    (void)emu;  \
+    my->A(funcs, find_glyph_origin_Fct(func), user_data, find_destroy_Fct(destroy));\
+}
+
+FUNC(hb_font_funcs_set_glyph_h_origin_func)
+FUNC(hb_font_funcs_set_glyph_v_origin_func)
+
+#undef FUNC
+
+EXPORT void my_hb_font_funcs_set_glyph_contour_point_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_contour_point_func(funcs, find_glyph_contour_point_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_glyph_extents_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_extents_func(funcs, find_glyph_extents_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_glyph_from_name_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_from_name_func(funcs, find_glyph_from_name_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_func(funcs, find_glyph_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_glyph_name_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_name_func(funcs, find_glyph_name_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_glyph_shape_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_glyph_shape_func(funcs, find_glyph_shape_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_nominal_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_nominal_glyph_func(funcs, find_nominal_glyph_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_nominal_glyphs_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_nominal_glyphs_func(funcs, find_nominal_glyphs_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT void my_hb_font_funcs_set_variation_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_funcs_set_variation_glyph_func(funcs, find_variation_glyph_Fct(func), user_data, find_destroy_Fct(destroy));
+}
+
+EXPORT int my_hb_font_funcs_set_user_data(x64emu_t* emu, void* funcs, void* key, void* data, void* destroy, int replace)
+{
+    (void)emu;
+    return (int)my->hb_font_funcs_set_user_data(funcs, key, data, find_destroy_Fct(destroy), replace);
+}
+
+EXPORT int my_hb_font_set_funcs(x64emu_t* emu, void* font, void* klass, void* data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_set_funcs(font, klass, data, find_destroy_Fct(destroy));
+}
+
+EXPORT int my_hb_font_set_funcs_data(x64emu_t* emu, void* font, void* data, void* destroy)
+{
+    (void)emu;
+    my->hb_font_set_funcs_data(font, data, find_destroy_Fct(destroy));
+}
+
+EXPORT int my_hb_font_set_user_data(x64emu_t* emu, void* font, void* key, void* data, void* destroy, int replace)
+{
+    (void)emu;
+    return (int)my->hb_font_set_user_data(font, key, data, find_destroy_Fct(destroy), replace);
+}
+
+#define CUSTOM_INIT \
+    getMy(lib);
+
+#define CUSTOM_FINI \
+    freeMy();
+
+#include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibharfbuzz_private.h b/src/wrapped/wrappedlibharfbuzz_private.h
new file mode 100644
index 00000000..2637f842
--- /dev/null
+++ b/src/wrapped/wrappedlibharfbuzz_private.h
@@ -0,0 +1,443 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error Meh...
+#endif
+
+GO(hb_aat_layout_feature_type_get_name_id, uFpu)
+GO(hb_aat_layout_feature_type_get_selector_infos, uFpuuppp)
+GO(hb_aat_layout_get_feature_types, uFpupp)
+GO(hb_aat_layout_has_positioning, iFp)
+GO(hb_aat_layout_has_substitution, iFp)
+GO(hb_aat_layout_has_tracking, iFp)
+GO(hb_blob_copy_writable_or_fail, pFp)
+GOM(hb_blob_create, pFEpuupp)
+GOM(hb_blob_create_or_fail, pFEpuupp)
+GO(hb_blob_create_from_file, pFp)
+GO(hb_blob_create_from_file_or_fail, pFp)
+GO(hb_blob_create_sub_blob, pFpuu)
+GO(hb_blob_destroy, vFp)
+GO(hb_blob_get_data, pFpp)
+GO(hb_blob_get_data_writable, pFpp)
+GO(hb_blob_get_empty, pFv)
+GO(hb_blob_get_length, uFp)
+GO(hb_blob_get_user_data, pFpp)
+GO(hb_blob_is_immutable, iFp)
+GO(hb_blob_make_immutable, vFp)
+GO(hb_blob_reference, pFp)
+GOM(hb_blob_set_user_data, iFEppppi)
+GO(hb_buffer_add, vFpuu)
+GO(hb_buffer_add_codepoints, vFppiui)
+GO(hb_buffer_add_latin1, vFppiui)
+GO(hb_buffer_add_utf16, vFppiui)
+GO(hb_buffer_add_utf32, vFppiui)
+GO(hb_buffer_add_utf8, vFppiui)
+GO(hb_buffer_allocation_successful, iFp)
+GO(hb_buffer_append, vFppuu)
+GO(hb_buffer_clear_contents, vFp)
+GO(hb_buffer_create, pFv)
+GO(hb_buffer_create_similar, pFp)
+GO(hb_buffer_deserialize_glyphs, iFppippu)
+GO(hb_buffer_deserialize_unicode, iFppipu)
+GO(hb_buffer_destroy, vFp)
+GO(hb_buffer_diff, uFppuu)
+GO(hb_buffer_get_cluster_level, uFp)
+GO(hb_buffer_get_content_type, uFp)
+GO(hb_buffer_get_direction, uFp)
+GO(hb_buffer_get_empty, pFv)
+GO(hb_buffer_get_flags, uFp)
+GO(hb_buffer_get_glyph_infos, pFpp)
+GO(hb_buffer_get_glyph_positions, pFpp)
+GO(hb_buffer_get_invisible_glyph, uFp)
+GO(hb_buffer_get_language, pFp)
+GO(hb_buffer_get_length, uFp)
+GO(hb_buffer_get_not_found_glyph, uFp)
+GO(hb_buffer_get_replacement_codepoint, uFp)
+GO(hb_buffer_get_script, uFp)
+GO(hb_buffer_get_segment_properties, vFpp)
+GO(hb_buffer_get_unicode_funcs, pFp)
+GO(hb_buffer_get_user_data, pFpp)
+GO(hb_buffer_guess_segment_properties, vFp)
+GO(hb_buffer_has_positions, iFp)
+GO(hb_buffer_normalize_glyphs, vFp)
+GO(hb_buffer_pre_allocate, iFpu)
+GO(hb_buffer_reference, pFp)
+GO(hb_buffer_reset, vFp)
+GO(hb_buffer_reverse, vFp)
+GO(hb_buffer_reverse_clusters, vFp)
+GO(hb_buffer_reverse_range, vFpuu)
+GO(hb_buffer_serialize, uFpuupuppuu)
+GO(hb_buffer_serialize_format_from_string, uFpi)
+GO(hb_buffer_serialize_format_to_string, pFu)
+GO(hb_buffer_serialize_glyphs, uFpuupuppuu)
+GO(hb_buffer_serialize_list_formats, pFv)
+GO(hb_buffer_serialize_unicode, uFpuupupuu)
+GO(hb_buffer_set_cluster_level, vFpu)
+GO(hb_buffer_set_content_type, vFpu)
+GO(hb_buffer_set_direction, vFpu)
+GO(hb_buffer_set_flags, vFpu)
+GO(hb_buffer_set_invisible_glyph, vFpu)
+GO(hb_buffer_set_language, vFpp)
+GO(hb_buffer_set_length, iFpu)
+GOM(hb_buffer_set_message_func, vFEpppp)
+GO(hb_buffer_set_not_found_glyph, vFpu)
+GO(hb_buffer_set_replacement_codepoint, vFpu)
+GO(hb_buffer_set_script, vFpu)
+GO(hb_buffer_set_segment_properties, vFpp)
+GO(hb_buffer_set_unicode_funcs, vFpp)
+GOM(hb_buffer_set_user_data, iFEppppi)
+GO(hb_color_get_alpha, CFu)
+GO(hb_color_get_blue, CFu)
+GO(hb_color_get_green, CFu)
+GO(hb_color_get_red, CFu)
+GO(hb_direction_from_string, uFpi)
+GO(hb_direction_to_string, pFu)
+GO(hb_draw_close_path, vFppp)
+GO(hb_draw_cubic_to, vFpppffffff)
+GO(hb_draw_funcs_create, pFv) // No need to reverse.
+GOM(hb_draw_funcs_destroy, vFEp)
+GO(hb_draw_funcs_is_immutable, iFp)
+GO(hb_draw_funcs_make_immutable, vFp)
+GO(hb_draw_funcs_reference, pFp)
+GOM(hb_draw_funcs_set_close_path_func, vFEpppp)
+GOM(hb_draw_funcs_set_cubic_to_func, vFEpppp)
+GOM(hb_draw_funcs_set_line_to_func, vFEpppp)
+GOM(hb_draw_funcs_set_move_to_func, vFEpppp)
+GOM(hb_draw_funcs_set_quadratic_to_func, vFEpppp)
+GO(hb_draw_line_to, vFpppff)
+GO(hb_draw_move_to, vFpppff)
+GO(hb_draw_quadratic_to, vFpppffff)
+GO(hb_face_builder_add_table, iFpup)
+GO(hb_face_builder_create, pFv)
+GO(hb_face_builder_sort_tables, vFpp)
+GO(hb_face_collect_unicodes, vFpp)
+GO(hb_face_collect_variation_selectors, vFpp)
+GO(hb_face_collect_variation_unicodes, vFpup)
+GO(hb_face_count, uFp)
+GO(hb_face_create, pFpu)
+GOM(hb_face_create_for_tables, pFEppp)
+GO(hb_face_destroy, vFp)
+GO(hb_face_get_empty, pFv)
+GO(hb_face_get_glyph_count, uFp)
+GO(hb_face_get_index, uFp)
+GO(hb_face_get_table_tags, uFpupp)
+GO(hb_face_get_upem, uFp)
+GO(hb_face_get_user_data, pFpp)
+GO(hb_face_is_immutable, iFp)
+GO(hb_face_make_immutable, vFp)
+GO(hb_face_reference, pFp)
+GO(hb_face_reference_blob, pFp)
+GO(hb_face_reference_table, pFpu)
+GO(hb_face_set_glyph_count, vFpu)
+GO(hb_face_set_index, vFpu)
+GO(hb_face_set_upem, vFpu)
+GOM(hb_face_set_user_data, iFEppppi)
+GO(hb_feature_from_string, iFpip)
+GO(hb_feature_to_string, vFppu)
+GO(hb_font_add_glyph_origin_for_direction, vFpuupp)
+GO(hb_font_changed, vFp)
+GO(hb_font_create, pFp)
+GO(hb_font_create_sub_font, pFp)
+GO(hb_font_destroy, vFp)
+GO(hb_font_funcs_create, pFv) // No need to reverse.
+GOM(hb_font_funcs_destroy, vFEp)
+GO(hb_font_funcs_get_empty, pFv)
+GO(hb_font_funcs_get_user_data, pFpp)
+GO(hb_font_funcs_is_immutable, iFp)
+GO(hb_font_funcs_make_immutable, vFp)
+GO(hb_font_funcs_reference, pFp)
+GOM(hb_font_funcs_set_font_h_extents_func, vFEpppp)
+GOM(hb_font_funcs_set_font_v_extents_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_h_advance_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_v_advance_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_h_advances_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_v_advances_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_h_kerning_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_v_kerning_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_h_origin_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_v_origin_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_contour_point_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_extents_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_from_name_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_name_func, vFEpppp)
+GOM(hb_font_funcs_set_glyph_shape_func, vFEpppp)
+GOM(hb_font_funcs_set_nominal_glyph_func, vFEpppp)
+GOM(hb_font_funcs_set_nominal_glyphs_func, vFEpppp)
+GOM(hb_font_funcs_set_variation_glyph_func, vFEpppp)
+GOM(hb_font_funcs_set_user_data, iFEppppi)
+GO(hb_font_get_empty, pFv)
+GO(hb_font_get_extents_for_direction, vFpup)
+GO(hb_font_get_face, pFp)
+GO(hb_font_get_glyph, iFpuup)
+GO(hb_font_get_glyph_advance_for_direction, vFpuupp)
+GO(hb_font_get_glyph_advances_for_direction, vFpuupupu)
+GO(hb_font_get_glyph_contour_point, iFpuupp)
+GO(hb_font_get_glyph_contour_point_for_origin, iFpuuupp)
+GO(hb_font_get_glyph_extents, iFpup)
+GO(hb_font_get_glyph_extents_for_origin, iFpuup)
+GO(hb_font_get_glyph_from_name, iFppip)
+GO(hb_font_get_glyph_h_advance, iFpu)
+GO(hb_font_get_glyph_h_advances, vFpupupu)
+GO(hb_font_get_glyph_h_kerning, iFpuu)
+GO(hb_font_get_glyph_h_origin, iFpupp)
+GO(hb_font_get_glyph_kerning_for_direction, vFpuuupp)
+GO(hb_font_get_glyph_name, iFpupu)
+GO(hb_font_get_glyph_origin_for_direction, vFpuupp)
+GO(hb_font_get_glyph_shape, vFpupp)
+GO(hb_font_get_glyph_v_advance, iFpu)
+GO(hb_font_get_glyph_v_advances, vFpupupu)
+GO(hb_font_get_glyph_v_kerning, iFpuu)
+GO(hb_font_get_glyph_v_origin, iFpupp)
+GO(hb_font_get_h_extents, iFpp)
+GO(hb_font_get_nominal_glyph, iFpup)
+GO(hb_font_get_nominal_glyphs, uFpupupu)
+GO(hb_font_get_parent, pFp)
+GO(hb_font_get_ppem, vFppp)
+GO(hb_font_get_ptem, fFp)
+GO(hb_font_get_scale, vFppp)
+GO(hb_font_get_serial, uFp)
+GO(hb_font_get_synthetic_slant, fFp)
+GO(hb_font_get_user_data, pFpp)
+GO(hb_font_get_var_coords_design, pFpp)
+GO(hb_font_get_var_coords_normalized, pFpp)
+GO(hb_font_get_variation_glyph, iFpuup)
+GO(hb_font_get_v_extents, iFpp)
+GO(hb_font_glyph_from_string, iFppip)
+GO(hb_font_glyph_to_string, vFpupu)
+GO(hb_font_is_immutable, iFp)
+GO(hb_font_make_immutable, vFp)
+GO(hb_font_reference, pFp)
+GO(hb_font_set_face, vFpp)
+GOM(hb_font_set_funcs, vFEpppp)
+GOM(hb_font_set_funcs_data, vFEppp)
+GO(hb_font_set_parent, vFpp)
+GO(hb_font_set_ppem, vFpuu)
+GO(hb_font_set_ptem, vFpf)
+GO(hb_font_set_scale, vFpii)
+GO(hb_font_set_synthetic_slant, vFpf)
+GOM(hb_font_set_user_data, iFEppppi)
+GO(hb_font_set_var_coords_design, vFppu)
+GO(hb_font_set_var_coords_normalized, vFppu)
+GO(hb_font_set_variations, vFppu)
+GO(hb_font_set_var_named_instance, vFpu)
+GO(hb_font_subtract_glyph_origin_for_direction, vFpuupp)
+//GO(hb_ft_face_create, 
+GO(hb_ft_face_create_cached, pFp)
+GO(hb_ft_face_create_referenced, pFp)
+GO(hb_ft_font_changed, vFp)
+//GO(hb_ft_font_create, 
+GO(hb_ft_font_create_referenced, pFp)
+GO(hb_ft_font_get_face, pFp)
+GO(hb_ft_font_get_load_flags, iFp)
+GO(hb_ft_font_lock_face, pFp)
+GO(hb_ft_font_set_funcs, vFp)
+GO(hb_ft_font_set_load_flags, vFpi)
+GO(hb_ft_font_unlock_face, vFp)
+GO(hb_ft_hb_font_changed, iFp)
+GO(hb_glib_blob_create, pFp)
+GO(hb_glib_get_unicode_funcs, pFv)
+GO(hb_glib_script_from_script, uFu)
+GO(hb_glib_script_to_script, uFu)
+GO(hb_glyph_info_get_glyph_flags, uFp)
+GO(hb_graphite2_face_get_gr_face, pFp)
+GO(hb_graphite2_font_get_gr_font, pFp)
+GO(hb_language_from_string, pFpi)
+GO(hb_language_get_default, pFv)
+GO(hb_language_matches, iFpp)
+GO(hb_language_to_string, pFp)
+GO(hb_map_allocation_successful, iFp)
+GO(hb_map_clear, vFp)
+GO(hb_map_copy, pFp)
+GO(hb_map_create, pFv)
+GO(hb_map_del, vFpu)
+GO(hb_map_destroy, vFp)
+GO(hb_map_get, uFpu)
+GO(hb_map_get_empty, pFv)
+GO(hb_map_get_population, uFp)
+GO(hb_map_get_user_data, pFpp)
+GO(hb_map_has, iFpu)
+GO(hb_map_hash, uFp)
+GO(hb_map_is_empty, iFp)
+GO(hb_map_is_equal, iFpp)
+GO(hb_map_reference, pFp)
+GO(hb_map_set, vFpuu)
+//GO(hb_map_set_user_data, 
+GO(hb_ot_color_glyph_get_layers, uFpuupp)
+GO(hb_ot_color_glyph_reference_png, pFpu)
+GO(hb_ot_color_glyph_reference_svg, pFpu)
+GO(hb_ot_color_has_layers, iFp)
+GO(hb_ot_color_has_palettes, iFp)
+GO(hb_ot_color_has_png, iFp)
+GO(hb_ot_color_has_svg, iFp)
+GO(hb_ot_color_palette_color_get_name_id, uFpu)
+GO(hb_ot_color_palette_get_colors, uFpuupp)
+GO(hb_ot_color_palette_get_count, uFp)
+GO(hb_ot_color_palette_get_flags, uFpu)
+GO(hb_ot_color_palette_get_name_id, uFpu)
+GO(hb_ot_font_set_funcs, vFp)
+GO(hb_ot_layout_collect_features, vFpupppp)
+GO(hb_ot_layout_collect_lookups, vFpupppp)
+GO(hb_ot_layout_feature_get_characters, uFpuuupp)
+GO(hb_ot_layout_feature_get_lookups, uFpuuupp)
+GO(hb_ot_layout_feature_get_name_ids, iFpuuppppp)
+GO(hb_ot_layout_feature_with_variations_get_lookups, uFpuuuupp)
+GO(hb_ot_layout_get_attach_points, uFpuupp)
+GO(hb_ot_layout_get_baseline, iFpuuuup)
+GO(hb_ot_layout_get_baseline_with_fallback, vFpuuuup)
+GO(hb_ot_layout_get_glyph_class, uFpu)
+GO(hb_ot_layout_get_glyphs_in_class, vFpup)
+GO(hb_ot_layout_get_horizontal_baseline_tag_for_script, uFu)
+GO(hb_ot_layout_get_ligature_carets, uFpuuupp)
+GO(hb_ot_layout_get_size_params, iFpppppp)
+GO(hb_ot_layout_has_glyph_classes, iFp)
+GO(hb_ot_layout_has_positioning, iFp)
+GO(hb_ot_layout_has_substitution, iFp)
+GO(hb_ot_layout_language_find_feature, iFpuuuup)
+GO(hb_ot_layout_language_get_feature_indexes, uFpuuuupp)
+GO(hb_ot_layout_language_get_feature_tags, uFpuuuupp)
+GO(hb_ot_layout_language_get_required_feature, iFpuuupp)
+GO(hb_ot_layout_language_get_required_feature_index, iFpuuup)
+GO(hb_ot_layout_lookup_collect_glyphs, vFpuupppp)
+GO(hb_ot_layout_lookup_get_glyph_alternates, uFpuuupp)
+GO(hb_ot_layout_lookup_get_optical_bound, iFpuuu)
+GO(hb_ot_layout_lookups_substitute_closure, vFppp)
+GO(hb_ot_layout_lookup_substitute_closure, vFpup)
+GO(hb_ot_layout_lookup_would_substitute, iFpupui)
+GO(hb_ot_layout_script_find_language, iFpuuup)
+GO(hb_ot_layout_script_get_language_tags, uFpuuupp)
+GO(hb_ot_layout_script_select_language, iFpuuupp)
+GO(hb_ot_layout_table_choose_script, iFpuppp)
+GO(hb_ot_layout_table_find_feature_variations, iFpupup)
+GO(hb_ot_layout_table_find_script, iFpuup)
+GO(hb_ot_layout_table_get_feature_tags, uFpuupp)
+GO(hb_ot_layout_table_get_lookup_count, uFpu)
+GO(hb_ot_layout_table_get_script_tags, uFpuupp)
+GO(hb_ot_layout_table_select_script, iFpuuppp)
+GO(hb_ot_math_get_constant, iFpu)
+GO(hb_ot_math_get_glyph_assembly, uFpuuuppp)
+GO(hb_ot_math_get_glyph_italics_correction, iFpu)
+GO(hb_ot_math_get_glyph_kerning, iFpuui)
+GO(hb_ot_math_get_glyph_kernings, uFpuuupp)
+GO(hb_ot_math_get_glyph_top_accent_attachment, iFpu)
+GO(hb_ot_math_get_glyph_variants, uFpuuupp)
+GO(hb_ot_math_get_min_connector_overlap, iFpu)
+GO(hb_ot_math_has_data, iFp)
+GO(hb_ot_math_is_glyph_extended_shape, iFpu)
+GO(hb_ot_meta_get_entry_tags, uFpupp)
+GO(hb_ot_meta_reference_entry, pFpu)
+GO(hb_ot_metrics_get_position, iFpup)
+GO(hb_ot_metrics_get_position_with_fallback, vFpup)
+GO(hb_ot_metrics_get_variation, fFpu)
+GO(hb_ot_metrics_get_x_variation, iFpu)
+GO(hb_ot_metrics_get_y_variation, iFpu)
+GO(hb_ot_name_get_utf16, uFpuppp)
+GO(hb_ot_name_get_utf32, uFpuppp)
+GO(hb_ot_name_get_utf8, uFpuppp)
+GO(hb_ot_name_list_names, pFpp)
+GO(hb_ot_shape_glyphs_closure, vFpppup)
+GO(hb_ot_shape_plan_collect_lookups, vFpup)
+GO(hb_ot_tag_from_language, uFp)
+GO(hb_ot_tags_from_script, vFupp)
+GO(hb_ot_tags_from_script_and_language, vFuppppp)
+GO(hb_ot_tags_to_script_and_language, vFuupp)
+GO(hb_ot_tag_to_language, pFu)
+GO(hb_ot_tag_to_script, uFu)
+GO(hb_ot_var_find_axis, iFpupp)
+GO(hb_ot_var_find_axis_info, iFpup)
+GO(hb_ot_var_get_axes, uFpupp)
+GO(hb_ot_var_get_axis_count, uFp)
+GO(hb_ot_var_get_axis_infos, uFpupp)
+GO(hb_ot_var_get_named_instance_count, uFp)
+GO(hb_ot_var_has_data, iFp)
+GO(hb_ot_var_named_instance_get_design_coords, uFpupp)
+GO(hb_ot_var_named_instance_get_postscript_name_id, uFpu)
+GO(hb_ot_var_named_instance_get_subfamily_name_id, uFpu)
+GO(hb_ot_var_normalize_coords, vFpupp)
+GO(hb_ot_var_normalize_variations, vFppupu)
+GO(hb_script_from_iso15924_tag, uFu)
+GO(hb_script_from_string, uFpi)
+GO(hb_script_get_horizontal_direction, uFu)
+GO(hb_script_to_iso15924_tag, uFu)
+GO(hb_segment_properties_equal, iFpp)
+GO(hb_segment_properties_hash, uFp)
+GO(hb_segment_properties_overlay, vFpp)
+GO(hb_set_add, vFpu)
+GO(hb_set_add_range, vFpuu)
+GO(hb_set_add_sorted_array, vFppu)
+GO(hb_set_allocation_successful, iFp)
+GO(hb_set_clear, vFp)
+GO(hb_set_copy, pFp)
+GO(hb_set_create, pFv)
+GO(hb_set_del, vFpu)
+GO(hb_set_del_range, vFpuu)
+GO(hb_set_destroy, vFp)
+GO(hb_set_get_empty, pFv)
+GO(hb_set_get_max, uFp)
+GO(hb_set_get_min, uFp)
+GO(hb_set_get_population, uFp)
+GO(hb_set_get_user_data, pFpp)
+GO(hb_set_has, iFpu)
+GO(hb_set_hash, uFp)
+GO(hb_set_intersect, vFpp)
+GO(hb_set_invert, vFp)
+GO(hb_set_is_empty, iFp)
+GO(hb_set_is_equal, iFpp)
+GO(hb_set_is_subset, iFpp)
+GO(hb_set_next, iFpp)
+GO(hb_set_next_many, uFpupu)
+GO(hb_set_next_range, iFppp)
+GO(hb_set_previous, iFpp)
+GO(hb_set_previous_range, iFppp)
+GO(hb_set_reference, pFp)
+GO(hb_set_set, vFpp)
+//GO(hb_set_set_user_data, 
+GO(hb_set_subtract, vFpp)
+GO(hb_set_symmetric_difference, vFpp)
+GO(hb_set_union, vFpp)
+GO(hb_shape, vFpppu)
+GO(hb_shape_full, iFpppup)
+GO(hb_shape_list_shapers, pFv)
+GO(hb_shape_plan_create, pFpppup)
+GO(hb_shape_plan_create2, pFpppupup)
+GO(hb_shape_plan_create_cached, pFpppup)
+GO(hb_shape_plan_create_cached2, pFpppupup)
+GO(hb_shape_plan_destroy, vFp)
+GO(hb_shape_plan_execute, iFppppu)
+GO(hb_shape_plan_get_empty, pFv)
+GO(hb_shape_plan_get_shaper, pFp)
+GO(hb_shape_plan_get_user_data, pFpp)
+GO(hb_shape_plan_reference, pFp)
+//GO(hb_shape_plan_set_user_data, 
+GO(hb_style_get_value, fFpu)
+GO(hb_tag_from_string, uFpi)
+GO(hb_tag_to_string, vFup)
+GO(hb_unicode_combining_class, uFpu)
+GO(hb_unicode_compose, iFpuup)
+GO(hb_unicode_decompose, iFpupp)
+GO(hb_unicode_decompose_compatibility, uFpup)
+GO(hb_unicode_eastasian_width, uFpu)
+GO(hb_unicode_funcs_create, pFp)
+GO(hb_unicode_funcs_destroy, vFp)
+GO(hb_unicode_funcs_get_default, pFv)
+GO(hb_unicode_funcs_get_empty, pFv)
+GO(hb_unicode_funcs_get_parent, pFp)
+GO(hb_unicode_funcs_get_user_data, pFpp)
+GO(hb_unicode_funcs_is_immutable, iFp)
+GO(hb_unicode_funcs_make_immutable, vFp)
+GOM(hb_unicode_funcs_reference, pFEp)
+GOM(hb_unicode_funcs_set_combining_class_func, vFEpppp)
+GOM(hb_unicode_funcs_set_compose_func, vFEpppp)
+GOM(hb_unicode_funcs_set_decompose_compatibility_func, vFEpppp)
+GOM(hb_unicode_funcs_set_decompose_func, vFEpppp)
+GOM(hb_unicode_funcs_set_eastasian_width_func, vFEpppp)
+GOM(hb_unicode_funcs_set_general_category_func, vFEpppp)
+GOM(hb_unicode_funcs_set_mirroring_func, vFEpppp)
+GOM(hb_unicode_funcs_set_script_func, vFEpppp)
+GOM(hb_unicode_funcs_set_user_data, iFEppppi)
+GO(hb_unicode_general_category, uFpu)
+GO(hb_unicode_mirroring, uFpu)
+GO(hb_unicode_script, uFpu)
+GO(hb_variation_from_string, iFpip)
+GO(hb_variation_to_string, vFppu)
+GO(hb_version, vFppp)
+GO(hb_version_atleast, iFuuu)
+GO(hb_version_string, pFv)
diff --git a/src/wrapped/wrappedlibibus.c b/src/wrapped/wrappedlibibus.c
index 95ea0f81..22d83a2c 100644
--- a/src/wrapped/wrappedlibibus.c
+++ b/src/wrapped/wrappedlibibus.c
@@ -38,7 +38,7 @@ GO(3)
 static uintptr_t my_GAsyncReadyCallback_fct_##A = 0;   \
 static void my_GAsyncReadyCallback_##A(void* source, void* res, void* data)     \
 {                                       \
-    RunFunction(my_context, my_GAsyncReadyCallback_fct_##A, 3, source, res, data);\
+    RunFunctionFmt(my_GAsyncReadyCallback_fct_##A, "ppp", source, res, data);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibpcre.c b/src/wrapped/wrappedlibpcre.c
index 1175f7dd..9d3b606c 100644
--- a/src/wrapped/wrappedlibpcre.c
+++ b/src/wrapped/wrappedlibpcre.c
@@ -20,7 +20,7 @@ typedef void  (*pcre_free_t)(void *);
 EXPORT uintptr_t my_pcre_free;
 
 void wrapped_pcre_free(void* p) {
-    RunFunction(my_context, my_pcre_free, 1, p);
+    RunFunctionFmt(my_pcre_free, "p", p);
 }
 EXPORT pcre_free_t pcre_free = wrapped_pcre_free;
 
diff --git a/src/wrapped/wrappedlibrt.c b/src/wrapped/wrappedlibrt.c
index 29fa375c..f89d353f 100644
--- a/src/wrapped/wrappedlibrt.c
+++ b/src/wrapped/wrappedlibrt.c
@@ -40,7 +40,7 @@ GO(3)
 static uintptr_t my_sigev_notify_fct_##A = 0;   \
 static void my_sigev_notify_##A(void* sigval)    \
 {                                       \
-    RunFunction(my_context, my_sigev_notify_fct_##A, 1, sigval);\
+    RunFunctionFmt(my_sigev_notify_fct_##A, "p", sigval);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibsm.c b/src/wrapped/wrappedlibsm.c
index daf095b7..1ab0c30f 100644
--- a/src/wrapped/wrappedlibsm.c
+++ b/src/wrapped/wrappedlibsm.c
@@ -54,25 +54,25 @@ typedef struct my_SmcCallbacks_s {
 static uintptr_t my_save_yourself_fct = 0;
 static void my_save_yourself(void* smcConn, void* clientData, int saveType, int shutdown, int interactStyle, int fast)
 {
-    RunFunction(my_context, my_save_yourself_fct, 6, smcConn, clientData, saveType, shutdown, interactStyle, fast);
+    RunFunctionFmt(my_save_yourself_fct, "ppiiii", smcConn, clientData, saveType, shutdown, interactStyle, fast);
 }
 
 static uintptr_t my_die_fct = 0;
 static void my_die(void* smcConn, void* clientData)
 {
-    RunFunction(my_context, my_die_fct, 2, smcConn, clientData);
+    RunFunctionFmt(my_die_fct, "pp", smcConn, clientData);
 }
 
 static uintptr_t my_shutdown_cancelled_fct = 0;
 static void my_shutdown_cancelled(void* smcConn, void* clientData)
 {
-    RunFunction(my_context, my_shutdown_cancelled_fct, 2, smcConn, clientData);
+    RunFunctionFmt(my_shutdown_cancelled_fct, "pp", smcConn, clientData);
 }
 
 static uintptr_t my_save_complete_fct = 0;
 static void my_save_complete(void* smcConn, void* clientData)
 {
-    RunFunction(my_context, my_save_complete_fct, 2, smcConn, clientData);
+    RunFunctionFmt(my_save_complete_fct, "pp", smcConn, clientData);
 }
 
 
@@ -102,7 +102,7 @@ GO(4)
 static uintptr_t my_Request_fct_##A = 0;        \
 static void my_Request_##A(void* a, void* b)     \
 {                                               \
-    RunFunction(my_context, my_Request_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_Request_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibsndfile.c b/src/wrapped/wrappedlibsndfile.c
index 37660663..bbb11b56 100644
--- a/src/wrapped/wrappedlibsndfile.c
+++ b/src/wrapped/wrappedlibsndfile.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_sf_vio_get_filelen_fct_##A = 0;                                 \
 static int64_t my_sf_vio_get_filelen_##A(void* a)                                   \
 {                                                                                   \
-    return (int64_t)RunFunction(my_context, my_sf_vio_get_filelen_fct_##A, 1, a);   \
+    return (int64_t)RunFunctionFmt(my_sf_vio_get_filelen_fct_##A, "p", a);   \
 }
 SUPER()
 #undef GO
@@ -60,7 +60,7 @@ static void* find_sf_vio_get_filelen_Fct(void* fct)
 static uintptr_t my_sf_vio_seek_fct_##A = 0;                                                        \
 static int64_t my_sf_vio_seek_##A(int64_t offset, int whence, void *user_data)                      \
 {                                                                                                   \
-    return (int64_t)RunFunction(my_context, my_sf_vio_seek_fct_##A, 3, offset, whence, user_data);  \
+    return (int64_t)RunFunctionFmt(my_sf_vio_seek_fct_##A, "Iip", offset, whence, user_data);  \
 }
 SUPER()
 #undef GO
@@ -82,7 +82,7 @@ static void* find_sf_vio_seek_Fct(void* fct)
 static uintptr_t my_sf_vio_read_fct_##A = 0;                                                    \
 static int64_t my_sf_vio_read_##A(void* ptr, int64_t count, void *user_data)                    \
 {                                                                                               \
-    return (int64_t)RunFunction(my_context, my_sf_vio_read_fct_##A, 3, ptr, count, user_data);  \
+    return (int64_t)RunFunctionFmt(my_sf_vio_read_fct_##A, "pIp", ptr, count, user_data);  \
 }
 SUPER()
 #undef GO
@@ -104,7 +104,7 @@ static void* find_sf_vio_read_Fct(void* fct)
 static uintptr_t my_sf_vio_write_fct_##A = 0;                                                   \
 static int64_t my_sf_vio_write_##A(const void* ptr, int64_t count, void *user_data)             \
 {                                                                                               \
-    return (int64_t)RunFunction(my_context, my_sf_vio_write_fct_##A, 3, ptr, count, user_data); \
+    return (int64_t)RunFunctionFmt(my_sf_vio_write_fct_##A, "pIp", ptr, count, user_data); \
 }
 SUPER()
 #undef GO
@@ -126,7 +126,7 @@ static void* find_sf_vio_write_Fct(void* fct)
 static uintptr_t my_sf_vio_tell_fct_##A = 0;                                \
 static int64_t my_sf_vio_tell_##A(void* a)                                  \
 {                                                                           \
-    return (int64_t)RunFunction(my_context, my_sf_vio_tell_fct_##A, 1, a);  \
+    return (int64_t)RunFunctionFmt(my_sf_vio_tell_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibssl.c b/src/wrapped/wrappedlibssl.c
index 14f28ae9..056c2ef9 100644
--- a/src/wrapped/wrappedlibssl.c
+++ b/src/wrapped/wrappedlibssl.c
@@ -41,7 +41,7 @@ GO(4)
 static uintptr_t my_pem_passwd_cb_fct_##A = 0;                                                      \
 static int my_pem_passwd_cb_##A(void* buf, int size, int rwflag, void* password)                    \
 {                                                                                                   \
-    return (int)RunFunction(my_context, my_pem_passwd_cb_fct_##A, 4, buf, size, rwflag, password);  \
+    return (int)RunFunctionFmt(my_pem_passwd_cb_fct_##A, "piip", buf, size, rwflag, password);  \
 }
 SUPER()
 #undef GO
@@ -65,7 +65,7 @@ static void* find_pem_passwd_cb_Fct(void* fct)
 static uintptr_t my_anonymous_fct_##A = 0;                                      \
 static void* my_anonymous_##A(void* a, void* b, void* c, void *d)               \
 {                                                                               \
-    return (void*)RunFunction(my_context, my_anonymous_fct_##A, 4, a, b, c, d);   \
+    return (void*)RunFunctionFmt(my_anonymous_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -90,7 +90,7 @@ static void* find_anonymous_Fct(void* fct)
 static uintptr_t my_verify_fct_##A = 0;                                 \
 static int my_verify_##A(int a, void* b)                                \
 {                                                                       \
-    return (int)RunFunction(my_context, my_verify_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my_verify_fct_##A, "ip", a, b);    \
 }
 SUPER()
 #undef GO
@@ -124,7 +124,7 @@ static void* reverse_verify_Fct(void* fct)
 static uintptr_t my_ex_new_fct_##A = 0;                                                        \
 static void my_ex_new_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                           \
-    RunFunction(my_context, my_ex_new_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my_ex_new_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -148,7 +148,7 @@ static void* find_ex_new_Fct(void* fct)
 static uintptr_t my_ex_free_fct_##A = 0;                                                        \
 static void my_ex_free_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                               \
-    RunFunction(my_context, my_ex_free_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my_ex_free_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -172,7 +172,7 @@ static void* find_ex_free_Fct(void* fct)
 static uintptr_t my_ex_dup_fct_##A = 0;                                                             \
 static int my_ex_dup_##A(void* to, void* from, void* from_d, int idx, long argl, void* argp)        \
 {                                                                                                   \
-    return (int) RunFunction(my_context, my_ex_dup_fct_##A, 6, to, from, from_d, idx, argl, argp);  \
+    return (int) RunFunctionFmt(my_ex_dup_fct_##A, "pppilp", to, from, from_d, idx, argl, argp);  \
 }
 SUPER()
 #undef GO
@@ -196,7 +196,7 @@ static void* find_ex_dup_Fct(void* fct)
 static uintptr_t my_client_cb_fct_##A = 0;                                                                              \
 static uint32_t my_client_cb_##A(void* ssl, void* hint, void* identity, uint32_t id_len, void* psk, uint32_t psk_len)   \
 {                                                                                                                       \
-    return RunFunction(my_context, my_client_cb_fct_##A, 6, ssl, hint, identity, id_len, psk, psk_len);                 \
+    return RunFunctionFmt(my_client_cb_fct_##A, "pppupu", ssl, hint, identity, id_len, psk, psk_len);                 \
 }
 SUPER()
 #undef GO
@@ -215,12 +215,86 @@ static void* find_client_cb_Fct(void* fct)
     return NULL;
 }
 
+
+// server_cb
+#define GO(A)   \
+static uintptr_t my_server_cb_fct_##A = 0;                                                  \
+static uint32_t my_server_cb_##A(void* ssl, void* identity, void* psk, uint32_t psk_len)    \
+{                                                                                           \
+    return RunFunctionFmt(my_server_cb_fct_##A, "pppu", ssl, identity, psk, psk_len);    \
+}
+SUPER()
+#undef GO
+static void* find_server_cb_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_server_cb_fct_##A == (uintptr_t)fct) return my_server_cb_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_server_cb_fct_##A == 0) {my_server_cb_fct_##A = (uintptr_t)fct; return my_server_cb_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL server_cb callback\n");
+    return NULL;
+}
+
+
+// use_session_cb
+#define GO(A)   \
+static uintptr_t my_use_session_cb_fct_##A = 0;                                                         \
+static uint32_t my_use_session_cb_##A(void* ssl, void* md, void* id, void* id_len, void* sess)          \
+{                                                                                                       \
+    return RunFunctionFmt(my_use_session_cb_fct_##A, "ppppp", ssl, md, id, id_len, sess);   \
+}
+SUPER()
+#undef GO
+static void* find_use_session_cb_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_use_session_cb_fct_##A == (uintptr_t)fct) return my_use_session_cb_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_use_session_cb_fct_##A == 0) {my_use_session_cb_fct_##A = (uintptr_t)fct; return my_use_session_cb_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL use_session_cb callback\n");
+    return NULL;
+}
+
+// sess
+#define GO(A)   \
+static uintptr_t my_sess_fct_##A = 0;                                   \
+static uint32_t my_sess_##A(void* ssl, void* sess)                      \
+{                                                                       \
+    return RunFunctionFmt(my_sess_fct_##A, "pp", ssl, sess);\
+}
+SUPER()
+#undef GO
+static void* find_sess_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_sess_fct_##A == (uintptr_t)fct) return my_sess_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_sess_fct_##A == 0) {my_sess_fct_##A = (uintptr_t)fct; return my_sess_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL sess callback\n");
+    return NULL;
+}
+
 // proto_select
 #define GO(A)   \
 static uintptr_t my_proto_select_fct_##A = 0;                                                           \
 static int my_proto_select_##A(void* s, void* out, void* outlen, void* in, uint32_t inlen, void* arg)   \
 {                                                                                                       \
-    return (int)RunFunction(my_context, my_proto_select_fct_##A, 6, s, out, outlen, in, inlen, arg);    \
+    return (int)RunFunctionFmt(my_proto_select_fct_##A, "ppppup", s, out, outlen, in, inlen, arg);    \
 }
 SUPER()
 #undef GO
@@ -244,7 +318,7 @@ static void* find_proto_select_Fct(void* fct)
 static uintptr_t my_client_cert_fct_##A = 0;                                    \
 static int my_client_cert_##A(void* a, void* b, void* c)                        \
 {                                                                               \
-    return (int)RunFunction(my_context, my_client_cert_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my_client_cert_fct_##A, "ppp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -263,12 +337,61 @@ static void* find_client_cert_Fct(void* fct)
     return NULL;
 }
 
+// cookie_generate
+#define GO(A)   \
+static uintptr_t my_cookie_generate_fct_##A = 0;            \
+static int my_cookie_generate_##A(void* a, void* b, void* c)\
+{                                                           \
+    return (int)RunFunctionFmt(my_cookie_generate_fct_##A, "ppp", a, b, c); \
+}
+SUPER()
+#undef GO
+static void* find_cookie_generate_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_cookie_generate_fct_##A == (uintptr_t)fct) return my_cookie_generate_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_cookie_generate_fct_##A == 0) {my_cookie_generate_fct_##A = (uintptr_t)fct; return my_cookie_generate_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL cookie_generate callback\n");
+    return NULL;
+}
+
+
+// cookie_verify
+#define GO(A)   \
+static uintptr_t my_cookie_verify_fct_##A = 0;                  \
+static int my_cookie_verify_##A(void* a, void* b, uint32_t c)   \
+{                                                               \
+    return (int)RunFunctionFmt(my_cookie_verify_fct_##A, "ppu", a, b, c);   \
+}
+SUPER()
+#undef GO
+static void* find_cookie_verify_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my_cookie_verify_fct_##A == (uintptr_t)fct) return my_cookie_verify_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_cookie_verify_fct_##A == 0) {my_cookie_verify_fct_##A = (uintptr_t)fct; return my_cookie_verify_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL cookie_verify callback\n");
+    return NULL;
+}
+
 // alpn_select
 #define GO(A)   \
 static uintptr_t my_alpn_select_fct_##A = 0;                                            \
 static int my_alpn_select_##A(void* a, void* b, void* c, void* d, uint32_t e, void* f)  \
 {                                                                                       \
-    return (int)RunFunction(my_context, my_alpn_select_fct_##A, 6, a, b, c, d, e, f);   \
+    return (int)RunFunctionFmt(my_alpn_select_fct_##A, "ppppup", a, b, c, d, e, f);   \
 }
 SUPER()
 #undef GO
@@ -331,6 +454,24 @@ EXPORT void my_SSL_set_psk_client_callback(x64emu_t* emu, void* ctx, void* cb)
     my->SSL_set_psk_client_callback(ctx, find_client_cb_Fct(cb));
 }
 
+EXPORT void my_SSL_set_psk_server_callback(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->SSL_set_psk_server_callback(ctx, find_client_cb_Fct(cb));
+}
+
+EXPORT void my_SSL_set_psk_use_session_callback(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->SSL_set_psk_use_session_callback(ctx, find_use_session_cb_Fct(cb));
+}
+
+EXPORT void my_SSL_CTX_sess_set_new_cb(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->SSL_CTX_sess_set_new_cb(ctx, find_sess_Fct(cb));
+}
+
 EXPORT void my_SSL_CTX_set_next_proto_select_cb(x64emu_t* emu, void* ctx, void* cb, void* arg)
 {
     (void)emu;
@@ -355,6 +496,18 @@ EXPORT void my_SSL_CTX_set_client_cert_cb(x64emu_t* emu, void* ctx, void* cb)
     my->SSL_CTX_set_client_cert_cb(ctx, find_client_cert_Fct(cb));
 }
 
+EXPORT void my_SSL_CTX_set_cookie_generate_cb(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->SSL_CTX_set_cookie_generate_cb(ctx, find_cookie_generate_Fct(cb));
+}
+
+EXPORT void my_SSL_CTX_set_cookie_verify_cb(x64emu_t* emu, void* ctx, void* cb)
+{
+    (void)emu;
+    my->SSL_CTX_set_cookie_verify_cb(ctx, find_cookie_verify_Fct(cb));
+}
+
 EXPORT void my_SSL_CTX_set_alpn_select_cb(x64emu_t* emu, void* ctx, void* f ,void* arg)
 {
     (void)emu;
diff --git a/src/wrapped/wrappedlibssl3.c b/src/wrapped/wrappedlibssl3.c
index 88c758d9..23d2e3b5 100644
--- a/src/wrapped/wrappedlibssl3.c
+++ b/src/wrapped/wrappedlibssl3.c
@@ -37,7 +37,7 @@ GO(4)
 static uintptr_t my3_pem_passwd_cb_fct_##A = 0;                                                      \
 static int my3_pem_passwd_cb_##A(void* buf, int size, int rwflag, void* password)                    \
 {                                                                                                   \
-    return (int)RunFunction(my_context, my3_pem_passwd_cb_fct_##A, 4, buf, size, rwflag, password);  \
+    return (int)RunFunctionFmt(my3_pem_passwd_cb_fct_##A, "piip", buf, size, rwflag, password);  \
 }
 SUPER()
 #undef GO
@@ -61,7 +61,7 @@ static void* find_pem_passwd_cb_Fct(void* fct)
 static uintptr_t my3_anonymous_fct_##A = 0;                                      \
 static void* my3_anonymous_##A(void* a, void* b, void* c, void *d)               \
 {                                                                               \
-    return (void*)RunFunction(my_context, my3_anonymous_fct_##A, 4, a, b, c, d);   \
+    return (void*)RunFunctionFmt(my3_anonymous_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -86,7 +86,7 @@ static void* find_anonymous_Fct(void* fct)
 static uintptr_t my3_verify_fct_##A = 0;                                 \
 static int my3_verify_##A(int a, void* b)                                \
 {                                                                       \
-    return (int)RunFunction(my_context, my3_verify_fct_##A, 2, a, b);    \
+    return (int)RunFunctionFmt(my3_verify_fct_##A, "ip", a, b);    \
 }
 SUPER()
 #undef GO
@@ -120,7 +120,7 @@ static void* reverse_verify_Fct(void* fct)
 static uintptr_t my3_ex_new_fct_##A = 0;                                                        \
 static void my3_ex_new_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                           \
-    RunFunction(my_context, my3_ex_new_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my3_ex_new_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -144,7 +144,7 @@ static void* find_ex_new_Fct(void* fct)
 static uintptr_t my3_ex_free_fct_##A = 0;                                                        \
 static void my3_ex_free_##A(void* parent, void* ptr, void* ad, int idx, long argl, void* argp)   \
 {                                                                                               \
-    RunFunction(my_context, my3_ex_free_fct_##A, 6, parent, ptr, ad, idx, argl, argp);           \
+    RunFunctionFmt(my3_ex_free_fct_##A, "pppilp", parent, ptr, ad, idx, argl, argp);           \
 }
 SUPER()
 #undef GO
@@ -168,7 +168,7 @@ static void* find_ex_free_Fct(void* fct)
 static uintptr_t my3_ex_dup_fct_##A = 0;                                                             \
 static int my3_ex_dup_##A(void* to, void* from, void* from_d, int idx, long argl, void* argp)        \
 {                                                                                                   \
-    return (int) RunFunction(my_context, my3_ex_dup_fct_##A, 6, to, from, from_d, idx, argl, argp);  \
+    return (int) RunFunctionFmt(my3_ex_dup_fct_##A, "pppilp", to, from, from_d, idx, argl, argp);  \
 }
 SUPER()
 #undef GO
@@ -192,7 +192,7 @@ static void* find_ex_dup_Fct(void* fct)
 static uintptr_t my3_client_cb_fct_##A = 0;                                                                              \
 static uint32_t my3_client_cb_##A(void* ssl, void* hint, void* identity, uint32_t id_len, void* psk, uint32_t psk_len)   \
 {                                                                                                                       \
-    return RunFunction(my_context, my3_client_cb_fct_##A, 6, ssl, hint, identity, id_len, psk, psk_len);                 \
+    return RunFunctionFmt(my3_client_cb_fct_##A, "pppupu", ssl, hint, identity, id_len, psk, psk_len);                 \
 }
 SUPER()
 #undef GO
@@ -216,7 +216,7 @@ static void* find_client_cb_Fct(void* fct)
 static uintptr_t my3_proto_select_fct_##A = 0;                                                           \
 static int my3_proto_select_##A(void* s, void* out, void* outlen, void* in, uint32_t inlen, void* arg)   \
 {                                                                                                       \
-    return (int)RunFunction(my_context, my3_proto_select_fct_##A, 6, s, out, outlen, in, inlen, arg);    \
+    return (int)RunFunctionFmt(my3_proto_select_fct_##A, "ppppup", s, out, outlen, in, inlen, arg);    \
 }
 SUPER()
 #undef GO
@@ -240,7 +240,7 @@ static void* find_proto_select_Fct(void* fct)
 static uintptr_t my3_client_cert_fct_##A = 0;                                    \
 static int my3_client_cert_##A(void* a, void* b, void* c)                        \
 {                                                                               \
-    return (int)RunFunction(my_context, my3_client_cert_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my3_client_cert_fct_##A, "ppp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -259,6 +259,30 @@ static void* find_client_cert_Fct(void* fct)
     return NULL;
 }
 
+// alpn_select_cb
+#define GO(A)   \
+static uintptr_t my3_alpn_select_cb_fct_##A = 0;                                                    \
+static int my3_alpn_select_cb_##A(void* a, void* b, void* c, void* d, uint32_t e, void* f)          \
+{                                                                                                   \
+    return (int)RunFunctionFmt(my3_alpn_select_cb_fct_##A, "ppppup", a, b, c, d, e, f); \
+}
+SUPER()
+#undef GO
+static void* find_alpn_select_cb_Fct(void* fct)
+{
+    if(!fct) return NULL;
+    void* p;
+    if((p = GetNativeFnc((uintptr_t)fct))) return p;
+    #define GO(A) if(my3_alpn_select_cb_fct_##A == (uintptr_t)fct) return my3_alpn_select_cb_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my3_alpn_select_cb_fct_##A == 0) {my3_alpn_select_cb_fct_##A = (uintptr_t)fct; return my3_alpn_select_cb_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libSSL alpn_select_cb callback\n");
+    return NULL;
+}
+
 #undef SUPER
 
 EXPORT void my3_SSL_CTX_set_default_passwd_cb(x64emu_t* emu, void* ctx, void* cb)
@@ -327,6 +351,11 @@ EXPORT void my3_SSL_CTX_set_client_cert_cb(x64emu_t* emu, void* ctx, void* cb)
     my->SSL_CTX_set_client_cert_cb(ctx, find_client_cert_Fct(cb));
 }
 
+EXPORT void my3_SSL_CTX_set_alpn_select_cb(x64emu_t* emu, void* ctx, void* f, void* arg)
+{
+    my->SSL_CTX_set_alpn_select_cb(ctx, find_alpn_select_cb_Fct(f), arg);
+}
+
 #define CUSTOM_INIT \
     SETALT(my3_);   \
     getMy(lib);     \
diff --git a/src/wrapped/wrappedlibssl3_private.h b/src/wrapped/wrappedlibssl3_private.h
index 755854d7..e9ff941c 100644
--- a/src/wrapped/wrappedlibssl3_private.h
+++ b/src/wrapped/wrappedlibssl3_private.h
@@ -224,7 +224,7 @@ GO(SSL_check_private_key, iFp)
 //GO(ssl_check_serverhello_tlsext, 
 //GO(ssl_check_srvr_ecc_cert_and_alg, 
 GO(SSL_CIPHER_description, pFppi)
-//GO(SSL_CIPHER_find, 
+GO(SSL_CIPHER_find, pFpp)
 GO(SSL_CIPHER_get_bits, iFpp)
 //GO(ssl_cipher_get_cert_index, 
 //GO(ssl_cipher_get_evp, 
@@ -264,6 +264,7 @@ GO(SSL_CTX_add_client_CA, iFpp)
 //GO(SSL_CTX_add_session, 
 GOM(SSL_CTX_callback_ctrl, lFEpip)
 GO(SSL_CTX_check_private_key, iFp)
+GO(SSL_CTX_config, iFpp)
 GO(SSL_CTX_ctrl, lFpilp)
 //GO(SSL_CTX_flush_sessions, 
 GO(SSL_CTX_free, vFp)
@@ -294,11 +295,12 @@ GO(SSL_CTX_new, pFp)
 //GO(SSL_CTX_sess_set_new_cb, 
 //GO(SSL_CTX_sess_set_remove_cb, 
 //GO(SSL_CTX_set1_param, 
-//GO(SSL_CTX_set_alpn_protos, 
-//GO(SSL_CTX_set_alpn_select_cb, 
+GO(SSL_CTX_set_alpn_protos, iFppu)
+GOM(SSL_CTX_set_alpn_select_cb, vFEppp)
 //GO(SSL_CTX_set_cert_cb, 
 GO(SSL_CTX_set_cert_store, vFpp)
 GOM(SSL_CTX_set_cert_verify_callback, vFEppp)
+GO(SSL_CTX_set_ciphersuites, iFpp)
 GO(SSL_CTX_set_cipher_list, iFpp)
 GO(SSL_CTX_set_client_CA_list, vFpp)
 GOM(SSL_CTX_set_client_cert_cb, vFEpp)
@@ -319,6 +321,7 @@ GO(SSL_CTX_set_options, lFpl)
 //GO(SSL_CTX_set_psk_server_callback, 
 //GO(SSL_CTX_set_purpose, 
 GO(SSL_CTX_set_quiet_shutdown, vFpi)
+GO(SSL_CTX_set_security_level, vFpi)
 //GO(SSL_CTX_set_session_id_context, 
 //GO(SSL_CTX_set_srp_cb_arg, 
 //GO(SSL_CTX_set_srp_client_pwd_callback, 
@@ -360,10 +363,12 @@ GO(SSL_do_handshake, iFp)
 //GO(ssl_fill_hello_random, 
 GO(SSL_free, vFp)
 //GO(ssl_free_wbio_buffer, 
-//GO(SSL_get0_alpn_selected, 
+GO(SSL_get0_alpn_selected, iFppp)
 GO(SSL_get0_next_proto_negotiated, vFppp)
 //GO(SSL_get0_param, 
+GO(SSL_get0_peer_certificate, pFp)
 GO(SSL_get0_session, pFp)
+GO(SSL_get1_peer_certificate, pFp)
 GO(SSL_get1_session, pFp)
 //GO(ssl_get_algorithm2, 
 GO(SSL_get_certificate, pFp)
@@ -386,7 +391,6 @@ GO(SSL_get_finished, LFppL)
 //GO(SSL_get_info_callback, 
 //GO(ssl_get_new_session, 
 GO(SSL_get_peer_cert_chain, pFp)
-GO(SSL_get_peer_certificate, pFp)
 GO(SSL_get_peer_finished, LFppL)
 //GO(ssl_get_prev_session, 
 GO(SSL_get_privatekey, pFp)
@@ -423,6 +427,7 @@ GO(SSL_get_version, pFp)
 //GO(SSL_get_wfd, 
 //GO(SSL_has_matching_session_id, 
 //GO(ssl_init_wbio_buffer, 
+GO(SSL_is_init_finished, iFp)
 GO(SSL_is_server, iFp)
 GO(SSL_library_init, iFv)
 //GO(ssl_load_ciphers, 
@@ -441,8 +446,8 @@ GO(SSL_pending, iFp)
 //GO(ssl_prepare_clienthello_tlsext, 
 //GO(ssl_prepare_serverhello_tlsext, 
 GO(SSL_read, iFppi)
-//GO(SSL_renegotiate, 
-//GO(SSL_renegotiate_abbreviated, 
+GO(SSL_renegotiate, iFp)
+GO(SSL_renegotiate_abbreviated, iFp)
 GO(SSL_renegotiate_pending, iFp)
 //GO(ssl_replace_hash, 
 //GO(SSL_rstate_string, 
@@ -463,6 +468,7 @@ GO(SSL_SESSION_free, vFp)
 GO(SSL_SESSION_new, pFv)
 //GO(SSL_SESSION_print, 
 //GO(SSL_SESSION_print_fp, 
+GO(SSL_session_reused, iFp)
 //GO(SSL_SESSION_set1_id_context, 
 //GO(SSL_SESSION_set_ex_data, 
 //GO(SSL_SESSION_set_time, 
@@ -484,6 +490,7 @@ GO(SSL_set_fd, iFpi)
 //GO(SSL_set_generate_session_id, 
 //GO(SSL_set_info_callback, 
 //GO(SSL_set_msg_callback, 
+GO(SSL_set_options, UFpU)
 //GO(ssl_set_peer_cert_type, 
 GOM(SSL_set_psk_client_callback, vFEpp)
 //GO(SSL_set_psk_server_callback, 
diff --git a/src/wrapped/wrappedlibssl_private.h b/src/wrapped/wrappedlibssl_private.h
index 3595fea9..fa2a083b 100644
--- a/src/wrapped/wrappedlibssl_private.h
+++ b/src/wrapped/wrappedlibssl_private.h
@@ -56,13 +56,14 @@ GO(d2i_SSL_SESSION, pFppl)
 //GO(dtls1_stop_timer, 
 //GO(dtls1_write_app_data_bytes, 
 //GO(dtls1_write_bytes, 
-//GO(DTLS_client_method, 
+GO(DTLS_client_method, pFv)
 GO(DTLS_method, pFv)
 GO(DTLS_server_method, pFv)
 GO(DTLSv1_2_client_method, pFv)
 GO(DTLSv1_2_method, pFv)
 GO(DTLSv1_2_server_method, pFv)
 GO(DTLSv1_client_method, pFv)
+GO(DTLSv1_listen, iFpp)
 GO(DTLSv1_method, pFv)
 GO(DTLSv1_server_method, pFv)
 //GO(ERR_load_SSL_strings, 
@@ -243,17 +244,17 @@ GO(SSL_clear, iFp)
 //GO(SSL_COMP_get_compression_methods, 
 //GO(SSL_COMP_get_name, 
 //GO(SSL_COMP_set0_compression_methods, 
-//GO(SSL_CONF_cmd, 
-//GO(SSL_CONF_cmd_argv, 
-//GO(SSL_CONF_cmd_value_type, 
+GO(SSL_CONF_cmd, iFppp)
+GO(SSL_CONF_cmd_argv, iFppp)
+GO(SSL_CONF_cmd_value_type, iFpp)
 //GO(SSL_CONF_CTX_clear_flags, 
-//GO(SSL_CONF_CTX_finish, 
-//GO(SSL_CONF_CTX_free, 
-//GO(SSL_CONF_CTX_new, 
+GO(SSL_CONF_CTX_finish, iFp)
+GO(SSL_CONF_CTX_free, vFp)
+GO(SSL_CONF_CTX_new, pFv)
 //GO(SSL_CONF_CTX_set1_prefix, 
-//GO(SSL_CONF_CTX_set_flags, 
+GO(SSL_CONF_CTX_set_flags, uFpu)
 //GO(SSL_CONF_CTX_set_ssl, 
-//GO(SSL_CONF_CTX_set_ssl_ctx, 
+GO(SSL_CONF_CTX_set_ssl_ctx, vFpp)
 GO(SSL_connect, iFp)
 //GO(SSL_copy_session_id, 
 //GO(ssl_create_cipher_list, 
@@ -279,6 +280,7 @@ GO(SSL_CTX_get_ex_data, pFpi)
 //GO(SSL_CTX_get_ex_new_index, 
 //GO(SSL_CTX_get_info_callback, 
 //GO(SSL_CTX_get_quiet_shutdown, 
+GO(SSL_CTX_get_security_level, iFp) 
 //GO(SSL_CTX_get_ssl_method, 
 //GO(SSL_CTX_get_timeout, 
 //GO(SSL_CTX_get_verify_callback, 
@@ -292,7 +294,7 @@ GO(SSL_CTX_new, pFp)
 //GO(SSL_CTX_sess_get_remove_cb, 
 //GO(SSL_CTX_sessions, 
 //GO(SSL_CTX_sess_set_get_cb, 
-//GO(SSL_CTX_sess_set_new_cb, 
+GOM(SSL_CTX_sess_set_new_cb, vFEpp)
 //GO(SSL_CTX_sess_set_remove_cb, 
 //GO(SSL_CTX_set1_param, 
 GO(SSL_CTX_set_alpn_protos, iFppu)
@@ -305,8 +307,8 @@ GO(SSL_CTX_set_ciphersuites, iFpp)
 GO(SSL_CTX_set_client_CA_list, vFpp)
 GOM(SSL_CTX_set_client_cert_cb, vFEpp)
 //GO(SSL_CTX_set_client_cert_engine, 
-//GO(SSL_CTX_set_cookie_generate_cb, 
-//GO(SSL_CTX_set_cookie_verify_cb, 
+GOM(SSL_CTX_set_cookie_generate_cb, vFEpp)
+GOM(SSL_CTX_set_cookie_verify_cb, vFEpp)
 GOM(SSL_CTX_set_default_passwd_cb, vFEpp)
 GO(SSL_CTX_set_default_passwd_cb_userdata, vFpp)
 GO(SSL_CTX_set_default_verify_paths, iFp)
@@ -348,7 +350,7 @@ GO(SSL_CTX_use_certificate_file, iFppi)
 GO(SSL_CTX_use_PrivateKey, iFpp)
 GO(SSL_CTX_use_PrivateKey_ASN1, iFuppi)
 GO(SSL_CTX_use_PrivateKey_file, iFppi)
-//GO(SSL_CTX_use_psk_identity_hint, 
+GO(SSL_CTX_use_psk_identity_hint, iFpp)
 GO(SSL_CTX_use_RSAPrivateKey, iFpp)
 GO(SSL_CTX_use_RSAPrivateKey_ASN1, iFppl)
 GO(SSL_CTX_use_RSAPrivateKey_file, iFppi)
@@ -375,6 +377,7 @@ GO(SSL_get_certificate, pFp)
 GO(SSL_get_ciphers, pFp)
 //GO(ssl_get_ciphers_by_id, 
 GO(SSL_get_client_CA_list, pFp)
+GO(SSL_get_client_random, LFppL)
 GO(SSL_get_current_cipher, pFp)
 //GO(SSL_get_current_compression, 
 //GO(SSL_get_current_expansion, 
@@ -396,7 +399,7 @@ GO(SSL_get_privatekey, pFp)
 //GO(SSL_get_psk_identity, 
 //GO(SSL_get_psk_identity_hint, 
 //GO(SSL_get_quiet_shutdown, 
-//GO(SSL_get_rbio, 
+GO(SSL_get_rbio, pFp)
 //GO(SSL_get_read_ahead, 
 //GO(SSL_get_rfd, 
 //GO(SSL_get_selected_srtp_profile, 
@@ -427,6 +430,7 @@ GO(SSL_get_version, pFp)
 //GO(SSL_get_wfd, 
 //GO(SSL_has_matching_session_id, 
 //GO(ssl_init_wbio_buffer, 
+GO(SSL_in_init, iFP)
 GO(SSL_is_init_finished, iFp)
 GO(SSL_is_server, iFp)
 GO(SSL_library_init, iFv)
@@ -463,8 +467,11 @@ GO(SSL_SESSION_free, vFp)
 //GO(SSL_SESSION_get_ex_data, 
 //GO(SSL_SESSION_get_ex_new_index, 
 //GO(SSL_SESSION_get_id, 
+GO(SSL_SESSION_get_master_key, LFppL)
+GO(SSL_SESSION_get_ticket_lifetime_hint, LFp)
 //GO(SSL_SESSION_get_time, 
-//GO(SSL_SESSION_get_timeout, 
+//GO(SSL_SESSION_get_timeout,
+GO(SSL_SESSION_is_resumable, iFp) 
 GO(SSL_SESSION_new, pFv)
 //GO(SSL_SESSION_print, 
 //GO(SSL_SESSION_print_fp, 
@@ -476,7 +483,7 @@ GO(SSL_session_reused, iFp)
 GO(SSL_SESSION_up_ref, iFp)
 //GO(SSL_set1_param, 
 GO(SSL_set_accept_state, vFp)
-//GO(SSL_set_alpn_protos, 
+GO(SSL_set_alpn_protos, iFppu)
 GO(SSL_set_bio, vFppp)
 //GO(SSL_set_cert_cb, 
 //GO(ssl_set_cert_masks, 
@@ -490,9 +497,11 @@ GO(SSL_set_fd, iFpi)
 //GO(SSL_set_generate_session_id, 
 //GO(SSL_set_info_callback, 
 //GO(SSL_set_msg_callback, 
+GO(SSL_set_options, LFpL)
 //GO(ssl_set_peer_cert_type, 
 GOM(SSL_set_psk_client_callback, vFEpp)
-//GO(SSL_set_psk_server_callback, 
+GOM(SSL_set_psk_server_callback, vFEpp)
+GOM(SSL_set_psk_use_session_callback, vFEpp) 
 //GO(SSL_set_purpose, 
 GO(SSL_set_quiet_shutdown, vFpi)
 //GO(SSL_set_read_ahead, 
diff --git a/src/wrapped/wrappedlibtinfo.c b/src/wrapped/wrappedlibtinfo.c
index 6e15e498..1827bb0d 100644
--- a/src/wrapped/wrappedlibtinfo.c
+++ b/src/wrapped/wrappedlibtinfo.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_putc_fct_##A = 0;                           \
 static int my_putc_##A(char c)                                  \
 {                                                               \
-    return (int)RunFunction(my_context, my_putc_fct_##A, 1, c); \
+    return (int)RunFunctionFmt(my_putc_fct_##A, "c", c);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibtinfo6.c b/src/wrapped/wrappedlibtinfo6.c
index 9b1fc0ac..c14c8ae0 100644
--- a/src/wrapped/wrappedlibtinfo6.c
+++ b/src/wrapped/wrappedlibtinfo6.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_putc_fct_##A = 0;                           \
 static int my_putc_##A(char c)                                  \
 {                                                               \
-    return (int)RunFunction(my_context, my_putc_fct_##A, 1, c); \
+    return (int)RunFunctionFmt(my_putc_fct_##A, "c", c);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibusb1.c b/src/wrapped/wrappedlibusb1.c
index e34f440f..c5fea90b 100644
--- a/src/wrapped/wrappedlibusb1.c
+++ b/src/wrapped/wrappedlibusb1.c
@@ -45,7 +45,7 @@ GO(9)   \
 static uintptr_t my_hotplug_fct_##A = 0;                                                    \
 static int my_hotplug_##A(void* ctx, void* device, int event, void* data)                   \
 {                                                                                           \
-    return (int)RunFunction(my_context, my_hotplug_fct_##A, 4, ctx, device, event, data);   \
+    return (int)RunFunctionFmt(my_hotplug_fct_##A, "ppip", ctx, device, event, data); \
 }
 SUPER()
 #undef GO
@@ -67,7 +67,7 @@ static void* findhotplugFct(void* fct)
 static uintptr_t my_transfert_fct_##A = 0;                      \
 static void my_transfert_##A(void* ctx)                         \
 {                                                               \
-    RunFunction(my_context, my_transfert_fct_##A, 1, ctx);      \
+    RunFunctionFmt(my_transfert_fct_##A, "p", ctx);       \
 }
 SUPER()
 #undef GO
@@ -139,7 +139,7 @@ EXPORT int my_libusb_submit_transfer(x64emu_t* emu, my_libusb_transfer_t* t)
 {
     t->callback = findtransfertFct(t->callback);
     return my->libusb_submit_transfer(t); // don't put back callback, it's unknown if it's safe
-} 
+}
 
 EXPORT int my_libusb_cancel_transfer(x64emu_t* emu, my_libusb_transfer_t* t)
 {
diff --git a/src/wrapped/wrappedlibva.c b/src/wrapped/wrappedlibva.c
index 2900057b..8c331324 100644
--- a/src/wrapped/wrappedlibva.c
+++ b/src/wrapped/wrappedlibva.c
@@ -6,13 +6,82 @@
 
 #include "wrappedlibs.h"
 
+#include "debug.h"
 #include "wrapper.h"
 #include "bridge.h"
 #include "librarian/library_private.h"
 #include "x64emu.h"
+#include "callback.h"
+#include "librarian.h"
+#include "box64context.h"
+#include "emu/x64emu_private.h"
+#include "myalign.h"
 
 const char* libvaName = "libva.so.2";
 #define LIBNAME libva
 
+#define ADDED_FUNCTIONS()       \
+
+#include "generated/wrappedlibvatypes.h"
+
+#include "wrappercallback.h"
+
+#define SUPER() \
+GO(0)   \
+GO(1)   \
+GO(2)   \
+GO(3)
+
+// VAMessageCallback
+#define GO(A)   \
+static uintptr_t my_VAMessageCallback_fct_##A = 0;                          \
+static void my_VAMessageCallback_##A(void* a, void* b)                      \
+{                                                                           \
+    RunFunctionFmt(my_VAMessageCallback_fct_##A, "pp", a, b);   \
+}
+SUPER()
+#undef GO
+static void* findVAMessageCallbackFct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_VAMessageCallback_fct_##A == (uintptr_t)fct) return my_VAMessageCallback_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_VAMessageCallback_fct_##A == 0) {my_VAMessageCallback_fct_##A = (uintptr_t)fct; return my_VAMessageCallback_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libxa VAMessageCallback callback\n");
+    return NULL;
+}
+static void* reverse_VAMessageCallbackFct(void* fct)
+{
+    if(!fct) return fct;
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
+    #define GO(A) if(my_VAMessageCallback_##A == fct) return (void*)my_VAMessageCallback_fct_##A;
+    SUPER()
+    #undef GO
+    return (void*)AddBridge(my_lib->w.bridge, vFpp, fct, 0, NULL);
+}
+
+#undef SUPER
+
+EXPORT void* my_vaSetErrorCallback(x64emu_t* emu, void* dpy, void* f, void* ctx)
+{
+    return reverse_VAMessageCallbackFct(my->vaSetErrorCallback(dpy, findVAMessageCallbackFct(f), ctx));
+}
+
+EXPORT void* my_vaSetInfoCallback(x64emu_t* emu, void* dpy, void* f, void* ctx)
+{
+    return reverse_VAMessageCallbackFct(my->vaSetInfoCallback(dpy, findVAMessageCallbackFct(f), ctx));
+}
+
+#define CUSTOM_INIT \
+    getMy(lib);
+
+#define CUSTOM_FINI \
+    freeMy();
+
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibva_private.h b/src/wrapped/wrappedlibva_private.h
index dd83be25..cba8dc0e 100644
--- a/src/wrapped/wrappedlibva_private.h
+++ b/src/wrapped/wrappedlibva_private.h
@@ -78,9 +78,9 @@ GO(vaQueryVideoProcPipelineCaps, iFpupup)
 GO(vaRenderPicture, iFpupi)
 //GO(vaSetDisplayAttributes, 
 //GO(vaSetDriverName, 
-//GO(vaSetErrorCallback, 
+GOM(vaSetErrorCallback, pFEppp)
 //GO(vaSetImagePalette, 
-//GO(vaSetInfoCallback, 
+GOM(vaSetInfoCallback, pFEppp)
 //GO(vaSetSubpictureChromakey, 
 //GO(vaSetSubpictureGlobalAlpha, 
 //GO(vaSetSubpictureImage, 
diff --git a/src/wrapped/wrappedlibvdpau.c b/src/wrapped/wrappedlibvdpau.c
index 146ef72e..16eef5ae 100644
--- a/src/wrapped/wrappedlibvdpau.c
+++ b/src/wrapped/wrappedlibvdpau.c
@@ -6,13 +6,37 @@
 
 #include "wrappedlibs.h"
 
+#include "debug.h"
 #include "wrapper.h"
 #include "bridge.h"
 #include "librarian/library_private.h"
 #include "x64emu.h"
+#include "callback.h"
+#include "librarian.h"
+#include "box64context.h"
+#include "emu/x64emu_private.h"
+#include "myalign.h"
 
 const char* libvdpauName = "libvdpau.so.1";
 #define LIBNAME libvdpau
 
+
+#define ADDED_FUNCTIONS()       \
+
+#include "generated/wrappedlibvdpautypes.h"
+
+#include "wrappercallback.h"
+
+EXPORT uint32_t my_vdp_device_create_x11(x64emu_t* emu, void* display, int screen, void* device, void** get_proc_address)
+{
+    return 1;   // VDP_STATUS_NO_IMPLEMENTATION
+}
+
+#define CUSTOM_INIT                 \
+    getMy(lib);
+
+#define CUSTOM_FINI \
+    freeMy();
+
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibvdpau_private.h b/src/wrapped/wrappedlibvdpau_private.h
index 3a06a036..99a0b336 100644
--- a/src/wrapped/wrappedlibvdpau_private.h
+++ b/src/wrapped/wrappedlibvdpau_private.h
@@ -2,4 +2,4 @@
 #error meh!
 #endif
 
-//GO(vdp_device_create_x11, iFpipp) // last is a pointer to a VdpGetProcAddress function
\ No newline at end of file
+GOM(vdp_device_create_x11, iFpipp) // last is a pointer to a VdpGetProcAddress function
\ No newline at end of file
diff --git a/src/wrapped/wrappedlibx11.c b/src/wrapped/wrappedlibx11.c
index afe26fd1..0ee5d083 100644
--- a/src/wrapped/wrappedlibx11.c
+++ b/src/wrapped/wrappedlibx11.c
@@ -109,14 +109,14 @@ GO(11)  \
 GO(12)  \
 GO(13)  \
 GO(14)  \
-GO(15)  
+GO(15)
 
 // wire_to_event
 #define GO(A)   \
 static uintptr_t my_wire_to_event_fct_##A = 0;                      \
 static int my_wire_to_event_##A(void* dpy, void* re, void* event)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_wire_to_event_fct_##A, 3, dpy, re, event);\
+    return (int)RunFunctionFmt(my_wire_to_event_fct_##A, "ppp", dpy, re, event);\
 }
 SUPER()
 #undef GO
@@ -149,7 +149,7 @@ static void* reverse_wire_to_eventFct(library_t* lib, void* fct)
 static uintptr_t my_event_to_wire_fct_##A = 0;                      \
 static int my_event_to_wire_##A(void* dpy, void* re, void* event)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_event_to_wire_fct_##A, 3, dpy, re, event);\
+    return (int)RunFunctionFmt(my_event_to_wire_fct_##A, "ppp", dpy, re, event);\
 }
 SUPER()
 #undef GO
@@ -182,7 +182,7 @@ static void* reverse_event_to_wireFct(library_t* lib, void* fct)
 static uintptr_t my_error_handler_fct_##A = 0;                      \
 static int my_error_handler_##A(void* dpy, void* error)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_error_handler_fct_##A, 2, dpy, error);\
+    return (int)RunFunctionFmt(my_error_handler_fct_##A, "pp", dpy, error);\
 }
 SUPER()
 #undef GO
@@ -215,7 +215,7 @@ static void* reverse_error_handlerFct(library_t* lib, void* fct)
 static uintptr_t my_ioerror_handler_fct_##A = 0;                      \
 static int my_ioerror_handler_##A(void* dpy)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_ioerror_handler_fct_##A, 1, dpy);\
+    return (int)RunFunctionFmt(my_ioerror_handler_fct_##A, "p", dpy);\
 }
 SUPER()
 #undef GO
@@ -248,7 +248,7 @@ static void* reverse_ioerror_handlerFct(library_t* lib, void* fct)
 static uintptr_t my_exterror_handler_fct_##A = 0;                      \
 static int my_exterror_handler_##A(void* dpy, void* err, void* codes, int* ret_code)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_exterror_handler_fct_##A, 4, dpy, err, codes, ret_code);\
+    return (int)RunFunctionFmt(my_exterror_handler_fct_##A, "pppp", dpy, err, codes, ret_code);\
 }
 SUPER()
 #undef GO
@@ -281,7 +281,7 @@ static void* reverse_exterror_handlerFct(library_t* lib, void* fct)
 static uintptr_t my_close_display_fct_##A = 0;                      \
 static int my_close_display_##A(void* dpy, void* codes)   \
 {                                                                   \
-    return (int)RunFunction(my_context, my_close_display_fct_##A, 2, dpy, codes);\
+    return (int)RunFunctionFmt(my_close_display_fct_##A, "pp", dpy, codes);\
 }
 SUPER()
 #undef GO
@@ -314,7 +314,7 @@ static void* reverse_close_displayFct(library_t* lib, void* fct)
 static uintptr_t my_register_im_fct_##A = 0;                        \
 static void my_register_im_##A(void* dpy, void* u, void* d)         \
 {                                                                   \
-    RunFunction(my_context, my_register_im_fct_##A, 3, dpy, u, d);  \
+    RunFunctionFmt(my_register_im_fct_##A, "ppp", dpy, u, d);  \
 }
 SUPER()
 #undef GO
@@ -347,7 +347,7 @@ static void* reverse_register_imFct(library_t* lib, void* fct)
 static uintptr_t my_XConnectionWatchProc_fct_##A = 0;                               \
 static void my_XConnectionWatchProc_##A(void* dpy, void* data, int op, void* d)     \
 {                                                                                   \
-    RunFunction(my_context, my_XConnectionWatchProc_fct_##A, 4, dpy, data, op, d);  \
+    RunFunctionFmt(my_XConnectionWatchProc_fct_##A, "ppip", dpy, data, op, d);  \
 }
 SUPER()
 #undef GO
@@ -369,7 +369,7 @@ static void* findXConnectionWatchProcFct(void* fct)
 static uintptr_t my_xifevent_fct_##A = 0;                                   \
 static int my_xifevent_##A(void* dpy, void* event, void* d)                 \
 {                                                                           \
-    return RunFunction(my_context, my_xifevent_fct_##A, 3, dpy, event, d);  \
+    return RunFunctionFmt(my_xifevent_fct_##A, "ppp", dpy, event, d);  \
 }
 SUPER()
 #undef GO
@@ -391,7 +391,7 @@ static void* findxifeventFct(void* fct)
 static uintptr_t my_XInternalAsyncHandler_fct_##A = 0;                                              \
 static int my_XInternalAsyncHandler_##A(void* dpy, void* rep, void* buf, int len, void* data)       \
 {                                                                                                   \
-    return RunFunction(my_context, my_XInternalAsyncHandler_fct_##A, 5, dpy, rep, buf, len, data);  \
+    return RunFunctionFmt(my_XInternalAsyncHandler_fct_##A, "pppip", dpy, rep, buf, len, data);  \
 }
 SUPER()
 #undef GO
@@ -414,7 +414,7 @@ static void* findXInternalAsyncHandlerFct(void* fct)
 static uintptr_t my_XSynchronizeProc_fct_##A = 0;                       \
 static int my_XSynchronizeProc_##A()                                    \
 {                                                                       \
-    return (int)RunFunction(my_context, my_XSynchronizeProc_fct_##A, 0);\
+    return (int)RunFunctionFmt(my_XSynchronizeProc_fct_##A, "");\
 }
 SUPER()
 #undef GO
@@ -447,7 +447,7 @@ static void* reverse_XSynchronizeProcFct(library_t* lib, void* fct)
 static uintptr_t my_XLockDisplay_fct_##A = 0;                   \
 static void my_XLockDisplay_##A(void* dpy)                      \
 {                                                               \
-    RunFunction(my_context, my_XLockDisplay_fct_##A, 1, dpy);   \
+    RunFunctionFmt(my_XLockDisplay_fct_##A, "p", dpy);   \
 }
 SUPER()
 #undef GO
@@ -469,7 +469,7 @@ static void* findXLockDisplayFct(void* fct)
 static uintptr_t my_XUnlockDisplay_fct_##A = 0;                 \
 static void my_XUnlockDisplay_##A(void* dpy)                    \
 {                                                               \
-    RunFunction(my_context, my_XUnlockDisplay_fct_##A, 1, dpy); \
+    RunFunctionFmt(my_XUnlockDisplay_fct_##A, "p", dpy); \
 }
 SUPER()
 #undef GO
@@ -556,14 +556,14 @@ static int my_XICProc_##A(void* a, void* b, void* c)                        \
 {                                                                           \
     if (my_XICProc_fct_##A == 0)                                            \
         printf_log(LOG_NONE, "%s cannot find XICProc callback\n", __func__);\
-    return (int)RunFunction(my_context, my_XICProc_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my_XICProc_fct_##A, "ppp", a, b, c);    \
 }                                                                           \
 static uintptr_t my_XIMProc_fct_##A = 0;                                    \
 static void my_XIMProc_##A(void* a, void* b, void* c)                       \
 {                                                                           \
     if (my_XIMProc_fct_##A == 0)                                            \
         printf_log(LOG_NONE, "%s cannot find XIMProc callback\n", __func__);\
-    RunFunction(my_context, my_XIMProc_fct_##A, 3, a, b, c);                \
+    RunFunctionFmt(my_XIMProc_fct_##A, "ppp", a, b, c);                \
 }
 SUPER()
 #undef GO
@@ -666,7 +666,7 @@ EXPORT void* my_XSetICValues(x64emu_t* emu, void* xic, uintptr_t* va) {
         SUPER()
     }
 
-    void* res = NULL; 
+    void* res = NULL;
     VA_CALL(my->XSetICValues, xic, new_va, n, res);
     box_free(new_va);
     box_free(callbacks);
@@ -695,7 +695,7 @@ EXPORT void* my_XSetIMValues(x64emu_t* emu, void* xim, uintptr_t* va) {
         SUPER()
     }
     #undef GO
-    
+
     void* res = NULL;
     VA_CALL(my->XSetIMValues, xim, new_va, n, res)
     box_free(new_va);
@@ -757,7 +757,7 @@ void BridgeImageFunc(x64emu_t *emu, XImage *img)
 
     #define GO(A, W) \
     fnc = CheckBridged(system, img->f.A); \
-    if(!fnc) fnc = AddAutomaticBridge(emu, system, W, img->f.A, 0); \
+    if(!fnc) fnc = AddAutomaticBridge(emu, system, W, img->f.A, 0, #A); \
     img->f.A = (W##_t)fnc;
 
     uintptr_t fnc;
@@ -792,7 +792,7 @@ void UnbridgeImageFunc(x64emu_t *emu, XImage *img)
 
 void sub_image_wrapper(x64emu_t *emu, uintptr_t fnc)
 {
-    pFpiiuu_t fn = (pFpiiuu_t)fnc; 
+    pFpiiuu_t fn = (pFpiiuu_t)fnc;
     void* img = fn(*(void**)(R_RDI), *(int32_t*)(R_RSI), *(int32_t*)(R_RDX), *(uint32_t*)(R_RCX), *(uint32_t*)(R_R8));
     BridgeImageFunc(emu, (XImage*)img);
     R_EAX=(uintptr_t)img;
@@ -903,7 +903,7 @@ EXPORT int my_XRegisterIMInstantiateCallback(x64emu_t* emu, void* d, void* db, v
 {
     return my->XRegisterIMInstantiateCallback(d, db, res_name, res_class, findregister_imFct(cb), data);
 }
-    
+
 EXPORT int my_XUnregisterIMInstantiateCallback(x64emu_t* emu, void* d, void* db, void* res_name, void* res_class, void* cb, void* data)
 {
     return my->XUnregisterIMInstantiateCallback(d, db, res_name, res_class, reverse_register_imFct(my_lib, cb), data);
@@ -1108,12 +1108,12 @@ EXPORT void* my_XOpenDisplay(x64emu_t* emu, void* d)
     #define GO(A, W)\
     if(dpy->A)      \
         if(!CheckBridged(system, dpy->A)) \
-            AddAutomaticBridge(emu, system, W, dpy->A, 0); \
+            AddAutomaticBridge(emu, system, W, dpy->A, 0, #A); \
 
     #define GO2(A, B, W) \
     if(dpy->A && dpy->A->B)  \
         if(!CheckBridged(system, dpy->A->B)) \
-            AddAutomaticBridge(emu, system, W, dpy->A->B, 0); \
+            AddAutomaticBridge(emu, system, W, dpy->A->B, 0, #B "_" #A); \
 
 
     GO2(free_funcs, atoms, vFp)
diff --git a/src/wrapped/wrappedlibx11_private.h b/src/wrapped/wrappedlibx11_private.h
index 4a7a9b16..9a98ef99 100644
--- a/src/wrapped/wrappedlibx11_private.h
+++ b/src/wrapped/wrappedlibx11_private.h
@@ -376,7 +376,7 @@ GO(XFreeStringList, vFp)
 GO(XGContextFromGC, LFp)
 GO(XGeometry, iFpippuuuiipppp)
 GO(_XGetAsyncData, vFpppiiii)
-//GO(_XGetAsyncReply, 
+GO(_XGetAsyncReply, pFppppiii)
 GO(XGetAtomName, pFpL)
 GO(XGetAtomNames, iFppip)
 //GO(_XGetBitsPerPixel, 
@@ -533,7 +533,7 @@ GO(XkbAllocNames, iFpuii)
 //GO(XkbAllocServerMap
 GO(XkbApplyCompatMapToKey, iFpCp)
 GO(XkbApplyVirtualModChanges, iFpup)
-//GO(XkbBell
+GO(XkbBell, iFppip)
 GO(XkbBellEvent, iFpLiL)
 GO(XkbChangeDeviceInfo, iFppp)
 //GO(XkbChangeEnabledControls
@@ -583,7 +583,7 @@ DATA(_XkbGetAtomNameFunc, sizeof(void*))
 GO(XkbGetAutoResetControls, iFppp)
 //GO(_XkbGetCharset, 
 //GO(XkbGetCompatMap
-//GO(XkbGetControls
+GO(XkbGetControls, iFpLp)
 //GO(_XkbGetConverters, 
 GO(XkbGetDetectableAutoRepeat, iFpp)
 GO(XkbGetDeviceButtonActions, iFppiuu)
@@ -850,7 +850,7 @@ GO(XRaiseWindow, iFpp)
 GO(_XRead, iFppi)
 GO(XReadBitmapFile, iFpLpppppp)
 GO(XReadBitmapFileData, iFpppppp)
-//GO(_XReadEvents, 
+GO(_XReadEvents, vFp)
 GO(_XReadPad, vFppi)
 GO(XRebindKeysym, iFpLpipi)
 GO(XRecolorCursor, iFpLpp)
diff --git a/src/wrapped/wrappedlibxcb_private.h b/src/wrapped/wrappedlibxcb_private.h
index 134b93fc..10988e21 100644
--- a/src/wrapped/wrappedlibxcb_private.h
+++ b/src/wrapped/wrappedlibxcb_private.h
@@ -148,7 +148,7 @@ GO(xcb_create_gc_checked, pFpuuup)
 GO(xcb_create_glyph_cursor, pFpuuuWWWWWWWW)
 //GO(xcb_create_glyph_cursor_checked, 
 GO(xcb_create_pixmap, pFpCuuWW)
-//GO(xcb_create_pixmap_checked, 
+GO(xcb_create_pixmap_checked, pFpCuuWW)
 GO(xcb_create_window, pFpCuuwwWWWWuup)
 //GO(xcb_create_window_aux, 
 //GO(xcb_create_window_aux_checked, 
@@ -460,7 +460,7 @@ GO(xcb_poly_segment, pFpuuup)
 //GO(xcb_poly_text_8_sizeof, 
 GO(xcb_popcount, iFu)
 GO(xcb_prefetch_extension_data, vFpp)
-//GO(xcb_prefetch_maximum_request_length, 
+GO(xcb_prefetch_maximum_request_length, vFp)
 GO(xcb_put_image, pFpCuuWWwwCCup)
 //GO(xcb_put_image_checked, 
 //GO(xcb_put_image_data, 
diff --git a/src/wrapped/wrappedlibxext.c b/src/wrapped/wrappedlibxext.c
index efc2fba4..245b65ce 100644
--- a/src/wrapped/wrappedlibxext.c
+++ b/src/wrapped/wrappedlibxext.c
@@ -56,7 +56,7 @@ GO(4)
 static uintptr_t my_exterrorhandle_fct_##A = 0;                                                 \
 static int my_exterrorhandle_##A(void* display, void* ext_name, void* reason)                   \
 {                                                                                               \
-    return RunFunction(my_context, my_exterrorhandle_fct_##A, 3, display, ext_name, reason);    \
+    return RunFunctionFmt(my_exterrorhandle_fct_##A, "ppp", display, ext_name, reason);   \
 }
 SUPER()
 #undef GO
@@ -83,6 +83,248 @@ static void* reverse_exterrorhandleFct(void* fct)
     #undef GO
     return (void*)AddBridge(my_lib->w.bridge, iFppp, fct, 0, NULL);
 }
+// create_gc ...
+#define GO(A)   \
+static uintptr_t my_create_gc_fct_##A = 0;                          \
+static int my_create_gc_##A(void* a, uint32_t b, void* c)           \
+{                                                                   \
+    return RunFunctionFmt(my_create_gc_fct_##A, "pup", a, b, c);    \
+}
+SUPER()
+#undef GO
+static void* find_create_gc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_create_gc_fct_##A == (uintptr_t)fct) return my_create_gc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_create_gc_fct_##A == 0) {my_create_gc_fct_##A = (uintptr_t)fct; return my_create_gc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext create_gc callback\n");
+    return NULL;
+}
+// copy_gc ...
+#define GO(A)   \
+static uintptr_t my_copy_gc_fct_##A = 0;                        \
+static int my_copy_gc_##A(void* a, uint32_t b, void* c)         \
+{                                                               \
+    return RunFunctionFmt(my_copy_gc_fct_##A, "pup", a, b, c);  \
+}
+SUPER()
+#undef GO
+static void* find_copy_gc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_copy_gc_fct_##A == (uintptr_t)fct) return my_copy_gc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_copy_gc_fct_##A == 0) {my_copy_gc_fct_##A = (uintptr_t)fct; return my_copy_gc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext copy_gc callback\n");
+    return NULL;
+}
+// flush_gc ...
+#define GO(A)   \
+static uintptr_t my_flush_gc_fct_##A = 0;                           \
+static int my_flush_gc_##A(void* a, uint32_t b, void* c)            \
+{                                                                   \
+    return RunFunctionFmt(my_flush_gc_fct_##A, "pup", a, b, c);     \
+}
+SUPER()
+#undef GO
+static void* find_flush_gc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_flush_gc_fct_##A == (uintptr_t)fct) return my_flush_gc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_flush_gc_fct_##A == 0) {my_flush_gc_fct_##A = (uintptr_t)fct; return my_flush_gc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext flush_gc callback\n");
+    return NULL;
+}
+// free_gc ...
+#define GO(A)   \
+static uintptr_t my_free_gc_fct_##A = 0;                           \
+static int my_free_gc_##A(void* a, uint32_t b, void* c)            \
+{                                                                  \
+    return RunFunctionFmt(my_free_gc_fct_##A, "pup", a, b, c);     \
+}
+SUPER()
+#undef GO
+static void* find_free_gc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_free_gc_fct_##A == (uintptr_t)fct) return my_free_gc_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_free_gc_fct_##A == 0) {my_free_gc_fct_##A = (uintptr_t)fct; return my_free_gc_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext free_gc callback\n");
+    return NULL;
+}
+// create_font ...
+#define GO(A)   \
+static uintptr_t my_create_font_fct_##A = 0;                            \
+static int my_create_font_##A(void* a, void* b, void* c)                \
+{                                                                       \
+    return RunFunctionFmt(my_create_font_fct_##A, "ppp", a, b, c);      \
+}
+SUPER()
+#undef GO
+static void* find_create_font_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_create_font_fct_##A == (uintptr_t)fct) return my_create_font_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_create_font_fct_##A == 0) {my_create_font_fct_##A = (uintptr_t)fct; return my_create_font_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext create_font callback\n");
+    return NULL;
+}
+// free_font ...
+#define GO(A)   \
+static uintptr_t my_free_font_fct_##A = 0;                            \
+static int my_free_font_##A(void* a, void* b, void* c)                \
+{                                                                     \
+    return RunFunctionFmt(my_free_font_fct_##A, "ppp", a, b, c);      \
+}
+SUPER()
+#undef GO
+static void* find_free_font_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_free_font_fct_##A == (uintptr_t)fct) return my_free_font_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_free_font_fct_##A == 0) {my_free_font_fct_##A = (uintptr_t)fct; return my_free_font_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext free_font callback\n");
+    return NULL;
+}
+// close_display ...
+#define GO(A)   \
+static uintptr_t my_close_display_fct_##A = 0;                  \
+static int my_close_display_##A(void* a, void* b)               \
+{                                                               \
+    return RunFunctionFmt(my_close_display_fct_##A, "pp", a, b);\
+}
+SUPER()
+#undef GO
+static void* find_close_display_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_close_display_fct_##A == (uintptr_t)fct) return my_close_display_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_close_display_fct_##A == 0) {my_close_display_fct_##A = (uintptr_t)fct; return my_close_display_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext close_display callback\n");
+    return NULL;
+}
+// wire_to_event ...
+#define GO(A)   \
+static uintptr_t my_wire_to_event_fct_##A = 0;                          \
+static int my_wire_to_event_##A(void* a, void* b, void* c)              \
+{                                                                       \
+    return RunFunctionFmt(my_wire_to_event_fct_##A, "ppp", a, b, c);    \
+}
+SUPER()
+#undef GO
+static void* find_wire_to_event_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_wire_to_event_fct_##A == (uintptr_t)fct) return my_wire_to_event_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_wire_to_event_fct_##A == 0) {my_wire_to_event_fct_##A = (uintptr_t)fct; return my_wire_to_event_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext wire_to_event callback\n");
+    return NULL;
+}
+// event_to_wire ...
+#define GO(A)   \
+static uintptr_t my_event_to_wire_fct_##A = 0;                          \
+static int my_event_to_wire_##A(void* a, void* b, void* c)              \
+{                                                                       \
+    return RunFunctionFmt(my_event_to_wire_fct_##A, "ppp", a, b, c);    \
+}
+SUPER()
+#undef GO
+static void* find_event_to_wire_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_event_to_wire_fct_##A == (uintptr_t)fct) return my_event_to_wire_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_event_to_wire_fct_##A == 0) {my_event_to_wire_fct_##A = (uintptr_t)fct; return my_event_to_wire_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext event_to_wire callback\n");
+    return NULL;
+}
+// error ...
+#define GO(A)   \
+static uintptr_t my_error_fct_##A = 0;                              \
+static int my_error_##A(void* a, void* b, void* c, int* d)          \
+{                                                                   \
+    return RunFunctionFmt(my_error_fct_##A, "pppp", a, b, c, d);    \
+}
+SUPER()
+#undef GO
+static void* find_error_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_error_fct_##A == (uintptr_t)fct) return my_error_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_error_fct_##A == 0) {my_error_fct_##A = (uintptr_t)fct; return my_error_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext error callback\n");
+    return NULL;
+}
+// error_string ...
+#define GO(A)   \
+static uintptr_t my_error_string_fct_##A = 0;                               \
+static int my_error_string_##A(void* a, int b, void* c, void* d, int e)     \
+{                                                                           \
+    return RunFunctionFmt(my_error_string_fct_##A, "pippi", a, b, c, d, e); \
+}
+SUPER()
+#undef GO
+static void* find_error_string_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(GetNativeFnc((uintptr_t)fct))  return GetNativeFnc((uintptr_t)fct);
+    #define GO(A) if(my_error_string_fct_##A == (uintptr_t)fct) return my_error_string_##A;
+    SUPER()
+    #undef GO
+    #define GO(A) if(my_error_string_fct_##A == 0) {my_error_string_fct_##A = (uintptr_t)fct; return my_error_string_##A; }
+    SUPER()
+    #undef GO
+    printf_log(LOG_NONE, "Warning, no more slot for libXext error_string callback\n");
+    return NULL;
+}
 
 #undef SUPER
 
@@ -123,81 +365,10 @@ EXPORT void* my_XSetExtensionErrorHandler(x64emu_t* emu, void* handler)
     return reverse_exterrorhandleFct(my->XSetExtensionErrorHandler(find_exterrorhandle_Fct(handler)));
 }
 
-static box64context_t *context = NULL;
-static uintptr_t my_hook_create_gc_fnc = 0;
-static uintptr_t my_hook_copy_gc_fnc = 0;
-static uintptr_t my_hook_flush_gc_fnc = 0;
-static uintptr_t my_hook_free_gc_fnc = 0;
-static uintptr_t my_hook_create_font_fnc = 0;
-static uintptr_t my_hook_free_font_fnc = 0;
-static uintptr_t my_hook_close_display_fnc = 0;
-static uintptr_t my_hook_wire_to_event_fnc = 0;
-static uintptr_t my_hook_event_to_wire_fnc = 0;
-static uintptr_t my_hook_error_fnc = 0;
-static uintptr_t my_hook_error_string_fnc = 0;
-static int  my_hook_create_gc(void* a, uint32_t b, void* c) {
-    if(my_hook_create_gc_fnc)
-        return (int)RunFunction(context, my_hook_create_gc_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_copy_gc(void* a, uint32_t b, void* c) {
-    if(my_hook_copy_gc_fnc)
-        return (int)RunFunction(context, my_hook_copy_gc_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_flush_gc(void* a, uint32_t b, void* c) {
-    if(my_hook_flush_gc_fnc)
-        return (int)RunFunction(context, my_hook_flush_gc_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_free_gc(void* a, uint32_t b, void* c) {
-    if(my_hook_free_gc_fnc)
-        return (int)RunFunction(context, my_hook_free_gc_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_create_font(void* a, void* b, void* c) {
-    if(my_hook_create_font_fnc)
-        return (int)RunFunction(context, my_hook_create_font_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_free_font(void* a, void* b, void* c) {
-    if(my_hook_free_font_fnc)
-        return (int)RunFunction(context, my_hook_free_font_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_close_display(void* a, void* b) {
-    if(my_hook_close_display_fnc)
-        return (int)RunFunction(context, my_hook_close_display_fnc, 2, a, b);
-    return 0;
-}
-static int  my_hook_wire_to_event(void* a, void* b, void* c) {
-    if(my_hook_wire_to_event_fnc)
-        return (int)RunFunction(context, my_hook_wire_to_event_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_event_to_wire(void* a, void* b, void* c) {
-    if(my_hook_event_to_wire_fnc)
-        return (int)RunFunction(context, my_hook_event_to_wire_fnc, 3, a, b, c);
-    return 0;
-}
-static int  my_hook_error(void* a, void* b, void* c, int* d) {
-    if(my_hook_error_fnc)
-        return (int)RunFunction(context, my_hook_error_fnc, 4, a, b, c, d);
-    return 0;
-}
-static char* my_hook_error_string(void* a, int b, void* c, void* d, int e) {
-    if(my_hook_error_string_fnc)
-        return (char*)RunFunction(context, my_hook_error_string_fnc, 5, a, b, c, d, e);
-    return 0;
-}
-
 EXPORT void* my_XextAddDisplay(x64emu_t* emu, void* extinfo, void* dpy, void* extname, my_XExtensionHooks* hooks, int nevents, void* data)
 {
-    if(!context)
-        context = emu->context;
-
     my_XExtensionHooks natives = {0};
-    #define GO(A) if(hooks->A) {my_hook_##A##_fnc = (uintptr_t)hooks->A; natives.A = my_hook_##A;}
+    #define GO(A) natives.A = find_##A##_Fct(hooks->A);
     GO(create_gc)
     GO(copy_gc)
     GO(flush_gc)
diff --git a/src/wrapped/wrappedlibxft_private.h b/src/wrapped/wrappedlibxft_private.h
index 0c00da90..843213b7 100644
--- a/src/wrapped/wrappedlibxft_private.h
+++ b/src/wrapped/wrappedlibxft_private.h
@@ -6,9 +6,9 @@
 //GO(XftCharFontSpecRender, 
 //GO(XftCharIndex, 
 //GO(XftCharSpecRender, 
-//GO(XftColorAllocName, 
+GO(XftColorAllocName, iFppupp)
 //GO(XftColorAllocValue, 
-//GO(XftColorFree, 
+GO(XftColorFree, vFppup)
 //GO(XftDefaultHasRender, 
 //GO(XftDefaultSet, 
 //GO(XftDefaultSubstitute, 
@@ -19,27 +19,27 @@ GO(XftDrawChange, vFpp)
 GO(XftDrawCreate, pFpppp)
 //GO(XftDrawCreateAlpha, 
 //GO(XftDrawCreateBitmap, 
-//GO(XftDrawDestroy, 
+GO(XftDrawDestroy, vFp)
 //GO(XftDrawDisplay, 
 //GO(XftDrawDrawable, 
 //GO(XftDrawGlyphFontSpec, 
 //GO(XftDrawGlyphs, 
 //GO(XftDrawGlyphSpec, 
 //GO(XftDrawPicture, 
-//GO(XftDrawRect, 
+GO(XftDrawRect, vFppiiuu)
 GO(XftDrawSetClip, iFpp)
 //GO(XftDrawSetClipRectangles, 
 //GO(XftDrawSetSubwindowMode, 
 //GO(XftDrawSrcPicture, 
-//GO(XftDrawString16, 
+GO(XftDrawString16, vFpppiipi)
 GO(XftDrawString32, vFpppiipi)
 //GO(XftDrawString8, 
 //GO(XftDrawStringUtf16, 
 //GO(XftDrawStringUtf8, 
 //GO(XftDrawVisual, 
 //GO(XftFontCheckGlyph, 
-//GO(XftFontClose, 
-//GO(XftFontCopy, 
+GO(XftFontClose, vFpp)
+GO(XftFontCopy, pFpp)
 //GO(XftFontInfoCreate, 
 //GO(XftFontInfoDestroy, 
 //GO(XftFontInfoEqual, 
@@ -63,7 +63,7 @@ GO(XftFontOpenXlfd, pFpip)
 //GO(XftLockFace, 
 //GO(XftNameParse, 
 GO(XftNameUnparse, iFppi)
-//GO(XftTextExtents16, 
+GO(XftTextExtents16, vFpppip)
 GO(XftTextExtents32, vFpppip)
 //GO(XftTextExtents8, 
 //GO(XftTextExtentsUtf16, 
diff --git a/src/wrapped/wrappedlibxi_private.h b/src/wrapped/wrappedlibxi_private.h
index 4b81a2d8..6e10da5f 100644
--- a/src/wrapped/wrappedlibxi_private.h
+++ b/src/wrapped/wrappedlibxi_private.h
@@ -38,7 +38,7 @@ GO(XIBarrierReleasePointer, vFpipp)
 GO(XIBarrierReleasePointers, vFppi)
 //GO(XIChangeHierarchy, 
 GO(XIChangeProperty, vFpippiipi)
-//GO(XIDefineCursor, 
+GO(XIDefineCursor, iFpipp)
 GO(XIDeleteProperty, vFpip)
 GO(XIFreeDeviceInfo, vFp)
 GO(XIGetClientPointer, iFppp)
@@ -58,7 +58,7 @@ GO(XIQueryVersion, iFppp)
 GO(XISelectEvents, iFpppi)
 GO(XISetClientPointer, iFppi)
 //GO(XISetFocus, 
-//GO(XIUndefineCursor, 
+GO(XIUndefineCursor, iFpip)
 GO(XIUngrabButton, iFpiipip)
 GO(XIUngrabDevice, iFpiL)
 //GO(XIUngrabEnter, 
diff --git a/src/wrapped/wrappedlibxt.c b/src/wrapped/wrappedlibxt.c
index 6177ae84..6a7180fd 100644
--- a/src/wrapped/wrappedlibxt.c
+++ b/src/wrapped/wrappedlibxt.c
@@ -39,7 +39,7 @@ GO(7)
 static uintptr_t my_Event_fct_##A = 0;   \
 static void my_Event_##A(void* w, void* data, void* event)     \
 {                                       \
-    RunFunction(my_context, my_Event_fct_##A, 3, w, data, event);\
+    RunFunctionFmt(my_Event_fct_##A, "ppp", w, data, event);\
 }
 SUPER()
 #undef GO
@@ -61,7 +61,7 @@ static void* findEventFct(void* fct)
 static uintptr_t my_WorkProc_fct_##A = 0;   \
 static int my_WorkProc_##A(void* p)         \
 {                                           \
-    return (int)RunFunction(my_context, my_WorkProc_fct_##A, 1, p);\
+    return (int)RunFunctionFmt(my_WorkProc_fct_##A, "p", p);\
 }
 SUPER()
 #undef GO
@@ -83,7 +83,7 @@ static void* findWorkProcFct(void* fct)
 static uintptr_t my_InputCallback_fct_##A = 0;                      \
 static void my_InputCallback_##A(void* p, void* s, void* id)        \
 {                                                                   \
-    RunFunction(my_context, my_InputCallback_fct_##A, 3, p, s, id); \
+    RunFunctionFmt(my_InputCallback_fct_##A, "ppp", p, s, id); \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibxtst.c b/src/wrapped/wrappedlibxtst.c
index eaec1de6..4ae3a68b 100644
--- a/src/wrapped/wrappedlibxtst.c
+++ b/src/wrapped/wrappedlibxtst.c
@@ -36,7 +36,7 @@ GO(4)
 static uintptr_t my_XRecordInterceptProc_fct_##A = 0;                   \
 static void my_XRecordInterceptProc_##A(void* a, void* b)               \
 {                                                                       \
-    RunFunction(my_context, my_XRecordInterceptProc_fct_##A, 2, a, b);  \
+    RunFunctionFmt(my_XRecordInterceptProc_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedlibz.c b/src/wrapped/wrappedlibz.c
index 8d3ebb7a..4613c47b 100644
--- a/src/wrapped/wrappedlibz.c
+++ b/src/wrapped/wrappedlibz.c
@@ -34,7 +34,7 @@ GO(4)
 static uintptr_t my_alloc_fct_##A = 0;                                          \
 static void* my_alloc_##A(void* opaque, uint32_t items, uint32_t size)                  \
 {                                                                                       \
-    return (void*)RunFunction(my_context, my_alloc_fct_##A, 3, opaque, items, size);    \
+    return (void*)RunFunctionFmt(my_alloc_fct_##A, "puu", opaque, items, size);    \
 }
 SUPER()
 #undef GO
@@ -51,12 +51,22 @@ static void* find_alloc_Fct(void* fct)
     printf_log(LOG_NONE, "Warning, no more slot for zlib alloc callback\n");
     return NULL;
 }
+static void* reverse_alloc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
+    #define GO(A) if(my_alloc_##A == fct) return (void*)my_alloc_fct_##A;
+    SUPER()
+    #undef GO
+    return (void*)AddBridge(my_lib->w.bridge, pFpuu, fct, 0, NULL);
+}
 // free ...
 #define GO(A)   \
 static uintptr_t my_free_fct_##A = 0;                               \
 static void my_free_##A(void* opaque, void* address)                \
 {                                                                   \
-    RunFunction(my_context, my_free_fct_##A, 2, opaque, address);   \
+    RunFunctionFmt(my_free_fct_##A, "pp", opaque, address);   \
 }
 SUPER()
 #undef GO
@@ -73,10 +83,20 @@ static void* find_free_Fct(void* fct)
     printf_log(LOG_NONE, "Warning, no more slot for zlib free callback\n");
     return NULL;
 }
+static void* reverse_free_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
+    #define GO(A) if(my_free_##A == fct) return (void*)my_free_fct_##A;
+    SUPER()
+    #undef GO
+    return (void*)AddBridge(my_lib->w.bridge, vFpp, fct, 0, NULL);
+}
 #undef SUPER
 
 typedef struct z_stream_s {
-    void *next_in;   
+    void *next_in;
     uint32_t     avail_in;
     uintptr_t    total_in;
     void    *next_out;
@@ -85,11 +105,11 @@ typedef struct z_stream_s {
     char *msg;
     void *state;
     void* zalloc;
-    void*  zfree; 
+    void*  zfree;
     void*     opaque;
     int32_t     data_type;
-    uintptr_t   adler;    
-    uintptr_t   reserved; 
+    uintptr_t   adler;
+    uintptr_t   reserved;
 } z_stream;
 
 static void wrapper_stream_z(x64emu_t* emu, void* str)
@@ -99,28 +119,41 @@ static void wrapper_stream_z(x64emu_t* emu, void* str)
     stream->zalloc = find_alloc_Fct(stream->zalloc);
     stream->zfree = find_free_Fct(stream->zfree);
 }
+static void unwrapper_stream_z(x64emu_t* emu, void* str)
+{
+    (void)emu;
+    z_stream *stream = (z_stream*)str;
+    stream->zalloc = reverse_alloc_Fct(stream->zalloc);
+    stream->zfree = reverse_free_Fct(stream->zfree);
+}
 
 EXPORT int my_inflateInit_(x64emu_t* emu, void* str, void* version, int size)
 {
     wrapper_stream_z(emu, str);
-    return my->inflateInit_(str, version, size);
+    int ret = my->inflateInit_(str, version, size);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
 EXPORT int my_inflateInit2_(x64emu_t* emu, void* str, int windowBits, void* version, int stream_size)
 {
     wrapper_stream_z(emu, str);
-    return my->inflateInit2_(str, windowBits, version, stream_size);
+    int ret = my->inflateInit2_(str, windowBits, version, stream_size);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
-EXPORT int my_inflateBackInit_(x64emu_t* emu, void* strm, int windowBits, void *window, void* version, int size)
+EXPORT int my_inflateBackInit_(x64emu_t* emu, void* str, int windowBits, void *window, void* version, int size)
 {
-    wrapper_stream_z(emu, strm);
-    return my->inflateBackInit_(strm, windowBits, window, version, size);
+    wrapper_stream_z(emu, str);
+    int ret = my->inflateBackInit_(str, windowBits, window, version, size);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
-// TODO: remove this?
 EXPORT int my_inflateEnd(x64emu_t* emu, void* str)
 {
+    wrapper_stream_z(emu, str);
     int r = my->inflateEnd(str);
     return r;
 }
@@ -128,18 +161,23 @@ EXPORT int my_inflateEnd(x64emu_t* emu, void* str)
 EXPORT int my_deflateInit_(x64emu_t* emu, void* str, int level, void* version, int stream_size)
 {
     wrapper_stream_z(emu, str);
-    return my->deflateInit_(str, level, version, stream_size);
+    int ret = my->deflateInit_(str, level, version, stream_size);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
 EXPORT int my_deflateInit2_(x64emu_t* emu, void* str, int level, int method, int windowBits, int memLevel, int strategy, void* version, int stream_size)
 {
     wrapper_stream_z(emu, str);
-    return my->deflateInit2_(str, level, method, windowBits, memLevel, strategy, version, stream_size);
+    int ret = my->deflateInit2_(str, level, method, windowBits, memLevel, strategy, version, stream_size);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
 // TODO: remove this?
 EXPORT int my_deflateEnd(x64emu_t* emu, void* str)
 {
+    wrapper_stream_z(emu, str);
     int r = my->deflateEnd(str);
     return r;
 }
@@ -147,8 +185,9 @@ EXPORT int my_deflateEnd(x64emu_t* emu, void* str)
 EXPORT int my_inflate(x64emu_t* emu, void* str, int flush)
 {
     wrapper_stream_z(emu, str);
-    return my->inflate(str, flush);
-    //TODO: should unwrap the stream
+    int ret = my->inflate(str, flush);
+    unwrapper_stream_z(emu, str);
+    return ret;
 }
 
 
diff --git a/src/wrapped/wrappedlzma.c b/src/wrapped/wrappedlzma.c
index ad796fcf..8592037b 100644
--- a/src/wrapped/wrappedlzma.c
+++ b/src/wrapped/wrappedlzma.c
@@ -64,7 +64,7 @@ GO(4)
 static uintptr_t my_alloc_fct_##A = 0;                                              \
 static void* my_alloc_##A(void* opaque, size_t items, size_t size)                  \
 {                                                                                   \
-    return (void*)RunFunction(my_context, my_alloc_fct_##A, 3, opaque, items, size);\
+    return (void*)RunFunctionFmt(my_alloc_fct_##A, "pLL", opaque, items, size);\
 }
 SUPER()
 #undef GO
@@ -81,12 +81,22 @@ static void* find_alloc_Fct(void* fct)
     printf_log(LOG_NONE, "Warning, no more slot for zlib alloc callback\n");
     return NULL;
 }
+static void* reverse_alloc_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
+    #define GO(A) if(my_alloc_##A == fct) return (void*)my_alloc_fct_##A;
+    SUPER()
+    #undef GO
+    return (void*)AddBridge(my_lib->w.bridge, pFpuu, fct, 0, NULL);
+}
 // free ...
 #define GO(A)   \
 static uintptr_t my_free_fct_##A = 0;                               \
 static void my_free_##A(void* opaque, void* address)                \
 {                                                                   \
-    RunFunction(my_context, my_free_fct_##A, 2, opaque, address);   \
+    RunFunctionFmt(my_free_fct_##A, "pp", opaque, address);   \
 }
 SUPER()
 #undef GO
@@ -103,109 +113,143 @@ static void* find_free_Fct(void* fct)
     printf_log(LOG_NONE, "Warning, no more slot for zlib free callback\n");
     return NULL;
 }
+static void* reverse_free_Fct(void* fct)
+{
+    if(!fct) return fct;
+    if(CheckBridged(my_lib->w.bridge, fct))
+        return (void*)CheckBridged(my_lib->w.bridge, fct);
+    #define GO(A) if(my_free_##A == fct) return (void*)my_free_fct_##A;
+    SUPER()
+    #undef GO
+    return (void*)AddBridge(my_lib->w.bridge, vFpp, fct, 0, NULL);
+}
 #undef SUPER
 
-static void wrap_alloc_struct(lzma_allocator_t* dst, lzma_allocator_t* src)
+static void wrap_alloc_struct(lzma_allocator_t* a)
 {
-    if(!src)
+    if(!a)
         return;
-    dst->opaque = src->opaque;
-    dst->alloc = find_alloc_Fct(src->alloc);
-    dst->free = find_free_Fct(src->free);
-    
+    a->alloc = find_alloc_Fct(a->alloc);
+    a->free = find_free_Fct(a->free);
+
+}
+static void unwrap_alloc_struct(lzma_allocator_t* a)
+{
+    if(!a)
+        return;
+    a->alloc = reverse_alloc_Fct(a->alloc);
+    a->free = reverse_free_Fct(a->free);
+
 }
 
 EXPORT int my_lzma_index_buffer_decode(x64emu_t* emu, void* i, void* memlimit, lzma_allocator_t* alloc, void* in_, void* in_pos, size_t in_size)
 {
-    lzma_allocator_t allocator = {0};
-    wrap_alloc_struct(&allocator, alloc);
-    return my->lzma_index_buffer_decode(i, memlimit, alloc?&allocator:NULL, in_, in_pos, in_size);
+    wrap_alloc_struct(alloc);
+    int ret = my->lzma_index_buffer_decode(i, memlimit, alloc, in_, in_pos, in_size);
+    unwrap_alloc_struct(alloc);
+    return ret;
 }
 
 EXPORT void my_lzma_index_end(x64emu_t* emu, void* i, lzma_allocator_t* alloc)
 {
-    lzma_allocator_t allocator = {0};
-    wrap_alloc_struct(&allocator, alloc);
-    return my->lzma_index_end(i,alloc?&allocator:NULL);
+    wrap_alloc_struct(alloc);
+    my->lzma_index_end(i,alloc);
+    unwrap_alloc_struct(alloc);
 }
 
 EXPORT int my_lzma_stream_buffer_decode(x64emu_t* emu, void* memlimit, uint32_t flags, lzma_allocator_t* alloc, void* in_, void* in_pos, size_t in_size, void* out_, void* out_pos, size_t out_size)
 {
-    lzma_allocator_t allocator = {0};
-    wrap_alloc_struct(&allocator, alloc);
-    return my->lzma_stream_buffer_decode(memlimit, flags, alloc?&allocator:NULL, in_, in_pos, in_size, out_, out_pos, out_size);
+    wrap_alloc_struct(alloc);
+    int ret = my->lzma_stream_buffer_decode(memlimit, flags, alloc, in_, in_pos, in_size, out_, out_pos, out_size);
+    unwrap_alloc_struct(alloc);
+    return ret;
 }
 
 EXPORT int my_lzma_stream_decoder(x64emu_t* emu, lzma_stream_t* stream, uint64_t memlimit, uint32_t flags)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_stream_decoder(stream, memlimit, flags);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_stream_decoder(stream, memlimit, flags);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_stream_encoder(x64emu_t* emu, lzma_stream_t* stream, void* filters, int check)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_stream_encoder(stream, filters, check);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_stream_encoder(stream, filters, check);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 
 EXPORT int my_lzma_easy_encoder(x64emu_t* emu, lzma_stream_t* stream, uint32_t precheck, uint32_t check)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_easy_encoder(stream, precheck, check);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_easy_encoder(stream, precheck, check);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_raw_encoder(x64emu_t* emu, lzma_stream_t* stream, void* filters)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_raw_encoder(stream, filters);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_raw_encoder(stream, filters);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_raw_decoder(x64emu_t* emu, lzma_stream_t* stream, void* filters)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_raw_decoder(stream, filters);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_raw_decoder(stream, filters);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_properties_decode(x64emu_t* emu, void* filters, lzma_allocator_t* allocator, void* props, size_t size)
 {
-    lzma_allocator_t alloc = {0};
-    wrap_alloc_struct(&alloc, allocator);
-    return my->lzma_properties_decode(filters, &alloc, props, size);
+    wrap_alloc_struct(allocator);
+    int ret = my->lzma_properties_decode(filters, allocator, props, size);
+    unwrap_alloc_struct(allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_alone_decoder(x64emu_t* emu, lzma_stream_t* stream, uint64_t memlimit)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_alone_decoder(stream, memlimit);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_alone_decoder(stream, memlimit);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_alone_encoder(x64emu_t* emu, lzma_stream_t* stream, void* options)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_alone_encoder(stream, options);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_alone_encoder(stream, options);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
 }
 
 EXPORT int my_lzma_stream_encoder_mt(x64emu_t* emu, lzma_stream_t* stream, void* options)
 {
-    // not restoring the allocator after, so lzma_code and lzma_end can be used without "GOM" wrapping
-    if(stream->allocator)
-        wrap_alloc_struct(stream->allocator, stream->allocator);
-    return my->lzma_stream_encoder_mt(stream, options);
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_stream_encoder_mt(stream, options);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
+}
+
+EXPORT int my_lzma_code(x64emu_t* emu, lzma_stream_t* stream, int a)
+{
+    wrap_alloc_struct(stream->allocator);
+    int ret = my->lzma_code(stream, a);
+    unwrap_alloc_struct(stream->allocator);
+    return ret;
+}
+
+EXPORT void my_lzma_end(x64emu_t* emu, lzma_stream_t* stream)
+{
+    wrap_alloc_struct(stream->allocator);
+    my->lzma_end(stream);
 }
 
 #define CUSTOM_INIT \
diff --git a/src/wrapped/wrappedlzma_private.h b/src/wrapped/wrappedlzma_private.h
index 274bf88a..6f8b4765 100644
--- a/src/wrapped/wrappedlzma_private.h
+++ b/src/wrapped/wrappedlzma_private.h
@@ -19,7 +19,7 @@ GO(lzma_block_uncomp_encode, uFppLppL)
 //GO(lzma_block_unpadded_size, 
 GO(lzma_check_is_supported, CFu)
 GO(lzma_check_size, uFu)
-GO(lzma_code, iFpi)
+GOM(lzma_code, iFEpi)
 GO(lzma_cputhreads, uFv)
 GO(lzma_crc32, uFpLu)
 GO(lzma_crc64, LFpLL)
@@ -27,7 +27,7 @@ GO(lzma_crc64, LFpLL)
 GO(lzma_easy_decoder_memusage, LFu)
 GOM(lzma_easy_encoder, iFEpui)
 //GO(lzma_easy_encoder_memusage, 
-GO(lzma_end, vFp)
+GOM(lzma_end, vFEp)
 GO(lzma_filter_decoder_is_supported, CFL)
 //GO(lzma_filter_encoder_is_supported, 
 //GO(lzma_filter_flags_decode, 
diff --git a/src/wrapped/wrappedmpg123.c b/src/wrapped/wrappedmpg123.c
index 6ddaf394..5b95749e 100644
--- a/src/wrapped/wrappedmpg123.c
+++ b/src/wrapped/wrappedmpg123.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_r_read_fct_##A = 0;                                 \
 static ssize_t my_r_read_##A(void* a, void* b, size_t n)             \
 {                                                                                       \
-    return (ssize_t)RunFunction(my_context, my_r_read_fct_##A, 3, a, b, n); \
+    return (ssize_t)RunFunctionFmt(my_r_read_fct_##A, "ppL", a, b, n);        \
 }
 SUPER()
 #undef GO
@@ -60,7 +60,7 @@ static void* find_r_read_Fct(void* fct)
 static uintptr_t my_r_lseek_fct_##A = 0;                                 \
 static int64_t my_r_lseek_##A(void* a, int64_t b, int n)             \
 {                                                                                       \
-    return (int64_t)RunFunction(my_context, my_r_lseek_fct_##A, 3, a, b, n); \
+    return (int64_t)RunFunctionFmt(my_r_lseek_fct_##A, "pIi", a, b, n);       \
 }
 SUPER()
 #undef GO
@@ -82,7 +82,7 @@ static void* find_r_lseek_Fct(void* fct)
 static uintptr_t my_cleanup_fct_##A = 0;                \
 static void my_cleanup_##A(void* a)                     \
 {                                                       \
-    RunFunction(my_context, my_cleanup_fct_##A, 1, a);  \
+    RunFunctionFmt(my_cleanup_fct_##A, "p", a);   \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedmpg123_private.h b/src/wrapped/wrappedmpg123_private.h
index 6b80a771..76d94aa7 100644
--- a/src/wrapped/wrappedmpg123_private.h
+++ b/src/wrapped/wrappedmpg123_private.h
@@ -16,19 +16,20 @@ GO(mpg123_decoder, iFpp)
 //GO(mpg123_decoders, 
 GO(mpg123_delete, vFp)
 GO(mpg123_delete_pars, vFp)
-//GO(mpg123_enc_from_id3, 
+GO(mpg123_enc_from_id3, iFC)
 GO(mpg123_encodings, vFpp)
 GO(mpg123_encsize, iFi)
-//GO(mpg123_eq, 
+GO(mpg123_eq, iFpiid)
 GO(mpg123_errcode, iFp)
 GO(mpg123_exit, vFv)
 GO(mpg123_feature, iFi)
+GO(mpg123_feature2, iFi)
 GO(mpg123_feed, iFppL)
 GO(mpg123_feedseek, lFplip)
 GO(mpg123_feedseek_64, IFpIip)
-//GO(mpg123_fmt, 
+GO(mpg123_fmt, iFplii)
 GO(mpg123_fmt_all, iFp)
-//GO(mpg123_fmt_none, 
+GO(mpg123_fmt_none, iFp)
 GO(mpg123_fmt_support, iFpli)
 GO(mpg123_format, iFplii)
 GO(mpg123_format_all, iFp)
@@ -43,12 +44,13 @@ GO(mpg123_framelength_64, IFp)
 GO(mpg123_framepos, IFp)
 GO(mpg123_framepos_64, IFp)
 GO(mpg123_free_string, vFp)
-//GO(mpg123_geteq, 
+GO(mpg123_geteq, dFpii)
 GO(mpg123_getformat, iFpppp)
 GO(mpg123_getformat2, iFppppi)
-//GO(mpg123_getpar, 
+GO(mpg123_getpar, iFpipp)
 GO(mpg123_getparam, iFpipp)
-//GO(mpg123_getstate, 
+GO(mpg123_getparam2, iFpipp)
+GO(mpg123_getstate, iFpipp)
 GO(mpg123_getvolume, iFpppp)
 GO(mpg123_grow_string, iFpL)
 GO(mpg123_icy, iFpp)
@@ -56,7 +58,7 @@ GO(mpg123_icy2utf8, pFp)
 GO(mpg123_id3, iFppp)
 GO(mpg123_index, iFpppp)
 GO(mpg123_index_64, iFpppp)
-//GO(mpg123_info, 
+GO(mpg123_info, iFpp)
 GO(mpg123_init, iFv)
 //GO(mpg123_init_string, 
 GO(mpg123_length, lFp)
@@ -73,8 +75,9 @@ GO(mpg123_open_feed, iFp)
 GO(mpg123_open_handle, iFpp)
 GO(mpg123_open_handle_64, iFpp)
 GO(mpg123_outblock, LFp)
-//GO(mpg123_par, 
+GO(mpg123_par, iFpild)
 GO(mpg123_param, iFpild)
+GO(mpg123_param2, iFpild)
 GO(mpg123_parnew, pFppp)
 GO(mpg123_plain_strerror, pFi)
 GO(mpg123_position, iFpllpppp)
@@ -101,7 +104,7 @@ GO(mpg123_set_index_64, iFppIL)
 GO(mpg123_set_string, iFpp)
 GO(mpg123_set_substring, iFppLL)
 //GO(mpg123_spf, 
-//GO(mpg123_store_utf8, 
+GO(mpg123_store_utf8, iFpipL)
 GO(mpg123_strerror, pFp)
 GO(mpg123_strlen, LFpi)
 GO(mpg123_supported_decoders, pFv)
@@ -115,4 +118,4 @@ GO(mpg123_timeframe, lFpd)
 GO(mpg123_timeframe_64, IFpd)
 GO(mpg123_tpf, dFp)
 //GO(mpg123_volume, 
-//GO(mpg123_volume_change, 
+GO(mpg123_volume_change, iFpd)
diff --git a/src/wrapped/wrappednspr4_private.h b/src/wrapped/wrappednspr4_private.h
index 81ef7c87..47100da7 100644
--- a/src/wrapped/wrappednspr4_private.h
+++ b/src/wrapped/wrappednspr4_private.h
@@ -9,112 +9,112 @@
 //GO(LL_MaxInt, 
 //GO(LL_MaxUint, 
 //GO(LL_MinInt, 
-//GO(LL_Zero, 
+GO(LL_Zero, lFv)
 //GO(PR_Abort, 
 //GO(PR_Accept, 
 //GO(PR_AcceptRead, 
-//GO(PR_Access, 
+GO(PR_Access, iFpu)
 //GO(PR_AddToCounter, 
 //GO(PR_AddWaitFileDesc, 
 //GO(PR_AllocFileDesc, 
-//GO(PR_Assert, 
-//GO(PR_AssertCurrentThreadInMonitor, 
-//GO(PR_AssertCurrentThreadOwnsLock, 
-//GO(PR_AtomicAdd, 
-//GO(PR_AtomicDecrement, 
+GO(PR_Assert, vFppi)
+GO(PR_AssertCurrentThreadInMonitor, vFp)
+GO(PR_AssertCurrentThreadOwnsLock, vFp)
+GO(PR_AtomicAdd, iFpi)
+GO(PR_AtomicDecrement, iFp)
 //GO(PR_AtomicIncrement, 
 //GO(PR_AtomicSet, 
-//GO(PR_AttachSharedMemory, 
+GO(PR_AttachSharedMemory, pFpi)
 //GO(PR_AttachThread, 
 //GO(PR_Available, 
 //GO(PR_Available64, 
 //GO(PR_Bind, 
 //GO(PR_BlockClockInterrupts, 
 //GO(PR_BlockInterrupt, 
-//GO(PR_Calloc, 
+GO(PR_Calloc, pFuu)
 //GO(PR_CallOnce, 
 //GO(PR_CallOnceWithArg, 
 //GO(PR_CancelJob, 
 //GO(PR_CancelWaitFileDesc, 
 //GO(PR_CancelWaitGroup, 
 //GO(PR_CeilingLog2, 
-//GO(PR_CEnterMonitor, 
+GO(PR_CEnterMonitor, pFp)
 //GO(PR_CExitMonitor, 
 //GO(PR_ChangeFileDescNativeHandle, 
-//GO(PR_Cleanup, 
+GO(PR_Cleanup, iFv)
 //GO(PR_ClearInterrupt, 
 //GO(PR_ClearThreadGCAble, 
 GO(PR_Close, iFp)
-//GO(PR_CloseDir, 
-//GO(PR_CloseFileMap, 
-//GO(PR_CloseSemaphore, 
-//GO(PR_CloseSharedMemory, 
+GO(PR_CloseDir, iFp)
+GO(PR_CloseFileMap, iFp)
+GO(PR_CloseSemaphore, iFp)
+GO(PR_CloseSharedMemory, iFp)
 //GO(PR_CNotify, 
-//GO(PR_CNotifyAll, 
-//GO(PR_cnvtf, 
+GO(PR_CNotifyAll, iFp)
+GO(PR_cnvtf, vFpiid)
 //GO(PR_Connect, 
 //GO(PR_ConnectContinue, 
-//GO(PR_ConvertIPv4AddrToIPv6, 
+GO(PR_ConvertIPv4AddrToIPv6, vFup)
 //GO(PR_CreateAlarm, 
 //GO(PR_CreateCounter, 
 //GO(PR_CreateFileMap, 
 //GO(PR_CreateIOLayer, 
 //GO(PR_CreateIOLayerStub, 
-//GO(PR_CreateMWaitEnumerator, 
+GO(PR_CreateMWaitEnumerator, pFp)
 //GO(PR_CreateOrderedLock, 
-//GO(PR_CreatePipe, 
-//GO(PR_CreateProcess, 
-//GO(PR_CreateProcessDetached, 
+GO(PR_CreatePipe, iFpp)
+GO(PR_CreateProcess, pFpppp)
+GO(PR_CreateProcessDetached, iFpppp)
 //GO(PR_CreateSocketPollFd, 
-//GO(PR_CreateStack, 
+GO(PR_CreateStack, pFp)
 //GO(PR_CreateThread, 
 //GO(PR_CreateThreadGCAble, 
-//GO(PR_CreateThreadPool, 
-//GO(PR_CreateTrace, 
-//GO(PR_CreateWaitGroup, 
+GO(PR_CreateThreadPool, pFiiu)
+GO(PR_CreateTrace, pFppp)
+GO(PR_CreateWaitGroup, pFi)
 //GO(PR_CSetOnMonitorRecycle, 
-//GO(PR_CWait, 
+GO(PR_CWait, iFpu)
 //GO(PR_DecrementCounter, 
 //GO(PR_Delete, 
 //GO(PR_DeleteSemaphore, 
-//GO(PR_DeleteSharedMemory, 
+GO(PR_DeleteSharedMemory, iFp)
 //GO(PR_DestroyAlarm, 
-//GO(PR_DestroyCondVar, 
+GO(PR_DestroyCondVar, vFp)
 //GO(PR_DestroyCounter, 
 //GO(PR_DestroyLock, 
 //GO(PR_DestroyMonitor, 
-//GO(PR_DestroyMWaitEnumerator, 
+GO(PR_DestroyMWaitEnumerator, iFp)
 //GO(PR_DestroyOrderedLock, 
 //GO(PR_DestroyPollableEvent, 
-//GO(PR_DestroyProcessAttr, 
+GO(PR_DestroyProcessAttr, vFp)
 //GO(PR_DestroyRWLock, 
 //GO(PR_DestroySem, 
 //GO(PR_DestroySocketPollFd, 
-//GO(PR_DestroyStack, 
-//GO(PR_DestroyTrace, 
-//GO(PR_DestroyWaitGroup, 
+GO(PR_DestroyStack, iFp)
+GO(PR_DestroyTrace, vFp)
+GO(PR_DestroyWaitGroup, iFp)
 //GO(PR_DetachProcess, 
-//GO(PR_DetachSharedMemory, 
+GO(PR_DetachSharedMemory, iFpp)
 GO(PR_DetachThread, vFv)
 //GO(PR_DisableClockInterrupts, 
-//GO(PR_dtoa, 
-//GO(PR_DuplicateEnvironment, 
+GO(PR_dtoa, iFdiippppL)
+GO(PR_DuplicateEnvironment, pFv)
 GO(PR_EmulateAcceptRead, iFppppiu)
 GO(PR_EmulateSendFile, iFppiu)
 //GO(PR_EnableClockInterrupts, 
 //GO(PR_EnterMonitor, 
-//GO(PR_EnumerateAddrInfo, 
-//GO(PR_EnumerateHostEnt, 
+GO(PR_EnumerateAddrInfo, pFppWp)
+GO(PR_EnumerateHostEnt, iFipWp)
 //GO(PR_EnumerateThreads, 
 //GO(PR_EnumerateWaitGroup, 
 //GO(PR_ErrorInstallCallback, 
-//GO(PR_ErrorInstallTable, 
-//GO(PR_ErrorLanguages, 
+GO(PR_ErrorInstallTable, iFp)
+GO(PR_ErrorLanguages, pFv)
 GO(PR_ErrorToName, pFi)
-//GO(PR_ErrorToString, 
+GO(PR_ErrorToString, pFiu)
 //GO(PR_ExitMonitor, 
 //GO(PR_ExplodeTime, 
-//GO(PR_ExportFileMapAsString, 
+GO(PR_ExportFileMapAsString, iFpLp)
 //GO(PR_FD_CLR, 
 //GO(PR_FD_ISSET, 
 //GO(PR_FD_NCLR, 
@@ -123,29 +123,29 @@ GO(PR_ErrorToName, pFi)
 //GO(PR_FD_SET, 
 //GO(PR_FD_ZERO, 
 //GO(PR_FileDesc2NativeHandle, 
-//GO(PR_FindFunctionSymbol, 
-//GO(PR_FindFunctionSymbolAndLibrary, 
+GO(PR_FindFunctionSymbol, pFpp)
+GO(PR_FindFunctionSymbolAndLibrary, pFpp)
 //GO(PR_FindNextCounterQname, 
 //GO(PR_FindNextCounterRname, 
-//GO(PR_FindNextTraceQname, 
-//GO(PR_FindNextTraceRname, 
-//GO(PR_FindSymbol, 
-//GO(PR_FindSymbolAndLibrary, 
-//GO(PR_FloorLog2, 
-//GO(PR_FormatTime, 
-//GO(PR_FormatTimeUSEnglish, 
+GO(PR_FindNextTraceQname, pFp)
+GO(PR_FindNextTraceRname, pFpp)
+GO(PR_FindSymbol, pFpp)
+GO(PR_FindSymbolAndLibrary, pFpp)
+GO(PR_FloorLog2, iFu)
+GO(PR_FormatTime, uFpipp)
+GO(PR_FormatTimeUSEnglish, uFpupp)
 //GO(PR_fprintf, 
 //GO(PR_FPrintZoneStats, 
-//GO(PR_Free, 
-//GO(PR_FreeAddrInfo, 
+GO(PR_Free, vFp)
+GO(PR_FreeAddrInfo, vFp)
 //GO(PR_FreeLibraryName, 
-//GO(PR_GetAddrInfoByName, 
-//GO(PR_GetCanonNameFromAddrInfo, 
+GO(PR_GetAddrInfoByName, pFpWi)
+GO(PR_GetCanonNameFromAddrInfo, pFp)
 //GO(PR_GetConnectStatus, 
 //GO(PR_GetCounter, 
 //GO(PR_GetCounterHandleFromName, 
 //GO(PR_GetCounterNameFromHandle, 
-//GO(PR_GetCurrentThread, 
+GO(PR_GetCurrentThread, pFv)
 //GO(PR_GetDefaultIOMethods, 
 //GO(PR_GetDescType, 
 //GO(PR_GetDirectorySeparator, 
@@ -155,86 +155,86 @@ GO(PR_ErrorToName, pFi)
 GO(PR_GetError, iFv)
 GO(PR_GetErrorText, iFp)
 GO(PR_GetErrorTextLength, iFv)
-//GO(PR_GetFileInfo, 
-//GO(PR_GetFileInfo64, 
+GO(PR_GetFileInfo, iFpp)
+GO(PR_GetFileInfo64, iFpp)
 //GO(PR_GetFileMethods, 
 //GO(PR_GetGCRegisters, 
-//GO(PR_GetHostByAddr, 
-//GO(PR_GetHostByName, 
+GO(PR_GetHostByAddr, iFppip)
+GO(PR_GetHostByName, iFppip)
 //GO(PR_GetIdentitiesLayer, 
 //GO(PR_GetInheritedFD, 
 //GO(PR_GetInheritedFileMap, 
-//GO(PR_GetIPNodeByName, 
+GO(PR_GetIPNodeByName, iFpWipip)
 //GO(PR_GetLayersIdentity, 
 //GO(PR_GetLibraryFilePathname, 
-//GO(PR_GetLibraryName, 
-//GO(PR_GetLibraryPath, 
+GO(PR_GetLibraryName, pFpp)
+GO(PR_GetLibraryPath, pFv)
 //GO(PR_GetMemMapAlignment, 
 //GO(PR_GetMonitorEntryCount, 
-//GO(PR_GetNameForIdentity, 
-//GO(PR_GetNumberOfProcessors, 
+GO(PR_GetNameForIdentity, pFi)
+GO(PR_GetNumberOfProcessors, iFv)
 //GO(PR_GetOpenFileInfo, 
 //GO(PR_GetOpenFileInfo64, 
 GO(PR_GetOSError, iFv)
 //GO(PR_GetPageShift, 
 //GO(PR_GetPageSize, 
-//GO(PR_GetPathSeparator, 
+GO(PR_GetPathSeparator, cFv)
 //GO(PR_GetPeerName, 
-//GO(PR_GetPhysicalMemorySize, 
+GO(PR_GetPhysicalMemorySize, LFv)
 //GO(PR_GetPipeMethods, 
-//GO(PR_GetProtoByName, 
-//GO(PR_GetProtoByNumber, 
-//GO(PR_GetRandomNoise, 
+GO(PR_GetProtoByName, iFppip)
+GO(PR_GetProtoByNumber, iFipip)
+GO(PR_GetRandomNoise, LFpL)
 //GO(PR_GetSocketOption, 
 //GO(PR_GetSockName, 
 //GO(PR_GetSP, 
 //GO(PR_GetSpecialFD, 
 //GO(PR_GetStackSpaceLeft, 
 //GO(PR_GetSysfdTableMax, 
-//GO(PR_GetSystemInfo, 
+GO(PR_GetSystemInfo, iFupu)
 //GO(PR_GetTCPMethods, 
 //GO(PR_GetThreadAffinityMask, 
 //GO(PR_GetThreadID, 
-//GO(PR_GetThreadName, 
-//GO(PR_GetThreadPriority, 
-//GO(PR_GetThreadPrivate, 
-//GO(PR_GetThreadScope, 
-//GO(PR_GetThreadState, 
-//GO(PR_GetThreadType, 
-//GO(PR_GetTraceEntries, 
-//GO(PR_GetTraceHandleFromName, 
-//GO(PR_GetTraceNameFromHandle, 
-//GO(PR_GetTraceOption, 
+GO(PR_GetThreadName, pFp)
+GO(PR_GetThreadPriority, uFp)
+GO(PR_GetThreadPrivate, pFu)
+GO(PR_GetThreadScope, uFp)
+GO(PR_GetThreadState, uFp)
+GO(PR_GetThreadType, uFp)
+GO(PR_GetTraceEntries, iFpip)
+GO(PR_GetTraceHandleFromName, pFpp)
+GO(PR_GetTraceNameFromHandle, vFpppp)
+GO(PR_GetTraceOption, vFup)
 //GO(PR_GetUDPMethods, 
-//GO(PR_GetUniqueIdentity, 
-//GO(PR_GetVersion, 
+GO(PR_GetUniqueIdentity, iFp)
+GO(PR_GetVersion, pFv)
 //GO(PR_GMTParameters, 
-//GO(PR_htonl, 
-//GO(PR_htonll, 
-//GO(PR_htons, 
-//GO(PR_ImplodeTime, 
+GO(PR_htonl, uFu)
+GO(PR_htonll, LFL)
+GO(PR_htons, WFW)
+GO(PR_ImplodeTime, lFp)
 //GO(PR_ImportFile, 
-//GO(PR_ImportFileMapFromString, 
+GO(PR_ImportFileMapFromString, pFp)
 //GO(PR_ImportPipe, 
 GO(PR_ImportTCPSocket, pFi)
 //GO(PR_ImportUDPSocket, 
 //GO(PR_IncrementCounter, 
-GO(PR_Init, vFiii)
+GO(PR_Init, vFuuu)
 //GO(PR_Initialize, 
 GO(PR_Initialized, iFv)
-//GO(PR_InitializeNetAddr, 
-//GO(PR_Interrupt, 
-//GO(PR_IntervalNow, 
-//GO(PR_IntervalToMicroseconds, 
+GO(PR_InitializeNetAddr, iFuWp)
+GO(PR_Interrupt, iFp)
+GO(PR_IntervalNow, uFv)
+GO(PR_IntervalToMicroseconds, uFu)
 GO(PR_IntervalToMilliseconds, uFu)
 //GO(PR_IntervalToSeconds, 
-//GO(PR_IsNetAddrType, 
-//GO(PR_JoinJob, 
+GO(PR_IsNetAddrType, iFpu)
+GO(PR_JoinJob, iFp)
 //GO(PR_JoinThread, 
-//GO(PR_JoinThreadPool, 
-//GO(PR_KillProcess, 
+GO(PR_JoinThreadPool, iFp)
+GO(PR_KillProcess, iFp)
 //GO(PR_Listen, 
-//GO(PR_LoadLibrary, 
+//GO(PR_LoadLibrary, pFp)   // needs wrapping
 //GO(PR_LoadLibraryWithFlags, 
 //GO(PR_LoadStaticLibrary, 
 //GO(PR_LocalTimeParameters, 
@@ -243,46 +243,46 @@ GO(PR_IntervalToMilliseconds, uFu)
 //GO(PR_LockOrderedLock, 
 //GO(PR_LogFlush, 
 //GO(PR_LogPrint, 
-//GO(PR_MakeDir, 
-//GO(PR_Malloc, 
-//GO(PR_MemMap, 
-//GO(PR_MemUnmap, 
-//GO(PR_MicrosecondsToInterval, 
+GO(PR_MakeDir, iFpi)
+GO(PR_Malloc, pFu)
+//GO(PR_MemMap, pFplu)  // needs wrapping
+//GO(PR_MemUnmap, iFpu) // needs wrapping
+GO(PR_MicrosecondsToInterval, uFu)
 //GO(PR_MillisecondsToInterval, 
 //GO(PR_MkDir, 
-//GO(PR_NetAddrToString, 
-//GO(PR_NewCondVar, 
-//GO(PR_NewLock, 
-//GO(PR_NewLogModule, 
-//GO(PR_NewMonitor, 
+GO(PR_NetAddrToString, iFppu)
+GO(PR_NewCondVar, pFp)
+GO(PR_NewLock, pFv)
+GO(PR_NewLogModule, pFp)
+GO(PR_NewMonitor, pFv)
 //GO(PR_NewNamedMonitor, 
 //GO(PR_NewPollableEvent, 
-//GO(PR_NewProcessAttr, 
-//GO(PR_NewRWLock, 
+GO(PR_NewProcessAttr, pFv)
+GO(PR_NewRWLock, pFup)
 //GO(PR_NewSem, 
 //GO(PR_NewTCPSocket, 
-//GO(PR_NewTCPSocketPair, 
+GO(PR_NewTCPSocketPair, iFp)
 //GO(PR_NewThreadPrivateIndex, 
 //GO(PR_NewUDPSocket, 
 //GO(PR_NormalizeTime, 
 //GO(PR_Notify, 
-//GO(PR_NotifyAll, 
-//GO(PR_NotifyAllCondVar, 
+GO(PR_NotifyAll, iFp)
+GO(PR_NotifyAllCondVar, iFp)
 //GO(PR_NotifyCondVar, 
-GO(PR_Now, pFv)
+GO(PR_Now, lFv)
 //GO(PR_ntohl, 
 //GO(PR_ntohll, 
 //GO(PR_ntohs, 
 //GO(PR_Open, 
-//GO(PR_OpenAnonFileMap, 
-//GO(PR_OpenDir, 
+GO(PR_OpenAnonFileMap, pFpLu)
+GO(PR_OpenDir, pFp)
 //GO(PR_OpenFile, 
-//GO(PR_OpenSemaphore, 
-//GO(PR_OpenSharedMemory, 
+GO(PR_OpenSemaphore, pFpiiu)
+GO(PR_OpenSharedMemory, pFpLii)
 //GO(PR_OpenTCPSocket, 
 //GO(PR_OpenUDPSocket, 
-//GO(PR_ParseTimeString, 
-//GO(PR_ParseTimeStringToExplodedTime, 
+GO(PR_ParseTimeString, iFpip)
+GO(PR_ParseTimeStringToExplodedTime, iFpip)
 //GO(PRP_DestroyNakedCondVar, 
 //GO(PRP_NakedBroadcast, 
 //GO(PRP_NakedNotify, 
@@ -292,9 +292,9 @@ GO(PR_Now, pFv)
 //GO(PR_PopIOLayer, 
 //GO(PR_PostSem, 
 //GO(PR_PostSemaphore, 
-//GO(PR_ProcessAttrSetCurrentDirectory, 
+GO(PR_ProcessAttrSetCurrentDirectory, iFpp)
 //GO(PR_ProcessAttrSetInheritableFD, 
-//GO(PR_ProcessAttrSetInheritableFileMap, 
+GO(PR_ProcessAttrSetInheritableFileMap, iFppp)
 //GO(PR_ProcessAttrSetStdioRedirect, 
 //GO(PR_ProcessExit, 
 //GO(PRP_TryLock, 
@@ -307,18 +307,18 @@ GO(PR_Now, pFv)
 //GO(PR_QueueJob_Timer, 
 //GO(PR_QueueJob_Write, 
 GO(PR_Read, iFppi)
-//GO(PR_ReadDir, 
-//GO(PR_Realloc, 
-//GO(PR_RecordTraceEntries, 
+GO(PR_ReadDir, pFpu)
+GO(PR_Realloc, pFpu)
+GO(PR_RecordTraceEntries, vFv)
 //GO(PR_Recv, 
 //GO(PR_RecvFrom, 
-//GO(PR_Rename, 
+GO(PR_Rename, iFpp)
 //GO(PR_ResetAlarm, 
 //GO(PR_ResetProcessAttr, 
 //GO(PR_ResumeAll, 
 //GO(PR_RmDir, 
 //GO(PR_RWLock_Rlock, 
-//GO(PR_RWLock_Unlock, 
+GO(PR_RWLock_Unlock, vFp)
 //GO(PR_RWLock_Wlock, 
 //GO(PR_ScanStackPointers, 
 //GO(PR_SecondsToInterval, 
@@ -329,18 +329,18 @@ GO(PR_Read, iFppi)
 //GO(PR_SendFile, 
 //GO(PR_SendTo, 
 //GO(PR_SetAlarm, 
-//GO(PR_SetConcurrency, 
+GO(PR_SetConcurrency, vFu)
 //GO(PR_SetCounter, 
 //GO(PR_SetCurrentThreadName, 
 //GO(PR_SetEnv, 
-//GO(PR_SetError, 
-//GO(PR_SetErrorText, 
-//GO(PR_SetFDCacheSize, 
+GO(PR_SetError, vFii)
+GO(PR_SetErrorText, vFip)
+GO(PR_SetFDCacheSize, iFii)
 //GO(PR_SetFDInheritable, 
 //GO(PR_SetLibraryPath, 
-//GO(PR_SetLogBuffering, 
-//GO(PR_SetLogFile, 
-//GO(PR_SetNetAddr, 
+GO(PR_SetLogBuffering, vFi)
+GO(PR_SetLogFile, iFp)
+GO(PR_SetNetAddr, iFuWWp)
 //GO(PR_SetPollableEvent, 
 GO(PR_SetSocketOption, iFpp)
 //GO(PR_SetStdioRedirect, 
@@ -348,24 +348,24 @@ GO(PR_SetSocketOption, iFpp)
 //GO(PR_SetThreadAffinityMask, 
 //GO(PR_SetThreadDumpProc, 
 //GO(PR_SetThreadGCAble, 
-//GO(PR_SetThreadPriority, 
-//GO(PR_SetThreadPrivate, 
+GO(PR_SetThreadPriority, vFpu)
+GO(PR_SetThreadPrivate, iFup)
 //GO(PR_SetThreadRecycleMode, 
 //GO(PR_SetTraceOption, 
 //GO(PR_Shutdown, 
 //GO(PR_ShutdownThreadPool, 
-//GO(PR_Sleep, 
+GO(PR_Sleep, iFu)
 //GO(PR_smprintf, 
 GO(PR_smprintf_free, vFp)
 //GO(PR_snprintf, 
 //GO(PR_Socket, 
 //GO(PR_sprintf_append, 
 //GO(PR_sscanf, 
-//GO(PR_StackPop, 
-//GO(PR_StackPush, 
+GO(PR_StackPop, pFp)
+GO(PR_StackPush, vFpp)
 //GO(PR_Stat, 
-//GO(PR_StringToNetAddr, 
-//GO(PR_strtod, 
+GO(PR_StringToNetAddr, iFpp)
+GO(PR_strtod, dFpp)
 //GO(PR_SubtractFromCounter, 
 //GO(PR_SuspendAll, 
 //GO(PR_sxprintf, 
@@ -373,27 +373,27 @@ GO(PR_smprintf_free, vFp)
 //GO(PR_SyncMemMap, 
 //GO(_pr_test_ipv6_socket, 
 //GO(PR_ThreadScanStackPointers, 
-//GO(PR_TicksPerSecond, 
+GO(PR_TicksPerSecond, uFv)
 //GO(PR_TLockFile, 
-//GO(PR_Trace, 
+GO(PR_Trace, vFpuuuuuuuu)
 //GO(PR_TransmitFile, 
 //GO(PR_UnblockClockInterrupts, 
 //GO(PR_UnblockInterrupt, 
-//GO(PR_UnloadLibrary, 
-//GO(PR_Unlock, 
+GO(PR_UnloadLibrary, iFp)
+GO(PR_Unlock, iFp)
 //GO(PR_UnlockFile, 
 //GO(PR_UnlockOrderedLock, 
 //GO(PR_USPacificTimeParameters, 
 //GO(PR_VersionCheck, 
 //GO(PR_vfprintf, 
-//GO(PR_vsmprintf, 
-//GO(PR_vsnprintf, 
-//GO(PR_vsprintf_append, 
+GO(PR_vsmprintf, pFpp)
+GO(PR_vsnprintf, uFpupp)
+GO(PR_vsprintf_append, pFppp)
 //GO(PR_vsxprintf, 
-//GO(PR_Wait, 
-//GO(PR_WaitCondVar, 
+GO(PR_Wait, iFpu)
+GO(PR_WaitCondVar, iFpu)
 //GO(PR_WaitForPollableEvent, 
-//GO(PR_WaitProcess, 
+GO(PR_WaitProcess, iFpp)
 //GO(PR_WaitRecvReady, 
 //GO(PR_WaitSem, 
 //GO(PR_WaitSemaphore, 
diff --git a/src/wrapped/wrappednss3.c b/src/wrapped/wrappednss3.c
index 00a0766f..e64ac396 100644
--- a/src/wrapped/wrappednss3.c
+++ b/src/wrapped/wrappednss3.c
@@ -37,7 +37,7 @@ GO(4)
 static uintptr_t my_PK11PasswordFunc_fct_##A = 0;                                   \
 static void* my_PK11PasswordFunc_##A(void* a, int b, void* c)                       \
 {                                                                                   \
-    return (void*)RunFunction(my_context, my_PK11PasswordFunc_fct_##A, 3, a, b, c); \
+    return (void*)RunFunctionFmt(my_PK11PasswordFunc_fct_##A, "pip", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -60,7 +60,7 @@ static void* find_PK11PasswordFunc_Fct(void* fct)
 static uintptr_t my_CERT_StringFromCertFcn_fct_##A = 0;                             \
 static void* my_CERT_StringFromCertFcn_##A(void* a)                                 \
 {                                                                                   \
-    return (void*)RunFunction(my_context, my_CERT_StringFromCertFcn_fct_##A, 1, a); \
+    return (void*)RunFunctionFmt(my_CERT_StringFromCertFcn_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -92,7 +92,7 @@ static void* reverse_CERT_StringFromCertFcn_Fct(library_t* lib, void* fct)
 static uintptr_t my_CERTChainVerifyCallbackFunc_fct_##A = 0;                                    \
 static int my_CERTChainVerifyCallbackFunc_##A(void* a, void* b, void* c)                        \
 {                                                                                               \
-    return (int)RunFunction(my_context, my_CERTChainVerifyCallbackFunc_fct_##A, 3, a, b, c);    \
+    return (int)RunFunctionFmt(my_CERTChainVerifyCallbackFunc_fct_##A, "ppp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -124,7 +124,7 @@ static void* reverse_CERTChainVerifyCallbackFunc_Fct(library_t* lib, void* fct)
 static uintptr_t my_PORTCharConversionWSwapFunc_fct_##A = 0;                                                    \
 static int my_PORTCharConversionWSwapFunc_##A(int a, void* b, uint32_t c, void* d, uint32_t e, void* f, int g)  \
 {                                                                                                               \
-    return (int)RunFunction(my_context, my_PORTCharConversionWSwapFunc_fct_##A, 7, a, b, c, d, e, f, g);        \
+    return (int)RunFunctionFmt(my_PORTCharConversionWSwapFunc_fct_##A, "ipupupi", a, b, c, d, e, f, g);        \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappednss3_private.h b/src/wrapped/wrappednss3_private.h
index 9cc602b9..4571086e 100644
--- a/src/wrapped/wrappednss3_private.h
+++ b/src/wrapped/wrappednss3_private.h
@@ -7,57 +7,57 @@
 // CK_ATTRIBUTE_TYPE is type ULong
 // SECOidTag is an enum
 
-//GO(ATOB_AsciiToData, 
-//GO(ATOB_ConvertAsciiToItem, 
+GO(ATOB_AsciiToData, pFpp)
+GO(ATOB_ConvertAsciiToItem, iFpp)
 //GO(BTOA_ConvertItemToAscii, 
-//GO(BTOA_DataToAscii, 
-//GO(CERT_AddCertToListHead, 
+GO(BTOA_DataToAscii, pFpu)
+GO(CERT_AddCertToListHead, iFpp)
 //GO(CERT_AddCertToListSorted, 
 GO(CERT_AddCertToListTail, iFpp)
-//GO(CERT_AddExtension, 
-//GO(CERT_AddExtensionByOID, 
+GO(CERT_AddExtension, iFpipii)
+GO(CERT_AddExtensionByOID, iFpppii)
 //GO(CERT_AddOCSPAcceptableResponses, 
-//GO(CERT_AddOKDomainName, 
-//GO(CERT_AddRDN, 
+GO(CERT_AddOKDomainName, iFpp)
+GO(CERT_AddRDN, iFpp)
 //GO(__CERT_AddTempCertToPerm, 
-//GO(CERT_AllocCERTRevocationFlags, 
-//GO(CERT_AsciiToName, 
+GO(CERT_AllocCERTRevocationFlags, pFuuuu)
+GO(CERT_AsciiToName, pFp)
 //GO(CERT_CacheCRL, 
-//GO(CERT_CacheOCSPResponseFromSideChannel, 
-//GO(CERT_CertChainFromCert, 
+GO(CERT_CacheOCSPResponseFromSideChannel, iFpplpp)
+GO(CERT_CertChainFromCert, pFpui)
 //DATA(CERT_CertificateRequestTemplate, 
 DATA(CERT_CertificateTemplate, 480)
-//GO(CERT_CertListFromCert, 
+GO(CERT_CertListFromCert, pFp)
 //GO(CERT_CertTimesValid, 
 GO(CERT_ChangeCertTrust, iFppp)
-//GO(CERT_CheckCertUsage, 
-GO(CERT_CheckCertValidTimes, iFpIi)
-//GO(CERT_CheckNameSpace, 
-//GO(CERT_CheckOCSPStatus, 
-//GO(CERT_ClearOCSPCache, 
+GO(CERT_CheckCertUsage, iFpC)
+GO(CERT_CheckCertValidTimes, uFpli)
+GO(CERT_CheckNameSpace, iFppp)
+GO(CERT_CheckOCSPStatus, iFpplp)
+GO(CERT_ClearOCSPCache, iFv)
 //GO(__CERT_ClosePermCertDB, 
-//GO(CERT_CompareAVA, 
+GO(CERT_CompareAVA, iFpp)
 GO(CERT_CompareCerts, iFpp)
 GO(CERT_CompareName, iFpp)
 //GO(CERT_CompareValidityTimes, 
-//GO(CERT_CompleteCRLDecodeEntries, 
-//GO(CERT_CopyName, 
-//GO(CERT_CopyRDN, 
-//GO(CERT_CreateAVA, 
-//GO(CERT_CreateCertificate, 
-//GO(CERT_CreateCertificateRequest, 
-//GO(CERT_CreateEncodedOCSPErrorResponse, 
-//GO(CERT_CreateEncodedOCSPSuccessResponse, 
+GO(CERT_CompleteCRLDecodeEntries, iFp)
+GO(CERT_CopyName, iFppp)
+GO(CERT_CopyRDN, iFppp)
+GO(CERT_CreateAVA, pFpuip)
+GO(CERT_CreateCertificate, pFLppp)
+GO(CERT_CreateCertificateRequest, pFppp)
+GO(CERT_CreateEncodedOCSPErrorResponse, pFpi)
+GO(CERT_CreateEncodedOCSPSuccessResponse, pFppilpp)
 //GO(CERT_CreateName, 
-//GO(CERT_CreateOCSPCertID, 
-//GO(CERT_CreateOCSPRequest, 
+GO(CERT_CreateOCSPCertID, pFpl)
+GO(CERT_CreateOCSPRequest, pFplip)
 //GO(CERT_CreateOCSPSingleResponseGood, 
-//GO(CERT_CreateOCSPSingleResponseRevoked, 
-//GO(CERT_CreateOCSPSingleResponseUnknown, 
+GO(CERT_CreateOCSPSingleResponseRevoked, pFpplplp)
+GO(CERT_CreateOCSPSingleResponseUnknown, pFpplp)
 //GO(CERT_CreateRDN, 
-GO(CERT_CreateSubjectCertList, pFpppIi)
-GO(CERT_CreateValidity, pFII)
-//GO(CERT_CRLCacheRefreshIssuer, 
+GO(CERT_CreateSubjectCertList, pFpppli)
+GO(CERT_CreateValidity, pFll)
+GO(CERT_CRLCacheRefreshIssuer, vFpp)
 //DATA(CERT_CrlTemplate, 
 GO(CERT_DecodeAltNameExtension, pFpp)
 GO(CERT_DecodeAuthInfoAccessExtension, pFpp)
@@ -67,231 +67,231 @@ GO(CERT_DecodeBasicConstraintValue, iFpp)
 GO(CERT_DecodeCertificatePoliciesExtension, pFp)
 GO(CERT_DecodeCRLDistributionPoints, pFpp)
 //GO(__CERT_DecodeDERCertificate, 
-//GO(CERT_DecodeDERCrl, 
-//GO(CERT_DecodeDERCrlWithFlags, 
-//GO(CERT_DecodeGeneralName, 
-//GO(CERT_DecodeNameConstraintsExtension, 
-//GO(CERT_DecodeOCSPRequest, 
-//GO(CERT_DecodeOCSPResponse, 
+GO(CERT_DecodeDERCrl, pFppi)
+GO(CERT_DecodeDERCrlWithFlags, pFppii)
+GO(CERT_DecodeGeneralName, pFppp)
+GO(CERT_DecodeNameConstraintsExtension, pFpp)
+GO(CERT_DecodeOCSPRequest, pFp)
+GO(CERT_DecodeOCSPResponse, pFp)
 GO(CERT_DecodeOidSequence, pFp)
-//GO(CERT_DecodePrivKeyUsagePeriodExtension, 
-//GO(CERT_DecodeTrustString, 
+GO(CERT_DecodePrivKeyUsagePeriodExtension, pFpp)
+GO(CERT_DecodeTrustString, iFpp)
 GO(CERT_DecodeUserNotice, pFp)
-//GO(CERT_DerNameToAscii, 
-//GO(CERT_DestroyCertArray, 
+GO(CERT_DerNameToAscii, pFp)
+GO(CERT_DestroyCertArray, vFpu)
 GO(CERT_DestroyCertificate, vFp)
 GO(CERT_DestroyCertificateList, vFp)
 GO(CERT_DestroyCertificatePoliciesExtension, vFp)
 GO(CERT_DestroyCertificateRequest, vFp)
 GO(CERT_DestroyCertList, vFp)
-//GO(CERT_DestroyCERTRevocationFlags, 
+GO(CERT_DestroyCERTRevocationFlags, vFp)
 GO(CERT_DestroyName, vFp)
-//GO(CERT_DestroyOCSPCertID, 
-//GO(CERT_DestroyOCSPRequest, 
-//GO(CERT_DestroyOCSPResponse, 
+GO(CERT_DestroyOCSPCertID, iFp)
+GO(CERT_DestroyOCSPRequest, vFp)
+GO(CERT_DestroyOCSPResponse, vFp)
 GO(CERT_DestroyOidSequence, vFp)
 GO(CERT_DestroyUserNotice, vFp)
 GO(CERT_DestroyValidity, vFp)
 //GO(CERT_DisableOCSPChecking, 
-//GO(CERT_DisableOCSPDefaultResponder, 
-//GO(CERT_DistNamesFromCertList, 
+GO(CERT_DisableOCSPDefaultResponder, iFp)
+GO(CERT_DistNamesFromCertList, pFp)
 GO(CERT_DupCertificate, pFp)
-//GO(CERT_DupCertList, 
-//GO(CERT_DupDistNames, 
+GO(CERT_DupCertList, pFp)
+GO(CERT_DupDistNames, pFp)
 //GO(CERT_EnableOCSPChecking, 
 //GO(CERT_EnableOCSPDefaultResponder, 
-//GO(CERT_EncodeAltNameExtension, 
-//GO(CERT_EncodeAndAddBitStrExtension, 
-//GO(CERT_EncodeAuthKeyID, 
-//GO(CERT_EncodeBasicConstraintValue, 
-//GO(CERT_EncodeCertPoliciesExtension, 
-//GO(CERT_EncodeCRLDistributionPoints, 
-//GO(CERT_EncodeGeneralName, 
-//GO(CERT_EncodeInfoAccessExtension, 
-//GO(CERT_EncodeInhibitAnyExtension, 
+GO(CERT_EncodeAltNameExtension, iFppp)
+GO(CERT_EncodeAndAddBitStrExtension, iFpipi)
+GO(CERT_EncodeAuthKeyID, iFppp)
+GO(CERT_EncodeBasicConstraintValue, iFppp)
+GO(CERT_EncodeCertPoliciesExtension, iFppp)
+GO(CERT_EncodeCRLDistributionPoints, iFppp)
+GO(CERT_EncodeGeneralName, pFppp)
+GO(CERT_EncodeInfoAccessExtension, iFppp)
+GO(CERT_EncodeInhibitAnyExtension, iFppp)
 //GO(CERT_EncodeNameConstraintsExtension, 
-//GO(CERT_EncodeNoticeReference, 
-//GO(CERT_EncodeOCSPRequest, 
-//GO(CERT_EncodePolicyConstraintsExtension, 
-//GO(CERT_EncodePolicyMappingExtension, 
-//GO(CERT_EncodeSubjectKeyID, 
-//GO(CERT_EncodeUserNotice, 
+GO(CERT_EncodeNoticeReference, iFppp)
+GO(CERT_EncodeOCSPRequest, pFppp)
+GO(CERT_EncodePolicyConstraintsExtension, iFppp)
+GO(CERT_EncodePolicyMappingExtension, iFppp)
+GO(CERT_EncodeSubjectKeyID, iFppp)
+GO(CERT_EncodeUserNotice, iFppp)
 GO(CERT_ExtractPublicKey, pFp)
-//GO(CERT_FilterCertListByCANames, 
-//GO(CERT_FilterCertListByUsage, 
-//GO(CERT_FilterCertListForUserCerts, 
+GO(CERT_FilterCertListByCANames, iFpipu)
+GO(CERT_FilterCertListByUsage, iFpui)
+GO(CERT_FilterCertListForUserCerts, iFp)
 GO(CERT_FindCertByDERCert, pFpp)
-//GO(CERT_FindCertByIssuerAndSN, 
-//GO(CERT_FindCertByIssuerAndSNCX, 
+GO(CERT_FindCertByIssuerAndSN, pFpp)
+GO(CERT_FindCertByIssuerAndSNCX, pFppp)
 GO(CERT_FindCertByName, pFpp)
 //GO(CERT_FindCertByNickname, 
-//GO(CERT_FindCertByNicknameOrEmailAddr, 
-//GO(CERT_FindCertByNicknameOrEmailAddrCX, 
-//GO(CERT_FindCertByNicknameOrEmailAddrForUsage, 
-//GO(CERT_FindCertByNicknameOrEmailAddrForUsageCX, 
+GO(CERT_FindCertByNicknameOrEmailAddr, pFpp)
+GO(CERT_FindCertByNicknameOrEmailAddrCX, pFppp)
+GO(CERT_FindCertByNicknameOrEmailAddrForUsage, pFppu)
+GO(CERT_FindCertByNicknameOrEmailAddrForUsageCX, pFppup)
 //GO(CERT_FindCertBySubjectKeyID, 
-GO(CERT_FindCertExtension, iFppp)
-//GO(CERT_FindCertIssuer, 
-//GO(CERT_FindCRLEntryReasonExten, 
-//GO(CERT_FindCRLNumberExten, 
+GO(CERT_FindCertExtension, iFpip)
+GO(CERT_FindCertIssuer, pFplu)
+GO(CERT_FindCRLEntryReasonExten, iFpp)
+GO(CERT_FindCRLNumberExten, iFppp)
 //GO(CERT_FindKeyUsageExtension, 
-//GO(CERT_FindNameConstraintsExten, 
-//GO(CERT_FindSMimeProfile, 
-//GO(CERT_FindSubjectKeyIDExtension, 
-//GO(CERT_FindUserCertByUsage, 
-GO(CERT_FindUserCertsByUsage, pFpiiip)
-//GO(CERT_FinishCertificateRequestAttributes, 
-//GO(CERT_FinishExtensions, 
-//GO(CERT_ForcePostMethodForOCSP, 
-//GO(CERT_FormatName, 
-//GO(CERT_FreeDistNames, 
-//GO(CERT_FreeNicknames, 
-//GO(CERT_GenTime2FormattedAscii, 
-GO(CERT_GetAVATag, iFp)
-//GO(CERT_GetCertChainFromCert, 
+GO(CERT_FindNameConstraintsExten, iFppp)
+GO(CERT_FindSMimeProfile, pFp)
+GO(CERT_FindSubjectKeyIDExtension, iFpp)
+GO(CERT_FindUserCertByUsage, pFppuip)
+GO(CERT_FindUserCertsByUsage, pFpuiip)
+GO(CERT_FinishCertificateRequestAttributes, iFp)
+GO(CERT_FinishExtensions, iFp)
+GO(CERT_ForcePostMethodForOCSP, iFi)
+GO(CERT_FormatName, pFp)
+GO(CERT_FreeDistNames, vFp)
+GO(CERT_FreeNicknames, vFp)
+GO(CERT_GenTime2FormattedAscii, pFlp)
+GO(CERT_GetAVATag, uFp)
+GO(CERT_GetCertChainFromCert, pFplu)
 GO(CERT_GetCertEmailAddress, pFp)
-//GO(CERT_GetCertificateDer, 
-//GO(CERT_GetCertificateNames, 
-//GO(CERT_GetCertificateRequestExtensions, 
-//GO(CERT_GetCertIsPerm, 
-//GO(CERT_GetCertIssuerAndSN, 
+GO(CERT_GetCertificateDer, iFpp)
+GO(CERT_GetCertificateNames, pFpp)
+GO(CERT_GetCertificateRequestExtensions, iFpp)
+GO(CERT_GetCertIsPerm, iFpp)
+GO(CERT_GetCertIssuerAndSN, pFpp)
 //GO(CERT_GetCertIsTemp, 
-//GO(CERT_GetCertKeyType, 
-//GO(CERT_GetCertNicknames, 
+GO(CERT_GetCertKeyType, uFp)
+GO(CERT_GetCertNicknames, pFpip)
 GO(CERT_GetCertTimes, iFppp)
 GO(CERT_GetCertTrust, iFpp)
 GO(CERT_GetCertUid, pFp)
-//GO(CERT_GetClassicOCSPDisabledPolicy, 
+GO(CERT_GetClassicOCSPDisabledPolicy, pFv)
 //GO(CERT_GetClassicOCSPEnabledHardFailurePolicy, 
 //GO(CERT_GetClassicOCSPEnabledSoftFailurePolicy, 
 GO(CERT_GetCommonName, pFp)
-//GO(CERT_GetConstrainedCertificateNames, 
+GO(CERT_GetConstrainedCertificateNames, pFppi)
 GO(CERT_GetCountryName, pFp)
-//GO(CERT_GetDBContentVersion, 
+GO(CERT_GetDBContentVersion, iFp)
 GO(CERT_GetDefaultCertDB, pFv)
 GO(CERT_GetDomainComponentName, pFp)
-//GO(CERT_GetEncodedOCSPResponse, 
+GO(CERT_GetEncodedOCSPResponse, pFppplippp)
 GO(CERT_GetFirstEmailAddress, pFp)
-//GO(CERT_GetGeneralNameTypeFromString, 
-//GO(CERT_GetImposedNameConstraints, 
+GO(CERT_GetGeneralNameTypeFromString, uFp)
+GO(CERT_GetImposedNameConstraints, iFpp)
 GO(CERT_GetLocalityName, pFp)
-//GO(CERT_GetNextEmailAddress, 
+GO(CERT_GetNextEmailAddress, pFpp)
 GO(CERT_GetNextGeneralName, pFp)
 //GO(CERT_GetNextNameConstraint, 
-//GO(CERT_GetOCSPAuthorityInfoAccessLocation, 
-//GO(CERT_GetOCSPResponseStatus, 
-//GO(CERT_GetOCSPStatusForCertID, 
+GO(CERT_GetOCSPAuthorityInfoAccessLocation, pFp)
+GO(CERT_GetOCSPResponseStatus, iFp)
+GO(CERT_GetOCSPStatusForCertID, iFppppl)
 GO(CERT_GetOidString, pFp)
 GO(CERT_GetOrgName, pFp)
 GO(CERT_GetOrgUnitName, pFp)
 //GO(CERT_GetPKIXVerifyNistRevocationPolicy, 
-//GO(CERT_GetPrevGeneralName, 
-//GO(CERT_GetPrevNameConstraint, 
+GO(CERT_GetPrevGeneralName, pFp)
+GO(CERT_GetPrevNameConstraint, pFp)
 //GO(CERT_GetSlopTime, 
-//GO(CERT_GetSSLCACerts, 
+GO(CERT_GetSSLCACerts, pFp)
 GO(CERT_GetStateName, pFp)
-//GO(CERT_GetSubjectNameDigest, 
+GO(CERT_GetSubjectNameDigest, pFppup)
 //GO(CERT_GetSubjectPublicKeyDigest, 
 //GO(CERT_GetUsePKIXForValidation, 
-//GO(CERT_GetValidDNSPatternsFromCert, 
+GO(CERT_GetValidDNSPatternsFromCert, pFp)
 GO(CERT_Hexify, pFpi)
 //GO(CERT_ImportCAChain, 
-//GO(CERT_ImportCAChainTrusted, 
-//GO(CERT_ImportCerts, 
-//GO(CERT_ImportCRL, 
+GO(CERT_ImportCAChainTrusted, iFpiu)
+GO(CERT_ImportCerts, iFpuuppiip)
+GO(CERT_ImportCRL, pFpppip)
 GO(CERT_IsCACert, iFpp)
-//GO(CERT_IsCADERCert, 
-//GO(CERT_IsRootDERCert, 
+GO(CERT_IsCADERCert, iFpp)
+GO(CERT_IsRootDERCert, iFp)
 //DATA(CERT_IssuerAndSNTemplate, 
 //GO(CERT_IsUserCert, 
 //GO(CERT_KeyFromDERCrl, 
 GO(CERT_MakeCANickname, pFp)
-//GO(CERT_MergeExtensions, 
+GO(CERT_MergeExtensions, iFpp)
 DATA(CERT_NameTemplate, 4*sizeof(void*))
 //GO(CERT_NameToAscii, 
-//GO(CERT_NameToAsciiInvertible, 
+GO(CERT_NameToAsciiInvertible, pFpu)
 GO(CERT_NewCertList, pFv)
 //GO(__CERT_NewTempCertificate, 
 GO(CERT_NewTempCertificate, pFpppii)
-//GO(CERT_NicknameStringsFromCertList, 
-//GO(CERT_OCSPCacheSettings, 
-//GO(CERT_OpenCertDBFilename, 
+GO(CERT_NicknameStringsFromCertList, pFppp)
+GO(CERT_OCSPCacheSettings, iFiuu)
+GO(CERT_OpenCertDBFilename, iFppi)
 GOM(CERT_PKIXVerifyCert, iFEpIppp)
-//GO(CERT_PostOCSPRequest, 
+GO(CERT_PostOCSPRequest, pFppp)
 GOM(CERT_RegisterAlternateOCSPAIAInfoCallBack, iFEpp)
-//GO(CERT_RemoveCertListNode, 
-//GO(CERT_RFC1485_EscapeAndQuote, 
-//GO(CERT_SaveSMimeProfile, 
+GO(CERT_RemoveCertListNode, vFp)
+GO(CERT_RFC1485_EscapeAndQuote, iFpipi)
+GO(CERT_SaveSMimeProfile, iFppp)
 //DATA(CERT_SequenceOfCertExtensionTemplate, 
-//GO(CERT_SetOCSPDefaultResponder, 
-//GO(CERT_SetOCSPFailureMode, 
-//GO(CERT_SetOCSPTimeout, 
+GO(CERT_SetOCSPDefaultResponder, iFppp)
+GO(CERT_SetOCSPFailureMode, iFu)
+GO(CERT_SetOCSPTimeout, iFu)
 //DATA(CERT_SetOfSignedCrlTemplate, 
-//GO(CERT_SetSlopTime, 
-//GO(CERT_SetUsePKIXForValidation, 
+GO(CERT_SetSlopTime, iFi)
+GO(CERT_SetUsePKIXForValidation, iFi)
 //DATA(CERT_SignedCrlTemplate, 
 DATA(CERT_SignedDataTemplate, 160)
-//GO(CERT_StartCertExtensions, 
-//GO(CERT_StartCertificateRequestAttributes, 
-//GO(CERT_StartCRLEntryExtensions, 
-//GO(CERT_StartCRLExtensions, 
+GO(CERT_StartCertExtensions, pFp)
+GO(CERT_StartCertificateRequestAttributes, pFp)
+GO(CERT_StartCRLEntryExtensions, pFpp)
+GO(CERT_StartCRLExtensions, pFp)
 //DATA(CERT_SubjectPublicKeyInfoTemplate, 
 //DATA(CERT_TimeChoiceTemplate,     //R type
 //GO(__CERT_TraversePermCertsForNickname, 
 //GO(__CERT_TraversePermCertsForSubject, 
-//GO(CERT_UncacheCRL, 
+GO(CERT_UncacheCRL, iFpp)
 //GO(CERT_VerifyCACertForUsage, 
 GO(CERT_VerifyCert, iFpp)
-//GO(CERT_VerifyCertificate, 
-GO(CERT_VerifyCertificateNow, iFppiipp)
-//GO(CERT_VerifyCertName, 
-//GO(CERT_VerifyCertNow, 
-//GO(CERT_VerifyOCSPResponseSignature, 
-//GO(CERT_VerifySignedData, 
+GO(CERT_VerifyCertificate, iFppillppp)
+GO(CERT_VerifyCertificateNow, iFppilpp)
+GO(CERT_VerifyCertName, iFpp)
+GO(CERT_VerifyCertNow, iFppiup)
+GO(CERT_VerifyOCSPResponseSignature, iFppppp)
+GO(CERT_VerifySignedData, iFpplp)
 GO(CERT_VerifySignedDataWithPublicKey, iFppp)
-//GO(CERT_VerifySignedDataWithPublicKeyInfo, 
-//GO(DER_AsciiToTime, 
+GO(CERT_VerifySignedDataWithPublicKeyInfo, iFppp)
+GO(DER_AsciiToTime, iFpp)
 GO(DER_DecodeTimeChoice, iFpp)
 GO(DER_Encode, iFpppp)
-//GO(DER_EncodeTimeChoice, 
+GO(DER_EncodeTimeChoice, iFppl)
 //GO(DER_GeneralizedDayToAscii, 
 //GO(DER_GeneralizedTimeToTime, 
-//GO(DER_GetInteger, 
-//GO(DER_Lengths, 
-//GO(DER_TimeChoiceDayToAscii, 
-//GO(DER_TimeToGeneralizedTime, 
+GO(DER_GetInteger, lFp)
+GO(DER_Lengths, iFppp)
+GO(DER_TimeChoiceDayToAscii, pFp)
+GO(DER_TimeToGeneralizedTime, iFpl)
 //GO(DER_TimeToGeneralizedTimeArena, 
 //GO(DER_TimeToUTCTime, 
 //GO(DER_UTCDayToAscii, 
 //GO(DER_UTCTimeToAscii, 
 //GO(DER_UTCTimeToTime, 
-//GO(DSAU_DecodeDerSig, 
-//GO(DSAU_DecodeDerSigToLen, 
-//GO(DSAU_EncodeDerSig, 
-//GO(DSAU_EncodeDerSigWithLen, 
+GO(DSAU_DecodeDerSig, pFp)
+GO(DSAU_DecodeDerSigToLen, pFpu)
+GO(DSAU_EncodeDerSig, iFpp)
+GO(DSAU_EncodeDerSigWithLen, iFppu)
 GO(HASH_Begin, vFp)
 //GO(HASH_Clone, 
 GO(HASH_Create, pFi)
 GO(HASH_Destroy, vFp)
 GO(HASH_End, vFpppu)
-//GO(HASH_GetHashObject, 
-//GO(HASH_GetHashObjectByOidTag, 
-//GO(HASH_GetHashOidTagByHashType, 
-//GO(HASH_GetHashTypeByOidTag, 
+GO(HASH_GetHashObject, pFu)
+GO(HASH_GetHashObjectByOidTag, pFu)
+GO(HASH_GetHashOidTagByHashType, uFu)
+GO(HASH_GetHashTypeByOidTag, uFu)
 //GO(HASH_GetType, 
-GO(HASH_HashBuf, iFippu)
-//GO(HASH_ResultLen, 
-//GO(HASH_ResultLenByOidTag, 
+GO(HASH_HashBuf, iFuppu)
+GO(HASH_ResultLen, uFu)
+GO(HASH_ResultLenByOidTag, uFu)
 GO(HASH_ResultLenContext, uFp)
 GO(HASH_Update, vFppu)
-//GO(NSSBase64_DecodeBuffer, 
+GO(NSSBase64_DecodeBuffer, pFpppu)
 //GO(NSSBase64Decoder_Create, 
-//GO(NSSBase64Decoder_Destroy, 
-//GO(NSSBase64Decoder_Update, 
-//GO(NSSBase64_EncodeItem, 
+GO(NSSBase64Decoder_Destroy, iFpi)
+GO(NSSBase64Decoder_Update, iFppu)
+GO(NSSBase64_EncodeItem, pFppup)
 //GO(NSSBase64Encoder_Create, 
-//GO(NSSBase64Encoder_Destroy, 
-//GO(NSSBase64Encoder_Update, 
+GO(NSSBase64Encoder_Destroy, iFpi)
+GO(NSSBase64Encoder_Update, iFppu)
 //GO(nss_DumpCertificateCacheInfo, 
 //GO(NSS_Get_CERT_CertificateRequestTemplate, 
 //GO(NSS_Get_CERT_CertificateTemplate, 
@@ -316,7 +316,7 @@ GO(HASH_Update, vFppu)
 //GO(NSS_Get_SECKEY_PointerToEncryptedPrivateKeyInfoTemplate, 
 //GO(NSS_Get_SECKEY_PointerToPrivateKeyInfoTemplate, 
 //GO(NSS_Get_SECKEY_PrivateKeyInfoTemplate, 
-//GO(NSS_Get_SECKEY_RSAPSSParamsTemplate, 
+GO(NSS_Get_SECKEY_RSAPSSParamsTemplate, pFpi)
 //GO(NSS_Get_SECKEY_RSAPublicKeyTemplate, 
 //GO(NSS_Get_SEC_NullTemplate, 
 //GO(NSS_Get_SEC_ObjectIDTemplate, 
@@ -328,14 +328,14 @@ GO(HASH_Update, vFppu)
 //GO(NSS_Get_SEC_SignedCertificateTemplate, 
 //GO(NSS_Get_SEC_UTCTimeTemplate, 
 //GO(NSS_Get_SEC_UTF8StringTemplate, 
-//GO(NSS_Get_sgn_DigestInfoTemplate, 
-//GO(NSS_GetVersion, 
+GO(NSS_Get_sgn_DigestInfoTemplate, pFpi)
+GO(NSS_GetVersion, pFv)
 //GO(NSS_Init, 
-//GO(NSS_InitContext, 
-//GO(NSS_Initialize, 
+GO(NSS_InitContext, pFpppppu)
+GO(NSS_Initialize, iFppppu)
 //GO(__nss_InitLock, 
 GO(NSS_InitReadWrite, iFp)
-//GO(NSS_InitWithMerge, 
+GO(NSS_InitWithMerge, iFpppppppppu)
 GO(NSS_IsInitialized, iFv)
 GO(NSS_NoDB_Init, iFp)
 //GO(NSS_OptionGet, 
@@ -343,186 +343,186 @@ GO(NSS_NoDB_Init, iFp)
 //GO(NSS_PutEnv, 
 //GO(NSS_RegisterShutdown, 
 //GO(NSSRWLock_Destroy, 
-//GO(NSSRWLock_HaveWriteLock, 
+GO(NSSRWLock_HaveWriteLock, iFp)
 //GO(NSSRWLock_LockRead, 
 //GO(NSSRWLock_LockWrite, 
-//GO(NSSRWLock_New, 
+GO(NSSRWLock_New, pFup)
 //GO(NSSRWLock_UnlockRead, 
-//GO(NSSRWLock_UnlockWrite, 
+GO(NSSRWLock_UnlockWrite, vFp)
 //GO(NSS_Shutdown, 
-//GO(NSS_ShutdownContext, 
+GO(NSS_ShutdownContext, iFp)
 //GO(NSS_UnregisterShutdown, 
 GO(NSS_VersionCheck, iFp)
 //GO(__PBE_CreateContext, 
-//GO(PBE_CreateContext, 
+GO(PBE_CreateContext, pFuuppuu)
 //GO(__PBE_DestroyContext, 
-//GO(PBE_DestroyContext, 
+GO(PBE_DestroyContext, vFp)
 //GO(__PBE_GenerateBits, 
-//GO(PBE_GenerateBits, 
-//GO(PK11_AlgtagToMechanism, 
+GO(PBE_GenerateBits, pFp)
+GO(PK11_AlgtagToMechanism, LFu)
 GO(PK11_Authenticate, iFpip)
-//GO(PK11_BlockData, 
-//GO(PK11_ChangePW, 
+GO(PK11_BlockData, pFpL)
+GO(PK11_ChangePW, iFppp)
 //GO(PK11_CheckSSOPassword, 
 GO(PK11_CheckUserPassword, iFpp)
 GO(PK11_CipherOp, iFpppipi)
-//GO(PK11_CloneContext, 
-//GO(PK11_ConfigurePKCS11, 
-//GO(PK11_ConvertSessionPrivKeyToTokenPrivKey, 
-//GO(PK11_ConvertSessionSymKeyToTokenSymKey, 
-//GO(PK11_CopySymKeyForSigning, 
-//GO(PK11_CopyTokenPrivKeyToSessionPrivKey, 
+GO(PK11_CloneContext, pFp)
+GO(PK11_ConfigurePKCS11, vFppppppppii)
+GO(PK11_ConvertSessionPrivKeyToTokenPrivKey, pFpp)
+GO(PK11_ConvertSessionSymKeyToTokenSymKey, pFpp)
+GO(PK11_CopySymKeyForSigning, pFpL)
+GO(PK11_CopyTokenPrivKeyToSessionPrivKey, pFpp)
 //GO(__PK11_CreateContextByRawKey, 
-GO(PK11_CreateContextBySymKey, pFiipp)
-//GO(PK11_CreateDigestContext, 
-//GO(PK11_CreateGenericObject, 
+GO(PK11_CreateContextBySymKey, pFLLpp)
+GO(PK11_CreateDigestContext, pFu)
+GO(PK11_CreateGenericObject, pFppii)
 //GO(PK11_CreateManagedGenericObject, 
-//GO(PK11_CreateMergeLog, 
-//GO(PK11_CreatePBEAlgorithmID, 
-//GO(PK11_CreatePBEParams, 
-//GO(PK11_CreatePBEV2AlgorithmID, 
+GO(PK11_CreateMergeLog, pFv)
+GO(PK11_CreatePBEAlgorithmID, pFuip)
+GO(PK11_CreatePBEParams, pFppu)
+GO(PK11_CreatePBEV2AlgorithmID, pFuuuiip)
 //GO(PK11_Decrypt, 
 GO(PK11_DeleteTokenCertAndKey, iFpp)
-//GO(PK11_DeleteTokenPrivateKey, 
-//GO(PK11_DeleteTokenPublicKey, 
+GO(PK11_DeleteTokenPrivateKey, iFpi)
+GO(PK11_DeleteTokenPublicKey, iFp)
 //GO(PK11_DeleteTokenSymKey, 
-//GO(PK11_DEREncodePublicKey, 
-//GO(PK11_Derive, 
-//GO(PK11_DeriveWithFlags, 
-//GO(PK11_DeriveWithFlagsPerm, 
-//GO(PK11_DeriveWithTemplate, 
+GO(PK11_DEREncodePublicKey, pFp)
+GO(PK11_Derive, pFpLpLLi)
+GO(PK11_DeriveWithFlags, pFpLpLLiL)
+GO(PK11_DeriveWithFlagsPerm, pFpLpLLiLi)
+GO(PK11_DeriveWithTemplate, pFpLpLLipui)
 GO(PK11_DestroyContext, vFpi)
-//GO(PK11_DestroyGenericObject, 
-//GO(PK11_DestroyGenericObjects, 
-//GO(PK11_DestroyMergeLog, 
+GO(PK11_DestroyGenericObject, iFp)
+GO(PK11_DestroyGenericObjects, uFp)
+GO(PK11_DestroyMergeLog, vFp)
 GO(PK11_DestroyObject, iFpL)
-//GO(PK11_DestroyPBEParams, 
+GO(PK11_DestroyPBEParams, vFp)
 GO(PK11_DestroyTokenObject, iFpL)
 //GO(PK11_DigestBegin, 
-//GO(PK11_DigestFinal, 
-//GO(PK11_DigestKey, 
-//GO(PK11_DigestOp, 
+GO(PK11_DigestFinal, iFpppu)
+GO(PK11_DigestKey, iFpp)
+GO(PK11_DigestOp, iFppu)
 GO(PK11_DoesMechanism, iFpL)
-//GO(PK11_Encrypt, 
-//GO(PK11_ExportDERPrivateKeyInfo, 
-//GO(PK11_ExportEncryptedPrivateKeyInfo, 
-//GO(PK11_ExportEncryptedPrivKeyInfo, 
-//GO(PK11_ExportPrivateKeyInfo, 
-//GO(PK11_ExportPrivKeyInfo, 
-//GO(PK11_ExtractKeyValue, 
+GO(PK11_Encrypt, iFpLpppupu)
+GO(PK11_ExportDERPrivateKeyInfo, pFpp)
+GO(PK11_ExportEncryptedPrivateKeyInfo, pFpuppip)
+GO(PK11_ExportEncryptedPrivKeyInfo, pFpuppip)
+GO(PK11_ExportPrivateKeyInfo, pFpp)
+GO(PK11_ExportPrivKeyInfo, pFpp)
+GO(PK11_ExtractKeyValue, iFp)
 GO(PK11_Finalize, iFp)
-//GO(PK11_FindBestKEAMatch, 
-//GO(PK11_FindCertAndKeyByRecipientList, 
-//GO(PK11_FindCertAndKeyByRecipientListNew, 
-//GO(PK11_FindCertByIssuerAndSN, 
-//GO(PK11_FindCertFromDERCert, 
+GO(PK11_FindBestKEAMatch, pFpp)
+GO(PK11_FindCertAndKeyByRecipientList, pFppppp)
+GO(PK11_FindCertAndKeyByRecipientListNew, iFpp)
+GO(PK11_FindCertByIssuerAndSN, pFppp)
+GO(PK11_FindCertFromDERCert, pFppp)
 GO(PK11_FindCertFromDERCertItem, pFppp)
 //GO(PK11_FindCertFromNickname, 
-//GO(PK11_FindCertFromURI, 
+GO(PK11_FindCertFromURI, pFpp)
 GO(PK11_FindCertInSlot, LFppp)
 //GO(PK11_FindCertsFromEmailAddress, 
-//GO(PK11_FindCertsFromNickname, 
+GO(PK11_FindCertsFromNickname, pFpp)
 //GO(PK11_FindCertsFromURI, 
-GO(PK11_FindFixedKey, pFpipp)
-//GO(PK11_FindGenericObjects, 
+GO(PK11_FindFixedKey, pFpLpp)
+GO(PK11_FindGenericObjects, pFpL)
 GO(PK11_FindKeyByAnyCert, pFpp)
 GO(PK11_FindKeyByDERCert, pFppp)
 GO(PK11_FindKeyByKeyID, pFppp)
 GO(PK11_FindPrivateKeyFromCert, pFppp)
-//GO(PK11_FindRawCertsWithSubject, 
+GO(PK11_FindRawCertsWithSubject, iFppp)
 //GO(PK11_FindSlotByName, 
-//GO(PK11_FindSlotsByNames, 
-//GO(PK11_FortezzaHasKEA, 
-//GO(PK11_FortezzaMapSig, 
+GO(PK11_FindSlotsByNames, pFpppi)
+GO(PK11_FortezzaHasKEA, iFp)
+GO(PK11_FortezzaMapSig, uFu)
 GO(PK11_FreeSlot, vFp)
 GO(PK11_FreeSlotList, vFp)
 GO(PK11_FreeSlotListElement, iFpp)
 GO(PK11_FreeSymKey, vFp)
-//GO(PK11_GenerateFortezzaIV, 
+GO(PK11_GenerateFortezzaIV, iFppi)
 GO(PK11_GenerateKeyPair, pFpLppiip)
-//GO(PK11_GenerateKeyPairWithFlags, 
-//GO(PK11_GenerateKeyPairWithOpFlags, 
-//GO(PK11_GenerateNewParam, 
-//GO(PK11_GenerateRandom, 
-//GO(PK11_GenerateRandomOnSlot, 
+GO(PK11_GenerateKeyPairWithFlags, pFpLppup)
+GO(PK11_GenerateKeyPairWithOpFlags, pFpLppuLLp)
+GO(PK11_GenerateNewParam, pFLp)
+GO(PK11_GenerateRandom, iFpi)
+GO(PK11_GenerateRandomOnSlot, iFppi)
 GO(PK11_GetAllSlotsForCert, pFpp)
 GO(PK11_GetAllTokens, pFLiip)
-//GO(PK11_GetBestKeyLength, 
-//GO(PK11_GetBestSlot, 
-//GO(PK11_GetBestSlotMultiple, 
-//GO(PK11_GetBestSlotMultipleWithAttributes, 
-//GO(PK11_GetBestSlotWithAttributes, 
-//GO(PK11_GetBestWrapMechanism, 
+GO(PK11_GetBestKeyLength, iFpL)
+GO(PK11_GetBestSlot, pFLp)
+GO(PK11_GetBestSlotMultiple, pFpup)
+GO(PK11_GetBestSlotMultipleWithAttributes, pFpppup)
+GO(PK11_GetBestSlotWithAttributes, pFLLup)
+GO(PK11_GetBestWrapMechanism, LFp)
 GO(PK11_GetBlockSize, iFLp)
-//GO(PK11_GetCertFromPrivateKey, 
-//GO(PK11_GetCertsMatchingPrivateKey, 
-//GO(PK11_GetCurrentWrapIndex, 
-//GO(PK11_GetDefaultArray, 
-//GO(PK11_GetDefaultFlags, 
-//GO(PK11_GetDisabledReason, 
+GO(PK11_GetCertFromPrivateKey, pFp)
+GO(PK11_GetCertsMatchingPrivateKey, pFp)
+GO(PK11_GetCurrentWrapIndex, iFp)
+GO(PK11_GetDefaultArray, pFp)
+GO(PK11_GetDefaultFlags, LFp)
+GO(PK11_GetDisabledReason, uFp)
 GO(PK11_GetFirstSafe, pFp)
 GO(PK11_GetInternalKeySlot, pFv)
-//GO(PK11_GetInternalSlot, 
+GO(PK11_GetInternalSlot, pFv)
 //GO(PK11_GetIVLength, 
 //GO(__PK11_GetKeyData, 
-//GO(PK11_GetKeyData, 
+GO(PK11_GetKeyData, pFp)
 //GO(PK11_GetKeyGen, 
-//GO(PK11_GetKeyLength, 
-//GO(PK11_GetKeyStrength, 
-//GO(PK11_GetKeyType, 
-//GO(PK11_GetLowLevelKeyIDForCert, 
-//GO(PK11_GetLowLevelKeyIDForPrivateKey, 
-//GO(PK11_GetMechanism, 
+GO(PK11_GetKeyLength, uFp)
+GO(PK11_GetKeyStrength, uFpp)
+GO(PK11_GetKeyType, LFLL)
+GO(PK11_GetLowLevelKeyIDForCert, pFppp)
+GO(PK11_GetLowLevelKeyIDForPrivateKey, pFp)
+GO(PK11_GetMechanism, LFp)
 //GO(PK11_GetMinimumPwdLength, 
 //GO(PK11_GetModInfo, 
 GO(PK11_GetModule, pFp)
-//GO(PK11_GetModuleID, 
+GO(PK11_GetModuleID, LFp)
 //GO(PK11_GetModuleURI, 
-//GO(PK11_GetNextGenericObject, 
+GO(PK11_GetNextGenericObject, pFp)
 GO(PK11_GetNextSafe, pFppi)
 GO(PK11_GetNextSymKey, pFp)
-//GO(PK11_GetPadMechanism, 
-//GO(PK11_GetPBECryptoMechanism, 
-//GO(PK11_GetPBEIV, 
-//GO(PK11_GetPQGParamsFromPrivateKey, 
-//GO(PK11_GetPrevGenericObject, 
+GO(PK11_GetPadMechanism, LFL)
+GO(PK11_GetPBECryptoMechanism, LFppp)
+GO(PK11_GetPBEIV, pFpp)
+GO(PK11_GetPQGParamsFromPrivateKey, pFp)
+GO(PK11_GetPrevGenericObject, pFp)
 GO(PK11_GetPrivateKeyNickname, pFp)
 //GO(PK11_GetPrivateModulusLen, 
-//GO(PK11_GetPublicKeyNickname, 
-//GO(PK11_GetSlotFromKey, 
-//GO(PK11_GetSlotFromPrivateKey, 
-//GO(PK11_GetSlotID, 
-//GO(PK11_GetSlotInfo, 
+GO(PK11_GetPublicKeyNickname, pFp)
+GO(PK11_GetSlotFromKey, pFp)
+GO(PK11_GetSlotFromPrivateKey, pFp)
+GO(PK11_GetSlotID, LFp)
+GO(PK11_GetSlotInfo, iFpp)
 GO(PK11_GetSlotName, pFp)
-//GO(PK11_GetSlotPWValues, 
+GO(PK11_GetSlotPWValues, vFppp)
 //GO(PK11_GetSlotSeries, 
-//GO(PK11_GetSymKeyHandle, 
-//GO(PK11_GetSymKeyNickname, 
-//GO(PK11_GetSymKeyType, 
+GO(PK11_GetSymKeyHandle, LFp)
+GO(PK11_GetSymKeyNickname, pFp)
+GO(PK11_GetSymKeyType, LFp)
 //GO(PK11_GetSymKeyUserData, 
-//GO(PK11_GetTokenInfo, 
+GO(PK11_GetTokenInfo, iFpp)
 GO(PK11_GetTokenName, pFp)
 //GO(PK11_GetTokenURI, 
-//GO(PK11_GetWindow, 
-//GO(PK11_GetWrapKey, 
-//GO(PK11_HasAttributeSet, 
-//GO(PK11_HashBuf, 
+GO(PK11_GetWindow, pFp)
+GO(PK11_GetWrapKey, pFpiLip)
+GO(PK11_HasAttributeSet, CFpLLi)
+GO(PK11_HashBuf, iFuppi)
 GO(PK11_HasRootCerts, iFp)
 GO(PK11_ImportCert, iFppLpi)
-//GO(PK11_ImportCertForKey, 
-//GO(PK11_ImportCertForKeyToSlot, 
-//GO(PK11_ImportCRL, 
-//GO(PK11_ImportDERCert, 
-//GO(PK11_ImportDERCertForKey, 
-//GO(PK11_ImportDERPrivateKeyInfo, 
+GO(PK11_ImportCertForKey, pFppp)
+GO(PK11_ImportCertForKeyToSlot, iFpppip)
+GO(PK11_ImportCRL, pFpppipipi)
+GO(PK11_ImportDERCert, iFppLpi)
+GO(PK11_ImportDERCertForKey, pFppp)
+GO(PK11_ImportDERPrivateKeyInfo, iFppppiiup)
 GO(PK11_ImportDERPrivateKeyInfoAndReturnKey, iFppppiiupp)
-//GO(PK11_ImportEncryptedPrivateKeyInfo, 
-//GO(PK11_ImportEncryptedPrivateKeyInfoAndReturnKey, 
-//GO(PK11_ImportPrivateKeyInfo, 
-//GO(PK11_ImportPrivateKeyInfoAndReturnKey, 
-//GO(PK11_ImportPublicKey, 
-//GO(PK11_ImportSymKey, 
-//GO(PK11_ImportSymKeyWithFlags, 
+GO(PK11_ImportEncryptedPrivateKeyInfo, iFpppppiiuup)
+GO(PK11_ImportEncryptedPrivateKeyInfoAndReturnKey, iFpppppiiuupp)
+GO(PK11_ImportPrivateKeyInfo, iFppppiiup)
+GO(PK11_ImportPrivateKeyInfoAndReturnKey, iFppppiiupp)
+GO(PK11_ImportPublicKey, LFppi)
+GO(PK11_ImportSymKey, pFpLuLpp)
+GO(PK11_ImportSymKeyWithFlags, pFpLuLpLip)
 GO(PK11_InitPin, iFppp)
 //GO(PK11_IsDisabled, 
 GO(PK11_IsFIPS, iFv)
@@ -534,248 +534,248 @@ GO(PK11_IsLoggedIn, iFpp)
 GO(PK11_IsPresent, iFp)
 GO(PK11_IsReadOnly, iFp)
 GO(PK11_IsRemovable, iFp)
-//GO(PK11_IVFromParam, 
+GO(PK11_IVFromParam, pFLpp)
 GO(PK11_KeyForCertExists, pFppp)
-//GO(PK11_KeyForDERCertExists, 
-//GO(PK11_KeyGen, 
-//GO(PK11_KeyGenWithTemplate, 
-//GO(PK11_LinkGenericObject, 
-GO(PK11_ListCerts, pFip)
+GO(PK11_KeyForDERCertExists, pFppp)
+GO(PK11_KeyGen, pFpLpip)
+GO(PK11_KeyGenWithTemplate, pFpLLppup)
+GO(PK11_LinkGenericObject, iFpp)
+GO(PK11_ListCerts, pFup)
 GO(PK11_ListCertsInSlot, pFp)
 GO(PK11_ListFixedKeysInSlot, pFppp)
-//GO(PK11_ListPrivateKeysInSlot, 
-//GO(PK11_ListPrivKeysInSlot, 
-//GO(PK11_ListPublicKeysInSlot, 
-//GO(PK11_LoadPrivKey, 
+GO(PK11_ListPrivateKeysInSlot, pFp)
+GO(PK11_ListPrivKeysInSlot, pFppp)
+GO(PK11_ListPublicKeysInSlot, pFpp)
+GO(PK11_LoadPrivKey, pFpppii)
 //GO(PK11_Logout, 
 //GO(PK11_LogoutAll, 
 GO(PK11_MakeIDFromPubKey, pFp)
-//GO(PK11_MakeKEAPubKey, 
-//GO(PK11_MapPBEMechanismToCryptoMechanism, 
-GO(PK11_MapSignKeyType, LFi)
-//GO(PK11_MechanismToAlgtag, 
-//GO(PK11_MergeTokens, 
-//GO(PK11_MoveSymKey, 
+GO(PK11_MakeKEAPubKey, pFpi)
+GO(PK11_MapPBEMechanismToCryptoMechanism, LFpppi)
+GO(PK11_MapSignKeyType, LFu)
+GO(PK11_MechanismToAlgtag, uFL)
+GO(PK11_MergeTokens, iFppppp)
+GO(PK11_MoveSymKey, pFpLLip)
 GO(PK11_NeedLogin, iFp)
 //GO(PK11_NeedPWInit, 
 GO(PK11_NeedUserInit, iFp)
 GO(PK11_ParamFromAlgid, pFp)
-//GO(PK11_ParamFromIV, 
-//GO(PK11_ParamToAlgid, 
-//GO(PK11_PBEKeyGen, 
-//GO(PK11_PQG_DestroyParams, 
-//GO(PK11_PQG_DestroyVerify, 
-//GO(PK11_PQG_GetBaseFromParams, 
-//GO(PK11_PQG_GetCounterFromVerify, 
-//GO(PK11_PQG_GetHFromVerify, 
+GO(PK11_ParamFromIV, pFLp)
+GO(PK11_ParamToAlgid, iFuppp)
+GO(PK11_PBEKeyGen, pFpppip)
+GO(PK11_PQG_DestroyParams, vFp)
+GO(PK11_PQG_DestroyVerify, vFp)
+GO(PK11_PQG_GetBaseFromParams, iFpp)
+GO(PK11_PQG_GetCounterFromVerify, uFp)
+GO(PK11_PQG_GetHFromVerify, iFpp)
 //GO(PK11_PQG_GetPrimeFromParams, 
 //GO(PK11_PQG_GetSeedFromVerify, 
 //GO(PK11_PQG_GetSubPrimeFromParams, 
-//GO(PK11_PQG_NewParams, 
-//GO(PK11_PQG_NewVerify, 
-//GO(PK11_PQG_ParamGen, 
-//GO(PK11_PQG_ParamGenSeedLen, 
-//GO(PK11_PQG_ParamGenV2, 
-//GO(PK11_PQG_VerifyParams, 
-//GO(PK11_PrivDecrypt, 
-//GO(PK11_PrivDecryptPKCS1, 
+GO(PK11_PQG_NewParams, pFppp)
+GO(PK11_PQG_NewVerify, pFupp)
+GO(PK11_PQG_ParamGen, iFupp)
+GO(PK11_PQG_ParamGenSeedLen, iFuupp)
+GO(PK11_PQG_ParamGenV2, iFuuupp)
+GO(PK11_PQG_VerifyParams, iFppp)
+GO(PK11_PrivDecrypt, iFpLpppupu)
+GO(PK11_PrivDecryptPKCS1, iFpppupu)
 //GO(PK11_ProtectedAuthenticationPath, 
 //GO(PK11_PubDecryptRaw, 
-//GO(PK11_PubDerive, 
-//GO(PK11_PubDeriveWithKDF, 
-//GO(PK11_PubEncrypt, 
-//GO(PK11_PubEncryptPKCS1, 
+GO(PK11_PubDerive, pFppippLLLip)
+GO(PK11_PubDeriveWithKDF, pFppippLLLiLpp)
+GO(PK11_PubEncrypt, iFpLpppupup)
+GO(PK11_PubEncryptPKCS1, iFpppup)
 //GO(PK11_PubEncryptRaw, 
-//GO(PK11_PubUnwrapSymKey, 
+GO(PK11_PubUnwrapSymKey, pFppLLi)
 //GO(PK11_PubUnwrapSymKeyWithFlags, 
-//GO(PK11_PubUnwrapSymKeyWithFlagsPerm, 
-//GO(PK11_PubWrapSymKey, 
-//GO(PK11_RandomUpdate, 
-//GO(PK11_RawPBEKeyGen, 
+GO(PK11_PubUnwrapSymKeyWithFlagsPerm, pFppLLiLi)
+GO(PK11_PubWrapSymKey, iFLppp)
+GO(PK11_RandomUpdate, iFpL)
+GO(PK11_RawPBEKeyGen, pFpLppip)
 GO(PK11_ReadRawAttribute, iFipLp)
 GO(PK11_ReferenceSlot, pFp)
 //GO(PK11_ReferenceSymKey, 
 //GO(PK11_ResetToken, 
-//GO(PK11_RestoreContext, 
-//GO(PK11_SaveContext, 
-//GO(PK11_SaveContextAlloc, 
-//GO(PK11SDR_Decrypt, 
-//GO(PK11SDR_Encrypt, 
+GO(PK11_RestoreContext, iFppi)
+GO(PK11_SaveContext, iFpppi)
+GO(PK11_SaveContextAlloc, pFppup)
+GO(PK11SDR_Decrypt, iFppp)
+GO(PK11SDR_Encrypt, iFpppp)
 //GO(PK11_SeedRandom, 
-//GO(__PK11_SetCertificateNickname, 
-//GO(PK11_SetFortezzaHack, 
+GO(__PK11_SetCertificateNickname, iFpp)
+GO(PK11_SetFortezzaHack, vFp)
 GOM(PK11_SetPasswordFunc, vFEp)
 GO(PK11_SetPrivateKeyNickname, iFpp)
 GO(PK11_SetPublicKeyNickname, iFpp)
-//GO(PK11_SetSlotPWValues, 
-//GO(PK11_SetSymKeyNickname, 
+GO(PK11_SetSlotPWValues, vFpii)
+GO(PK11_SetSymKeyNickname, iFpp)
 //GO(PK11_SetSymKeyUserData, 
-//GO(PK11_SetWrapKey, 
+GO(PK11_SetWrapKey, vFpip)
 GO(PK11_Sign, iFppp)
 GO(PK11_SignatureLen, iFp)
 GO(PK11_SignWithMechanism, iFpLppp)
-//GO(PK11_SignWithSymKey, 
-//GO(PK11_SymKeyFromHandle, 
-GO(PK11_TokenExists, iFi)
-//GO(PK11_TokenKeyGen, 
-//GO(PK11_TokenKeyGenWithFlags, 
+GO(PK11_SignWithSymKey, iFpLppp)
+GO(PK11_SymKeyFromHandle, pFppuLLip)
+GO(PK11_TokenExists, iFL)
+GO(PK11_TokenKeyGen, pFpLpipip)
+GO(PK11_TokenKeyGenWithFlags, pFpLpipLup)
 //GO(PK11_TokenRefresh, 
 //GO(PK11_TraverseCertsForNicknameInSlot, 
 //GO(PK11_TraverseCertsForSubjectInSlot, 
 //GO(PK11_TraverseSlotCerts, 
 //GO(PK11_UnconfigurePKCS11, 
 //GO(PK11_UnlinkGenericObject, 
-//GO(PK11_UnwrapPrivKey, 
-//GO(PK11_UnwrapSymKey, 
-//GO(PK11_UnwrapSymKeyWithFlags, 
-//GO(PK11_UnwrapSymKeyWithFlagsPerm, 
-//GO(PK11_UpdateSlotAttribute, 
+GO(PK11_UnwrapPrivKey, pFppLppppiiLpip)
+GO(PK11_UnwrapSymKey, pFpLppLLi)
+GO(PK11_UnwrapSymKeyWithFlags, pFpLppLLiL)
+GO(PK11_UnwrapSymKeyWithFlagsPerm, pFpLppLLiLi)
+GO(PK11_UpdateSlotAttribute, iFppi)
 //GO(PK11_UserDisableSlot, 
 //GO(PK11_UserEnableSlot, 
-//GO(PK11_Verify, 
-//GO(PK11_VerifyKeyOK, 
-//GO(PK11_VerifyRecover, 
-//GO(PK11_VerifyWithMechanism, 
-//GO(PK11_WaitForTokenEvent, 
-//GO(PK11_WrapPrivKey, 
-//GO(PK11_WrapSymKey, 
-GO(PK11_WriteRawAttribute, iFipLp)
+GO(PK11_Verify, iFpppp)
+GO(PK11_VerifyKeyOK, iFp)
+GO(PK11_VerifyRecover, iFpppp)
+GO(PK11_VerifyWithMechanism, iFpLpppp)
+GO(PK11_WaitForTokenEvent, uFpuuui)
+GO(PK11_WrapPrivKey, iFpppLppp)
+GO(PK11_WrapSymKey, iFLpppp)
+GO(PK11_WriteRawAttribute, iFupLp)
 GO(PORT_Alloc, pFL)
 GO(PORT_ArenaAlloc, pFpL)
-//GO(PORT_ArenaGrow, 
-//GO(PORT_ArenaMark, 
+GO(PORT_ArenaGrow, pFppLL)
+GO(PORT_ArenaMark, pFp)
 //GO(PORT_ArenaRelease, 
-//GO(PORT_ArenaStrdup, 
-//GO(PORT_ArenaUnmark, 
+GO(PORT_ArenaStrdup, pFpp)
+GO(PORT_ArenaUnmark, vFpp)
 GO(PORT_ArenaZAlloc, pFpL)
 GO(PORT_Free, vFp)
 GO(PORT_FreeArena, vFpi)
 GO(PORT_GetError, iFv)
 GO(PORT_NewArena, pFL)
-//GO(PORT_Realloc, 
+GO(PORT_Realloc, pFpL)
 GO(PORT_SetError, vFi)
 GOM(PORT_SetUCS2_ASCIIConversionFunction, vFEp)
-//GO(PORT_SetUCS2_UTF8ConversionFunction, 
+GO(PORT_SetUCS2_UTF8ConversionFunction, vFi)
 //GO(PORT_SetUCS4_UTF8ConversionFunction, 
 GO(PORT_Strdup, pFp)
-//GO(PORT_UCS2_ASCIIConversion, 
+GO(PORT_UCS2_ASCIIConversion, iFipupupi)
 GO(PORT_UCS2_UTF8Conversion, iFipupup)
 GO(PORT_ZAlloc, pFL)
-//GO(PORT_ZFree, 
+GO(PORT_ZFree, vFpL)
 //GO(RSA_FormatBlock, 
 DATA(SEC_AnyTemplate, 4*sizeof(void*))    //R type
-//GO(SEC_ASN1Decode, 
+GO(SEC_ASN1Decode, iFppppl)
 GO(SEC_ASN1DecodeInteger, iFpp)
 GO(SEC_ASN1DecodeItem, iFpppp)
-//GO(SEC_ASN1DecoderAbort, 
+GO(SEC_ASN1DecoderAbort, vFpi)
 //GO(SEC_ASN1DecoderClearFilterProc, 
-//GO(SEC_ASN1DecoderClearNotifyProc, 
-//GO(SEC_ASN1DecoderFinish, 
+GO(SEC_ASN1DecoderClearNotifyProc, vFp)
+GO(SEC_ASN1DecoderFinish, iFp)
 //GO(SEC_ASN1DecoderSetFilterProc, 
 //GO(SEC_ASN1DecoderSetNotifyProc, 
-//GO(SEC_ASN1DecoderStart, 
-//GO(SEC_ASN1DecoderUpdate, 
+GO(SEC_ASN1DecoderStart, pFppp)
+GO(SEC_ASN1DecoderUpdate, iFppL)
 //GO(SEC_ASN1Encode, 
-//GO(SEC_ASN1EncodeInteger, 
-//GO(SEC_ASN1EncodeItem, 
-//GO(SEC_ASN1EncoderAbort, 
+GO(SEC_ASN1EncodeInteger, pFppl)
+GO(SEC_ASN1EncodeItem, pFpppp)
+GO(SEC_ASN1EncoderAbort, vFpi)
 //GO(SEC_ASN1EncoderClearNotifyProc, 
 //GO(SEC_ASN1EncoderClearStreaming, 
-//GO(SEC_ASN1EncoderClearTakeFromBuf, 
+GO(SEC_ASN1EncoderClearTakeFromBuf, vFp)
 //GO(SEC_ASN1EncoderFinish, 
 //GO(SEC_ASN1EncoderSetNotifyProc, 
 //GO(SEC_ASN1EncoderSetStreaming, 
 //GO(SEC_ASN1EncoderSetTakeFromBuf, 
 //GO(SEC_ASN1EncoderStart, 
-//GO(SEC_ASN1EncoderUpdate, 
-//GO(SEC_ASN1EncodeUnsignedInteger, 
-//GO(SEC_ASN1LengthLength, 
+GO(SEC_ASN1EncoderUpdate, iFppL)
+GO(SEC_ASN1EncodeUnsignedInteger, pFppL)
+GO(SEC_ASN1LengthLength, iFL)
 DATA(SEC_BitStringTemplate, 4*sizeof(void*)) //R type
 DATA(SEC_BMPStringTemplate, 4*sizeof(void*)) //R type
 //DATA(SEC_BooleanTemplate,     //R type
 GO(SEC_CertNicknameConflict, iFppp)
-//GO(SEC_CheckCrlTimes, 
-//GO(SEC_CreateSignatureAlgorithmParameters, 
+GO(SEC_CheckCrlTimes, uFpl)
+GO(SEC_CreateSignatureAlgorithmParameters, pFppuupp)
 GO(SEC_DeletePermCertificate, iFp)
 //GO(SEC_DeletePermCRL, 
-GO(SEC_DerSignData, iFpppipi)
-//GO(SEC_DerSignDataWithAlgorithmID, 
-//GO(SEC_DestroyCrl, 
-//GO(SEC_DupCrl, 
-//GO(SEC_FindCrlByDERCert, 
+GO(SEC_DerSignData, iFpppipu)
+GO(SEC_DerSignDataWithAlgorithmID, iFpppipp)
+GO(SEC_DestroyCrl, iFp)
+GO(SEC_DupCrl, pFp)
+GO(SEC_FindCrlByDERCert, pFppi)
 //GO(SEC_FindCrlByName, 
 //DATA(SEC_GeneralizedTimeTemplate,     //R type
-//GO(SEC_GetCrlTimes, 
+GO(SEC_GetCrlTimes, iFppp)
 //GO(SEC_GetRegisteredHttpClient, 
-//GO(SEC_GetSignatureAlgorithmOidTag, 
+GO(SEC_GetSignatureAlgorithmOidTag, uFuu)
 DATA(SEC_IA5StringTemplate, 4*sizeof(void*)) //R type
 //DATA(SEC_IntegerTemplate,     //R type
 GO(SECITEM_AllocItem, pFppu)
-//GO(SECITEM_ArenaDupItem, 
+GO(SECITEM_ArenaDupItem, pFpp)
 GO(SECITEM_CompareItem, iFpp)
-//GO(SECITEM_CopyItem, 
+GO(SECITEM_CopyItem, iFppp)
 //GO(SECITEM_DupItem, 
 GO(SECITEM_FreeItem, iFpi)
 GO(SECITEM_ItemsAreEqual, iFpp)
 GO(SECITEM_ZfreeItem, vFpi)
-//GO(SECKEY_AddPrivateKeyToListTail, 
-//GO(SECKEY_BigIntegerBitLength, 
-//GO(SECKEY_CacheStaticFlags, 
-//GO(SECKEY_ConvertToPublicKey, 
-//GO(SECKEY_CopyEncryptedPrivateKeyInfo, 
-//GO(SECKEY_CopyPrivateKey, 
-//GO(SECKEY_CopyPrivateKeyInfo, 
-//GO(SECKEY_CopyPublicKey, 
-//GO(SECKEY_CopySubjectPublicKeyInfo, 
-//GO(SECKEY_CreateDHPrivateKey, 
-//GO(SECKEY_CreateECPrivateKey, 
-//GO(SECKEY_CreateRSAPrivateKey, 
+GO(SECKEY_AddPrivateKeyToListTail, iFpp)
+GO(SECKEY_BigIntegerBitLength, uFp)
+GO(SECKEY_CacheStaticFlags, iFp)
+GO(SECKEY_ConvertToPublicKey, pFp)
+GO(SECKEY_CopyEncryptedPrivateKeyInfo, iFppp)
+GO(SECKEY_CopyPrivateKey, pFp)
+GO(SECKEY_CopyPrivateKeyInfo, iFppp)
+GO(SECKEY_CopyPublicKey, pFp)
+GO(SECKEY_CopySubjectPublicKeyInfo, iFppp)
+GO(SECKEY_CreateDHPrivateKey, pFppp)
+GO(SECKEY_CreateECPrivateKey, pFppp)
+GO(SECKEY_CreateRSAPrivateKey, pFipp)
 GO(SECKEY_CreateSubjectPublicKeyInfo, pFp)
-//GO(SECKEY_DecodeDERSubjectPublicKeyInfo, 
-//GO(SECKEY_DestroyEncryptedPrivateKeyInfo, 
+GO(SECKEY_DecodeDERSubjectPublicKeyInfo, pFp)
+GO(SECKEY_DestroyEncryptedPrivateKeyInfo, vFpi)
 GO(SECKEY_DestroyPrivateKey, vFp)
-//GO(SECKEY_DestroyPrivateKeyInfo, 
-//GO(SECKEY_DestroyPrivateKeyList, 
+GO(SECKEY_DestroyPrivateKeyInfo, vFpi)
+GO(SECKEY_DestroyPrivateKeyList, vFp)
 GO(SECKEY_DestroyPublicKey, vFp)
-//GO(SECKEY_DestroyPublicKeyList, 
+GO(SECKEY_DestroyPublicKeyList, vFp)
 GO(SECKEY_DestroySubjectPublicKeyInfo, vFp)
 //DATA(SECKEY_DSAPublicKeyTemplate,     //R type
-//GO(SECKEY_ECParamsToBasePointOrderLen, 
+GO(SECKEY_ECParamsToBasePointOrderLen, iFp)
 //GO(SECKEY_ECParamsToKeySize, 
-//GO(SECKEY_EncodeDERSubjectPublicKeyInfo, 
+GO(SECKEY_EncodeDERSubjectPublicKeyInfo, pFp)
 DATA(SECKEY_EncryptedPrivateKeyInfoTemplate, 128)
 GO(SECKEY_ExtractPublicKey, pFp)
-GO(SECKEY_GetPrivateKeyType, iFp)
-//GO(SECKEY_GetPublicKeyType, 
+GO(SECKEY_GetPrivateKeyType, uFp)
+GO(SECKEY_GetPublicKeyType, uFp)
 //GO(SECKEY_HashPassword, 
-//GO(SECKEY_ImportDERPublicKey, 
-//GO(SECKEY_NewPrivateKeyList, 
+GO(SECKEY_ImportDERPublicKey, pFpL)
+GO(SECKEY_NewPrivateKeyList, pFv)
 //DATA(SECKEY_PointerToEncryptedPrivateKeyInfoTemplate, 
 //DATA(SECKEY_PointerToPrivateKeyInfoTemplate, 
 DATA(SECKEY_PrivateKeyInfoTemplate, 192)
 //GO(SECKEY_PublicKeyStrength, 
 GO(SECKEY_PublicKeyStrengthInBits, uFp)
-//GO(SECKEY_RemovePrivateKeyListNode, 
+GO(SECKEY_RemovePrivateKeyListNode, vFp)
 //DATA(SECKEY_RSAPSSParamsTemplate, 
 //DATA(SECKEY_RSAPublicKeyTemplate,     //R type
-//GO(SECKEY_SignatureLen, 
-//GO(SECKEY_UpdateCertPQG, 
-//GO(SEC_LookupCrls, 
-//GO(SECMOD_AddNewModule, 
-//GO(SECMOD_AddNewModuleEx, 
+GO(SECKEY_SignatureLen, uFp)
+GO(SECKEY_UpdateCertPQG, iFp)
+GO(SEC_LookupCrls, iFppi)
+GO(SECMOD_AddNewModule, iFppLL)
+GO(SECMOD_AddNewModuleEx, iFppLLpp)
 //GO(SECMOD_CancelWait, 
-//GO(SECMOD_CanDeleteInternalModule, 
+GO(SECMOD_CanDeleteInternalModule, iFv)
 //GO(SECMOD_CloseUserDB, 
 //GO(SECMOD_CreateModule, 
 //GO(SECMOD_CreateModuleEx, 
 //GO(SECMOD_DeleteInternalModule, 
-//GO(SECMOD_DeleteModule, 
+GO(SECMOD_DeleteModule, iFpp)
 //GO(SECMOD_DeleteModuleEx, 
 GO(SECMOD_DestroyModule, vFp)
 //GO(SECMOD_FindModule, 
 //GO(SECMOD_FindSlot, 
 //GO(SECMOD_FreeModuleSpecList, 
-//GO(SECMOD_GetDBModuleList, 
+GO(SECMOD_GetDBModuleList, pFv)
 //GO(SECMOD_GetDeadModuleList, 
 //GO(SECMOD_GetDefaultModDBFlag, 
 GO(SECMOD_GetDefaultModuleList, pFv)
@@ -787,13 +787,13 @@ GO(SECMOD_GetReadLock, vFp)
 //GO(SECMOD_HasRemovableSlots, 
 //GO(SECMOD_HasRootCerts, 
 //GO(SECMOD_InternaltoPubMechFlags, 
-//GO(SECMOD_IsModulePresent, 
+GO(SECMOD_IsModulePresent, iFL)
 //GO(SECMOD_LoadModule, 
 GO(SECMOD_LoadUserModule, pFppi)
-//GO(SECMOD_LookupSlot, 
+GO(SECMOD_LookupSlot, pFLL)
 //GO(SECMOD_OpenNewSlot, 
 GO(SECMOD_OpenUserDB, pFp)
-//GO(SECMOD_PubCipherFlagstoInternal, 
+GO(SECMOD_PubCipherFlagstoInternal, LFL)
 //GO(SECMOD_PubMechFlagstoInternal, 
 //GO(SECMOD_ReferenceModule, 
 GO(SECMOD_ReleaseReadLock, vFp)
@@ -802,60 +802,60 @@ GO(SECMOD_ReleaseReadLock, vFp)
 //GO(SECMOD_UpdateModule, 
 //GO(SECMOD_UpdateSlotList, 
 //GO(SECMOD_WaitForAnyTokenEvent, 
-//GO(SEC_NewCrl, 
+GO(SEC_NewCrl, pFpppi)
 //DATA(SEC_NullTemplate,    //R type
 //DATA(SEC_ObjectIDTemplate,    //R type
 DATA(SEC_OctetStringTemplate, 4*sizeof(void*))   //R type
-GO(SECOID_AddEntry, iFp)
+GO(SECOID_AddEntry, uFp)
 DATA(SECOID_AlgorithmIDTemplate, 16*sizeof(void*))   //R type
-//GO(SECOID_CompareAlgorithmID, 
-//GO(SECOID_CopyAlgorithmID, 
-//GO(SECOID_DestroyAlgorithmID, 
-//GO(SECOID_FindOID, 
-//GO(SECOID_FindOIDByTag, 
-GO(SECOID_FindOIDTag, iFp)
-//GO(SECOID_FindOIDTagDescription, 
-//GO(SECOID_GetAlgorithmTag, 
-//GO(SECOID_SetAlgorithmID, 
-//GO(SEC_PKCS5GetCryptoAlgorithm, 
-//GO(SEC_PKCS5GetIV, 
-//GO(SEC_PKCS5GetKeyLength, 
-//GO(SEC_PKCS5GetPBEAlgorithm, 
-//GO(SEC_PKCS5IsAlgorithmPBEAlg, 
-//GO(SEC_PKCS5IsAlgorithmPBEAlgTag, 
+GO(SECOID_CompareAlgorithmID, iFpp)
+GO(SECOID_CopyAlgorithmID, iFppp)
+GO(SECOID_DestroyAlgorithmID, vFpi)
+GO(SECOID_FindOID, pFp)
+GO(SECOID_FindOIDByTag, pFu)
+GO(SECOID_FindOIDTag, uFp)
+GO(SECOID_FindOIDTagDescription, pFu)
+GO(SECOID_GetAlgorithmTag, uFp)
+GO(SECOID_SetAlgorithmID, iFppup)
+GO(SEC_PKCS5GetCryptoAlgorithm, uFp)
+GO(SEC_PKCS5GetIV, pFppi)
+GO(SEC_PKCS5GetKeyLength, iFp)
+GO(SEC_PKCS5GetPBEAlgorithm, uFui)
+GO(SEC_PKCS5IsAlgorithmPBEAlg, iFp)
+GO(SEC_PKCS5IsAlgorithmPBEAlgTag, iFu)
 //DATA(SEC_PointerToAnyTemplate, 
 //DATA(SEC_PointerToOctetStringTemplate, 
 GO(SEC_QuickDERDecodeItem, iFpppp)
 GO(SEC_RegisterDefaultHttpClient, iFp)
 //DATA(SEC_SetOfAnyTemplate, 
-//GO(SEC_SignData, 
-//GO(SEC_SignDataWithAlgorithmID, 
+GO(SEC_SignData, iFppipu)
+GO(SEC_SignDataWithAlgorithmID, iFppipp)
 //DATA(SEC_SignedCertificateTemplate, 
 //DATA(SEC_UTCTimeTemplate,     //R type
 DATA(SEC_UTF8StringTemplate, 4*sizeof(void*))    //R type
-//GO(SGN_Begin, 
-//GO(SGN_CompareDigestInfo, 
-//GO(SGN_CopyDigestInfo, 
-//GO(SGN_CreateDigestInfo, 
-//GO(SGN_DestroyContext, 
-//GO(SGN_DestroyDigestInfo, 
-//GO(SGN_Digest, 
+GO(SGN_Begin, iFp)
+GO(SGN_CompareDigestInfo, iFpp)
+GO(SGN_CopyDigestInfo, iFppp)
+GO(SGN_CreateDigestInfo, pFupu)
+GO(SGN_DestroyContext, vFpi)
+GO(SGN_DestroyDigestInfo, vFp)
+GO(SGN_Digest, iFpupp)
 //DATA(sgn_DigestInfoTemplate, 
-//GO(SGN_End, 
-//GO(SGN_NewContext, 
-//GO(SGN_NewContextWithAlgorithmID, 
-//GO(SGN_Update, 
+GO(SGN_End, iFpp)
+GO(SGN_NewContext, pFup)
+GO(SGN_NewContextWithAlgorithmID, pFpp)
+GO(SGN_Update, iFppu)
 //GO(VFY_Begin, 
-//GO(VFY_CreateContext, 
-//GO(VFY_CreateContextDirect, 
-//GO(VFY_CreateContextWithAlgorithmID, 
-//GO(VFY_DestroyContext, 
-//GO(VFY_End, 
-//GO(VFY_EndWithSignature, 
-//GO(VFY_Update, 
-//GO(VFY_VerifyData, 
-//GO(VFY_VerifyDataDirect, 
-//GO(VFY_VerifyDataWithAlgorithmID, 
-//GO(VFY_VerifyDigest, 
-//GO(VFY_VerifyDigestDirect, 
-//GO(VFY_VerifyDigestWithAlgorithmID, 
+GO(VFY_CreateContext, pFppup)
+GO(VFY_CreateContextDirect, pFppuupp)
+GO(VFY_CreateContextWithAlgorithmID, pFppppp)
+GO(VFY_DestroyContext, vFpi)
+GO(VFY_End, iFp)
+GO(VFY_EndWithSignature, iFpp)
+GO(VFY_Update, iFppu)
+GO(VFY_VerifyData, iFpippup)
+GO(VFY_VerifyDataDirect, iFpippuupp)
+GO(VFY_VerifyDataWithAlgorithmID, iFpippppp)
+GO(VFY_VerifyDigest, iFpppup)
+GO(VFY_VerifyDigestDirect, iFpppuup)
+GO(VFY_VerifyDigestWithAlgorithmID, iFppppup)
diff --git a/src/wrapped/wrappedopenal.c b/src/wrapped/wrappedopenal.c
index 96cc1bb6..01b8c8e2 100644
--- a/src/wrapped/wrappedopenal.c
+++ b/src/wrapped/wrappedopenal.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_Request_fct_##A = 0;                    \
 static void my_Request_##A(int32_t a, int32_t b)            \
 {                                                           \
-    RunFunction(my_context, my_Request_fct_##A, 2, a, b);   \
+    RunFunctionFmt(my_Request_fct_##A, "ii", a, b);   \
 }
 SUPER()
 #undef GO
@@ -113,7 +113,7 @@ void freeALProcWrapper(box64context_t* context)
     context->almymap = NULL;
 }
 
-EXPORT void* my_alGetProcAddress(x64emu_t* emu, void* name) 
+EXPORT void* my_alGetProcAddress(x64emu_t* emu, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
@@ -130,7 +130,7 @@ EXPORT void* my_alGetProcAddress(x64emu_t* emu, void* name)
         strcpy(tmp, "my_");
         strcat(tmp, rname);
         symbol = dlsym(emu->context->box64lib, tmp);
-    } else 
+    } else
         symbol = my->alGetProcAddress(name);
     if(!symbol)
         return NULL;    // easy
@@ -138,7 +138,7 @@ EXPORT void* my_alGetProcAddress(x64emu_t* emu, void* name)
     uintptr_t ret = CheckBridged(emu->context->system, symbol);
     if(ret)
         return (void*)ret; // already bridged
-    // get wrapper    
+    // get wrapper
     k = kh_get(symbolmap, emu->context->alwrappers, rname);
     if(k==kh_end(emu->context->alwrappers)) {
         printf_log(LOG_INFO, "Warning, no wrapper for %s\n", rname);
@@ -166,14 +166,14 @@ EXPORT void* my_alcGetProcAddress(x64emu_t* emu, void* device, void* name)
         strcpy(tmp, "my_");
         strcat(tmp, rname);
         symbol = dlsym(emu->context->box64lib, tmp);
-    } else 
+    } else
         symbol = my->alcGetProcAddress(device, name);
     if(!symbol)
         return NULL;    // easy
     uintptr_t ret = CheckBridged(emu->context->system, symbol);
     if(ret)
         return (void*)ret; // already bridged
-    // get wrapper    
+    // get wrapper
     k = kh_get(symbolmap, emu->context->alwrappers, rname);
     if(k==kh_end(emu->context->alwrappers)) {
         printf_log(LOG_INFO, "Warning, no wrapper for %s\n", rname);
diff --git a/src/wrapped/wrappedpango.c b/src/wrapped/wrappedpango.c
index dc0ccf41..438ab7d7 100644
--- a/src/wrapped/wrappedpango.c
+++ b/src/wrapped/wrappedpango.c
@@ -46,17 +46,17 @@ static my_PangoAttrClass_t my_PangoAttrClass_struct_##A = {0};  \
 static uintptr_t my_PangoAttrClass_copy_##A = 0;                \
 static void* my_PangoAttrClass_copyfct##A(void* attr)           \
 {                                                               \
-    return (void*)RunFunction(my_context, my_PangoAttrClass_copy_##A, 1, attr);  \
+    return (void*)RunFunctionFmt(my_PangoAttrClass_copy_##A, "p", attr);  \
 }                                                               \
 static uintptr_t my_PangoAttrClass_del_##A = 0;                 \
 static void my_PangoAttrClass_delfct##A(void* attr)             \
 {                                                               \
-    RunFunction(my_context, my_PangoAttrClass_del_##A, 1, attr);\
+    RunFunctionFmt(my_PangoAttrClass_del_##A, "p", attr);\
 }                                                               \
 static uintptr_t my_PangoAttrClass_equal_##A = 0;               \
 static int my_PangoAttrClass_equalfct##A(void* a, void* b)      \
 {                                                               \
-    return (int)RunFunction(my_context, my_PangoAttrClass_equal_##A, 2, a, b);\
+    return (int)RunFunctionFmt(my_PangoAttrClass_equal_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedpng16.c b/src/wrapped/wrappedpng16.c
index 22bb9e5a..290162b9 100644
--- a/src/wrapped/wrappedpng16.c
+++ b/src/wrapped/wrappedpng16.c
@@ -41,7 +41,7 @@ GO(3)
 static uintptr_t my_user_write_fct_##A = 0;   \
 static void my_user_write_##A(void* png_ptr, void* data, int32_t length)    \
 {                                       \
-    RunFunction(my_context, my_user_write_fct_##A, 3, png_ptr, data, length);\
+    RunFunctionFmt(my_user_write_fct_##A, "ppi", png_ptr, data, length);\
 }
 SUPER()
 #undef GO
@@ -63,7 +63,7 @@ static void* finduser_writeFct(void* fct)
 static uintptr_t my_user_flush_fct_##A = 0;   \
 static void my_user_flush_##A(void* png_ptr)    \
 {                                       \
-    RunFunction(my_context, my_user_flush_fct_##A, 1, png_ptr);\
+    RunFunctionFmt(my_user_flush_fct_##A, "p", png_ptr);\
 }
 SUPER()
 #undef GO
@@ -85,7 +85,7 @@ static void* finduser_flushFct(void* fct)
 static uintptr_t my_user_read_fct_##A = 0;   \
 static void my_user_read_##A(void* png_ptr, void* data, int32_t length)    \
 {                                       \
-    RunFunction(my_context, my_user_read_fct_##A, 3, png_ptr, data, length);\
+    RunFunctionFmt(my_user_read_fct_##A, "ppi", png_ptr, data, length);\
 }
 SUPER()
 #undef GO
@@ -107,7 +107,7 @@ static void* finduser_readFct(void* fct)
 static uintptr_t my_error_fct_##A = 0;   \
 static void my_error_##A(void* a, void* b)    \
 {                                       \
-    RunFunction(my_context, my_error_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_error_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -129,7 +129,7 @@ static void* finderrorFct(void* fct)
 static uintptr_t my_warning_fct_##A = 0;   \
 static void my_warning_##A(void* a, void* b)    \
 {                                       \
-    RunFunction(my_context, my_warning_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_warning_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -151,7 +151,7 @@ static void* findwarningFct(void* fct)
 static uintptr_t my_malloc_fct_##A = 0;   \
 static void my_malloc_##A(void* a, unsigned long b)    \
 {                                       \
-    RunFunction(my_context, my_malloc_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_malloc_fct_##A, "pL", a, b);\
 }
 SUPER()
 #undef GO
@@ -173,7 +173,7 @@ static void* findmallocFct(void* fct)
 static uintptr_t my_free_fct_##A = 0;   \
 static void my_free_##A(void* a, void* b)    \
 {                                       \
-    RunFunction(my_context, my_free_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_free_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -196,7 +196,7 @@ static void* findfreeFct(void* fct)
 static uintptr_t my_progressive_info_fct_##A = 0;   \
 static void my_progressive_info_##A(void* a, void* b)    \
 {                                       \
-    RunFunction(my_context, my_progressive_info_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_progressive_info_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -219,7 +219,7 @@ static void* findprogressive_infoFct(void* fct)
 static uintptr_t my_progressive_end_fct_##A = 0;   \
 static void my_progressive_end_##A(void* a, void* b)    \
 {                                       \
-    RunFunction(my_context, my_progressive_end_fct_##A, 2, a, b);\
+    RunFunctionFmt(my_progressive_end_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -242,7 +242,7 @@ static void* findprogressive_endFct(void* fct)
 static uintptr_t my_progressive_row_fct_##A = 0;   \
 static void my_progressive_row_##A(void* a, void* b, uint32_t c, int d)    \
 {                                       \
-    RunFunction(my_context, my_progressive_row_fct_##A, 4, a, b, c, d);\
+    RunFunctionFmt(my_progressive_row_fct_##A, "ppui", a, b, c, d);\
 }
 SUPER()
 #undef GO
@@ -266,7 +266,7 @@ static void* findprogressive_rowFct(void* fct)
 static uintptr_t my_user_transform_fct_##A = 0;   \
 static void my_user_transform_##A(void* ptr, void* row, void* data)    \
 {                                       \
-    RunFunction(my_context, my_user_transform_fct_##A, 3, ptr, row, data);\
+    RunFunctionFmt(my_user_transform_fct_##A, "ppp", ptr, row, data);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedpng16_private.h b/src/wrapped/wrappedpng16_private.h
index 3a7e4d54..0891d459 100644
--- a/src/wrapped/wrappedpng16_private.h
+++ b/src/wrapped/wrappedpng16_private.h
@@ -87,6 +87,7 @@ GO(png_set_cHRM, vFppdddddddd)
 GO(png_permit_mng_features, uFpu)
 GO(png_set_keep_unknown_chunks, vFpipi)
 GO(png_set_oFFs, vFppiii)
+GO(png_set_option, iFpii)
 GO(png_get_libpng_ver, pFp)
 GO(png_get_text, uFpppp)
 GO(png_set_sBIT, vFppp)
diff --git a/src/wrapped/wrappedpulse.c b/src/wrapped/wrappedpulse.c
index 02233aa0..f5ec5d43 100644
--- a/src/wrapped/wrappedpulse.c
+++ b/src/wrapped/wrappedpulse.c
@@ -49,7 +49,7 @@ typedef void (*vFipippV_t)(int, void*, int, void*, void*, va_list);
 #else
 typedef void (*vFipippV_t)(int, void*, int, void*, void*, void*);
 #endif
-    GO(pa_log_level_meta, vFipippV_t)           
+    GO(pa_log_level_meta, vFipippV_t)
 #endif
 
 #define ADDED_FUNCTIONS() \
@@ -91,7 +91,7 @@ GO(15)  \
 static uintptr_t my_free_fct_##A = 0;   \
 static void my_free_##A(void* data)     \
 {                                       \
-    RunFunction(my_context, my_free_fct_##A, 1, data);\
+    RunFunctionFmt(my_free_fct_##A, "p", data);\
 }
 SUPER()
 #undef GO
@@ -113,7 +113,7 @@ static void* findFreeFct(void* fct)
 static uintptr_t my_free_api_fct_##A = 0;   \
 static void my_free_api_##A(my_pa_mainloop_api_t* api, void* p, void* data)     \
 {                                       \
-    RunFunction(my_context, my_free_api_fct_##A, 3, api, p, data);\
+    RunFunctionFmt(my_free_api_fct_##A, "ppp", api, p, data);\
 }
 SUPER()
 #undef GO
@@ -136,7 +136,7 @@ static uintptr_t my_io_event_fct_##A = 0;   \
 static void my_io_event_##A(my_pa_mainloop_api_t* api, void* e, int fd, int events, void* data)     \
 {                                       \
     if(api==my_mainloop_orig) api=my_mainloop_ref;                  \
-    RunFunction(my_context, my_io_event_fct_##A, 5, api, e, fd, events, data);  \
+    RunFunctionFmt(my_io_event_fct_##A, "ppiip", api, e, fd, events, data);  \
 }
 SUPER()
 #undef GO
@@ -159,7 +159,7 @@ static uintptr_t my_time_event_fct_##A = 0;   \
 static void my_time_event_##A(my_pa_mainloop_api_t* api, void* e, void* tv, void* data)     \
 {                                       \
     if(api==my_mainloop_orig) api=my_mainloop_ref;                  \
-    RunFunction(my_context, my_time_event_fct_##A, 4, api, e, tv, data);  \
+    RunFunctionFmt(my_time_event_fct_##A, "pppp", api, e, tv, data);  \
 }
 SUPER()
 #undef GO
@@ -183,7 +183,7 @@ static uintptr_t my_defer_event_fct_##A = 0;   \
 static void my_defer_event_##A(my_pa_mainloop_api_t* api, void* e, void* data)     \
 {                                       \
     if(api==my_mainloop_orig) api=my_mainloop_ref;                  \
-    RunFunction(my_context, my_defer_event_fct_##A, 3, api, e, data);  \
+    RunFunctionFmt(my_defer_event_fct_##A, "ppp", api, e, data);  \
 }
 SUPER()
 #undef GO
@@ -206,7 +206,7 @@ static void* findDeferEventFct(void* fct)
 static uintptr_t my_poll_fct_##A = 0;   \
 static int my_poll_##A(void* ufds, unsigned long nfds, int timeout, void* data)         \
 {                                       \
-    return (int)RunFunction(my_context, my_poll_fct_##A, 4, ufds, nfds, timeout, data); \
+    return (int)RunFunctionFmt(my_poll_fct_##A, "pLip", ufds, nfds, timeout, data); \
 }
 SUPER()
 #undef GO
@@ -229,7 +229,7 @@ static uintptr_t my_signal_fct_##A = 0;   \
 static void my_signal_##A(my_pa_mainloop_api_t* api, void* e, int sig, void *data)  \
 {                                                                                   \
     if(api==my_mainloop_orig) api=my_mainloop_ref;                                  \
-    RunFunction(my_context, my_signal_fct_##A, 4, api, e, sig, data);               \
+    RunFunctionFmt(my_signal_fct_##A, "ppip", api, e, sig, data);               \
 }
 SUPER()
 #undef GO
@@ -252,7 +252,7 @@ static uintptr_t my_signal_destroy_fct_##A = 0;   \
 static void my_signal_destroy_##A(my_pa_mainloop_api_t* api, void* e, void *data)   \
 {                                                                                   \
     if(api==my_mainloop_orig) api=my_mainloop_ref;                                  \
-    RunFunction(my_context, my_signal_destroy_fct_##A, 3, api, e, data);            \
+    RunFunctionFmt(my_signal_destroy_fct_##A, "ppp", api, e, data);            \
 }
 SUPER()
 #undef GO
@@ -275,7 +275,7 @@ static void* find_signal_destroy_Fct(void* fct)
 static uintptr_t my_prefork_fct_##A = 0;            \
 static void my_prefork_##A()                        \
 {                                                   \
-    RunFunction(my_context, my_prefork_fct_##A, 0); \
+    RunFunctionFmt(my_prefork_fct_##A, ""); \
 }
 SUPER()
 #undef GO
@@ -297,7 +297,7 @@ static void* find_prefork_Fct(void* fct)
 static uintptr_t my_postfork_fct_##A = 0;           \
 static void my_postfork_##A()                       \
 {                                                   \
-    RunFunction(my_context, my_postfork_fct_##A, 0);\
+    RunFunctionFmt(my_postfork_fct_##A, "");\
 }
 SUPER()
 #undef GO
@@ -319,7 +319,7 @@ static void* find_postfork_Fct(void* fct)
 static uintptr_t my_atfork_fct_##A = 0;             \
 static void my_atfork_##A()                         \
 {                                                   \
-    RunFunction(my_context, my_atfork_fct_##A, 0);  \
+    RunFunctionFmt(my_atfork_fct_##A, "");  \
 }
 SUPER()
 #undef GO
@@ -342,7 +342,7 @@ static void* find_atfork_Fct(void* fct)
 static uintptr_t my_state_context_fct_##A = 0;                              \
 static void my_state_context_##A(void* context, void* data)                 \
 {                                                                           \
-    RunFunction(my_context, my_state_context_fct_##A, 2, context, data);    \
+    RunFunctionFmt(my_state_context_fct_##A, "pp", context, data);    \
 }
 SUPER()
 #undef GO
@@ -364,7 +364,7 @@ static void* find_state_context_Fct(void* fct)
 static uintptr_t my_notify_context_fct_##A = 0;                             \
 static void my_notify_context_##A(void* context, void* data)                \
 {                                                                           \
-    RunFunction(my_context, my_notify_context_fct_##A, 2, context, data);   \
+    RunFunctionFmt(my_notify_context_fct_##A, "pp", context, data);   \
 }
 SUPER()
 #undef GO
@@ -386,7 +386,7 @@ static void* find_notify_context_Fct(void* fct)
 static uintptr_t my_success_context_fct_##A = 0;                                    \
 static void my_success_context_##A(void* context, int success, void* data)          \
 {                                                                                   \
-    RunFunction(my_context, my_success_context_fct_##A, 3, context, success, data); \
+    RunFunctionFmt(my_success_context_fct_##A, "pip", context, success, data); \
 }
 SUPER()
 #undef GO
@@ -408,7 +408,7 @@ static void* find_success_context_Fct(void* fct)
 static uintptr_t my_event_context_fct_##A = 0;                                      \
 static void my_event_context_##A(void* context, void* name, void* p, void* data)    \
 {                                                                                   \
-    RunFunction(my_context, my_event_context_fct_##A, 4, context, name, p, data);   \
+    RunFunctionFmt(my_event_context_fct_##A, "pppp", context, name, p, data);   \
 }
 SUPER()
 #undef GO
@@ -430,7 +430,7 @@ static void* find_event_context_Fct(void* fct)
 static uintptr_t my_module_info_fct_##A = 0;                                    \
 static void my_module_info_##A(void* context, void* i, int eol, void* data)     \
 {                                                                               \
-    RunFunction(my_context, my_module_info_fct_##A, 4, context, i, eol, data);  \
+    RunFunctionFmt(my_module_info_fct_##A, "ppip", context, i, eol, data);  \
 }
 SUPER()
 #undef GO
@@ -452,7 +452,7 @@ static void* find_module_info_Fct(void* fct)
 static uintptr_t my_server_info_fct_##A = 0;                                \
 static void my_server_info_##A(void* context, void* i, void* data)          \
 {                                                                           \
-    RunFunction(my_context, my_server_info_fct_##A, 3, context, i, data);   \
+    RunFunctionFmt(my_server_info_fct_##A, "ppp", context, i, data);   \
 }
 SUPER()
 #undef GO
@@ -474,7 +474,7 @@ static void* find_server_info_Fct(void* fct)
 static uintptr_t my_client_info_fct_##A = 0;                                    \
 static void my_client_info_##A(void* context, void* i, int eol, void* data)     \
 {                                                                               \
-    RunFunction(my_context, my_client_info_fct_##A, 4, context, i, eol, data);  \
+    RunFunctionFmt(my_client_info_fct_##A, "ppip", context, i, eol, data);  \
 }
 SUPER()
 #undef GO
@@ -496,7 +496,7 @@ static void* find_client_info_Fct(void* fct)
 static uintptr_t my_context_index_fct_##A = 0;                                  \
 static void my_context_index_##A(void* context, uint32_t idx, void* data)       \
 {                                                                               \
-    RunFunction(my_context, my_context_index_fct_##A, 3, context, idx, data);   \
+    RunFunctionFmt(my_context_index_fct_##A, "pup", context, idx, data);   \
 }
 SUPER()
 #undef GO
@@ -518,7 +518,7 @@ static void* find_context_index_Fct(void* fct)
 static uintptr_t my_subscribe_context_fct_##A = 0;                                      \
 static void my_subscribe_context_##A(void* context, int evt, uint32_t idx, void* data)  \
 {                                                                                       \
-    RunFunction(my_context, my_subscribe_context_fct_##A, 4, context, evt, idx, data);  \
+    RunFunctionFmt(my_subscribe_context_fct_##A, "piup", context, evt, idx, data);  \
 }
 SUPER()
 #undef GO
@@ -541,7 +541,7 @@ static void* find_subscribe_context_Fct(void* fct)
 static uintptr_t my_stream_state_fct_##A = 0;                       \
 static void my_stream_state_##A(void* s, void* data)                \
 {                                                                   \
-    RunFunction(my_context, my_stream_state_fct_##A, 2, s, data);   \
+    RunFunctionFmt(my_stream_state_fct_##A, "pp", s, data);   \
 }
 SUPER()
 #undef GO
@@ -563,7 +563,7 @@ static void* find_stream_state_Fct(void* fct)
 static uintptr_t my_stream_success_fct_##A = 0;                                 \
 static void my_stream_success_##A(void* s, int success, void* data)             \
 {                                                                               \
-    RunFunction(my_context, my_stream_success_fct_##A, 3, s, success, data);    \
+    RunFunctionFmt(my_stream_success_fct_##A, "pip", s, success, data);    \
 }
 SUPER()
 #undef GO
@@ -585,7 +585,7 @@ static void* find_stream_success_Fct(void* fct)
 static uintptr_t my_stream_notify_fct_##A = 0;                      \
 static void my_stream_notify_##A(void* s, void* data)               \
 {                                                                   \
-    RunFunction(my_context, my_stream_notify_fct_##A, 2, s, data);  \
+    RunFunctionFmt(my_stream_notify_fct_##A, "pp", s, data);  \
 }
 SUPER()
 #undef GO
@@ -607,7 +607,7 @@ static void* find_stream_notify_Fct(void* fct)
 static uintptr_t my_stream_event_fct_##A = 0;                               \
 static void my_stream_event_##A(void* s, void* name, void* pl, void* data)  \
 {                                                                           \
-    RunFunction(my_context, my_stream_event_fct_##A, 4, s, name, pl, data); \
+    RunFunctionFmt(my_stream_event_fct_##A, "pppp", s, name, pl, data); \
 }
 SUPER()
 #undef GO
@@ -629,7 +629,7 @@ static void* find_stream_event_Fct(void* fct)
 static uintptr_t my_stream_request_fct_##A = 0;                             \
 static void my_stream_request_##A(void* s, size_t nbytes, void* data)       \
 {                                                                           \
-    RunFunction(my_context, my_stream_request_fct_##A, 3, s, nbytes, data); \
+    RunFunctionFmt(my_stream_request_fct_##A, "pLp", s, nbytes, data); \
 }
 SUPER()
 #undef GO
@@ -651,7 +651,7 @@ static void* find_stream_request_Fct(void* fct)
 static uintptr_t my_device_restore_read_device_formats_fct_##A = 0;                         \
 static void my_device_restore_read_device_formats_##A(void* a, void* b, int c, void* d)     \
 {                                                                                           \
-    RunFunction(my_context, my_device_restore_read_device_formats_fct_##A, 4, a, b, c, d);  \
+    RunFunctionFmt(my_device_restore_read_device_formats_fct_##A, "ppip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -673,7 +673,7 @@ static void* find_device_restore_read_device_formats_Fct(void* fct)
 static uintptr_t my_card_info_fct_##A = 0;                         \
 static void my_card_info_##A(void* a, void* b, int c, void* d)     \
 {                                                                  \
-    RunFunction(my_context, my_card_info_fct_##A, 4, a, b, c, d);  \
+    RunFunctionFmt(my_card_info_fct_##A, "ppip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -695,7 +695,7 @@ static void* find_card_info_Fct(void* fct)
 static uintptr_t my_source_output_info_fct_##A = 0;                         \
 static void my_source_output_info_##A(void* a, void* b, int c, void* d)     \
 {                                                                  \
-    RunFunction(my_context, my_source_output_info_fct_##A, 4, a, b, c, d);  \
+    RunFunctionFmt(my_source_output_info_fct_##A, "ppip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -717,7 +717,7 @@ static void* find_source_output_info_Fct(void* fct)
 static uintptr_t my_device_restore_subscribe_fct_##A = 0;                           \
 static void my_device_restore_subscribe_##A(void* a, int b, uint32_t c, void* d)    \
 {                                                                                   \
-    RunFunction(my_context, my_device_restore_subscribe_fct_##A, 4, a, b, c, d);    \
+    RunFunctionFmt(my_device_restore_subscribe_fct_##A, "piup", a, b, c, d);    \
 }
 SUPER()
 #undef GO
@@ -830,7 +830,7 @@ static void* my_io_new(void* api, int fd, int events, void* cb, void *userdata)
     if(cb)
         b = AddCheckBridge(bridge, vFppiip, cb, 0, NULL);
     if(api==my_mainloop_orig) api=my_mainloop_ref;    // need emulated version
-    return (void*)RunFunction(my_context, (uintptr_t)my_mainloop_ref->io_new, 5, api, fd, events, b, userdata);
+    return (void*)RunFunctionFmt((uintptr_t)my_mainloop_ref->io_new, "piipp", api, fd, events, b, userdata);
 }
 static void my_io_enable(void* e, int events)
 {
@@ -839,7 +839,7 @@ static void my_io_enable(void* e, int events)
     if(fnc)
         return ((vFpi_t)fnc)(e, events);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->io_enable, 2, e, events);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->io_enable, "pi", e, events);
 }
 static void my_io_free(void* e)
 {
@@ -848,7 +848,7 @@ static void my_io_free(void* e)
     if(fnc)
         return ((vFp_t)fnc)(e);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->io_free, 1, e);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->io_free, "p", e);
 }
 static void my_io_set_destroy(void* e, void* cb)
 {
@@ -864,7 +864,7 @@ static void my_io_set_destroy(void* e, void* cb)
         if(!b)
             b = AddBridge(bridge, vFppp, cb, 0, NULL);
     }
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->io_set_destroy, 2, e, b);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->io_set_destroy, "pp", e, b);
 }
 
 static void* my_time_new(void* api, void* tv, void* cb, void* data)
@@ -882,7 +882,7 @@ static void* my_time_new(void* api, void* tv, void* cb, void* data)
     if(cb)
         b = AddCheckBridge(bridge, vFpppp, cb, 0, NULL);
     if(api==my_mainloop_orig) api=my_mainloop_ref;    // need emulated version
-    return (void*)RunFunction(my_context, (uintptr_t)my_mainloop_ref->time_new, 4, api, tv, b, data);
+    return (void*)RunFunctionFmt((uintptr_t)my_mainloop_ref->time_new, "pppp", api, tv, b, data);
 }
 static void my_time_restart(void* e, void* tv)
 {
@@ -891,7 +891,7 @@ static void my_time_restart(void* e, void* tv)
     if(fnc)
         return ((vFpp_t)fnc)(e, tv);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->time_restart, 2, e, tv);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->time_restart, "pp", e, tv);
 }
 static void my_time_free(void* e)
 {
@@ -900,7 +900,7 @@ static void my_time_free(void* e)
     if(fnc)
         return ((vFp_t)fnc)(e);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->time_free, 1, e);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->time_free, "p", e);
 }
 static void my_time_set_destroy(void* e, void* cb)
 {
@@ -913,13 +913,21 @@ static void my_time_set_destroy(void* e, void* cb)
     uintptr_t b = 0;
     if(cb)
             b = AddCheckBridge(bridge, vFppp, cb, 0, NULL);
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->time_set_destroy, 2, e, b);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->time_set_destroy, "pp", e, b);
 }
 
 static void* my_defer_new(void* api, void* cb, void* data)
 {
     uintptr_t b = (uintptr_t)cb;
-    void* fnc = GetNativeFnc((uintptr_t)my_mainloop_ref->defer_new);
+    static void* old_defer_new = NULL;
+    static void* old_fnc = NULL;
+    void* fnc = NULL;
+    if(old_defer_new == my_mainloop_ref->defer_new)
+        fnc = old_fnc;
+    else {
+        old_fnc = fnc = GetNativeFnc((uintptr_t)my_mainloop_ref->defer_new);
+        old_defer_new = my_mainloop_ref->defer_new;
+    }
     if(fnc) {
         if(api==my_mainloop_ref) api=my_mainloop_orig;    // need native version
         if(fnc==native_defer_new) fnc=my_mainloop_native.defer_new;
@@ -934,7 +942,7 @@ static void* my_defer_new(void* api, void* cb, void* data)
             b = AddBridge(bridge, vFppp, cb, 0, NULL);
     }
     if(api==my_mainloop_orig) api=my_mainloop_ref;    // need emulated version
-    return (void*)RunFunction(my_context, (uintptr_t)my_mainloop_ref->defer_new, 3, api, b, data);
+    return (void*)RunFunctionFmt((uintptr_t)my_mainloop_ref->defer_new, "ppp", api, b, data);
 }
 static void my_defer_enable(void* e, int b)
 {
@@ -943,7 +951,7 @@ static void my_defer_enable(void* e, int b)
     if(fnc)
         return ((vFpi_t)fnc)(e, b);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->defer_enable, 2, e, b);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->defer_enable, "pi", e, b);
 }
 static void my_defer_free(void* e)
 {
@@ -952,7 +960,7 @@ static void my_defer_free(void* e)
     if(fnc)
         return ((vFp_t)fnc)(e);
 
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->defer_free, 1, e);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->defer_free, "p", e);
 }
 static void my_defer_set_destroy(void* e, void* cb)
 {
@@ -965,7 +973,7 @@ static void my_defer_set_destroy(void* e, void* cb)
     uintptr_t b = 0;
     if(cb)
         b = AddCheckBridge(bridge, vFppp, cb, 0, NULL);
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->defer_set_destroy, 2, e, b);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->defer_set_destroy, "pp", e, b);
 }
 
 static void my_quit(void* api, int retval)
@@ -978,7 +986,7 @@ static void my_quit(void* api, int retval)
     }
 
     if(api==my_mainloop_orig) api=my_mainloop_ref;    // need emulated version
-    RunFunction(my_context, (uintptr_t)my_mainloop_ref->quit, 2, api, retval);
+    RunFunctionFmt((uintptr_t)my_mainloop_ref->quit, "pi", api, retval);
 }
 
 static void bridgeMainloopAPI(bridge_t* bridge, my_pa_mainloop_api_t* api)
diff --git a/src/wrapped/wrappedsdl1.c b/src/wrapped/wrappedsdl1.c
index 4ebfb31e..50f3e1b2 100644
--- a/src/wrapped/wrappedsdl1.c
+++ b/src/wrapped/wrappedsdl1.c
@@ -73,7 +73,7 @@ GO(4)
 static uintptr_t my_AudioCallback_fct_##A = 0;                                      \
 static void my_AudioCallback_##A(void *userdata, uint8_t *stream, int32_t len)      \
 {                                                                                   \
-    RunFunction(my_context, my_AudioCallback_fct_##A, 3, userdata, stream, len);    \
+    RunFunctionFmt(my_AudioCallback_fct_##A, "pCi", userdata, stream, len);   \
 }
 SUPER()
 #undef GO
@@ -95,7 +95,7 @@ static void* find_AudioCallback_Fct(void* fct)
 static uintptr_t my_TimerCallback_fct_##A = 0;                                                  \
 static uint32_t my_TimerCallback_##A(uint32_t interval, void *userdata)                         \
 {                                                                                               \
-    return (uint32_t)RunFunction(my_context, my_TimerCallback_fct_##A, 2, interval, userdata);  \
+    return (uint32_t)RunFunctionFmt(my_TimerCallback_fct_##A, "up", interval, userdata);  \
 }
 SUPER()
 #undef GO
@@ -117,7 +117,7 @@ static void* find_TimerCallback_Fct(void* fct)
 static uintptr_t my_EvtFilter_fct_##A = 0;                      \
 static int my_EvtFilter_##A(void* p)                            \
 {                                                               \
-    return RunFunction(my_context, my_EvtFilter_fct_##A, 1, p); \
+    return RunFunctionFmt(my_EvtFilter_fct_##A, "p", p); \
 }
 SUPER()
 #undef GO
@@ -350,7 +350,7 @@ EXPORT void my_SDL_KillThread(x64emu_t* emu, void* p)
     my->SDL_KillThread(p);
 }
 
-EXPORT void* my_SDL_GL_GetProcAddress(x64emu_t* emu, void* name) 
+EXPORT void* my_SDL_GL_GetProcAddress(x64emu_t* emu, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
diff --git a/src/wrapped/wrappedsdl1image.c b/src/wrapped/wrappedsdl1image.c
index 66eda2c8..ad405d90 100644
--- a/src/wrapped/wrappedsdl1image.c
+++ b/src/wrapped/wrappedsdl1image.c
@@ -24,7 +24,7 @@ const char* sdl1imageName = "libSDL_image-1.2.so.0";
 
 #include "wrappercallback.h"
 
-#define GO(A) \
+#define GO(A)   \
 void EXPORT *my_##A(x64emu_t* emu, void* a) \
 { \
     SDL1_RWops_t* rw = RWNativeStart(emu, (SDL1_RWops_t*)a); \
diff --git a/src/wrapped/wrappedsdl1mixer.c b/src/wrapped/wrappedsdl1mixer.c
index 9538aacf..d9287be4 100644
--- a/src/wrapped/wrappedsdl1mixer.c
+++ b/src/wrapped/wrappedsdl1mixer.c
@@ -37,7 +37,7 @@ GO(4)
 static uintptr_t my_EffectFunc_fct_##A = 0;                                         \
 static void my_EffectFunc_##A(int chan, void *stream, int len, void *udata)         \
 {                                                                                   \
-    RunFunction(my_context, my_EffectFunc_fct_##A, 4, chan, stream, len, udata);    \
+    RunFunctionFmt(my_EffectFunc_fct_##A, "ipip", chan, stream, len, udata);  \
 }
 SUPER()
 #undef GO
@@ -61,7 +61,7 @@ static void* find_EffectFunc_Fct(void* fct)
 static uintptr_t my_EffectDone_fct_##A = 0;                         \
 static void my_EffectDone_##A(int chan, void *udata)                \
 {                                                                   \
-    RunFunction(my_context, my_EffectDone_fct_##A, 2, chan, udata); \
+    RunFunctionFmt(my_EffectDone_fct_##A, "ip", chan, udata);       \
 }
 SUPER()
 #undef GO
@@ -85,7 +85,7 @@ static void* find_EffectDone_Fct(void* fct)
 static uintptr_t my_MixFunc_fct_##A = 0;                                \
 static void my_MixFunc_##A(void *udata, uint8_t *stream, int len)       \
 {                                                                       \
-    RunFunction(my_context, my_MixFunc_fct_##A, 3, udata, stream, len); \
+    RunFunctionFmt(my_MixFunc_fct_##A, "ppi", udata, stream, len);      \
 }
 SUPER()
 #undef GO
@@ -109,7 +109,7 @@ static void* find_MixFunc_Fct(void* fct)
 static uintptr_t my_ChannelFinished_fct_##A = 0;                        \
 static void my_ChannelFinished_##A(int channel)                         \
 {                                                                       \
-    RunFunction(my_context, my_ChannelFinished_fct_##A, 1, channel);    \
+    RunFunctionFmt(my_ChannelFinished_fct_##A, "i", channel);           \
 }
 SUPER()
 #undef GO
@@ -133,7 +133,7 @@ static void* find_ChannelFinished_Fct(void* fct)
 static uintptr_t my_MusicFinished_fct_##A = 0;              \
 static void my_MusicFinished_##A()                          \
 {                                                           \
-    RunFunction(my_context, my_MusicFinished_fct_##A, 0);   \
+    RunFunctionFmt(my_MusicFinished_fct_##A, "");           \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c
index 2e665e9f..8f0710f5 100644
--- a/src/wrapped/wrappedsdl2.c
+++ b/src/wrapped/wrappedsdl2.c
@@ -104,7 +104,7 @@ GO(4)
 static uintptr_t my_Timer_fct_##A = 0;                                      \
 static uint64_t my_Timer_##A(uint64_t a, void* b)                           \
 {                                                                           \
-    return (uint64_t)RunFunction(my_context, my_Timer_fct_##A, 2, a, b);    \
+    return (uint64_t)RunFunctionFmt(my_Timer_fct_##A, "Up", a, b);    \
 }
 SUPER()
 #undef GO
@@ -121,14 +121,14 @@ static void* find_Timer_Fct(void* fct)
     #undef GO
     printf_log(LOG_NONE, "Warning, no more slot for SDL2 Timer callback\n");
     return NULL;
-    
+
 }
 // AudioCallback
 #define GO(A)   \
 static uintptr_t my_AudioCallback_fct_##A = 0;                      \
 static void my_AudioCallback_##A(void* a, void* b, int c)           \
 {                                                                   \
-    RunFunction(my_context, my_AudioCallback_fct_##A, 3, a, b, c);  \
+    RunFunctionFmt(my_AudioCallback_fct_##A, "ppi", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -145,14 +145,14 @@ static void* find_AudioCallback_Fct(void* fct)
     #undef GO
     printf_log(LOG_NONE, "Warning, no more slot for SDL2 AudioCallback callback\n");
     return NULL;
-    
+
 }
 // eventfilter
 #define GO(A)   \
 static uintptr_t my_eventfilter_fct_##A = 0;                                \
 static int my_eventfilter_##A(void* userdata, void* event)                  \
 {                                                                           \
-    return (int)RunFunction(my_context, my_eventfilter_fct_##A, 2, userdata, event);    \
+    return (int)RunFunctionFmt(my_eventfilter_fct_##A, "pp", userdata, event);    \
 }
 SUPER()
 #undef GO
@@ -169,7 +169,7 @@ static void* find_eventfilter_Fct(void* fct)
     #undef GO
     printf_log(LOG_NONE, "Warning, no more slot for SDL2 eventfilter callback\n");
     return NULL;
-    
+
 }
 static void* reverse_eventfilter_Fct(void* fct)
 {
@@ -187,7 +187,7 @@ static void* reverse_eventfilter_Fct(void* fct)
 static uintptr_t my_LogOutput_fct_##A = 0;                                  \
 static void my_LogOutput_##A(void* a, int b, int c, void* d)                \
 {                                                                           \
-    RunFunction(my_context, my_LogOutput_fct_##A, 4, a, b, c, d);  \
+    RunFunctionFmt(my_LogOutput_fct_##A, "piip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -552,7 +552,7 @@ static int get_sdl_priv(x64emu_t* emu, const char *sym_str, void **w, void **f)
         }
     #define GOS(sym, _w) GOM(sym, _w)
     #define DATA
-    
+
     if(0);
     #include "wrappedsdl2_private.h"
 
@@ -570,7 +570,7 @@ int EXPORT my2_SDL_DYNAPI_entry(x64emu_t* emu, uint32_t version, uintptr_t *tabl
     uintptr_t tab[tablesize];
     int r = my->SDL_DYNAPI_entry(version, tab, tablesize);
     (void)r;
-    
+
     #define SDL_DYNAPI_PROC(ret, sym, args, parms, ...) \
         if (i < tablesize) { \
             void *w = NULL; \
@@ -646,7 +646,7 @@ EXPORT void my2_SDL_Log(x64emu_t* emu, void* fmt, void *b) {
     my->SDL_LogMessageV(0, 3, fmt, VARARGS);
 }
 
-EXPORT void* my2_SDL_GL_GetProcAddress(x64emu_t* emu, void* name) 
+EXPORT void* my2_SDL_GL_GetProcAddress(x64emu_t* emu, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
@@ -667,7 +667,7 @@ static uintptr_t dtor_emu[nb_once] = {0};
 static void tls_dtor_callback(int n, void* a)
 {
 	if(dtor_emu[n]) {
-        RunFunction(my_context, dtor_emu[n], 1, a);
+        RunFunctionFmt(dtor_emu[n], "p", a);
 	}
 }
 #define GO(N) \
diff --git a/src/wrapped/wrappedsdl2image.c b/src/wrapped/wrappedsdl2image.c
index de520daa..290d3155 100644
--- a/src/wrapped/wrappedsdl2image.c
+++ b/src/wrapped/wrappedsdl2image.c
@@ -24,7 +24,7 @@ const char* sdl2imageName = "libSDL2_image-2.0.so.0";
 
 #include "wrappercallback.h"
 
-#define GO(A) \
+#define GO(A)   \
 EXPORT void *my2_##A(x64emu_t* emu, void* a) \
 { \
     SDL2_RWops_t *rw = RWNativeStart2(emu, (SDL2_RWops_t*)a); \
diff --git a/src/wrapped/wrappedsdl2mixer.c b/src/wrapped/wrappedsdl2mixer.c
index 8bf9c4df..56a2a0e8 100644
--- a/src/wrapped/wrappedsdl2mixer.c
+++ b/src/wrapped/wrappedsdl2mixer.c
@@ -42,7 +42,7 @@ GO(4)
 static uintptr_t my_EffectFunc_fct_##A = 0;                                         \
 static void my_EffectFunc_##A(int chan, void *stream, int len, void *udata)         \
 {                                                                                   \
-    RunFunction(my_context, my_EffectFunc_fct_##A, 4, chan, stream, len, udata);    \
+    RunFunctionFmt(my_EffectFunc_fct_##A, "ipip", chan, stream, len, udata);    \
 }
 SUPER()
 #undef GO
@@ -66,7 +66,7 @@ static void* find_EffectFunc_Fct(void* fct)
 static uintptr_t my_EffectDone_fct_##A = 0;                         \
 static void my_EffectDone_##A(int chan, void *udata)                \
 {                                                                   \
-    RunFunction(my_context, my_EffectDone_fct_##A, 2, chan, udata); \
+    RunFunctionFmt(my_EffectDone_fct_##A, "ip", chan, udata); \
 }
 SUPER()
 #undef GO
@@ -90,7 +90,7 @@ static void* find_EffectDone_Fct(void* fct)
 static uintptr_t my_MixFunc_fct_##A = 0;                                \
 static void my_MixFunc_##A(void *udata, uint8_t *stream, int len)       \
 {                                                                       \
-    RunFunction(my_context, my_MixFunc_fct_##A, 3, udata, stream, len); \
+    RunFunctionFmt(my_MixFunc_fct_##A, "ppi", udata, stream, len); \
 }
 SUPER()
 #undef GO
@@ -114,7 +114,7 @@ static void* find_MixFunc_Fct(void* fct)
 static uintptr_t my_ChannelFinished_fct_##A = 0;                        \
 static void my_ChannelFinished_##A(int channel)                         \
 {                                                                       \
-    RunFunction(my_context, my_ChannelFinished_fct_##A, 1, channel);    \
+    RunFunctionFmt(my_ChannelFinished_fct_##A, "i", channel);    \
 }
 SUPER()
 #undef GO
@@ -138,7 +138,7 @@ static void* find_ChannelFinished_Fct(void* fct)
 static uintptr_t my_MusicFinished_fct_##A = 0;              \
 static void my_MusicFinished_##A()                          \
 {                                                           \
-    RunFunction(my_context, my_MusicFinished_fct_##A, 0);   \
+    RunFunctionFmt(my_MusicFinished_fct_##A, "");   \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedsmime3.c b/src/wrapped/wrappedsmime3.c
index 136e5510..858c16b9 100644
--- a/src/wrapped/wrappedsmime3.c
+++ b/src/wrapped/wrappedsmime3.c
@@ -39,7 +39,7 @@ GO(4)
 static uintptr_t my_SECKEYGetPasswordKey_fct_##A = 0;                               \
 static void* my_SECKEYGetPasswordKey_##A(void* a, void* b)                          \
 {                                                                                   \
-    return (void*)RunFunction(my_context, my_SECKEYGetPasswordKey_fct_##A, 2, a, b);\
+    return (void*)RunFunctionFmt(my_SECKEYGetPasswordKey_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -62,7 +62,7 @@ static void* find_SECKEYGetPasswordKey_Fct(void* fct)
 static uintptr_t my_digestOpenFn_fct_##A = 0;                           \
 static int my_digestOpenFn_##A(void* a, int b)                          \
 {                                                                       \
-    return RunFunction(my_context, my_digestOpenFn_fct_##A, 2, a, b);   \
+    return RunFunctionFmt(my_digestOpenFn_fct_##A, "pi", a, b);   \
 }
 SUPER()
 #undef GO
@@ -85,7 +85,7 @@ static void* find_digestOpenFn_Fct(void* fct)
 static uintptr_t my_digestCloseFn_fct_##A = 0;                          \
 static int my_digestCloseFn_##A(void* a, int b)                         \
 {                                                                       \
-    return RunFunction(my_context, my_digestCloseFn_fct_##A, 2, a, b);  \
+    return RunFunctionFmt(my_digestCloseFn_fct_##A, "pi", a, b);  \
 }
 SUPER()
 #undef GO
@@ -108,7 +108,7 @@ static void* find_digestCloseFn_Fct(void* fct)
 static uintptr_t my_digestIOFn_fct_##A = 0;                             \
 static int my_digestIOFn_##A(void* a, void* b, unsigned long c)         \
 {                                                                       \
-    return RunFunction(my_context, my_digestIOFn_fct_##A, 3, a, b, c);  \
+    return RunFunctionFmt(my_digestIOFn_fct_##A, "ppL", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -131,7 +131,7 @@ static void* find_digestIOFn_Fct(void* fct)
 static uintptr_t my_SEC_PKCS12NicknameCollisionCallback_fct_##A = 0;                                    \
 static void* my_SEC_PKCS12NicknameCollisionCallback_##A(void* a, void* b, void* c)                      \
 {                                                                                                       \
-    return (void*)RunFunction(my_context, my_SEC_PKCS12NicknameCollisionCallback_fct_##A, 3, a, b, c);  \
+    return (void*)RunFunctionFmt(my_SEC_PKCS12NicknameCollisionCallback_fct_##A, "ppp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -151,10 +151,10 @@ static void* find_SEC_PKCS12NicknameCollisionCallback_Fct(void* fct)
 
 // SEC_PKCS12EncoderOutputCallback ...
 #define GO(A)   \
-static uintptr_t my_SEC_PKCS12EncoderOutputCallback_fct_##A = 0;                        \
-static void my_SEC_PKCS12EncoderOutputCallback_##A(void* a, void* b, unsigned long c)   \
-{                                                                                       \
-    RunFunction(my_context, my_SEC_PKCS12EncoderOutputCallback_fct_##A, 3, a, b, c);    \
+static uintptr_t my_SEC_PKCS12EncoderOutputCallback_fct_##A = 0;                            \
+static void my_SEC_PKCS12EncoderOutputCallback_##A(void* a, void* b, unsigned long c)       \
+{                                                                                           \
+    RunFunctionFmt(my_SEC_PKCS12EncoderOutputCallback_fct_##A, "ppL", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -177,7 +177,7 @@ static void* find_SEC_PKCS12EncoderOutputCallback_Fct(void* fct)
 static uintptr_t my_NSSCMSContentCallback_fct_##A = 0;                      \
 static void my_NSSCMSContentCallback_##A(void* a, void* b, unsigned long c) \
 {                                                                           \
-    RunFunction(my_context, my_NSSCMSContentCallback_fct_##A, 3, a, b, c);  \
+    RunFunctionFmt(my_NSSCMSContentCallback_fct_##A, "ppL", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -200,7 +200,7 @@ static void* find_NSSCMSContentCallback_Fct(void* fct)
 static uintptr_t my_PK11PasswordFunc_fct_##A = 0;                                   \
 static void* my_PK11PasswordFunc_##A(void* a, int b, void* c)                       \
 {                                                                                   \
-    return (void*)RunFunction(my_context, my_PK11PasswordFunc_fct_##A, 3, a, b, c); \
+    return (void*)RunFunctionFmt(my_PK11PasswordFunc_fct_##A, "pip", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -223,7 +223,7 @@ static void* find_PK11PasswordFunc_Fct(void* fct)
 static uintptr_t my_NSSCMSGetDecryptKeyCallback_fct_##A = 0;                                \
 static void* my_NSSCMSGetDecryptKeyCallback_##A(void* a, void* b)                           \
 {                                                                                           \
-    return (void*)RunFunction(my_context, my_NSSCMSGetDecryptKeyCallback_fct_##A, 2, a, b); \
+    return (void*)RunFunctionFmt(my_NSSCMSGetDecryptKeyCallback_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -246,7 +246,7 @@ static void* find_NSSCMSGetDecryptKeyCallback_Fct(void* fct)
 static uintptr_t my_CERTImportCertificateFunc_fct_##A = 0;                                  \
 static int my_CERTImportCertificateFunc_##A(void* a, void* b, int c)                        \
 {                                                                                           \
-    return (int)RunFunction(my_context, my_CERTImportCertificateFunc_fct_##A, 2, a, b, c);  \
+    return (int)RunFunctionFmt(my_CERTImportCertificateFunc_fct_##A, "ppi", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -271,7 +271,7 @@ EXPORT void my_SEC_PKCS12CreateExportContext(x64emu_t* emu, void* f, void* pwfna
     my->SEC_PKCS12CreateExportContext(find_SECKEYGetPasswordKey_Fct(f), pwfnarg, slot, wincx);
 }
 
-EXPORT void* my_SEC_PKCS12DecoderStart(x64emu_t* emu, void* item, void* slot, void* wincx, void* dOpen, void* dClose, 
+EXPORT void* my_SEC_PKCS12DecoderStart(x64emu_t* emu, void* item, void* slot, void* wincx, void* dOpen, void* dClose,
     void* dRead, void* dWrite, void* dArg)
 {
     return my->SEC_PKCS12DecoderStart(item, slot, wincx, find_digestOpenFn_Fct(dOpen), find_digestCloseFn_Fct(dClose),
diff --git a/src/wrapped/wrappedsmpeg.c b/src/wrapped/wrappedsmpeg.c
index cc552ba5..c2bac565 100644
--- a/src/wrapped/wrappedsmpeg.c
+++ b/src/wrapped/wrappedsmpeg.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_dispcallback_fct_##A = 0;                                                   \
 static void my_dispcallback_##A(void* dst, int32_t x, int32_t y, unsigned int w, unsigned int h)\
 {                                                                                               \
-    RunFunction(my_context, my_dispcallback_fct_##A, 5, dst, x, y, w, h);                       \
+    RunFunctionFmt(my_dispcallback_fct_##A, "piiuu", dst, x, y, w, h);                       \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedsmpeg2.c b/src/wrapped/wrappedsmpeg2.c
index c95f0bab..e285c215 100644
--- a/src/wrapped/wrappedsmpeg2.c
+++ b/src/wrapped/wrappedsmpeg2.c
@@ -38,7 +38,7 @@ GO(4)
 static uintptr_t my_dispcallback_fct_##A = 0;                           \
 static void my_dispcallback_##A(void* data, void* frame)                \
 {                                                                       \
-    RunFunction(my_context, my_dispcallback_fct_##A, 2, data, frame);   \
+    RunFunctionFmt(my_dispcallback_fct_##A, "pp", data, frame);   \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedudev0.c b/src/wrapped/wrappedudev0.c
index 47d650f5..4f2182a3 100644
--- a/src/wrapped/wrappedudev0.c
+++ b/src/wrapped/wrappedudev0.c
@@ -41,7 +41,7 @@ static uintptr_t my_log_fn_fct_##A = 0;
 static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
 {                                                                                                       \
     CONVERT_VALIST(args)                                                                                \
-    RunFunction(my_context, my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                     \
+    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
 }
 #else
 #define GO(A)   \
@@ -49,7 +49,7 @@ static uintptr_t my_log_fn_fct_##A = 0;
 static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
 {                                                                                                       \
     CREATE_VALIST_FROM_VALIST(args, thread_get_emu()->scratch);                                         \
-    RunFunction(my_context, my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                     \
+    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
 }
 #endif
 SUPER()
diff --git a/src/wrapped/wrappedudev1.c b/src/wrapped/wrappedudev1.c
index 6c30a14c..a82b61c0 100644
--- a/src/wrapped/wrappedudev1.c
+++ b/src/wrapped/wrappedudev1.c
@@ -41,7 +41,7 @@ static uintptr_t my_log_fn_fct_##A = 0;
 static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
 {                                                                                                       \
     CONVERT_VALIST(args)                                                                                \
-    RunFunction(my_context, my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                     \
+    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
 }
 #else
 #define GO(A)   \
@@ -49,7 +49,7 @@ static uintptr_t my_log_fn_fct_##A = 0;
 static void my_log_fn_##A(void* udev, int p, void *f, int l, void* fn, void* fmt, x64_va_list_t args)   \
 {                                                                                                       \
     CREATE_VALIST_FROM_VALIST(args, thread_get_emu()->scratch);                                         \
-    RunFunction(my_context, my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                     \
+    RunFunction(my_log_fn_fct_##A, 7, udev, p, f, l, fn, fmt, VARARGS);                                 \
 }
 #endif
 SUPER()
diff --git a/src/wrapped/wrappedvorbisfile.c b/src/wrapped/wrappedvorbisfile.c
index ad285fe7..411a3ee3 100644
--- a/src/wrapped/wrappedvorbisfile.c
+++ b/src/wrapped/wrappedvorbisfile.c
@@ -49,9 +49,9 @@ GO(7)
 // read
 #define GO(A)   \
 static uintptr_t my_read_fct_##A = 0;   \
-static unsigned long my_read_##A(void* ptr, unsigned long size, unsigned long nmemb, void* datasource)     \
+static unsigned long my_read_##A(void* ptr, unsigned long size, unsigned long nmemb, void* datasource)  \
 {                                       \
-    return RunFunction(my_context, my_read_fct_##A, 4, ptr, size, nmemb, datasource);\
+    return RunFunctionFmt(my_read_fct_##A, "pLLp", ptr, size, nmemb, datasource);   \
 }
 SUPER()
 #undef GO
@@ -73,7 +73,7 @@ static void* findreadFct(void* fct)
 static uintptr_t my_seek_fct_##A = 0;   \
 static int my_seek_##A(void* ptr, int64_t offset, int whence)     \
 {                                       \
-    return (int)RunFunction(my_context, my_seek_fct_##A, 3, ptr, offset, whence);\
+    return (int)RunFunctionFmt(my_seek_fct_##A, "pIi", ptr, offset, whence);\
 }
 SUPER()
 #undef GO
@@ -95,7 +95,7 @@ static void* findseekFct(void* fct)
 static uintptr_t my_close_fct_##A = 0;   \
 static int my_close_##A(void* ptr)     \
 {                   \
-    return (int)RunFunction(my_context, my_close_fct_##A, 1, ptr);\
+    return (int)RunFunctionFmt(my_close_fct_##A, "p", ptr);\
 }
 SUPER()
 #undef GO
@@ -117,7 +117,7 @@ static void* findcloseFct(void* fct)
 static uintptr_t my_tell_fct_##A = 0;   \
 static long my_tell_##A(void* ptr)     \
 {                                       \
-    return (long)RunFunction(my_context, my_tell_fct_##A, 1, ptr);\
+    return (long)RunFunctionFmt(my_tell_fct_##A, "p", ptr);\
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedvulkan.c b/src/wrapped/wrappedvulkan.c
index b90747c4..8cba5772 100644
--- a/src/wrapped/wrappedvulkan.c
+++ b/src/wrapped/wrappedvulkan.c
@@ -53,7 +53,7 @@ static void* resolveSymbol(x64emu_t* emu, void* symbol, const char* rname)
         printf_dlsym(LOG_DEBUG, "%p\n", (void*)ret);
         return (void*)ret; // already bridged
     }
-    // get wrapper    
+    // get wrapper
     khint_t k = kh_get(symbolmap, emu->context->vkwrappers, rname);
     if(k==kh_end(emu->context->vkwrappers) && strstr(rname, "KHR")==NULL) {
         // try again, adding KHR at the end if not present
@@ -74,7 +74,7 @@ static void* resolveSymbol(x64emu_t* emu, void* symbol, const char* rname)
     return (void*)ret;
 }
 
-EXPORT void* my_vkGetDeviceProcAddr(x64emu_t* emu, void* device, void* name) 
+EXPORT void* my_vkGetDeviceProcAddr(x64emu_t* emu, void* device, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
@@ -84,8 +84,8 @@ EXPORT void* my_vkGetDeviceProcAddr(x64emu_t* emu, void* device, void* name)
         fillVulkanProcWrapper(emu->context);
     k = kh_get(symbolmap, emu->context->vkmymap, rname);
     int is_my = (k==kh_end(emu->context->vkmymap))?0:1;
-    void* symbol;
-    if(is_my) {
+    void* symbol = my->vkGetDeviceProcAddr(device, name);
+    if(symbol && is_my) {   // only wrap if symbol exist
         // try again, by using custom "my_" now...
         char tmp[200];
         strcpy(tmp, "my_");
@@ -95,8 +95,7 @@ EXPORT void* my_vkGetDeviceProcAddr(x64emu_t* emu, void* device, void* name)
         #define GO(A, W) if(!strcmp(rname, #A)) my->A = (W)my->vkGetDeviceProcAddr(device, name);
         SUPER()
         #undef GO
-    } else 
-        symbol = my->vkGetDeviceProcAddr(device, name);
+    } 
     if(!symbol) {
         printf_dlsym(LOG_DEBUG, "%p\n", NULL);
         return NULL;    // easy
@@ -104,7 +103,7 @@ EXPORT void* my_vkGetDeviceProcAddr(x64emu_t* emu, void* device, void* name)
     return resolveSymbol(emu, symbol, rname);
 }
 
-EXPORT void* my_vkGetInstanceProcAddr(x64emu_t* emu, void* instance, void* name) 
+EXPORT void* my_vkGetInstanceProcAddr(x64emu_t* emu, void* instance, void* name)
 {
     khint_t k;
     const char* rname = (const char*)name;
@@ -192,10 +191,10 @@ GO(4)
 
 // Allocation ...
 #define GO(A)   \
-static uintptr_t my_Allocation_fct_##A = 0;                                         \
-static void* my_Allocation_##A(void* a, size_t b, size_t c, int d)                  \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_Allocation_fct_##A, 4, a, b, c, d);    \
+static uintptr_t my_Allocation_fct_##A = 0;                                             \
+static void* my_Allocation_##A(void* a, size_t b, size_t c, int d)                      \
+{                                                                                       \
+    return (void*)RunFunctionFmt(my_Allocation_fct_##A, "pLLi", a, b, c, d);      \
 }
 SUPER()
 #undef GO
@@ -214,10 +213,10 @@ static void* find_Allocation_Fct(void* fct)
 }
 // Reallocation ...
 #define GO(A)   \
-static uintptr_t my_Reallocation_fct_##A = 0;                                           \
-static void* my_Reallocation_##A(void* a, void* b, size_t c, size_t d, int e)           \
-{                                                                                       \
-    return (void*)RunFunction(my_context, my_Reallocation_fct_##A, 5, a, b, c, d, e);   \
+static uintptr_t my_Reallocation_fct_##A = 0;                                                   \
+static void* my_Reallocation_##A(void* a, void* b, size_t c, size_t d, int e)                   \
+{                                                                                               \
+    return (void*)RunFunctionFmt(my_Reallocation_fct_##A, "ppLLi", a, b, c, d, e);        \
 }
 SUPER()
 #undef GO
@@ -239,7 +238,7 @@ static void* find_Reallocation_Fct(void* fct)
 static uintptr_t my_Free_fct_##A = 0;                       \
 static void my_Free_##A(void* a, void* b)                   \
 {                                                           \
-    RunFunction(my_context, my_Free_fct_##A, 2, a, b);      \
+    RunFunctionFmt(my_Free_fct_##A, "pp", a, b);      \
 }
 SUPER()
 #undef GO
@@ -258,10 +257,10 @@ static void* find_Free_Fct(void* fct)
 }
 // InternalAllocNotification ...
 #define GO(A)   \
-static uintptr_t my_InternalAllocNotification_fct_##A = 0;                          \
-static void my_InternalAllocNotification_##A(void* a, size_t b, int c, int d)       \
-{                                                                                   \
-    RunFunction(my_context, my_InternalAllocNotification_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_InternalAllocNotification_fct_##A = 0;                                  \
+static void my_InternalAllocNotification_##A(void* a, size_t b, int c, int d)               \
+{                                                                                           \
+    RunFunctionFmt(my_InternalAllocNotification_fct_##A, "pLii", a, b, c, d);         \
 }
 SUPER()
 #undef GO
@@ -280,10 +279,10 @@ static void* find_InternalAllocNotification_Fct(void* fct)
 }
 // InternalFreeNotification ...
 #define GO(A)   \
-static uintptr_t my_InternalFreeNotification_fct_##A = 0;                           \
-static void my_InternalFreeNotification_##A(void* a, size_t b, int c, int d)        \
-{                                                                                   \
-    RunFunction(my_context, my_InternalFreeNotification_fct_##A, 4, a, b, c, d);    \
+static uintptr_t my_InternalFreeNotification_fct_##A = 0;                                   \
+static void my_InternalFreeNotification_##A(void* a, size_t b, int c, int d)                \
+{                                                                                           \
+    RunFunctionFmt(my_InternalFreeNotification_fct_##A, "pLii", a, b, c, d);          \
 }
 SUPER()
 #undef GO
@@ -302,10 +301,10 @@ static void* find_InternalFreeNotification_Fct(void* fct)
 }
 // DebugReportCallbackEXT ...
 #define GO(A)   \
-static uintptr_t my_DebugReportCallbackEXT_fct_##A = 0;                                                                             \
-static int my_DebugReportCallbackEXT_##A(int a, int b, uint64_t c, size_t d, int e, void* f, void* g, void* h)                      \
-{                                                                                                                                   \
-    return RunFunction(my_context, my_DebugReportCallbackEXT_fct_##A, 8, a, b, c, d, e, f, g, h);    \
+static uintptr_t my_DebugReportCallbackEXT_fct_##A = 0;                                                         \
+static int my_DebugReportCallbackEXT_##A(int a, int b, uint64_t c, size_t d, int e, void* f, void* g, void* h)  \
+{                                                                                                               \
+    return RunFunctionFmt(my_DebugReportCallbackEXT_fct_##A, "iiULippp", a, b, c, d, e, f, g, h);         \
 }
 SUPER()
 #undef GO
@@ -618,7 +617,7 @@ EXPORT void my_vkGetPhysicalDeviceMemoryProperties(x64emu_t* emu, void* device,
     my->vkGetPhysicalDeviceMemoryProperties(device, pProps);
 }
 
-EXPORT void my_vkCmdPipelineBarrier(x64emu_t* emu, void* device, int src, int dst, int dep, 
+EXPORT void my_vkCmdPipelineBarrier(x64emu_t* emu, void* device, int src, int dst, int dep,
     uint32_t barrierCount, void* pBarriers, uint32_t bufferCount, void* pBuffers, uint32_t imageCount, void* pImages)
 {
     my->vkCmdPipelineBarrier(device, src, dst, dep, barrierCount, pBarriers, bufferCount, pBuffers, imageCount, pImages);
@@ -632,12 +631,12 @@ typedef struct my_VkDebugReportCallbackCreateInfoEXT_s {
     void*       pUserData;
 } my_VkDebugReportCallbackCreateInfoEXT_t;
 
-EXPORT int my_vkCreateDebugReportCallbackEXT(x64emu_t* emu, void* instance, 
-                                             my_VkDebugReportCallbackCreateInfoEXT_t* create, 
+EXPORT int my_vkCreateDebugReportCallbackEXT(x64emu_t* emu, void* instance,
+                                             my_VkDebugReportCallbackCreateInfoEXT_t* create,
                                              my_VkAllocationCallbacks_t* alloc, void* callback)
 {
     my_VkDebugReportCallbackCreateInfoEXT_t dbg = *create;
-    my_VkAllocationCallbacks_t my_alloc; 
+    my_VkAllocationCallbacks_t my_alloc;
     dbg.pfnCallback = find_DebugReportCallbackEXT_Fct(dbg.pfnCallback);
     return my->vkCreateDebugReportCallbackEXT(instance, &dbg, find_VkAllocationCallbacks(&my_alloc, alloc), callback);
 }
@@ -648,4 +647,4 @@ EXPORT int my_vkDestroyDebugReportCallbackEXT(x64emu_t* emu, void* instance, voi
     return my->vkDestroyDebugReportCallbackEXT(instance, callback, find_VkAllocationCallbacks(&my_alloc, alloc));
 }
 
-CREATE(vkCreateHeadlessSurfaceEXT)
\ No newline at end of file
+CREATE(vkCreateHeadlessSurfaceEXT)
diff --git a/src/wrapped/wrappedvulkan_private.h b/src/wrapped/wrappedvulkan_private.h
index 873f8572..363b26f0 100644
--- a/src/wrapped/wrappedvulkan_private.h
+++ b/src/wrapped/wrappedvulkan_private.h
@@ -197,7 +197,7 @@ GO(vkGetPhysicalDeviceExternalFenceProperties, vFppp)
 GO(vkGetPhysicalDeviceExternalSemaphoreProperties, vFppp)
 GO(vkGetPhysicalDeviceFeatures2, vFpp)
 GO(vkGetPhysicalDeviceFormatProperties2, vFpip)
-GO(vkGetPhysicalDeviceImageFormatProperties2, vFppp)
+GO(vkGetPhysicalDeviceImageFormatProperties2, iFppp)
 GO(vkGetPhysicalDeviceMemoryProperties2, vFpp)
 GO(vkGetPhysicalDeviceProperties2, vFpp)
 GO(vkGetPhysicalDeviceQueueFamilyProperties2, vFppp)    //VkQueueFamilyProperties2 seems OK
@@ -804,4 +804,11 @@ GO(vkCmdSetSampleMaskEXT, vFpip)
 GO(vkCmdSetShadingRateImageEnableNV, vFpi)
 GO(vkCmdSetTessellationDomainOriginEXT, vFpi)
 GO(vkCmdSetViewportSwizzleNV, vFpuup)
-GO(vkCmdSetViewportWScalingEnableNV, vFpi)
\ No newline at end of file
+GO(vkCmdSetViewportWScalingEnableNV, vFpi)
+
+// VK_KHR_external_memory_win32
+GO(vkGetMemoryWin32HandleKHR, iFppp)
+GO(vkGetMemoryWin32HandlePropertiesKHR, iFpipp)
+
+// VK_EXT_swapchain_maintenance1
+GO(vkReleaseSwapchainImagesEXT, iFpp)
diff --git a/src/wrapped/wrappedwaylandclient_private.h b/src/wrapped/wrappedwaylandclient_private.h
index fc2aeef7..1d54f28c 100644
--- a/src/wrapped/wrappedwaylandclient_private.h
+++ b/src/wrapped/wrappedwaylandclient_private.h
@@ -28,11 +28,11 @@ GO(wl_display_get_fd, iFp)
 //GO(wl_display_get_protocol_error, 
 //DATA(wl_display_interface, 
 GO(wl_display_prepare_read, iFp)
-//GO(wl_display_prepare_read_queue, 
+GO(wl_display_prepare_read_queue, iFpp)
 GO(wl_display_read_events, iFp)
 GO(wl_display_roundtrip, iFp)
 //GO(wl_display_roundtrip_queue, 
-//GO(wl_event_queue_destroy, 
+GO(wl_event_queue_destroy, vFp)
 //DATA(wl_keyboard_interface, 
 //GO(wl_list_empty, 
 //GO(wl_list_init, 
@@ -44,28 +44,28 @@ GO(wl_display_roundtrip, iFp)
 //DATA(wl_output_interface, 
 //DATA(wl_pointer_interface, 
 //GO(wl_proxy_add_dispatcher, 
-//GO(wl_proxy_add_listener, 
+GO(wl_proxy_add_listener, iFppp)
 GO(wl_proxy_create, pFpp)
-//GO(wl_proxy_create_wrapper, 
+GO(wl_proxy_create_wrapper, pFp)
 GO(wl_proxy_destroy, vFp)
 //GO(wl_proxy_get_class, 
-//GO(wl_proxy_get_id, 
-//GO(wl_proxy_get_listener, 
+GO(wl_proxy_get_id, uFp)
+GO(wl_proxy_get_listener, pFp)
 //GO(wl_proxy_get_tag, 
-//GO(wl_proxy_get_user_data, 
-//GO(wl_proxy_get_version, 
+GO(wl_proxy_get_user_data, pFp)
+GO(wl_proxy_get_version, uFp)
 //GO(wl_proxy_marshal, 
 //GO(wl_proxy_marshal_array, 
-//GO(wl_proxy_marshal_array_constructor, 
-//GO(wl_proxy_marshal_array_constructor_versioned, 
+GO(wl_proxy_marshal_array_constructor, pFpupp)
+GO(wl_proxy_marshal_array_constructor_versioned, pFpuppu)
 //GO(wl_proxy_marshal_array_flags, 
 //GO(wl_proxy_marshal_constructor, 
 //GO(wl_proxy_marshal_constructor_versioned, 
 //GO(wl_proxy_marshal_flags, 
-//GO(wl_proxy_set_queue, 
+GO(wl_proxy_set_queue, vFpp)
 //GO(wl_proxy_set_tag, 
-//GO(wl_proxy_set_user_data, 
-//GO(wl_proxy_wrapper_destroy, 
+GO(wl_proxy_set_user_data, vFpp)
+GO(wl_proxy_wrapper_destroy, vFp)
 DATA(wl_region_interface, 40)
 DATA(wl_registry_interface, 40)
 DATA(wl_seat_interface, 40)
diff --git a/src/wrapped/wrappedxkbcommon_private.h b/src/wrapped/wrappedxkbcommon_private.h
index ba9dd84c..6d4a3dc5 100644
--- a/src/wrapped/wrappedxkbcommon_private.h
+++ b/src/wrapped/wrappedxkbcommon_private.h
@@ -49,7 +49,7 @@ GO(xkb_keymap_mod_get_index, uFpp)
 GO(xkb_keymap_mod_get_name, pFpu)
 GO(xkb_keymap_new_from_buffer, pFppLii)
 //GO(xkb_keymap_new_from_file, 
-//GO(xkb_keymap_new_from_names, 
+GO(xkb_keymap_new_from_names, pFppi)
 GO(xkb_keymap_new_from_string, pFppii)
 GO(xkb_keymap_num_layouts, uFp)
 GO(xkb_keymap_num_layouts_for_key, uFpu)
diff --git a/src/wrapped/wrappedxml2.c b/src/wrapped/wrappedxml2.c
index e9f8dff8..cb7aef39 100644
--- a/src/wrapped/wrappedxml2.c
+++ b/src/wrapped/wrappedxml2.c
@@ -36,7 +36,7 @@ EXPORT uintptr_t my_xmlMemStrdup = 0;
 void my_wrap_xmlFree(void* p)
 {
     if(my_xmlFree){
-        RunFunction(my_context, my_xmlFree, 1, p);
+        RunFunctionFmt(my_xmlFree, "p", p);
         return;
     }
         free(p);
@@ -44,21 +44,21 @@ void my_wrap_xmlFree(void* p)
 void* my_wrap_xmlMalloc(size_t s)
 {
     if(my_xmlMalloc)
-        return (void*)RunFunction(my_context, my_xmlMalloc, 1, s);
+        return (void*)RunFunctionFmt(my_xmlMalloc, "L", s);
     else
         return malloc(s);
 }
 void* my_wrap_xmlRealloc(void* p, size_t s)
 {
     if(my_xmlRealloc)
-        return (void*)RunFunction(my_context, my_xmlRealloc, 2, p, s);
+        return (void*)RunFunctionFmt(my_xmlRealloc, "pL", p, s);
     else
         return realloc(p, s);
 }
 void* my_wrap_xmlMemStrdup(void* p)
 {
     if(my_xmlMemStrdup)
-        return (void*)RunFunction(my_context, my_xmlMemStrdup, 1, p);
+        return (void*)RunFunctionFmt(my_xmlMemStrdup, "p", p);
     else
         return strdup(p);
 }
@@ -98,10 +98,10 @@ GO(9)
 
 // xmlHashCopier ...
 #define GO(A)   \
-static uintptr_t my_xmlHashCopier_fct_##A = 0;                                  \
-static void* my_xmlHashCopier_##A(void* a, void* b)                             \
-{                                                                               \
-    return (void*)RunFunction(my_context, my_xmlHashCopier_fct_##A, 2, a, b);   \
+static uintptr_t my_xmlHashCopier_fct_##A = 0;                                      \
+static void* my_xmlHashCopier_##A(void* a, void* b)                                 \
+{                                                                                   \
+    return (void*)RunFunctionFmt(my_xmlHashCopier_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -120,10 +120,10 @@ static void* find_xmlHashCopier_Fct(void* fct)
 }
 // xmlHashDeallocator ...
 #define GO(A)   \
-static uintptr_t my_xmlHashDeallocator_fct_##A = 0;                     \
-static void my_xmlHashDeallocator_##A(void* a, void* b)                 \
-{                                                                       \
-    RunFunction(my_context, my_xmlHashDeallocator_fct_##A, 2, a, b);    \
+static uintptr_t my_xmlHashDeallocator_fct_##A = 0;                         \
+static void my_xmlHashDeallocator_##A(void* a, void* b)                     \
+{                                                                           \
+    RunFunctionFmt(my_xmlHashDeallocator_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -142,10 +142,10 @@ static void* find_xmlHashDeallocator_Fct(void* fct)
 }
 // xmlHashScanner ...
 #define GO(A)   \
-static uintptr_t my_xmlHashScanner_fct_##A = 0;                     \
-static void my_xmlHashScanner_##A(void* a, void* b, void* c)        \
-{                                                                   \
-    RunFunction(my_context, my_xmlHashScanner_fct_##A, 3, a, b, c); \
+static uintptr_t my_xmlHashScanner_fct_##A = 0;                             \
+static void my_xmlHashScanner_##A(void* a, void* b, void* c)                \
+{                                                                           \
+    RunFunctionFmt(my_xmlHashScanner_fct_##A, "ppp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -164,10 +164,10 @@ static void* find_xmlHashScanner_Fct(void* fct)
 }
 // xmlHashScannerFull ...
 #define GO(A)   \
-static uintptr_t my_xmlHashScannerFull_fct_##A = 0;                                 \
-static void my_xmlHashScannerFull_##A(void* a, void* b, void* c, void* c2, void* c3)\
-{                                                                                   \
-    RunFunction(my_context, my_xmlHashScannerFull_fct_##A, 5, a, b, c, c2, c3);     \
+static uintptr_t my_xmlHashScannerFull_fct_##A = 0;                                     \
+static void my_xmlHashScannerFull_##A(void* a, void* b, void* c, void* c2, void* c3)    \
+{                                                                                       \
+    RunFunctionFmt(my_xmlHashScannerFull_fct_##A, "ppppp", a, b, c, c2, c3);\
 }
 SUPER()
 #undef GO
@@ -186,10 +186,10 @@ static void* find_xmlHashScannerFull_Fct(void* fct)
 }
 // xmlCharEncodingInputFunc ...
 #define GO(A)   \
-static uintptr_t my_xmlCharEncodingInputFunc_fct_##A = 0;                               \
-static int my_xmlCharEncodingInputFunc_##A(void* a, void* b, void* c, void* d)          \
-{                                                                                       \
-    return RunFunction(my_context, my_xmlCharEncodingInputFunc_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_xmlCharEncodingInputFunc_fct_##A = 0;                                       \
+static int my_xmlCharEncodingInputFunc_##A(void* a, void* b, void* c, void* d)                  \
+{                                                                                               \
+    return RunFunctionFmt(my_xmlCharEncodingInputFunc_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -208,10 +208,10 @@ static void* find_xmlCharEncodingInputFunc_Fct(void* fct)
 }
 // xmlCharEncodingOutputFunc ...
 #define GO(A)   \
-static uintptr_t my_xmlCharEncodingOutputFunc_fct_##A = 0;                              \
-static int my_xmlCharEncodingOutputFunc_##A(void* a, void* b, void* c, void* d)         \
-{                                                                                       \
-    return RunFunction(my_context, my_xmlCharEncodingOutputFunc_fct_##A, 4, a, b, c, d);\
+static uintptr_t my_xmlCharEncodingOutputFunc_fct_##A = 0;                                      \
+static int my_xmlCharEncodingOutputFunc_##A(void* a, void* b, void* c, void* d)                 \
+{                                                                                               \
+    return RunFunctionFmt(my_xmlCharEncodingOutputFunc_fct_##A, "pppp", a, b, c, d);\
 }
 SUPER()
 #undef GO
@@ -230,10 +230,10 @@ static void* find_xmlCharEncodingOutputFunc_Fct(void* fct)
 }
 // xmlOutputWriteCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlOutputWriteCallback_fct_##A = 0;                             \
-static int my_xmlOutputWriteCallback_##A(void* a, void* b, int c)                   \
-{                                                                                   \
-    return RunFunction(my_context, my_xmlOutputWriteCallback_fct_##A, 3, a, b, c);  \
+static uintptr_t my_xmlOutputWriteCallback_fct_##A = 0;                                     \
+static int my_xmlOutputWriteCallback_##A(void* a, void* b, int c)                           \
+{                                                                                           \
+    return RunFunctionFmt(my_xmlOutputWriteCallback_fct_##A, "ppi", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -252,10 +252,10 @@ static void* find_xmlOutputWriteCallback_Fct(void* fct)
 }
 // xmlOutputCloseCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlOutputCloseCallback_fct_##A = 0;                         \
-static int my_xmlOutputCloseCallback_##A(void* a)                               \
-{                                                                               \
-    return RunFunction(my_context, my_xmlOutputCloseCallback_fct_##A, 1, a);    \
+static uintptr_t my_xmlOutputCloseCallback_fct_##A = 0;                             \
+static int my_xmlOutputCloseCallback_##A(void* a)                                   \
+{                                                                                   \
+    return RunFunctionFmt(my_xmlOutputCloseCallback_fct_##A, "p", a);   \
 }
 SUPER()
 #undef GO
@@ -274,10 +274,10 @@ static void* find_xmlOutputCloseCallback_Fct(void* fct)
 }
 // xmlInputMatchCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlInputMatchCallback_fct_##A = 0;                      \
-static int my_xmlInputMatchCallback_##A(void* a)                            \
-{                                                                           \
-    return RunFunction(my_context, my_xmlInputMatchCallback_fct_##A, 1, a); \
+static uintptr_t my_xmlInputMatchCallback_fct_##A = 0;                          \
+static int my_xmlInputMatchCallback_##A(void* a)                                \
+{                                                                               \
+    return RunFunctionFmt(my_xmlInputMatchCallback_fct_##A, "p", a);\
 }
 SUPER()
 #undef GO
@@ -296,10 +296,10 @@ static void* find_xmlInputMatchCallback_Fct(void* fct)
 }
 // xmlInputOpenCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlInputOpenCallback_fct_##A = 0;                               \
-static void* my_xmlInputOpenCallback_##A(void* a)                                   \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_xmlInputOpenCallback_fct_##A, 1, a);   \
+static uintptr_t my_xmlInputOpenCallback_fct_##A = 0;                                   \
+static void* my_xmlInputOpenCallback_##A(void* a)                                       \
+{                                                                                       \
+    return (void*)RunFunctionFmt(my_xmlInputOpenCallback_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -318,10 +318,10 @@ static void* find_xmlInputOpenCallback_Fct(void* fct)
 }
 // xmlInputReadCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlInputReadCallback_fct_##A = 0;                               \
-static int my_xmlInputReadCallback_##A(void* a, void* b, int c)                     \
-{                                                                                   \
-    return RunFunction(my_context, my_xmlInputReadCallback_fct_##A, 3, a, b, c);    \
+static uintptr_t my_xmlInputReadCallback_fct_##A = 0;                                   \
+static int my_xmlInputReadCallback_##A(void* a, void* b, int c)                         \
+{                                                                                       \
+    return RunFunctionFmt(my_xmlInputReadCallback_fct_##A, "ppi", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -340,10 +340,10 @@ static void* find_xmlInputReadCallback_Fct(void* fct)
 }
 // xmlInputCloseCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlInputCloseCallback_fct_##A = 0;                         \
-static int my_xmlInputCloseCallback_##A(void* a)                               \
-{                                                                               \
-    return RunFunction(my_context, my_xmlInputCloseCallback_fct_##A, 1, a);    \
+static uintptr_t my_xmlInputCloseCallback_fct_##A = 0;                              \
+static int my_xmlInputCloseCallback_##A(void* a)                                    \
+{                                                                                   \
+    return RunFunctionFmt(my_xmlInputCloseCallback_fct_##A, "p", a);    \
 }
 SUPER()
 #undef GO
@@ -365,7 +365,7 @@ static void* find_xmlInputCloseCallback_Fct(void* fct)
 static uintptr_t my_xmlSchemaValidityErrorFunc_fct_##A = 0;                                                                     \
 static void my_xmlSchemaValidityErrorFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i)  \
 {                                                                                                                               \
-    RunFunction(my_context, my_xmlSchemaValidityErrorFunc_fct_##A, 9, a, b, c, d, e, f, g, h, i);                               \
+    RunFunctionFmt(my_xmlSchemaValidityErrorFunc_fct_##A, "ppppppppp", a, b, c, d, e, f, g, h, i);                  \
 }
 SUPER()
 #undef GO
@@ -387,7 +387,7 @@ static void* find_xmlSchemaValidityErrorFunc_Fct(void* fct)
 static uintptr_t my_xmlSchemaValidityWarningFunc_fct_##A = 0;                                                                       \
 static void my_xmlSchemaValidityWarningFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i)    \
 {                                                                                                                                   \
-    RunFunction(my_context, my_xmlSchemaValidityWarningFunc_fct_##A, 9, a, b, c, d, e, f, g, h, i);                                 \
+    RunFunctionFmt(my_xmlSchemaValidityWarningFunc_fct_##A, "ppppppppp", a, b, c, d, e, f, g, h, i);                    \
 }
 SUPER()
 #undef GO
@@ -406,10 +406,10 @@ static void* find_xmlSchemaValidityWarningFunc_Fct(void* fct)
 }
 // xmlXPathFunction ...
 #define GO(A)   \
-static uintptr_t my_xmlXPathFunction_fct_##A = 0;                   \
-static void my_xmlXPathFunction_##A(void* a, int b)                 \
-{                                                                   \
-    RunFunction(my_context, my_xmlXPathFunction_fct_##A, 2, a, b);  \
+static uintptr_t my_xmlXPathFunction_fct_##A = 0;                       \
+static void my_xmlXPathFunction_##A(void* a, int b)                     \
+{                                                                       \
+    RunFunctionFmt(my_xmlXPathFunction_fct_##A, "pi", a, b);\
 }
 SUPER()
 #undef GO
@@ -428,10 +428,10 @@ static void* find_xmlXPathFunction_Fct(void* fct)
 }
 // internalSubsetSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_internalSubsetSAXFunc_fct_##A = 0;                          \
-static void my_internalSubsetSAXFunc_##A(void* a, void* b, void* c, void* d)    \
-{                                                                               \
-    RunFunction(my_context, my_internalSubsetSAXFunc_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_internalSubsetSAXFunc_fct_##A = 0;                                  \
+static void my_internalSubsetSAXFunc_##A(void* a, void* b, void* c, void* d)            \
+{                                                                                       \
+    RunFunctionFmt(my_internalSubsetSAXFunc_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -450,10 +450,10 @@ static void* find_internalSubsetSAXFunc_Fct(void* fct)
 }
 // isStandaloneSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_isStandaloneSAXFunc_fct_##A = 0;                        \
-static int my_isStandaloneSAXFunc_##A(void* a)                              \
-{                                                                           \
-    return RunFunction(my_context, my_isStandaloneSAXFunc_fct_##A, 1, a);   \
+static uintptr_t my_isStandaloneSAXFunc_fct_##A = 0;                            \
+static int my_isStandaloneSAXFunc_##A(void* a)                                  \
+{                                                                               \
+    return RunFunctionFmt(my_isStandaloneSAXFunc_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -472,10 +472,10 @@ static void* find_isStandaloneSAXFunc_Fct(void* fct)
 }
 // hasInternalSubsetSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_hasInternalSubsetSAXFunc_fct_##A = 0;                       \
-static int my_hasInternalSubsetSAXFunc_##A(void* a)                             \
-{                                                                               \
-    return RunFunction(my_context, my_hasInternalSubsetSAXFunc_fct_##A, 1, a);  \
+static uintptr_t my_hasInternalSubsetSAXFunc_fct_##A = 0;                           \
+static int my_hasInternalSubsetSAXFunc_##A(void* a)                                 \
+{                                                                                   \
+    return RunFunctionFmt(my_hasInternalSubsetSAXFunc_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -494,10 +494,10 @@ static void* find_hasInternalSubsetSAXFunc_Fct(void* fct)
 }
 // hasExternalSubsetSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_hasExternalSubsetSAXFunc_fct_##A = 0;                       \
-static int my_hasExternalSubsetSAXFunc_##A(void* a)                             \
-{                                                                               \
-    return RunFunction(my_context, my_hasExternalSubsetSAXFunc_fct_##A, 1, a);  \
+static uintptr_t my_hasExternalSubsetSAXFunc_fct_##A = 0;                           \
+static int my_hasExternalSubsetSAXFunc_##A(void* a)                                 \
+{                                                                                   \
+    return RunFunctionFmt(my_hasExternalSubsetSAXFunc_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -516,10 +516,10 @@ static void* find_hasExternalSubsetSAXFunc_Fct(void* fct)
 }
 // resolveEntitySAXFunc ...
 #define GO(A)   \
-static uintptr_t my_resolveEntitySAXFunc_fct_##A = 0;                                   \
-static void* my_resolveEntitySAXFunc_##A(void* a, void* b, void* c)                     \
-{                                                                                       \
-    return (void*)RunFunction(my_context, my_resolveEntitySAXFunc_fct_##A, 3, a, b, c); \
+static uintptr_t my_resolveEntitySAXFunc_fct_##A = 0;                                           \
+static void* my_resolveEntitySAXFunc_##A(void* a, void* b, void* c)                             \
+{                                                                                               \
+    return (void*)RunFunctionFmt(my_resolveEntitySAXFunc_fct_##A, "ppp", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -538,10 +538,10 @@ static void* find_resolveEntitySAXFunc_Fct(void* fct)
 }
 // getEntitySAXFunc ...
 #define GO(A)   \
-static uintptr_t my_getEntitySAXFunc_fct_##A = 0;                                   \
-static void* my_getEntitySAXFunc_##A(void* a, void* b)                              \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_getEntitySAXFunc_fct_##A, 2, a, b);    \
+static uintptr_t my_getEntitySAXFunc_fct_##A = 0;                                       \
+static void* my_getEntitySAXFunc_##A(void* a, void* b)                                  \
+{                                                                                       \
+    return (void*)RunFunctionFmt(my_getEntitySAXFunc_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -560,10 +560,10 @@ static void* find_getEntitySAXFunc_Fct(void* fct)
 }
 // entityDeclSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_entityDeclSAXFunc_fct_##A = 0;                                      \
-static void my_entityDeclSAXFunc_##A(void* a, void* b, int c, void* d, void* e, void* f)\
-{                                                                                       \
-    RunFunction(my_context, my_entityDeclSAXFunc_fct_##A, 6, a, b, c, d, e, f);         \
+static uintptr_t my_entityDeclSAXFunc_fct_##A = 0;                                          \
+static void my_entityDeclSAXFunc_##A(void* a, void* b, int c, void* d, void* e, void* f)    \
+{                                                                                           \
+    RunFunctionFmt(my_entityDeclSAXFunc_fct_##A, "ppippp", a, b, c, d, e, f);   \
 }
 SUPER()
 #undef GO
@@ -582,10 +582,10 @@ static void* find_entityDeclSAXFunc_Fct(void* fct)
 }
 // notationDeclSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_notationDeclSAXFunc_fct_##A = 0;                        \
-static void my_notationDeclSAXFunc_##A(void* a, void* b, void* c, void* d)  \
-{                                                                           \
-    RunFunction(my_context, my_notationDeclSAXFunc_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_notationDeclSAXFunc_fct_##A = 0;                                \
+static void my_notationDeclSAXFunc_##A(void* a, void* b, void* c, void* d)          \
+{                                                                                   \
+    RunFunctionFmt(my_notationDeclSAXFunc_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -607,7 +607,7 @@ static void* find_notationDeclSAXFunc_Fct(void* fct)
 static uintptr_t my_attributeDeclSAXFunc_fct_##A = 0;                                               \
 static void my_attributeDeclSAXFunc_##A(void* a, void* b, void* c, int d, int e, void* f, void* g)  \
 {                                                                                                   \
-    RunFunction(my_context, my_attributeDeclSAXFunc_fct_##A, 7, a, b, c, d, e, f, g);               \
+    RunFunctionFmt(my_attributeDeclSAXFunc_fct_##A, "pppiipp", a, b, c, d, e, f, g);    \
 }
 SUPER()
 #undef GO
@@ -626,10 +626,10 @@ static void* find_attributeDeclSAXFunc_Fct(void* fct)
 }
 // elementDeclSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_elementDeclSAXFunc_fct_##A = 0;                         \
-static void my_elementDeclSAXFunc_##A(void* a, void* b, int c, void* d)     \
-{                                                                           \
-    RunFunction(my_context, my_elementDeclSAXFunc_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_elementDeclSAXFunc_fct_##A = 0;                                 \
+static void my_elementDeclSAXFunc_##A(void* a, void* b, int c, void* d)             \
+{                                                                                   \
+    RunFunctionFmt(my_elementDeclSAXFunc_fct_##A, "ppip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
@@ -648,10 +648,10 @@ static void* find_elementDeclSAXFunc_Fct(void* fct)
 }
 // unparsedEntityDeclSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_unparsedEntityDeclSAXFunc_fct_##A = 0;                                  \
-static void my_unparsedEntityDeclSAXFunc_##A(void* a, void* b, void* c, void* d, void* e)   \
-{                                                                                           \
-    RunFunction(my_context, my_unparsedEntityDeclSAXFunc_fct_##A, 5, a, b, c, d, e);        \
+static uintptr_t my_unparsedEntityDeclSAXFunc_fct_##A = 0;                                      \
+static void my_unparsedEntityDeclSAXFunc_##A(void* a, void* b, void* c, void* d, void* e)       \
+{                                                                                               \
+    RunFunctionFmt(my_unparsedEntityDeclSAXFunc_fct_##A, "ppppp", a, b, c, d, e);   \
 }
 SUPER()
 #undef GO
@@ -670,10 +670,10 @@ static void* find_unparsedEntityDeclSAXFunc_Fct(void* fct)
 }
 // setDocumentLocatorSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_setDocumentLocatorSAXFunc_fct_##A = 0;                  \
-static void my_setDocumentLocatorSAXFunc_##A(void* a, void* b)              \
-{                                                                           \
-    RunFunction(my_context, my_setDocumentLocatorSAXFunc_fct_##A, 2, a, b); \
+static uintptr_t my_setDocumentLocatorSAXFunc_fct_##A = 0;                      \
+static void my_setDocumentLocatorSAXFunc_##A(void* a, void* b)                  \
+{                                                                               \
+    RunFunctionFmt(my_setDocumentLocatorSAXFunc_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -692,10 +692,10 @@ static void* find_setDocumentLocatorSAXFunc_Fct(void* fct)
 }
 // startDocumentSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_startDocumentSAXFunc_fct_##A = 0;               \
-static void my_startDocumentSAXFunc_##A(void* a)                    \
-{                                                                   \
-    RunFunction(my_context, my_startDocumentSAXFunc_fct_##A, 1, a); \
+static uintptr_t my_startDocumentSAXFunc_fct_##A = 0;                   \
+static void my_startDocumentSAXFunc_##A(void* a)                        \
+{                                                                       \
+    RunFunctionFmt(my_startDocumentSAXFunc_fct_##A, "p", a);\
 }
 SUPER()
 #undef GO
@@ -714,10 +714,10 @@ static void* find_startDocumentSAXFunc_Fct(void* fct)
 }
 // endDocumentSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_endDocumentSAXFunc_fct_##A = 0;               \
-static void my_endDocumentSAXFunc_##A(void* a)                    \
-{                                                                   \
-    RunFunction(my_context, my_endDocumentSAXFunc_fct_##A, 1, a); \
+static uintptr_t my_endDocumentSAXFunc_fct_##A = 0;                     \
+static void my_endDocumentSAXFunc_##A(void* a)                          \
+{                                                                       \
+    RunFunctionFmt(my_endDocumentSAXFunc_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -736,10 +736,10 @@ static void* find_endDocumentSAXFunc_Fct(void* fct)
 }
 // startElementSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_startElementSAXFunc_fct_##A = 0;                        \
-static void my_startElementSAXFunc_##A(void* a, void* b, void* c)           \
-{                                                                           \
-    RunFunction(my_context, my_startElementSAXFunc_fct_##A, 3, a, b, c);    \
+static uintptr_t my_startElementSAXFunc_fct_##A = 0;                            \
+static void my_startElementSAXFunc_##A(void* a, void* b, void* c)               \
+{                                                                               \
+    RunFunctionFmt(my_startElementSAXFunc_fct_##A, "ppp", a, b, c); \
 }
 SUPER()
 #undef GO
@@ -758,10 +758,10 @@ static void* find_startElementSAXFunc_Fct(void* fct)
 }
 // endElementSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_endElementSAXFunc_fct_##A = 0;                  \
-static void my_endElementSAXFunc_##A(void* a, void* b)              \
-{                                                                   \
-    RunFunction(my_context, my_endElementSAXFunc_fct_##A, 2, a, b); \
+static uintptr_t my_endElementSAXFunc_fct_##A = 0;                          \
+static void my_endElementSAXFunc_##A(void* a, void* b)                      \
+{                                                                           \
+    RunFunctionFmt(my_endElementSAXFunc_fct_##A, "pp", a, b);   \
 }
 SUPER()
 #undef GO
@@ -780,10 +780,10 @@ static void* find_endElementSAXFunc_Fct(void* fct)
 }
 // referenceSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_referenceSAXFunc_fct_##A = 0;                  \
-static void my_referenceSAXFunc_##A(void* a, void* b)              \
-{                                                                   \
-    RunFunction(my_context, my_referenceSAXFunc_fct_##A, 2, a, b); \
+static uintptr_t my_referenceSAXFunc_fct_##A = 0;                       \
+static void my_referenceSAXFunc_##A(void* a, void* b)                   \
+{                                                                       \
+    RunFunctionFmt(my_referenceSAXFunc_fct_##A, "pp", a, b);\
 }
 SUPER()
 #undef GO
@@ -802,10 +802,10 @@ static void* find_referenceSAXFunc_Fct(void* fct)
 }
 // charactersSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_charactersSAXFunc_fct_##A = 0;                      \
-static void my_charactersSAXFunc_##A(void* a, void* b, int c)           \
-{                                                                       \
-    RunFunction(my_context, my_charactersSAXFunc_fct_##A, 3, a, b, c);  \
+static uintptr_t my_charactersSAXFunc_fct_##A = 0;                              \
+static void my_charactersSAXFunc_##A(void* a, void* b, int c)                   \
+{                                                                               \
+    RunFunctionFmt(my_charactersSAXFunc_fct_##A, "ppi", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -824,10 +824,10 @@ static void* find_charactersSAXFunc_Fct(void* fct)
 }
 // ignorableWhitespaceSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_ignorableWhitespaceSAXFunc_fct_##A = 0;                      \
-static void my_ignorableWhitespaceSAXFunc_##A(void* a, void* b, int c)           \
-{                                                                       \
-    RunFunction(my_context, my_ignorableWhitespaceSAXFunc_fct_##A, 3, a, b, c);  \
+static uintptr_t my_ignorableWhitespaceSAXFunc_fct_##A = 0;                             \
+static void my_ignorableWhitespaceSAXFunc_##A(void* a, void* b, int c)                  \
+{                                                                                       \
+    RunFunctionFmt(my_ignorableWhitespaceSAXFunc_fct_##A, "ppi", a, b, c);  \
 }
 SUPER()
 #undef GO
@@ -846,10 +846,10 @@ static void* find_ignorableWhitespaceSAXFunc_Fct(void* fct)
 }
 // processingInstructionSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_processingInstructionSAXFunc_fct_##A = 0;                       \
-static void my_processingInstructionSAXFunc_##A(void* a, void* b, void* c)          \
-{                                                                                   \
-    RunFunction(my_context, my_processingInstructionSAXFunc_fct_##A, 3, a, b, c);   \
+static uintptr_t my_processingInstructionSAXFunc_fct_##A = 0;                               \
+static void my_processingInstructionSAXFunc_##A(void* a, void* b, void* c)                  \
+{                                                                                           \
+    RunFunctionFmt(my_processingInstructionSAXFunc_fct_##A, "ppp", a, b, c);    \
 }
 SUPER()
 #undef GO
@@ -868,10 +868,10 @@ static void* find_processingInstructionSAXFunc_Fct(void* fct)
 }
 // commentSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_commentSAXFunc_fct_##A = 0;                     \
-static void my_commentSAXFunc_##A(void* a, void* b)                 \
-{                                                                   \
-    RunFunction(my_context, my_commentSAXFunc_fct_##A, 2, a, b);    \
+static uintptr_t my_commentSAXFunc_fct_##A = 0;                         \
+static void my_commentSAXFunc_##A(void* a, void* b)                     \
+{                                                                       \
+    RunFunctionFmt(my_commentSAXFunc_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -890,10 +890,10 @@ static void* find_commentSAXFunc_Fct(void* fct)
 }
 // warningSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_warningSAXFunc_fct_##A = 0;                     \
-static void my_warningSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j)\
-{                                                                   \
-    RunFunction(my_context, my_warningSAXFunc_fct_##A, 10, a, b, c, d, e, f, g, h, i, j);    \
+static uintptr_t my_warningSAXFunc_fct_##A = 0; \
+static void my_warningSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j) \
+{   \
+    RunFunctionFmt(my_warningSAXFunc_fct_##A, "pppppppppp", a, b, c, d, e, f, g, h, i, j);  \
 }
 SUPER()
 #undef GO
@@ -912,10 +912,10 @@ static void* find_warningSAXFunc_Fct(void* fct) // this one have a VAArg
 }
 // errorSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_errorSAXFunc_fct_##A = 0;                     \
-static void my_errorSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j)\
-{                                                                   \
-    RunFunction(my_context, my_errorSAXFunc_fct_##A, 10, a, b, c, d, e, f, g, h, i, j);    \
+static uintptr_t my_errorSAXFunc_fct_##A = 0;   \
+static void my_errorSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j)   \
+{   \
+    RunFunctionFmt(my_errorSAXFunc_fct_##A, "pppppppppp", a, b, c, d, e, f, g, h, i, j);    \
 }
 SUPER()
 #undef GO
@@ -934,10 +934,10 @@ static void* find_errorSAXFunc_Fct(void* fct) // this one have a VAArg
 }
 // fatalErrorSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_fatalErrorSAXFunc_fct_##A = 0;                     \
-static void my_fatalErrorSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j)\
-{                                                                   \
-    RunFunction(my_context, my_fatalErrorSAXFunc_fct_##A, 10, a, b, c, d, e, f, g, h, i, j);    \
+static uintptr_t my_fatalErrorSAXFunc_fct_##A = 0;  \
+static void my_fatalErrorSAXFunc_##A(void* a, void* b, void* c, void* d, void* e, void* f, void* g, void* h, void* i, void* j)  \
+{   \
+    RunFunctionFmt(my_fatalErrorSAXFunc_fct_##A, "pppppppppp", a, b, c, d, e, f, g, h, i, j);   \
 }
 SUPER()
 #undef GO
@@ -956,10 +956,10 @@ static void* find_fatalErrorSAXFunc_Fct(void* fct) // this one have a VAArg
 }
 // getParameterEntitySAXFunc ...
 #define GO(A)   \
-static uintptr_t my_getParameterEntitySAXFunc_fct_##A = 0;                                  \
-static void* my_getParameterEntitySAXFunc_##A(void* a, void* b)                             \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_getParameterEntitySAXFunc_fct_##A, 2, a, b);   \
+static uintptr_t my_getParameterEntitySAXFunc_fct_##A = 0;                                      \
+static void* my_getParameterEntitySAXFunc_##A(void* a, void* b)                                 \
+{                                                                                               \
+    return (void*)RunFunctionFmt(my_getParameterEntitySAXFunc_fct_##A, "pp", a, b); \
 }
 SUPER()
 #undef GO
@@ -978,10 +978,10 @@ static void* find_getParameterEntitySAXFunc_Fct(void* fct) // this one have a VA
 }
 // cdataBlockSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_cdataBlockSAXFunc_fct_##A = 0;                      \
-static void my_cdataBlockSAXFunc_##A(void* a, void* b, int c)           \
-{                                                                       \
-    RunFunction(my_context, my_cdataBlockSAXFunc_fct_##A, 3, a, b, c);  \
+static uintptr_t my_cdataBlockSAXFunc_fct_##A = 0;                              \
+static void my_cdataBlockSAXFunc_##A(void* a, void* b, int c)                   \
+{                                                                               \
+    RunFunctionFmt(my_cdataBlockSAXFunc_fct_##A, "ppi", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1000,10 +1000,10 @@ static void* find_cdataBlockSAXFunc_Fct(void* fct) // this one have a VAArg
 }
 // externalSubsetSAXFunc ...
 #define GO(A)   \
-static uintptr_t my_externalSubsetSAXFunc_fct_##A = 0;                          \
-static void my_externalSubsetSAXFunc_##A(void* a, void* b, void* c, void* d)    \
-{                                                                               \
-    RunFunction(my_context, my_externalSubsetSAXFunc_fct_##A, 4, a, b, c, d);   \
+static uintptr_t my_externalSubsetSAXFunc_fct_##A = 0;                                  \
+static void my_externalSubsetSAXFunc_##A(void* a, void* b, void* c, void* d)            \
+{                                                                                       \
+    RunFunctionFmt(my_externalSubsetSAXFunc_fct_##A, "pppp", a, b, c, d);   \
 }
 SUPER()
 #undef GO
@@ -1025,7 +1025,7 @@ static void* find_externalSubsetSAXFunc_Fct(void* fct) // this one have a VAArg
 static uintptr_t my_xmlSAX2StartElementNs_fct_##A = 0;                                                              \
 static void my_xmlSAX2StartElementNs_##A(void* a, void* b, void* c, void* d, int e, void* f, int g, int h, void* i) \
 {                                                                                                                   \
-    RunFunction(my_context, my_xmlSAX2StartElementNs_fct_##A, 9, a, b, c, d, e, f, g, h, i);                        \
+    RunFunctionFmt(my_xmlSAX2StartElementNs_fct_##A, "ppppipiip", a, b, c, d, e, f, g, h, i);           \
 }
 SUPER()
 #undef GO
@@ -1044,10 +1044,10 @@ static void* find_xmlSAX2StartElementNs_Fct(void* fct) // this one have a VAArg
 }
 // xmlSAX2EndElementNs ...
 #define GO(A)   \
-static uintptr_t my_xmlSAX2EndElementNs_fct_##A = 0;                        \
-static void my_xmlSAX2EndElementNs_##A(void* a, void* b, void* c, void* d)  \
-{                                                                           \
-    RunFunction(my_context, my_xmlSAX2EndElementNs_fct_##A, 4, a, b, c, d); \
+static uintptr_t my_xmlSAX2EndElementNs_fct_##A = 0;                                \
+static void my_xmlSAX2EndElementNs_##A(void* a, void* b, void* c, void* d)          \
+{                                                                                   \
+    RunFunctionFmt(my_xmlSAX2EndElementNs_fct_##A, "pppp", a, b, c, d); \
 }
 SUPER()
 #undef GO
@@ -1067,10 +1067,10 @@ static void* find_xmlSAX2EndElementNs_Fct(void* fct) // this one have a VAArg
 
 // xmlExternalEntityLoader
 #define GO(A)   \
-static uintptr_t my_xmlExternalEntityLoader_fct_##A = 0;                                    \
-static void* my_xmlExternalEntityLoader_##A(void* a, void* b, void* c)                      \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_xmlExternalEntityLoader_fct_##A, 3, a, b, c);  \
+static uintptr_t my_xmlExternalEntityLoader_fct_##A = 0;                                            \
+static void* my_xmlExternalEntityLoader_##A(void* a, void* b, void* c)                              \
+{                                                                                                   \
+    return (void*)RunFunctionFmt(my_xmlExternalEntityLoader_fct_##A, "ppp", a, b, c);   \
 }
 SUPER()
 #undef GO
@@ -1101,15 +1101,15 @@ static void* reverse_xmlExternalEntityLoaderFct(void* fct)
 
 // xmlGenericErrorFunc
 #define GO(A)   \
-static uintptr_t my_xmlGenericErrorFunc_fct_##A = 0;                                    \
-static void my_xmlGenericErrorFunc_##A(void* a, const char* fmt, ...)                   \
-{                                                                                       \
-    char buf[4096];                                                                     \
-    va_list args;                                                                       \
-    va_start(args, fmt);                                                                \
-    vsnprintf(buf, 4096, fmt, args);                                                    \
-    va_end(args);                                                                       \
-    RunFunction(my_context, my_xmlGenericErrorFunc_fct_##A, 2, a, buf);                 \
+static uintptr_t my_xmlGenericErrorFunc_fct_##A = 0;                            \
+static void my_xmlGenericErrorFunc_##A(void* a, const char* fmt, ...)           \
+{                                                                               \
+    char buf[4096];                                                             \
+    va_list args;                                                               \
+    va_start(args, fmt);                                                        \
+    vsnprintf(buf, 4096, fmt, args);                                            \
+    va_end(args);                                                               \
+    RunFunctionFmt(my_xmlGenericErrorFunc_fct_##A, "pp", a, buf);   \
 }
 SUPER()
 #undef GO
@@ -1139,10 +1139,10 @@ static void* reverse_xmlGenericErrorFunc_Fct(void* fct)
 
 // xmlStructuredErrorFunc
 #define GO(A)   \
-static uintptr_t my_xmlStructuredErrorFunc_fct_##A = 0;                     \
-static void my_xmlStructuredErrorFunc_##A(void* a, const char* b)           \
-{                                                                           \
-    RunFunction(my_context, my_xmlStructuredErrorFunc_fct_##A, 2, a, b);    \
+static uintptr_t my_xmlStructuredErrorFunc_fct_##A = 0;                         \
+static void my_xmlStructuredErrorFunc_##A(void* a, const char* b)               \
+{                                                                               \
+    RunFunctionFmt(my_xmlStructuredErrorFunc_fct_##A, "pp", a, b);  \
 }
 SUPER()
 #undef GO
@@ -1172,10 +1172,10 @@ static void* reverse_xmlStructuredErrorFunc_Fct(void* fct)
 
 // xmlOutputMatchCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlOutputMatchCallback_fct_##A = 0;                             \
-static int my_xmlOutputMatchCallback_##A(void* a)                                   \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_xmlOutputMatchCallback_fct_##A, 1, a);   \
+static uintptr_t my_xmlOutputMatchCallback_fct_##A = 0;                                 \
+static int my_xmlOutputMatchCallback_##A(void* a)                                       \
+{                                                                                       \
+    return (int)RunFunctionFmt(my_xmlOutputMatchCallback_fct_##A, "p", a);  \
 }
 SUPER()
 #undef GO
@@ -1195,10 +1195,10 @@ static void* find_xmlOutputMatchCallback_Fct(void* fct) // this one have a VAArg
 
 // xmlOutputOpenCallback ...
 #define GO(A)   \
-static uintptr_t my_xmlOutputOpenCallback_fct_##A = 0;                              \
-static void* my_xmlOutputOpenCallback_##A(void* a)                                  \
-{                                                                                   \
-    return (void*)RunFunction(my_context, my_xmlOutputOpenCallback_fct_##A, 1, a);  \
+static uintptr_t my_xmlOutputOpenCallback_fct_##A = 0;                                  \
+static void* my_xmlOutputOpenCallback_##A(void* a)                                      \
+{                                                                                       \
+    return (void*)RunFunctionFmt(my_xmlOutputOpenCallback_fct_##A, "p", a); \
 }
 SUPER()
 #undef GO
@@ -1218,10 +1218,10 @@ static void* find_xmlOutputOpenCallback_Fct(void* fct) // this one have a VAArg
 
 // xmlTextReaderErrorFunc ...
 #define GO(A)   \
-static uintptr_t my_xmlTextReaderErrorFunc_fct_##A = 0;                         \
-static void my_xmlTextReaderErrorFunc_##A(void* a, void* b, int c, void* d)     \
-{                                                                               \
-    RunFunction(my_context, my_xmlTextReaderErrorFunc_fct_##A, 4, a, b, c, d);  \
+static uintptr_t my_xmlTextReaderErrorFunc_fct_##A = 0;                                 \
+static void my_xmlTextReaderErrorFunc_##A(void* a, void* b, int c, void* d)             \
+{                                                                                       \
+    RunFunctionFmt(my_xmlTextReaderErrorFunc_fct_##A, "ppip", a, b, c, d);  \
 }
 SUPER()
 #undef GO
diff --git a/src/wrapped/wrappedxslt.c b/src/wrapped/wrappedxslt.c
index 118dc5b7..ad145b2d 100644
--- a/src/wrapped/wrappedxslt.c
+++ b/src/wrapped/wrappedxslt.c
@@ -40,10 +40,10 @@ GO(4)
 
 // xmlXPathFunction ...
 #define GO(A)   \
-static uintptr_t my_xmlXPathFunction_fct_##A = 0;                   \
-static void my_xmlXPathFunction_##A(void* a, int b)                 \
-{                                                                   \
-    RunFunction(my_context, my_xmlXPathFunction_fct_##A, 2, a, b);  \
+static uintptr_t my_xmlXPathFunction_fct_##A = 0;                           \
+static void my_xmlXPathFunction_##A(void* a, int b)                         \
+{                                                                           \
+    RunFunctionFmt(my_xmlXPathFunction_fct_##A, "pi", a, b);          \
 }
 SUPER()
 #undef GO
@@ -62,10 +62,10 @@ static void* find_xmlXPathFunction_Fct(void* fct)
 }
 // xsltDocLoaderFunc ...
 #define GO(A)   \
-static uintptr_t my_xsltDocLoaderFunc_fct_##A = 0;                                          \
-static void* my_xsltDocLoaderFunc_##A(void* a, void* b, int c, void* d, int e)              \
-{                                                                                           \
-    return (void*)RunFunction(my_context, my_xsltDocLoaderFunc_fct_##A, 5, a, b, c, d, e);  \
+static uintptr_t my_xsltDocLoaderFunc_fct_##A = 0;                              \
+static void* my_xsltDocLoaderFunc_##A(void* a, void* b, int c, void* d, int e)  \
+{                                                                               \
+    return (void*)RunFunctionFmt(my_xsltDocLoaderFunc_fct_##A, "ppipi", a, b, c, d, e);       \
 }
 SUPER()
 #undef GO
@@ -84,10 +84,10 @@ static void* find_xsltDocLoaderFunc_Fct(void* fct)
 }
 // xsltSecurityCheck ...
 #define GO(A)   \
-static uintptr_t my_xsltSecurityCheck_fct_##A = 0;                                  \
-static int my_xsltSecurityCheck_##A(void* a, void* b, void* c)                      \
-{                                                                                   \
-    return (int)RunFunction(my_context, my_xsltSecurityCheck_fct_##A, 3, a, b, c);  \
+static uintptr_t my_xsltSecurityCheck_fct_##A = 0;                                          \
+static int my_xsltSecurityCheck_##A(void* a, void* b, void* c)                              \
+{                                                                                           \
+    return (int)RunFunctionFmt(my_xsltSecurityCheck_fct_##A, "ppp", a, b, c);         \
 }
 SUPER()
 #undef GO
@@ -106,10 +106,10 @@ static void* find_xsltSecurityCheck_Fct(void* fct)
 }
 // xsltSortFunc ...
 #define GO(A)   \
-static uintptr_t my_xsltSortFunc_fct_##A = 0;                       \
-static void my_xsltSortFunc_##A(void* a, void* b, int c)            \
-{                                                                   \
-    RunFunction(my_context, my_xsltSortFunc_fct_##A, 3, a, b, c);   \
+static uintptr_t my_xsltSortFunc_fct_##A = 0;                               \
+static void my_xsltSortFunc_##A(void* a, void* b, int c)                    \
+{                                                                           \
+    RunFunctionFmt(my_xsltSortFunc_fct_##A, "ppi", a, b, c);          \
 }
 SUPER()
 #undef GO