about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/box32.c20
-rw-r--r--src/include/threads.h1
-rw-r--r--src/libtools/threads.c5
-rwxr-xr-xsrc/libtools/threads32.c3
-rw-r--r--src/wrapped32/generated/functions_list.txt37
-rw-r--r--src/wrapped32/generated/wrappedlibpthreadtypes32.h20
-rw-r--r--src/wrapped32/generated/wrapper32.c38
-rw-r--r--src/wrapped32/generated/wrapper32.h19
-rwxr-xr-xsrc/wrapped32/wrappedlibpthread_private.h26
9 files changed, 90 insertions, 79 deletions
diff --git a/src/box32.c b/src/box32.c
index d08a29d0..66967f1c 100644
--- a/src/box32.c
+++ b/src/box32.c
@@ -15,9 +15,9 @@ KHASH_MAP_INIT_STR(strings, ptr_t);
 
 static kh_from_t*   hash_from;
 static kh_to_t*     hash_to;
-#define CNT_INIT 0x80000001
-#define HASH_MASK 0x7fffffff
-static uint32_t     hash_cnt = CNT_INIT;
+#define HASH_MSK    0xff000000
+#define HASH_VAL    0x00ffffff
+static uint32_t     hash_cnt = 1;
 static pthread_rwlock_t hash_lock = {0};
 static int          hash_running = 0;
 // locale
@@ -41,7 +41,7 @@ void fini_hash_helper() {
     hash_from = NULL;
     kh_destroy(to, hash_to);
     hash_to = NULL;
-    hash_cnt = CNT_INIT;
+    hash_cnt = 1;
     kh_destroy(from, locale_from);
     locale_from = NULL;
     kh_destroy(to, locale_to);
@@ -54,7 +54,7 @@ void fini_hash_helper() {
 // Convert from hash key to original 64bits value
 uintptr_t from_hash(ulong_t l) {
     // easy case first
-    if((l&HASH_MASK)==l) {
+    if((l&HASH_MSK)!=HASH_MSK) {
         return (uintptr_t)l;
     }
     if(l==0xffffffff) {
@@ -83,9 +83,8 @@ uintptr_t from_hash_d(ulong_t l) {
 
 // Convert from 64bits to hash key, creating it if needed
 ulong_t to_hash(uintptr_t p) {
-    if((p&(uintptr_t)HASH_MASK)==p) {
+    if((p<0x100000000LL) && (p&HASH_MSK!=HASH_MSK))
         return (ulong_t)p;
-    }
     if(p==0xffffffffffffffffll) {
         return 0xffffffff;
     }
@@ -101,9 +100,8 @@ ulong_t to_hash(uintptr_t p) {
         // create a new key, but need write lock!
         pthread_rwlock_unlock(&hash_lock);
         pthread_rwlock_wrlock(&hash_lock);
-        ret = hash_cnt++;
-        if(hash_cnt==0xffffffff)
-            hash_cnt = CNT_INIT;
+        ret = HASH_MSK | hash_cnt++;
+        hash_cnt&=HASH_VAL;
         int r;
         k = kh_put(to, hash_to, p, &r);
         kh_value(hash_to, k) = ret;
@@ -118,7 +116,7 @@ ulong_t to_hash(uintptr_t p) {
 
 // Convert from 64bits to hash key and delete the entry from both hash table
 ulong_t to_hash_d(uintptr_t p) {
-    if((p&(uintptr_t)HASH_MASK)==p)
+    if((p<0x100000000LL) && (p&HASH_MSK!=HASH_MSK))
         return (ulong_t)p;
     if(p==0xffffffffffffffffll)
         return 0xffffffff;
diff --git a/src/include/threads.h b/src/include/threads.h
index dee33f58..fcceff33 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -10,6 +10,7 @@ typedef struct emuthread_s {
 	x64emu_t*	emu;
 	int			join;
 	uintptr_t	self;
+	ulong_t 	hself;
 	int			cancel_cap, cancel_size;
 	void**		cancels;
 } emuthread_t;
diff --git a/src/libtools/threads.c b/src/libtools/threads.c
index f51f95c6..15a14422 100644
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -134,6 +134,10 @@ static void emuthread_destroy(void* p)
 	emuthread_t *et = (emuthread_t*)p;
 	if(!et)
 		return;
+	#ifdef BOX32
+	if(!et->join && et->fnc)
+		to_hash_d(et->self);
+	#endif
 	FreeX64Emu(&et->emu);
 	box_free(et);
 }
@@ -177,6 +181,7 @@ void thread_set_emu(x64emu_t* emu)
 	#ifdef BOX32
 	if(box64_is32bits) {
 		et->self = (uintptr_t)pthread_self();
+		et->hself = to_hash(et->self);
 	}
 	#endif
 	pthread_setspecific(thread_key, et);
diff --git a/src/libtools/threads32.c b/src/libtools/threads32.c
index 755c2cd2..74820c4f 100755
--- a/src/libtools/threads32.c
+++ b/src/libtools/threads32.c
@@ -99,6 +99,8 @@ static void emuthread_destroy(void* p)
 	if(!et)
 		return;
 	// destroy thread emu and all
+	if(!et->join && et->fnc)	// if there is no function, that this thread was not built from a create_thread, don't touch the hash...
+		to_hash_d(et->self);
 	FreeX64Emu(&et->emu);
 	free(et);
 }
@@ -135,6 +137,7 @@ static void* pthread_routine(void* p)
 	emuthread_t *et = (emuthread_t*)p;
 	et->emu->type = EMUTYPE_MAIN;
 	et->self = (uintptr_t)pthread_self();
+	et->hself = to_hash(et->self);
 	// setup callstack and run...
 	x64emu_t* emu = et->emu;
 	Push_32(emu, 0);	// PUSH 0 (backtrace marker: return address is 0)
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 3923edee..2cd368f9 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -37,6 +37,7 @@
 #() pFu -> pFu
 #() pFL -> pFL
 #() pFp -> pFp
+#() hFv -> hFv
 #() aFa -> aFa
 #() tFi -> tFi
 #() tFp -> tFp
@@ -49,6 +50,7 @@
 #() iFEi -> iFEi
 #() iFEL -> iFEL
 #() iFEp -> iFEp
+#() iFEh -> iFEh
 #() iFEO -> iFEO
 #() iFii -> iFii
 #() iFiI -> iFiI
@@ -60,16 +62,15 @@
 #() iFuu -> iFuu
 #() iFup -> iFup
 #() iFli -> iFli
-#() iFLi -> iFLi
-#() iFLL -> iFLL
-#() iFLp -> iFLp
 #() iFpi -> iFpi
 #() iFpu -> iFpu
 #() iFpL -> iFpL
 #() iFpp -> iFpp
 #() iFpV -> iFpV
 #() iFpS -> iFpS
+#() iFhi -> iFhi
 #() iFhp -> iFhp
+#() iFhh -> iFhh
 #() IFII -> IFII
 #() uFEu -> uFEu
 #() uFEV -> uFEV
@@ -118,11 +119,11 @@
 #() vFdpp -> vFdpp
 #() vFppu -> vFppu
 #() iFEip -> iFEip
-#() iFELi -> iFELi
 #() iFEpi -> iFEpi
 #() iFEpL -> iFEpL
 #() iFEpp -> iFEpp
 #() iFEpV -> iFEpV
+#() iFEhi -> iFEhi
 #() iFESp -> iFESp
 #() iFiii -> iFiii
 #() iFiiI -> iFiiI
@@ -139,9 +140,6 @@
 #() iFuui -> iFuui
 #() iFuuu -> iFuuu
 #() iFuLp -> iFuLp
-#() iFLip -> iFLip
-#() iFLpL -> iFLpL
-#() iFLpp -> iFLpp
 #() iFpiu -> iFpiu
 #() iFpip -> iFpip
 #() iFpuu -> iFpuu
@@ -152,6 +150,9 @@
 #() iFppp -> iFppp
 #() iFppa -> iFppa
 #() iFpOu -> iFpOu
+#() iFhip -> iFhip
+#() iFhpL -> iFhpL
+#() iFhpp -> iFhpp
 #() iFSIi -> iFSIi
 #() iFSli -> iFSli
 #() IFiIi -> IFiIi
@@ -195,7 +196,6 @@
 #() iFEiiN -> iFEiiN
 #() iFEipp -> iFEipp
 #() iFEipV -> iFEipV
-#() iFELup -> iFELup
 #() iFEpip -> iFEpip
 #() iFEpup -> iFEpup
 #() iFEpLi -> iFEpLi
@@ -203,6 +203,7 @@
 #() iFEppp -> iFEppp
 #() iFEppV -> iFEppV
 #() iFEpOu -> iFEpOu
+#() iFEhup -> iFEhup
 #() iFESpp -> iFESpp
 #() iFESpV -> iFESpV
 #() iFiiip -> iFiiip
@@ -245,7 +246,7 @@
 #() iFpppup -> iFpppup
 #() uFpLLLS -> uFpLLLS
 #() LFpLppa -> LFpLppa
-#() iFEBL_ppp -> iFEBppp
+#() iFEBh_ppp -> iFEBppp
 #() LFpbp_LLp -> LFpBLLp
 #() LFpBp_LLp -> LFpBLLp
 #() iFippprLL_ -> iFipppB
@@ -506,8 +507,6 @@ wrappedlibpthread:
   - __pthread_register_cancel
   - __pthread_unregister_cancel
   - __pthread_unwind_next
-- iFL:
-  - pthread_detach
 - iFp:
   - __pthread_mutex_destroy
   - __pthread_mutex_lock
@@ -530,11 +529,11 @@ wrappedlibpthread:
   - pthread_rwlock_rdlock
   - pthread_rwlock_unlock
   - pthread_rwlock_wrlock
+- iFh:
+  - pthread_detach
 - vFpi:
   - _pthread_cleanup_pop
   - _pthread_cleanup_pop_restore
-- iFLi:
-  - pthread_kill
 - iFpi:
   - pthread_attr_setdetachstate
   - pthread_attr_setinheritsched
@@ -568,12 +567,11 @@ wrappedlibpthread:
   - pthread_mutex_timedlock
   - pthread_once
   - pthread_rwlock_init
+- iFhi:
+  - pthread_kill
 - vFppp:
   - _pthread_cleanup_push
   - _pthread_cleanup_push_defer
-- iFLup:
-  - pthread_getaffinity_np
-  - pthread_setaffinity_np
 - iFpup:
   - pthread_attr_setaffinity_np
 - iFppL:
@@ -582,9 +580,12 @@ wrappedlibpthread:
   - __pthread_atfork
   - pthread_atfork
   - pthread_attr_getstack
-- iFLppp:
-  - pthread_create
+- iFhup:
+  - pthread_getaffinity_np
+  - pthread_setaffinity_np
 - iFppLL:
   - pthread_cond_timedwait
   - pthread_cond_timedwait@GLIBC_2.0
+- iFhppp:
+  - pthread_create
 wrappedlibrt:
diff --git a/src/wrapped32/generated/wrappedlibpthreadtypes32.h b/src/wrapped32/generated/wrappedlibpthreadtypes32.h
index 6df2a879..16481475 100644
--- a/src/wrapped32/generated/wrappedlibpthreadtypes32.h
+++ b/src/wrapped32/generated/wrappedlibpthreadtypes32.h
@@ -13,27 +13,26 @@
 
 typedef void (*vFv_t)(void);
 typedef void (*vFp_t)(void*);
-typedef int32_t (*iFL_t)(uintptr_t);
 typedef int32_t (*iFp_t)(void*);
+typedef int32_t (*iFh_t)(uintptr_t);
 typedef void (*vFpi_t)(void*, int32_t);
-typedef int32_t (*iFLi_t)(uintptr_t, int32_t);
 typedef int32_t (*iFpi_t)(void*, int32_t);
 typedef int32_t (*iFpL_t)(void*, uintptr_t);
 typedef int32_t (*iFpp_t)(void*, void*);
+typedef int32_t (*iFhi_t)(uintptr_t, int32_t);
 typedef void (*vFppp_t)(void*, void*, void*);
-typedef int32_t (*iFLup_t)(uintptr_t, uint32_t, void*);
 typedef int32_t (*iFpup_t)(void*, uint32_t, void*);
 typedef int32_t (*iFppL_t)(void*, void*, uintptr_t);
 typedef int32_t (*iFppp_t)(void*, void*, void*);
-typedef int32_t (*iFLppp_t)(uintptr_t, void*, void*, void*);
+typedef int32_t (*iFhup_t)(uintptr_t, uint32_t, void*);
 typedef int32_t (*iFppLL_t)(void*, void*, uintptr_t, uintptr_t);
+typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*);
 
 #define SUPER() ADDED_FUNCTIONS() \
 	GO(__pthread_initialize, vFv_t) \
 	GO(__pthread_register_cancel, vFp_t) \
 	GO(__pthread_unregister_cancel, vFp_t) \
 	GO(__pthread_unwind_next, vFp_t) \
-	GO(pthread_detach, iFL_t) \
 	GO(__pthread_mutex_destroy, iFp_t) \
 	GO(__pthread_mutex_lock, iFp_t) \
 	GO(__pthread_mutex_trylock, iFp_t) \
@@ -55,9 +54,9 @@ typedef int32_t (*iFppLL_t)(void*, void*, uintptr_t, uintptr_t);
 	GO(pthread_rwlock_rdlock, iFp_t) \
 	GO(pthread_rwlock_unlock, iFp_t) \
 	GO(pthread_rwlock_wrlock, iFp_t) \
+	GO(pthread_detach, iFh_t) \
 	GO(_pthread_cleanup_pop, vFpi_t) \
 	GO(_pthread_cleanup_pop_restore, vFpi_t) \
-	GO(pthread_kill, iFLi_t) \
 	GO(pthread_attr_setdetachstate, iFpi_t) \
 	GO(pthread_attr_setinheritsched, iFpi_t) \
 	GO(pthread_attr_setschedpolicy, iFpi_t) \
@@ -88,17 +87,18 @@ typedef int32_t (*iFppLL_t)(void*, void*, uintptr_t, uintptr_t);
 	GO(pthread_mutex_timedlock, iFpp_t) \
 	GO(pthread_once, iFpp_t) \
 	GO(pthread_rwlock_init, iFpp_t) \
+	GO(pthread_kill, iFhi_t) \
 	GO(_pthread_cleanup_push, vFppp_t) \
 	GO(_pthread_cleanup_push_defer, vFppp_t) \
-	GO(pthread_getaffinity_np, iFLup_t) \
-	GO(pthread_setaffinity_np, iFLup_t) \
 	GO(pthread_attr_setaffinity_np, iFpup_t) \
 	GO(pthread_attr_setstack, iFppL_t) \
 	GO(__pthread_atfork, iFppp_t) \
 	GO(pthread_atfork, iFppp_t) \
 	GO(pthread_attr_getstack, iFppp_t) \
-	GO(pthread_create, iFLppp_t) \
+	GO(pthread_getaffinity_np, iFhup_t) \
+	GO(pthread_setaffinity_np, iFhup_t) \
 	GO(pthread_cond_timedwait, iFppLL_t) \
-	GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t)
+	GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t) \
+	GO(pthread_create, iFhppp_t)
 
 #endif // __wrappedlibpthreadTYPES32_H_
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 04ff0e34..5c12b4bc 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -124,6 +124,7 @@ typedef void* (*pFi_t)(int32_t);
 typedef void* (*pFu_t)(uint32_t);
 typedef void* (*pFL_t)(uintptr_t);
 typedef void* (*pFp_t)(void*);
+typedef uintptr_t (*hFv_t)(void);
 typedef void* (*aFa_t)(void*);
 typedef char* (*tFi_t)(int32_t);
 typedef char* (*tFp_t)(void*);
@@ -136,6 +137,7 @@ typedef int32_t (*iFEv_t)(x64emu_t*);
 typedef int32_t (*iFEi_t)(x64emu_t*, int32_t);
 typedef int32_t (*iFEL_t)(x64emu_t*, uintptr_t);
 typedef int32_t (*iFEp_t)(x64emu_t*, void*);
+typedef int32_t (*iFEh_t)(x64emu_t*, uintptr_t);
 typedef int32_t (*iFEO_t)(x64emu_t*, int32_t);
 typedef int32_t (*iFii_t)(int32_t, int32_t);
 typedef int32_t (*iFiI_t)(int32_t, int64_t);
@@ -147,16 +149,15 @@ typedef int32_t (*iFui_t)(uint32_t, int32_t);
 typedef int32_t (*iFuu_t)(uint32_t, uint32_t);
 typedef int32_t (*iFup_t)(uint32_t, void*);
 typedef int32_t (*iFli_t)(intptr_t, int32_t);
-typedef int32_t (*iFLi_t)(uintptr_t, int32_t);
-typedef int32_t (*iFLL_t)(uintptr_t, uintptr_t);
-typedef int32_t (*iFLp_t)(uintptr_t, void*);
 typedef int32_t (*iFpi_t)(void*, int32_t);
 typedef int32_t (*iFpu_t)(void*, uint32_t);
 typedef int32_t (*iFpL_t)(void*, uintptr_t);
 typedef int32_t (*iFpp_t)(void*, void*);
 typedef int32_t (*iFpV_t)(void*, void*);
 typedef int32_t (*iFpS_t)(void*, void*);
+typedef int32_t (*iFhi_t)(uintptr_t, int32_t);
 typedef int32_t (*iFhp_t)(uintptr_t, void*);
+typedef int32_t (*iFhh_t)(uintptr_t, uintptr_t);
 typedef int64_t (*IFII_t)(int64_t, int64_t);
 typedef uint32_t (*uFEu_t)(x64emu_t*, uint32_t);
 typedef uint32_t (*uFEV_t)(x64emu_t*, void*);
@@ -205,11 +206,11 @@ typedef void (*vFfpp_t)(float, void*, void*);
 typedef void (*vFdpp_t)(double, void*, void*);
 typedef void (*vFppu_t)(void*, void*, uint32_t);
 typedef int32_t (*iFEip_t)(x64emu_t*, int32_t, void*);
-typedef int32_t (*iFELi_t)(x64emu_t*, uintptr_t, int32_t);
 typedef int32_t (*iFEpi_t)(x64emu_t*, void*, int32_t);
 typedef int32_t (*iFEpL_t)(x64emu_t*, void*, uintptr_t);
 typedef int32_t (*iFEpp_t)(x64emu_t*, void*, void*);
 typedef int32_t (*iFEpV_t)(x64emu_t*, void*, void*);
+typedef int32_t (*iFEhi_t)(x64emu_t*, uintptr_t, int32_t);
 typedef int32_t (*iFESp_t)(x64emu_t*, void*, void*);
 typedef int32_t (*iFiii_t)(int32_t, int32_t, int32_t);
 typedef int32_t (*iFiiI_t)(int32_t, int32_t, int64_t);
@@ -226,9 +227,6 @@ typedef int32_t (*iFuii_t)(uint32_t, int32_t, int32_t);
 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 (*iFuLp_t)(uint32_t, uintptr_t, void*);
-typedef int32_t (*iFLip_t)(uintptr_t, int32_t, void*);
-typedef int32_t (*iFLpL_t)(uintptr_t, void*, uintptr_t);
-typedef int32_t (*iFLpp_t)(uintptr_t, void*, void*);
 typedef int32_t (*iFpiu_t)(void*, int32_t, uint32_t);
 typedef int32_t (*iFpip_t)(void*, int32_t, void*);
 typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t);
@@ -239,6 +237,9 @@ typedef int32_t (*iFppL_t)(void*, void*, uintptr_t);
 typedef int32_t (*iFppp_t)(void*, void*, void*);
 typedef int32_t (*iFppa_t)(void*, void*, void*);
 typedef int32_t (*iFpOu_t)(void*, int32_t, uint32_t);
+typedef int32_t (*iFhip_t)(uintptr_t, int32_t, void*);
+typedef int32_t (*iFhpL_t)(uintptr_t, void*, uintptr_t);
+typedef int32_t (*iFhpp_t)(uintptr_t, void*, void*);
 typedef int32_t (*iFSIi_t)(void*, int64_t, int32_t);
 typedef int32_t (*iFSli_t)(void*, intptr_t, int32_t);
 typedef int64_t (*IFiIi_t)(int32_t, int64_t, int32_t);
@@ -282,7 +283,6 @@ 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 (*iFELup_t)(x64emu_t*, uintptr_t, uint32_t, void*);
 typedef int32_t (*iFEpip_t)(x64emu_t*, void*, int32_t, void*);
 typedef int32_t (*iFEpup_t)(x64emu_t*, void*, uint32_t, void*);
 typedef int32_t (*iFEpLi_t)(x64emu_t*, void*, uintptr_t, int32_t);
@@ -290,6 +290,7 @@ typedef int32_t (*iFEppL_t)(x64emu_t*, void*, void*, uintptr_t);
 typedef int32_t (*iFEppp_t)(x64emu_t*, void*, void*, void*);
 typedef int32_t (*iFEppV_t)(x64emu_t*, void*, void*, void*);
 typedef int32_t (*iFEpOu_t)(x64emu_t*, void*, int32_t, uint32_t);
+typedef int32_t (*iFEhup_t)(x64emu_t*, uintptr_t, uint32_t, void*);
 typedef int32_t (*iFESpp_t)(x64emu_t*, void*, void*, void*);
 typedef int32_t (*iFESpV_t)(x64emu_t*, void*, void*, void*);
 typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*);
@@ -332,7 +333,7 @@ typedef int32_t (*iFipLLi_t)(int32_t, void*, uintptr_t, uintptr_t, int32_t);
 typedef int32_t (*iFpppup_t)(void*, void*, void*, uint32_t, void*);
 typedef uint32_t (*uFpLLLS_t)(void*, uintptr_t, uintptr_t, uintptr_t, void*);
 typedef uintptr_t (*LFpLppa_t)(void*, uintptr_t, void*, void*, void*);
-typedef int32_t (*iFEBL_ppp_t)(x64emu_t*, struct_L_t*, void*, void*, void*);
+typedef int32_t (*iFEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, void*);
 typedef uintptr_t (*LFpbp_LLp_t)(void*, struct_p_t*, uintptr_t, uintptr_t, void*);
 typedef uintptr_t (*LFpBp_LLp_t)(void*, struct_p_t*, uintptr_t, uintptr_t, void*);
 typedef int32_t (*iFippprLL__t)(int32_t, void*, void*, void*, struct_LL_t*);
@@ -407,6 +408,7 @@ void pFi_32(x64emu_t *emu, uintptr_t fcn) { pFi_t fn = (pFi_t)fcn; R_EAX = to_pt
 void pFu_32(x64emu_t *emu, uintptr_t fcn) { pFu_t fn = (pFu_t)fcn; R_EAX = to_ptrv(fn(from_ptri(uint32_t, R_ESP + 4))); }
 void pFL_32(x64emu_t *emu, uintptr_t fcn) { pFL_t fn = (pFL_t)fcn; R_EAX = to_ptrv(fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)))); }
 void pFp_32(x64emu_t *emu, uintptr_t fcn) { pFp_t fn = (pFp_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4))); }
+void hFv_32(x64emu_t *emu, uintptr_t fcn) { hFv_t fn = (hFv_t)fcn; R_EAX = to_hash(fn()); }
 void aFa_32(x64emu_t *emu, uintptr_t fcn) { aFa_t fn = (aFa_t)fcn; R_EAX = to_locale(fn(from_locale(from_ptri(ptr_t, R_ESP + 4)))); }
 void tFi_32(x64emu_t *emu, uintptr_t fcn) { tFi_t fn = (tFi_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4))); }
 void tFp_32(x64emu_t *emu, uintptr_t fcn) { tFp_t fn = (tFp_t)fcn; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4))); }
@@ -419,6 +421,7 @@ void iFEv_32(x64emu_t *emu, uintptr_t fcn) { iFEv_t fn = (iFEv_t)fcn; R_EAX = fn
 void iFEi_32(x64emu_t *emu, uintptr_t fcn) { iFEi_t fn = (iFEi_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4)); }
 void iFEL_32(x64emu_t *emu, uintptr_t fcn) { iFEL_t fn = (iFEL_t)fcn; R_EAX = fn(emu, to_ulong(from_ptri(ulong_t, R_ESP + 4))); }
 void iFEp_32(x64emu_t *emu, uintptr_t fcn) { iFEp_t fn = (iFEp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4)); }
+void iFEh_32(x64emu_t *emu, uintptr_t fcn) { iFEh_t fn = (iFEh_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4))); }
 void iFEO_32(x64emu_t *emu, uintptr_t fcn) { iFEO_t fn = (iFEO_t)fcn; R_EAX = fn(emu, of_convert32(from_ptri(int32_t, R_ESP + 4))); }
 void iFii_32(x64emu_t *emu, uintptr_t fcn) { iFii_t fn = (iFii_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
 void iFiI_32(x64emu_t *emu, uintptr_t fcn) { iFiI_t fn = (iFiI_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 8)); }
@@ -430,16 +433,15 @@ void iFui_32(x64emu_t *emu, uintptr_t fcn) { iFui_t fn = (iFui_t)fcn; R_EAX = fn
 void iFuu_32(x64emu_t *emu, uintptr_t fcn) { iFuu_t fn = (iFuu_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); }
 void iFup_32(x64emu_t *emu, uintptr_t fcn) { iFup_t fn = (iFup_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); }
 void iFli_32(x64emu_t *emu, uintptr_t fcn) { iFli_t fn = (iFli_t)fcn; R_EAX = fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
-void iFLi_32(x64emu_t *emu, uintptr_t fcn) { iFLi_t fn = (iFLi_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
-void iFLL_32(x64emu_t *emu, uintptr_t fcn) { iFLL_t fn = (iFLL_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8))); }
-void iFLp_32(x64emu_t *emu, uintptr_t fcn) { iFLp_t fn = (iFLp_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); }
 void iFpi_32(x64emu_t *emu, uintptr_t fcn) { iFpi_t fn = (iFpi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
 void iFpu_32(x64emu_t *emu, uintptr_t fcn) { iFpu_t fn = (iFpu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); }
 void iFpL_32(x64emu_t *emu, uintptr_t fcn) { iFpL_t fn = (iFpL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8))); }
 void iFpp_32(x64emu_t *emu, uintptr_t fcn) { iFpp_t fn = (iFpp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
 void iFpV_32(x64emu_t *emu, uintptr_t fcn) { iFpV_t fn = (iFpV_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); }
 void iFpS_32(x64emu_t *emu, uintptr_t fcn) { iFpS_t fn = (iFpS_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), io_convert32(from_ptriv(R_ESP + 8))); }
+void iFhi_32(x64emu_t *emu, uintptr_t fcn) { iFhi_t fn = (iFhi_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
 void iFhp_32(x64emu_t *emu, uintptr_t fcn) { iFhp_t fn = (iFhp_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); }
+void iFhh_32(x64emu_t *emu, uintptr_t fcn) { iFhh_t fn = (iFhh_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_hash(from_ptri(ptr_t, R_ESP + 8))); }
 void IFII_32(x64emu_t *emu, uintptr_t fcn) { IFII_t fn = (IFII_t)fcn; ui64_t r; r.i = fn(from_ptri(int64_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
 void uFEu_32(x64emu_t *emu, uintptr_t fcn) { uFEu_t fn = (uFEu_t)fcn; R_EAX = (uint32_t)fn(emu, from_ptri(uint32_t, R_ESP + 4)); }
 void uFEV_32(x64emu_t *emu, uintptr_t fcn) { uFEV_t fn = (uFEV_t)fcn; R_EAX = (uint32_t)fn(emu, from_ptrv(R_ESP + 4)); }
@@ -488,11 +490,11 @@ void vFfpp_32(x64emu_t *emu, uintptr_t fcn) { vFfpp_t fn = (vFfpp_t)fcn; fn(from
 void vFdpp_32(x64emu_t *emu, uintptr_t fcn) { vFdpp_t fn = (vFdpp_t)fcn; fn(from_ptri(double, R_ESP + 4), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); }
 void vFppu_32(x64emu_t *emu, uintptr_t fcn) { vFppu_t fn = (vFppu_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
 void iFEip_32(x64emu_t *emu, uintptr_t fcn) { iFEip_t fn = (iFEip_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); }
-void iFELi_32(x64emu_t *emu, uintptr_t fcn) { iFELi_t fn = (iFELi_t)fcn; R_EAX = fn(emu, to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
 void iFEpi_32(x64emu_t *emu, uintptr_t fcn) { iFEpi_t fn = (iFEpi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); }
 void iFEpL_32(x64emu_t *emu, uintptr_t fcn) { iFEpL_t fn = (iFEpL_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8))); }
 void iFEpp_32(x64emu_t *emu, uintptr_t fcn) { iFEpp_t fn = (iFEpp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); }
 void iFEpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpV_t fn = (iFEpV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); }
+void iFEhi_32(x64emu_t *emu, uintptr_t fcn) { iFEhi_t fn = (iFEhi_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); }
 void iFESp_32(x64emu_t *emu, uintptr_t fcn) { iFESp_t fn = (iFESp_t)fcn; R_EAX = fn(emu, io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8)); }
 void iFiii_32(x64emu_t *emu, uintptr_t fcn) { iFiii_t fn = (iFiii_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); }
 void iFiiI_32(x64emu_t *emu, uintptr_t fcn) { iFiiI_t fn = (iFiiI_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int64_t, R_ESP + 12)); }
@@ -509,9 +511,6 @@ void iFuii_32(x64emu_t *emu, uintptr_t fcn) { iFuii_t fn = (iFuii_t)fcn; R_EAX =
 void iFuui_32(x64emu_t *emu, uintptr_t fcn) { iFuui_t fn = (iFuui_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); }
 void iFuuu_32(x64emu_t *emu, uintptr_t fcn) { iFuuu_t fn = (iFuuu_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
 void iFuLp_32(x64emu_t *emu, uintptr_t fcn) { iFuLp_t fn = (iFuLp_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12)); }
-void iFLip_32(x64emu_t *emu, uintptr_t fcn) { iFLip_t fn = (iFLip_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
-void iFLpL_32(x64emu_t *emu, uintptr_t fcn) { iFLpL_t fn = (iFLpL_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); }
-void iFLpp_32(x64emu_t *emu, uintptr_t fcn) { iFLpp_t fn = (iFLpp_t)fcn; R_EAX = fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFpiu_32(x64emu_t *emu, uintptr_t fcn) { iFpiu_t fn = (iFpiu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
 void iFpip_32(x64emu_t *emu, uintptr_t fcn) { iFpip_t fn = (iFpip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFpuu_32(x64emu_t *emu, uintptr_t fcn) { iFpuu_t fn = (iFpuu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); }
@@ -522,6 +521,9 @@ void iFppL_32(x64emu_t *emu, uintptr_t fcn) { iFppL_t fn = (iFppL_t)fcn; R_EAX =
 void iFppp_32(x64emu_t *emu, uintptr_t fcn) { iFppp_t fn = (iFppp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFppa_32(x64emu_t *emu, uintptr_t fcn) { iFppa_t fn = (iFppa_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_locale(from_ptri(ptr_t, R_ESP + 12))); }
 void iFpOu_32(x64emu_t *emu, uintptr_t fcn) { iFpOu_t fn = (iFpOu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12)); }
+void iFhip_32(x64emu_t *emu, uintptr_t fcn) { iFhip_t fn = (iFhip_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
+void iFhpL_32(x64emu_t *emu, uintptr_t fcn) { iFhpL_t fn = (iFhpL_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); }
+void iFhpp_32(x64emu_t *emu, uintptr_t fcn) { iFhpp_t fn = (iFhpp_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFSIi_32(x64emu_t *emu, uintptr_t fcn) { iFSIi_t fn = (iFSIi_t)fcn; R_EAX = fn(io_convert32(from_ptriv(R_ESP + 4)), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); }
 void iFSli_32(x64emu_t *emu, uintptr_t fcn) { iFSli_t fn = (iFSli_t)fcn; R_EAX = fn(io_convert32(from_ptriv(R_ESP + 4)), to_long(from_ptri(long_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); }
 void IFiIi_32(x64emu_t *emu, uintptr_t fcn) { IFiIi_t fn = (IFiIi_t)fcn; ui64_t r; r.i = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
@@ -565,7 +567,6 @@ void iFEiip_32(x64emu_t *emu, uintptr_t fcn) { iFEiip_t fn = (iFEiip_t)fcn; R_EA
 void iFEiiN_32(x64emu_t *emu, uintptr_t fcn) { iFEiiN_t fn = (iFEiiN_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEipp_32(x64emu_t *emu, uintptr_t fcn) { iFEipp_t fn = (iFEipp_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEipV_32(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); }
-void iFELup_32(x64emu_t *emu, uintptr_t fcn) { iFELup_t fn = (iFELup_t)fcn; R_EAX = fn(emu, to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEpip_32(x64emu_t *emu, uintptr_t fcn) { iFEpip_t fn = (iFEpip_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEpup_32(x64emu_t *emu, uintptr_t fcn) { iFEpup_t fn = (iFEpup_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEpLi_32(x64emu_t *emu, uintptr_t fcn) { iFEpLi_t fn = (iFEpLi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); }
@@ -573,6 +574,7 @@ void iFEppL_32(x64emu_t *emu, uintptr_t fcn) { iFEppL_t fn = (iFEppL_t)fcn; R_EA
 void iFEppp_32(x64emu_t *emu, uintptr_t fcn) { iFEppp_t fn = (iFEppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFEppV_32(x64emu_t *emu, uintptr_t fcn) { iFEppV_t fn = (iFEppV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); }
 void iFEpOu_32(x64emu_t *emu, uintptr_t fcn) { iFEpOu_t fn = (iFEpOu_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12)); }
+void iFEhup_32(x64emu_t *emu, uintptr_t fcn) { iFEhup_t fn = (iFEhup_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFESpp_32(x64emu_t *emu, uintptr_t fcn) { iFESpp_t fn = (iFESpp_t)fcn; R_EAX = fn(emu, io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); }
 void iFESpV_32(x64emu_t *emu, uintptr_t fcn) { iFESpV_t fn = (iFESpV_t)fcn; R_EAX = fn(emu, io_convert32(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); }
 void iFiiip_32(x64emu_t *emu, uintptr_t fcn) { iFiiip_t fn = (iFiiip_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); }
@@ -615,7 +617,7 @@ void iFipLLi_32(x64emu_t *emu, uintptr_t fcn) { iFipLLi_t fn = (iFipLLi_t)fcn; R
 void iFpppup_32(x64emu_t *emu, uintptr_t fcn) { iFpppup_t fn = (iFpppup_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptriv(R_ESP + 20)); }
 void uFpLLLS_32(x64emu_t *emu, uintptr_t fcn) { uFpLLLS_t fn = (uFpLLLS_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), io_convert32(from_ptriv(R_ESP + 20))); }
 void LFpLppa_32(x64emu_t *emu, uintptr_t fcn) { LFpLppa_t fn = (LFpLppa_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_locale(from_ptri(ptr_t, R_ESP + 20)))); }
-void iFEBL_ppp_32(x64emu_t *emu, uintptr_t fcn) { iFEBL_ppp_t fn = (iFEBL_ppp_t)fcn; struct_L_t arg_4; R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); }
+void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fcn) { iFEBh_ppp_t fn = (iFEBh_ppp_t)fcn; struct_h_t arg_4; R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_h(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); }
 void LFpbp_LLp_32(x64emu_t *emu, uintptr_t fcn) { LFpbp_LLp_t fn = (LFpbp_LLp_t)fcn; struct_p_t arg_8; from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_LLp_t fn = (LFpBp_LLp_t)fcn; struct_p_t arg_8; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void iFippprLL__32(x64emu_t *emu, uintptr_t fcn) { iFippprLL__t fn = (iFippprLL__t)fcn; struct_LL_t arg_20; from_struct_LL(&arg_20, *(ptr_t*)(from_ptr((R_ESP + 20)))); R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL); }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 61005e0f..2979bc06 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -77,6 +77,7 @@ void pFi_32(x64emu_t *emu, uintptr_t fnc);
 void pFu_32(x64emu_t *emu, uintptr_t fnc);
 void pFL_32(x64emu_t *emu, uintptr_t fnc);
 void pFp_32(x64emu_t *emu, uintptr_t fnc);
+void hFv_32(x64emu_t *emu, uintptr_t fnc);
 void aFa_32(x64emu_t *emu, uintptr_t fnc);
 void tFi_32(x64emu_t *emu, uintptr_t fnc);
 void tFp_32(x64emu_t *emu, uintptr_t fnc);
@@ -89,6 +90,7 @@ void iFEv_32(x64emu_t *emu, uintptr_t fnc);
 void iFEi_32(x64emu_t *emu, uintptr_t fnc);
 void iFEL_32(x64emu_t *emu, uintptr_t fnc);
 void iFEp_32(x64emu_t *emu, uintptr_t fnc);
+void iFEh_32(x64emu_t *emu, uintptr_t fnc);
 void iFEO_32(x64emu_t *emu, uintptr_t fnc);
 void iFii_32(x64emu_t *emu, uintptr_t fnc);
 void iFiI_32(x64emu_t *emu, uintptr_t fnc);
@@ -100,16 +102,15 @@ void iFui_32(x64emu_t *emu, uintptr_t fnc);
 void iFuu_32(x64emu_t *emu, uintptr_t fnc);
 void iFup_32(x64emu_t *emu, uintptr_t fnc);
 void iFli_32(x64emu_t *emu, uintptr_t fnc);
-void iFLi_32(x64emu_t *emu, uintptr_t fnc);
-void iFLL_32(x64emu_t *emu, uintptr_t fnc);
-void iFLp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpi_32(x64emu_t *emu, uintptr_t fnc);
 void iFpu_32(x64emu_t *emu, uintptr_t fnc);
 void iFpL_32(x64emu_t *emu, uintptr_t fnc);
 void iFpp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpV_32(x64emu_t *emu, uintptr_t fnc);
 void iFpS_32(x64emu_t *emu, uintptr_t fnc);
+void iFhi_32(x64emu_t *emu, uintptr_t fnc);
 void iFhp_32(x64emu_t *emu, uintptr_t fnc);
+void iFhh_32(x64emu_t *emu, uintptr_t fnc);
 void IFII_32(x64emu_t *emu, uintptr_t fnc);
 void uFEu_32(x64emu_t *emu, uintptr_t fnc);
 void uFEV_32(x64emu_t *emu, uintptr_t fnc);
@@ -158,11 +159,11 @@ void vFfpp_32(x64emu_t *emu, uintptr_t fnc);
 void vFdpp_32(x64emu_t *emu, uintptr_t fnc);
 void vFppu_32(x64emu_t *emu, uintptr_t fnc);
 void iFEip_32(x64emu_t *emu, uintptr_t fnc);
-void iFELi_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpi_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpL_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpp_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpV_32(x64emu_t *emu, uintptr_t fnc);
+void iFEhi_32(x64emu_t *emu, uintptr_t fnc);
 void iFESp_32(x64emu_t *emu, uintptr_t fnc);
 void iFiii_32(x64emu_t *emu, uintptr_t fnc);
 void iFiiI_32(x64emu_t *emu, uintptr_t fnc);
@@ -179,9 +180,6 @@ void iFuii_32(x64emu_t *emu, uintptr_t fnc);
 void iFuui_32(x64emu_t *emu, uintptr_t fnc);
 void iFuuu_32(x64emu_t *emu, uintptr_t fnc);
 void iFuLp_32(x64emu_t *emu, uintptr_t fnc);
-void iFLip_32(x64emu_t *emu, uintptr_t fnc);
-void iFLpL_32(x64emu_t *emu, uintptr_t fnc);
-void iFLpp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpiu_32(x64emu_t *emu, uintptr_t fnc);
 void iFpip_32(x64emu_t *emu, uintptr_t fnc);
 void iFpuu_32(x64emu_t *emu, uintptr_t fnc);
@@ -192,6 +190,9 @@ void iFppL_32(x64emu_t *emu, uintptr_t fnc);
 void iFppp_32(x64emu_t *emu, uintptr_t fnc);
 void iFppa_32(x64emu_t *emu, uintptr_t fnc);
 void iFpOu_32(x64emu_t *emu, uintptr_t fnc);
+void iFhip_32(x64emu_t *emu, uintptr_t fnc);
+void iFhpL_32(x64emu_t *emu, uintptr_t fnc);
+void iFhpp_32(x64emu_t *emu, uintptr_t fnc);
 void iFSIi_32(x64emu_t *emu, uintptr_t fnc);
 void iFSli_32(x64emu_t *emu, uintptr_t fnc);
 void IFiIi_32(x64emu_t *emu, uintptr_t fnc);
@@ -235,7 +236,6 @@ void iFEiip_32(x64emu_t *emu, uintptr_t fnc);
 void iFEiiN_32(x64emu_t *emu, uintptr_t fnc);
 void iFEipp_32(x64emu_t *emu, uintptr_t fnc);
 void iFEipV_32(x64emu_t *emu, uintptr_t fnc);
-void iFELup_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpip_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpup_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpLi_32(x64emu_t *emu, uintptr_t fnc);
@@ -243,6 +243,7 @@ void iFEppL_32(x64emu_t *emu, uintptr_t fnc);
 void iFEppp_32(x64emu_t *emu, uintptr_t fnc);
 void iFEppV_32(x64emu_t *emu, uintptr_t fnc);
 void iFEpOu_32(x64emu_t *emu, uintptr_t fnc);
+void iFEhup_32(x64emu_t *emu, uintptr_t fnc);
 void iFESpp_32(x64emu_t *emu, uintptr_t fnc);
 void iFESpV_32(x64emu_t *emu, uintptr_t fnc);
 void iFiiip_32(x64emu_t *emu, uintptr_t fnc);
@@ -285,7 +286,7 @@ void iFipLLi_32(x64emu_t *emu, uintptr_t fnc);
 void iFpppup_32(x64emu_t *emu, uintptr_t fnc);
 void uFpLLLS_32(x64emu_t *emu, uintptr_t fnc);
 void LFpLppa_32(x64emu_t *emu, uintptr_t fnc);
-void iFEBL_ppp_32(x64emu_t *emu, uintptr_t fnc);
+void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fnc);
 void LFpbp_LLp_32(x64emu_t *emu, uintptr_t fnc);
 void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fnc);
 void iFippprLL__32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedlibpthread_private.h b/src/wrapped32/wrappedlibpthread_private.h
index 48c976d0..e5eb9fc7 100755
--- a/src/wrapped32/wrappedlibpthread_private.h
+++ b/src/wrapped32/wrappedlibpthread_private.h
@@ -70,25 +70,25 @@ GOM(pthread_cond_init, iFEpp)
 GOM(pthread_cond_signal, iFEp)
 GOM(pthread_cond_timedwait, iFEpprLL_)
 GOM(pthread_cond_wait, iFEpp)
-GOM(pthread_create, iFEBL_ppp)
-GOM(pthread_detach, iFEL)
-GO(pthread_equal, iFLL)
+GOM(pthread_create, iFEBh_ppp)
+GOM(pthread_detach, iFEh)
+GO(pthread_equal, iFhh)
 GO(pthread_exit, vFp)
-GOM(pthread_getaffinity_np, iFELup)
-GO(pthread_getattr_np, iFLp)
+GOM(pthread_getaffinity_np, iFEhup)
+GO(pthread_getattr_np, iFhp)
 GO(pthread_getconcurrency, iFv)
-GO(pthread_getcpuclockid, iFLp)
-GO(pthread_getschedparam, iFLpp)
+GO(pthread_getcpuclockid, iFhp)
+GO(pthread_getschedparam, iFhpp)
 GO(__pthread_getspecific, pFu)
 GO(pthread_getspecific, pFu)
-GO(pthread_getname_np, iFLpL)
+GO(pthread_getname_np, iFhpL)
 GOM(__pthread_initialize, vFv)  //%noE doesn't exist anymore...
 // __pthread_initialize_minimal
 GO(pthread_join, iFHBp_)
 GOM(__pthread_key_create, iFEpp)
 GOM(pthread_key_create, iFEpp)
 GO(pthread_key_delete, iFu)
-GOM(pthread_kill, iFELi)
+GOM(pthread_kill, iFEhi)
 // pthread_kill_other_threads_np
 GO(__pthread_mutexattr_destroy, iFp)
 GO(pthread_mutexattr_destroy, iFp)
@@ -145,14 +145,14 @@ GO(__pthread_rwlock_unlock, iFp)
 GOM(pthread_rwlock_unlock, iFp) //%noE
 GO(__pthread_rwlock_wrlock, iFp)
 GOM(pthread_rwlock_wrlock, iFp) //%noE
-GO(pthread_self, LFv)
-GOM(pthread_setaffinity_np, iFELup)
+GO(pthread_self, hFv)
+GOM(pthread_setaffinity_np, iFEhup)
 GO(pthread_setcancelstate, iFip)
 GO(pthread_setcanceltype, iFip)
 GO(pthread_setconcurrency, iFi)
 GO(pthread_setname_np, iFhp)
-GO(pthread_setschedparam, iFLip)
-GO(pthread_setschedprio, iFLi)
+GO(pthread_setschedparam, iFhip)
+GO(pthread_setschedprio, iFhi)
 GO(__pthread_setspecific, iFup)
 GO(pthread_setspecific, iFup)
 GO(pthread_sigmask, iFipp)