//
// ThreadViewPopup::scrollToUnreadLine from 0x74703c to 0x747104 (200 bytes)
//
// 1 xrefs:
// > ThreadViewPopup::threadMessagesFinished @ 0x75eca2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:58:43 +0000
//
int __fastcall ThreadViewPopup::scrollToUnreadLine(int this)
{
int v1; // r4
float *v2; // r3
int v3; // r2
int i; // r1
float *v5; // r5
int v6; // t1
float v7; // s13
float v8; // s14
float v9; // s15
float v10; // s15
bool v11; // fzf
bool v12; // fnf
v1 = this;
if ( *(__int64 *)(this + 712) >= 1 )
{
this = *(_DWORD *)(this + 620);
if ( this )
{
v2 = *(float **)(v1 + 536);
v3 = 954437177 * ((*(_DWORD *)(v1 + 540) - (int)v2) >> 2);
for ( i = 0; i != v3; ++i )
{
v5 = v2;
v6 = *(_DWORD *)v2;
v2 += 9;
if ( v6 == 2 )
{
v7 = *(float *)(v1 + 632);
v8 = *(float *)(this + 332) - v7;
v9 = -v5[2];
if ( v8 <= 0.0 )
v8 = 0.0;
if ( (float)(v9 - v8) < 24.0 )
{
v10 = v9 - (float)(v7 * 0.3);
if ( v10 <= v8 )
{
v11 = v10 == 0.0;
v12 = v10 < 0.0;
}
else
{
v11 = v8 == 0.0;
v12 = v8 < 0.0;
}
if ( !v12 && !v11 )
{
if ( v10 > v8 )
v10 = v8;
}
else
{
v10 = 0.0;
}
ScrollableContentLayer::scrollTo((ScrollableContentLayer *)this, v10);
return ThreadViewPopup::setUnseenBelow((ThreadViewPopup *)v1, 1);
}
return this;
}
}
}
}
return this;
}