//
// LevelInfoLayer::numberInputClosed from 0x7e786c to 0x7e7a20 (436 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'LevelInfoLayer::numberInputClosed @ 0x7e7a28
// > ??> @ 0xce290
// > ??> @ 0x143c0d0
//
// 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:54:29 +0000
//
__int64 __fastcall LevelInfoLayer::numberInputClosed(LevelInfoLayer *this, NumberInputLayer *a2)
{
char *v2; // x2
char v4; // w0
__int64 v5; // x0
__int64 v6; // x1
int v7; // w0
int v8; // w1
__int64 v9; // x21
__int64 v11; // [xsp+38h] [xbp+38h] BYREF
__int64 v12; // [xsp+40h] [xbp+40h]
char *v13; // [xsp+48h] [xbp+48h]
__int64 v14[2]; // [xsp+50h] [xbp+50h] BYREF
void *v15; // [xsp+60h] [xbp+60h]
v2 = (char *)a2 + 720;
v11 = 0;
v4 = *((_BYTE *)a2 + 720);
v12 = 0;
v13 = nullptr;
if ( (v4 & 1) != 0 )
{
std::string::__init(&v11, *((void **)a2 + 92), *((_QWORD *)a2 + 91));
}
else
{
v5 = *(_QWORD *)v2;
v6 = *((_QWORD *)a2 + 91);
v13 = *((char **)v2 + 2);
v11 = v5;
v12 = v6;
}
if ( (v11 & 1) != 0 )
v7 = atoi(v13);
else
v7 = atoi((const char *)&v11 + 1);
v8 = *(_DWORD *)(*((_QWORD *)this + 63) + 980LL) - *(_DWORD *)(*((_QWORD *)this + 63) + 984LL);
if ( v7 + 10000 == v8 || v8 == v7 + 1000000 )
{
LevelInfoLayer::confirmClone(this, nullptr);
}
else
{
v14[0] = 0;
v14[1] = 0;
v15 = nullptr;
std::string::__init(v14, "Incorrect password!", 0x13u);
v9 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Error", (char *)v14, (ButtonSprite *)"OK", nullptr, 300.0);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
++*(_DWORD *)(*((_QWORD *)this + 63) + 1004LL);
}
if ( (v11 & 1) != 0 )
operator delete(v13);
return _stack_chk_guard;
}