//
// LikeItemLayer::init from 0x544f04 to 0x5451c8 (708 bytes)
//
// 1 xrefs:
// > LikeItemLayer::create @ 0x54533c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:22 +0000
//
GameManager *__fastcall LikeItemLayer::init(int a1, int a2, int a3, int a4)
{
GameManager *v8; // r0
GameManager *v9; // r9
int v10; // r6
void (__fastcall *v11)(int, _BYTE *); // r8
int (__fastcall *v12)(int, _BYTE *); // r8
cocos2d::CCMenu *v13; // r0
int v14; // r0
const char *v15; // r1
int v16; // r8
int v17; // r10
void (__fastcall *v18)(int, _BYTE *); // r11
const char *v19; // r1
int v20; // r10
int v21; // r10
const char *v22; // r1
int v23; // r11
int v24; // r6
void (__fastcall *v25)(int, _BYTE *); // r11
const cocos2d::CCPoint *v26; // r11
void (__fastcall *v27)(int, _BYTE *); // r10
const char *v28; // r2
int v29; // r6
void (__fastcall *v30)(int, _BYTE *); // r8
cocos2d::CCPoint *v32; // [sp+Ch] [bp-48h]
cocos2d::CCPoint *v33; // [sp+Ch] [bp-48h]
float v34; // [sp+14h] [bp-40h] BYREF
float v35; // [sp+18h] [bp-3Ch]
int (__fastcall *v36)(LikeItemLayer *, cocos2d::CCObject *); // [sp+1Ch] [bp-38h]
int v37; // [sp+20h] [bp-34h]
_DWORD (*v38)(LikeItemLayer *__hidden, cocos2d::CCObject *); // [sp+24h] [bp-30h]
int v39; // [sp+28h] [bp-2Ch]
_DWORD (*v40)(LikeItemLayer *__hidden, cocos2d::CCObject *); // [sp+2Ch] [bp-28h]
int v41; // [sp+30h] [bp-24h]
_BYTE v42[8]; // [sp+34h] [bp-20h] BYREF
_BYTE v43[16]; // [sp+3Ch] [bp-18h] BYREF
v8 = FLAlertLayer::init((FLAlertLayer *)a1, 75);
v9 = v8;
if ( v8 )
{
*(_DWORD *)(a1 + 520) = a2;
*(_DWORD *)(a1 + 524) = a3;
*(_DWORD *)(a1 + 528) = a4;
cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v34);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v43, 0.0, 0.0, 80.0, 80.0);
v10 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v43);
v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v43, 200.0, 115.0);
v11(v10, v43);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v10, -1);
v12 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v34 * 0.5, v35 * 0.5);
v13 = (cocos2d::CCMenu *)v12(v10, v43);
v14 = cocos2d::CCMenu::create(v13);
*(_DWORD *)(a1 + 444) = v14;
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v14, 10);
v16 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v15);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 80))(v16, 1061997773);
v36 = LikeItemLayer::onClose;
v37 = 0;
v17 = CCMenuItemSpriteExtra::create(v16, 0, a1, (int)LikeItemLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v17, 1.5);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v17);
v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);
v32 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)(v34 * 0.5) - 100.0) + 5.0,
(float)((float)(v35 * 0.5) + 57.5) - 5.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v42, v32);
v18(v17, v42);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_likeBtn_001.png", v19);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 80))(v20, 1067030938);
v38 = LikeItemLayer::onLike;
v39 = 0;
v21 = CCMenuItemSpriteExtra::create(v20, 0, a1, (int)LikeItemLayer::onLike, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v21);
v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_dislikeBtn_001.png", v22);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 80))(v23, 1067030938);
v40 = LikeItemLayer::onDislike;
v41 = 0;
v24 = CCMenuItemSpriteExtra::create(v23, 0, a1, (int)LikeItemLayer::onDislike, 0);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v24);
v25 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
v33 = *(cocos2d::CCPoint **)(a1 + 444);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, (float)(v34 * 0.5) - 43.0, (float)(v35 * 0.5) - 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v42, v33);
v25(v21, v42);
v26 = *(const cocos2d::CCPoint **)(a1 + 444);
v27 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, (float)(v34 * 0.5) + 43.0, (float)(v35 * 0.5) - 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v42, v26);
v27(v24, v42);
v29 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Vote", "bigFont.fnt", v28);
v30 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v29 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v34 * 0.5, (float)((float)(v35 * 0.5) + 57.5) - 20.0);
v30(v29, v43);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 460) + 228))(*(_DWORD *)(a1 + 460), v29);
}
return v9;
}