//
// GameManager::switchCustomObjects from 0x718690 to 0x7188a4 (532 bytes)
//
// 2 xrefs:
// > GameManager::reorderKey @ 0x7188d8
// > ??> @ 0xd33f0
//
// 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:52:17 +0000
//
__int64 __fastcall GameManager::switchCustomObjects(GameManager *this, const char *a2, unsigned int a3)
{
unsigned int v4; // w27
__int64 v6; // x23
cocos2d::CCString *v7; // x0
size_t v8; // x0
cocos2d::CCObject *v9; // x23
__int64 v10; // x25
cocos2d::CCString *v11; // x0
const char *v12; // x0
size_t v13; // x0
cocos2d::CCObject *v14; // x25
__int64 v15; // x26
cocos2d::CCString *v16; // x0
const char *v17; // x0
size_t v18; // x0
__int64 v19; // x21
cocos2d::CCString *v20; // x0
const char *v21; // x0
size_t v22; // x0
char *CString; // [xsp+68h] [xbp+68h]
char *v25; // [xsp+68h] [xbp+68h]
char *v26; // [xsp+68h] [xbp+68h]
char *v27; // [xsp+68h] [xbp+68h]
__int64 v28; // [xsp+70h] [xbp+70h] BYREF
__int64 v29; // [xsp+78h] [xbp+78h]
void *v30; // [xsp+80h] [xbp+80h]
v4 = (unsigned int)a2;
v6 = *((_QWORD *)this + 57);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2);
v28 = 0;
CString = (char *)cocos2d::CCString::getCString(v7);
v29 = 0;
v30 = nullptr;
v8 = strlen(CString);
std::string::__init(&v28, CString, v8);
v9 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(v6, &v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
v10 = *((_QWORD *)this + 57);
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a3);
v12 = (const char *)cocos2d::CCString::getCString(v11);
v28 = 0;
v25 = (char *)v12;
v29 = 0;
v30 = nullptr;
v13 = strlen(v12);
std::string::__init(&v28, v25, v13);
v14 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(v10, &v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
cocos2d::CCObject::retain(v9);
v15 = *((_QWORD *)this + 57);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v4);
v17 = (const char *)cocos2d::CCString::getCString(v16);
v28 = 0;
v26 = (char *)v17;
v29 = 0;
v30 = nullptr;
v18 = strlen(v17);
std::string::__init(&v28, v26, v18);
cocos2d::CCDictionary::setObject(v15, v14);
if ( (v28 & 1) != 0 )
operator delete(v30);
v19 = *((_QWORD *)this + 57);
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a3);
v21 = (const char *)cocos2d::CCString::getCString(v20);
v28 = 0;
v27 = (char *)v21;
v29 = 0;
v30 = nullptr;
v22 = strlen(v21);
std::string::__init(&v28, v27, v22);
cocos2d::CCDictionary::setObject(v19, v9);
if ( (v28 & 1) != 0 )
operator delete(v30);
cocos2d::CCObject::release(v9);
return _stack_chk_guard;
}