//
// sub_100156E90 from 0x100156e90 to 0x100156f20 (144 bytes)
//
// 3 xrefs:
// > GJRotationControl::ccTouchBegan @ 0x1001578e8
// > GJScaleControl::ccTouchBegan @ 0x100158cb0
// > GJTransformControl::ccTouchBegan @ 0x10015ae2c
//
// 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:59:41 +0000
//
__int64 __fastcall sub_100156E90(__int64 *a1, __int64 a2, __int64 a3)
{
__int64 v3; // x8
unsigned __int64 v7; // x22
a1[3] = 0;
v3 = *a1;
if ( a1[1] == *a1 )
return 0;
v7 = 0;
while ( !(*(unsigned int (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v3 + 8 * v7) + 896LL))(
*(_QWORD *)(v3 + 8 * v7),
a2,
a3) )
{
++v7;
v3 = *a1;
if ( v7 >= (a1[1] - *a1) >> 3 )
return 0;
}
a1[3] = *(_QWORD *)(*a1 + 8 * v7);
return 1;
}