//
// TableView::checkFirstCell from 0x140089330 to 0x1400895d8 (680 bytes)
//
// 3 xrefs:
// > TableView::checkBoundaryOfContent @ 0x140088e72
// > TableView::checkBoundaryOfContent @ 0x140088e98
// > ??> @ 0x14091268c
//
// This function is hookable on this platform (idp: pc, 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 11:25:58 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall TableView::checkFirstCell(__int64 a1, _DWORD *a2)
{
__int64 result; // rax
const struct cocos2d::CCPoint *v5; // rax
__int64 v6; // rax
float v7; // xmm6_4
float v8; // xmm6_4
float v9; // xmm6_4
int v10; // ebx
int v11; // edi
cocos2d::CCObject *v12; // r14
int v13; // ecx
double v14; // xmm0_8
float v15; // xmm6_4
struct cocos2d::CCObject *v16; // rbp
__int64 v17; // rbx
__int64 v18; // rax
__int64 v19; // rbx
float *v20; // rax
__int64 v21; // rax
__int64 v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
__int64 v25; // rax
__int64 v26; // rcx
__int64 v27; // rcx
char v28; // [rsp+70h] [rbp+18h] BYREF
float v29; // [rsp+74h] [rbp+1Ch]
cocos2d::CCObject *v30; // [rsp+78h] [rbp+20h] BYREF
result = TableView::checkBoundaryOfCell_1((_QWORD *)a1, (__int64)a2);
if ( (_DWORD)result != 1 )
{
v5 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 200LL))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28, v5);
v6 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 320LL))(a2);
v7 = v29 + *(float *)(v6 + 4);
v8 = v7
- *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 320LL))(*(_QWORD *)(a1 + 480)) + 4);
v9 = v8
+ *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 480) + 200LL))(*(_QWORD *)(a1 + 480)) + 4);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 320LL))(a1);
if ( *(float *)(result + 4) > v9 )
{
v10 = a2[120] - 1;
v11 = a2[121];
v12 = (cocos2d::CCObject *)operator new(0x40u);
v30 = v12;
cocos2d::CCObject::CCObject(v12);
*(_QWORD *)v12 = &CCIndexPath::`vftable';
*((_DWORD *)v12 + 14) = v10;
*((_DWORD *)v12 + 15) = v11;
cocos2d::CCObject::autorelease(v12);
result = (***(__int64 (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 616))(
*(_QWORD *)(a1 + 616),
(unsigned int)a2[121],
a1);
v13 = *((_DWORD *)v12 + 14);
if ( v13 >= 0 && v13 < (int)result )
{
result = (__int64)TableView::isDuplicateInVisibleCellArray(a1, (__int64)v12);
if ( !result )
{
v14 = (*(double (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 608) + 40LL))(
*(_QWORD *)(a1 + 608),
v12,
a1);
v15 = *(float *)&v14;
result = (*(__int64 (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 616) + 24LL))(
*(_QWORD *)(a1 + 616),
v12,
a1);
v16 = (struct cocos2d::CCObject *)result;
if ( result )
{
v17 = *(_QWORD *)result;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 0.0, 1.0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v17 + 288))(v16, v18);
v19 = *(_QWORD *)v16;
v20 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 320LL))(a1);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v30, *v20, v15);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v19 + 312))(v16, v21);
v22 = *(_QWORD *)v16;
v23 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 320LL))(a2);
v24 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 200LL))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 0.0, *(float *)(v23 + 4) + *(float *)(v24 + 4));
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v22 + 184))(v16, v25);
cocos2d::CCObject::operator=((char *)v16 + 424, v12);
*((_DWORD *)v16 + 120) = *((_DWORD *)v12 + 14);
*((_DWORD *)v16 + 121) = *((_DWORD *)v12 + 15);
cocos2d::CCArray::insertObject(*(cocos2d::CCArray **)(a1 + 584), v16, 0);
if ( !TableView::isDuplicateIndexPath(a1, (__int64)v12) )
cocos2d::CCArray::insertObject(*(cocos2d::CCArray **)(a1 + 600), v12, 0);
v26 = *(_QWORD *)(a1 + 608);
if ( v26 )
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, struct cocos2d::CCObject *, __int64))(*(_QWORD *)v26 + 16LL))(
v26,
v12,
v16,
a1);
result = (*(__int64 (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 480) + 464LL))(
*(_QWORD *)(a1 + 480),
v16);
v27 = *(_QWORD *)(a1 + 608);
if ( v27 )
return (*(__int64 (__fastcall **)(__int64, cocos2d::CCObject *, struct cocos2d::CCObject *, __int64))(*(_QWORD *)v27 + 24LL))(
v27,
v12,
v16,
a1);
}
}
}
}
}
return result;
}