//
// GJSmartBlockPreview::toggleSelectItem from 0x66f0cc to 0x66f156 (138 bytes)
//
// 1 xrefs:
// > BrowseSmartKeyLayer::onPrefabObject @ 0x6727b8
//
// 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:55:49 +0000
//
int __fastcall GJSmartBlockPreview::toggleSelectItem(int this, const char *a2)
{
int *v2; // r4
int v4; // r0
int v5; // r3
int v6; // r8
void (__fastcall *v7)(int, _BYTE *); // r9
_BYTE v8[8]; // [sp+4h] [bp-10h] BYREF
v2 = (int *)this;
if ( (const char *)*(unsigned __int8 *)(this + 284) != a2 )
{
*(_BYTE *)(this + 284) = (_BYTE)a2;
if ( !*(_DWORD *)(this + 280) )
{
v4 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_select_001.png", a2);
v5 = *v2;
v2[70] = v4;
(*(void (__fastcall **)(int *, int))(v5 + 228))(v2, v4);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v2[70] + 80))(v2[70], 1077097267);
v6 = v2[70];
v7 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v6 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v8, 45.0, 45.0);
v7(v6, v8);
}
return (*(int (__fastcall **)(int, const char *))(*(_DWORD *)v2[70] + 172))(v2[70], a2);
}
return this;
}