//
// GravityEffectSprite::init from 0x10014c894 to 0x10014ca98 (516 bytes)
//
// 2 xrefs:
// > GravityEffectSprite::create @ 0x10013ebf4
// > ??> @ 0x1008dfcb8
//
// 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:37 +0000
//
__int64 __fastcall GravityEffectSprite::init(__int64 a1)
{
__int64 v2; // x19
__int64 v3; // x21
__int64 v4; // x0
__int64 v5; // x0
float v6; // s8
__int64 v7; // x0
__int64 v8; // x0
double v9; // d0
float v10; // s10
__int64 v11; // x0
__int64 v12; // x0
double v13; // d0
unsigned int v14; // w23
float v15; // s15
__int64 v16; // x22
__int64 v17; // x0
__int64 v18; // x0
double v19; // d0
float v20; // s9
unsigned int v21; // w0
unsigned int v22; // w0
unsigned int v23; // w0
unsigned int v24; // w0
float v26; // [xsp+8h] [xbp-78h] BYREF
v2 = cocos2d::CCSprite::init(a1);
if ( (_DWORD)v2 )
{
v3 = cocos2d::CCSpriteBatchNode::create("gravityLine_001.png", 22);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 72LL))(v3, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v3);
v4 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 912LL))(v3, 0x100000302LL);
v5 = cocos2d::CCDirector::sharedDirector(v4);
v6 = sub_100207B64(v5);
v8 = cocos2d::CCDirector::sharedDirector(v7);
v9 = sub_100207EB0(v8);
v10 = (float)(v6 * 480.0) / *(float *)&v9;
v12 = cocos2d::CCDirector::sharedDirector(v11);
v13 = sub_100207EB0(v12);
v14 = 0;
v15 = (float)(*(float *)&v13 + -60.0) / 22.0;
do
{
v16 = cocos2d::CCSprite::create("gravityLine_001.png");
v17 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 456LL))(v3, v16);
v18 = cocos2d::CCDirector::sharedDirector(v17);
v19 = sub_100207EB0(v18);
v20 = (float)((float)((float)(*(float *)&v19 * -0.5) + 30.0) + (float)((float)v14 * v15))
+ (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * v15);
v21 = rand();
sub_1000262BC(&v26, v20, (float)((float)(vcvts_n_f32_s32(v21, 0x1Fu) * 2.0) + -1.0) * 10.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v16 + 184LL))(v16, &v26);
v22 = rand();
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v16 + 128LL))(
v16,
v10 * (float)((float)(vcvts_n_f32_s32(v22, 0x1Fu) * 4.0) + 2.0));
v23 = rand();
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v16 + 144LL))(
v16,
v6 * (float)(vcvts_n_f32_s32(v23, 0x1Fu) + 2.0));
v24 = rand();
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v16 + 912LL))(
v16,
(unsigned int)(int)(float)((float)(vcvts_n_f32_s32(v24, 0x1Fu) * 130.0) + 50.0));
++v14;
}
while ( v14 != 22 );
}
return v2;
}