//
// ScrollableContentLayer::reloadVirtualRows from 0x6e621c to 0x6e6390 (372 bytes)
//
// 9 xrefs:
// > ScrollableContentLayer::setVirtualRows @ 0x6e641c
// > FriendsProfilePage::rebuildList @ 0xa5035c
// > FriendPickerPopup::buildRows @ 0xc81154
// > FriendPickerPopup::buildRows @ 0xc811d8
// > ThreadViewPopup::buildRows @ 0xc864e0
// > ThreadViewPopup::buildRows @ 0xc86530
// > IDNameBrowserPopup::rebuildList @ 0xce22e4
// > IDNameBrowserPopup::rebuildList @ 0xce2458
// > ??> @ 0xa8580
//
// 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:51:43 +0000
//
ScrollableContentLayer *__fastcall ScrollableContentLayer::reloadVirtualRows(ScrollableContentLayer *this, float a2)
{
__int64 v2; // x20
int v4; // w0
int v5; // w21
__int64 v6; // x2
__int64 v7; // x3
unsigned __int64 v8; // x19
unsigned __int64 v9; // x1
__int64 v10; // x19
float v11; // s8
__int64 v12; // x19
__int64 v13; // x1
float v14; // s0
float v15; // s8
v2 = (__int64)this;
if ( !*((_QWORD *)this + 74) )
return this;
ScrollableContentLayer::unmountAllRows(this);
v4 = (***(__int64 (__fastcall ****)(_QWORD))(v2 + 592))(*(_QWORD *)(v2 + 592));
if ( v4 < 0 )
v5 = 0;
else
v5 = v4;
v6 = *(_QWORD *)(v2 + 616);
v7 = *(_QWORD *)(v2 + 624);
v8 = v5 + 1;
v9 = (v7 - v6) >> 2;
if ( v8 > v9 )
{
std::vector::__append(v2 + 616, v8 - v9);
v6 = *(_QWORD *)(v2 + 616);
}
else if ( v8 < v9 )
{
v10 = v6 + 4 * v8;
if ( v7 != v10 )
*(_QWORD *)(v2 + 624) = v7 + 4 * ~((unsigned __int64)(v7 - 4 - v10) >> 2);
}
v11 = *(float *)(v2 + 604);
if ( v5 )
{
v12 = 0;
do
{
*(float *)(v6 + 4 * v12) = v11;
v13 = (unsigned int)v12++;
v14 = (*(float (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v2 + 592) + 8LL))(*(_QWORD *)(v2 + 592), v13);
v6 = *(_QWORD *)(v2 + 616);
v11 = v11 + v14;
}
while ( v5 > (int)v12 );
}
*(float *)(v6 + 4LL * v5) = v11;
v15 = v11 + *(float *)(v2 + 608);
if ( !*(_BYTE *)(v2 + 584) )
{
if ( v15 >= *(float *)(v2 + 428) )
goto LABEL_14;
LABEL_17:
v15 = *(float *)(v2 + 424);
if ( !*(_BYTE *)(v2 + 584) )
v15 = *(float *)(v2 + 428);
goto LABEL_14;
}
if ( v15 < *(float *)(v2 + 424) )
goto LABEL_17;
LABEL_14:
*(float *)(v2 + 432) = v15;
if ( a2 >= 0.0 )
{
*(float *)(v2 + 436) = a2;
*(_DWORD *)(v2 + 476) = 0;
}
ScrollableContentLayer::clampOffset(v2);
ScrollableContentLayer::ensureScrollThumb((ScrollableContentLayer *)v2);
return (ScrollableContentLayer *)ScrollableContentLayer::applyContentPosition((ScrollableContentLayer *)v2);
}