//
// sub_87B54 from 0x87b54 to 0x87bcc (120 bytes)
//
// 1 xrefs:
// > ??> @ 0x10d750
//
// 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 12:14:10 +0000
//
__int64 __fastcall sub_87B54(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x1
__int64 v4; // x2
__int64 v5; // x3
int v6; // w4
__int64 result; // x0
int v8; // w8
v2 = sub_87DD0(*(_QWORD *)(a1 + 72));
result = sub_72404(v2, v3, v4, v5, v6);
if ( !(_DWORD)result )
{
memcpy(
(void *)(*(_QWORD *)(a1 + 96) + 8LL * (*(_DWORD *)(a1 + 16) + 1) * *(_DWORD *)(a1 + 40)),
*(const void **)(a1 + 104),
8 * (*(int *)(a1 + 16) + 1LL));
result = sub_87AB0(a1);
if ( !(_DWORD)result )
{
v8 = *(_DWORD *)(a1 + 40);
result = 0;
*(_DWORD *)(a1 + 40) = v8 - 1;
if ( v8 <= 0 )
*(_DWORD *)(a1 + 40) = *(_DWORD *)(a1 + 32) - 1;
}
}
return result;
}