//
// TouchControlEditLayer::clearNodes from 0x140452bd0 to 0x140452cbe (238 bytes)
//
// 6 xrefs:
// > TouchControlEditLayer::valueDidChange @ 0x140453e3b
// > TouchControlEditLayer::onReset @ 0x140455992
// > TouchControlEditLayer::onPaste @ 0x1404561e9
// > TouchControlEditLayer::onApplyGlobal @ 0x1404565cc
// > ControlSlotsPopup::onLoad @ 0x14045702c
// > ??> @ 0x1409278a8
//
// 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 11:32:27 +0000
//
__int64 __fastcall TouchControlEditLayer::clearNodes(_QWORD *a1)
{
unsigned __int64 v2; // rdi
__int64 v3; // rcx
__int64 v4; // rcx
unsigned __int64 i; // rdi
__int64 v6; // rax
__int64 result; // rax
v2 = 0;
v3 = a1[152];
if ( (a1[153] - v3) >> 3 )
{
do
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 8 * v2) + 512LL))(*(_QWORD *)(v3 + 8 * v2));
v3 = a1[152];
++v2;
}
while ( v2 < (a1[153] - v3) >> 3 );
}
v4 = a1[156];
for ( i = 0; i < (a1[157] - v4) >> 3; ++i )
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v4 + 8 * i) + 512LL))(*(_QWORD *)(v4 + 8 * i));
v4 = a1[156];
}
v6 = a1[152];
if ( v6 != a1[153] )
a1[153] = v6;
result = a1[156];
if ( result != a1[157] )
a1[157] = result;
a1[155] = 0;
return result;
}