//
// sub_100451774 from 0x100451774 to 0x100451814 (160 bytes)
//
// 1 xrefs:
// > sub_1004507B4 @ 0x100450880
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100451774(__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_1004B5E18(5) )
{
result = sub_1004EB838(a1);
if ( (_DWORD)result )
return result;
}
else
{
result = sub_1004513DC(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;
}