//
// EditorWindowPopup::ccTouchEnded from 0x1004da70c to 0x1004da898 (396 bytes)
//
// 7 xrefs:
// > sub_1004DA898 @ 0x1004da89c
// > ??> @ 0x1009860a8
// > ??> @ 0x10098b9a0
// > ??> @ 0x10098c1e8
// > ??> @ 0x100990cc0
// > ??> @ 0x1009920f0
// > ??> @ 0x1009a7648
//
// 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:06:33 +0000
//
__int64 __fastcall EditorWindowPopup::ccTouchEnded(__int64 result, float32x2_t *a2, __int64 a3)
{
__int64 v4; // x19
__int64 v5; // x0
int v6; // w22
__int64 v7; // x8
__int64 v8; // [xsp+0h] [xbp-30h] BYREF
__int64 v9; // [xsp+8h] [xbp-28h] BYREF
if ( a2[7].i32[0] == *(_DWORD *)(result + 1076) )
{
v4 = result;
*(_DWORD *)(result + 1076) = -1;
if ( *(_BYTE *)(result + 1093) == 1 )
{
*(_BYTE *)(result + 1093) = 0;
return (*(__int64 (__fastcall **)(_QWORD, float32x2_t *, __int64))(**(_QWORD **)(result + 552) + 912LL))(
*(_QWORD *)(result + 552),
a2,
a3);
}
else if ( *(_BYTE *)(result + 1094) == 1 )
{
*(_BYTE *)(result + 1094) = 0;
v5 = *(_QWORD *)(result + 1032);
if ( v5 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 912LL))(v5, 255);
cocos2d::CCTouch::getLocation(a2, (float *)&v9);
result = EditorWindowPopup::isInCloseButton(v4, (float *)&v9);
if ( (_DWORD)result )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1368LL))(v4, 0);
}
else if ( *(_DWORD *)(result + 1096) )
{
*(_DWORD *)(result + 1096) = 0;
sub_1000262F4(&v8, (double *)(result + 1068));
EditorWindowPopup::clampWindowCenter(v4, (__int64)&v8, &v9);
sub_10002630C((_QWORD *)(v4 + 1068), (double *)&v9);
return EditorWindowPopup::layoutWindow(v4);
}
else if ( *(_BYTE *)(result + 1080) == 1 )
{
*(_BYTE *)(result + 1080) = 0;
}
else
{
result = *(_QWORD *)(result + 1040);
if ( result )
{
v6 = *(unsigned __int8 *)(result + 480);
result = sub_100525820(result, a2);
v7 = 912;
if ( v6 )
v7 = 920;
}
else
{
v7 = 912;
}
if ( *(_BYTE *)(v4 + 1092) == 1 )
{
result = *(_QWORD *)(v4 + 1048);
if ( result )
{
result = (*(__int64 (**)(void))(*(_QWORD *)result + v7))();
*(_BYTE *)(v4 + 1092) = 0;
}
}
}
}
return result;
}