//
// nextRemapStateForTrigger from 0x79ea70 to 0x79ebbc (332 bytes)
//
// 2 xrefs:
// > processTraceOutSource @ 0x7b9428
// > ??> @ 0xc4e40
//
// 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:53:38 +0000
//
__int64 __fastcall nextRemapStateForTrigger(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v5; // x19
int *v7; // x19
int *i; // x21
__int64 *v9; // x0
__int64 *v10; // x0
int v11; // w2
int v12; // w3
_DWORD *v13; // x0
int v14; // [xsp+40h] [xbp+40h] BYREF
int v15; // [xsp+44h] [xbp+44h] BYREF
v5 = a2;
if ( *(_DWORD *)(a1 + 1028) == 1268 && *(_QWORD *)(a1 + 1840) != *(_QWORD *)(a1 + 1848) )
{
if ( a3 != a2 )
{
*(_DWORD *)(a3 + 32) = *(_DWORD *)(a2 + 32);
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::__assign_multi,void *> *>>(
(_QWORD *)a3,
*(__int64 **)(a2 + 16),
nullptr);
}
*(_QWORD *)(a3 + 40) = *(_QWORD *)(v5 + 40);
v7 = *(int **)(a1 + 1840);
for ( i = *(int **)(a1 + 1848); i != v7; *v13 = v15 )
{
v14 = *v7;
v15 = v7[2];
v9 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
(_QWORD *)a3,
&v15);
if ( v9 )
v15 = *((_DWORD *)v9 + 5);
v10 = *(__int64 **)(a3 + 16);
if ( v10 )
{
v11 = v14;
v12 = v15;
do
{
while ( v11 != *((_DWORD *)v10 + 5) )
{
v10 = (__int64 *)*v10;
if ( !v10 )
goto LABEL_14;
}
*((_DWORD *)v10 + 5) = v12;
v10 = (__int64 *)*v10;
}
while ( v10 );
}
LABEL_14:
v7 += 4;
v13 = (_DWORD *)std::unordered_map::operator[](a3, &v14);
}
*(_QWORD *)(a3 + 40) = hashRemapMap(a3);
return a3;
}
return a2;
}