//
// ScrollableContentLayer::updateSectionVisibility from 0x6e2590 to 0x6e2684 (244 bytes)
//
// 2 xrefs:
// > ScrollableContentLayer::applyContentPosition @ 0x6e5710
// > ??> @ 0x9fc10
//
// 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:40 +0000
//
__int64 __fastcall ScrollableContentLayer::updateSectionVisibility(__int64 this)
{
float v1; // s1
float v2; // s0
__int64 v3; // x19
__int64 v4; // x21
signed int v5; // w23
signed int v6; // w22
unsigned int v7; // w20
bool v8; // zf
v1 = *(float *)(this + 520);
if ( v1 > 0.0 && *(_QWORD *)(this + 544) )
{
v2 = *(float *)(this + 436);
v3 = *(_QWORD *)(this + 528);
v4 = this + 536;
v5 = vcvtms_s32_f32(v2 / v1) - 1;
v6 = vcvtms_s32_f32((float)(v2 + *(float *)(this + 428)) / v1) + 1;
while ( v3 != v4 )
{
while ( 1 )
{
v7 = v5 <= *(_DWORD *)(v3 + 32) && v6 >= *(_DWORD *)(v3 + 32);
if ( v7 != (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 40) + 352LL))(*(_QWORD *)(v3 + 40)) )
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v3 + 40) + 344LL))(*(_QWORD *)(v3 + 40), v7);
this = *(_QWORD *)(v3 + 8);
if ( !this )
break;
do
{
v3 = this;
this = *(_QWORD *)this;
}
while ( this );
if ( v3 == v4 )
return this;
}
this = v3;
do
{
v3 = *(_QWORD *)(v3 + 16);
v8 = this == *(_QWORD *)v3;
this = v3;
}
while ( !v8 );
}
}
return this;
}