//
// sub_1001DE3F4 from 0x1001de3f4 to 0x1001de4e0 (236 bytes)
//
// 1 xrefs:
// > sub_1001E3D80 @ 0x1001e3da4
//
// 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:29 +0000
//
__int64 __fastcall sub_1001DE3F4(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x19
__int64 v6; // x8
__int64 v7; // x22
__int64 v8; // x8
__int64 v9; // x21
__int64 v10; // x21
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
__int64 v13; // [xsp+10h] [xbp-30h]
v4 = cocos2d::CCDictionary::count(*(_QWORD *)(a1 + 448));
v5 = sub_1002E7510(v4);
v6 = *(_QWORD *)(a1 + 448);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 56);
while ( v7 )
{
v8 = *(_QWORD *)(v7 + 264);
v7 = *(_QWORD *)(v7 + 288);
v9 = *(unsigned int *)(v8 + 56);
if ( *(char *)(v8 + 87) < 0 )
{
sub_1000097D0(__p, *(void **)(v8 + 64), *(_QWORD *)(v8 + 72));
}
else
{
*(_OWORD *)__p = *(_OWORD *)(v8 + 64);
v13 = *(_QWORD *)(v8 + 80);
}
v10 = sub_10037EE84(v9, 0, __p, a2);
if ( SHIBYTE(v13) < 0 )
operator delete(__p[0]);
sub_1002E74E0(v5, v10);
}
}
if ( (unsigned int)sub_1002E757C(v5) >= 2 )
qsort(
*(void **)(*(_QWORD *)(v5 + 56) + 16LL),
**(unsigned int **)(v5 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_1001D1D94);
return v5;
}