//
// GJBaseGameLayer::processQueuedButtons from 0x100296d40 to 0x100296dfc (188 bytes)
//
// 2 xrefs:
// > PlayLayer::pauseGame @ 0x10014c490
// > GJBaseGameLayer::processCommands @ 0x10029b710
//
// This function is hookable on this platform (idp: arm, 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:02:06 +0000
//
double *__fastcall GJBaseGameLayer::processQueuedButtons(double *result, char a2, float a3)
{
unsigned int *v3; // x8
double *v5; // x20
double v6; // d8
__int64 v7; // x21
__int64 v8; // x8
__int64 v9; // x22
v3 = *((unsigned int **)result + 1603);
if ( *((unsigned int **)result + 1604) != v3 )
{
v5 = result;
v6 = a3;
do
{
if ( (a2 & 1) == 0 && *((double *)v3 + 2) >= v5[1742] + v6 )
break;
result = (double *)GJBaseGameLayer::handleButton(
v5,
*((unsigned __int8 *)v3 + 4),
*v3,
(*((_BYTE *)v3 + 5) & 1) == 0);
v7 = *((_QWORD *)v5 + 1603);
v8 = *((_QWORD *)v5 + 1604);
v9 = v8 - (v7 + 24);
if ( v8 != v7 + 24 )
result = (double *)memmove(*((void **)v5 + 1603), (const void *)(v7 + 24), v8 - (v7 + 24));
v3 = *((unsigned int **)v5 + 1603);
*((_QWORD *)v5 + 1604) = v7 + v9;
}
while ( (unsigned int *)(v7 + v9) != v3 );
}
return result;
}