//
// GJBaseGameLayer::updateGradientLayers from 0x140327940 to 0x140328d09 (5065 bytes)
//
// 7 xrefs:
// > GJBaseGameLayer::update @ 0x140341c3a
// > GJBaseGameLayer::update @ 0x140341f00
// > LevelEditorLayer::updateEditor @ 0x1403f6151
// > LevelEditorLayer::onPlaytest @ 0x1403ff0f2
// > PlayLayer::resetLevel @ 0x140519639
// > ??> @ 0x1408b5c98
// > ??> @ 0x14091f028
//
// 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 11:30:28 +0000
//
void __fastcall GJBaseGameLayer::updateGradientLayers(__int64 a1)
{
__int64 v1; // rdi
__int64 v2; // rax
__int64 v3; // rax
__int64 v4; // rax
__int64 v5; // rax
float v6; // xmm1_4
float v7; // xmm0_4
float v8; // xmm7_4
float v9; // xmm6_4
__int64 v10; // rax
__int64 v11; // rax
float v12; // xmm6_4
float v13; // xmm7_4
float v14; // xmm1_4
float v15; // xmm8_4
float v16; // xmm8_4
__int64 v17; // rax
__int64 v18; // rax
__int64 v19; // rsi
__int64 v20; // rsi
__int64 i; // rax
_BYTE *v22; // rsi
__int64 v23; // rbx
double v24; // xmm0_8
float v25; // xmm6_4
__int64 v26; // rdx
__int64 ColorSprite; // rax
unsigned int v28; // r11d
__int64 v29; // rax
__int64 v30; // rcx
__int64 v31; // rax
__int64 v32; // rcx
__int64 v33; // rax
__int64 v34; // rax
float v35; // xmm9_4
float v36; // xmm9_4
__int64 v37; // rax
float v38; // xmm8_4
float v39; // xmm8_4
double v40; // xmm0_8
float v41; // xmm7_4
float v42; // xmm6_4
__int64 MainObject; // r13
__int64 v44; // r12
__int64 v45; // r14
__int64 v46; // r15
__int64 v47; // rax
__int64 v48; // rdi
__int64 v49; // rax
__int64 v50; // rbx
__int64 v51; // rax
__int64 v52; // rbx
__int64 v53; // rax
__int64 v54; // rax
__int64 v55; // rax
__int64 v56; // rax
__int64 v57; // rax
__int64 v58; // rax
__int64 v59; // rax
__int64 v60; // rax
__int64 v61; // rax
float v62; // xmm0_4
float v63; // xmm1_4
float v64; // xmm6_4
float v65; // xmm0_4
float v66; // xmm7_4
float v67; // xmm5_4
float v68; // xmm4_4
float v69; // xmm0_4
float v70; // xmm3_4
float v71; // xmm0_4
__int64 v72; // rax
__int64 v73; // rax
__int64 v74; // rax
__int64 v75; // rax
__int64 v76; // rax
__int64 v77; // rax
__int64 v78; // rax
__int64 v79; // rax
__int64 v80; // rax
__int64 v81; // rax
float v82; // xmm0_4
float v83; // xmm1_4
float v84; // xmm6_4
float v85; // xmm0_4
float v86; // xmm7_4
float v87; // xmm5_4
float v88; // xmm4_4
float v89; // xmm0_4
float v90; // xmm3_4
float v91; // xmm0_4
__int64 v92; // rdx
__int64 v93; // rax
int v94; // ecx
float v95; // [rsp+38h] [rbp-D0h] BYREF
float v96; // [rsp+3Ch] [rbp-CCh]
float v97; // [rsp+40h] [rbp-C8h] BYREF
float v98; // [rsp+44h] [rbp-C4h]
float v99; // [rsp+48h] [rbp-C0h] BYREF
float v100; // [rsp+4Ch] [rbp-BCh]
float v101; // [rsp+50h] [rbp-B8h] BYREF
float v102; // [rsp+54h] [rbp-B4h]
float v103; // [rsp+58h] [rbp-B0h] BYREF
float v104; // [rsp+5Ch] [rbp-ACh]
float v105; // [rsp+60h] [rbp-A8h] BYREF
float v106; // [rsp+64h] [rbp-A4h]
float v107; // [rsp+68h] [rbp-A0h] BYREF
float v108; // [rsp+6Ch] [rbp-9Ch]
float v109; // [rsp+70h] [rbp-98h] BYREF
float v110; // [rsp+74h] [rbp-94h]
float v111; // [rsp+78h] [rbp-90h] BYREF
float v112; // [rsp+7Ch] [rbp-8Ch]
float v113; // [rsp+80h] [rbp-88h] BYREF
float v114; // [rsp+84h] [rbp-84h]
float v115; // [rsp+88h] [rbp-80h] BYREF
float v116; // [rsp+8Ch] [rbp-7Ch]
float v117[2]; // [rsp+90h] [rbp-78h] BYREF
float v118; // [rsp+98h] [rbp-70h] BYREF
float v119; // [rsp+9Ch] [rbp-6Ch]
float v120[2]; // [rsp+A0h] [rbp-68h] BYREF
_BYTE v121[8]; // [rsp+A8h] [rbp-60h] BYREF
_DWORD v122[2]; // [rsp+B0h] [rbp-58h] BYREF
_DWORD v123[2]; // [rsp+B8h] [rbp-50h] BYREF
_BYTE v124[8]; // [rsp+C0h] [rbp-48h] BYREF
_BYTE v125[8]; // [rsp+C8h] [rbp-40h] BYREF
__int64 v126; // [rsp+D0h] [rbp-38h]
_BYTE v127[8]; // [rsp+D8h] [rbp-30h] BYREF
_BYTE v128[8]; // [rsp+E0h] [rbp-28h] BYREF
_BYTE v129[8]; // [rsp+E8h] [rbp-20h] BYREF
_BYTE v130[8]; // [rsp+F0h] [rbp-18h] BYREF
_BYTE v131[8]; // [rsp+F8h] [rbp-10h] BYREF
_BYTE v132[8]; // [rsp+100h] [rbp-8h] BYREF
_BYTE v133[8]; // [rsp+108h] [rbp+0h] BYREF
_BYTE v134[8]; // [rsp+110h] [rbp+8h] BYREF
_BYTE v135[8]; // [rsp+118h] [rbp+10h] BYREF
_BYTE v136[8]; // [rsp+120h] [rbp+18h] BYREF
_BYTE v137[8]; // [rsp+128h] [rbp+20h] BYREF
_BYTE v138[8]; // [rsp+130h] [rbp+28h] BYREF
_BYTE v139[8]; // [rsp+138h] [rbp+30h] BYREF
_BYTE v140[8]; // [rsp+140h] [rbp+38h] BYREF
_BYTE v141[8]; // [rsp+148h] [rbp+40h] BYREF
_BYTE v142[8]; // [rsp+150h] [rbp+48h] BYREF
_BYTE v143[8]; // [rsp+158h] [rbp+50h] BYREF
_BYTE v144[8]; // [rsp+160h] [rbp+58h] BYREF
__int128 v145; // [rsp+168h] [rbp+60h] BYREF
_BYTE v146[8]; // [rsp+178h] [rbp+70h] BYREF
_BYTE v147[8]; // [rsp+180h] [rbp+78h] BYREF
_BYTE v148[8]; // [rsp+188h] [rbp+80h] BYREF
_BYTE v149[8]; // [rsp+190h] [rbp+88h] BYREF
_BYTE v150[8]; // [rsp+198h] [rbp+90h] BYREF
_BYTE v151[8]; // [rsp+1A0h] [rbp+98h] BYREF
_BYTE v152[8]; // [rsp+1A8h] [rbp+A0h] BYREF
_BYTE v153[8]; // [rsp+1B0h] [rbp+A8h] BYREF
_BYTE v154[8]; // [rsp+1B8h] [rbp+B0h] BYREF
_BYTE v155[8]; // [rsp+1C0h] [rbp+B8h] BYREF
_BYTE v156[8]; // [rsp+1C8h] [rbp+C0h] BYREF
_BYTE v157[8]; // [rsp+1D0h] [rbp+C8h] BYREF
_BYTE v158[8]; // [rsp+1D8h] [rbp+D0h] BYREF
_BYTE v159[8]; // [rsp+1E0h] [rbp+D8h] BYREF
_BYTE v160[8]; // [rsp+1E8h] [rbp+E0h] BYREF
_BYTE v161[8]; // [rsp+1F0h] [rbp+E8h] BYREF
_BYTE v162[8]; // [rsp+1F8h] [rbp+F0h] BYREF
_BYTE v163[8]; // [rsp+200h] [rbp+F8h] BYREF
_BYTE v164[8]; // [rsp+208h] [rbp+100h] BYREF
_BYTE v165[8]; // [rsp+210h] [rbp+108h] BYREF
_BYTE v166[8]; // [rsp+218h] [rbp+110h] BYREF
_BYTE v167[8]; // [rsp+220h] [rbp+118h] BYREF
_BYTE v168[8]; // [rsp+228h] [rbp+120h] BYREF
unsigned __int16 v170; // [rsp+330h] [rbp+228h] BYREF
unsigned __int8 v171; // [rsp+332h] [rbp+22Ah]
unsigned __int16 v172; // [rsp+338h] [rbp+230h] BYREF
unsigned __int8 v173; // [rsp+33Ah] [rbp+232h]
char v174; // [rsp+340h] [rbp+238h] BYREF
v1 = a1;
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v99);
(*(float (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
v3 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(v3, &v170);
cocos2d::CCPoint::operator-(&v170, &v109);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, v99, v100);
cocos2d::CCPoint::operator*(v4, &v170);
cocos2d::CCPoint::operator+(&v109, &v111, &v170);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v172, v99, v100);
cocos2d::CCPoint::operator*(v5, &v170);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v118, (const struct cocos2d::CCPoint *)&v170);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, (const struct cocos2d::CCSize *)&v118);
cocos2d::CCPoint::operator*(&v170, &v172);
cocos2d::CCPoint::operator+(&v109, v121, &v172);
v6 = (float)(v119 * v119) + (float)(v118 * v118);
if ( v6 < 0.0 )
v7 = sqrtf(v6);
else
v7 = fsqrt(v6);
v8 = v7 * 0.5;
v9 = v7 * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, v9, v7 * 0.5);
cocos2d::CCPoint::operator-(v121, &v115, v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, v9, v8);
cocos2d::CCPoint::operator+(v121, &v113, v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, (const struct cocos2d::CCPoint *)&dword_14090AA70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v120, v99, v100);
if ( *(float *)(v1 + 804) != 0.0 )
{
v12 = v99;
v13 = v100;
v14 = (float)(v12 * v12) + (float)(v13 * v13);
if ( v14 < 0.0 )
v15 = sqrtf(v14);
else
v15 = fsqrt(v14);
v16 = v15 * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, (float)(v12 * 0.5) - v16, (float)(v13 * 0.5) - v16);
cocos2d::CCPoint::operator=(v117, v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v170, (float)(v99 * 0.5) + v16, (float)(v100 * 0.5) + v16);
cocos2d::CCPoint::operator=(v120, v18);
}
v110 = v110 + -20.0;
v109 = v109 + -20.0;
v112 = v112 + 20.0;
v111 = v111 + 20.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v124, -20.0, -20.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v125, v99 + 20.0, v100 + 20.0);
v19 = *(_QWORD *)(v1 + 12880);
*(_DWORD *)(v1 + 12888) = 0;
if ( v19 )
{
v20 = *(_QWORD *)(v19 + 56);
if ( v20 )
{
for ( i = *(_QWORD *)(v20 + 288); ; i = *(_QWORD *)(v126 + 288) )
{
v22 = *(_BYTE **)(v20 + 264);
v126 = i;
if ( !(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 504LL))(v22) )
goto LABEL_195;
v23 = *((_QWORD *)v22 + 73);
if ( !v23 )
goto LABEL_195;
if ( *(_DWORD *)(v23 + 1864) != *((_DWORD *)v22 + 151) )
{
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v22 + 520LL))(v22, 0);
*((_QWORD *)v22 + 73) = 0;
v22[592] = 0;
goto LABEL_195;
}
v24 = (*(double (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v1 + 1088LL))(v1, *((_QWORD *)v22 + 73));
v25 = *(float *)&v24;
if ( *(_BYTE *)(v1 + 12668) && *(_DWORD *)(v1 + 2204) != 1 )
v25 = *(float *)&v24 * *(float *)(v23 + 1888);
v26 = *((unsigned int *)v22 + 142);
if ( (_DWORD)v26 )
{
if ( (_DWORD)v26 == 1010 )
{
v172 = 0;
v173 = 0;
goto LABEL_26;
}
if ( (_DWORD)v26 != 1011 )
{
ColorSprite = GJEffectManager::getColorSprite(*(_QWORD *)(v1 + 2408), v26);
if ( ColorSprite )
{
v172 = *(_WORD *)(ColorSprite + 327);
v173 = *(_BYTE *)(ColorSprite + 329);
goto LABEL_26;
}
}
}
v173 = -1;
v172 = -1;
LABEL_26:
v28 = *((_DWORD *)v22 + 143);
if ( v28 )
{
if ( v28 == 1010 )
{
v170 = 0;
v171 = 0;
goto LABEL_34;
}
if ( v28 != 1011 )
{
v29 = GJEffectManager::getColorSprite(*(_QWORD *)(v1 + 2408), v28);
if ( v29 )
{
v170 = *(_WORD *)(v29 + 327);
v171 = *(_BYTE *)(v29 + 329);
}
else
{
v170 = -1;
v171 = -1;
}
goto LABEL_34;
}
}
v170 = -1;
v171 = -1;
LABEL_34:
v30 = *(_QWORD *)(v23 + 1104);
if ( v30
&& (*(float *)(v30 + 16) != *(float *)&dword_1408FE480
|| *(float *)(v30 + 20) != *(float *)&dword_1408FE484
|| *(float *)(v30 + 24) != *(float *)&dword_1408FE488
|| *(_WORD *)(v30 + 28) != (_WORD)dword_1408FE48C) )
{
v145 = *(_OWORD *)(v30 + 16);
v31 = GameToolbox::transformColor((__int64)&v174, &v172, (float *)&v145);
v172 = *(_WORD *)v31;
v173 = *(_BYTE *)(v31 + 2);
}
v32 = *(_QWORD *)(v23 + 1112);
if ( v32
&& (*(float *)(v32 + 16) != *(float *)&dword_1408FE480
|| *(float *)(v32 + 20) != *(float *)&dword_1408FE484
|| *(float *)(v32 + 24) != *(float *)&dword_1408FE488
|| *(_WORD *)(v32 + 28) != (_WORD)dword_1408FE48C) )
{
v145 = *(_OWORD *)(v32 + 16);
v33 = GameToolbox::transformColor((__int64)v127, &v170, (float *)&v145);
v170 = *(_WORD *)v33;
v171 = *(_BYTE *)(v33 + 2);
}
v34 = GJEffectManager::getColorSprite(*(_QWORD *)(v1 + 2408), *((unsigned int *)v22 + 142));
if ( v34 )
v35 = *(float *)(v34 + 320) / 255.0;
else
v35 = 1.0;
v36 = (float)(v35 * 255.0) * v25;
v37 = GJEffectManager::getColorSprite(*(_QWORD *)(v1 + 2408), *((unsigned int *)v22 + 143));
if ( v37 )
v38 = *(float *)(v37 + 320) / 255.0;
else
v38 = 1.0;
v39 = (float)(v38 * 255.0) * v25;
if ( v36 == 0.0 && v39 == 0.0
|| *((_DWORD *)v22 + 149) == 1
&& !(_BYTE)v172
&& __PAIR16__(HIBYTE(v172), 0) == v173
&& !(_BYTE)v170
&& __PAIR16__(HIBYTE(v170), 0) == v171 )
{
goto LABEL_194;
}
v40 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v23 + 360LL))(v23);
v41 = (float)-*(float *)&v40 * 0.017453292;
v42 = sinf(v41);
*(float *)&v40 = cosf(v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v128, *(float *)&v40, v42);
cocos2d::CCPoint::operator=(v22 + 576, v128);
MainObject = GJBaseGameLayer::tryGetMainObject(v1, *(unsigned int *)(v23 + 1868));
v44 = GJBaseGameLayer::tryGetMainObject(v1, *(unsigned int *)(v23 + 1872));
v45 = GJBaseGameLayer::tryGetMainObject(v1, *(unsigned int *)(v23 + 1876));
v46 = GJBaseGameLayer::tryGetMainObject(v1, *(unsigned int *)(v23 + 1880));
if ( *(_BYTE *)(v23 + 1884) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v95);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v107);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v105);
if ( v22[592] )
{
cocos2d::CCPoint::operator=(&v95, &v109);
cocos2d::CCPoint::operator=(&v103, &v111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v156, v95, v104);
cocos2d::CCPoint::operator=(&v107, v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, v103, v96);
cocos2d::CCPoint::operator=(&v105, v57);
if ( MainObject )
{
v58 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)MainObject + 1208LL))(MainObject, v158);
cocos2d::CCPoint::operator=(&v95, v58);
}
if ( v44 )
{
v59 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v44 + 1208LL))(v44, v159);
cocos2d::CCPoint::operator=(&v105, v59);
}
if ( v45 )
{
v60 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 1208LL))(v45, v160);
cocos2d::CCPoint::operator=(&v107, v60);
}
if ( v46 )
{
v61 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 1208LL))(v46, v168);
cocos2d::CCPoint::operator=(&v103, v61);
}
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 160LL))(v22);
(*(void (__fastcall **)(_BYTE *, float *))(*(_QWORD *)v22 + 184LL))(v22, &v95);
cocos2d::CCPoint::operator-(&v103, v131, &v95);
cocos2d::CCPoint::operator-(&v107, v132, &v95);
cocos2d::CCPoint::operator-(&v105, v133, &v95);
cocos2d::CCLayerColor::setVertices(v22, v133, v132, v131);
v62 = fminf(v107, v103);
if ( v62 <= v105 )
v63 = v62;
else
v63 = v105;
v64 = v95;
if ( v63 <= v95 )
{
if ( v62 > v105 )
v62 = v105;
}
else
{
v62 = v95;
}
if ( v62 > v113 )
goto LABEL_194;
v65 = fminf(v108, v104);
v66 = v65 <= v106 ? v65 : v106;
v67 = v96;
if ( v66 <= v96 )
{
if ( v65 > v106 )
v65 = v106;
}
else
{
v65 = v96;
}
if ( v65 > v114 )
goto LABEL_194;
v68 = fmaxf(v107, v103);
if ( v105 <= v68 )
v69 = v68;
else
v69 = v105;
if ( v95 <= v69 )
{
if ( v105 <= v68 )
v64 = v68;
else
v64 = v105;
}
if ( v115 > v64 )
goto LABEL_194;
v70 = fmaxf(v108, v104);
if ( v106 <= v70 )
v71 = v70;
else
v71 = v106;
if ( v96 <= v71 )
{
if ( v106 <= v70 )
v67 = v70;
else
v67 = v106;
}
if ( v116 > v67 )
goto LABEL_194;
}
else
{
cocos2d::CCPoint::operator=(&v95, v124);
cocos2d::CCPoint::operator=(&v103, v125);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v95, v104);
cocos2d::CCPoint::operator=(&v107, v72);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v163, v103, v96);
cocos2d::CCPoint::operator=(&v105, v73);
if ( MainObject )
{
v74 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)MainObject + 1208LL))(MainObject, v164);
cocos2d::CCPoint::operator=(&v95, v74);
}
if ( v44 )
{
v75 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v44 + 1208LL))(v44, v165);
cocos2d::CCPoint::operator=(&v105, v75);
}
if ( v45 )
{
v76 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 1208LL))(v45, v166);
cocos2d::CCPoint::operator=(&v107, v76);
}
if ( v46 )
{
v77 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 1208LL))(v46, v167);
cocos2d::CCPoint::operator=(&v103, v77);
}
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(&v95, v134);
v78 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v134, v138, v78);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(&v105, v135);
v79 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v135, v139, v79);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(&v103, v136);
v80 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v136, v141, v80);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(&v107, v137);
v81 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v137, v140, v81);
if ( MainObject )
cocos2d::CCPoint::operator=(&v95, v138);
if ( v44 )
cocos2d::CCPoint::operator=(&v105, v139);
if ( v45 )
cocos2d::CCPoint::operator=(&v107, v140);
if ( v46 )
cocos2d::CCPoint::operator=(&v103, v141);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 160LL))(v22);
(*(void (__fastcall **)(_BYTE *, float *))(*(_QWORD *)v22 + 184LL))(v22, &v95);
cocos2d::CCPoint::operator-(&v103, v142, &v95);
cocos2d::CCPoint::operator-(&v107, v143, &v95);
cocos2d::CCPoint::operator-(&v105, v144, &v95);
cocos2d::CCLayerColor::setVertices(v22, v144, v143, v142);
v82 = fminf(v107, v103);
if ( v82 <= v105 )
v83 = v82;
else
v83 = v105;
v84 = v95;
if ( v83 <= v95 )
{
if ( v82 > v105 )
v82 = v105;
}
else
{
v82 = v95;
}
if ( v82 > v120[0] )
goto LABEL_194;
v85 = fminf(v108, v104);
v86 = v85 <= v106 ? v85 : v106;
v87 = v96;
if ( v86 <= v96 )
{
if ( v85 > v106 )
v85 = v106;
}
else
{
v85 = v96;
}
if ( v85 > v120[1] )
goto LABEL_194;
v88 = fmaxf(v107, v103);
if ( v105 <= v88 )
v89 = v88;
else
v89 = v105;
if ( v95 <= v89 )
{
if ( v105 <= v88 )
v84 = v88;
else
v84 = v105;
}
if ( v117[0] > v84 )
goto LABEL_194;
v90 = fmaxf(v108, v104);
if ( v106 <= v90 )
v91 = v90;
else
v91 = v106;
if ( v96 <= v91 )
{
if ( v106 <= v90 )
v87 = v90;
else
v87 = v106;
}
if ( v117[1] > v87 )
goto LABEL_194;
}
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v154, (const struct cocos2d::CCPoint *)&dword_14090AA70);
v48 = v47;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v146, (const struct cocos2d::CCPoint *)&dword_14090AA70);
v50 = v49;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v147, (const struct cocos2d::CCPoint *)&dword_14090AA70);
cocos2d::CCLayerColor::setVertices(v22, v51, v50, v48);
v52 = *(_QWORD *)v22;
v53 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 320LL))(v22);
(*(void (__fastcall **)(_BYTE *, __int64))(v52 + 312))(v22, v53);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v97);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101);
if ( v22[592] )
{
cocos2d::CCPoint::operator=(&v97, &v109);
cocos2d::CCPoint::operator=(&v101, &v111);
if ( v44 )
v98 = *(float *)((*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v44 + 1208LL))(v44, v148) + 4);
if ( v45 )
v97 = *(float *)(*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 1208LL))(v45, v149);
if ( MainObject )
v102 = *(float *)((*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)MainObject + 1208LL))(
MainObject,
v150)
+ 4);
if ( v46 )
v101 = *(float *)(*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 1208LL))(v46, v151);
(*(void (__fastcall **)(_BYTE *, float *))(*(_QWORD *)v22 + 184LL))(v22, &v97);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 120LL))(v22);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 136LL))(v22);
if ( v97 > v113 || v98 > v114 )
{
v1 = a1;
LABEL_194:
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v22 + 336LL))(v22, 0);
goto LABEL_195;
}
v1 = a1;
if ( v115 > v101 || v116 > v102 )
goto LABEL_194;
}
else
{
cocos2d::CCPoint::operator=(&v97, v124);
cocos2d::CCPoint::operator=(&v101, v125);
if ( v44 )
v98 = *(float *)((*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v44 + 1208LL))(v44, v152) + 4);
if ( v45 )
v97 = *(float *)(*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v45 + 1208LL))(v45, v153);
if ( MainObject )
v102 = *(float *)((*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)MainObject + 1208LL))(
MainObject,
v161)
+ 4);
if ( v46 )
v101 = *(float *)(*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 1208LL))(v46, v155);
v1 = a1;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 4296) + 168LL))(*(_QWORD *)(a1 + 4296));
cocos2d::CCPoint::operator*(&v97, v129);
v54 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v129, v122, v54);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 168LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator*(&v101, v130);
v55 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 4296) + 200LL))(*(_QWORD *)(v1 + 4296));
cocos2d::CCPoint::operator+(v130, v123, v55);
if ( v44 )
v98 = *(float *)&v122[1];
if ( v45 )
v97 = *(float *)v122;
if ( MainObject )
v102 = *(float *)&v123[1];
if ( v46 )
v101 = *(float *)v123;
(*(void (__fastcall **)(_BYTE *, float *))(*(_QWORD *)v22 + 184LL))(v22, &v97);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 120LL))(v22);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 136LL))(v22);
if ( v97 > v99 || v98 > v100 || v101 < 0.0 || v102 < 0.0 )
goto LABEL_194;
}
}
cocos2d::CCLayerGradient::setValues(
(cocos2d::CCLayerGradient *)v22,
(const struct cocos2d::_ccColor3B *)&v172,
(int)v36,
(const struct cocos2d::_ccColor3B *)&v170,
(int)v39,
(const struct cocos2d::CCPoint *)(v22 + 576));
LOBYTE(v92) = 1;
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v22 + 336LL))(v22, v92);
++*(_DWORD *)(v1 + 12888);
if ( *((_DWORD *)v22 + 149) == 3 )
{
if ( (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v22 + 504LL))(v22) )
{
v93 = *(_QWORD *)(v1 + 12896);
if ( v93 )
{
if ( *(_BYTE *)(v93 + 1126) )
{
v94 = *((_DWORD *)v22 + 150);
if ( *(_DWORD *)(v93 + 1116) <= v94 && *(_DWORD *)(v93 + 1120) >= v94 && v94 < 15 )
goto LABEL_194;
}
}
}
}
LABEL_195:
v20 = v126;
if ( !v126 )
return;
}
}
}
}