//
// DeathMarkerLayer::init from 0x76c808 to 0x76d818 (4112 bytes)
//
// 1 xrefs:
// > DeathMarkerLayer::create @ 0x76d916
//
// 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 11:59:13 +0000
//
DeathMarkerLayer *__fastcall DeathMarkerLayer::init(
int *a1,
int *a2,
int a3,
int a4,
char a5,
float *a6,
unsigned int a7,
int a8,
float a9,
float a10,
float a11,
int a12,
int a13,
int a14,
char a15,
char a16)
{
DeathMarkerLayer *v18; // r0
cocos2d::CCSpriteFrameCache *v19; // r0
cocos2d::CCSpriteFrameCache *v20; // r0
cocos2d::CCSpriteFrame *v21; // r0
cocos2d::CCSpriteBatchNode *Texture; // r0
unsigned int v23; // r2
int v24; // r0
int v25; // r3
cocos2d::CCNode *v26; // r0
cocos2d::CCObject *v27; // r0
int v28; // r6
unsigned int v29; // r0
int v30; // r2
int v31; // r7
unsigned int v32; // r4
int v33; // r5
int v34; // r3
int v35; // r3
int v36; // r1
int v37; // r2
int v38; // r1
int v39; // r1
int v40; // r1
int v41; // r1
int v42; // r1
int v43; // r3
int v44; // r3
int v45; // r3
int v46; // r1
int v47; // r3
unsigned int v48; // r2
unsigned int v49; // r1
signed int v50; // r2
float v51; // s12
signed int v52; // r4
int v53; // r3
float v54; // s15
float v55; // s13
float v56; // s15
unsigned int v57; // s15
int i; // r5
int j; // r3
signed int v60; // r3
int k; // r11
float v62; // s19
int v63; // r7
int v64; // r12
float v65; // s17
int m; // r6
int v67; // r3
int v68; // r5
int v69; // r3
int v70; // r5
int v71; // r3
unsigned int v72; // r5
unsigned int v73; // r3
int v74; // r2
_DWORD *v75; // r1
_DWORD *n; // r8
unsigned int v77; // r0
int v78; // r1
unsigned int v79; // r3
int v80; // lr
int v81; // r1
signed int v82; // r6
int v83; // r7
int v84; // r5
int v85; // r3
int v86; // r3
int v87; // r2
int v88; // r3
GameManager *v89; // r0
signed int ii; // r5
_DWORD *v91; // r7
int v92; // r2
int v93; // r3
int v94; // r2
int v95; // r2
_DWORD *v96; // r0
int *v97; // r2
int v98; // r2
int kk; // r5
int mm; // r6
_DWORD *v101; // r7
unsigned int nn; // r4
int v103; // r2
int v104; // r2
int v105; // r2
int v106; // r4
int v107; // r5
int v108; // s15
int v109; // r0
int v110; // r3
unsigned int v111; // r4
int v112; // r3
int v113; // r2
char **p_jj; // r0
char *v115; // r7
int *v116; // r6
int v117; // r4
int *v118; // r5
int v119; // r3
int v120; // r7
int *v121; // r6
int v122; // r4
int *v123; // r5
int v124; // r3
GameManager *v125; // r0
float v126; // s14
int v127; // r5
float v128; // s17
int v129; // r3
float v130; // s17
GameManager *v131; // r0
float v132; // s16
int v133; // r6
unsigned int v134; // r9
int v135; // r4
unsigned int v136; // r7
unsigned int v137; // r8
float v138; // s16
int i1; // r6
int v140; // r7
int v141; // r0
float v142; // s18
int v143; // s15
float v144; // s15
float v145; // s18
int v146; // r11
float v147; // r2
cocos2d::CCEaseElasticOut *v148; // r0
float v149; // r2
float v150; // r1
cocos2d::CCFiniteTimeAction *v151; // r9
cocos2d::CCNode *v152; // r8
cocos2d::CCSequence *v153; // r11
cocos2d::CCFiniteTimeAction *v154; // r0
cocos2d::CCAction *v155; // r0
int v156; // r0
cocos2d::CCSequence *v157; // r0
cocos2d::CCNode *v158; // r7
float v159; // r1
cocos2d::CCSequence *v160; // r8
float v161; // r1
cocos2d::CCEaseElasticOut *v162; // r0
float v163; // r2
cocos2d::CCFiniteTimeAction *v164; // r0
cocos2d::CCAction *v165; // r0
int v166; // r3
float v167; // s16
int v168; // r0
_BYTE *v169; // r4
float v170; // r1
cocos2d::CCNode *v171; // r5
float v173; // s15
float v174; // s15
int v175; // r2
float v176; // s14
int *v177; // r3
int v178; // r0
cocos2d::CCSequence *v179; // r11
int v180; // r9
int v181; // r6
int v182; // r0
cocos2d::CCAction *v183; // r0
cocos2d::CCSequence *v184; // r4
cocos2d::CCFiniteTimeAction *v185; // r0
cocos2d::CCAction *v186; // r0
int v187; // r3
unsigned __int8 v188; // [sp+0h] [bp-ECh]
unsigned __int8 v189; // [sp+0h] [bp-ECh]
unsigned __int8 v190; // [sp+0h] [bp-ECh]
unsigned __int8 v191; // [sp+0h] [bp-ECh]
cocos2d::CCFiniteTimeAction *v193; // [sp+8h] [bp-E4h]
cocos2d::CCRect *v194; // [sp+Ch] [bp-E0h]
int v195; // [sp+10h] [bp-DCh]
int v196; // [sp+10h] [bp-DCh]
unsigned int v197; // [sp+10h] [bp-DCh]
cocos2d::CCRect *v198; // [sp+14h] [bp-D8h]
cocos2d::CCRect *v199; // [sp+14h] [bp-D8h]
int v200; // [sp+18h] [bp-D4h]
DeathMarkerLayer *v201; // [sp+1Ch] [bp-D0h]
__int16 v203; // [sp+44h] [bp-A8h]
unsigned __int8 v204; // [sp+46h] [bp-A6h]
int v205; // [sp+48h] [bp-A4h] BYREF
int *v206; // [sp+4Ch] [bp-A0h] BYREF
int v207[5]; // [sp+50h] [bp-9Ch] BYREF
char *v208; // [sp+64h] [bp-88h] BYREF
char *v209; // [sp+68h] [bp-84h]
char *v210; // [sp+6Ch] [bp-80h]
char *v211; // [sp+70h] [bp-7Ch] BYREF
char *v212; // [sp+74h] [bp-78h]
char *v213; // [sp+78h] [bp-74h]
char *v214; // [sp+7Ch] [bp-70h] BYREF
int *v215; // [sp+80h] [bp-6Ch]
int *v216; // [sp+84h] [bp-68h]
int jj; // [sp+88h] [bp-64h] BYREF
cocos2d::CCPoint *v218; // [sp+8Ch] [bp-60h]
cocos2d::CCPoint *v219; // [sp+90h] [bp-5Ch]
unsigned __int8 v220[4]; // [sp+9Ch] [bp-50h] BYREF
unsigned int v221; // [sp+A0h] [bp-4Ch]
int v222; // [sp+A4h] [bp-48h]
int v223; // [sp+A8h] [bp-44h]
int v224; // [sp+ACh] [bp-40h]
int v225; // [sp+B0h] [bp-3Ch]
int v226; // [sp+B4h] [bp-38h]
int v227; // [sp+B8h] [bp-34h]
int v228; // [sp+BCh] [bp-30h]
float v229; // [sp+C0h] [bp-2Ch]
float v230; // [sp+C4h] [bp-28h]
int v231; // [sp+C8h] [bp-24h]
int v232; // [sp+CCh] [bp-20h]
int v233; // [sp+D0h] [bp-1Ch]
int v234; // [sp+D4h] [bp-18h]
int v235; // [sp+D8h] [bp-14h]
int v236; // [sp+DCh] [bp-10h]
int v237; // [sp+E0h] [bp-Ch]
v18 = (DeathMarkerLayer *)cocos2d::CCNode::init((cocos2d::CCNode *)a1);
v201 = v18;
if ( !v18 )
return nullptr;
a1[88] = a12;
*((_BYTE *)a1 + 324) = a4;
*((_BYTE *)a1 + 325) = a15;
*((_WORD *)a1 + 163) = a3;
*((_BYTE *)a1 + 328) = BYTE2(a3);
*((_BYTE *)a1 + 348) = a5;
*((_BYTE *)a1 + 349) = a16;
v19 = (cocos2d::CCSpriteFrameCache *)DeathMarkerLayer::timescale(v18);
a1[84] = (int)v19;
v20 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v19);
v21 = (cocos2d::CCSpriteFrame *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v20, "deathMarker_bg_001.png");
v198 = v21;
if ( !v21 )
return nullptr;
Texture = (cocos2d::CCSpriteBatchNode *)cocos2d::CCSpriteFrame::getTexture(v21);
v24 = cocos2d::CCSpriteBatchNode::createWithTexture(Texture, (cocos2d::CCTexture2D *)((char *)&dword_1C + 1), v23);
v25 = *a1;
a1[79] = v24;
v26 = (cocos2d::CCNode *)(*(int (__fastcall **)(int *, int, _DWORD))(v25 + 232))(a1, v24, 0);
v27 = (cocos2d::CCObject *)cocos2d::CCNode::create(v26);
a1[80] = (int)v27;
cocos2d::CCObject::retain(v27);
if ( a14 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)a14 + 228))(a14, a1[80]);
else
(*(void (__fastcall **)(int *, int, int))(*a1 + 232))(a1, a1[80], 2);
v28 = a13;
if ( a13 < 3 )
v28 = 3;
v29 = ((a2[1] - *a2) >> 2) / (unsigned int)v28;
v30 = a1[66];
if ( v29 > 954437177 * ((a1[68] - v30) >> 3) )
{
std::__split_buffer::__split_buffer(
v220,
((a2[1] - *a2) >> 2) / (unsigned int)v28,
954437177 * ((a1[67] - v30) >> 3),
(int)(a1 + 68));
std::vector::__swap_out_circular_buffer((const cocos2d::CCPoint **)a1 + 66, v220);
v29 = std::__split_buffer::~__split_buffer((int)v220);
}
v31 = 32;
v32 = 0;
v195 = 1;
while ( 1 )
{
v32 += v28;
if ( v32 > (a2[1] - *a2) >> 2 )
break;
v33 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v220);
v229 = 0.0;
v231 = 1065353216;
v230 = 0.0;
v34 = *a2;
v222 = 0;
v223 = 0;
v224 = 0;
v225 = 0;
v226 = 0;
v227 = 0;
v228 = 0;
v232 = 0;
v233 = 0;
v234 = 0;
v235 = 0;
v236 = 0;
v237 = 0;
v222 = *(_DWORD *)(v34 + 4 * (v32 + 0x3FFFFFFF * v28));
v223 = *(_DWORD *)(v34 + v31 - 28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&jj, (float)(10 * v222) + 5.0, (float)(10 * v223) + 5.0);
cocos2d::CCPoint::operator=(v220, &jj);
v35 = *a2;
v36 = *a2 + v31;
v37 = *(_DWORD *)(v36 - 24);
v224 = v37;
if ( v28 <= 4 )
{
v38 = 0;
}
else
{
v33 = *(_DWORD *)(v36 - 20);
v38 = v35 + v31;
}
v225 = v33;
if ( v28 > 4 )
v38 = *(_DWORD *)(v38 - 16);
v226 = v38;
if ( v28 <= 5 )
v39 = 0;
else
v39 = v35 + v31;
if ( v28 > 5 )
v39 = *(_DWORD *)(v39 - 12);
v227 = v39;
if ( v28 <= 6 || (v40 = *(_DWORD *)(v35 + v31 - 8), v40 <= 0) )
{
v40 = 0;
}
else if ( v40 >= 5 )
{
v40 = 5;
}
v233 = v40;
if ( v28 <= 7 )
{
v42 = 0;
}
else
{
v41 = *(_DWORD *)(v35 + v31 - 4);
if ( v41 > 1 )
v42 = 2;
else
v42 = v41 == 1;
}
v234 = v42;
if ( v28 <= 8 )
{
v44 = 0;
}
else
{
v43 = *(_DWORD *)(v35 + v31);
if ( v43 > 1 )
v44 = 2;
else
v44 = v43 == 1;
}
v235 = v44;
if ( a7 != 0x80000000 )
{
v46 = v223 - a8;
if ( v222 == a7 && !v46 )
v47 = 4;
else
v47 = (int)(v46 * v46 + (v222 - a7) * (v222 - a7)) <= 36;
v232 = v47;
}
v45 = v195;
v29 = a1[67];
if ( v195 < v37 )
v45 = v37;
v195 = v45;
if ( v29 == a1[68] )
{
v48 = 954437177 * ((int)(v29 - a1[66]) >> 3);
v49 = v48 + 1;
if ( v48 + 1 > 0x38E38E3 )
sub_38AC30();
if ( v48 > 0x1C71C70 )
{
v49 = 59652323;
}
else if ( v49 < 1908874354 * ((int)(v29 - a1[66]) >> 3) )
{
v49 = 1908874354 * ((int)(v29 - a1[66]) >> 3);
}
std::__split_buffer::__split_buffer(&jj, v49, v48, (int)(a1 + 68));
if ( v219 )
DeathMarkerLayer::DMCell::DMCell(v219, (const cocos2d::CCPoint *)v220);
v219 = (cocos2d::CCPoint *)((char *)v219 + 72);
std::vector::__swap_out_circular_buffer((const cocos2d::CCPoint **)a1 + 66, &jj);
v29 = std::__split_buffer::~__split_buffer((int)&jj);
}
else
{
if ( v29 )
v29 = (unsigned int)DeathMarkerLayer::DMCell::DMCell((cocos2d::CCPoint *)v29, (const cocos2d::CCPoint *)v220);
a1[67] += 72;
}
v31 += 4 * v28;
}
v50 = 0;
v51 = *((float *)v198 + 16);
v52 = 954437177 * ((a1[67] - a1[66]) >> 3);
while ( v50 < v52 )
{
v53 = a1[66] + 72 * v50++;
v29 = *(_DWORD *)v53;
v54 = (float)*(int *)(v53 + 16);
*(_DWORD *)(v53 + 40) = *(_DWORD *)v53;
v55 = (float)((float)(v54 / (float)v195) * 0.5) + 0.5;
v56 = *(float *)(v53 + 4) - 5.0;
*(float *)(v53 + 44) = v55;
*(float *)(v53 + 36) = v56 + (float)(v51 * v55);
}
if ( !a4 && v52 > 0 )
{
*(_DWORD *)v220 = 0;
v221 = 0;
v222 = 0;
v223 = 0;
v224 = 1065353216;
v57 = (unsigned int)ceilf((float)(2 * v52));
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::rehash(
(int)v220,
v57);
for ( i = 0; i != v52; ++i )
{
jj = *(_DWORD *)(a1[66] + 72 * i + 12) | (*(_DWORD *)(a1[66] + 72 * i + 8) << 16);
*std::unordered_map::operator[]((int)v220, (unsigned int *)&jj) = i;
}
v214 = nullptr;
v215 = nullptr;
v216 = nullptr;
std::vector::allocate(&v214, v52);
v60 = v52;
do
{
if ( v215 )
*v215 = 0;
--v60;
++v215;
}
while ( v60 );
for ( j = 0; j != v52; ++j )
*(_DWORD *)&v214[4 * j] = j;
v205 = (int)a1;
sub_7693FA((int)v214, v215, (int)&v205);
LOBYTE(v211) = 0;
std::vector::vector(&jj, v52, (unsigned __int8 *)&v211);
for ( k = 0; k != v52; ++k )
{
v199 = *(cocos2d::CCRect **)&v214[4 * k];
if ( (*(_DWORD *)(jj + 4 * ((unsigned int)v199 >> 5)) & (1 << ((unsigned __int8)v199 & 0x1F))) == 0 )
{
v62 = -1.0e18;
v63 = -2;
v196 = 0;
v64 = 72 * (_DWORD)v199;
v65 = 0.0;
v200 = 0;
do
{
for ( m = -2; m != 3; ++m )
{
if ( v63 * v63 + m * m <= 4 )
{
v67 = a1[66] + v64;
v68 = *(_DWORD *)(v67 + 8);
v69 = *(_DWORD *)(v67 + 12);
v70 = v63 + v68;
if ( v70 >= 0 )
{
v71 = v69 + m;
if ( v71 >= 0 )
{
if ( v221 )
{
v72 = v71 | (v70 << 16);
v73 = v221 - 1;
if ( ((v221 - 1) & v221) != 0 )
{
v73 = v221 - 1;
v74 = v72 % v221;
}
else
{
v74 = v72 & v73;
}
v75 = *(_DWORD **)(*(_DWORD *)v220 + 4 * v74);
if ( v75 )
{
for ( n = (_DWORD *)*v75; n; n = (_DWORD *)*n )
{
v77 = n[1];
v78 = ((v221 - 1) & v221) != 0 ? v77 % v221 : v73 & v77;
if ( v78 != v74 )
break;
if ( n[2] == v72 )
{
v79 = n[3];
v80 = 1 << (v79 & 0x1F);
v81 = *(_DWORD *)(jj + 4 * (v79 >> 5));
if ( (v81 & v80) == 0 || (cocos2d::CCRect *)v79 == v199 )
{
*(_DWORD *)(jj + 4 * (v79 >> 5)) = v80 | v81;
v187 = a1[66] + 72 * v79;
v65 = v65 + *(float *)v187;
v200 += *(_DWORD *)(v187 + 16);
++v196;
if ( *(float *)(v187 + 36) > v62 )
v62 = *(float *)(v187 + 36);
}
break;
}
}
}
}
}
}
}
}
++v63;
}
while ( v63 != 3 );
*(_DWORD *)(a1[66] + v64 + 32) = v200;
*(float *)(a1[66] + v64 + 40) = v65 / (float)v196;
*(float *)(a1[66] + v64 + 36) = v62;
}
}
std::vector::~vector((void **)&jj);
std::__vector_base::~__vector_base(&v214);
v29 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::~__hash_table((int)v220);
}
v82 = 0;
v83 = 37;
while ( v82 < v52 )
{
v84 = 72 * v82;
v29 = DeathMarkerLayer::labeled((int)a1, (int *)(a1[66] + 72 * v82));
if ( v29 )
{
v85 = a1[66] + v84;
if ( *(int *)(v85 + 48) <= 1 )
*(_DWORD *)(v85 + 48) = 2;
if ( a7 != 0x80000000 )
{
v86 = (*(_DWORD *)(v84 + a1[66] + 12) - a8) * (*(_DWORD *)(v84 + a1[66] + 12) - a8)
+ (*(_DWORD *)(v84 + a1[66] + 8) - a7) * (*(_DWORD *)(v84 + a1[66] + 8) - a7);
if ( v86 < v83 )
{
a1[85] = v82;
v83 = v86;
}
}
}
++v82;
}
v87 = a1[85];
if ( v87 >= 0 )
{
v88 = a1[66] + 72 * v87;
if ( *(int *)(v88 + 48) <= 2 )
*(_DWORD *)(v88 + 48) = 3;
}
if ( *((_BYTE *)a1 + 324) )
{
if ( a7 != 0x80000000 )
{
v89 = (GameManager *)GameManager::sharedState((GameManager *)v29);
if ( GameManager::getGameVariable(v89, "0210") )
{
for ( ii = 0; ii < v52; ++ii )
{
if ( ii != a1[85] && DeathMarkerLayer::labeled((int)a1, (int *)(a1[66] + 72 * ii)) )
{
v91 = (_DWORD *)(72 * ii + a1[66]);
v92 = v91[2];
v93 = v91[3] - a8;
v91[5] = 0;
v94 = v92 - a7;
v91[6] = 0;
v91[13] = 0;
v91[14] = 0;
v91[15] = 0;
if ( v94 || v93 )
v95 = v93 * v93 + v94 * v94 <= 36;
else
v95 = 4;
v91[12] = v95;
}
}
}
}
}
for ( jj = 0; jj < v52; ++jj )
{
*(_DWORD *)v220 = (int)(float)(*(float *)(a1[66] + 72 * jj + 4) / 240.0)
| ((int)(float)(*(float *)(a1[66] + 72 * jj) / 240.0) << 16);
v96 = std::unordered_map>::operator[]((int)(a1 + 69), (unsigned int *)v220);
v97 = (int *)v96[1];
if ( v97 == (int *)v96[2] )
{
std::vector::__push_back_slow_path((int)v96, &jj);
}
else
{
if ( v97 )
*v97 = jj;
v96[1] += 4;
}
}
DeathMarkerLayer::updateVisibility((DeathMarkerLayer *)a1, (const cocos2d::CCRect *)a6);
if ( !a5 )
{
if ( a1[88] && a1[66] != a1[67] )
DeathMarkerLayer::playMarkerSound(a1);
return v201;
}
v98 = *((unsigned __int8 *)a1 + 312);
v208 = nullptr;
v209 = nullptr;
v210 = nullptr;
if ( v98 )
{
*(_DWORD *)v220 = 0;
while ( *(int *)v220 < v52 )
{
if ( v209 == v210 )
{
std::vector::__push_back_slow_path((int)&v208, v220);
}
else
{
if ( v209 )
*(_DWORD *)v209 = *(_DWORD *)v220;
v209 += 4;
}
++*(_DWORD *)v220;
}
}
else
{
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v220, *a6 - 40.0, a6[1] - 40.0, a6[2] + 80.0, a6[3] + 80.0);
for ( kk = a1[74]; kk <= a1[75]; ++kk )
{
for ( mm = a1[76]; mm <= a1[77]; ++mm )
{
jj = (kk << 16) | mm;
v101 = std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find(
a1 + 69,
(unsigned int *)&jj);
if ( v101 )
{
for ( nn = 0; ; ++nn )
{
v103 = v101[3];
if ( nn >= (v101[4] - v103) >> 2 )
break;
if ( cocos2d::CCRect::containsPoint(
(cocos2d::CCRect *)v220,
(const cocos2d::CCPoint *)(a1[66] + 72 * *(_DWORD *)(v103 + 4 * nn))) )
{
v104 = v101[3];
if ( v209 == v210 )
{
std::vector::__push_back_slow_path((int)&v208, (_DWORD *)(v104 + 4 * nn));
}
else
{
v105 = *(_DWORD *)(v104 + 4 * nn);
if ( v209 )
*(_DWORD *)v209 = v105;
v209 += 4;
}
}
}
}
}
}
}
v106 = ((v209 - v208) >> 2) - 1;
v107 = 4 * v106;
while ( v106 > 0 )
{
v108 = rand();
v109 = *(_DWORD *)&v208[v107];
v110 = (int)(float)((float)((float)v108 * 4.6566e-10) * (float)(v106 + 1));
if ( v110 >= v106 )
v110 = v106;
--v106;
*(_DWORD *)&v208[v107] = *(_DWORD *)&v208[4 * v110];
v107 -= 4;
*(_DWORD *)&v208[4 * v110] = v109;
}
v111 = 0;
v211 = nullptr;
v212 = nullptr;
v213 = nullptr;
v214 = nullptr;
v215 = nullptr;
v216 = nullptr;
jj = 0;
v218 = nullptr;
v219 = nullptr;
while ( v111 < (v209 - v208) >> 2 )
{
v112 = *(_DWORD *)&v208[4 * v111];
v113 = *(_DWORD *)(a1[66] + 72 * v112 + 48);
if ( v113 <= 2 )
{
if ( v113 == 2 )
{
if ( v215 == v216 )
{
p_jj = &v214;
goto LABEL_182;
}
if ( v215 )
*v215 = v112;
++v215;
}
else
{
if ( v218 == v219 )
{
p_jj = (char **)&jj;
goto LABEL_182;
}
if ( v218 )
*(_DWORD *)v218 = v112;
v218 = (cocos2d::CCPoint *)((char *)v218 + 4);
}
}
else
{
if ( v212 == v213 )
{
p_jj = &v211;
LABEL_182:
std::vector::__push_back_slow_path((int)p_jj, &v208[4 * v111]);
goto LABEL_183;
}
if ( v212 )
*(_DWORD *)v212 = v112;
v212 += 4;
}
LABEL_183:
++v111;
}
v115 = v211;
v116 = (int *)v212;
v206 = a1;
v117 = (v212 - v211) >> 2;
if ( v117 <= 128 )
{
v119 = 0;
v118 = nullptr;
}
else
{
std::get_temporary_buffer(v220, (v212 - v211) >> 2);
v118 = *(int **)v220;
v119 = v221;
}
sub_76C170((int)v115, v116, (int *)&v206, v117, v118, v119);
if ( v118 )
operator delete(v118);
v120 = jj;
v121 = (int *)v218;
v207[0] = (int)a1;
v122 = ((int)v218 - jj) >> 2;
if ( v122 <= 128 )
{
v124 = 0;
v123 = nullptr;
}
else
{
std::get_temporary_buffer(v220, ((int)v218 - jj) >> 2);
v123 = *(int **)v220;
v124 = v221;
}
v125 = (GameManager *)sub_76C6C4(v120, v121, v207, v122, v123, v124);
if ( v123 )
operator delete(v123);
if ( a7 != 0x80000000 )
{
v221 = a7;
*(_DWORD *)v220 = a1;
v222 = a8;
v125 = (GameManager *)sub_769952((int)v214, v215, v220);
}
v126 = 0.1;
v127 = ((v212 - v211) >> 2) + (((char *)v215 - v214) >> 2) + (((int)v218 - jj) >> 2);
v128 = *((float *)a1 + 84) * 0.1;
if ( a11 <= 0.0 || v127 <= 0 )
{
v132 = 0.0;
goto LABEL_205;
}
v129 = *((unsigned __int8 *)a1 + 324);
v130 = (float)v127 / 40.0;
if ( v130 >= 1.0 )
v130 = 1.0;
*((float *)a1 + 83) = a9 + (float)((float)(a10 - a9) * v130);
if ( !v129
|| a1[85] < 0
|| (v131 = (GameManager *)GameManager::sharedState(v125), GameManager::getGameVariable(v131, "0208")) )
{
v173 = 0.0;
}
else
{
v175 = a1[85];
v176 = *((float *)a1 + 84);
v173 = v176 * 0.5;
if ( v175 >= 0 )
{
v177 = (int *)(a1[66] + 72 * v175);
if ( v177[13] > 0 || v177[14] > 1 || v177[15] > 1 )
v173 = v173 + (float)(v176 * 0.2);
}
}
v126 = *((float *)a1 + 84);
v128 = v126 * 0.1;
v132 = (float)((float)((float)((float)(a11 + *((float *)a1 + 83)) + v173) - (float)(v126 * 0.3)) - 0.4)
- (float)(v126 * 0.1);
if ( v127 == 1 || (v174 = v132 / (float)(v127 - 1), v174 < 0.0) )
{
if ( v128 < 0.0 )
goto LABEL_205;
v128 = 0.0;
goto LABEL_275;
}
if ( v174 <= v128 )
v128 = v132 / (float)(v127 - 1);
LABEL_205:
if ( v128 <= 0.0 )
{
LABEL_275:
v133 = 1;
goto LABEL_208;
}
v126 = 0.5;
v133 = (int)(float)((float)((float)(*((float *)a1 + 84) * 0.25) / v128) + 0.5);
if ( v133 < 1 )
v133 = 1;
LABEL_208:
std::vector::assign(&v208, v211, v212);
v134 = 1;
v135 = 0;
v136 = 0;
v137 = 0;
v197 = (((char *)v215 - v214) >> 2) + (((int)v218 - jj) >> 2);
while ( v134 <= v197 )
{
if ( v137 < ((char *)v215 - v214) >> 2 && (v136 >= ((int)v218 - jj) >> 2 || v134 >= v133 + v137 * v133) )
{
if ( v209 == v210 )
{
std::vector::__push_back_slow_path((int)&v208, &v214[4 * v137]);
}
else
{
if ( v209 )
*(_DWORD *)v209 = *(_DWORD *)&v214[4 * v137];
v209 += 4;
}
v194 = (cocos2d::CCRect *)v136;
++v137;
v135 = ((v209 - v208) >> 2) - 1;
}
else
{
v194 = (cocos2d::CCRect *)(v136 + 1);
if ( v209 == v210 )
{
std::vector::__push_back_slow_path((int)&v208, (_DWORD *)(jj + 4 * v136));
}
else
{
if ( v209 )
*(_DWORD *)v209 = *(_DWORD *)(jj + 4 * v136);
v209 += 4;
}
}
++v134;
v136 = (unsigned int)v194;
}
if ( v132 <= 0.0 || v135 >= v127 - 1 )
{
v138 = v128;
}
else
{
v126 = 0.2;
v138 = (float)(v132 - (float)(v128 * (float)(unsigned int)v135)) / (float)(v127 - 1 - v135);
if ( v138 < v128 )
v138 = v128;
if ( v138 > (float)(*((float *)a1 + 84) * 0.2) )
v138 = *((float *)a1 + 84) * 0.2;
}
for ( i1 = 0; i1 < v127; ++i1 )
{
v140 = a1[66] + 72 * *(_DWORD *)&v208[4 * i1];
v141 = *(_DWORD *)(v140 + 64);
if ( v141 )
{
v142 = a4 ? v128 * 0.5 : 0.0;
if ( i1 <= v135 )
{
v143 = i1;
}
else
{
v143 = i1 - v135;
v126 = (float)(unsigned int)v135;
}
v144 = i1 <= v135 ? v128 * (float)v143 : (float)(v138 * (float)v143) + (float)(v128 * v126);
v145 = v142 + v144;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v141 + 80))(v141, 0);
v146 = a1[88];
v148 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create(
(cocos2d::CCScaleTo *)0x3ECCCCCD,
*(float *)(v140 + 44),
v147);
v151 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseElasticOut::create(
v148,
(cocos2d::CCActionInterval *)0x3F000000,
v149);
v152 = *(cocos2d::CCNode **)(v140 + 64);
if ( v146 )
{
v153 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)LODWORD(v145), v150);
v207[1] = (int)DeathMarkerLayer::playMarkerSound;
v207[2] = 0;
v154 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, DeathMarkerLayer::playMarkerSound, 0);
v155 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v153, v154, v151, 0);
}
else
{
v157 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)LODWORD(v145), v150);
v155 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v157, v151, 0);
}
cocos2d::CCNode::runAction(v152, v155);
v156 = *(_DWORD *)(v140 + 68);
if ( v156 )
{
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v156 + 80))(v156, 0);
v158 = *(cocos2d::CCNode **)(v140 + 68);
v160 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)LODWORD(v145), v159);
v126 = 0.5;
if ( *((_BYTE *)a1 + 349) )
v161 = -0.5;
else
v161 = 0.5;
v162 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create(
(cocos2d::CCScaleTo *)0x3ECCCCCD,
v161,
0.5,
COERCE_FLOAT(*((_BYTE *)a1 + 349)));
v164 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseElasticOut::create(
v162,
(cocos2d::CCActionInterval *)0x3F000000,
v163);
v165 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v160, v164, 0);
cocos2d::CCNode::runAction(v158, v165);
}
}
}
v166 = a1[85];
if ( v166 >= 0 && *(_DWORD *)(a1[66] + 72 * v166 + 68) )
{
if ( *((_BYTE *)a1 + 324) )
{
v203 = 13055;
v204 = 0;
}
else
{
v178 = GameToolbox::transformColor((unsigned __int8 *)a1 + 326, 0.0, -0.5, 0.5);
v203 = v178;
v204 = BYTE2(v178);
}
v167 = *((float *)a1 + 84);
if ( *((_BYTE *)a1 + 324) )
v169 = &unk_BF0A68;
else
v169 = (char *)a1 + 326;
v168 = *(_DWORD *)(a1[66] + 72 * a1[85] + 68);
v171 = (cocos2d::CCNode *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v168 + 240))(v168, 91);
if ( v171 )
{
v179 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(COERCE_COCOS2D_CCDELAYTIME_(v167 * 0.3), v170);
v193 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCTintTo::create(
(cocos2d::CCTintTo *)0x3DA3D70A,
COERCE_FLOAT((unsigned __int8)v203),
HIBYTE(v203),
v204,
v188);
v180 = cocos2d::CCTintTo::create((cocos2d::CCTintTo *)0x3E6147AE, COERCE_FLOAT(*v169), v169[1], v169[2], v189);
v181 = cocos2d::CCTintTo::create(
(cocos2d::CCTintTo *)0x3DA3D70A,
COERCE_FLOAT((unsigned __int8)v203),
HIBYTE(v203),
v204,
v190);
v182 = cocos2d::CCTintTo::create((cocos2d::CCTintTo *)0x3E6147AE, COERCE_FLOAT(*v169), v169[1], v169[2], v191);
v183 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v179, v193, v180, v181, v182, 0);
cocos2d::CCNode::runAction(v171, v183);
}
if ( !*((_BYTE *)a1 + 324) )
{
v184 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(
COERCE_COCOS2D_CCDELAYTIME_(*((float *)a1 + 84) * 0.3),
v170);
v207[3] = (int)DeathMarkerLayer::tickDeathCountLabel;
v207[4] = 0;
v185 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, DeathMarkerLayer::tickDeathCountLabel, 0);
v186 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v184, v185, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)a1, v186);
}
}
std::__vector_base::~__vector_base((char **)&jj);
std::__vector_base::~__vector_base(&v214);
std::__vector_base::~__vector_base(&v211);
std::__vector_base::~__vector_base(&v208);
return v201;
}