//
// sub_6DFE4 from 0x6dfe4 to 0x6e13a (342 bytes)
//
// 0 xrefs:
//
// 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_6DFE4(_DWORD *a1)
{
_DWORD *v2; // r2
_DWORD *v3; // r1
bool v4; // zf
int v5; // r8
int v6; // r5
char *v7; // r0
char *v8; // r2
int v9; // r1
char *v10; // r0
int v11; // r4
int v13; // [sp+0h] [bp-28h] BYREF
char v14; // [sp+4h] [bp-24h]
int v15; // [sp+8h] [bp-20h] BYREF
char v16; // [sp+Ch] [bp-1Ch]
v15 = dword_F61F4[*(_DWORD *)(a1[1] + 68832)];
j_FMOD_OS_CriticalSection_Enter(v15);
v16 = 1;
v13 = dword_F61F4[2 * *(_DWORD *)(a1[1] + 68832) + 8 + a1[26]];
j_FMOD_OS_CriticalSection_Enter(v13);
v14 = 1;
v2 = (_DWORD *)a1[24];
*v2 = a1[23];
*(_DWORD *)(a1[23] + 4) = v2;
a1[23] = a1 + 23;
a1[24] = a1 + 23;
v3 = (_DWORD *)((char *)&unk_F6074 + 24 * *(_DWORD *)(a1[1] + 68832) + 12 * a1[26]);
v4 = *v3 == (_DWORD)v3;
if ( (_DWORD *)*v3 == v3 )
v4 = v3[1] == (_DWORD)v3;
v5 = v4;
if ( a1[20] )
{
v6 = 0;
v7 = (char *)&unk_F6134 + 24 * *(_DWORD *)(a1[1] + 68832);
while ( v6 != 24 )
{
v8 = &v7[v6];
if ( *(_DWORD *)&v7[v6 + 4] == a1[7] )
{
v9 = *((_DWORD *)v8 + 2) - 1;
*((_DWORD *)v8 + 2) = v9;
if ( !v9 )
{
sub_BDCE8(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
*(_DWORD *)&v7[v6],
"../../src/fmod_dsp_convolutionreverb_async.cpp",
258);
v10 = (char *)&unk_F6134 + 24 * *(_DWORD *)(a1[1] + 68832);
*(_DWORD *)&v10[v6] = 0;
*(_DWORD *)&v10[v6 + 4] = 0;
}
break;
}
v6 += 12;
}
a1[20] = 0;
}
sub_44984((int)&v13);
if ( v5 )
{
sub_BE788((char *)&unk_F4D34 + 616 * *(_DWORD *)(a1[1] + 68832) + 308 * a1[26], a1[26]);
j_FMOD_OS_CriticalSection_Free(dword_F6214[2 * *(_DWORD *)(a1[1] + 68832) + a1[26]], 0);
dword_F6214[2 * *(_DWORD *)(a1[1] + 68832) + a1[26]] = 0;
}
v11 = sub_6E474(a1);
sub_44984((int)&v15);
return v11;
}