//
// sub_1002DE2A0 from 0x1002de2a0 to 0x1002de32c (140 bytes)
//
// 2 xrefs:
// > sub_1002DDA10 @ 0x1002ddaa4
// > sub_1002DDA10 @ 0x1002ddb14
//
// 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:02:46 +0000
//
void __fastcall sub_1002DE2A0(pthread_t *a1, __int64 *a2)
{
std::__thread_struct *v4; // x20
_QWORD *v5; // x0
__int64 v6; // x8
int v7; // w0
_QWORD *v8; // [xsp+8h] [xbp-28h] BYREF
v4 = (std::__thread_struct *)operator new(8u);
std::__thread_struct::__thread_struct(v4);
v5 = operator new(0x10u);
v6 = *a2;
*v5 = v4;
v5[1] = v6;
v8 = v5;
v7 = pthread_create(a1, nullptr, (void *(__cdecl *)(void *))sub_1002DE360, v5);
if ( v7 )
{
std::__throw_system_error(v7, "thread constructor failed");
__break(1u);
}
else
{
v8 = nullptr;
sub_1002DE574(&v8);
}
}