//
// cocos2d::extension::CCTableView::scrollViewDidScroll from 0x180016030 to 0x18001634c (796 bytes)
//
// 6 xrefs:
// > ??> @ 0x1800287d0
// > ??> @ 0x18002ef68
// > ??> @ 0x18002efdc
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004a890
// > ??> @ 0x18004a89c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::extension::CCTableView::scrollViewDidScroll(
cocos2d::extension::CCTableView *this,
struct cocos2d::extension::CCScrollView *a2)
{
char *v3; // rbx
int v4; // ebp
__int64 v5; // rcx
const struct cocos2d::CCPoint *v6; // rax
float *v7; // rsi
unsigned int v8; // r14d
float v9; // xmm0_4
float *v10; // rax
float *v11; // r15
signed int v12; // r12d
float *v13; // rax
int v14; // eax
unsigned int v15; // ebx
__int64 v16; // rax
float v17; // xmm2_4
__int64 v18; // rcx
float v19; // xmm0_4
float *v20; // rax
unsigned int v21; // esi
struct cocos2d::CCObject *i; // rax
struct cocos2d::CCObject *Object; // rax
unsigned int j; // ecx
__int64 *v25; // rax
__int64 *v26; // rdx
__int64 *v27; // rcx
float v28; // [rsp+60h] [rbp+8h] BYREF
float v29; // [rsp+64h] [rbp+Ch]
char v30; // [rsp+70h] [rbp+18h] BYREF
char v31; // [rsp+78h] [rbp+20h] BYREF
v3 = (char *)this - 568;
v4 = (*(__int64 (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 9) + 32LL))(
*((_QWORD *)this + 9),
(char *)this - 568);
if ( !v4 )
return;
v5 = *((_QWORD *)this + 10);
if ( v5 )
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v5 + 8LL))(v5, (char *)this - 568);
v6 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this - 15) + 200LL))(*((_QWORD *)this - 15));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, v6);
cocos2d::CCPoint::operator*(&v30, &v28);
v7 = (float *)((char *)this - 52);
v8 = v4 - 1;
if ( v4 == 1 )
v8 = 0;
if ( !*((_DWORD *)this + 4) )
{
v9 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this - 15) + 144LL))(*((_QWORD *)this - 15));
v29 = v29 + (float)(*v7 / v9);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, (const struct cocos2d::CCPoint *)&v28);
v11 = v10;
v12 = (*(__int64 (__fastcall **)(_QWORD, char *))(**((_QWORD **)v3 + 80) + 32LL))(
*((_QWORD *)v3 + 80),
(char *)this - 568)
- 1;
if ( !*((_DWORD *)v3 + 146) )
v11[1] = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v3 + 56) + 304LL))(*((_QWORD *)v3 + 56)) + 4)
- v11[1];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, (const struct cocos2d::CCPoint *)v11);
v14 = cocos2d::extension::CCTableView::__indexFromOffset((__int64)this - 568, v13);
v15 = v14;
if ( v14 != -1 )
{
if ( v14 < 0 )
v15 = 0;
if ( (int)v15 > v12 )
{
v7 = (float *)((char *)this - 52);
LABEL_16:
v15 = v4 - 1;
goto LABEL_17;
}
}
if ( v15 == -1 )
goto LABEL_16;
LABEL_17:
v16 = **((_QWORD **)this - 15);
if ( *((_DWORD *)this + 4) )
v17 = v29 + (float)(*v7 / (*(float (**)(void))(v16 + 144))());
else
v17 = v29 - (float)(*v7 / (*(float (**)(void))(v16 + 144))());
v18 = *((_QWORD *)this - 15);
v29 = v17;
v19 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v18 + 128LL))(v18);
v28 = v28 + (float)(*((float *)this - 14) / v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, (const struct cocos2d::CCPoint *)&v28);
v21 = cocos2d::extension::CCTableView::_indexFromOffset((__int64)this - 568, v20);
if ( v21 == -1 )
v21 = v4 - 1;
if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 7)) )
{
for ( i = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 7), 0);
*((_DWORD *)i + 82) < v15;
i = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 7), 0) )
{
cocos2d::extension::CCTableView::_moveCellOutOfSight((cocos2d::extension::CCTableView *)((char *)this - 568), i);
if ( !cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 7)) )
break;
}
}
if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 7)) )
{
Object = cocos2d::CCArray::lastObject(*((cocos2d::CCArray **)this + 7));
for ( j = *((_DWORD *)Object + 82); j <= v8; j = *((_DWORD *)Object + 82) )
{
if ( j <= v21 )
break;
cocos2d::extension::CCTableView::_moveCellOutOfSight(
(cocos2d::extension::CCTableView *)((char *)this - 568),
Object);
if ( !cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 7)) )
break;
Object = cocos2d::CCArray::lastObject(*((cocos2d::CCArray **)this + 7));
}
}
for ( ; v15 <= v21; ++v15 )
{
v25 = **((__int64 ***)this + 3);
v26 = v25;
v27 = (__int64 *)v25[1];
while ( !*((_BYTE *)v27 + 25) )
{
if ( *((_DWORD *)v27 + 7) >= v15 )
{
v26 = v27;
v27 = (__int64 *)*v27;
}
else
{
v27 = (__int64 *)v27[2];
}
}
if ( *((_BYTE *)v26 + 25) || v15 < *((_DWORD *)v26 + 7) || v26 == v25 )
cocos2d::extension::CCTableView::updateCellAtIndex((cocos2d::extension::CCTableView *)((char *)this - 568), v15);
}
}