//
// FMOD::Sound::seekData from 0x1004c02f0 to 0x1004c0400 (272 bytes)
//
// 1 xrefs:
// > sub_100453134 @ 0x100453138
//
// 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
//
// local variable allocation has failed, the output may be wrong!
FMOD_RESULT __fastcall FMOD::Sound::seekData(FMOD::Sound *a1, unsigned int a2)
{
__int64 v2; // x21
int v4; // w3
int v5; // w4
int v6; // w5
int v7; // w6
int v8; // w7
__int64 v9; // x20
unsigned int v10; // w8
unsigned int v11; // w8
__int64 v13; // [xsp+8h] [xbp-138h] BYREF
unsigned int *v14; // [xsp+10h] [xbp-130h] BYREF
_BYTE v15[256]; // [xsp+18h] [xbp-128h] BYREF
v2 = *(_QWORD *)&a2;
v13 = 0;
v9 = sub_1004C3CE0(a1, &v14, &v13);
if ( !(_DWORD)v9 )
{
v10 = atomic_load(v14 + 68);
if ( v10 && (v11 = atomic_load(v14 + 68), v11 != 7) )
{
v9 = 46;
}
else
{
v9 = (*(__int64 (__fastcall **)(unsigned int *, __int64))(*(_QWORD *)v14 + 208LL))(v14, v2);
if ( !(_DWORD)v9 )
goto LABEL_9;
}
}
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
sub_100435D28(v15, 0x100u, v2, v4, v5, v6, v7, v8);
sub_10048489C(v9, 5, (__int64)a1, (__int64)"Sound::seekData", (__int64)v15);
}
LABEL_9:
if ( v13 )
sub_100442B7C(v13, 0xDu);
return (unsigned int)v9;
}