//
// SetupSmartBlockLayer::determineStartValues from 0x10007835c to 0x10007841c (192 bytes)
//
// 1 xrefs:
// > SetupSmartBlockLayer::init @ 0x1000778f4
//
// 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:58:14 +0000
//
__int64 __fastcall SetupSmartBlockLayer::determineStartValues(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x8
__int64 v4; // x0
__int64 GameVariable; // x0
__int64 v6; // x0
__int64 result; // x0
__int64 v8; // x8
__int64 v9; // x20
v2 = GameLevelManager::sharedState(a1);
v3 = *(_QWORD *)(v2 + 1528);
if ( v3 )
{
*(_BYTE *)(a1 + 673) = *(_BYTE *)(v3 + 138);
*(_WORD *)(a1 + 674) = *(_WORD *)(v3 + 136);
*(_BYTE *)(a1 + 678) = *(_BYTE *)(v3 + 139);
}
v4 = GameManager::sharedState(v2);
GameVariable = GameManager::getGameVariable(v4, "0131");
*(_BYTE *)(a1 + 676) = GameVariable;
v6 = GameManager::sharedState(GameVariable);
result = GameManager::getGameVariable(v6, "0132");
*(_BYTE *)(a1 + 677) = result;
v8 = *(_QWORD *)(a1 + 688);
if ( v8 )
{
*(_BYTE *)(a1 + 672) = *(_BYTE *)(v8 + 1347);
}
else
{
*(_BYTE *)(a1 + 672) = 1;
result = sub_1002E757C(*(_QWORD *)(a1 + 696));
if ( (_DWORD)result )
{
v9 = 0;
do
{
if ( (*(_BYTE *)(sub_1002E75A0(*(_QWORD *)(a1 + 696), v9) + 1347) & 1) == 0 )
*(_BYTE *)(a1 + 672) = 0;
v9 = (unsigned int)(v9 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 696));
}
while ( (unsigned int)v9 < (unsigned int)result );
}
}
return result;
}