//
// CreateGuidelinesLayer::toggleItems from 0x10050da50 to 0x10050db0b (187 bytes)
//
// 4 xrefs:
// > CreateGuidelinesLayer::init @ 0x10050d79d
// > CreateGuidelinesLayer::onStop @ 0x10050da10
// > CreateGuidelinesLayer::onRecord @ 0x10050dc10
// > FindBPMLayer::init @ 0x10050ecc4
//
// 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:31:35 +0000
//
__int64 __fastcall CreateGuidelinesLayer::toggleItems(__int64 a1, unsigned __int8 a2)
{
unsigned int v2; // r15d
__int64 v3; // rax
__int64 result; // rax
unsigned int v5; // r15d
__int64 v6; // rax
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) )
{
v2 = 0;
do
{
v3 = sub_1007FEFE0(*(_QWORD *)(a1 + 688), v2);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, a2 ^ 1u);
++v2;
}
while ( v2 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) );
}
result = sub_1007FEF90(*(_QWORD *)(a1 + 696));
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 696), v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, a2);
++v5;
result = sub_1007FEF90(*(_QWORD *)(a1 + 696));
}
while ( v5 < (unsigned int)result );
}
return result;
}