//
// StartPosLayer::onSelectSpeed from 0x100210e68 to 0x100210ed0 (104 bytes)
//
// 2 xrefs:
// > StartPosLayer::addSpeedButtons @ 0x100210734
// > StartPosLayer::addSpeedButtons @ 0x10021064c
//
// 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:01:02 +0000
//
__int64 __fastcall StartPosLayer::onSelectSpeed(__int64 a1, __int64 a2)
{
unsigned int v3; // w0
int v4; // w1
if ( a2 )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 1028) = v3;
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1016) + 1840LL) + 332LL) = v3;
}
else
{
v3 = *(_DWORD *)(a1 + 1028);
}
if ( v3 > 4 )
v4 = 1;
else
v4 = dword_100761BAC[v3];
return sub_100210D74(*(_QWORD *)(a1 + 1040), v4);
}