//
// LikeItemLayer::init from 0x91546c to 0x915844 (984 bytes)
//
// 2 xrefs:
// > LikeItemLayer::create @ 0x9159b8
// > ??> @ 0x72c88
//
// 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:57:19 +0000
//
__int64 __fastcall LikeItemLayer::init(__int64 a1, int a2, int a3, int a4)
{
cocos2d::CCDirector *v6; // x0
unsigned int v7; // w23
cocos2d::CCDirector *v8; // x0
__int64 v9; // x24
void (__fastcall *v10)(__int64, _BYTE *); // x25
__int64 (__fastcall *v11)(__int64, _BYTE *); // x25
cocos2d::CCMenu *v12; // x0
__int64 v13; // x0
const char *v14; // x1
__int64 v15; // x24
__int64 v16; // x24
cocos2d::CCNode *v17; // x26
void (__fastcall *v18)(__int64, __int64 *); // x25
const char *v19; // x1
__int64 v20; // x24
__int64 v21; // x25
const char *v22; // x1
__int64 v23; // x24
__int64 v24; // x24
cocos2d::CCNode *v25; // x27
void (__fastcall *v26)(__int64, __int64 *); // x26
cocos2d::CCNode *v27; // x26
void (__fastcall *v28)(__int64, __int64 *); // x25
const char *v29; // x2
__int64 v30; // x22
void (__fastcall *v31)(__int64, _BYTE *); // x24
__int64 v35; // [xsp+98h] [xbp+98h] BYREF
__int64 v36; // [xsp+A0h] [xbp+A0h] BYREF
_BYTE v37[16]; // [xsp+A8h] [xbp+A8h] BYREF
v6 = (cocos2d::CCDirector *)(unsigned __int8)FLAlertLayer::init((FLAlertLayer *)a1, 75);
v7 = (unsigned __int8)v6;
if ( (_BYTE)v6 )
{
*(_DWORD *)(a1 + 664) = a3;
*(_DWORD *)(a1 + 668) = a4;
*(_DWORD *)(a1 + 660) = a2;
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(&v35, v8);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v37, 0.0, 0.0, 80.0, 80.0);
v9 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v37);
v10 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v37, 200.0, 115.0);
v10(v9, v37);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v9,
0xFFFFFFFFLL);
v11 = *(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, *(float *)&v35 * 0.5, *((float *)&v35 + 1) * 0.5);
v12 = (cocos2d::CCMenu *)v11(v9, v37);
v13 = cocos2d::CCMenu::create(v12);
*(_QWORD *)(a1 + 552) = v13;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v13, 10);
v15 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v14);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, 0.8);
v16 = CCMenuItemSpriteExtra::create(v15, 0, a1, (__int64)LikeItemLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v16, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v16);
v17 = *(cocos2d::CCNode **)(a1 + 552);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
(float)((float)(*(float *)&v35 * 0.5) + -100.0) + 5.0,
(float)((float)(*((float *)&v35 + 1) * 0.5) + 57.5) - 5.0);
cocos2d::CCNode::convertToNodeSpace(&v36, v17, (const cocos2d::CCPoint *)v37);
v18(v16, &v36);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_likeBtn_001.png", v19);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 1.2);
v21 = CCMenuItemSpriteExtra::create(v20, 0, a1, (__int64)LikeItemLayer::onLike, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v21);
v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_dislikeBtn_001.png", v22);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 160LL))(v23, 1.2);
v24 = CCMenuItemSpriteExtra::create(v23, 0, a1, (__int64)LikeItemLayer::onDislike, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v24);
v25 = *(cocos2d::CCNode **)(a1 + 552);
v26 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v21 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
(float)(*(float *)&v35 * 0.5) + -43.0,
(float)(*((float *)&v35 + 1) * 0.5) + -15.0);
cocos2d::CCNode::convertToNodeSpace(&v36, v25, (const cocos2d::CCPoint *)v37);
v26(v21, &v36);
v27 = *(cocos2d::CCNode **)(a1 + 552);
v28 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
(float)(*(float *)&v35 * 0.5) + 43.0,
(float)(*((float *)&v35 + 1) * 0.5) + -15.0);
cocos2d::CCNode::convertToNodeSpace(&v36, v27, (const cocos2d::CCPoint *)v37);
v28(v24, &v36);
v30 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Vote", "bigFont.fnt", v29);
v31 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v30 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
*(float *)&v35 * 0.5,
(float)((float)(*((float *)&v35 + 1) * 0.5) + 57.5) - 20.0);
v31(v30, v37);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v30);
}
return v7;
}