//
// SpawnTriggerGameObject::removeRemap from 0x87e3bc to 0x87e46c (176 bytes)
//
// 2 xrefs:
// > SetupSpawnPopup::onDeleteRemap @ 0xa42d38
// > ??> @ 0xde058
//
// 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:54 +0000
//
__int64 __fastcall SpawnTriggerGameObject::removeRemap(__int64 this, int a2, int a3)
{
char *v3; // x3
char *v4; // x7
__int64 v5; // x6
__int64 v6; // x4
char *v7; // x1
char *v8; // x2
__int64 v9; // x4
__int64 v10; // x5
char *v11; // x4
v3 = *(char **)(this + 1840);
v4 = *(char **)(this + 1848);
if ( v3 != v4 )
{
v5 = (v4 - v3) >> 4;
if ( v5 )
{
v6 = 0;
while ( 1 )
{
++v6;
if ( *(_DWORD *)v3 == a2 && *((_DWORD *)v3 + 2) == a3 )
break;
v3 += 16;
if ( v5 == v6 )
return this;
}
v7 = v3 + 16;
v8 = v3;
if ( v4 == v3 + 16 )
{
v11 = *(char **)(this + 1848);
}
else
{
do
{
v9 = *(_QWORD *)v7;
v10 = *((_QWORD *)v7 + 1);
v7 += 16;
*((_QWORD *)v7 - 4) = v9;
*((_QWORD *)v7 - 3) = v10;
}
while ( v4 != v7 );
v11 = *(char **)(this + 1848);
v8 = &v3[((v4 - (v3 + 32)) & 0xFFFFFFFFFFFFFFF0LL) + 16];
}
if ( v11 != v8 )
*(_QWORD *)(this + 1848) = &v11[16 * ~((unsigned __int64)(v11 - 16 - v8) >> 4)];
}
}
return this;
}