//
// sub_CBBD4 from 0xcbbd4 to 0xcbc5c (136 bytes)
//
// 1 xrefs:
// > sub_56824 @ 0x569c4
//
// 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 12:14:48 +0000
//
__int64 __fastcall sub_CBBD4(__int64 a1, __int64 a2)
{
__int16 v3; // w8
__int64 result; // x0
__int64 v6; // x0
__int64 v7; // x1
if ( !*(_QWORD *)(a1 + 168) )
return 0;
if ( !a2 )
return 31;
v3 = atomic_load((unsigned int *)(a1 + 100));
if ( (v3 & 0x100) != 0 )
return sub_CB674(a1, a2, 0);
result = sub_CD398(*(_QWORD *)(a1 + 168));
if ( !(_DWORD)result )
{
v6 = sub_CD4B0();
*(_QWORD *)(v7 + 8) = a1;
*(_QWORD *)(v7 + 16) = a2;
return sub_CD2F0(v6);
}
return result;
}