//
// TableView::checkFirstCell from 0x3ca070 to 0x3ca250 (480 bytes)
//
// 2 xrefs:
// > TableView::checkBoundaryOfContent @ 0x3ca61c
// > TableView::checkBoundaryOfContent @ 0x3ca71c
//
// 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:46:36 +0000
//
float *__fastcall TableView::checkFirstCell(cocos2d::CCArray **this, CCIndexPath **a2)
{
float *result; // r0
const cocos2d::CCPoint *v5; // r0
float v6; // s16
float v7; // s16
float v8; // s16
float v9; // s16
int v10; // r2
cocos2d::CCObject *v11; // r7
int v12; // r3
float v13; // r11
cocos2d::CCObject *v14; // r5
float *v15; // r0
void (__fastcall *v16)(cocos2d::CCObject *, _BYTE *); // r11
float v17; // s16
int v18; // r0
int isDuplicateIndexPath; // r2
int v20; // r0
void (__fastcall *v21)(cocos2d::CCObject *, _BYTE *); // [sp+4h] [bp-20h]
void (__fastcall *v22)(cocos2d::CCObject *, _BYTE *); // [sp+4h] [bp-20h]
_BYTE v23[4]; // [sp+Ch] [bp-18h] BYREF
float v24; // [sp+10h] [bp-14h]
_BYTE v25[8]; // [sp+14h] [bp-10h] BYREF
result = (float *)TableView::checkBoundaryOfCell((TableView *)this, (TableViewCell *)a2);
if ( result != (float *)((char *)&dword_0 + 1) )
{
v5 = (const cocos2d::CCPoint *)(*((int (__fastcall **)(CCIndexPath **))*a2 + 24))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, v5);
v6 = v24;
v7 = v6 + *(float *)((*((int (__fastcall **)(CCIndexPath **))*a2 + 41))(a2) + 4);
v8 = v7 - *(float *)((*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 91) + 164))(*(this + 91)) + 4);
v9 = v8 + *(float *)((*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 91) + 96))(*(this + 91)) + 4);
result = (float *)(*((int (__fastcall **)(cocos2d::CCArray **))*this + 41))(this);
if ( v9 < result[1] )
{
v11 = CCIndexPath::CCIndexPathWithSectionRow(a2[95], (int)a2[94] - 1, v10);
result = (float *)(**(int (__fastcall ***)(_DWORD, CCIndexPath *, cocos2d::CCArray **))*(this + 115))(
*(this + 115),
a2[95],
this);
v12 = *((_DWORD *)v11 + 13);
if ( v12 >= 0 && v12 < (int)result )
{
result = (float *)TableView::isDuplicateInVisibleCellArray((int)this, (int)v11);
if ( !result )
{
v13 = COERCE_FLOAT(
(*(int (__fastcall **)(_DWORD, cocos2d::CCObject *, cocos2d::CCArray **))(*(_DWORD *)*(this + 114) + 20))(
*(this + 114),
v11,
this));
result = (float *)(*(int (__fastcall **)(_DWORD, cocos2d::CCObject *, cocos2d::CCArray **))(*(_DWORD *)*(this + 115) + 12))(
*(this + 115),
v11,
this);
v14 = (cocos2d::CCObject *)result;
if ( result )
{
v21 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)result + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 0.0, 1.0);
v21(v14, v25);
v22 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v14 + 160);
v15 = (float *)(*((int (__fastcall **)(cocos2d::CCArray **))*this + 41))(this);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v25, *v15, v13);
v22(v14, v25);
v16 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v14 + 92);
v17 = *(float *)((*((int (__fastcall **)(CCIndexPath **))*a2 + 24))(a2) + 4);
v18 = (*((int (__fastcall **)(CCIndexPath **))*a2 + 41))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 0.0, v17 + *(float *)(v18 + 4));
v16(v14, v25);
CCIndexPath::operator=((_DWORD *)v14 + 81, v11);
cocos2d::CCArray::insertObject(*(this + 111), v14, 0);
isDuplicateIndexPath = TableView::isDuplicateIndexPath((int)this, (int)v11);
if ( !isDuplicateIndexPath )
cocos2d::CCArray::insertObject(*(this + 113), v11, 0);
v20 = (int)*(this + 114);
if ( v20 )
(*(void (__fastcall **)(int, cocos2d::CCObject *, cocos2d::CCObject *, cocos2d::CCArray **))(*(_DWORD *)v20 + 8))(
v20,
v11,
v14,
this);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(*(_DWORD *)*(this + 91) + 228))(
*(this + 91),
v14,
isDuplicateIndexPath);
result = (float *)*(this + 114);
if ( result )
return (float *)(*(int (__fastcall **)(float *, cocos2d::CCObject *, cocos2d::CCObject *, cocos2d::CCArray **))(*(_DWORD *)result + 12))(
result,
v11,
v14,
this);
}
}
}
}
}
return result;
}