//
// sub_10057DC6C from 0x10057dc6c to 0x10057dce0 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009aae38
//
// 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:28 +0000
//
__int64 __fastcall sub_10057DC6C(__int64 a1, __n128 a2)
{
float v2; // s1
__int64 v3; // x8
v2 = (float)((float)(1.0 - *(float *)(*(_QWORD *)(a1 + 24) + 240LL))
+ (float)(*(float *)(*(_QWORD *)(a1 + 24) + 124LL) * *(float *)(*(_QWORD *)(a1 + 24) + 240LL)))
* a2.n128_f32[0];
a2.n128_u32[0] = *(_DWORD *)(a1 + 100);
if ( v2 <= a2.n128_f32[0] )
{
a2.n128_f32[0] = v2;
if ( v2 < *(float *)(a1 + 104) )
a2.n128_u32[0] = *(_DWORD *)(a1 + 104);
}
v3 = *(_QWORD *)(a1 + 736);
if ( v3 )
return (*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v3 + 56LL))(v3, a2);
v3 = *(_QWORD *)(a1 + 728);
if ( v3 )
return (*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v3 + 56LL))(v3, a2);
if ( *(_QWORD *)(a1 + 656) )
return sub_1005C690C(a1 + 112, a2);
return 0;
}