// File: chhylp123[P]hifiasm/inter.cpp
// Function: asg_arc_push_contain_trans(asg_t*, ma_hit_t_alloc*, long, long, double, long, R_to_U*, unsigned char*)
void asg_arc_push_contain_trans(asg_t *g, ma_hit_t_alloc* ov, int64_t min_ovlp, int64_t max_hang, double max_hang_rate, int64_t fuzz, R_to_U *ri, uint8_t *mark)
{
	uint32_t n_vtx = g->n_seq<<1, cnt = 0, nc, cc, qn, tn, avi, awi;
	uint32_t v, w, i, k, nv, nw; asg_arc_t *av, *aw; int32_t r = 1;
	ma_hit_t_alloc *z; asg_arc_t p, *t;
	uint32_t *dis, *idx; CALLOC(dis, n_vtx); MALLOC(idx, n_vtx);
	for (v = 0; v < n_vtx; ++v) {
		if(g->seq[v>>1].del || (!mark[v])) continue;
        nv = asg_arc_n(g, v); av = asg_arc_a(g, v);
        if (nv == 0) continue; // no hits    
		for (i = 0; i < nv; ++i) {
			if((!(av[i].del)) && (is_contain_r((*ri), (av[i].v>>1)))) break;
		}
		if(i >= nv) continue; 
		z = &(ov[v>>1]);
		for (i = 0; i < z->length; i++) {
        	qn = Get_qn(z->buffer[i]); tn = Get_tn(z->buffer[i]);
			if(z->buffer[i].del) continue;
			r = ma_hit2arc(&(z->buffer[i]), g->seq[qn].len, g->seq[tn].len, max_hang, max_hang_rate, min_ovlp, &p);
			if((r < 0) || ((p.ul>>32) != v)) continue;
			if(g->seq[p.v>>1].del) continue;
			if(mark[p.v^1]) {
				dis[p.v] = asg_arc_len(p) + fuzz; idx[p.v] = i;
			}
		}

		nv = asg_arc_n(g, v); av = asg_arc_a(g, v); avi = g->idx[v]>>32;
		while(nv) {
			for (i = nc = cc = 0; i < nv; ++i) {
				if(av[i].del) continue; w = av[i].v;
				if(!(is_contain_r((*ri), (w>>1)))) continue;///new arcs must be bridged by contained reads
				assert(!(g->seq[w>>1].del));
				nw = asg_arc_n(g, w); aw = asg_arc_a(g, w); awi = g->idx[w]>>32;
				for (k = 0; k < nw; k++) {
					if(aw[k].del) continue;
					if((dis[aw[k].v] == ((uint32_t)-1)) || (dis[aw[k].v] == 0)) continue;
					assert(!(g->seq[aw[k].v>>1].del));
					if((asg_arc_len(av[i]) + asg_arc_len(aw[k])) <= dis[aw[k].v]) {
						dis[aw[k].v] = ((uint32_t)-1); assert(!(z->buffer[idx[aw[k].v]].del));
						qn = Get_qn(z->buffer[idx[aw[k].v]]); tn = Get_tn(z->buffer[idx[aw[k].v]]);
						r = ma_hit2arc(&(z->buffer[idx[aw[k].v]]), g->seq[qn].len, g->seq[tn].len, max_hang, max_hang_rate, min_ovlp, &p);
						assert(r>=0); assert((p.ul>>32)==v); assert(p.v==aw[k].v);
						cnt++; p.ou = 0; t = asg_arc_pushp(g); *t = p; 

						// fprintf(stderr, "[M::%s::]\t%.*s(id::%lu::%c)(is_c::%u)\t%.*s(id::%u::%c)(is_c::%u)\n", __func__, 
						// (int)Get_NAME_LENGTH(R_INF, (g->arc[g->n_arc-1].ul>>33)), 
						// Get_NAME(R_INF, (g->arc[g->n_arc-1].ul>>33)), 
						// g->arc[g->n_arc-1].ul>>33, "+-"[(g->arc[g->n_arc-1].ul>>32)&1], 
						// (is_contain_r((*ri), (g->arc[g->n_arc-1].ul>>33))),
						// (int)Get_NAME_LENGTH(R_INF, (g->arc[g->n_arc-1].v>>1)),
						// Get_NAME(R_INF, (g->arc[g->n_arc-1].v>>1)), 
						// g->arc[g->n_arc-1].v>>1, "+-"[(g->arc[g->n_arc-1].v)&1],
						// (is_contain_r((*ri), (g->arc[g->n_arc-1].v>>1)))
						// );
						// fprintf(stderr, "[M::%s::]\tmiddle::%.*s(id::%u::%c)(is_c::%u)\n", __func__, 
						// (int)Get_NAME_LENGTH(R_INF, (w>>1)), Get_NAME(R_INF, (w>>1)), 
						// w>>1, "+-"[w&1], (is_contain_r((*ri), (w>>1))));



						av = g->arc + avi; aw = g->arc + awi;///renew av and aw since asg_arc_pushp
						if((is_contain_r((*ri), (g->arc[g->n_arc-1].v>>1)))) {
							cc++;
						} else {
							if(g->n_arc!=(nc+1)) {		
								p = g->arc[g->n_arc-1]; 						
								g->arc[g->n_arc-1] = g->arc[nc];
								g->arc[nc] = p;
							}
							nc++;
						}
					}
				}
			}

			if(cc) {///new arcs must be bridged by contained reads
				nv = cc; av = g->arc + g->n_arc - cc; avi = g->n_arc - cc;
			} else {
				nv = 0; av = NULL; avi = ((uint32_t)-1);
			}
		}

		z = &(ov[v>>1]);
		for (i = 0; i < z->length; i++) {
        	qn = Get_qn(z->buffer[i]); tn = Get_tn(z->buffer[i]);
			if(z->buffer[i].del) continue;
			r = ma_hit2arc(&(z->buffer[i]), g->seq[qn].len, g->seq[tn].len, max_hang, max_hang_rate, min_ovlp, &p);
			if((r < 0) || ((p.ul>>32) != v)) continue;
			dis[p.v] = 0;
		}
	}

	free(dis); free(idx);
	if(cnt) {
		free(g->idx);
        g->idx = 0;
        g->is_srt = 0;
        asg_cleanup(g);
		asg_symm(g);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x1, -0x84(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x2140
movq %rax, -0xb8(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2270
movq %rax, -0xc0(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x2ff0d0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2fe5d3
movq 0x10(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x2fe5d8
jmp 0x2ff0c2
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x5c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x6c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x5c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
cmpl $0x0, -0x6c(%rbp)
jne 0x2fe61b
jmp 0x2ff0c2
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jae 0x2fe6c2
movq -0x78(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2fe6b2
movq -0x78(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2fe6b2
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x78(%rbp), %rcx
movl -0x64(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x2fe6b2
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x78(%rbp), %rcx
movl -0x64(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2fe6b2
jmp 0x2fe6c2
jmp 0x2fe6b4
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2fe622
movl -0x64(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jb 0x2fe6cf
jmp 0x2ff0c2
movq -0x10(%rbp), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2fe858
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0x2fe760
jmp 0x2fe84a
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movl -0x64(%rbp), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movl %eax, %ecx
movsd -0x28(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movl %eax, %r8d
leaq -0xa8(%rbp), %r9
callq 0x287f40
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jl 0x2fe7e0
movq -0xa8(%rbp), %rax
shrq $0x20, %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
je 0x2fe7e2
jmp 0x2fe84a
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xa0(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2fe801
jmp 0x2fe84a
movq 0x10(%rbp), %rax
movl -0xa0(%rbp), %ecx
xorl $0x1, %ecx
movl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x2fe848
movq -0xa8(%rbp), %rax
movl %eax, %eax
addq -0x30(%rbp), %rax
movl %eax, %edx
movq -0xb8(%rbp), %rax
movl -0xa0(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x64(%rbp), %edx
movq -0xc0(%rbp), %rax
movl -0xa0(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x2fe84a
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2fe6ef
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x5c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x6c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x5c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x5c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x2fef8b
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jae 0x2fef1c
movq -0x78(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2fe8ef
jmp 0x2fef0e
movq -0x78(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
shrl %eax
movl %eax, %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2fe942
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x60(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x2fe942
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x60(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2fe947
jmp 0x2fef0e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x60(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2fe96a
jmp 0x2fe96c
jmp 0x2fe98b
leaq 0x96baf(%rip), %rdi     # 0x395522
leaq 0x91eb5(%rip), %rsi     # 0x39082f
movl $0x550d, %edx           # imm = 0x550D
leaq 0x96bb0(%rip), %rcx     # 0x395536
callq 0x2130
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x60(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x60(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x58(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x70(%rbp), %eax
jae 0x2fef0c
movq -0x80(%rbp), %rax
movl -0x68(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x2fea0a
jmp 0x2feefe
movq -0xb8(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x2fea46
movq -0xb8(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x2fea4b
jmp 0x2feefe
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2fea7c
jmp 0x2fea7e
jmp 0x2fea9d
leaq 0x96b24(%rip), %rdi     # 0x3955a9
leaq 0x91da3(%rip), %rsi     # 0x39082f
movl $0x5512, %edx           # imm = 0x5512
leaq 0x96a9e(%rip), %rcx     # 0x395536
callq 0x2130
movq -0x78(%rbp), %rax
movl -0x64(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addl %ecx, %eax
movq -0xb8(%rbp), %rcx
movq -0x80(%rbp), %rdx
movl -0x68(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
cmpl (%rcx,%rdx,4), %eax
ja 0x2feefc
movq -0xb8(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movq -0x80(%rbp), %rdx
movl -0x68(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2feb43
jmp 0x2feb45
jmp 0x2feb64
leaq 0x96a77(%rip), %rdi     # 0x3955c3
leaq 0x91cdc(%rip), %rsi     # 0x39082f
movl $0x5514, %edx           # imm = 0x5514
leaq 0x969d7(%rip), %rcx     # 0x395536
callq 0x2130
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movq -0x80(%rbp), %rdx
movl -0x68(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movq -0x80(%rbp), %rdx
movl -0x68(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl 0x8(%rdx), %edx
movl (%rcx,%rdx,4), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movq -0xc0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
movl (%rax,%rcx,4), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movl %eax, %ecx
movsd -0x28(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movl %eax, %r8d
leaq -0xa8(%rbp), %r9
callq 0x287f40
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jl 0x2fec53
jmp 0x2fec72
leaq 0x96988(%rip), %rdi     # 0x3955e2
leaq 0x91bce(%rip), %rsi     # 0x39082f
movl $0x5517, %edx           # imm = 0x5517
leaq 0x968c9(%rip), %rcx     # 0x395536
callq 0x2130
movq -0xa8(%rbp), %rax
shrq $0x20, %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jne 0x2fec87
jmp 0x2feca6
leaq 0x96959(%rip), %rdi     # 0x3955e7
leaq 0x91b9a(%rip), %rsi     # 0x39082f
movl $0x5517, %edx           # imm = 0x5517
leaq 0x96895(%rip), %rcx     # 0x395536
callq 0x2130
movl -0xa0(%rbp), %eax
movq -0x80(%rbp), %rcx
movl -0x68(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jne 0x2fecc1
jmp 0x2fece0
leaq 0x9692d(%rip), %rdi     # 0x3955f5
leaq 0x91b60(%rip), %rsi     # 0x39082f
movl $0x5517, %edx           # imm = 0x5517
leaq 0x9685b(%rip), %rcx     # 0x395536
callq 0x2130
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movw -0x98(%rbp), %ax
andw $0xc000, %ax            # imm = 0xC000
orw $0x0, %ax
movw %ax, -0x98(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2f6e80
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x58(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl %eax
movl %eax, %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x2fee19
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x4(%rdx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x2fee19
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x4(%rdx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
jne 0x2fee19
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x2feefa
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x2feef1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xa0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x44(%rbp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x4(%rdx), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xa8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xa0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x98(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2feefc
jmp 0x2feefe
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2fe9e0
jmp 0x2fef0e
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2fe8c5
cmpl $0x0, -0x48(%rbp)
je 0x2fef70
movl -0x48(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl -0x48(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subl -0x48(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x2fef86
movl $0x0, -0x6c(%rbp)
movq $0x0, -0x78(%rbp)
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
jmp 0x2fe8a6
movq -0x10(%rbp), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2ff0c0
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
je 0x2ff01c
jmp 0x2ff0b2
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movl -0x64(%rbp), %eax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,8), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x20(%rbp), %rax
movl %eax, %ecx
movsd -0x28(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movl %eax, %r8d
leaq -0xa8(%rbp), %r9
callq 0x287f40
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jl 0x2ff09c
movq -0xa8(%rbp), %rax
shrq $0x20, %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
je 0x2ff09e
jmp 0x2ff0b2
movq -0xb8(%rbp), %rax
movl -0xa0(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2fefab
jmp 0x2ff0c2
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x2fe5a0
movq -0xb8(%rbp), %rdi
callq 0x2210
movq -0xc0(%rbp), %rdi
callq 0x2210
cmpl $0x0, -0x40(%rbp)
je 0x2ff12c
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2210
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x0, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0xcdd10
movq -0x8(%rbp), %rdi
callq 0xce020
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)