//
// GJBaseGameLayer::processQueuedButtons from 0x14033a9a0 to 0x14033aa83 (227 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processCommands @ 0x140342961
// > ??> @ 0x14091fb2c
//
// 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:30:37 +0000
//
unsigned __int64 __fastcall GJBaseGameLayer::processQueuedButtons(__int64 a1, float a2, char a3, __int64 a4)
{
double *v4; // r10
unsigned __int64 result; // rax
__int64 v8; // rcx
v4 = *(double **)(a1 + 13312);
result = (unsigned __int64)((unsigned __int128)((__int64)(*(_QWORD *)(a1 + 13320) - (_QWORD)v4)
* (__int128)0x2AAAAAAAAAAAAAABLL) >> 64) >> 63;
if ( (*(_QWORD *)(a1 + 13320) - (_QWORD)v4) / 24LL )
{
do
{
if ( !a3 && a2 + *(double *)(a1 + 14568) <= v4[2] )
break;
LOBYTE(a4) = *((_BYTE *)v4 + 5) == 0;
GJBaseGameLayer::handleButton(a1, *((unsigned __int8 *)v4 + 4), *(unsigned int *)v4, a4);
memmove(
*(void **)(a1 + 13312),
(const void *)(*(_QWORD *)(a1 + 13312) + 24LL),
*(_QWORD *)(a1 + 13320) - (*(_QWORD *)(a1 + 13312) + 24LL));
*(_QWORD *)(a1 + 13320) -= 24LL;
v4 = *(double **)(a1 + 13312);
v8 = *(_QWORD *)(a1 + 13320) - (_QWORD)v4;
result = (unsigned __int64)((unsigned __int128)(v8 * (__int128)0x2AAAAAAAAAAAAAABLL) >> 64) >> 63;
}
while ( v8 / 24 );
}
return result;
}