//
// SetupSpawnPopup::onSelectRemap from 0x8ea4a4 to 0x8ea574 (208 bytes)
//
// 3 xrefs:
// > ??> @ 0x3cb58
// > SetupSpawnPopup::updateRemapButtons @ 0x8ea930
// > ??> @ 0x1229ee0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void SetupSpawnPopup::onSelectRemap(SetupSpawnPopup *a1, cocos2d::CCObject *a2)
{
int v3; // w0
int *m_start; // x1
unsigned __int64 v5; // x2
__int64 v6; // x0
int v7; // w2
int v8; // w3
if ( !a1->m_isBusy )
{
v3 = a2->getTag(a2);
m_start = a1->m_remapGroups.m_start;
v5 = ((char *)a1->m_remapGroups.m_finish - (char *)m_start) >> 3;
if ( v3 >= v5 )
sub_D13C5C("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v3, v5);
v6 = 2LL * v3;
v7 = m_start[v6];
v8 = m_start[v6 + 1];
if ( a1->m_remapOriginalID == v7 && a1->m_remapNewID == v8 )
{
a1->m_remapOriginalID = 0;
a1->m_remapNewID = 0;
}
else
{
a1->m_remapOriginalID = v7;
a1->m_remapNewID = v8;
SetupTriggerPopup::updateValue(a1, -1, (float)v7);
SetupTriggerPopup::updateValue(a1, -2, (float)a1->m_remapNewID);
}
SetupSpawnPopup::queueUpdateButtons(a1);
}
}