//
// PlayerObject::spawnCircle from 0x1403975b0 to 0x14039775a (426 bytes)
//
// 2 xrefs:
// > PlayerObject::playSpawnEffect @ 0x140397550
// > ??> @ 0x1406d644c
//
// 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
//
// Hidden C++ exception states: #wind=3
void PlayerObject::spawnCircle(PlayerObject *a1)
{
__int64 v2; // rax
CCCircleWave *v3; // rdi
CCCircleWave_vtbl *v4; // rbx
const cocos2d::CCPoint *v5; // rax
cocos2d::CCObject *m_target; // rcx
CCCircleWave_vtbl *v7; // rbx
__int64 v8; // rax
__int64 v9; // rdx
CCCircleWaveDelegate *v10; // rcx
CCCircleWaveDelegate *v11; // rax
void *v12; // [rsp+48h] [rbp+10h]
void *v13; // [rsp+48h] [rbp+10h]
v2 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v12 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v12);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v2 = qword_1406C2ED8;
}
if ( !*(_BYTE *)(v2 + 917) )
{
v3 = CCCircleWave::create(70.0, 2.0, 0.30000001, 1, 1);
v3->m_color = a1->m_playerColor1;
v4 = v3->__vftable;
v5 = a1->getPosition_0(a1);
v4->setPosition_0(v3, v5);
a1->m_parentLayer->addChild_0(a1->m_parentLayer, v3, 0);
m_target = v3->m_target;
if ( m_target )
cocos2d::CCObject::release(m_target);
v3->m_target = a1;
cocos2d::CCObject::retain(a1);
cocos2d::CCNode::unschedule(v3, CCCircleWave::updatePosition);
v7 = v3->__vftable;
v8 = (__int64)v3->m_target->getPosition_0(v3->m_target);
v7->setPosition_0(v3, (const cocos2d::CCPoint *)v8);
v9 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v13 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v9 = qword_1406C2ED8;
}
v10 = *(CCCircleWaveDelegate **)(v9 + 520);
v11 = v10 + 1780;
if ( !v10 )
v11 = nullptr;
v3->m_delegate = v11;
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(*(_QWORD *)(v9 + 520) + 14520LL), v3);
v3->m_circleMode = Outline;
}
}