//
// sub_51FB8 from 0x51fb8 to 0x52020 (104 bytes)
//
// 3 xrefs:
// > ??> @ 0x51fb6
// > FMOD::SystemI::createClientProfile @ 0x56bd4
// > sub_58CA8 @ 0x5948c
//
// 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:44 +0000
//
int __fastcall sub_51FB8(int *a1, char a2, int a3)
{
int v6; // r0
int v7; // r1
int v8; // r2
int v9; // r5
int v10; // r0
int v11; // r2
int v12; // r0
int v13; // r6
if ( !a1 )
return 31;
v6 = sub_BD410(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 48, "../../src/fmod_profile.cpp", 24);
if ( !v6 )
return 38;
v9 = v6;
v10 = sub_5211C(v6, v7, v8);
*(_BYTE *)(v10 + 44) = a2;
v12 = sub_52028(v10, a3, v11);
if ( v12 )
{
v13 = v12;
sub_52054(v9);
}
else
{
v13 = 0;
*a1 = v9;
}
return v13;
}