//
// sub_6C474 from 0x6c474 to 0x6c506 (146 bytes)
//
// 1 xrefs:
// > sub_6B878 @ 0x6b898
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:40:58 +0000
//
int __fastcall sub_6C474(int a1, int a2)
{
int v4; // r2
int v5; // r3
int v6; // r2
int v7; // r3
int v8; // r5
int v10; // [sp+4h] [bp-24h] BYREF
int v11; // [sp+8h] [bp-20h]
__int16 v12; // [sp+Ch] [bp-1Ch]
char v13; // [sp+Eh] [bp-1Ah]
char v14; // [sp+Fh] [bp-19h]
int v15; // [sp+10h] [bp-18h]
int v16; // [sp+14h] [bp-14h] BYREF
if ( !a2 )
return 28;
v10 = *(_DWORD *)(a1 + 28);
j_FMOD_OS_CriticalSection_Enter(v10);
LOBYTE(v11) = 1;
v16 = *(_DWORD *)(a2 + 8);
if ( sub_6C2A8((_DWORD *)(a1 + 44), &v16, v4, v5) != a2 )
{
v8 = 28;
LABEL_6:
sub_44984((int)&v10);
return v8;
}
v8 = sub_6C1C0((_DWORD *)(a1 + 44), &v16, v6, v7);
if ( v8 )
goto LABEL_6;
v8 = sub_6BB94(a2);
sub_44984((int)&v10);
if ( !v8 )
{
v11 = 0;
v14 = 0;
v10 = 16;
v15 = v16;
v12 = 1034;
v13 = 0;
return (***(int (__fastcall ****)(_DWORD, int *, _DWORD))(a1 + 16))(*(_DWORD *)(a1 + 16), &v10, 0);
}
return v8;
}