//
// cocos2d::CCNode::nodeToParentTransform from 0x7c3b10 to 0x7c3dec (732 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:23 +0000
//
cocos2d::CCNode *__fastcall cocos2d::CCNode::nodeToParentTransform(cocos2d::CCNode *this, int a2)
{
int *v4; // r5
float v5; // s12
float v6; // s15
float v7; // s14
float v8; // s13
float v9; // s15
float v10; // s14
float v11; // s19
int v12; // r3
float v13; // s20
float v14; // s14
float v15; // s16
float v16; // s17
float v17; // s22
float v18; // s18
float v19; // s16
float v20; // s16
float v21; // s12
float v22; // s11
int v23; // r9
float v24; // s14
float v25; // s15
int v26; // r1
int v27; // r2
int v28; // r3
int v29; // r1
float v30; // r10
float v31; // r0
int v32; // r1
int v33; // r2
int v34; // r3
int v35; // r1
int v36; // r1
int v37; // r2
int v38; // r3
int v39; // r1
int v40; // r1
int v41; // r2
int v42; // r3
int v43; // r1
int v44; // r0
int v45; // r1
int v46; // r2
int v47; // r3
_DWORD *v48; // r5
int v49; // r1
float v51; // s14
int v52; // [sp+10h] [bp-38h] BYREF
int v53; // [sp+14h] [bp-34h]
int v54; // [sp+18h] [bp-30h]
int v55; // [sp+1Ch] [bp-2Ch]
int v56; // [sp+20h] [bp-28h]
int v57; // [sp+24h] [bp-24h]
_BYTE v58[24]; // [sp+2Ch] [bp-1Ch] BYREF
v4 = (int *)(a2 + 136);
if ( *(_BYTE *)(a2 + 225) )
{
v11 = *(float *)(a2 + 72);
v12 = *(unsigned __int8 *)(a2 + 239);
v13 = *(float *)(a2 + 76);
*(float *)(a2 + 228) = v11;
*(float *)(a2 + 232) = v13;
if ( v12 )
{
v11 = v11 + *(float *)(a2 + 88);
v13 = v13 + *(float *)(a2 + 92);
}
v14 = *(float *)(a2 + 52);
v15 = *(float *)(a2 + 56);
if ( v14 == 0.0 && v15 == 0.0 )
{
v17 = 1.0;
v19 = 0.0;
v18 = 0.0;
v16 = 1.0;
}
else if ( v14 == v15 )
{
v16 = cosf(-(float)(0.017453 * v14));
v17 = v16;
v18 = sinf(-(float)(0.017453 * v14));
v19 = v18;
}
else
{
v20 = -(float)(0.017453 * v15);
v16 = cosf(-(float)(0.017453 * v14));
v18 = sinf(-(float)(0.017453 * v14));
v17 = cosf(v20);
v19 = sinf(v20);
}
v21 = *(float *)(a2 + 60);
v22 = *(float *)(a2 + 64);
if ( *(float *)(a2 + 80) == 0.0 && *(float *)(a2 + 84) == 0.0 )
{
v24 = *(float *)(a2 + 88);
v25 = *(float *)(a2 + 92);
if ( v24 != 0.0 || v25 != 0.0 )
{
v51 = -v24;
v11 = v11 + (float)((float)((float)(v18 * v25) * v22) + (float)((float)(v17 * v51) * v21));
v13 = v13 + (float)((float)((float)-(float)(v25 * v16) * v22) + (float)((float)(v19 * v51) * v21));
}
v23 = 0;
}
else
{
v23 = 1;
}
cocos2d::__CCAffineTransformMake((cocos2d *)&v52, v17 * v21, v19 * v21, -(float)(v18 * v22), v16 * v22, v11, v13);
v26 = v53;
v27 = v54;
v28 = v55;
*v4 = v52;
v4[1] = v26;
v4[2] = v27;
v4[3] = v28;
v29 = v57;
v4[4] = v56;
v4[5] = v29;
if ( v23 )
{
v30 = tanf(*(float *)(a2 + 84) * 0.017453);
v31 = tanf(*(float *)(a2 + 80) * 0.017453);
cocos2d::__CCAffineTransformMake((cocos2d *)v58, 1.0, v30, v31, 1.0, 0.0, 0.0);
cocos2d::CCAffineTransformConcat(&v52, v58, v4);
v32 = v53;
v33 = v54;
v34 = v55;
*v4 = v52;
v4[1] = v32;
v4[2] = v33;
v4[3] = v34;
v35 = v57;
v4[4] = v56;
v4[5] = v35;
if ( !cocos2d::CCPoint::equals((cocos2d::CCPoint *)(a2 + 88), (const cocos2d::CCPoint *)&unk_D2EFB8) )
{
cocos2d::CCAffineTransformTranslate(
&v52,
v4,
*(_DWORD *)(a2 + 88) ^ 0x80000000,
*(_DWORD *)(a2 + 92) ^ 0x80000000);
v36 = v53;
v37 = v54;
v38 = v55;
*v4 = v52;
v4[1] = v36;
v4[2] = v37;
v4[3] = v38;
v39 = v57;
v4[4] = v56;
v4[5] = v39;
}
}
if ( *(_BYTE *)(a2 + 237) )
{
cocos2d::CCAffineTransformConcat(&v52, v4, a2 + 112);
v40 = v53;
v41 = v54;
v42 = v55;
*v4 = v52;
v4[1] = v40;
v4[2] = v41;
v4[3] = v42;
v43 = v57;
v4[4] = v56;
v4[5] = v43;
*(_BYTE *)(a2 + 237) = 0;
}
*(_BYTE *)(a2 + 225) = 0;
goto LABEL_24;
}
if ( *(_BYTE *)(a2 + 226) )
{
v5 = *(float *)(a2 + 72);
v6 = *(float *)(a2 + 152);
v7 = v5 - *(float *)(a2 + 228);
v8 = *(float *)(a2 + 76);
*(float *)(a2 + 228) = v5;
v9 = v6 + v7;
v10 = *(float *)(a2 + 232);
*(float *)(a2 + 232) = v8;
*(float *)(a2 + 152) = v9;
*(float *)(a2 + 156) = *(float *)(a2 + 156) + (float)(v8 - v10);
LABEL_24:
*(_BYTE *)(a2 + 226) = 0;
}
v44 = *v4;
v45 = v4[1];
v46 = v4[2];
v47 = v4[3];
v48 = v4 + 4;
*(_DWORD *)this = v44;
*((_DWORD *)this + 1) = v45;
*((_DWORD *)this + 2) = v46;
*((_DWORD *)this + 3) = v47;
v49 = v48[1];
*((_DWORD *)this + 4) = *v48;
*((_DWORD *)this + 5) = v49;
return this;
}