//
// cocos2d::CCMotionStreak::initWithFade from 0xd68534 to 0xd686d8 (420 bytes)
//
// 3 xrefs:
// > cocos2d::CCMotionStreak::create @ 0xd68724
// > cocos2d::CCMotionStreak::initWithFade @ 0xd687c0
// > ??> @ 0x71668
//
// 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 13:07:55 +0000
//
__int64 __fastcall cocos2d::CCMotionStreak::initWithFade(
cocos2d::CCScheduler **a1,
__int64 a2,
__int64 a3,
float a4,
float a5,
float a6)
{
float v9; // s1
float v10; // s1
__int64 v11; // x1
size_t v12; // x23
size_t v13; // x22
cocos2d::CCScheduler *v14; // x1
void (__fastcall *v15)(cocos2d::CCScheduler **, __int64); // x22
cocos2d::CCShaderCache *v16; // x0
__int64 v17; // x0
cocos2d::CCNode::setPosition((__int64)a1, flt_1560480);
(*((void (__fastcall **)(cocos2d::CCScheduler **, float *))*a1 + 37))(a1, flt_1560480);
(*((void (__fastcall **)(cocos2d::CCScheduler **, __int64))*a1 + 55))(a1, 1);
*((_BYTE *)a1 + 353) = 0;
*((_BYTE *)a1 + 354) = 1;
cocos2d::CCPoint::operator=((float *)a1 + 118, flt_1560480);
*((_BYTE *)a1 + 352) = 1;
v9 = a5;
if ( a5 == -1.0 )
v9 = a6 / 5.0;
*((_DWORD *)a1 + 98) = 0;
*((float *)a1 + 94) = a6;
*((float *)a1 + 96) = v9 * v9;
v10 = (float)(unsigned int)((int)(float)(a4 * 60.0) + 2) * 5.0;
*((float *)a1 + 95) = 1.0 / a4;
v11 = (unsigned int)v10;
*((_DWORD *)a1 + 97) = (unsigned int)v10;
v12 = 8 * v11;
v13 = 16 * v11;
a1[51] = (cocos2d::CCScheduler *)malloc(4 * v11);
a1[50] = (cocos2d::CCScheduler *)malloc(v12);
a1[52] = (cocos2d::CCScheduler *)malloc(v13);
a1[54] = (cocos2d::CCScheduler *)malloc(v13);
a1[53] = (cocos2d::CCScheduler *)malloc(v12);
v14 = *a1;
*((_DWORD *)a1 + 92) = 770;
*((_DWORD *)a1 + 93) = (unsigned int)&elf_hash_bucket[66] + 3;
v15 = *((void (__fastcall **)(cocos2d::CCScheduler **, __int64))v14 + 83);
v16 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache((cocos2d::CCShaderCache *)((char *)&elf_hash_bucket[66] + 3));
v17 = cocos2d::CCShaderCache::programForKey(v16, "ShaderPositionTextureColor");
v15(a1, v17);
(*((void (__fastcall **)(cocos2d::CCScheduler **, __int64))*a1 + 127))(a1, a3);
(*((void (__fastcall **)(cocos2d::CCScheduler **, __int64))*a1 + 120))(a1, a2);
cocos2d::CCNode::scheduleUpdate(a1);
return 1;
}