//
// sub_14024AC30 from 0x14024ac30 to 0x14024ad20 (240 bytes)
//
// 44 xrefs:
// > GJGameState::tweenValue @ 0x1402053cf
// > GJBaseGameLayer::updateDualGround @ 0x1402132b4
// > GJBaseGameLayer::updateDualGround @ 0x1402132cd
// > GJBaseGameLayer::animateInDualGroundNew @ 0x1402134ba
// > GJBaseGameLayer::updateZoom @ 0x140235db8
// > GJBaseGameLayer::updateScreenRotation @ 0x140235f50
// > GJBaseGameLayer::updateCameraOffsetX @ 0x140235ff0
// > GJBaseGameLayer::updateCameraOffsetY @ 0x140236090
// > GJBaseGameLayer::updateMGOffsetY @ 0x140236138
// > GJBaseGameLayer::resetLevelVariables @ 0x14023b65a
// > GJBaseGameLayer::resetLevelVariables @ 0x14023b89b
// > GJBaseGameLayer::updateCamera @ 0x14023dc20
// > GJBaseGameLayer::updateCamera @ 0x14023dc9e
// > GJBaseGameLayer::updateCamera @ 0x14023dd2e
// > GJBaseGameLayer::updateCamera @ 0x14023ddad
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x14023ef64
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x14023f064
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x14023f0c7
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f367
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f3d5
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f470
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f4e6
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f600
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14023f628
// > GJBaseGameLayer::exitStaticCamera @ 0x14023f7f8
// > GJBaseGameLayer::exitStaticCamera @ 0x14023f8bd
// > GJBaseGameLayer::exitStaticCamera @ 0x14023f9b5
// > GJBaseGameLayer::resetCamera @ 0x14023fc63
// > GJBaseGameLayer::resetCamera @ 0x14023fc8e
// > GJBaseGameLayer::resetCamera @ 0x14023fcdb
// > GJBaseGameLayer::resetCamera @ 0x14023fd06
// > GJBaseGameLayer::resetStaticCamera @ 0x14023fe11
// > GJBaseGameLayer::resetStaticCamera @ 0x14023fe2a
// > GJBaseGameLayer::resetStaticCamera @ 0x14023fe61
// > GJBaseGameLayer::resetStaticCamera @ 0x14023fe7a
// > GJEffectManager::runOpacityActionOnGroup @ 0x140260ac3
// > LevelEditorLayer::updateGameObjects @ 0x1402dc299
// > LevelEditorLayer::activateTriggerEffect @ 0x1402dd258
// > PlayLayer::playEndAnimationToPos @ 0x1403abb80
// > PlayLayer::playEndAnimationToPos @ 0x1403abbb1
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1403ac47e
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x1403ac4ad
// > ShaderLayer::tweenValue @ 0x14048946f
// > ??> @ 0x1406cebc8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_14024AC30(_QWORD *a1, unsigned __int8 *a2)
{
void **v4; // r8
void **v5; // rdx
_DWORD *v6; // rcx
_DWORD *v7; // rax
void *v8; // rax
__int64 v9; // rdx
v4 = (void **)(a1 + 1);
v5 = (void **)(a1[3]
+ 16
* ((0x100000001B3LL
* (a2[3]
^ (0x100000001B3LL
* (a2[2] ^ (0x100000001B3LL * (a2[1] ^ (0x100000001B3LL * (*a2 ^ 0xCBF29CE484222325uLL))))))))
& a1[6]));
v6 = v5[1];
if ( v6 != *v4 )
{
if ( *(_DWORD *)a2 == v6[4] )
goto LABEL_8;
while ( v6 != *v5 )
{
v6 = *((_DWORD **)v6 + 1);
if ( *(_DWORD *)a2 == v6[4] )
{
v4 = (void **)(a1 + 1);
goto LABEL_8;
}
}
v4 = (void **)(a1 + 1);
}
v6 = nullptr;
LABEL_8:
if ( !v6 )
return 0;
v7 = *v5;
if ( v5[1] == v6 )
{
if ( v7 == v6 )
{
v8 = *v4;
*v5 = *v4;
}
else
{
v8 = *((void **)v6 + 1);
}
v5[1] = v8;
}
else if ( v7 == v6 )
{
*v5 = *(void **)v6;
}
v9 = *(_QWORD *)v6;
--a1[2];
**((_QWORD **)v6 + 1) = v9;
*(_QWORD *)(v9 + 8) = *((_QWORD *)v6 + 1);
j_j_free(v6);
return 1;
}