//
// sub_10013D500 from 0x10013d500 to 0x10013d55c (92 bytes)
//
// 2 xrefs:
// > sub_10013C134 @ 0x10013c1c0
// > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x10013c6d4
//
// 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:59:30 +0000
//
__int64 __fastcall sub_10013D500(__int64 a1, int a2)
{
unsigned __int64 v2; // x8
int v4; // w20
v2 = *(_QWORD *)(a1 + 32);
if ( v2 < 0x200 )
a2 = 1;
if ( v2 < 0x400 )
v4 = a2;
else
v4 = 0;
if ( (v4 & 1) == 0 )
{
operator delete(**(void ***)(a1 + 8));
*(_QWORD *)(a1 + 8) += 8LL;
*(_QWORD *)(a1 + 32) -= 512LL;
}
return v4 ^ 1u;
}