//
// sub_89980 from 0x89980 to 0x89a00 (128 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall sub_89980(int a1, int a2, int a3, int a4)
{
int v6; // r5
int v7; // r8
int v8; // r0
void (__fastcall *v9)(int, _DWORD, _DWORD); // r12
v6 = sub_9E504();
if ( !v6 )
{
v7 = a4;
v8 = *(_DWORD *)(a1 + 584);
v9 = *(void (__fastcall **)(int, _DWORD, _DWORD))(v8 + 140);
if ( v9 )
{
v9(v8, 0, 0);
v7 = a4;
}
sub_5490A(*(_DWORD **)(a1 + 584));
sub_B0884(*(_DWORD *)(a1 + 584), 0, v7, 2);
*(_DWORD *)(a1 + 528) = v7;
}
return v6;
}