//
// SequenceTriggerGameObject::deleteTarget from 0x87bfbc to 0x87c050 (148 bytes)
//
// 3 xrefs:
// > SetupSequenceTriggerPopup::onDeleteSelected @ 0xb8252c
// > SetupSequenceTriggerPopup::onDeleteSelected @ 0xb8254c
// > ??> @ 0xbc710
//
// 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 12:55:52 +0000
//
__int64 __fastcall SequenceTriggerGameObject::deleteTarget(__int64 this, int a2)
{
char *v2; // x5
char *v3; // x3
char *v4; // x1
char *v5; // x4
char *v6; // x2
__int64 v7; // x4
__int64 v8; // x5
if ( (a2 & 0x80000000) == 0 )
{
v2 = *(char **)(this + 1840);
v3 = *(char **)(this + 1848);
if ( a2 <= (unsigned __int64)(((v3 - v2) >> 4) - 1) && v2 != v3 )
{
v4 = &v2[16 * a2];
v5 = *(char **)(this + 1848);
v6 = v4 + 16;
if ( v3 != v4 + 16 )
{
do
{
v7 = *(_QWORD *)v6;
v8 = *((_QWORD *)v6 + 1);
v6 += 16;
*((_QWORD *)v6 - 4) = v7;
*((_QWORD *)v6 - 3) = v8;
}
while ( v3 != v6 );
v5 = *(char **)(this + 1848);
v4 += ((v3 - (v4 + 32)) & 0xFFFFFFFFFFFFFFF0LL) + 16;
}
if ( v5 != v4 )
*(_QWORD *)(this + 1848) = &v5[16 * ~((unsigned __int64)(v5 - 16 - v4) >> 4)];
*(_DWORD *)(this + 1960) = -1;
}
}
return this;
}