//
// cocos2d::extension::CCScrollView::deaccelerateScrolling from 0x180012fd0 to 0x1800132b7 (743 bytes)
//
// 7 xrefs:
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0x180012fe2
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0x18001328c
// > cocos2d::extension::CCScrollView::ccTouchEnded @ 0x180013fd5
// > ??> @ 0x18002e998
// > ??> @ 0x18002e9b0
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004a470
//
// 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 __fastcall cocos2d::extension::CCScrollView::deaccelerateScrolling(
cocos2d::extension::CCScrollView *this,
float a2)
{
__int64 v3; // rax
cocos2d::CCPoint *v4; // rdx
float *v5; // rax
__int64 v6; // rax
float v7; // xmm8_4
float v8; // xmm7_4
float v9; // xmm6_4
float *v10; // rax
__int64 v11; // rax
float *v12; // rax
_BYTE v13[16]; // [rsp+20h] [rbp-48h] BYREF
float v14; // [rsp+70h] [rbp+8h] BYREF
float v15; // [rsp+74h] [rbp+Ch]
float v16; // [rsp+80h] [rbp+18h] BYREF
float v17; // [rsp+84h] [rbp+1Ch]
char v18; // [rsp+88h] [rbp+20h] BYREF
if ( *((_BYTE *)this + 436) )
{
cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16);
v3 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
cocos2d::CCPoint::operator+(v3, &v18, (char *)this + 480);
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 56) + 184LL))(*((_QWORD *)this + 56), &v18);
if ( *((_BYTE *)this + 476) )
{
cocos2d::CCPoint::operator=(&v14, (char *)this + 460);
v4 = (cocos2d::extension::CCScrollView *)((char *)this + 468);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, 0.0, 0.0);
cocos2d::CCPoint::operator=(&v14, &v18);
v4 = cocos2d::extension::CCScrollView::minContainerOffset((__int64)this, (cocos2d::CCPoint *)&v18);
}
cocos2d::CCPoint::operator=(&v16, v4);
v5 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
if ( v14 > *v5 )
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
v6 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
if ( v15 > *(float *)(v6 + 4) )
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
v7 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
v8 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56)) + 4);
v9 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56)) + 4);
v10 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, v7 - *v10, v8 - v9);
cocos2d::CCPoint::operator-((char *)this + 480, &v18, v11);
cocos2d::CCPoint::operator=((char *)this + 480, &v18);
cocos2d::CCPoint::operator*((char *)this + 480, &v18);
cocos2d::CCPoint::operator=((char *)this + 480, &v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, v7, v8);
cocos2d::extension::CCScrollView::setContentOffset((__int64)this, v12, 0);
if ( fabs(*((float *)this + 120)) <= 1.0 && fabs(*((float *)this + 121)) <= 1.0
|| v8 > v15
|| v17 > v8
|| v7 > v14
|| v16 > v7
|| v7 == v14
|| v7 == v16
|| v8 == v15
|| v8 == v17 )
{
cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling);
cocos2d::extension::CCScrollView::relocateContainer(this, 1);
}
}
}