//
// GJRotationControl::init from 0x100156f94 to 0x100157398 (1028 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008e2388
//
// 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:42 +0000
//
__int64 __fastcall GJRotationControl::init(_QWORD *a1)
{
__int64 v2; // x19
double v3; // d0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x21
__int64 v8; // x21
__int64 v9; // x21
__int64 v10; // x21
__int64 v11; // x21
__int64 v12; // x21
__int64 v13; // x0
__int64 v14; // x21
double v16[2]; // [xsp+8h] [xbp-58h] BYREF
void *__p[2]; // [xsp+18h] [xbp-48h] BYREF
char v18; // [xsp+2Fh] [xbp-31h]
v2 = cocos2d::CCLayer::init(a1);
if ( (_DWORD)v2 )
{
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1);
sub_1000262BC((float *)v16, 60.0, 0.0);
v3 = sub_10002630C((_QWORD *)((char *)a1 + 412), v16);
(*(void (__fastcall **)(_QWORD *, void *, double))(*a1 + 296LL))(a1, &unk_1009F3FA0, v3);
v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_rotationControlBtn01_001.png");
a1[53] = v4;
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v4, 1);
v5 = cocos2d::CCSprite::createWithSpriteFrameName("warpLockOffBtn_001.png");
v6 = CCMenuItemSpriteExtra::create(v5, 0, a1, sub_1001573B4, 0);
a1[56] = v6;
v7 = cocos2d::CCMenu::createWithItem(v6);
sub_1000262BC((float *)v16, 110.0, 35.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v7 + 184LL))(v7, v16);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v7, 3);
*(_QWORD *)&v16[0] = v7;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1000LL))(v7, 0);
sub_100011A50((__int64)(a1 + 60), v16);
v8 = CCTextInputNode::create(" ", "Thonburi", 24, "bigFont.fnt", 48.0, 19.2);
a1[58] = v8;
sub_1000262BC((float *)v16, 110.0, 0.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v8 + 184LL))(v8, v16);
CCTextInputNode::setMaxLabelScale(a1[58], 0.48);
CCTextInputNode::setMaxLabelWidth(a1[58], 48.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1[58] + 576LL) + 344LL))(*(_QWORD *)(a1[58] + 576LL), 0);
v9 = a1[58];
*(_DWORD *)(v9 + 592) = 7;
*(_QWORD *)(v9 + 700) = 0x200000001LL;
sub_100009900(__p, "0123456789.-");
CCTextInputNode::setAllowedChars(v9, __p);
if ( v18 < 0 )
operator delete(__p[0]);
*(_BYTE *)(a1[58] + 424LL) = 1;
sub_1000262CC((float *)v16, 0.0, 0.0, 40.0, 40.0);
v10 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v16);
sub_1000262C4((float *)v16, 80.0, 32.0);
(*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v10 + 320LL))(v10, v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v10 + 160LL))(v10, 0.625);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 912LL))(v10, 90);
(*(void (__fastcall **)(__int64, float, float))(*(_QWORD *)v10 + 248LL))(v10, 0.0, -0.5);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[58] + 464LL))(a1[58], v10, 0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*a1 + 464LL))(a1, a1[58], 2);
v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.4);
v12 = CCMenuItemSpriteExtra::create(v11, 0, a1, sub_100157424, 0);
a1[59] = v12;
sub_1000262BC((float *)v16, 151.0, 0.0);
v13 = (*(__int64 (__fastcall **)(__int64, double *))(*(_QWORD *)v12 + 184LL))(v12, v16);
v14 = cocos2d::CCMenu::create(v13);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v14 + 184LL))(v14, &unk_1009F3FA0);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v14 + 320LL))(v14, &unk_1009F3FA8);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 456LL))(v14, a1[59]);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v14, 3);
*(_QWORD *)&v16[0] = v14;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 1000LL))(v14, 0);
sub_100011A50((__int64)(a1 + 60), v16);
sub_1001575C8(a1, 0.0);
}
return v2;
}