//
// sub_1800CFCD0 from 0x1800cfcd0 to 0x1800cfd94 (196 bytes)
//
// 4 xrefs:
// > ??> @ 0x18016c928
// > ??> @ 0x18018b8ec
// > ??> @ 0x18018b8fc
// > ??> @ 0x1801fe9dc
//
// 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_1800CFCD0(__int64 a1, float a2, char a3)
{
__int64 result; // rax
__int64 v6; // rcx
bool v7; // di
if ( (LODWORD(a2) & 0x7F800000) == 0x7F800000 )
return 29;
v6 = *(_QWORD *)(a1 + 472);
if ( !v6 || !*(_QWORD *)(a1 + 112) )
return 30;
v7 = a2 != *(float *)(a1 + 48);
*(float *)(a1 + 48) = a2;
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 96LL))(v6);
if ( !(_DWORD)result )
{
if ( !v7 && !a3 )
return 0;
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 472) + 60LL) & 0x10000) != 0 )
return 0;
result = sub_180012140((__int64 *)a1, 0, 0, a3);
if ( !(_DWORD)result )
return 0;
}
return result;
}