//
// sub_100576A50 from 0x100576a50 to 0x100576b1c (204 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009aab40
//
// 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:21 +0000
//
__int64 __fastcall sub_100576A50(__int64 a1)
{
__int64 v2; // x19
int v3; // w8
unsigned int *v4; // x8
unsigned int v5; // w9
__int64 v6; // x0
v2 = sub_10055CEE8(*(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 48), *(_QWORD *)(a1 + 104), 0, 1);
if ( !(_DWORD)v2 )
{
memcpy(
(void *)(*(_QWORD *)(a1 + 96) + 8LL * (*(_DWORD *)(a1 + 16) + 1) * *(_DWORD *)(a1 + 40)),
*(const void **)(a1 + 104),
8 * (*(int *)(a1 + 16) + 1LL));
v3 = *(_DWORD *)(a1 + 40);
*(_DWORD *)(a1 + 40) = v3 - 1;
if ( v3 <= 0 )
*(_DWORD *)(a1 + 40) = *(_DWORD *)(a1 + 32) - 1;
v4 = (unsigned int *)(a1 + 136);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 + 1, v4) );
v6 = qword_1009FB6E0[86 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69816LL) + 37 + 43 * *(int *)(a1 + 168)];
if ( v6 )
sub_1005DBF3C(v6);
}
return v2;
}