//
// ScrollableContentLayer::updateScrollThumb from 0x6e1dcc to 0x6e1f68 (412 bytes)
//
// 3 xrefs:
// > ScrollableContentLayer::setThumbOffset @ 0x6e1f8c
// > ScrollableContentLayer::applyContentPosition @ 0x6e5708
// > ??> @ 0x84880
//
// 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:39 +0000
//
__int64 __fastcall ScrollableContentLayer::updateScrollThumb(ScrollableContentLayer *this)
{
__int64 *v2; // x0
float v3; // s0
float v4; // s1
float v5; // s8
__int64 v6; // x2
float v7; // s5
float v8; // s2
float v9; // s3
float v10; // s4
__int64 v11; // x22
float v12; // s8
void (__fastcall *v13)(__int64, _BYTE *); // x23
__int64 v14; // x22
float v15; // s0
float v16; // s2
float v17; // s1
void (__fastcall *v18)(__int64, _BYTE *); // x19
_BYTE v20[8]; // [xsp+40h] [xbp+40h] BYREF
v2 = *((__int64 **)this + 61);
if ( v2 )
{
v3 = *((float *)this + 108);
v4 = *((float *)this + 107);
if ( *((_BYTE *)this + 584) )
{
v5 = v3 - *((float *)this + 106);
v6 = *v2;
if ( v5 > 0.0 )
goto LABEL_4;
}
else
{
v6 = *v2;
v5 = v3 - v4;
if ( (float)(v3 - v4) > 0.0 )
{
LABEL_4:
(*(void (**)(void))(v6 + 344))();
v7 = *((float *)this + 107);
v8 = v7 - 6.0;
v9 = (float)(v7 / *((float *)this + 108)) * (float)(v7 - 6.0);
if ( v9 < 8.0 )
v9 = 8.0;
if ( v9 > v8 )
{
v9 = v7 - 6.0;
v10 = *((float *)this + 109) / v5;
if ( v10 >= 0.0 )
{
LABEL_8:
if ( v10 > 1.0 )
v10 = 1.0;
goto LABEL_10;
}
}
else
{
v10 = *((float *)this + 109) / v5;
if ( v10 >= 0.0 )
goto LABEL_8;
}
v10 = 0.0;
LABEL_10:
v11 = *((_QWORD *)this + 61);
v12 = (float)(v7 - 3.0) - (float)((float)(v8 - v9) * v10);
v13 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v11 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v20, 3.0, v9);
v13(v11, v20);
v14 = *((_QWORD *)this + 61);
v15 = *((float *)this + 125);
v16 = *((float *)this + 106) - 2.0;
v17 = *((float *)this + 126);
v18 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v16 + v15, v12 + v17);
v18(v14, v20);
return _stack_chk_guard;
}
}
(*(void (**)(void))(v6 + 344))();
}
return _stack_chk_guard;
}