// File: chhylp123[P]hifiasm/rcut.cpp
// Function: update_mc_edges(mc_g_t*, hap_overlaps_list*, kv_u_trans_t*, trans_chain*, double, unsigned int)
void update_mc_edges(mc_g_t *mg, hap_overlaps_list* ha, kv_u_trans_t *ta, trans_chain* t_ch, double f_rate, uint32_t is_sys)
{
	uint32_t v, i, k, qn, tn, qs, qe, ts, te, occ, as, ae, l, offset, l_pos;
	uint64_t hetLen, homLen, oLen;
	mc_interval_t *a = NULL;
	mc_edge_t *ma = NULL;
	asg_t* nsg = mg->ug->g;
	ma_utg_t *u = NULL;
	mc_interval_t *t = NULL;

	kvec_t(mc_interval_t) p; kv_init(p);
	kvec_t(uint32_t) p_idx; kv_init(p_idx);
	if(t_ch)
	{
		kv_push(uint32_t, p_idx, 0);
		for (v = 0; v < nsg->n_seq; v++)
		{
			u = &(mg->ug->u.a[v]);
			for (k = 1, l = 0, offset = 0, l_pos = 0; k <= u->n; ++k) 
			{   
				if (k == u->n || t_ch->ir_het[u->a[k]>>33] != t_ch->ir_het[u->a[l]>>33])
				{
					kv_pushp(mc_interval_t, p, &t);
					t->uID = v;
					t->hs = t_ch->ir_het[u->a[l]>>33];

					t->bS = l_pos;
					t->bE = offset + mg->rg->seq[u->a[k-1]>>33].len - 1;

					t->nS = l;
					t->nE = k - 1;
					l = k;
					l_pos = offset + (uint32_t)u->a[k-1];
				}
				offset += (uint32_t)u->a[k-1];
			}
			kv_push(uint32_t, p_idx, p.n);
		}

		///debug_mc_interval_t(p.a, p.n, p_idx.a, mg->ug, mg->rg, t_ch);
	}

	if(!mg->e)
	{
		CALLOC(mg->e, 1);
		mg->e->n_seq = mg->ug->g->n_seq;
		kv_init(mg->e->idx); kv_init(mg->e->ma); 
	}

	if(ha)
	{
		for (v = 0; v < ha->num; v++)
		{
			for (i = 0; i < ha->x[v].a.n; i++)
			{
				if(ha->x[v].a.a[i].score <= 0) continue;
				if(ha->x[v].a.a[i].xUid == ha->x[v].a.a[i].yUid) continue;
				if(p.n > 0 && p_idx.n > 0)
				{
					/*****************qn*****************/
					qn = ha->x[v].a.a[i].xUid;
					qs = ha->x[v].a.a[i].x_beg_pos;
					qe = ha->x[v].a.a[i].x_end_pos - 1;

					a = p.a + p_idx.a[qn]; 
					occ = p_idx.a[qn+1] - p_idx.a[qn];
					for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
					{
						as = a[k].bS;
						ae = a[k].bE;
						oLen = ((MIN(qe, ae) >= MAX(qs, as))? MIN(qe, ae) - MAX(qs, as) + 1 : 0);
						if(homLen + hetLen > 0 && oLen == 0) break;
						if(oLen == 0) continue;
						if(a[k].hs == N_HET)
						{
							homLen += oLen;
						} 
						else if(asm_opt.polyploidy <= 2 && (a[k].hs&P_HET))///if(asm_opt.polyploidy <= 2 && (a[k].hs&S_HET))
						{
							homLen += oLen;
						}
						else
						{
							hetLen += oLen;
						}                
					}

					if(hetLen <= ((hetLen + homLen)*f_rate)) continue;
					/*****************qn*****************/


					/*****************tn*****************/
					tn = ha->x[v].a.a[i].yUid;
					ts = ha->x[v].a.a[i].y_beg_pos;
					te = ha->x[v].a.a[i].y_end_pos - 1;

					a = p.a + p_idx.a[tn]; 
					occ = p_idx.a[tn+1] - p_idx.a[tn];
					for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
					{
						as = a[k].bS;
						ae = a[k].bE;
						oLen = ((MIN(te, ae) >= MAX(ts, as))? MIN(te, ae) - MAX(ts, as) + 1 : 0);
						if(homLen + hetLen > 0 && oLen == 0) break;
						if(oLen == 0) continue;
						if(a[k].hs == N_HET)
						{
							homLen += oLen;
						} 
						else if(asm_opt.polyploidy <= 2 && (a[k].hs&P_HET))///if(asm_opt.polyploidy <= 2 && (a[k].hs&S_HET))
						{
							homLen += oLen;
						}
						else
						{
							hetLen += oLen;
						}                 
					}

					if(hetLen <= ((hetLen + homLen)*f_rate)) continue;
					/*****************tn*****************/
				}
				kv_pushp(mc_edge_t, mg->e->ma, &ma);
				ma->x = (uint64_t)ha->x[v].a.a[i].xUid << 32 | ha->x[v].a.a[i].yUid;
				ma->w = ha->x[v].a.a[i].score;
			}
		}
	}

	if(ta)
	{
		// double sc = get_w_scale(ta);
		// fprintf(stderr, "sc: %f\n", sc);
		for (i = 0; i < ta->n; ++i)
		{
			if(ta->a[i].del) continue;
			if(p.n > 0 && p_idx.n > 0)
			{
				/*****************qn*****************/
				qn = ta->a[i].qn;
				qs = ta->a[i].qs;
				qe = ta->a[i].qe - 1;

				a = p.a + p_idx.a[qn]; 
				occ = p_idx.a[qn+1] - p_idx.a[qn];
				for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
				{
					as = a[k].bS;
					ae = a[k].bE;
					oLen = ((MIN(qe, ae) >= MAX(qs, as))? MIN(qe, ae) - MAX(qs, as) + 1 : 0);
					if(homLen + hetLen > 0 && oLen == 0) break;
					if(oLen == 0) continue;
					if(a[k].hs == N_HET)
					{
						homLen += oLen;
					} 
					else if(asm_opt.polyploidy <= 2 && (a[k].hs&P_HET))///if(asm_opt.polyploidy <= 2 && (a[k].hs&S_HET))
					{
						homLen += oLen;
					}
					else
					{
						hetLen += oLen;
					}                
				}

				if(hetLen <= ((hetLen + homLen)*f_rate)) continue;
				/*****************qn*****************/

				/*****************tn*****************/
				tn = ta->a[i].tn;
				ts = ta->a[i].ts;
				te = ta->a[i].te - 1;

				a = p.a + p_idx.a[tn]; 
				occ = p_idx.a[tn+1] - p_idx.a[tn];
				for (k = 0, hetLen = 0, homLen = 0; k < occ; k++)
				{
					as = a[k].bS;
					ae = a[k].bE;
					oLen = ((MIN(te, ae) >= MAX(ts, as))? MIN(te, ae) - MAX(ts, as) + 1 : 0);
					if(homLen + hetLen > 0 && oLen == 0) break;
					if(oLen == 0) continue;
					if(a[k].hs == N_HET)
					{
						homLen += oLen;
					} 
					else if(asm_opt.polyploidy <= 2 && (a[k].hs&P_HET))///if(asm_opt.polyploidy <= 2 && (a[k].hs&S_HET))
					{
						homLen += oLen;
					}
					else
					{
						hetLen += oLen;
					}                 
				}

				if(hetLen <= ((hetLen + homLen)*f_rate)) continue;
				/*****************tn*****************/
			}
			kv_pushp(mc_edge_t, mg->e->ma, &ma);
			ma->x = (uint64_t)ta->a[i].qn << 32 | ta->a[i].tn;
			// ma->w = w_cast((ta->a[i].nw*sc));
			ma->w = w_cast((ta->a[i].nw));
		}
	}

	for (i = k = 0; i < mg->e->ma.n; i++)
    {
		if(mg->e->ma.a[i].w == 0) continue;
		mg->e->ma.a[k] = mg->e->ma.a[i];
        k++;
    }
    mg->e->ma.n = k;
	
	radix_sort_mce(mg->e->ma.a, mg->e->ma.a + mg->e->ma.n);
	mc_merge_dup(mg);
	mc_edges_idx(mg->e);
	if(is_sys) mc_edges_symm(mg->e);
	kv_destroy(p); kv_destroy(p_idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xd0(%rbp)
movq $0x0, -0xd8(%rbp)
movq $0x0, -0xc8(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x21a01a
jmp 0x219ca2
movq -0xd8(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jne 0x219d09
cmpq $0x0, -0xd0(%rbp)
je 0x219ccf
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0xe0(%rbp)
jmp 0x219cdd
movl $0x2, %eax
movq %rax, -0xe0(%rbp)
jmp 0x219cdd
movq -0xe0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xd8(%rbp)
movl $0x0, (%rax,%rcx,4)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x98(%rbp), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x21a018
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movl $0x1, -0x38(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x38(%rbp), %eax
movq -0xa0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
ja 0x219f77
movl -0x38(%rbp), %eax
movq -0xa0(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x219df5
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xa0(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x38(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq 0x18(%rdx), %rdx
movl -0x60(%rbp), %esi
movq (%rdx,%rsi,8), %rdx
shrq $0x21, %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x219f4c
jmp 0x219df7
movq -0xc0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jne 0x219e5b
cmpq $0x0, -0xb8(%rbp)
je 0x219e24
movq -0xb8(%rbp), %rax
shlq %rax
movq %rax, -0xe8(%rbp)
jmp 0x219e32
movl $0x2, %eax
movq %rax, -0xe8(%rbp)
jmp 0x219e32
movq -0xe8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
imulq $0x18, -0xb8(%rbp), %rsi
callq 0x2360
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xc0(%rbp)
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movl -0x30(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xa0(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x60(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb (%rax,%rcx), %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x14(%rax)
movl -0x68(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
movl -0x64(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq -0xa0(%rbp), %rdx
movq 0x18(%rdx), %rdx
movl -0x38(%rbp), %esi
subl $0x1, %esi
movl %esi, %esi
movq (%rdx,%rsi,8), %rdx
shrq $0x21, %rdx
movl (%rax,%rdx,8), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addl %eax, %ecx
subl $0x1, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x60(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x38(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x64(%rbp), %eax
movq -0xa0(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x38(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
addl %ecx, %eax
movl %eax, -0x68(%rbp)
movq -0xa0(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
addl -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x219d87
jmp 0x219f79
movq -0xd8(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jne 0x219fe0
cmpq $0x0, -0xd0(%rbp)
je 0x219fa6
movq -0xd0(%rbp), %rax
shlq %rax
movq %rax, -0xf0(%rbp)
jmp 0x219fb4
movl $0x2, %eax
movq %rax, -0xf0(%rbp)
jmp 0x219fb4
movq -0xf0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, %edx
movq -0xc8(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0xd8(%rbp)
movl %edx, (%rax,%rcx,4)
jmp 0x21a00a
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x219d33
jmp 0x21a01a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x21a0c2
movl $0x1, %edi
movl $0x40, %esi
callq 0x2140
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq $0x0, 0x28(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x21a89f
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x21a89d
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x30(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x21a88d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x30(%rax)
jg 0x21a133
jmp 0x21a87f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x30(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
movl -0x34(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rcx
cmpl 0x28(%rcx), %eax
jne 0x21a17e
jmp 0x21a87f
cmpq $0x0, -0xc0(%rbp)
jbe 0x21a732
cmpq $0x0, -0xd8(%rbp)
jbe 0x21a732
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl -0x3c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0xc8(%rbp), %rcx
movl -0x3c(%rbp), %edx
subl (%rcx,%rdx,4), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x21a40b
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21a2b3
movl -0x48(%rbp), %eax
movl %eax, -0xf4(%rbp)
jmp 0x21a2bc
movl -0x5c(%rbp), %eax
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21a2db
movl -0x44(%rbp), %eax
movl %eax, -0xfc(%rbp)
jmp 0x21a2e4
movl -0x58(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0xf8(%rbp), %eax
movl -0xfc(%rbp), %ecx
cmpl %ecx, %eax
jb 0x21a351
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21a307
movl -0x48(%rbp), %eax
movl %eax, -0x100(%rbp)
jmp 0x21a310
movl -0x5c(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21a32f
movl -0x44(%rbp), %eax
movl %eax, -0x108(%rbp)
jmp 0x21a338
movl -0x58(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x104(%rbp), %eax
movl -0x108(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x21a35b
xorl %eax, %eax
movl %eax, -0x10c(%rbp)
jmp 0x21a35b
movl -0x10c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
addq -0x70(%rbp), %rax
cmpq $0x0, %rax
jbe 0x21a381
cmpq $0x0, -0x80(%rbp)
jne 0x21a381
jmp 0x21a40b
cmpq $0x0, -0x80(%rbp)
jne 0x21a38a
jmp 0x21a3fd
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x21a3b2
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21a3fb
leaq 0x1aa43f(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x21a3ed
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x21a3ed
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21a3f9
movq -0x80(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x21a3fb
jmp 0x21a3fd
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21a267
movq -0x70(%rbp), %rax
movq %rax, %xmm1
movaps 0x167bf5(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x167bf9(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
mulsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x21a465
jmp 0x21a87f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x28(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x50(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl -0x40(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0xc8(%rbp), %rcx
movl -0x40(%rbp), %edx
subl (%rcx,%rdx,4), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x21a6d6
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21a57e
movl -0x50(%rbp), %eax
movl %eax, -0x110(%rbp)
jmp 0x21a587
movl -0x5c(%rbp), %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
movl %eax, -0x114(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21a5a6
movl -0x4c(%rbp), %eax
movl %eax, -0x118(%rbp)
jmp 0x21a5af
movl -0x58(%rbp), %eax
movl %eax, -0x118(%rbp)
movl -0x114(%rbp), %eax
movl -0x118(%rbp), %ecx
cmpl %ecx, %eax
jb 0x21a61c
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21a5d2
movl -0x50(%rbp), %eax
movl %eax, -0x11c(%rbp)
jmp 0x21a5db
movl -0x5c(%rbp), %eax
movl %eax, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
movl %eax, -0x120(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21a5fa
movl -0x4c(%rbp), %eax
movl %eax, -0x124(%rbp)
jmp 0x21a603
movl -0x58(%rbp), %eax
movl %eax, -0x124(%rbp)
movl -0x120(%rbp), %eax
movl -0x124(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x21a626
xorl %eax, %eax
movl %eax, -0x128(%rbp)
jmp 0x21a626
movl -0x128(%rbp), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
addq -0x70(%rbp), %rax
cmpq $0x0, %rax
jbe 0x21a64c
cmpq $0x0, -0x80(%rbp)
jne 0x21a64c
jmp 0x21a6d6
cmpq $0x0, -0x80(%rbp)
jne 0x21a655
jmp 0x21a6c8
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x21a67d
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21a6c6
leaq 0x1aa174(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x21a6b8
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x21a6b8
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21a6c4
movq -0x80(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x21a6c6
jmp 0x21a6c8
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21a532
movq -0x70(%rbp), %rax
movq %rax, %xmm1
movaps 0x16792a(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x16792e(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
mulsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x21a730
jmp 0x21a87f
jmp 0x21a732
jmp 0x21a734
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x20(%rcx), %rax
jne 0x21a7c6
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x21a775
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x130(%rbp)
jmp 0x21a783
movl $0x2, %eax
movq %rax, -0x130(%rbp)
jmp 0x21a783
movq -0x130(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdx
movq 0x18(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x18(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %edx
shlq $0x6, %rdx
addq %rdx, %rax
movl 0x28(%rax), %eax
orq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x30(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cvtsi2sdq 0x30(%rax), %xmm0
movq -0x90(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x21a0eb
jmp 0x21a88f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x21a0d4
jmp 0x21a89f
cmpq $0x0, -0x18(%rbp)
je 0x21af7c
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x21af7a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movb 0x28(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x21a8e2
jmp 0x21af6c
cmpq $0x0, -0xc0(%rbp)
jbe 0x21ae47
cmpq $0x0, -0xd8(%rbp)
jbe 0x21ae47
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl -0x3c(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0xc8(%rbp), %rcx
movl -0x3c(%rbp), %edx
subl (%rcx,%rdx,4), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x21ab47
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21a9ef
movl -0x48(%rbp), %eax
movl %eax, -0x134(%rbp)
jmp 0x21a9f8
movl -0x5c(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21aa17
movl -0x44(%rbp), %eax
movl %eax, -0x13c(%rbp)
jmp 0x21aa20
movl -0x58(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x138(%rbp), %eax
movl -0x13c(%rbp), %ecx
cmpl %ecx, %eax
jb 0x21aa8d
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21aa43
movl -0x48(%rbp), %eax
movl %eax, -0x140(%rbp)
jmp 0x21aa4c
movl -0x5c(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x140(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21aa6b
movl -0x44(%rbp), %eax
movl %eax, -0x148(%rbp)
jmp 0x21aa74
movl -0x58(%rbp), %eax
movl %eax, -0x148(%rbp)
movl -0x144(%rbp), %eax
movl -0x148(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x21aa97
xorl %eax, %eax
movl %eax, -0x14c(%rbp)
jmp 0x21aa97
movl -0x14c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
addq -0x70(%rbp), %rax
cmpq $0x0, %rax
jbe 0x21aabd
cmpq $0x0, -0x80(%rbp)
jne 0x21aabd
jmp 0x21ab47
cmpq $0x0, -0x80(%rbp)
jne 0x21aac6
jmp 0x21ab39
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x21aaee
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21ab37
leaq 0x1a9d03(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x21ab29
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x21ab29
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21ab35
movq -0x80(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x21ab37
jmp 0x21ab39
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21a9a3
movq -0x70(%rbp), %rax
movq %rax, %xmm1
movaps 0x1674b9(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x1674bd(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
mulsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x21aba1
jmp 0x21af6c
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x50(%rbp)
movq -0xb0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl -0x40(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movq -0xc8(%rbp), %rcx
movl -0x40(%rbp), %edx
subl (%rcx,%rdx,4), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x21adeb
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21ac93
movl -0x50(%rbp), %eax
movl %eax, -0x150(%rbp)
jmp 0x21ac9c
movl -0x5c(%rbp), %eax
movl %eax, -0x150(%rbp)
movl -0x150(%rbp), %eax
movl %eax, -0x154(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21acbb
movl -0x4c(%rbp), %eax
movl %eax, -0x158(%rbp)
jmp 0x21acc4
movl -0x58(%rbp), %eax
movl %eax, -0x158(%rbp)
movl -0x154(%rbp), %eax
movl -0x158(%rbp), %ecx
cmpl %ecx, %eax
jb 0x21ad31
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
ja 0x21ace7
movl -0x50(%rbp), %eax
movl %eax, -0x15c(%rbp)
jmp 0x21acf0
movl -0x5c(%rbp), %eax
movl %eax, -0x15c(%rbp)
movl -0x15c(%rbp), %eax
movl %eax, -0x160(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jb 0x21ad0f
movl -0x4c(%rbp), %eax
movl %eax, -0x164(%rbp)
jmp 0x21ad18
movl -0x58(%rbp), %eax
movl %eax, -0x164(%rbp)
movl -0x160(%rbp), %eax
movl -0x164(%rbp), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x168(%rbp)
jmp 0x21ad3b
xorl %eax, %eax
movl %eax, -0x168(%rbp)
jmp 0x21ad3b
movl -0x168(%rbp), %eax
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
addq -0x70(%rbp), %rax
cmpq $0x0, %rax
jbe 0x21ad61
cmpq $0x0, -0x80(%rbp)
jne 0x21ad61
jmp 0x21adeb
cmpq $0x0, -0x80(%rbp)
jne 0x21ad6a
jmp 0x21addd
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
cmpl $0x0, %eax
jne 0x21ad92
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21addb
leaq 0x1a9a5f(%rip), %rax    # 0x3c47f8
cmpl $0x2, 0x1bc(%rax)
jg 0x21adcd
movq -0x88(%rbp), %rax
movl -0x38(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x14(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x21adcd
movq -0x80(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x21add9
movq -0x80(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x21addb
jmp 0x21addd
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21ac47
movq -0x70(%rbp), %rax
movq %rax, %xmm1
movaps 0x167215(%rip), %xmm3   # 0x382010
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x167219(%rip), %xmm2   # 0x382020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq -0x78(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
mulsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x21ae45
jmp 0x21af6c
jmp 0x21ae47
jmp 0x21ae49
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x20(%rcx), %rax
jne 0x21aedb
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x21ae8a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
shlq %rax
movq %rax, -0x170(%rbp)
jmp 0x21ae98
movl $0x2, %eax
movq %rax, -0x170(%rbp)
jmp 0x21ae98
movq -0x170(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rsi
shlq $0x4, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdx
movq 0x18(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x18(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl 0x14(%rax), %eax
orq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movsd 0x20(%rax), %xmm0
movq -0x90(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x21a8b1
jmp 0x21af7c
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jae 0x21b014
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rax
movl -0x34(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21afc3
jp 0x21afc3
jmp 0x21b006
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rcx
movl -0x34(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rax
movl -0x38(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x21af8a
movl -0x38(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x28(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x215950
movq -0x8(%rbp), %rdi
callq 0x2167a0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2193a0
cmpl $0x0, -0x2c(%rbp)
je 0x21b07e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2190a0
movq -0xb0(%rbp), %rdi
callq 0x2210
movq -0xc8(%rbp), %rdi
callq 0x2210
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nop