//
// EditorUI::toggleDuplicateButton from 0x48326c to 0x483348 (220 bytes)
//
// 1 xrefs:
// > EditorUI::updateButtons @ 0x485fee
//
// 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:49:23 +0000
//
int __fastcall EditorUI::toggleDuplicateButton(cocos2d::CCArray **this)
{
_BOOL4 v2; // r5
__int16 *v3; // r1
int v4; // r1
__int16 *v5; // r1
int v6; // r1
GameManager *v7; // r0
int v8; // r0
int v9; // r5
int v10; // r5
_BOOL4 v11; // r5
__int16 *v12; // r1
int v13; // r1
if ( *(this + 249) )
v2 = 1;
else
v2 = cocos2d::CCArray::count(*(this + 167)) != 0;
*((_BYTE *)*(this + 196) + 320) = v2;
if ( v2 )
v3 = word_BEBDD8;
else
v3 = (__int16 *)&byte_BEBE3C;
(*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 196) + 480))(*(this + 196), v3);
if ( v2 )
v4 = 255;
else
v4 = 175;
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 196) + 456))(*(this + 196), v4);
*((_BYTE *)*(this + 197) + 320) = v2;
if ( v2 )
v5 = word_BEBDD8;
else
v5 = (__int16 *)&byte_BEBE3C;
(*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 197) + 480))(*(this + 197), v5);
if ( v2 )
v6 = 255;
else
v6 = 175;
v7 = (GameManager *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 197) + 456))(*(this + 197), v6);
v8 = GameManager::sharedState(v7);
v9 = *(unsigned __int8 *)(v8 + 388);
if ( (v9 & 1) != 0 )
v10 = *(_DWORD *)(v8 + 392);
else
v10 = v9 >> 1;
v11 = v10 != 0;
*((_BYTE *)*(this + 198) + 320) = v11;
if ( v11 )
v12 = word_BEBDD8;
else
v12 = (__int16 *)&byte_BEBE3C;
(*(void (__fastcall **)(_DWORD, __int16 *))(*(_DWORD *)*(this + 198) + 480))(*(this + 198), v12);
if ( v11 )
v13 = 255;
else
v13 = 175;
return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 198) + 456))(*(this + 198), v13);
}