//
// sub_1005778DC from 0x1005778dc to 0x10057797c (160 bytes)
//
// 1 xrefs:
// > sub_10057691C @ 0x1005769e8
//
// 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_1005778DC(__int64 a1)
{
double v2; // d0
double v3; // d1
double v4; // d2
double v5; // d3
double v6; // d4
double v7; // d5
double v8; // d6
int32x4_t v9; // q7
__int64 result; // x0
int v11; // w8
int v12; // w8
int v13; // w8
bzero(*(void **)(a1 + 120), 8LL * *(int *)(a1 + 16) + 8);
if ( (unsigned int)sub_1005DBF80(5) )
{
result = sub_1006119A0(a1);
if ( (_DWORD)result )
return result;
}
else
{
result = sub_100577544(a1, v2, v3, v4, v5, v6, v7, v8, v9);
if ( (_DWORD)result )
return result;
}
result = 0;
v11 = *(_DWORD *)(a1 + 16);
if ( *(_DWORD *)(a1 + 92) + v11 >= v11 + v11 * *(_DWORD *)(a1 + 28) )
v12 = 0;
else
v12 = *(_DWORD *)(a1 + 92) + v11;
*(_DWORD *)(a1 + 92) = v12;
v13 = *(_DWORD *)(a1 + 84);
*(_DWORD *)(a1 + 84) = v13 - 1;
if ( v13 <= 0 )
{
*(_DWORD *)(a1 + 84) = *(_DWORD *)(a1 + 32) - 1;
return 0;
}
return result;
}