//
// GJScaleControl::ccTouchEnded from 0xbcf5c8 to 0xbcf6b0 (232 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJScaleControl::ccTouchEnded @ 0xbcf6b4
// > ??> @ 0xfce80
// > ??> @ 0x14e2280
//
// 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 13:03:36 +0000
//
__int64 __fastcall GJScaleControl::ccTouchEnded(__int64 a1, __int64 a2)
{
__int64 v2; // x20
__int64 result; // x0
__int64 v5; // x0
float v6; // s0
int v7; // s0
float Value; // s0
int v9; // s0
v2 = a1 + 544;
if ( ControlMenuTouch::tracking((ControlMenuTouch *)(a1 + 544)) )
return ControlMenuTouch::ended(v2);
result = *(unsigned int *)(a2 + 56);
if ( *(_DWORD *)(a1 + 432) == (_DWORD)result )
{
if ( *(_WORD *)(a1 + 458) )
{
if ( *(_WORD *)(a1 + 458) == 1 )
{
Value = Slider::getValue(*(Slider **)(a1 + 416));
GJScaleControl::scaleFromValue((GJScaleControl *)a1, Value);
v5 = *(_QWORD *)(a1 + 416);
*(_DWORD *)(a1 + 440) = v9;
}
else
{
v5 = *(_QWORD *)(a1 + 424);
}
}
else
{
v6 = Slider::getValue(*(Slider **)(a1 + 408));
GJScaleControl::scaleFromValue((GJScaleControl *)a1, v6);
v5 = *(_QWORD *)(a1 + 408);
*(_DWORD *)(a1 + 436) = v7;
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 912LL))(v5);
return GJScaleControl::finishTouch((GJScaleControl *)a1);
}
return result;
}