//
// PlayLayer::spawnFirework from 0x100143bd0 to 0x100143dd8 (520 bytes)
//
// 1 xrefs:
// > PlayLayer::showCompleteText @ 0x100143b14
//
// This function is hookable on this platform (idp: arm, 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 10:59:33 +0000
//
__int64 __fastcall PlayLayer::spawnFirework(_QWORD *a1)
{
__int64 v2; // x20
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x20
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x8
int8x8_t v9; // d3
__int16 v10; // w21
char v11; // w22
__int64 v12; // x0
float v13; // s8
float v14; // s9
unsigned int v15; // w0
unsigned int v16; // w0
__int64 v17; // x20
__int64 v18; // x20
float v20; // [xsp+0h] [xbp-60h] BYREF
__int64 v21; // [xsp+8h] [xbp-58h] BYREF
float32x2_t v22; // [xsp+10h] [xbp-50h] BYREF
float v23; // [xsp+18h] [xbp-48h]
int v24; // [xsp+1Ch] [xbp-44h]
v2 = GameManager::sharedState(a1);
v3 = GameManager::sharedState(v2);
v4 = GameManager::colorForIdx(v2, (unsigned int)(*(_DWORD *)(v3 + 824) - *(_DWORD *)(v3 + 828)));
v5 = GameManager::sharedState(v4);
v6 = GameManager::sharedState(v5);
v7 = GameManager::colorForIdx(v5, (unsigned int)(*(_DWORD *)(v6 + 812) - *(_DWORD *)(v6 + 816)));
v8 = a1[407];
v9.i16[0] = *(_WORD *)(v8 + 2602);
v9.i8[2] = *(_BYTE *)(v8 + 2604);
v9.i32[1] = (unsigned __int32)v9.i32[0] >> 8;
v10 = *(_WORD *)(v8 + 2605);
v11 = *(_BYTE *)(v8 + 2607);
v22 = vdiv_f32(vcvt_f32_u32((uint32x2_t)vand_s8(v9, (int8x8_t)0xFF000000FFLL)), (float32x2_t)vdup_n_s32(0x437F0000u));
v23 = (float)v9.u8[2] / 255.0;
v24 = 1065353216;
v12 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(&v21, v12);
v13 = (float)((float)(*(float *)&v21 + -50.0) * vcvts_n_f32_s32(rand(), 0x1Fu)) + 50.0;
v14 = *((float *)&v21 + 1) + -50.0;
v15 = rand();
sub_1000262BC(&v20, v13, (float)(v14 * vcvts_n_f32_s32(v15, 0x1Fu)) + 50.0);
v16 = rand();
v17 = CCCircleWave::create_1(1, 10.0, (float)(vcvts_n_f32_s32(v16, 0x1Fu) * 15.0) + 35.0, 0.5);
*(_DWORD *)(v17 + 356) = 4;
*(_BYTE *)(v17 + 342) = v11;
*(_WORD *)(v17 + 340) = v10;
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v17 + 184LL))(v17, &v20);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v17, 10);
v18 = cocos2d::CCParticleSystemQuad::create("firework.plist", 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 1584LL))(v18, 1);
(*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v18, 13);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v18 + 184LL))(v18, &v20);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v18 + 1360LL))(v18, &v22);
return (*(__int64 (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v18 + 1392LL))(v18, &v22);
}