//
// sub_58674 from 0x58674 to 0x5875c (232 bytes)
//
// 1 xrefs:
// > ??> @ 0x10c418
//
// 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 12:13:50 +0000
//
__int64 __fastcall sub_58674(__int64 a1, __int64 a2, float a3)
{
__int64 v3; // x30
__int64 v5; // x0
char v6; // w1
long double v7; // q0
char v8; // zf
__int64 result; // x0
int v10; // w8
float v11; // s4
float v12; // s5
float v13; // s6
float v14; // s3
float v15; // s1
__int64 *v16; // x20
float v17; // s9
char v18; // w19
v5 = sub_593A4(a1, a2, v3);
if ( v8 )
return 29;
v10 = *(_DWORD *)(v5 + 72);
v11 = *(float *)(v5 + 240);
v12 = *(float *)(v5 + 120);
v13 = *(float *)(v5 + 164);
v14 = *(float *)(v5 + 208);
LODWORD(v7) = 0;
v15 = 1.0 - *(float *)(v5 + 192);
v16 = (__int64 *)v5;
v17 = *(float *)(v5 + 48);
*(float *)(v5 + 48) = a3;
if ( (v10 & 2) == 0 )
*(float *)&v7 = a3;
v18 = v6;
*(float *)&v7 = (float)(v15 - (float)(v14 * v15))
* (float)((float)(*(float *)&v7 * (float)((float)(1.0 - v11) + (float)(v12 * v11)))
* (float)((float)(1.0 - v11) + (float)(v13 * v11)));
result = sub_B0C10(*(_QWORD *)(v5 + 112), (unsigned __int8)((v10 & 0x80030) == 0) << 6, 1, 0, v7);
if ( !(_DWORD)result )
{
if ( v17 == a3 && (v18 & 1) == 0 )
return 0;
result = sub_55DCC(v16, 0, 0, v18 & 1);
if ( !(_DWORD)result )
return 0;
}
return result;
}