//
// sub_1000D1AE0 from 0x1000d1ae0 to 0x1000d1b70 (144 bytes)
//
// 2 xrefs:
// > sub_1000D1B80 @ 0x1000d1b85
// > sub_1000D1B90 @ 0x1000d1b99
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1000D1AE0(__int64 a1)
{
cocos2d::CCObject *v2; // rdi
*(_QWORD *)a1 = off_1008B9370;
qword_10099EF40 = 0;
v2 = *(cocos2d::CCObject **)(a1 + 320);
if ( v2 )
cocos2d::CCObject::release(v2);
if ( (*(_BYTE *)(a1 + 448) & 1) == 0 )
{
if ( (*(_BYTE *)(a1 + 368) & 1) == 0 )
goto LABEL_5;
LABEL_9:
operator delete(*(void **)(a1 + 384));
if ( (*(_BYTE *)(a1 + 328) & 1) == 0 )
return cocos2d::CCNode::dCCNode(a1);
goto LABEL_6;
}
operator delete(*(void **)(a1 + 464));
if ( (*(_BYTE *)(a1 + 368) & 1) != 0 )
goto LABEL_9;
LABEL_5:
if ( (*(_BYTE *)(a1 + 328) & 1) != 0 )
LABEL_6:
operator delete(*(void **)(a1 + 344));
return cocos2d::CCNode::dCCNode(a1);
}