//
// CCScrollLayerExt::ccTouchMoved from 0x1400479c0 to 0x140047b36 (374 bytes)
//
// 5 xrefs:
// > ??> @ 0x1405304b0
// > ??> @ 0x140662e58
// > ??> @ 0x140662e6c
// > ??> @ 0x140662e7c
// > ??> @ 0x1406c4968
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void CCScrollLayerExt::ccTouchMoved(CCScrollLayerExt *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
cocos2d::CCDirector *v5; // rax
struct cocos2d::CCPoint v6; // rax
__int64 v7; // rax
__int64 v8; // rbx
__int64 v9; // rax
__int64 v10; // rcx
struct cocos2d::CCPoint v11; // [rsp+40h] [rbp+8h] BYREF
char v12; // [rsp+48h] [rbp+10h] BYREF
int v13; // [rsp+58h] [rbp+20h] BYREF
int v14; // [rsp+5Ch] [rbp+24h]
LOBYTE(a1->m_sAdditionalTransform.b) = 1;
cocos2d::CCTouch::getLocationInView(a2);
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector();
v6 = cocos2d::CCDirector::convertToGL(v5, &v11);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v12, v6);
if ( a2 == *(cocos2d::CCTouch **)&a1->m_fSkewY )
{
cocos2d::CCPoint::operator-(&v12, &v13, &a1->m_obAnchorPointInPoints.y);
if ( LOBYTE(a1->m_sInverse.a) )
{
v14 = 0;
}
else if ( HIBYTE(a1->m_sTransform.ty) )
{
v13 = 0;
}
v7 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_sTransform.d + 200LL))(*(_QWORD *)&a1->m_sTransform.d);
cocos2d::CCPoint::operator+(v7, &v11);
v8 = (*(__int64 (__fastcall **)(float *))(*(_QWORD *)&a1[-1].m_sInverse.ty + 304LL))(&a1[-1].m_sInverse.ty);
v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_sTransform.d + 304LL))(*(_QWORD *)&a1->m_sTransform.d);
if ( (float)((float)((float)(*(float *)(v8 + 4) - *(float *)(v9 + 4)) - a1->m_sInverse.b) - a1->m_sInverse.d) <= v11.y )
{
if ( v11.y > (float)(a1->m_sInverse.tx + a1->m_sInverse.c) )
v11.y = a1->m_sInverse.tx + a1->m_sInverse.c;
}
else
{
v11.y = (float)((float)(*(float *)(v8 + 4) - *(float *)(v9 + 4)) - a1->m_sInverse.b) - a1->m_sInverse.d;
}
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCPoint *))(**(_QWORD **)&a1->m_sTransform.d + 184LL))(
*(_QWORD *)&a1->m_sTransform.d,
&v11);
BYTE1(a1->m_sAdditionalTransform.b) = 1;
cocos2d::CCPoint::operator=(&a1->m_obAnchorPointInPoints.y, &v12);
v10 = *(_QWORD *)&a1->m_sTransform.b;
if ( v10 )
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v10 + 16LL))(v10, &a1[-1].m_sInverse.ty);
}
}