//
// CreateParticlePopup::onDuplicateColor from 0x1002ce37c to 0x1002ce4c8 (332 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::init @ 0x1002cba24
//
// 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 CreateParticlePopup::onDuplicateColor(CreateParticlePopup *a1, cocos2d::CCObject *a2)
{
float *v3; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
cocos2d::CCSprite *m_endColorSprite; // x8
int32x2_t v8; // d0
__int16 v9; // w9
__int16 v10; // [xsp+Ch] [xbp-14h] BYREF
__int8 v11; // [xsp+Eh] [xbp-12h]
v3 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *, cocos2d::CCObject *))a1->m_particle->getStartColor)(
a1->m_particle,
a2);
CreateParticlePopup::updateParticleValueForType(a1, *v3, EndR, nullptr);
v4 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
CreateParticlePopup::updateParticleValueForType(a1, *(float *)(v4 + 4), EndG, nullptr);
v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
CreateParticlePopup::updateParticleValueForType(a1, *(float *)(v5 + 8), EndB, nullptr);
CreateParticlePopup::updateInputNodeStringForType(a1, EndR);
CreateParticlePopup::updateInputNodeStringForType(a1, EndG);
CreateParticlePopup::updateInputNodeStringForType(a1, EndB);
CreateParticlePopup::updateSliderForType(a1, EndR);
CreateParticlePopup::updateSliderForType(a1, EndG);
CreateParticlePopup::updateSliderForType(a1, EndB);
v6 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);
m_endColorSprite = a1->m_endColorSprite;
v8 = (int32x2_t)vshl_u32(
(uint32x2_t)vcvt_s32_f32(vmul_f32(*(float32x2_t *)(v6 + 4), (float32x2_t)vdup_n_s32(0x437F0000u))),
(uint32x2_t)0x1000000008LL);
v8.i32[0] = vorr_s8((int8x8_t)vdup_lane_s32(v8, 1), (int8x8_t)v8).u32[0];
v9 = v8.i16[0] | (int)(float)(*(float *)v6 * 255.0);
v11 = v8.i8[2];
v10 = v9;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))m_endColorSprite->setColor)(m_endColorSprite, &v10);
}