//
// sub_78E14 from 0x78e14 to 0x78eaa (150 bytes)
//
// 2 xrefs:
// > sub_78EB8 @ 0x79174
// > sub_78EB8 @ 0x791f0
//
// 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:12 +0000
//
int __fastcall sub_78E14(_DWORD *a1, int a2, size_t a3, int a4)
{
void *v7; // r0
void *v8; // r6
int result; // r0
int v10; // r4
if ( !a4 )
return sub_78DD8((int)a1, nullptr, a3);
v7 = (void *)sub_BD580(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), a3, "../../src/fmod_codec_midi.cpp", 2313, 0);
if ( !v7 )
return 38;
v8 = v7;
result = sub_78DD8((int)a1, v7, a3);
if ( !result )
{
v10 = sub_B0B08(*a1, 7, a2, v8);
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v8, "../../src/fmod_codec_midi.cpp", 2327, 1);
return v10;
}
return result;
}