//
// cocos2d::CCMotionStreak::initWithFade from 0x1005a3a30 to 0x1005a3bf2 (450 bytes)
//
// 3 xrefs:
// > cocos2d::CCMotionStreak::create_1 @ 0x1005a3821
// > cocos2d::CCMotionStreak::initWithFade_1 @ 0x1005a38bf
// > cocos2d::CCMotionStreak::create @ 0x1005a39df
//
// 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:32:34 +0000
//
char __fastcall cocos2d::CCMotionStreak::initWithFade(__int64 a1, __int64 a2, __int64 a3, float a4, float a5, float a6)
{
float v7; // xmm0_4
size_t v8; // r12
size_t v9; // r13
__int64 v10; // rax
__int64 v11; // rax
cocos2d::CCNode::setPosition_1(a1, &qword_100BE5810);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)a1 + 296LL))(a1, &qword_100BE5810);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 440LL))(a1, 1);
*(_WORD *)(a1 + 353) = 256;
sub_100278300((_QWORD *)(a1 + 472), &qword_100BE5810);
*(_BYTE *)(a1 + 352) = 1;
if ( a5 == -1.0 )
a5 = a6 / 5.0;
*(float *)(a1 + 384) = a5 * a5;
*(float *)(a1 + 376) = a6;
*(float *)(a1 + 380) = 1.0 / a4;
v7 = (float)((int)(float)(a4 * 60.0) + 2) * 5.0;
*(_QWORD *)(a1 + 388) = (unsigned int)(int)v7;
v8 = (unsigned int)(int)v7;
*(_QWORD *)(a1 + 408) = malloc(4 * v8);
v9 = 8 * v8;
*(_QWORD *)(a1 + 400) = malloc(8 * v8);
v8 *= 16LL;
*(_QWORD *)(a1 + 416) = malloc(v8);
*(_QWORD *)(a1 + 432) = malloc(v8);
*(_QWORD *)(a1 + 424) = malloc(v9);
*(_QWORD *)(a1 + 368) = 0x30300000302LL;
v10 = cocos2d::CCShaderCache::sharedShaderCache();
v11 = cocos2d::CCShaderCache::programForKey(v10, "ShaderPositionTextureColor");
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 664LL))(a1, v11);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1016LL))(a1, a3);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 960LL))(a1, a2);
cocos2d::CCNode::scheduleUpdate(a1);
return 1;
}