//
// sub_79B94 from 0x79b94 to 0x79cec (344 bytes)
//
// 1 xrefs:
// > sub_77970 @ 0x77974
//
// 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:41:13 +0000
//
int __fastcall sub_79B94(_DWORD *a1)
{
_DWORD *v2; // r6
_DWORD *v3; // r0
int v4; // r0
int v5; // r0
int v6; // r1
_DWORD *v7; // r1
__int64 v8; // kr00_8
int v9; // r4
int v10; // r5
int v11; // r1
int v12; // r4
int v13; // r5
int v14; // r1
v2 = a1 + 2876;
v3 = (_DWORD *)a1[70];
if ( v3 )
{
sub_4C918(v3);
a1[70] = 0;
}
v4 = a1[69];
if ( v4 )
{
(*(void (__fastcall **)(int))(*(_DWORD *)v4 + 8))(v4);
a1[69] = 0;
}
v5 = v2[12];
if ( v5 )
{
v6 = *(_DWORD *)(v5 + 272) - 1;
*(_DWORD *)(v5 + 272) = v6;
if ( !v6 )
{
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v5 + 268) + 12))(*(_DWORD *)(v5 + 268), 1);
v7 = (_DWORD *)v2[12];
v8 = *(_QWORD *)v7;
*(_DWORD *)HIDWORD(v8) = v8;
*(_DWORD *)(*v7 + 4) = HIDWORD(v8);
*v7 = v7;
v7[1] = v7;
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v7, "../../src/fmod_codec_midi.cpp", 3310, 1);
}
v2[12] = 0;
v2[13] = 0;
v2[14] = 0;
}
if ( v2[6] )
{
v9 = 0;
v10 = 4;
while ( v9 < *v2 )
{
v11 = *(_DWORD *)(v2[6] + v10);
if ( v11 )
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v11, "../../src/fmod_codec_midi.cpp", 3323, 1);
v10 += 32;
++v9;
}
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v2[6], "../../src/fmod_codec_midi.cpp", 3326, 1);
}
if ( a1[178] )
{
v12 = 0;
v13 = 16;
while ( v12 < a1[72] )
{
sub_4B910((_DWORD *)(a1[178] + v13));
v13 += 600;
++v12;
}
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), a1[178], "../../src/fmod_codec_midi.cpp", 3336, 1);
a1[178] = 0;
}
v14 = a1[71];
if ( v14 )
{
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v14, "../../src/fmod_codec_midi.cpp", 3342, 1);
a1[71] = 0;
}
return 0;
}