//
// PlayLayer::spawnFirework from 0x1000828b0 to 0x100082af3 (579 bytes)
//
// 1 xrefs:
// > PlayLayer::showCompleteText @ 0x1000824c5
//
// This function is hookable on this platform (idp: pc, 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:20:02 +0000
//
__int64 __fastcall PlayLayer::spawnFirework(
_QWORD *a1,
__int64 a2,
__int64 a3,
double a4,
__m128 a5,
double a6,
__m128 a7)
{
__int64 v8; // rax
__int64 v9; // r14
__int64 v10; // rdx
double v11; // xmm0_8
__int64 v12; // rax
__int64 v13; // rsi
__int64 v14; // rdi
__int64 v15; // rdx
__int64 v16; // rax
__int64 v17; // r14
__int64 v18; // rdx
double v19; // xmm0_8
__int64 v20; // rax
__int64 v21; // rsi
__m128 v22; // xmm0
__int64 v23; // rax
__int16 v24; // r12
char v25; // r13
__int64 v26; // rax
int v27; // eax
int v28; // eax
__int64 v29; // r15
__int64 v30; // r15
_BYTE v32[8]; // [rsp+0h] [rbp-50h] BYREF
__m128 v33; // [rsp+8h] [rbp-48h] BYREF
float v34[2]; // [rsp+18h] [rbp-38h] BYREF
float v35; // [rsp+20h] [rbp-30h]
float v36; // [rsp+24h] [rbp-2Ch]
GameManager::sharedState(a1, a2, a3);
v9 = v8;
*(_QWORD *)&v11 = GameManager::sharedState(a1, a2, v10).u64[0];
v13 = (unsigned int)(*(_DWORD *)(v12 + 824) - *(_DWORD *)(v12 + 828));
v14 = v9;
GameManager::colorForIdx(v9, v13, v11);
GameManager::sharedState(v9, v13, v15);
v17 = v16;
*(_QWORD *)&v19 = GameManager::sharedState(v14, v13, v18).u64[0];
v21 = (unsigned int)(*(_DWORD *)(v20 + 812) - *(_DWORD *)(v20 + 816));
v22 = GameManager::colorForIdx(v17, v21, v19);
v23 = a1[407];
a5.f32[0] = (float)(unsigned __int8)*(_WORD *)(v23 + 2602) / 255.0;
a7.f32[0] = (float)HIBYTE(*(unsigned __int16 *)(v23 + 2602)) / 255.0;
v24 = *(_WORD *)(v23 + 2605);
v25 = *(_BYTE *)(v23 + 2607);
v22.f32[0] = (float)*(unsigned __int8 *)(v23 + 2604) / 255.0;
v33 = _mm_movelh_ps(_mm_insert_ps(a5, a7, 16), _mm_blend_ps(v22, (__m128)xmmword_100A03610, 14));
v26 = cocos2d::CCDirector::sharedDirector(v17, v21);
cocos2d::CCDirector::getWinSize(v34, v26);
v35 = -50.0;
v36 = v34[0] + -50.0;
v36 = (float)((float)((float)rand() * 4.6566129e-10) * v36) + 50.0;
v35 = v35 + v34[1];
v27 = rand();
sub_100278250(v32, v36, (float)((float)((float)v27 * 4.6566129e-10) * v35) + 50.0);
v28 = rand();
v29 = CCCircleWave::create_1(1, 10.0, (float)((float)((float)v28 * 4.6566129e-10) * 15.0) + 35.0, 0.5);
*(_DWORD *)(v29 + 356) = 4;
*(_BYTE *)(v29 + 342) = v25;
*(_WORD *)(v29 + 340) = v24;
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v29 + 184LL))(v29, v32);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v29, 10);
v30 = cocos2d::CCParticleSystemQuad::create("firework.plist", 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v30 + 1584LL))(v30, 1);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v30, 13);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v30 + 184LL))(v30, v32);
(*(void (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v30 + 1360LL))(v30, &v33);
return (*(__int64 (__fastcall **)(__int64, __m128 *))(*(_QWORD *)v30 + 1392LL))(v30, &v33);
}