//
// FMOD::Sound::readData from 0xb5868 to 0xb58fe (150 bytes)
//
// 1 xrefs:
// > FMOD::Sound::readData @ 0xe05d8
//
// 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:43 +0000
//
int __fastcall FMOD::Sound::readData(FMOD::Sound *this, void *a2, unsigned int a3, unsigned int *a4)
{
int v8; // r6
int v9; // r0
int v10; // r0
_BYTE v12[256]; // [sp+8h] [bp-120h] BYREF
int v13; // [sp+108h] [bp-20h] BYREF
_DWORD *v14; // [sp+10Ch] [bp-1Ch] BYREF
v13 = 0;
v8 = sub_54E84((int)this, &v14, (int)&v13);
if ( !v8 )
{
v9 = v14[47];
__dmb(0xBu);
if ( v9 && (v10 = v14[47], __dmb(0xBu), v10 != 7) )
{
v8 = 46;
}
else
{
v8 = (*(int (__fastcall **)(_DWORD *, void *, unsigned int, unsigned int *))(*v14 + 100))(v14, a2, a3, a4);
if ( !v8 )
{
v8 = 0;
goto LABEL_9;
}
}
}
if ( (*((_BYTE *)&dword_14 + (_DWORD)off_E8000) & 0x80) != 0 )
{
sub_B5908(v12, 256, a2, a3, a4);
sub_BAB40(v8, 5, this, "Sound::readData", v12);
}
LABEL_9:
sub_6429C(&v13);
return v8;
}