//
// SongCell::loadFromObject from 0x737bdc to 0x73801c (1088 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x74d4e0
// > ??> @ 0x4c390
//
// 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:52:39 +0000
//
__int64 __fastcall SongCell::loadFromObject(SongCell *this, SongObject *a2)
{
unsigned int v4; // w25
const char *v5; // x2
cocos2d::CCLabelBMFont *v6; // x0
__int64 v7; // x19
void (__fastcall *v8)(__int64, __int64 *); // x26
void (__fastcall *v9)(__int64, __int64 *); // x26
float v10; // s0
void (__fastcall *v11)(__int64); // x26
float v12; // s8
const char *v13; // x6
__int64 v14; // x26
cocos2d::CCMenu *v15; // x24
__int64 v16; // x24
__int64 v17; // x0
float v18; // s9
__int64 (__fastcall *v19)(__int64); // x1
void (__fastcall *v20)(__int64, __int64 *); // x26
float *v21; // x0
cocos2d::CCLabelBMFont *v22; // x1
cocos2d::CCString *v23; // x0
const char *v24; // x2
cocos2d::CCLabelBMFont *CString; // x20
__int64 v26; // x20
void (__fastcall *v27)(__int64, __int64 *); // x22
__int64 v28; // x0
__int64 (__fastcall *v29)(__int64); // x1
void (__fastcall *v30)(__int64, __int64 *); // x19
__int64 v31; // x22
float v32; // s0
void (__fastcall *v33)(__int64, float); // x19
void (__fastcall *v35)(__int64, float); // x19
float *v36; // x0
void (__fastcall *v37)(__int64, float); // x26
float *v38; // x0
_BYTE v39[8]; // [xsp+70h] [xbp+70h] BYREF
__int64 v40; // [xsp+78h] [xbp+78h] BYREF
__int64 v41[2]; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCLabelBMFont *v42; // [xsp+90h] [xbp+90h]
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 584LL))(*((_QWORD *)this + 67), 1);
*((_QWORD *)this + 69) = a2;
v4 = LevelTools::artistForAudio((LevelTools *)*((unsigned int *)a2 + 14));
LevelTools::getAudioTitle((LevelTools *)*((unsigned int *)a2 + 14), v41);
v6 = (cocos2d::CCLabelBMFont *)((char *)v41 + 1);
if ( (v41[0] & 1) != 0 )
v6 = v42;
v7 = cocos2d::CCLabelBMFont::create(v6, "bigFont.fnt", v5);
if ( (v41[0] & 1) != 0 )
operator delete(v42);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 456LL))(*((_QWORD *)this + 67), v7);
v8 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v7 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v40, 0.0, 0.5);
v8(v7, &v40);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 1.0);
v9 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v7 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v40, 10.0, (float)(*((float *)this + 131) * 0.5) + 10.0);
v9(v7, &v40);
v10 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
if ( v10 > 240.0 )
{
v37 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL);
v38 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 328LL))(v7, v10);
v37(v7, 240.0 / *v38);
}
v11 = *(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 160LL);
v12 = 0.7;
if ( (*(float (__fastcall **)(__int64))(*(_QWORD *)v7 + 168LL))(v7) <= 0.7 )
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 168LL))(v7, 0.7);
v11(v7);
v14 = ButtonSprite::create(
(ButtonSprite *)"View",
(const char *)&dword_30 + 2,
0,
0,
0.6,
"bigFont.fnt",
"GJ_button_01.png",
v13,
30.0);
v15 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v14, 0, (__int64)this, (__int64)SongCell::onClick, 0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v15, 1.5);
v16 = cocos2d::CCMenu::create(v15, nullptr);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 456LL))(*((_QWORD *)this + 67), v16);
v17 = v14;
v18 = *((float *)this + 130);
v19 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 328LL);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
v21 = (float *)v19(v17);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v40,
(float)(v18 - (float)(*v21 * 0.5)) - 9.0,
*((float *)this + 131) * 0.5);
v20(v16, &v40);
LevelTools::nameForArtist((LevelTools *)v4, v41);
v22 = (cocos2d::CCLabelBMFont *)((char *)v41 + 1);
if ( (v41[0] & 1) != 0 )
v22 = v42;
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"By %s", (const char *)v22);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v23);
if ( (v41[0] & 1) != 0 )
operator delete(v42);
v26 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v24);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 456LL))(*((_QWORD *)this + 67), v26);
v27 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v40, 0.0, 0.5);
v27(v26, &v40);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL))(v26, 1.0);
v28 = v7;
v29 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL);
v30 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL);
v31 = v29(v28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 2.0, -21.0);
cocos2d::CCPoint::operator+(&v40, v31);
v30(v26, &v40);
v32 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 328LL))(v26);
if ( v32 > 140.0 )
{
v35 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL);
v36 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 328LL))(v26, v32);
v35(v26, 140.0 / *v36);
}
v33 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL);
if ( (*(float (__fastcall **)(__int64))(*(_QWORD *)v26 + 168LL))(v26) <= 0.7 )
v12 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v26 + 168LL))(v26);
v33(v26, v12);
return _stack_chk_guard;
}