//
// SpawnTriggerGameObject::addRemap from 0x89b9d8 to 0x89ba88 (176 bytes)
//
// 2 xrefs:
// > SetupSpawnPopup::addRemap @ 0xa42be8
// > ??> @ 0x6c568
//
// 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:56:12 +0000
//
__int64 __fastcall SpawnTriggerGameObject::addRemap(__int64 this, int a2, int a3)
{
int *v4; // x1
int *v5; // x3
int v6; // [xsp+18h] [xbp+18h] BYREF
int v7; // [xsp+1Ch] [xbp+1Ch] BYREF
v7 = a2;
v6 = a3;
if ( a2 != a3 )
{
v4 = *(int **)(this + 1840);
v5 = *(int **)(this + 1848);
if ( v4 == v5 )
{
LABEL_8:
if ( (unsigned __int64)v5 >= *(_QWORD *)(this + 1856) )
{
return std::vector::__emplace_back_slow_path((__int16 **)(this + 1840), &v7, &v6);
}
else
{
if ( v5 )
{
*v5 = a2;
v5[1] = a2;
v5[2] = a3;
v5[3] = 0;
v5 = *(int **)(this + 1848);
}
this += 1840;
*(_QWORD *)(this + 8) = v5 + 4;
}
}
else
{
while ( a2 != *v4 || a3 != v4[2] )
{
v4 += 4;
if ( v5 == v4 )
goto LABEL_8;
}
}
}
return this;
}