//
// OptionsCell::loadFromObject from 0x1001276b4 to 0x100127a74 (960 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x1001262a8
// > CustomListView::reloadAll @ 0x1001327c4
//
// 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:18 +0000
//
__int64 __fastcall OptionsCell::loadFromObject(__int64 a1, __int64 a2)
{
_QWORD *v4; // x0
__int64 v5; // x21
__int64 v6; // x20
int v7; // w8
void **v8; // x1
std::string::size_type v9; // x2
std::string *v10; // x0
__int64 v11; // x21
float32x2_t *v12; // x22
float v13; // s8
float v14; // s0
double v15; // d0
__int64 v16; // x8
__int64 v17; // x8
__int16 v18; // w8
const char *v19; // x0
__int64 v20; // x20
__int64 v21; // x20
__int64 v22; // x20
float32x2_t v24; // [xsp+8h] [xbp-78h] BYREF
void *__p[2]; // [xsp+10h] [xbp-70h] BYREF
unsigned __int8 v26; // [xsp+27h] [xbp-59h]
std::string v27; // [xsp+28h] [xbp-58h] BYREF
*(_QWORD *)(a1 + 552) = a2;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 536) + 584LL))(*(_QWORD *)(a1 + 536), 1);
v4 = (_QWORD *)(a2 + 64);
if ( *(char *)(a2 + 87) < 0 )
v4 = (_QWORD *)*v4;
v5 = *(unsigned int *)(a2 + 100);
v6 = cocos2d::CCLabelBMFont::create_1(v4, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v6, 2);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 160LL))(v6, 0.4);
sub_1000262BC((float *)&v27, 0.0, 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v6 + 296LL))(v6, &v27);
sub_1000262BC((float *)&v27, 40.0, *(float *)(a1 + 524) * 0.5);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v6 + 184LL))(v6, &v27);
v7 = *(_DWORD *)(a2 + 96);
if ( v7 == 1 )
{
v16 = *(_QWORD *)(a2 + 104);
if ( !v16 )
goto LABEL_27;
v17 = *(_QWORD *)(v16 + 1840);
if ( *(_BYTE *)(v17 + 465) == 1 )
{
v27.__r_.__value_.__s.__data_[2] = -106;
v18 = -1;
}
else
{
if ( *(_BYTE *)(v17 + 464) != 1 )
goto LABEL_27;
v27.__r_.__value_.__s.__data_[2] = -46;
v18 = -17991;
}
goto LABEL_26;
}
if ( v7 )
goto LABEL_27;
if ( !(_DWORD)v5 )
{
v27.__r_.__value_.__s.__data_[2] = -106;
v18 = -26986;
LABEL_26:
LOWORD(v27.__r_.__value_.__l.__data_) = v18;
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v6 + 1072LL))(v6, &v27);
goto LABEL_27;
}
if ( (int)v5 >= 1 )
{
sub_100009900(&v27, "[ ");
GameToolbox::intToString(v5, __p);
if ( (v26 & 0x80u) == 0 )
v8 = __p;
else
v8 = (void **)__p[0];
if ( (v26 & 0x80u) == 0 )
v9 = v26;
else
v9 = (std::string::size_type)__p[1];
std::string::append(&v27, (const std::string::value_type *)v8, v9);
if ( (char)v26 < 0 )
operator delete(__p[0]);
std::string::append(&v27, " ]");
if ( (v27.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v10 = &v27;
else
v10 = (std::string *)v27.__r_.__value_.__r.__words[0];
v11 = cocos2d::CCLabelBMFont::create_1(v10, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v11, 2);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.6);
sub_1000262BC((float *)__p, 0.0, 0.5);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v11 + 296LL))(v11, __p);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 1072LL))(v11, algn_10075DFC6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 1024LL))(v11, 175);
v12 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
v13 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 328LL))(v6);
v14 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v6 + 168LL))(v6);
sub_1000262BC((float *)&v24, (float)(v13 * v14) + 8.0, 0.0);
*(float32x2_t *)&v15 = sub_100026318(v12, &v24, (float32x2_t *)__p);
(*(void (__fastcall **)(__int64, void **, double))(*(_QWORD *)v11 + 184LL))(v11, __p, v15);
if ( SHIBYTE(v27.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v27.__r_.__value_.__l.__data_);
}
LABEL_27:
if ( *(_BYTE *)(*(_QWORD *)(a1 + 552) + 60LL) )
v19 = "GJ_checkOn_001.png";
else
v19 = "GJ_checkOff_001.png";
v20 = cocos2d::CCSprite::createWithSpriteFrameName(v19);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 0.6);
v21 = CCMenuItemSpriteExtra::create(v20, 0, a1, sub_10013812C, 0);
CCMenuItemSpriteExtra::setSizeMult(1.5);
v22 = sub_100270434(v21);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 536) + 464LL))(*(_QWORD *)(a1 + 536), v22, 3);
sub_1000262BC((float *)&v27, 20.0, *(float *)(a1 + 524) * 0.5);
return (*(__int64 (__fastcall **)(__int64, std::string *))(*(_QWORD *)v22 + 184LL))(v22, &v27);
}