//
// NewsPopup::keyDown from 0x100519cf0 to 0x100519d4c (92 bytes)
//
// 2 xrefs:
// > sub_100519D4C @ 0x100519d50
// > ??> @ 0x10099cf18
//
// 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:07:08 +0000
//
void __fastcall NewsPopup::keyDown(__int64 a1, int a2)
{
int v2; // w8
int v3; // w1
signed int v4; // w8
if ( a2 == 39 )
{
v4 = *(_DWORD *)(a1 + 704);
if ( v4 < (int)(-858993459 * ((*(_QWORD *)(a1 + 688) - *(_QWORD *)(a1 + 680)) >> 4) - 1) )
{
v3 = v4 + 1;
LABEL_4:
sub_100518264(a1, v3);
}
}
else
{
if ( a2 == 37 )
{
v2 = *(_DWORD *)(a1 + 704);
v3 = v2 - 1;
if ( v2 < 1 )
return;
goto LABEL_4;
}
FLAlertLayer::keyDown(a1, a2);
}
}