//
// sub_100142430 from 0x100142430 to 0x100142534 (260 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10014001c
// > EndLevelLayer::onEdit @ 0x100393d28
//
// 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 10:59:32 +0000
//
double __fastcall sub_100142430(__int64 a1)
{
__int64 v2; // x0
unsigned int *v3; // x9
__int64 v4; // x8
_QWORD *v5; // x21
unsigned __int64 v6; // x22
__int64 v7; // x20
double result; // d0
*(_BYTE *)(a1 + 14184) = 0;
UILayer::disableMenu(*(_QWORD *)(a1 + 13288));
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 3256) + 1312LL))(*(_QWORD *)(a1 + 3256), 1);
PlayerObject::deactivateParticle(*(_QWORD *)(a1 + 3256));
PlayerObject::deactivateStreak(*(_QWORD *)(a1 + 3256), 1);
PlayerObject::toggleGhostEffect(*(_QWORD *)(a1 + 3256), 0);
if ( *(_BYTE *)(a1 + 1010) == 1 )
{
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 3264) + 1312LL))(*(_QWORD *)(a1 + 3264), 1);
PlayerObject::deactivateParticle(*(_QWORD *)(a1 + 3264));
PlayerObject::deactivateStreak(*(_QWORD *)(a1 + 3264), 1);
PlayerObject::toggleGhostEffect(*(_QWORD *)(a1 + 3264), 0);
}
v2 = *(_QWORD *)(a1 + 3280);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( (_DWORD)v4 )
{
v5 = *((_QWORD **)v3 + 2);
v6 = (unsigned __int64)&v5[v4 - 1];
do
{
v7 = *v5;
if ( !*v5 )
break;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v7 + 1312LL))(*v5, 1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 736LL))(v7);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
v2 = *(_QWORD *)(a1 + 3280);
}
}
*(_QWORD *)&result = sub_1002E7674(v2).n128_u64[0];
return result;
}