//
// sub_1005844B8 from 0x1005844b8 to 0x100584570 (184 bytes)
//
// 2 xrefs:
// > sub_10058FE2C @ 0x100590188
// > ??> @ 0x1009ab200
//
// 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:31 +0000
//
__int64 __fastcall sub_1005844B8(__int64 a1, __int64 a2, __n128 a3)
{
float v3; // s8
__int64 result; // x0
__int64 v6; // x0
float v8; // s9
v3 = a3.n128_f32[0];
if ( (~a3.n128_u32[0] & 0x7F800000) == 0 )
return 29;
v6 = *(_QWORD *)(a1 + 472);
if ( !v6 || !*(_QWORD *)(a1 + 112) )
return 30;
v8 = *(float *)(a1 + 48);
*(_DWORD *)(a1 + 48) = a3.n128_u32[0];
a3.n128_u32[0] = 0;
if ( (*(_DWORD *)(a1 + 72) & 2) == 0 )
a3.n128_f32[0] = v3;
result = (*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v6 + 104LL))(v6, a3);
if ( !(_DWORD)result )
{
if ( v8 == v3 && (_DWORD)a2 == 0 )
return 0;
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 472) + 62LL) & 1) != 0 )
return 0;
result = sub_10062E858(a1, 0, 0, a2);
if ( !(_DWORD)result )
return 0;
}
return result;
}