//
// sub_1004B6CC0 from 0x1004b6cc0 to 0x1004b6d6b (171 bytes)
//
// 2 xrefs:
// > sub_1004B59F0 @ 0x1004b6310
// > sub_1004B6D70 @ 0x1004b6e1e
//
// 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:31:01 +0000
//
__int64 __fastcall sub_1004B6CC0(__int64 a1)
{
unsigned __int8 isRateEasing; // r14
__int64 v3; // rdi
unsigned int v4; // r15d
__int64 v5; // rax
isRateEasing = 1;
if ( !(unsigned __int8)GameToolbox::isRateEasing(*(unsigned int *)(a1 + 1048)) )
{
v3 = *(_QWORD *)(a1 + 688);
if ( v3 && (unsigned int)sub_1007FEF90(v3) )
{
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) )
{
v4 = 0;
do
{
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 688), v4);
isRateEasing = GameToolbox::isRateEasing(*(unsigned int *)(v5 + 1496));
if ( !isRateEasing )
break;
++v4;
}
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 688)) );
}
}
else
{
isRateEasing = 0;
}
}
return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1056) + 344LL))(
*(_QWORD *)(a1 + 1056),
isRateEasing);
}