//
// sub_9AFF10 from 0x9aff10 to 0x9afff8 (232 bytes)
//
// 5 xrefs:
// > GJGameState::operator= @ 0x9bbe28
// > GJGameState::operator= @ 0x9bbe34
// > GJGameState::operator= @ 0x9bbe40
// > GJGameState::operator= @ 0x9bbe4c
// > GJGameState::operator= @ 0x9bbe58
//
// 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:58:14 +0000
//
void *__fastcall sub_9AFF10(void **a1, void **a2)
{
_QWORD *v4; // x21
_QWORD *v5; // x19
__int64 v6; // x23
char *v7; // x0
char *v8; // x2
_QWORD **v9; // x19
void *result; // x0
v4 = *a1;
if ( *a1 )
{
v5 = a1[1];
if ( v4 != v5 )
{
do
{
v6 = (__int64)(v5 - 30);
a1[1] = v5 - 30;
v7 = (char *)*(v5 - 4);
if ( v7 )
{
v8 = (char *)*(v5 - 3);
if ( v7 != v8 )
*(v5 - 3) = &v8[4 * ~((unsigned __int64)(v8 - 4 - v7) >> 2)];
operator delete(v7);
}
v9 = (_QWORD **)*(v5 - 29);
if ( v9 )
{
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
v6,
*v9);
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
v6,
v9[1]);
operator delete(v9);
}
v5 = a1[1];
}
while ( v4 != v5 );
v5 = *a1;
}
operator delete(v5);
a1[2] = nullptr;
a1[1] = nullptr;
*a1 = nullptr;
}
*a1 = *a2;
a1[1] = a2[1];
result = a2[2];
a1[2] = result;
a2[2] = nullptr;
a2[1] = nullptr;
*a2 = nullptr;
return result;
}