//
// sub_59CD18 from 0x59cd18 to 0x59cd56 (62 bytes)
//
// 5 xrefs:
// > GJGameState::operator= @ 0x5b4622
// > GJGameState::operator= @ 0x5b462e
// > GJGameState::operator= @ 0x5b463a
// > GJGameState::operator= @ 0x5b4646
// > GJGameState::operator= @ 0x5b4652
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:53:13 +0000
//
void __fastcall sub_59CD18(void **a1, void **a2)
{
char *v3; // r6
char *v5; // r0
char **v6; // r0
v3 = (char *)*a1;
if ( *a1 )
{
while ( 1 )
{
v5 = (char *)a1[1];
if ( v3 == v5 )
break;
v6 = (char **)(v5 - 200);
a1[1] = v6;
EnterEffectInstance::~EnterEffectInstance(v6);
}
operator delete(*a1);
a1[2] = nullptr;
a1[1] = nullptr;
*a1 = nullptr;
}
*a1 = *a2;
a1[1] = a2[1];
a1[2] = a2[2];
a2[2] = nullptr;
a2[1] = nullptr;
*a2 = nullptr;
}