//
// sub_1000D6540 from 0x1000d6540 to 0x1000d65ac (108 bytes)
//
// 1 xrefs:
// > sub_1002E3CF0 @ 0x1002e3d68
//
// 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 10:58:56 +0000
//
__int64 __fastcall sub_1000D6540(__int64 a1, __int64 a2)
{
__int64 v3; // x20
__int64 result; // x0
__int64 v5; // x21
__int64 v6; // x0
v3 = sub_1000D65AC(a2, 0);
result = sub_1002E757C(v3);
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = sub_1002E75A0(v3, v5);
GJLevelList::addLevelToList(a1, v6);
v5 = (unsigned int)(v5 + 1);
result = sub_1002E757C(v3);
}
while ( (unsigned int)v5 < (unsigned int)result );
}
return result;
}