//
// PlayerObject::playingEndEffect from 0x628db0 to 0x628eb4 (260 bytes)
//
// 3 xrefs:
// > PlayLayer::playEndAnimationToPos @ 0x5cc1c4
// > PlayLayer::playPlatformerEndAnimationToPos @ 0x5d1800
// > ??> @ 0xc6558
//
// 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 PlayerObject::playingEndEffect(PlayerObject *a1)
{
GJSpiderSprite *m_spiderSprite; // x21
char *v2; // x0
unsigned int *v3; // x2
int v4; // w1
std::string v5; // [xsp+40h] [xbp+40h] BYREF
if ( a1->m_isSpider )
{
m_spiderSprite = a1->m_spiderSprite;
sub_D153B8((int)&v5, "fall_loop");
CCAnimatedSprite::tweenToAnimation((__int64)m_spiderSprite, &v5, 0.4);
v2 = (char *)v5.m_data.m_data - 24;
if ( (__int64 *)v5.m_data.m_data - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v3 = (unsigned int *)((char *)v5.m_data.m_data - 8);
do
v4 = __ldaxr(v3);
while ( __stlxr(v4 - 1, v3) );
}
else
{
v4 = *((_DWORD *)v5.m_data.m_data - 2);
*((_DWORD *)v5.m_data.m_data - 2) = v4 - 1;
}
if ( v4 <= 0 )
operator delete(v2);
}
}
}