//
// sub_180067160 from 0x180067160 to 0x1800671f6 (150 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801ac8f0
// > ??> @ 0x1801f93b4
//
// 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_180067160(__int64 *a1, int a2, float a3, __int64 a4)
{
__int64 v4; // rbx
int v5; // edx
int v6; // edx
__int64 result; // rax
__int64 v8; // r8
__int64 v9; // [rsp+30h] [rbp+8h] BYREF
v4 = *a1;
if ( a2 )
{
v5 = a2 - 1;
if ( v5 )
{
v6 = v5 - 1;
if ( v6 )
{
if ( v6 != 1 )
return 31;
*(float *)(v4 + 656) = a3;
}
else
{
*(float *)(v4 + 652) = a3;
}
}
else
{
*(float *)(v4 + 644) = a3;
}
}
else
{
*(float *)(v4 + 640) = a3;
}
LOBYTE(a4) = 1;
result = sub_1800FCF40(*(_QWORD *)(v4 + 168), &v9, 16, a4);
if ( !(_DWORD)result )
{
LOBYTE(v8) = 1;
*(_BYTE *)v9 = 7;
*(_QWORD *)(v9 + 8) = v4;
return sub_1800FD370(*(_QWORD *)(v4 + 168), v9, v8);
}
return result;
}