//
// TouchControlEditLayer::getValue from 0x10052dcbc to 0x10052ddc4 (264 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009a3738
//
// 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 11:07:19 +0000
//
__n128 __fastcall TouchControlEditLayer::getValue(__int64 a1, int a2)
{
_BYTE *v3; // x0
_BYTE **v4; // x9
__n128 result; // q0
__int64 v6; // x8
int GameVariable; // w0
__int64 v8; // x0
v3 = *(_BYTE **)(a1 + 1248);
if ( !v3 )
{
v4 = *(_BYTE ***)(a1 + 1224);
if ( v4 == *(_BYTE ***)(a1 + 1232) )
v3 = nullptr;
else
v3 = *v4;
}
result.n128_u32[0] = 0;
if ( a2 > 3 )
{
if ( a2 <= 5 )
{
if ( a2 == 4 )
{
if ( !v3 )
return result;
result.n128_u8[0] = v3[382];
}
else
{
if ( !v3 )
return result;
result.n128_u8[0] = v3[387];
}
goto LABEL_22;
}
if ( a2 != 6 )
{
if ( a2 != 7 )
return result;
result.n128_u8[0] = *(_BYTE *)(a1 + 1012);
goto LABEL_22;
}
v6 = *(_QWORD *)(a1 + 1016);
if ( v6 )
{
GameVariable = *(_DWORD *)(v6 + 68);
}
else
{
v8 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v8, "0113");
}
result.n128_f32[0] = (float)GameVariable;
return result;
}
if ( a2 == 1 )
{
if ( v3 )
{
result.n128_f32[0] = (float)(unsigned int)sub_100053680((__int64)v3) / 255.0;
return result;
}
LABEL_27:
result.n128_u32[0] = 1.0;
return result;
}
if ( a2 == 2 )
{
if ( v3 )
{
sub_100053670((__int64)v3);
return result;
}
goto LABEL_27;
}
if ( a2 == 3 && v3 )
{
result.n128_u8[0] = v3[381];
LABEL_22:
result.n128_f32[0] = (float)result.n128_u32[0];
}
return result;
}