//
// PlayLayer::spawnFirework from 0x1000b5010 to 0x1000b5253 (579 bytes)
//
// 1 xrefs:
// > PlayLayer::showCompleteText @ 0x1000b4c25
//
// 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 __fastcall PlayLayer::spawnFirework(PlayLayer *a1)
{
__m128 v1; // xmm0
__m128 v2; // xmm1
__m128 v3; // xmm3
GameManager *v5; // r14
GameManager *v6; // rax
GameManager *v7; // r14
GameManager *v8; // rax
PlayerObject *m_player1; // rax
__int16 v10; // r12
GLubyte b; // r13
int v12; // eax
int v13; // eax
CCCircleWave *v14; // r15
cocos2d::CCParticleSystemQuad *v15; // r15
_BYTE v16[8]; // [rsp+0h] [rbp-50h] BYREF
__m128 v17; // [rsp+8h] [rbp-48h] BYREF
float v18[2]; // [rsp+18h] [rbp-38h] BYREF
float v19; // [rsp+20h] [rbp-30h]
float v20; // [rsp+24h] [rbp-2Ch]
v5 = GameManager::sharedState();
v6 = GameManager::sharedState();
GameManager::colorForIdx(v5, v6->m_playerColor2.random - v6->m_playerColor2.seed);
v7 = GameManager::sharedState();
v8 = GameManager::sharedState();
GameManager::colorForIdx(v7, v8->m_playerColor.random - v8->m_playerColor.seed);
m_player1 = a1->m_player1;
v2.f32[0] = (float)(unsigned __int8)*(_WORD *)&m_player1->m_playerColor1.r / 255.0;
v3.f32[0] = (float)HIBYTE(*(unsigned __int16 *)&m_player1->m_playerColor1.r) / 255.0;
v10 = *(_WORD *)&m_player1->m_playerColor2.r;
b = m_player1->m_playerColor2.b;
v1.f32[0] = (float)m_player1->m_playerColor1.b / 255.0;
v17 = _mm_movelh_ps(_mm_insert_ps(v2, v3, 16), _mm_blend_ps(v1, (__m128)xmmword_1008150D0, 14));
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v18);
v19 = -50.0;
v20 = v18[0] + -50.0;
v20 = (float)((float)((float)rand() * 4.6566129e-10) * v20) + 50.0;
v19 = v19 + v18[1];
v12 = rand();
sub_10028CBE0(v16, v20, (float)((float)((float)v12 * 4.6566129e-10) * v19) + 50.0);
v13 = rand();
v14 = CCCircleWave::create_1(10.0, (float)((float)((float)v13 * 4.6566129e-10) * 15.0) + 35.0, 0.5, 1);
v14->m_lineWidth = 4;
v14->m_color.b = b;
*(_WORD *)&v14->m_color.r = v10;
((void (__fastcall *)(CCCircleWave *, _BYTE *))v14->setPosition)(v14, v16);
((void (__fastcall *)(PlayLayer *, CCCircleWave *, __int64))a1->addChild_0)(a1, v14, 10);
v15 = cocos2d::CCParticleSystemQuad::create("firework.plist", 0);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64))v15->setAutoRemoveOnFinish)(v15, 1);
((void (__fastcall *)(PlayLayer *, cocos2d::CCParticleSystemQuad *, __int64))a1->addChild_0)(a1, v15, 13);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _BYTE *))v15->setPosition)(v15, v16);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v15->setStartColor)(v15, &v17);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __m128 *))v15->setEndColor)(v15, &v17);
}