//
// ScrollableContentLayer::mountRowSlot from 0x3f5d80 to 0x3f5ebc (316 bytes)
//
// 2 xrefs:
// > ScrollableContentLayer::remountVirtualRow @ 0x3f5fc6
// > ScrollableContentLayer::updateVirtualRows @ 0x3f6130
//
// 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:47:17 +0000
//
int __fastcall ScrollableContentLayer::mountRowSlot(ScrollableContentLayer *this, int a2)
{
int v3; // r6
_DWORD *v5; // r4
float v6; // s16
int v7; // r7
void (__fastcall *v8)(int, _DWORD *); // r9
void (__fastcall *v9)(int, _DWORD *); // r9
int OwnedMenu; // r9
_DWORD *v11; // r6
int v12; // r3
_DWORD *v13; // r3
_DWORD *v14; // r6
_DWORD *v15; // r0
int v16; // r3
int v17; // r3
_DWORD v19[2]; // [sp+4h] [bp-Ch] BYREF
v3 = 4 * (a2 + 1);
v5 = v19;
v6 = *(float *)(*((_DWORD *)this + 116) + v3) - *(float *)(*((_DWORD *)this + 116) + v3 - 4);
v7 = cocos2d::CCNode::create(this);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v19, *((float *)this + 81), v6);
v8(v7, v19);
v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v19,
0.0,
COERCE_FLOAT(*(_DWORD *)(v3 + *((_DWORD *)this + 116)) ^ 0x80000000));
v9(v7, v19);
OwnedMenu = ScrollableContentLayer::createOwnedMenu(this);
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v7 + 232))(v7, OwnedMenu, 10);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 80) + 228))(*((_DWORD *)this + 80), v7);
v11 = *((_DWORD **)this + 120);
if ( v11 )
{
while ( 1 )
{
v12 = v11[4];
if ( a2 >= v12 )
{
if ( v12 >= a2 )
{
v19[0] = v11;
goto LABEL_11;
}
v13 = (_DWORD *)v11[1];
if ( !v13 )
{
v19[0] = v11;
v5 = v11 + 1;
goto LABEL_11;
}
}
else
{
v13 = (_DWORD *)*v11;
if ( !*v11 )
{
v19[0] = v11;
v5 = v11;
goto LABEL_11;
}
}
v11 = v13;
}
}
v5 = (_DWORD *)((char *)this + 480);
v19[0] = (char *)this + 480;
LABEL_11:
v14 = (_DWORD *)*v5;
if ( !*v5 )
{
v15 = (_DWORD *)operator new(0x1Cu);
v15[4] = a2;
v14 = v15;
v15[5] = 0;
v15[6] = 0;
v16 = v19[0];
*v15 = 0;
v15[1] = 0;
v15[2] = v16;
*v5 = v15;
v17 = **((_DWORD **)this + 119);
if ( v17 )
*((_DWORD *)this + 119) = v17;
std::__tree_balance_after_insert *>(*((_DWORD **)this + 120), (_DWORD *)*v5);
++*((_DWORD *)this + 121);
}
v14[5] = v7;
v14[6] = OwnedMenu;
return (*(int (__fastcall **)(_DWORD, int, int, int))(**((_DWORD **)this + 112) + 8))(
*((_DWORD *)this + 112),
a2,
v7,
OwnedMenu);
}