//
// GJCompactUserCell::buildUserRow from 0x1001391f4 to 0x100139958 (1892 bytes)
//
// 6 xrefs:
// > GJCompactUserCell::loadFromScore @ 0x10012eea8
// > GJRequestCell::loadFromScore @ 0x10012f0c8
// > FriendsProfilePage::mountVirtualRow @ 0x100272994
// > FriendPickerPopup::mountVirtualRow @ 0x1005043c8
// > sub_100507288 @ 0x100507454
// > sub_100507288 @ 0x100507704
//
// 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:28 +0000
//
__int64 __fastcall GJCompactUserCell::buildUserRow(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
__int64 a5,
__int64 a6,
__int64 a7,
int a8,
__n128 a9)
{
float v11; // s8
char v17; // w28
_BYTE *v18; // x23
__int64 v19; // x0
__int64 v20; // x0
__int64 v21; // x0
__int64 v22; // x0
__int64 v23; // x0
__int64 v24; // x0
__int64 v25; // x22
__int128 *p_dst; // x0
__int64 v27; // x23
__n128 v28; // q0
float v29; // s9
float v30; // s0
__int64 v31; // x25
__n128 v32; // q0
float v33; // s11
float v34; // s12
float v35; // s9
int v36; // w25
int v37; // w8
_BOOL4 v38; // w26
__int64 v39; // x0
__int64 v40; // x0
float v41; // s9
__int64 v42; // x24
float v43; // s10
float v44; // s10
int v45; // w26
int v46; // w28
void **v47; // x22
void **v48; // x8
const char *v49; // x9
void **v50; // x10
__int64 v51; // x0
char *CString; // x0
__int64 v53; // x24
__int64 v54; // x0
float v55; // s10
__int64 v56; // x0
float v57; // s10
__int64 v58; // x0
float v59; // s10
__int64 v60; // x22
void *v63[2]; // [xsp+20h] [xbp-130h] BYREF
__int64 v64; // [xsp+30h] [xbp-120h]
void *v65[2]; // [xsp+40h] [xbp-110h] BYREF
__int64 v66; // [xsp+50h] [xbp-100h]
void *__p[2]; // [xsp+60h] [xbp-F0h] BYREF
char v68; // [xsp+77h] [xbp-D9h]
void *v69[2]; // [xsp+78h] [xbp-D8h] BYREF
char v70; // [xsp+8Fh] [xbp-C1h]
float v71; // [xsp+90h] [xbp-C0h] BYREF
float v72; // [xsp+94h] [xbp-BCh]
std::string __str; // [xsp+98h] [xbp-B8h] BYREF
__int128 __dst; // [xsp+B0h] [xbp-A0h] BYREF
__int64 v75; // [xsp+C0h] [xbp-90h]
v11 = a9.n128_f32[0];
v17 = 1;
v18 = (_BYTE *)SimplePlayer::create(1, a9);
(*(void (__fastcall **)(_BYTE *, float))(*(_QWORD *)v18 + 160LL))(v18, 0.8);
sub_1000262BC((float *)&__dst, 22.0, v11);
v19 = (*(__int64 (__fastcall **)(_BYTE *, __int128 *))(*(_QWORD *)v18 + 184LL))(v18, &__dst);
v20 = GameManager::sharedState(v19);
v21 = GameManager::colorForIdx(v20, *(unsigned int *)(a1 + 416));
LOWORD(__dst) = v21;
BYTE2(__dst) = BYTE2(v21);
v22 = (*(__int64 (__fastcall **)(_BYTE *, __int128 *))(*(_QWORD *)v18 + 960LL))(v18, &__dst);
v23 = GameManager::sharedState(v22);
v24 = GameManager::colorForIdx(v23, *(unsigned int *)(a1 + 420));
LOWORD(__dst) = v24;
BYTE2(__dst) = BYTE2(v24);
SimplePlayer::setSecondColor(v18, &__dst);
sub_1003A426C(v18, *(unsigned int *)(a1 + 424));
if ( *(_DWORD *)(a1 + 428) != 2 )
v17 = *(_BYTE *)(a1 + 672);
v18[660] = v17 & 1;
SimplePlayer::updatePlayerFrame(v18, *(unsigned int *)(a1 + 412), *(unsigned int *)(a1 + 432));
SimplePlayer::updateColors(v18);
if ( (_DWORD)a7 )
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v18 + 912LL))(v18, 110);
(*(void (__fastcall **)(__int64, _BYTE *, __int64))(*(_QWORD *)a2 + 464LL))(a2, v18, 1);
if ( *(char *)(a1 + 343) < 0 )
{
sub_1000097D0(&__dst, *(void **)(a1 + 320), *(_QWORD *)(a1 + 328));
}
else
{
__dst = *(_OWORD *)(a1 + 320);
v75 = *(_QWORD *)(a1 + 336);
}
if ( SHIBYTE(v75) < 0 )
{
v25 = *((_QWORD *)&__dst + 1);
operator delete((void *)__dst);
if ( v25 )
goto LABEL_14;
}
else if ( HIBYTE(v75) )
{
goto LABEL_14;
}
sub_100009900(&__str, "-");
std::string::operator=((std::string *)(a1 + 320), &__str);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
LABEL_14:
if ( *(char *)(a1 + 343) < 0 )
{
sub_1000097D0(&__dst, *(void **)(a1 + 320), *(_QWORD *)(a1 + 328));
}
else
{
__dst = *(_OWORD *)(a1 + 320);
v75 = *(_QWORD *)(a1 + 336);
}
if ( v75 >= 0 )
p_dst = &__dst;
else
p_dst = (__int128 *)__dst;
v27 = cocos2d::CCLabelBMFont::create_1(p_dst, "goldFont.fnt");
if ( SHIBYTE(v75) < 0 )
operator delete((void *)__dst);
v28 = cocos2d::CCLabelBMFont::limitLabelWidth(v27, 150.0, 0.6, 0.0);
if ( (_DWORD)a7 )
{
BYTE2(__dst) = -126;
LOWORD(__dst) = -32126;
(*(void (__fastcall **)(__int64, __int128 *, __n128))(*(_QWORD *)v27 + 1072LL))(v27, &__dst, v28);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v27 + 1024LL))(v27, 150);
}
v29 = *(float *)(*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v27 + 328LL))(v27, v28) * 0.5;
v30 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v27 + 168LL))(v27);
sub_1000262BC(&v71, (float)(v29 * v30) + 46.0, v11 + 9.5);
v31 = CCMenuItemSpriteExtra::create(v27, 0, a4, a5, a6);
v32 = CCMenuItemSpriteExtra::setSizeMult(1.4);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v31 + 648LL))(v31, a1, v32);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v31 + 184LL))(v31, &v71);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a3 + 464LL))(a3, v31, 2);
v33 = v71;
v34 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 328LL))(v27);
v35 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v27 + 168LL))(v27);
v36 = *(_DWORD *)(a1 + 456);
v37 = *(_DWORD *)(a1 + 688);
v38 = v37 == 1 || v36 > 0;
if ( v36 <= 0 && !v37 )
{
v39 = GameLevelManager::sharedState();
v40 = GameLevelManager::storedFriendForAccountID(v39, *(_DWORD *)(a1 + 376));
if ( v40 )
{
v36 = *(_DWORD *)(v40 + 456);
v38 = 1;
}
}
v41 = v33 + (float)((float)(v34 * 0.5) * v35);
if ( a8 && v38 )
{
v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sFriendsIcon_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v42 + 160LL))(v42, 0.7);
v43 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 328LL))(v42);
v44 = v43 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v42 + 168LL))(v42);
sub_1000262BC((float *)&__dst, (float)(v41 + 5.0) + (float)(v44 * 0.5), v72 + -1.0);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v42 + 184LL))(v42, &__dst);
if ( (_DWORD)a7 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v42 + 912LL))(v42, 110);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a2 + 464LL))(a2, v42, 2);
v41 = v41 + (float)(v44 + 5.0);
}
if ( v36 >= 1 )
{
v45 = *(unsigned __int8 *)(a1 + 720);
GameToolbox::timestampToDayString((unsigned int)v36, v69);
v46 = v70;
v47 = (void **)v69[0];
GameToolbox::timestampToHumanReadable((unsigned int)v36, __p);
if ( v46 >= 0 )
v48 = v69;
else
v48 = v47;
v49 = "Friends";
if ( v45 )
v49 = "Following";
if ( v68 >= 0 )
v50 = __p;
else
v50 = (void **)__p[0];
v51 = sub_1003065B0("%s since %s\n(%s)", v49, (const char *)v48, (const char *)v50);
CString = (char *)cocos2d::CCString::getCString(v51);
sub_100009900(&__dst, CString);
if ( v68 < 0 )
operator delete(__p[0]);
if ( v70 < 0 )
operator delete(v69[0]);
if ( *(char *)(a1 + 343) < 0 )
{
sub_1000097D0(v65, *(void **)(a1 + 320), *(_QWORD *)(a1 + 328));
}
else
{
*(_OWORD *)v65 = *(_OWORD *)(a1 + 320);
v66 = *(_QWORD *)(a1 + 336);
}
if ( SHIBYTE(v75) < 0 )
{
sub_1000097D0(v63, (void *)__dst, *((unsigned __int64 *)&__dst + 1));
}
else
{
*(_OWORD *)v63 = __dst;
v64 = v75;
}
v53 = InfoAlertButton::create(v65, v63, 0.4);
if ( SHIBYTE(v64) < 0 )
operator delete(v63[0]);
if ( SHIBYTE(v66) < 0 )
operator delete(v65[0]);
v54 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v53 + 1072LL))(v53);
v55 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v54 + 328LL))(v54);
v56 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v53 + 1072LL))(v53);
v57 = v55 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v56 + 168LL))(v56);
sub_1000262BC((float *)v69, (float)(v41 + 5.0) + (float)(v57 * 0.5), v72 + -1.0);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v53 + 184LL))(v53, v69);
if ( (_DWORD)a7 )
{
v58 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v53 + 1072LL))(v53);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v58 + 912LL))(v58, 110);
}
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a3 + 464LL))(a3, v53, 2);
v59 = v57 + 5.0;
if ( SHIBYTE(v75) < 0 )
operator delete((void *)__dst);
v41 = v41 + v59;
}
if ( *(_BYTE *)(a1 + 724) == 1 )
{
v60 = cocos2d::CCLabelBMFont::create_1("New!", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v60 + 160LL))(v60, 0.45);
sub_1000262BC((float *)&__dst, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v60 + 296LL))(v60, &__dst);
sub_1000262BC((float *)&__dst, v41 + 8.0, v72);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v60 + 184LL))(v60, &__dst);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v60 + 72LL))(v60, 100);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a2 + 464LL))(a2, v60, 10);
}
sub_100139ABC(a1, a2, a7, 46.0, v11 + -8.0);
return v27;
}