//
// LevelSettingsLayer::onSelectSpeed from 0x6a9480 to 0x6a955e (222 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:56:33 +0000
//
unsigned int __fastcall LevelSettingsLayer::onSelectSpeed(LevelSettingsLayer *this, cocos2d::CCObject *a2)
{
int v3; // r4
unsigned int v4; // r5
int v5; // r10
unsigned int result; // r0
int v7; // r0
int v8; // r4
int v9; // r0
char v10; // r3
bool v11; // zf
int v12; // r1
void (__fastcall *v13)(int, __int16 *); // [sp+0h] [bp-14h]
void (__fastcall *v14)(int, int); // [sp+0h] [bp-14h]
int v15; // [sp+4h] [bp-10h]
int v16; // [sp+4h] [bp-10h]
__int16 v17; // [sp+8h] [bp-Ch] BYREF
char v18; // [sp+Ah] [bp-Ah]
if ( a2 )
{
v3 = *((_DWORD *)this + 149);
*(_DWORD *)(v3 + 272) = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
}
v4 = 0;
v5 = *(_DWORD *)(*((_DWORD *)this + 149) + 272);
while ( 1 )
{
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 152));
if ( v4 >= result )
break;
v7 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 152), v4++);
v8 = v7;
v15 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 536))(v7);
v13 = *(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v15 + 480);
v9 = (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 32))(v8);
v11 = v9 == v5;
if ( v9 == v5 )
{
LOWORD(v9) = -1;
v10 = -1;
}
else
{
v17 = 0;
}
if ( v11 )
v17 = v9;
else
v18 = 0;
if ( v11 )
v18 = v10;
v13(v15, &v17);
v16 = (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 536))(v8);
v14 = *(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 456);
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 32))(v8) == v5 )
v12 = 255;
else
v12 = 85;
v14(v16, v12);
}
return result;
}