//
// ControlSlotsPopup::onSave from 0x7a4f78 to 0x7a5038 (192 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:59:56 +0000
//
int __fastcall ControlSlotsPopup::onSave(ControlSlotsPopup *this, cocos2d::CCObject *a2)
{
const char *v3; // r4
cocos2d::CCDirector *v4; // r0
GameManager *v5; // r0
void (__fastcall *v6)(ControlSlotsPopup *, cocos2d::CCNode *, int); // r9
cocos2d::CCString *v7; // r0
const char *CString; // r6
size_t v9; // r0
cocos2d::CCNode *v10; // r0
int v12[3]; // [sp+Ch] [bp-20h] BYREF
int v13[3]; // [sp+18h] [bp-14h] BYREF
v3 = (const char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v4 = *((cocos2d::CCDirector **)this + 178);
if ( v4 )
v4 = TouchControlEditLayer::commitToTarget(v4);
v5 = (GameManager *)GameManager::sharedState(v4);
GameManager::saveDPadLayout(v5, (int)v3, *((unsigned __int8 *)this + 716));
v6 = *(void (__fastcall **)(ControlSlotsPopup *, cocos2d::CCNode *, int))(*(_DWORD *)this + 232);
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Slot %i saved", v3);
memset(v12, 0, sizeof(v12));
CString = (const char *)cocos2d::CCString::getCString(v7);
v9 = strlen(CString);
std::string::__init(v12, CString, v9);
memset(v13, 0, sizeof(v13));
std::string::__init(v13, &unk_B6B226, 0);
v10 = TextAlertPopup::create((int)v12, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v13);
v6(this, v10, 100);
std::string::~string((int)v13);
return std::string::~string((int)v12);
}