//
// GJMapObject::startMonsterJumpLoop from 0x97e484 to 0x97e5e0 (348 bytes)
//
// 4 xrefs:
// > ??> @ 0x2cd18
// > GJMapObject::monsterIdle @ 0x97dcec
// > GJMapObject::createMonster @ 0x97e8e4
// > ??> @ 0x12294b0
//
// 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 GJMapObject::startMonsterJumpLoop(GJMapObject *a1)
{
int v2; // w0
__int64 v3; // x22
float v4; // s0
char *v5; // x0
unsigned int *v6; // x2
int v7; // w1
double v8; // [xsp+30h] [xbp+30h]
_DWORD *v9; // [xsp+50h] [xbp+50h] BYREF
GJMapObject::moveFinished(a1);
a1->m_monsterIdle = 0;
v8 = sub_97D408();
v2 = rand();
v3 = *(_QWORD *)(*(_QWORD *)&a1->m_mainNode[4].m_sInverse.b + 616LL);
v4 = v8 + 5.0 + (float)((float)((float)v2 * 4.6566e-10) * 10.0);
a1->m_jumpStopTime = v4;
sub_D18D28(&v9);
SpriteAnimationManager::runAnimation(v3, (const void **)&v9);
v5 = (char *)(v9 - 6);
if ( v9 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = v9 - 2;
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(v9 - 2);
*(v9 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
SpriteAnimationManager::updateAnimationSpeed(
*(SpriteAnimationManager **)(*(_QWORD *)&a1->m_mainNode[4].m_sInverse.b + 616LL),
0.9);
GJMapObject::monsterJump(a1);
}