//
// PlayerObject::updateRobotAnimationSpeed from 0x75c9ac to 0x75cdc4 (1048 bytes)
//
// 4 xrefs:
// > PlayerObject::togglePlayerScale @ 0x75cfcc
// > PlayerObject::updateTimeMod @ 0x75d1dc
// > PlayerObject::updateTimeMod @ 0x75d230
// > ??> @ 0xeb438
//
// This function is hookable on this platform (idp: arm, 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:53:01 +0000
//
__int64 __fastcall PlayerObject::updateRobotAnimationSpeed(PlayerObject *this)
{
float v2; // s9
float v3; // s1
float v4; // s8
float v5; // s0
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x2
__int64 v9; // x0
__int64 v10; // x1
bool v11; // w0
_BOOL4 v12; // w21
float v13; // s0
char *v14; // x22
__int64 v15; // x0
__int64 v16; // x1
char v17; // w0
__int64 v18; // x19
__int64 v19; // x0
__int64 v20; // x1
__int64 v22; // [xsp+40h] [xbp+40h] BYREF
__int64 v23; // [xsp+48h] [xbp+48h]
void *v24; // [xsp+50h] [xbp+50h]
__int64 v25; // [xsp+58h] [xbp+58h] BYREF
__int64 v26; // [xsp+60h] [xbp+60h]
void *v27; // [xsp+68h] [xbp+68h]
__int64 v28; // [xsp+70h] [xbp+70h] BYREF
__int64 v29; // [xsp+78h] [xbp+78h]
void *v30; // [xsp+80h] [xbp+80h]
v2 = 0.9;
v3 = *((float *)this + 619);
if ( v3 == 0.9 )
{
v4 = 1.0;
v2 = 1.0;
if ( *((float *)this + 618) >= 1.0 )
goto LABEL_4;
LABEL_31:
v4 = 0.85;
v5 = v2 / 0.85;
goto LABEL_5;
}
if ( v3 == 0.7 )
{
v4 = 1.0;
if ( *((float *)this + 618) >= 1.0 )
{
LABEL_4:
v5 = v2;
goto LABEL_5;
}
goto LABEL_31;
}
if ( v3 == 1.1 )
{
v2 = 1.15;
goto LABEL_34;
}
v2 = 1.3;
if ( v3 == 1.3 )
{
LABEL_34:
if ( *((float *)this + 618) < 1.0 )
{
v4 = 0.935;
v5 = v2 / 0.85;
}
else
{
v5 = v2;
v4 = 1.0 * 1.1;
}
goto LABEL_5;
}
if ( v3 == 1.6 )
{
v2 = 1.5;
goto LABEL_34;
}
v5 = 1.0;
v4 = 1.0;
if ( *((float *)this + 618) < 1.0 )
{
v5 = 1.1765;
v4 = 0.85;
}
v2 = 1.0;
if ( v3 >= 1.1 )
v4 = v4 * 1.1;
LABEL_5:
SpriteAnimationManager::updateAnimationSpeed(*(_QWORD *)(*((_QWORD *)this + 267) + 648LL), v5);
SpriteAnimationManager::updateAnimationSpeed(*(_QWORD *)(*((_QWORD *)this + 268) + 648LL), v2 / v4);
if ( !*((_BYTE *)this + 2422) )
goto LABEL_13;
v6 = *((_QWORD *)this + 268);
v22 = 0;
v23 = 0;
v7 = *(_QWORD *)(v6 + 648);
v24 = nullptr;
v8 = v7 + 400;
if ( (*(_BYTE *)(v7 + 400) & 1) != 0 )
{
std::string::__init(&v22, *(void **)(v7 + 416), *(_QWORD *)(v7 + 408));
}
else
{
v9 = *(_QWORD *)v8;
v10 = *(_QWORD *)(v8 + 8);
v24 = *(void **)(v8 + 16);
v22 = v9;
v23 = v10;
}
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "walk", 4u);
v11 = sub_74D8D4((__int64)&v22, (__int64)&v25);
v12 = v11;
if ( v11 )
{
if ( (v25 & 1) == 0 )
{
LABEL_10:
PlayerObject::playDynamicSpiderRun(this);
goto LABEL_11;
}
goto LABEL_49;
}
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "run", 3u);
v12 = sub_74D8D4((__int64)&v22, (__int64)&v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
if ( (v25 & 1) != 0 )
LABEL_49:
operator delete(v27);
if ( v12 )
goto LABEL_10;
LABEL_11:
if ( (v22 & 1) != 0 )
operator delete(v24);
LABEL_13:
if ( *((_BYTE *)this + 3049) && *((float *)this + 619) == 0.7 )
{
v14 = (char *)this + 2944;
std::string::assign((__int64 *)this + 368, "run3");
}
else if ( *((_BYTE *)this + 3050) && ((v13 = *((float *)this + 619), v13 == 1.3) || v13 == 1.6) )
{
v14 = (char *)this + 2944;
std::string::assign((__int64 *)this + 368, "run2");
}
else
{
v14 = (char *)this + 2944;
std::string::assign((__int64 *)this + 368, "run");
}
if ( *((_BYTE *)this + 2421) )
{
v15 = *(_QWORD *)(*((_QWORD *)this + 267) + 648LL);
v25 = 0;
v26 = 0;
v27 = nullptr;
if ( (*(_BYTE *)(v15 + 400) & 1) != 0 )
{
std::string::__init(&v25, *(void **)(v15 + 416), *(_QWORD *)(v15 + 408));
}
else
{
v16 = *(_QWORD *)(v15 + 408);
v25 = *(_QWORD *)(v15 + 400);
v26 = v16;
v27 = *(void **)(v15 + 416);
}
if ( !sub_74D8D4((__int64)&v25, (__int64)v14) )
{
v17 = *((_BYTE *)this + 2944);
v28 = 0;
v29 = 0;
v30 = nullptr;
v18 = *((_QWORD *)this + 267);
if ( (v17 & 1) != 0 )
{
std::string::__init(&v28, *((void **)v14 + 2), *((_QWORD *)v14 + 1));
}
else
{
v19 = *(_QWORD *)v14;
v20 = *((_QWORD *)v14 + 1);
v30 = *((void **)v14 + 2);
v28 = v19;
v29 = v20;
}
CCAnimatedSprite::runAnimation(v18, (char *)&v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
}
if ( (v25 & 1) != 0 )
operator delete(v27);
}
return _stack_chk_guard;
}