//
// CCMenuItemToggler::toggle from 0x10001eea0 to 0x10001ef6a (202 bytes)
//
// 130 xrefs:
// > EditorUI::selectBuildTab @ 0x100010a1f
// > AccountLayer::createToggleButton @ 0x10009b420
// > CustomizeObjectLayer::createToggleButton @ 0x1001db310
// > SetupKeyframePopup::init @ 0x1001e3a5e
// > SetupKeyframePopup::onTimeMode @ 0x1001e3ead
// > SetupKeyframePopup::updateTimeModeButtons @ 0x1001e3f4d
// > SetupTriggerPopup::onTouchTriggered @ 0x10021b33c
// > SetupTriggerPopup::onSpawnedByTrigger @ 0x10021b38c
// > SetupTriggerPopup::updateCustomToggleTrigger @ 0x100220448
// > SetupTriggerPopup::updateToggleItem @ 0x1002232e1
// > LevelCell::loadFromLevel @ 0x10022a4b7
// > CommentCell::loadFromComment @ 0x10022f20b
// > GJRequestCell::loadFromScore @ 0x100232035
// > GJMessageCell::loadFromMessage @ 0x10023283b
// > GJThreadCell::loadFromThread @ 0x100233913
// > CustomListView::reloadAll @ 0x100235c73
// > CustomListView::reloadAll @ 0x100235d98
// > CustomListView::reloadAll @ 0x100235f73
// > CustomListView::reloadAll @ 0x10023612a
// > GJMessageCell::updateToggle @ 0x1002362a4
// > CommentCell::updateBulkToggle @ 0x100236431
// > GJRequestCell::updateToggle @ 0x100236464
// > LevelCell::updateToggle @ 0x100236494
// > CommentCell::onBulkSelectToggle @ 0x10023e1f3
// > GJThreadCell::onToggleSelect @ 0x100240fc6
// > LevelSettingsLayer::createToggleButton @ 0x1002583df
// > LevelSettingsLayer::onSelectMode @ 0x100258e17
// > ShareLevelSettingsLayer::init @ 0x10026f5f9
// > ShareLevelSettingsLayer::init @ 0x10026f876
// > ShareLevelSettingsLayer::init @ 0x10026f9ce
// > ShareLevelSettingsLayer::onUnlisted @ 0x10026fdce
// > sub_10026FE60 @ 0x10026fe93
// > SetupEnterTriggerPopup::onEnterType @ 0x100286421
// > SetupEnterTriggerPopup::onEnterType @ 0x10028643a
// > GJAccountSettingsLayer::init @ 0x10028b88e
// > GJAccountSettingsLayer::init @ 0x10028b8e0
// > GJAccountSettingsLayer::init @ 0x10028b940
// > GJAccountSettingsLayer::init @ 0x10028b9ae
// > GJAccountSettingsLayer::createToggleButton @ 0x10028be19
// > sub_10028BF40 @ 0x10028bfb0
// > sub_10028BFD0 @ 0x10028c040
// > sub_10028C060 @ 0x10028c0fd
// > sub_10028C130 @ 0x10028c1a0
// > GameLevelOptionsLayer::didToggle @ 0x10029ff37
// > GameLevelOptionsLayer::didToggle @ 0x1002a0073
// > sub_1002A00C0 @ 0x1002a0212
// > SetupTouchTogglePopup::onTouchMode @ 0x1002a7634
// > SetupTouchTogglePopup::onTouchMode @ 0x1002a7651
// > SetupTouchTogglePopup::onControlMode @ 0x1002a778a
// > SetupTouchTogglePopup::onControlMode @ 0x1002a77a7
// > SetupTeleportPopup::onTeleportGravity @ 0x10034586d
// > SetupTeleportPopup::updateDefaultTriggerValues @ 0x10034591d
// > SetupTeleportPopup::updateTeleportGravityState @ 0x10034598c
// > sub_10034ECF0 @ 0x10034ed23
// > GJGarageLayer::selectTab @ 0x10035607d
// > SupportLayer::createToggleButton @ 0x100383df0
// > sub_100397490 @ 0x1003974e5
// > sub_1003975C0 @ 0x100397615
// > PauseLayer::createToggleButton @ 0x1003c23df
// > SetupEnterEffectPopup::onEnterType @ 0x1003e0661
// > SetupEnterEffectPopup::onEnterType @ 0x1003e067a
// > CreateParticlePopup::onPosType @ 0x100467dfa
// > CreateParticlePopup::onPosType @ 0x100467e0e
// > CreateParticlePopup::onPosType @ 0x100467e27
// > CreateParticlePopup::onPosType @ 0x100467e39
// > CreateParticlePopup::onEmitterMode @ 0x100467ec9
// > CreateParticlePopup::onEmitterMode @ 0x100467edf
// > CreateParticlePopup::onDynamicColor @ 0x100468e50
// > CreateParticlePopup::onDynamicColor @ 0x100468e6d
// > CreateParticlePopup::onUniformColor @ 0x100468f67
// > CreateParticlePopup::onUniformColor @ 0x100468f7e
// > SetupAreaMoveTriggerPopup::updateEnterTargetIDState @ 0x1004d02be
// > SetupSequenceTriggerPopup::onCustomToggleTriggerValue @ 0x1004d9c9c
// > SetupSequenceTriggerPopup::onCustomToggleTriggerValue @ 0x1004d9cbf
// > SetupSequenceTriggerPopup::onCustomToggleTriggerValue @ 0x1004d9cf4
// > SetupSequenceTriggerPopup::onCustomToggleTriggerValue @ 0x1004d9d17
// > SetupSequenceTriggerPopup::onCustomToggleTriggerValue @ 0x1004d9d3a
// > sub_1004EB370 @ 0x1004eb3b3
// > sub_1004EB370 @ 0x1004eb3c0
// > GameToolbox::createToggleButton @ 0x1004eb641
// > LeaderboardsLayer::setupTabs @ 0x100513f89
// > LeaderboardsLayer::setupTabs @ 0x100514045
// > LeaderboardsLayer::setupTabs @ 0x100514101
// > LeaderboardsLayer::setupTabs @ 0x1005141b8
// > LeaderboardsLayer::toggleTabButtons @ 0x1005149b5
// > LeaderboardsLayer::toggleTabButtons @ 0x1005149ce
// > LeaderboardsLayer::toggleTabButtons @ 0x1005149e7
// > LeaderboardsLayer::toggleTabButtons @ 0x100514a00
// > ColorSelectLiveOverlay::createToggleButton @ 0x1005970af
// > SelectEventLayer::onCustomToggleTriggerValue @ 0x1005a7718
// > KeybindCapturePopup::init @ 0x1005b4383
// > KeybindCapturePopup::keyDown @ 0x1005b5c95
// > GameSettingsLayer::addToggle @ 0x100601add
// > SetupCameraEdgePopup::onCameraEdge @ 0x100648fd7
// > SetupCameraEdgePopup::onCameraEdge @ 0x100648ffd
// > SetupCameraEdgePopup::onCameraEdge @ 0x100649023
// > SetupCameraEdgePopup::onCameraEdge @ 0x100649049
// > SetupInstantCountPopup::onCountType @ 0x1006bcff8
// > SetupInstantCountPopup::onCountType @ 0x1006bd011
// > SetupInstantCountPopup::onCountType @ 0x1006bd02a
// > sub_10070B210 @ 0x10070b2a0
// > CharacterColorPage::init @ 0x10073cc40
// > SetupCameraOffsetTrigger::onTargetMode @ 0x10074242e
// > SetupCameraOffsetTrigger::onTargetMode @ 0x100742451
// > ColorSelectPopup::init @ 0x100804dc9
// > ColorSelectPopup::onPlayerColor1 @ 0x100806dd3
// > ColorSelectPopup::onPlayerColor2 @ 0x100806e93
// > sub_10087B920 @ 0x10087b9b0
// > VideoOptionsLayer::createToggleButton @ 0x1008810d3
// > ParentalOptionsLayer::init @ 0x10088480c
// > sub_1008857C0 @ 0x1008857fd
// > sub_1008857C0 @ 0x100885815
// > DeathMarkerSettingsPopup::init @ 0x1008c761b
// > sub_1008CA190 @ 0x1008ca3bb
// > sub_1008FC5C0 @ 0x1008fc671
// > sub_10093F3A0 @ 0x10093f3c7
// > PlatformerControlsPopup::init @ 0x10095d846
// > sub_10095EA10 @ 0x10095eadb
// > sub_10095F760 @ 0x10095f792
// > sub_10095F930 @ 0x10095f9ae
// > sub_10095F930 @ 0x10095fa33
// > sub_10095F930 @ 0x10095faba
// > PlatformerControlsPopup::onLevelControlsRefreshed @ 0x10095fd39
// > PlatformerControlsPopup::uploadActionFinished @ 0x10095ffd1
// > TimeSpeedControl::init @ 0x100977abe
// > sub_10097DCD0 @ 0x10097dd96
// > sub_10097DCD0 @ 0x10097de12
// > sub_10097E2F0 @ 0x10097ea69
// > sub_100981080 @ 0x1009811e2
// > sub_1009A21E0 @ 0x1009a2386
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:18:57 +0000
//
__int64 __fastcall CCMenuItemToggler::toggle(__int64 a1, unsigned int a2)
{
__int64 v3; // rdi
__int64 v4; // rax
_BYTE v6[8]; // [rsp+0h] [rbp-20h] BYREF
float v7[6]; // [rsp+8h] [rbp-18h] BYREF
*(_BYTE *)(a1 + 392) = a2;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 376) + 344LL))(
*(_QWORD *)(a1 + 376),
(unsigned __int8)a2 ^ 1u);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 384) + 344LL))(*(_QWORD *)(a1 + 384), a2);
v3 = *(_QWORD *)(a1 + 8LL * *(unsigned __int8 *)(a1 + 392) + 376);
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 328LL))(v3);
sub_100278630(v7, v4);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 320LL))(a1, v7);
sub_100278250(v6, v7[0] * 0.5, 0.5 * v7[1]);
(*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 376) + 184LL))(*(_QWORD *)(a1 + 376), v6);
return (*(__int64 (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(a1 + 384) + 184LL))(*(_QWORD *)(a1 + 384), v6);
}