//
// sub_1001474A0 from 0x1001474a0 to 0x100147544 (164 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::updateActiveEnterEffect @ 0x1000fa815
// > GJBaseGameLayer::updateActiveEnterEffect @ 0x1000fa82f
// > GJBaseGameLayer::removeCustomEnterEffects @ 0x1000fafbc
//
// This function is hookable on this platform (idp: pc, 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:24:58 +0000
//
__int64 __fastcall sub_1001474A0(__int64 *a1, __int64 *a2)
{
__int64 v2; // rbx
_QWORD *v3; // r14
__int64 v4; // r12
__int64 v5; // r15
void *v6; // rdi
_QWORD *v7; // rsi
void *v8; // rdi
void *__p; // [rsp+8h] [rbp-38h] BYREF
char v11; // [rsp+18h] [rbp-28h]
v2 = *a2;
sub_10001AE30((__int64)&__p, a1, a2);
v3 = __p;
__p = nullptr;
if ( v3 )
{
if ( v11 == 1 )
{
v4 = v3[3];
if ( v4 )
{
v5 = v3[4];
v6 = (void *)v3[3];
if ( v5 != v4 )
{
do
{
v8 = *(void **)(v5 - 32);
if ( v8 )
{
*(_QWORD *)(v5 - 24) = v8;
operator delete(v8);
}
v7 = *(_QWORD **)(v5 - 232);
v5 -= 240;
sub_10001ADF0(v5, v7);
}
while ( v5 != v4 );
v6 = (void *)v3[3];
}
v3[4] = v4;
operator delete(v6);
}
}
operator delete(v3);
}
return v2;
}