//
// sub_1004A8704 from 0x1004a8704 to 0x1004a87e0 (220 bytes)
//
// 2 xrefs:
// > sub_100426FFC @ 0x1004273bc
// > FMOD::DSP::getMeteringInfo @ 0x1004876d8
//
// 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
//
unsigned __int64 __fastcall sub_1004A8704(__int64 a1, unsigned __int64 __dst, unsigned __int64 a3)
{
__int64 v6; // x19
__int64 v7; // x9
__int64 v8; // x8
__int64 v9; // x22
v6 = *(_QWORD *)(a1 + 168);
if ( v6 )
sub_100442B5C(*(_QWORD *)(a1 + 168), 7u);
v7 = *(_QWORD *)(a1 + 528);
if ( !v7 )
{
v8 = 0;
v9 = 0;
if ( __dst | a3 )
goto LABEL_11;
LABEL_17:
a3 = 31;
goto LABEL_18;
}
if ( *(_BYTE *)(v7 + 530) )
v8 = *(_QWORD *)(a1 + 528);
else
v8 = 0;
if ( *(_BYTE *)(v7 + 1062) )
v9 = v7 + 532;
else
v9 = 0;
if ( !(__dst | a3) )
goto LABEL_17;
LABEL_11:
if ( (!__dst || v8) && (!a3 || v9) )
{
if ( __dst )
memcpy((void *)__dst, (const void *)(v8 + 256), 0x108u);
if ( a3 )
{
memcpy((void *)a3, (const void *)(v9 + 256), 0x108u);
a3 = 0;
}
}
else
{
a3 = 1;
}
LABEL_18:
if ( v6 )
sub_100442B7C(v6, 7u);
return a3;
}