//
// TouchControlEditLayer::clearNodes from 0xd0434c to 0xd04434 (232 bytes)
//
// 3 xrefs:
// > TouchControlEditLayer::reloadNodes @ 0xd06e18
// > TouchControlEditLayer::valueDidChange @ 0xd07428
// > ??> @ 0x79a20
//
// This function is hookable on this platform (idp: arm, 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 13:06:55 +0000
//
unsigned __int64 __fastcall TouchControlEditLayer::clearNodes(TouchControlEditLayer *this)
{
unsigned __int64 v2; // x20
__int64 v3; // x1
__int64 v4; // x1
unsigned __int64 result; // x0
unsigned __int64 v6; // x20
__int64 v7; // x1
__int64 v8; // x1
__int64 v9; // x4
__int64 v10; // x3
v2 = 0;
v3 = *((_QWORD *)this + 153);
if ( (*((_QWORD *)this + 154) - v3) >> 3 )
{
do
{
v4 = *(_QWORD *)(v3 + 8 * v2++);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
v3 = *((_QWORD *)this + 153);
}
while ( v2 < (*((_QWORD *)this + 154) - v3) >> 3 );
}
result = *((_QWORD *)this + 157);
v6 = 0;
v7 = *((_QWORD *)this + 158);
if ( (__int64)(v7 - result) >> 3 )
{
do
{
v8 = *(_QWORD *)(result + 8 * v6++);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 520LL))(v8);
result = *((_QWORD *)this + 157);
v7 = *((_QWORD *)this + 158);
}
while ( v6 < (__int64)(v7 - result) >> 3 );
}
v9 = *((_QWORD *)this + 153);
v10 = *((_QWORD *)this + 154);
if ( v9 != v10 )
*((_QWORD *)this + 154) = v10 + 8 * ~((unsigned __int64)(v10 - 8 - v9) >> 3);
if ( result != v7 )
{
result = ~((v7 - 8 - result) >> 3);
*((_QWORD *)this + 158) = v7 + 8 * result;
}
*((_QWORD *)this + 156) = 0;
return result;
}