//
// sub_1005E9884 from 0x1005e9884 to 0x1005e991c (152 bytes)
//
// 2 xrefs:
// > sub_1005E9724 @ 0x1005e9864
// > sub_1005F4FC0 @ 0x1005f5274
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:09:44 +0000
//
__int64 __fastcall sub_1005E9884(int *a1)
{
int *v2; // x1
_QWORD *v3; // x9
v2 = *((int **)a1 + 12);
if ( v2 )
sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), v2);
sub_1005DBDD8(*((pthread_mutex_t **)off_1009DA5E8 + 38));
v3 = *((_QWORD **)a1 + 1);
*v3 = *(_QWORD *)a1;
*(_QWORD *)(*(_QWORD *)a1 + 8LL) = v3;
*(_QWORD *)a1 = a1;
*((_QWORD *)a1 + 1) = a1;
sub_1005DBE08(*((pthread_mutex_t **)off_1009DA5E8 + 38));
sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), a1);
return 0;
}