//
// sub_1000D9514 from 0x1000d9514 to 0x1000d95a0 (140 bytes)
//
// 10 xrefs:
// > sub_1000D94D0 @ 0x1000d94e0
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x1001cfff0
// > cocos2d::CCFileUtils::removeFullPath @ 0x1001d0550
// > sub_1001D8A78 @ 0x1001d8bfc
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x10046360c
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0x1004638b8
// > EmoteSprite::defForName @ 0x1004dc438
// > sub_1004F0ED4 @ 0x1004f0f00
// > sub_1004F0F70 @ 0x1004f0f9c
// > sub_10053053C @ 0x100530d2c
//
// 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:58 +0000
//
__int64 __fastcall sub_1000D9514(__int64 a1, const void **a2)
{
__int64 v2; // x22
__int64 v3; // x23
__int64 v6; // x21
_BOOL4 v7; // w0
__int64 v8; // x8
v2 = a1 + 8;
v3 = *(_QWORD *)(a1 + 8);
if ( !v3 )
return v2;
v6 = a1 + 8;
do
{
v7 = sub_10000A144(a1, (const void **)(v3 + 32), a2);
if ( v7 )
v8 = 8;
else
v8 = 0;
if ( !v7 )
v6 = v3;
v3 = *(_QWORD *)(v3 + v8);
}
while ( v3 );
if ( v6 == v2 || sub_10000A144(a1, a2, (const void **)(v6 + 32)) )
return v2;
return v6;
}