//
// GameSettingsLayer::init from 0xc081ac to 0xc08304 (344 bytes)
//
// 2 xrefs:
// > GameSettingsLayer::create @ 0xc08598
// > ??> @ 0xe3ec0
//
// 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 13:03:52 +0000
//
__int64 __fastcall GameSettingsLayer::init(GameSettingsLayer *this, GJBaseGameLayer *a2, unsigned int a3)
{
unsigned __int8 v6; // w0
unsigned int v7; // w21
__int64 v9; // x3
_BYTE v10[8]; // [xsp+40h] [xbp+40h] BYREF
v6 = SetupTriggerPopup::init(this, nullptr, nullptr, 400.0, 280.0, 7u, 0.0);
v7 = v6;
if ( v6 )
{
*((_QWORD *)this + 137) = a2;
SetupTriggerPopup::preSetup(this);
qmemcpy(v10, "PWi", 3);
SetupTriggerPopup::setCustomBGColor((__int64)this, (__int64)v10);
*((_BYTE *)this + 596) = 1;
TabbedPopupLayer::addCloseButton(this);
GameSettingsLayer::setupTabs((cocos2d::CCNode **)this);
GameSettingsLayer::buildTabContent(this);
GameSettingsLayer::addSpecialContent((cocos2d::CCObject **)this);
SetupTriggerPopup::postSetup(this);
if ( (dword_15484B4 & 0x80000000) == 0 )
{
v9 = *((_QWORD *)this + 127);
if ( dword_15484B4 < (int)(954437177 * ((*((_QWORD *)this + 128) - v9) >> 3)) )
{
a3 = dword_15484B4;
*(_DWORD *)(v9 + 72LL * dword_15484B4 + 52) = dword_155EB10;
}
}
(*(void (__fastcall **)(GameSettingsLayer *, _QWORD))(*(_QWORD *)this + 1504LL))(this, a3);
}
return v7;
}