about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-09-10 15:10:28 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-09-10 15:10:28 +0200
commit7794a623aa27351b12a50fe9bf9f92ddac10d512 (patch)
treeae816a0d7f5094fc2899db81486f854886628643 /src
parent0443edc03481221ab2ebe100319ab23dc193150f (diff)
downloadbox64-7794a623aa27351b12a50fe9bf9f92ddac10d512.tar.gz
box64-7794a623aa27351b12a50fe9bf9f92ddac10d512.zip
[BOX32] Fix and simplified 32bits threads handling
Diffstat (limited to 'src')
-rw-r--r--src/include/threads.h1
-rw-r--r--src/libtools/threads.c16
-rwxr-xr-xsrc/libtools/threads32.c18
-rw-r--r--src/wrapped32/generated/functions_list.txt39
-rw-r--r--src/wrapped32/generated/wrappedlibpthreadtypes32.h20
-rw-r--r--src/wrapped32/generated/wrapper32.c42
-rw-r--r--src/wrapped32/generated/wrapper32.h21
-rwxr-xr-xsrc/wrapped32/wrappedlibpthread_private.h28
8 files changed, 81 insertions, 104 deletions
diff --git a/src/include/threads.h b/src/include/threads.h
index a35b02f3..dee33f58 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -10,7 +10,6 @@ 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 da514e43..f51f95c6 100644
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -134,19 +134,8 @@ static void emuthread_destroy(void* p)
 	emuthread_t *et = (emuthread_t*)p;
 	if(!et)
 		return;
-	// check tlsdata
-	/*void* ptr;
-	if (my_context && (ptr = pthread_getspecific(my_context->tlskey)) != NULL)
-        free_tlsdatasize(ptr);*/
-	// free x64emu
-	#ifdef BOX32
-	/*if(box64_is32bits && !et->join)	// not removing  hash key from old pthread_t
-		to_hash_d(et->self);*/
-	#endif
-	if(et) {
-		FreeX64Emu(&et->emu);
-		box_free(et);
-	}
+	FreeX64Emu(&et->emu);
+	box_free(et);
 }
 
 static void emuthread_cancel(void* p)
@@ -188,7 +177,6 @@ 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 bd437633..755c2cd2 100755
--- a/src/libtools/threads32.c
+++ b/src/libtools/threads32.c
@@ -98,14 +98,9 @@ static void emuthread_destroy(void* p)
 	emuthread_t *et = (emuthread_t*)p;
 	if(!et)
 		return;
-	// destroy the hash key if thread is not joinable
-	if(!et->join)
-		to_hash_d(et->self);
 	// destroy thread emu and all
-	if(et) {
-		FreeX64Emu(&et->emu);
-		free(et);
-	}
+	FreeX64Emu(&et->emu);
+	free(et);
 }
 
 static void emuthread_cancel(void* p)
@@ -120,7 +115,6 @@ static void emuthread_cancel(void* p)
 		DynaRun(et->emu);	// will return after a __pthread_unwind_next()
 	}
 	free(et->cancels);
-	to_hash_d(et->self);
 	et->cancels=NULL;
 	et->cancel_size = et->cancel_cap = 0;
 }
@@ -141,7 +135,6 @@ 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)
@@ -213,7 +206,7 @@ EXPORT int my32_pthread_create(x64emu_t *emu, void* t, void* attr, void* start_r
 		own = 1;
 	}
 
-	emuthread_t *et = (emuthread_t*)calloc(1, sizeof(emuthread_t));
+	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, emu);
 	et->emu = emuthread;
@@ -583,7 +576,7 @@ static pthread_attr_t* get_attr(void* attr)
 		return NULL;
 	my32_x64_attr_t* my32_attr = (my32_x64_attr_t*)attr;
 	if(my32_attr->sign!=ATTR_SIGN) {
-		my32_attr->attr = (pthread_attr_t*)calloc(1, sizeof(pthread_attr_t));
+		my32_attr->attr = (pthread_attr_t*)box_calloc(1, sizeof(pthread_attr_t));
 		my32_attr->sign = ATTR_SIGN;
 	}
 	return my32_attr->attr;
@@ -595,7 +588,7 @@ static void del_attr(void* attr)
 	my32_x64_attr_t* my32_attr = (my32_x64_attr_t*)attr;
 	if(my32_attr->sign==ATTR_SIGN) {
 		my32_attr->sign = 0;
-		free(my32_attr->attr);
+		box_free(my32_attr->attr);
 	}
 }
 
@@ -811,6 +804,7 @@ EXPORT int my32_pthread_mutex_destroy(pthread_mutex_t *m)
 	if(k!=kh_end(unaligned_mutex)) {
 		pthread_mutex_t *n = kh_value(unaligned_mutex, k);
 		kh_del(mutex, unaligned_mutex, k);
+		pthread_rwlock_unlock(&m_lock);
 		int ret = pthread_mutex_destroy(n);
 		free(n);
 		return ret;
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 56d9921b..3923edee 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -37,7 +37,6 @@
 #() pFu -> pFu
 #() pFL -> pFL
 #() pFp -> pFp
-#() hFv -> hFv
 #() aFa -> aFa
 #() tFi -> tFi
 #() tFp -> tFp
@@ -50,7 +49,6 @@
 #() iFEi -> iFEi
 #() iFEL -> iFEL
 #() iFEp -> iFEp
-#() iFEh -> iFEh
 #() iFEO -> iFEO
 #() iFii -> iFii
 #() iFiI -> iFiI
@@ -62,15 +60,16 @@
 #() 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
@@ -103,7 +102,7 @@
 #() tFip -> tFip
 #() tFpL -> tFpL
 #() iFEbp_ -> iFEB
-#() iFhBp_ -> iFhB
+#() iFHBp_ -> iFHB
 #() fFpBp_ -> fFpB
 #() dFpBp_ -> dFpB
 #() pFrL_p -> pFBp
@@ -119,11 +118,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
@@ -140,6 +139,9 @@
 #() iFuui -> iFuui
 #() iFuuu -> iFuuu
 #() iFuLp -> iFuLp
+#() iFLip -> iFLip
+#() iFLpL -> iFLpL
+#() iFLpp -> iFLpp
 #() iFpiu -> iFpiu
 #() iFpip -> iFpip
 #() iFpuu -> iFpuu
@@ -150,9 +152,6 @@
 #() iFppp -> iFppp
 #() iFppa -> iFppa
 #() iFpOu -> iFpOu
-#() iFhip -> iFhip
-#() iFhpL -> iFhpL
-#() iFhpp -> iFhpp
 #() iFSIi -> iFSIi
 #() iFSli -> iFSli
 #() IFiIi -> IFiIi
@@ -196,6 +195,7 @@
 #() iFEiiN -> iFEiiN
 #() iFEipp -> iFEipp
 #() iFEipV -> iFEipV
+#() iFELup -> iFELup
 #() iFEpip -> iFEpip
 #() iFEpup -> iFEpup
 #() iFEpLi -> iFEpLi
@@ -203,7 +203,6 @@
 #() iFEppp -> iFEppp
 #() iFEppV -> iFEppV
 #() iFEpOu -> iFEpOu
-#() iFEhup -> iFEhup
 #() iFESpp -> iFESpp
 #() iFESpV -> iFESpV
 #() iFiiip -> iFiiip
@@ -246,7 +245,7 @@
 #() iFpppup -> iFpppup
 #() uFpLLLS -> uFpLLLS
 #() LFpLppa -> LFpLppa
-#() iFEBh_ppp -> iFEBppp
+#() iFEBL_ppp -> iFEBppp
 #() LFpbp_LLp -> LFpBLLp
 #() LFpBp_LLp -> LFpBLLp
 #() iFippprLL_ -> iFipppB
@@ -507,6 +506,8 @@ wrappedlibpthread:
   - __pthread_register_cancel
   - __pthread_unregister_cancel
   - __pthread_unwind_next
+- iFL:
+  - pthread_detach
 - iFp:
   - __pthread_mutex_destroy
   - __pthread_mutex_lock
@@ -529,11 +530,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
@@ -567,11 +568,12 @@ 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:
@@ -580,12 +582,9 @@ wrappedlibpthread:
   - __pthread_atfork
   - pthread_atfork
   - pthread_attr_getstack
-- iFhup:
-  - pthread_getaffinity_np
-  - pthread_setaffinity_np
+- iFLppp:
+  - pthread_create
 - 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 16481475..6df2a879 100644
--- a/src/wrapped32/generated/wrappedlibpthreadtypes32.h
+++ b/src/wrapped32/generated/wrappedlibpthreadtypes32.h
@@ -13,26 +13,27 @@
 
 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 (*iFhup_t)(uintptr_t, uint32_t, void*);
+typedef int32_t (*iFLppp_t)(uintptr_t, void*, void*, 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) \
@@ -54,9 +55,9 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*);
 	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) \
@@ -87,18 +88,17 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*);
 	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_getaffinity_np, iFhup_t) \
-	GO(pthread_setaffinity_np, iFhup_t) \
+	GO(pthread_create, iFLppp_t) \
 	GO(pthread_cond_timedwait, iFppLL_t) \
-	GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t) \
-	GO(pthread_create, iFhppp_t)
+	GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t)
 
 #endif // __wrappedlibpthreadTYPES32_H_
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 3112219a..04ff0e34 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -124,7 +124,6 @@ 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*);
@@ -137,7 +136,6 @@ 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);
@@ -149,15 +147,16 @@ 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*);
@@ -190,7 +189,7 @@ typedef void* (*SFpp_t)(void*, void*);
 typedef char* (*tFip_t)(int32_t, void*);
 typedef char* (*tFpL_t)(void*, uintptr_t);
 typedef int32_t (*iFEbp__t)(x64emu_t*, struct_p_t*);
-typedef int32_t (*iFhBp__t)(uintptr_t, struct_p_t*);
+typedef int32_t (*iFHBp__t)(uintptr_t, struct_p_t*);
 typedef float (*fFpBp__t)(void*, struct_p_t*);
 typedef double (*dFpBp__t)(void*, struct_p_t*);
 typedef void* (*pFrL_p_t)(struct_L_t*, void*);
@@ -206,11 +205,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);
@@ -227,6 +226,9 @@ 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);
@@ -237,9 +239,6 @@ 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);
@@ -283,6 +282,7 @@ 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,7 +290,6 @@ 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*);
@@ -333,7 +332,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 (*iFEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, void*);
+typedef int32_t (*iFEBL_ppp_t)(x64emu_t*, struct_L_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*);
@@ -408,7 +407,6 @@ 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))); }
@@ -421,7 +419,6 @@ 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)); }
@@ -433,15 +430,16 @@ 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)); }
@@ -474,7 +472,7 @@ void SFpp_32(x64emu_t *emu, uintptr_t fcn) { SFpp_t fn = (SFpp_t)fcn; R_EAX = to
 void tFip_32(x64emu_t *emu, uintptr_t fcn) { tFip_t fn = (tFip_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); }
 void tFpL_32(x64emu_t *emu, uintptr_t fcn) { tFpL_t fn = (tFpL_t)fcn; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); }
 void iFEbp__32(x64emu_t *emu, uintptr_t fcn) { iFEbp__t fn = (iFEbp__t)fcn; struct_p_t arg_4; from_struct_p(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); }
-void iFhBp__32(x64emu_t *emu, uintptr_t fcn) { iFhBp__t fn = (iFhBp__t)fcn; struct_p_t arg_8; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
+void iFHBp__32(x64emu_t *emu, uintptr_t fcn) { iFHBp__t fn = (iFHBp__t)fcn; struct_p_t arg_8; R_EAX = fn(from_hash_d(from_ptri(ptr_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void fFpBp__32(x64emu_t *emu, uintptr_t fcn) { fFpBp__t fn = (fFpBp__t)fcn; struct_p_t arg_8; float fl = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = fl; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void dFpBp__32(x64emu_t *emu, uintptr_t fcn) { dFpBp__t fn = (dFpBp__t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void pFrL_p_32(x64emu_t *emu, uintptr_t fcn) { pFrL_p_t fn = (pFrL_p_t)fcn; struct_L_t arg_4; from_struct_L(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = to_ptrv(fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8))); }
@@ -490,11 +488,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)); }
@@ -511,6 +509,9 @@ 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)); }
@@ -521,9 +522,6 @@ 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]; }
@@ -567,6 +565,7 @@ 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)); }
@@ -574,7 +573,6 @@ 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)); }
@@ -617,7 +615,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 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 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 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 f06a690f..61005e0f 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -77,7 +77,6 @@ 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);
@@ -90,7 +89,6 @@ 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);
@@ -102,15 +100,16 @@ 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);
@@ -143,7 +142,7 @@ void SFpp_32(x64emu_t *emu, uintptr_t fnc);
 void tFip_32(x64emu_t *emu, uintptr_t fnc);
 void tFpL_32(x64emu_t *emu, uintptr_t fnc);
 void iFEbp__32(x64emu_t *emu, uintptr_t fnc);
-void iFhBp__32(x64emu_t *emu, uintptr_t fnc);
+void iFHBp__32(x64emu_t *emu, uintptr_t fnc);
 void fFpBp__32(x64emu_t *emu, uintptr_t fnc);
 void dFpBp__32(x64emu_t *emu, uintptr_t fnc);
 void pFrL_p_32(x64emu_t *emu, uintptr_t fnc);
@@ -159,11 +158,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);
@@ -180,6 +179,9 @@ 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);
@@ -190,9 +192,6 @@ 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);
@@ -236,6 +235,7 @@ 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,7 +243,6 @@ 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);
@@ -286,7 +285,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 iFEBh_ppp_32(x64emu_t *emu, uintptr_t fnc);
+void iFEBL_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 fca33103..48c976d0 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, iFEBh_ppp)
-GOM(pthread_detach, iFEh)
-GO(pthread_equal, iFhh)
+GOM(pthread_create, iFEBL_ppp)
+GOM(pthread_detach, iFEL)
+GO(pthread_equal, iFLL)
 GO(pthread_exit, vFp)
-GOM(pthread_getaffinity_np, iFEhup)
-GO(pthread_getattr_np, iFhp)
+GOM(pthread_getaffinity_np, iFELup)
+GO(pthread_getattr_np, iFLp)
 GO(pthread_getconcurrency, iFv)
-GO(pthread_getcpuclockid, iFhp)
-GO(pthread_getschedparam, iFhpp)
+GO(pthread_getcpuclockid, iFLp)
+GO(pthread_getschedparam, iFLpp)
 GO(__pthread_getspecific, pFu)
 GO(pthread_getspecific, pFu)
-GO(pthread_getname_np, iFhpL)
+GO(pthread_getname_np, iFLpL)
 GOM(__pthread_initialize, vFv)  //%noE doesn't exist anymore...
 // __pthread_initialize_minimal
-GO(pthread_join, iFhBp_)
+GO(pthread_join, iFHBp_)
 GOM(__pthread_key_create, iFEpp)
 GOM(pthread_key_create, iFEpp)
 GO(pthread_key_delete, iFu)
-GOM(pthread_kill, iFEhi)
+GOM(pthread_kill, iFELi)
 // 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, hFv)
-GOM(pthread_setaffinity_np, iFEhup)
+GO(pthread_self, LFv)
+GOM(pthread_setaffinity_np, iFELup)
 GO(pthread_setcancelstate, iFip)
 GO(pthread_setcanceltype, iFip)
 GO(pthread_setconcurrency, iFi)
 GO(pthread_setname_np, iFhp)
-GO(pthread_setschedparam, iFhip)
-GO(pthread_setschedprio, iFhi)
+GO(pthread_setschedparam, iFLip)
+GO(pthread_setschedprio, iFLi)
 GO(__pthread_setspecific, iFup)
 GO(pthread_setspecific, iFup)
 GO(pthread_sigmask, iFipp)