//
// sub_100508AA8 from 0x100508aa8 to 0x100508b18 (112 bytes)
//
// 6 xrefs:
// > sub_10046A3C0 @ 0x10046a3f0
// > sub_10046A5BC @ 0x10046adac
// > sub_10046ADFC @ 0x10046aea8
// > ??> @ 0x1008279f8
// > ??> @ 0x100827c20
// > ??> @ 0x10082a4d8
//
// 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_100508AA8(__int64 a1, float a2)
{
float v3; // s2
if ( (~LODWORD(a2) & 0x7F800000) == 0 )
return 29;
v3 = (float)(a2 + 1.0) * 0.5;
if ( a2 > 1.0 )
v3 = 1.0;
if ( a2 < -1.0 )
v3 = 0.0;
return (*(__int64 (__fastcall **)(__int64, float, float, float, float, float, float, float, float))(*(_QWORD *)a1 + 184LL))(
a1,
sqrtf(1.0 - v3),
sqrtf(v3),
0.0,
0.0,
0.0,
0.0,
0.0,
0.0);
}