//
// cocos2d::extension::CCScrollView::deaccelerateScrolling from 0x180012aa0 to 0x180012dbd (797 bytes)
//
// 8 xrefs:
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0x180012ab6
// > cocos2d::extension::CCScrollView::deaccelerateScrolling @ 0x180012d92
// > cocos2d::extension::CCScrollView::ccTouchEnded @ 0x180013b85
// > ??> @ 0x180030ec8
// > ??> @ 0x180030f20
// > ??> @ 0x180030f38
// > ??> @ 0x180032408
// > ??> @ 0x18004c380
//
// This function is hookable on this platform (idp: pc, 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 12:15:40 +0000
//
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; // xmm7_4
__int64 v8; // rax
__int64 v9; // rbx
float v10; // xmm6_4
float *v11; // rdi
__int64 v12; // rax
__int64 v13; // rax
float *v14; // rax
float *v15; // rbx
float v16; // xmm1_4
__int64 v17; // rcx
__int32 v18; // xmm1_4
float v19[2]; // [rsp+20h] [rbp-48h] BYREF
_BYTE v20[8]; // [rsp+28h] [rbp-40h] BYREF
float v21; // [rsp+80h] [rbp+18h] BYREF
float v22; // [rsp+84h] [rbp+1Ch]
float v23; // [rsp+90h] [rbp+28h] BYREF
float v24; // [rsp+94h] [rbp+2Ch]
float v25; // [rsp+98h] [rbp+30h] BYREF
float v26; // [rsp+9Ch] [rbp+34h]
if ( *((_BYTE *)this + 436) )
{
cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23);
v3 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
cocos2d::CCPoint::operator+(v3, &v25, (char *)this + 480);
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 56) + 184LL))(*((_QWORD *)this + 56), &v25);
if ( *((_BYTE *)this + 476) )
{
cocos2d::CCPoint::operator=(&v21, (char *)this + 460);
v4 = (cocos2d::extension::CCScrollView *)((char *)this + 468);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 0.0, 0.0);
cocos2d::CCPoint::operator=(&v21, &v25);
v4 = cocos2d::extension::CCScrollView::minContainerOffset((__int64)this, (cocos2d::CCPoint *)&v25);
}
cocos2d::CCPoint::operator=(&v23, v4);
v5 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
if ( v21 > *v5 )
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
v6 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
if ( v22 > *(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 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 56) + 200LL))(*((_QWORD *)this + 56));
v9 = *((_QWORD *)this + 56);
v10 = *(float *)(v8 + 4);
v11 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 200LL))(v9);
v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 200LL))(v9);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v7 - *v11, v10 - *(float *)(v12 + 4));
cocos2d::CCPoint::operator-((char *)this + 480, &v25, v13);
cocos2d::CCPoint::operator=((char *)this + 480, &v25);
cocos2d::CCPoint::operator*((char *)this + 480, &v25);
cocos2d::CCPoint::operator=((char *)this + 480, &v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v7, v10);
v15 = v14;
if ( !*((_BYTE *)this + 476) )
{
cocos2d::extension::CCScrollView::minContainerOffset((__int64)this, (cocos2d::CCPoint *)v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 0.0, 0.0);
v16 = fminf(v26, v15[1]);
*v15 = fmaxf(v19[0], fminf(v25, *v15));
v15[1] = fmaxf(v19[1], v16);
}
(*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 56) + 184LL))(*((_QWORD *)this + 56), v15);
v17 = *((_QWORD *)this + 53);
if ( v17 )
(*(void (__fastcall **)(__int64, cocos2d::extension::CCScrollView *))(*(_QWORD *)v17 + 8LL))(v17, this);
v18 = _mm_load_si128((const __m128i *)&xmmword_18002BCE0).m128i_i32[0];
if ( COERCE_FLOAT(*((_DWORD *)this + 120) & v18) <= 1.0 && COERCE_FLOAT(*((_DWORD *)this + 121) & v18) <= 1.0
|| v10 > v22
|| v24 > v10
|| v7 > v21
|| v23 > v7
|| v7 == v21
|| v7 == v23
|| v10 == v22
|| v10 == v24 )
{
cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling);
cocos2d::extension::CCScrollView::relocateContainer(this, 1);
}
}
}