//
// cocos2d::extension::CCScrollView::deaccelerateScrolling from 0x7ae4b8 to 0x7ae6fe (582 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:05 +0000
//
int __fastcall cocos2d::extension::CCScrollView::deaccelerateScrolling(
cocos2d::extension::CCScrollView *this,
float a2)
{
int result; // r0
int v4; // r3
int v5; // r0
float *v6; // r1
float *v7; // r0
int v8; // r0
float v9; // s17
float v10; // s16
float v11; // s18
int v12; // r0
void (__fastcall *v13)(int, float *); // [sp+0h] [bp-34h]
int v14; // [sp+4h] [bp-30h]
float v15; // [sp+Ch] [bp-28h] BYREF
float v16; // [sp+10h] [bp-24h]
float v17; // [sp+14h] [bp-20h] BYREF
float v18; // [sp+18h] [bp-1Ch]
_DWORD v19[2]; // [sp+1Ch] [bp-18h] BYREF
float v20[2]; // [sp+24h] [bp-10h] BYREF
if ( *((_BYTE *)this + 336) )
{
v19[0] = cocos2d::extension::CCScrollView::deaccelerateScrolling;
v19[1] = 0;
return cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling, 0);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17);
v4 = *((_DWORD *)this + 87);
v14 = v4;
v13 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v4 + 92);
v5 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4);
cocos2d::CCPoint::operator+(v20, v5, (char *)this + 376);
v13(v14, v20);
if ( *((_BYTE *)this + 372) )
{
cocos2d::CCPoint::operator=(&v15, (char *)this + 356);
v6 = (float *)((char *)this + 364);
}
else
{
cocos2d::extension::CCScrollView::maxContainerOffset((cocos2d::extension::CCScrollView *)v20);
cocos2d::CCPoint::operator=(&v15, v20);
cocos2d::extension::CCScrollView::minContainerOffset((cocos2d::extension::CCScrollView *)v20, (int)this);
v6 = v20;
}
cocos2d::CCPoint::operator=(&v17, v6);
v7 = (float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
if ( *v7 <= v15 )
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
v8 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
if ( *(float *)(v8 + 4) <= v16 )
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
v9 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
v10 = *(float *)((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87)) + 4);
v11 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
v12 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 87) + 96))(*((_DWORD *)this + 87));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v9 - v11, v10 - *(float *)(v12 + 4));
cocos2d::CCPoint::operator-(v19, (char *)this + 376, v20);
cocos2d::CCPoint::operator=((char *)this + 376, v19);
cocos2d::CCPoint::operator*(v20, (char *)this + 376, 1064514355);
cocos2d::CCPoint::operator=((char *)this + 376, v20);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v9, v10);
result = cocos2d::extension::CCScrollView::setContentOffset((int)this, v20, 0);
if ( fabsf(*((float *)this + 94)) <= 1.0 && fabsf(*((float *)this + 95)) <= 1.0
|| v10 > v16
|| v10 < v18
|| v9 > v15
|| v9 < v17
|| v9 == v15
|| v9 == v17
|| v10 == v16
|| v10 == v18 )
{
LODWORD(v20[0]) = cocos2d::extension::CCScrollView::deaccelerateScrolling;
v20[1] = 0.0;
cocos2d::CCNode::unschedule(this, cocos2d::extension::CCScrollView::deaccelerateScrolling, 0);
return cocos2d::extension::CCScrollView::relocateContainer(this, 1);
}
}
return result;
}