//
// sub_7FE24 from 0x7fe24 to 0x7ff1c (248 bytes)
//
// 1 xrefs:
// > sub_809F4 @ 0x809f8
//
// 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_7FE24(__int64 *a1)
{
__int64 result; // x0
unsigned int *v3; // x8
unsigned int v4; // w9
__int64 i; // x20
__int64 v6; // x8
float *v7; // x8
float v8; // w9
*(__int64 *)((char *)a1 + 548) = 0x3F80000000000000LL;
result = sub_7B4D0(a1[21], 0, a1 + 72);
if ( !(_DWORD)result )
{
v3 = (unsigned int *)a1 + 25;
do
v4 = __ldaxr(v3);
while ( __stlxr(v4 | 0x10, v3) );
for ( i = 0; ; ++i )
{
v6 = a1[29];
if ( i >= *(int *)(v6 + 96) )
break;
v7 = *(float **)(*(_QWORD *)(v6 + 104) + 8 * i);
v8 = *v7;
if ( *(_DWORD *)v7 )
{
if ( LODWORD(v8) == 2 )
{
result = sub_CBE2C(a1, (unsigned int)i, *((_DWORD *)v7 + 12) != 0);
if ( (_DWORD)result )
return result;
}
else if ( LODWORD(v8) == 1 )
{
result = sub_CBDCC(a1, (unsigned int)i, *((unsigned int *)v7 + 14));
if ( (_DWORD)result )
return result;
}
}
else
{
result = sub_CBD5C(a1, (unsigned int)i, v7[14]);
if ( (_DWORD)result )
return result;
}
}
a1[80] = 0;
return sub_6AC50((unsigned int *)a1[21], a1 + 81);
}
return result;
}