//
// ThreadViewPopup::unmountVirtualRow from 0x1400e1670 to 0x1400e174b (219 bytes)
//
// 4 xrefs:
// > ??> @ 0x140728690
// > ??> @ 0x140892da0
// > ??> @ 0x140892db0
// > ??> @ 0x140914aa4
//
// 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:26:31 +0000
//
unsigned __int64 __fastcall ThreadViewPopup::unmountVirtualRow(__int64 a1, int a2)
{
__int64 v2; // r8
unsigned __int64 result; // rax
int v6; // esi
__int64 v7; // r15
__int64 v8; // rdi
__int64 v9; // rbp
__int64 i; // rbx
v2 = *(_QWORD *)(a1 + 416) - *(_QWORD *)(a1 + 408);
result = (unsigned __int64)((unsigned __int128)(v2 * (__int128)0x4924924924924925LL) >> 64) >> 63;
v6 = (int)v2 / 28 - 1;
if ( v6 >= 0 )
{
result = v6;
v7 = 28LL * v6;
do
{
v8 = v7 + *(_QWORD *)(a1 + 408);
if ( *(_DWORD *)(v8 + 24) == a2 )
{
v9 = *(_QWORD *)(a1 + 416);
for ( i = v8 + 28; i != v9; v8 += 28 )
{
*(_DWORD *)v8 = *(_DWORD *)i;
*(_BYTE *)(v8 + 4) = *(_BYTE *)(i + 4);
cocos2d::CCRect::operator=(v8 + 8, i + 8);
result = *(unsigned int *)(i + 24);
i += 28;
*(_DWORD *)(v8 + 24) = result;
}
*(_QWORD *)(a1 + 416) -= 28LL;
}
v7 -= 28;
--v6;
}
while ( v6 >= 0 );
}
return result;
}