//
// sub_1800973D0 from 0x1800973d0 to 0x180097575 (421 bytes)
//
// 4 xrefs:
// > FMOD::DSP::getMeteringInfo @ 0x1800a219b
// > sub_1800DB2E0 @ 0x1800db6f7
// > ??> @ 0x1801fa9d4
// > ??> @ 0x1801fa9e0
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 10:53:47 +0000
//
__int64 __fastcall sub_1800973D0(__int64 a1, _QWORD *a2, _QWORD *a3)
{
__int64 v3; // rbp
char v4; // r9
__int64 v8; // rax
unsigned int v9; // esi
__int64 v10; // rdx
__int64 v11; // r8
__int64 v12; // rcx
int v13; // eax
__int128 *v14; // rax
__int64 v15; // rdx
__int128 v16; // xmm0
__int128 *v17; // rax
__int128 v18; // xmm0
v3 = *(_QWORD *)(a1 + 168);
v4 = 0;
if ( v3 )
{
sub_1801021C0(*(_QWORD *)(a1 + 168), 7);
v4 = 1;
}
v8 = *(_QWORD *)(a1 + 536);
v9 = 0;
if ( v8 && *(_BYTE *)(v8 + 530) )
{
v10 = v8;
goto LABEL_7;
}
v10 = 0;
if ( v8 )
{
LABEL_7:
v11 = v8 + 532;
if ( *(_BYTE *)(v8 + 1062) )
goto LABEL_9;
}
v11 = 0;
LABEL_9:
v12 = 2;
if ( !a2 )
{
if ( !a3 )
{
v13 = 31;
LABEL_24:
v9 = v13;
goto LABEL_25;
}
goto LABEL_14;
}
if ( !v10 )
goto LABEL_23;
if ( a3 )
{
LABEL_14:
if ( v11 )
{
if ( !a2 )
goto LABEL_19;
goto LABEL_16;
}
LABEL_23:
v13 = 1;
goto LABEL_24;
}
LABEL_16:
v14 = (__int128 *)(v10 + 256);
v15 = 2;
do
{
a2 += 16;
v16 = *v14;
v14 += 8;
*((_OWORD *)a2 - 8) = v16;
*((_OWORD *)a2 - 7) = *(v14 - 7);
*((_OWORD *)a2 - 6) = *(v14 - 6);
*((_OWORD *)a2 - 5) = *(v14 - 5);
*((_OWORD *)a2 - 4) = *(v14 - 4);
*((_OWORD *)a2 - 3) = *(v14 - 3);
*((_OWORD *)a2 - 2) = *(v14 - 2);
*((_OWORD *)a2 - 1) = *(v14 - 1);
--v15;
}
while ( v15 );
*a2 = *(_QWORD *)v14;
LABEL_19:
if ( a3 )
{
v17 = (__int128 *)(v11 + 256);
do
{
a3 += 16;
v18 = *v17;
v17 += 8;
*((_OWORD *)a3 - 8) = v18;
*((_OWORD *)a3 - 7) = *(v17 - 7);
*((_OWORD *)a3 - 6) = *(v17 - 6);
*((_OWORD *)a3 - 5) = *(v17 - 5);
*((_OWORD *)a3 - 4) = *(v17 - 4);
*((_OWORD *)a3 - 3) = *(v17 - 3);
*((_OWORD *)a3 - 2) = *(v17 - 2);
*((_OWORD *)a3 - 1) = *(v17 - 1);
--v12;
}
while ( v12 );
*a3 = *(_QWORD *)v17;
}
LABEL_25:
if ( v4 && v3 )
sub_180102300(v3, 7);
return v9;
}