//
// sub_1800FD450 from 0x1800fd450 to 0x1800fd554 (260 bytes)
//
// 5 xrefs:
// > sub_1800FD560 @ 0x1800fd58e
// > sub_1800FD5D0 @ 0x1800fd5fe
// > ??> @ 0x18018f724
// > ??> @ 0x18018f738
// > ??> @ 0x180200fe0
//
// 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:54:26 +0000
//
__int64 __fastcall sub_1800FD450(__int64 a1, unsigned int a2, __int64 **a3)
{
char v7; // r15
__int64 *v8; // rbx
__int64 *v9; // rax
unsigned int v10; // esi
__int64 *v11; // rax
unsigned int v12; // ebp
__int64 *v13; // rax
__int64 v14; // rcx
if ( !a3 )
return 31;
v7 = 0;
if ( a1 )
{
sub_1801021C0(a1, 19);
v7 = 1;
}
v8 = (__int64 *)(a1 + 69984);
v9 = *(__int64 **)(a1 + 69984);
if ( v9 == (__int64 *)(a1 + 69984) )
{
LABEL_8:
v10 = 0;
v11 = (__int64 *)sub_1800B6880(
*((_QWORD *)off_1801AED20 + 52),
112,
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_systemi_fft.cpp",
92,
0);
*a3 = v11;
if ( v11 )
{
v12 = sub_1800F5010((__int64)v11, a2, 0);
v13 = *a3;
if ( v12 )
{
sub_1800F5890(*a3);
*a3 = nullptr;
v10 = v12;
}
else
{
v14 = *v8;
*v13 = *v8;
v13[1] = (__int64)v8;
*(_QWORD *)(v14 + 8) = v13;
*(_QWORD *)v13[1] = v13;
}
}
else
{
v10 = 38;
}
}
else
{
while ( 1 )
{
*a3 = v9;
if ( *((_DWORD *)v9 + 6) == a2 )
break;
v9 = (__int64 *)*v9;
if ( v9 == v8 )
goto LABEL_8;
}
v10 = 0;
}
if ( v7 )
sub_180102300(a1, 19);
return v10;
}