//
// GJBaseGameLayer::logPickupItem from 0x99e42c to 0x99e55c (304 bytes)
//
// 4 xrefs:
// > PlayLayer::loadFromCheckpoint @ 0x70fa70
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8ce4
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8fe4
// > ??> @ 0x61300
//
// 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 12:58:05 +0000
//
__int64 __fastcall GJBaseGameLayer::logPickupItem(GJBaseGameLayer *this, EffectGameObject *a2)
{
__int64 v3; // x24
cocos2d::CCString *v4; // x0
const char *CString; // x25
size_t v6; // x0
size_t v7; // x19
unsigned __int64 v8; // x0
char *v9; // x3
__int64 v11; // [xsp+50h] [xbp+50h] BYREF
size_t v12; // [xsp+58h] [xbp+58h]
void *v13; // [xsp+60h] [xbp+60h]
v3 = *((_QWORD *)this + 1574);
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*((unsigned int *)a2 + 448));
v11 = 0;
CString = (const char *)cocos2d::CCString::getCString(v4);
v12 = 0;
v13 = nullptr;
v6 = strlen(CString);
v7 = v6;
if ( v6 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D81C();
if ( v6 > 0x16 )
{
v8 = (v6 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = v8 | 1;
v9 = (char *)operator new(v8);
v13 = v9;
v12 = v7;
LABEL_4:
v9 = (char *)memcpy(v9, CString, v7);
goto LABEL_5;
}
LOBYTE(v11) = 2 * v6;
v9 = (char *)&v11 + 1;
if ( v6 )
goto LABEL_4;
LABEL_5:
v9[v7] = 0;
cocos2d::CCDictionary::setObject(v3, a2);
if ( (v11 & 1) != 0 )
operator delete(v13);
return _stack_chk_guard;
}