//
// sub_10057EFA4 from 0x10057efa4 to 0x10057f058 (180 bytes)
//
// 1 xrefs:
// > sub_10057EC28 @ 0x10057ee70
//
// 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:08:28 +0000
//
__int64 __fastcall sub_10057EFA4(_QWORD *a1, __int64 a2, __int64 a3, unsigned __int64 a4)
{
int v4; // w22
unsigned __int64 v8; // x24
__int64 v9; // x21
__int64 v10; // x9
__int64 v11; // x8
_QWORD *v12; // x8
__int64 result; // x0
v4 = a4;
v8 = HIDWORD(a4);
v9 = a1[45];
sub_1005DBDD8(v9);
atomic_store(7u, (unsigned int *)(a3 + 272));
v10 = *(_QWORD *)(a3 + 184);
if ( v10 )
atomic_store(7u, (unsigned int *)(v10 + 272));
v11 = *(_QWORD *)(a3 + 264);
*(_DWORD *)(v11 + 284) = v4;
*(_DWORD *)(v11 + 288) = v8;
v12 = *(_QWORD **)(a2 + 264);
v12[3] = a1 + 42;
v12 += 3;
v12[1] = a1[43];
v12[2] = a2;
a1[43] = v12;
*(_QWORD *)v12[1] = v12;
sub_1005DBE08(v9);
result = a1[37];
if ( result )
return sub_1005DBF3C(result);
return result;
}