//
// sub_1004BB61C from 0x1004bb61c to 0x1004bb75c (320 bytes)
//
// 1 xrefs:
// > DeathTrackerPopup::init @ 0x1004ba9fc
//
// This function is hookable on this platform (idp: arm, 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 11:06:17 +0000
//
__int64 __fastcall sub_1004BB61C(__int64 a1, __int64 a2)
{
__int64 result; // x0
int v4; // w8
unsigned int v5; // w9
int v7; // w8
int v8; // w9
int v9; // w8
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v4 = (int)result % 10;
v5 = result + 9;
if ( *(_BYTE *)(a1 + 920) != 1 )
{
if ( v5 <= 0x12 )
{
sub_1004BBAA0(a1, dword_10076F974[v4]);
return sub_1004BBCDC(a1);
}
v8 = *(_DWORD *)(a1 + 728);
if ( (unsigned int)(result - 10) > 9 )
{
if ( v8 )
{
if ( v8 == 2 && v4 <= 1 )
{
v9 = v4 == 0;
if ( *(unsigned __int8 *)(a1 + 986) != v9 )
{
*(_BYTE *)(a1 + 986) = v9;
return sub_1004BBAA0(a1, 2);
}
}
return result;
}
*(_BYTE *)(a1 + 744) = v4 == 1;
}
else
{
if ( v8 == 3 || v8 == 2 && (*(_BYTE *)(a1 + 986) & 1) != 0 )
return result;
*(_DWORD *)(a1 + 740) = v4;
if ( v4 )
*(_BYTE *)(a1 + 744) = 0;
}
*(_BYTE *)(a1 + 745) = 1;
return sub_1004BBCDC(a1);
}
if ( v5 <= 0x12 && v4 <= 1 )
{
v7 = v4 == 1;
if ( *(unsigned __int8 *)(a1 + 977) != v7 )
{
*(_BYTE *)(a1 + 977) = v7;
return sub_1004BBCDC(a1);
}
}
return result;
}