//
// EmotePickerPopup::toggle from 0x779400 to 0x779460 (96 bytes)
//
// 7 xrefs:
// > EditLevelLayer::onEmotes @ 0x49f4b2
// > ShareCommentLayer::onEmotes @ 0x540c4c
// > SetTextPopup::onEmotes @ 0x5d38ae
// > ThreadViewPopup::onEmotes @ 0x745bf4
// > ThreadDescPopup::onEmotes @ 0x7463e8
// > NewThreadPopup::onEmotes @ 0x748364
// > SoundPackDescPopup::onEmotes @ 0x784c0a
//
// 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:59:22 +0000
//
_DWORD *__fastcall EmotePickerPopup::toggle(int a1, int a2, cocos2d::CCNode *a3, int a4, int a5, int a6)
{
_DWORD *v10; // r0
_DWORD v11[3]; // [sp+4h] [bp-Ch] BYREF
v11[0] = a2;
v11[1] = a3;
v11[2] = a4;
if ( a1 )
{
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)a1 + 684))(a1, 0);
return nullptr;
}
if ( !a3 )
return nullptr;
if ( !a4 )
return nullptr;
EmotePickerPopup::buttonAnchor((EmotePickerPopup *)v11, a3);
v10 = EmotePickerPopup::create(a4, (const cocos2d::CCPoint *)v11, a5, a6);
return EmotePickerPopup::openAt(v10, a2, a3);
}