//
// sub_1001BD934 from 0x1001bd934 to 0x1001bda2c (248 bytes)
//
// 6 xrefs:
// > sub_1001BD900 @ 0x1001bd910
// > sub_1001BDE3C @ 0x1001bde4c
// > sub_1003D4C38 @ 0x1003d4c4c
// > GameStatsManager::getSpecialUnlockDescription @ 0x1003d4ccc
// > LevelEditorLayer::getLevelString @ 0x1003fc7b0
// > sub_100524CA8 @ 0x100524ccc
//
// 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:00:13 +0000
//
const void **__fastcall sub_1001BD934(_QWORD *a1, __int64 *a2)
{
unsigned __int64 v4; // x0
int8x8_t v5; // x23
unsigned __int64 v6; // x21
uint8x8_t v7; // d0
unsigned __int64 v8; // x24
unsigned __int64 v9; // x25
const void ***v10; // x8
const void **i; // x22
unsigned __int64 v12; // x8
v4 = sub_10008E078((__int64)a1, a2);
v5 = (int8x8_t)a1[1];
if ( !*(_QWORD *)&v5 )
return nullptr;
v6 = v4;
v7 = (uint8x8_t)vcnt_s8(v5);
v7.i16[0] = vaddlv_u8(v7);
v8 = v7.u32[0];
if ( v7.u32[0] > 1uLL )
{
v9 = v4;
if ( v4 >= *(_QWORD *)&v5 )
v9 = v4 % *(_QWORD *)&v5;
}
else
{
v9 = (*(_QWORD *)&v5 - 1LL) & v4;
}
v10 = *(const void ****)(*a1 + 8 * v9);
if ( !v10 )
return nullptr;
for ( i = *v10; i; i = (const void **)*i )
{
v12 = (unsigned __int64)i[1];
if ( v12 == v6 )
{
if ( sub_10008E0B4((__int64)a1, i + 2, (const void **)a2) )
return i;
}
else
{
if ( v8 > 1 )
{
if ( v12 >= *(_QWORD *)&v5 )
v12 %= *(_QWORD *)&v5;
}
else
{
v12 &= *(_QWORD *)&v5 - 1LL;
}
if ( v12 != v9 )
return nullptr;
}
}
return i;
}