//
// sub_140355080 from 0x140355080 to 0x140355164 (228 bytes)
//
// 42 xrefs:
// > GJGameState::tweenValue @ 0x14030b2df
// > GJBaseGameLayer::updateDualGround @ 0x14031a5d1
// > GJBaseGameLayer::updateDualGround @ 0x14031a5ea
// > GJBaseGameLayer::animateInDualGroundNew @ 0x14031a7cb
// > GJBaseGameLayer::loadStartPosObject @ 0x14033e55f
// > GJBaseGameLayer::loadStartPosObject @ 0x14033e578
// > GJBaseGameLayer::updateZoom @ 0x14033eb85
// > GJBaseGameLayer::updateScreenRotation @ 0x14033ed4b
// > GJBaseGameLayer::updateCameraOffsetX @ 0x14033edfd
// > GJBaseGameLayer::updateCameraOffsetY @ 0x14033ee9d
// > GJBaseGameLayer::updateMGOffsetY @ 0x14033ef48
// > GJBaseGameLayer::resetLevelVariables @ 0x140345606
// > GJBaseGameLayer::resetLevelVariables @ 0x140345835
// > GJBaseGameLayer::updateCamera @ 0x140347b35
// > GJBaseGameLayer::updateCamera @ 0x140347bac
// > GJBaseGameLayer::updateCamera @ 0x140347c30
// > GJBaseGameLayer::updateCamera @ 0x140347cb1
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348e78
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348f6e
// > GJBaseGameLayer::updateStaticCameraPos @ 0x1403491c7
// > GJBaseGameLayer::updateStaticCameraPos @ 0x14034925a
// > GJBaseGameLayer::updateStaticCameraPos @ 0x1403493a2
// > GJBaseGameLayer::updateStaticCameraPos @ 0x1403493ce
// > GJBaseGameLayer::exitStaticCamera @ 0x14034956a
// > GJBaseGameLayer::exitStaticCamera @ 0x140349642
// > GJBaseGameLayer::resetCamera @ 0x140349883
// > GJBaseGameLayer::resetCamera @ 0x1403498ae
// > GJBaseGameLayer::resetCamera @ 0x1403498fb
// > GJBaseGameLayer::resetCamera @ 0x140349926
// > GJBaseGameLayer::resetStaticCamera @ 0x140349a31
// > GJBaseGameLayer::resetStaticCamera @ 0x140349a4a
// > GJBaseGameLayer::resetStaticCamera @ 0x140349a81
// > GJBaseGameLayer::resetStaticCamera @ 0x140349a9a
// > GJEffectManager::runOpacityActionOnGroup @ 0x14036b203
// > LevelEditorLayer::updateGameObjects @ 0x1403faafa
// > LevelEditorLayer::activateTriggerEffect @ 0x1403fbc26
// > PlayLayer::playEndAnimationToPos @ 0x14050a424
// > PlayLayer::playEndAnimationToPos @ 0x14050a459
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x14050ad80
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x14050adaf
// > ShaderLayer::tweenValue @ 0x14062a52f
// > ??> @ 0x140920864
//
// 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 11:30:48 +0000
//
__int64 __fastcall sub_140355080(_QWORD *a1, unsigned __int8 *a2)
{
_DWORD *v4; // r9
void **v5; // rdx
_DWORD *v6; // rcx
_DWORD *v7; // rax
__int64 v8; // rdx
v4 = (_DWORD *)a1[1];
v5 = (void **)(a1[3]
+ 16
* (a1[6]
& (0x100000001B3LL
* (a2[3]
^ (0x100000001B3LL
* (a2[2] ^ (0x100000001B3LL * (a2[1] ^ (0x100000001B3LL * (*a2 ^ 0xCBF29CE484222325uLL))))))))));
v6 = v5[1];
if ( v6 != v4 )
{
if ( *(_DWORD *)a2 == v6[4] )
goto LABEL_7;
while ( v6 != *v5 )
{
v6 = *((_DWORD **)v6 + 1);
if ( *(_DWORD *)a2 == v6[4] )
goto LABEL_7;
}
}
v6 = nullptr;
LABEL_7:
if ( !v6 )
return 0;
v7 = *v5;
if ( v5[1] == v6 )
{
if ( v7 == v6 )
*v5 = v4;
else
v4 = *((_DWORD **)v6 + 1);
v5[1] = v4;
}
else if ( v7 == v6 )
{
*v5 = *(void **)v6;
}
v8 = *(_QWORD *)v6;
--a1[2];
**((_QWORD **)v6 + 1) = v8;
*(_QWORD *)(v8 + 8) = *((_QWORD *)v6 + 1);
j_j_free(v6);
return 1;
}