//
// sub_5854C from 0x5854c to 0x585c8 (124 bytes)
//
// 1 xrefs:
// > FMOD::System::setFileSystem @ 0xb7776
//
// 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
//
int __fastcall sub_5854C(int a1, int a2, int a3, int a4, __int64 a5, int a6, int a7)
{
int v7; // r5
int v8; // r8
int v9; // r0
int v10; // r4
__int64 v11; // kr00_8
int v12; // r4
v7 = a2;
v8 = a6;
v9 = a1 + 68928;
v10 = a3;
if ( a3 )
v10 = 1;
v11 = a5;
if ( a2 )
v7 = 1;
v12 = v10 & v7;
if ( v12 == 1 && HIDWORD(a5) && a6 || !(v12 ^ 1 | (a4 == 0)) && (_DWORD)a5 )
{
*(_BYTE *)v9 = 1;
}
else
{
a3 = 0;
a4 = 0;
v8 = 0;
a2 = 0;
*(_BYTE *)v9 = 0;
v11 = 0;
}
*(_DWORD *)(v9 + 84) = a2;
*(_DWORD *)(v9 + 88) = a3;
*(_DWORD *)(v9 + 92) = a4;
*(_QWORD *)(v9 + 96) = v11;
*(_DWORD *)(v9 + 104) = v8;
if ( a7 >= 0 )
*(_DWORD *)(v9 + 4) = a7;
return 0;
}