//
// UIOptionsLayer::toggleUIGroup from 0x5dc40c to 0x5dc504 (248 bytes)
//
// 2 xrefs:
// > UIOptionsLayer::init @ 0x5dd60c
// > UIOptionsLayer::ccTouchBegan @ 0x5ddc8a
//
// 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:54:12 +0000
//
int __fastcall UIOptionsLayer::toggleUIGroup(int this, int a2)
{
_DWORD *v2; // r4
char *v4; // r1
int v5; // r0
char *v6; // r1
int v7; // r3
int v8[2]; // [sp+0h] [bp-14h] BYREF
char *v9; // [sp+8h] [bp-Ch]
v2 = (_DWORD *)this;
if ( *(_DWORD *)(this + 736) == a2 )
return this;
v8[0] = 0;
v8[1] = 0;
v9 = nullptr;
std::string::__init(v8, "P1 Move", 7u);
switch ( a2 )
{
case 2:
v4 = "P2 Move";
break;
case 3:
v4 = "P1 Jump";
break;
case 4:
v4 = "P2 Jump";
break;
default:
goto LABEL_5;
}
std::string::assign(v8, v4);
LABEL_5:
v5 = v2[183];
if ( v5 )
{
if ( (v8[0] & 1) != 0 )
v6 = v9;
else
v6 = (char *)v8 + 1;
(*(void (__fastcall **)(int, char *, int))(*(_DWORD *)v5 + 464))(v5, v6, LOBYTE(v8[0]) << 31);
}
v7 = *v2;
v2[184] = a2;
(*(void (__fastcall **)(_DWORD *))(v7 + 676))(v2);
(*(void (__fastcall **)(_DWORD *))(*v2 + 676))(v2);
(*(void (__fastcall **)(_DWORD *))(*v2 + 676))(v2);
(*(void (__fastcall **)(_DWORD *))(*v2 + 676))(v2);
return std::string::~string((int)v8);
}