//
// sub_100140EE8 from 0x100140ee8 to 0x1001411f8 (784 bytes)
//
// 1 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10013faac
//
// 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 10:59:32 +0000
//
void __fastcall sub_100140EE8(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x19
__int64 v4; // x20
__int64 v5; // x0
__int64 v6; // x0
__n128 GameVariable; // q0
int v8; // w0
double *v9; // x0
double v10; // d0
__int64 v11; // x0
float *v12; // x22
int i; // w26
__int64 v14; // x8
__int64 v15; // x21
__int64 v16; // x23
__int64 v17; // x0
__int64 v18; // [xsp+20h] [xbp-70h] BYREF
__int64 v19; // [xsp+28h] [xbp-68h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(&v19, v2);
v3 = cocos2d::CCLabelBMFont::create_1("Player 1", "bigFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v3 + 160LL))(v3, 0.8);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v3, 3);
sub_1000262BC(
(float *)&v18,
(float)(*(float *)&v19 * 0.5) - (float)(*(float *)&v19 * 0.25),
*((float *)&v19 + 1) * 0.5);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v3 + 184LL))(v3, &v18);
v4 = cocos2d::CCLabelBMFont::create_1("Player 2", "bigFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v4 + 160LL))(v4, 0.8);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v4, 3);
sub_1000262BC(
(float *)&v18,
(float)(*(float *)&v19 * 0.5) + (float)(*(float *)&v19 * 0.25),
*((float *)&v19 + 1) * 0.5);
v5 = (*(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v4 + 184LL))(v4, &v18);
v6 = GameManager::sharedState(v5);
GameVariable = GameManager::getGameVariable(v6, "0010");
if ( v8 )
{
v9 = (double *)(*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v3 + 192LL))(v3, GameVariable);
v10 = sub_1000262F4(&v18, v9);
v11 = (*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v4 + 192LL))(v4, v10);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 184LL))(v3, v11);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v4 + 184LL))(v4, &v18);
}
v12 = (float *)cocos2d::CCSprite::createWithSpriteFrameName("floorLine_001.png");
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 160LL))(v12, (float)(*((float *)&v19 + 1) * 1.2) / v12[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v12 + 360LL))(v12, 90.0);
(*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v12, 3);
sub_1000262BC((float *)&v18, *(float *)&v19 * 0.5, *((float *)&v19 + 1) * 0.5);
(*(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v12 + 184LL))(v12, &v18);
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v12 + 1080LL))(v12, 0x100000302LL);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1024LL))(v3, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1024LL))(v4, 0);
(*(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)v12 + 912LL))(v12, 0);
for ( i = 0; i != 3; ++i )
{
if ( i == 1 )
v14 = v4;
else
v14 = (__int64)v12;
if ( i )
v15 = v14;
else
v15 = v3;
v16 = cocos2d::CCFadeTo::create(255, 0.2);
cocos2d::CCDelayTime::create(0.8);
cocos2d::CCFadeTo::create(0, 0.2);
cocos2d::CCCallFunc::create(v15, 536, 1);
v17 = sub_10021D420(v16);
cocos2d::CCNode::runAction(v15, v17);
}
}