// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: push_graph_bin(overlap_region_alloc*, ul_idx_t const*, double, unsigned long, unsigned long, unsigned long, asg64_v*, mask_ul_ov_t*, kv_emask_t*)
void push_graph_bin(overlap_region_alloc* ol, const ul_idx_t *udb, double erate, uint64_t maxe, uint64_t minov, uint64_t rid, asg64_v *b0, mask_ul_ov_t *mk, kv_emask_t *res)
{
	uint64_t k, i, si, sn, zt, re, skip_n; overlap_region *z; ul_ov_t p, *sa; 
	uint64_t q0l, t0l, e0l, q1l, t1l, e1l, mm, occ[3], mocc, mn[3];
	b0->n = 0; 
	mocc = (udb->ug->u.a[rid].len/sizeof((*(res->a))))/8; if(mocc < 16) mocc = 16;
	
	// fprintf(stderr, "\n[M::%s]\tutg%.6lu%c\n", __func__, rid+1, "lc"[udb->ug->u.a[rid].circ]);

	mk->srt.n = mk->idx.n = 0;
	gen_src_shared_interval_adv(rid, udb->ug, &(mk->srt));
	kv_resize(uint64_t, mk->idx, ol->length);
	for (k = 0; k < ol->length; k++) {
		kv_push(uint64_t, mk->idx, (((uint64_t)ol->list[k].y_id)<<32)|((uint64_t)k));
	}
	radix_sort_gfa64(mk->idx.a, mk->idx.a+mk->idx.n);///sort by the unitig id
	// if(rid == 4) {
	// 	sa = mk->srt.a; sn = mk->srt.n;
	// 	for (si = 0; si < sn; si++) {
	// 		fprintf(stderr, "si::%lu[M::%s]\tutg%.6u%c\tq::[%u,\t%u)\t%c\tutg%.6u%c\tt::[%u,\t%u)\n", si, __func__, 
	// 		sa[si].qn+1, "lc"[udb->ug->u.a[sa[si].qn].circ], sa[si].qs, sa[si].qe, "+-"[sa[si].rev],
	// 		sa[si].tn+1, "lc"[udb->ug->u.a[sa[si].tn].circ], sa[si].ts, sa[si].te);
	// 	}	
	// }

	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t0\t\n", __func__); 


	for (i = si = b0->n = 0, occ[0] = occ[1] = occ[2] = 0; i < mk->idx.n; i++) {
		k = (uint32_t)mk->idx.a[i];
		z = &(ol->list[k]);
		overlap_region2ul_ov_t(z, &p, udb->ug->u.a[z->y_id].len);
		if(((p.qe-p.qs) >= minov) && ((p.te-p.ts) >= minov)) {
			if(!trans_ovlp_connect(&p, udb->ug)) continue;//could be eaisly detected
			if(p.sec == 0) {///no error
				zt = ((uint32_t)-1); zt <<= 32; zt |= (i<<1); occ[2]++;
				kv_push(uint64_t, *b0, zt); continue;
			}
			sa = get_mask_interval(&p, &(mk->srt), &si, udb->ug->u.a[p.qn].len, udb->ug->u.a[p.tn].len, &sn, &skip_n);
			// if(p.qn == 4 && p.tn == 3) {
			// 	fprintf(stderr, "[M::%s]\tutg%.6u%c\tq::[%u,\t%u)\t%c\tutg%.6u%c\tt::[%u,\t%u)\tsn::%lu\tskip_n::%lu\n", __func__, 
			// 	p.qn+1, "lc"[udb->ug->u.a[p.qn].circ], p.qs, p.qe, "+-"[p.rev],
			// 	p.tn+1, "lc"[udb->ug->u.a[p.tn].circ], p.ts, p.te, sn, skip_n);
			// 	uint32_t ci;
			// 	for (ci = 0; ci < sn; ci++) {
			// 		fprintf(stderr, "sa::[M::%s]\tutg%.6u%c\tq::[%u,\t%u)\t%c\tutg%.6u%c\tt::[%u,\t%u)\n", __func__, 
			// 		sa[ci].qn+1, "lc"[udb->ug->u.a[sa[ci].qn].circ], sa[ci].qs, sa[ci].qe, "+-"[sa[ci].rev],
			// 		sa[ci].tn+1, "lc"[udb->ug->u.a[sa[ci].tn].circ], sa[ci].ts, sa[ci].te);
			// 	}	
			// }
			
			
			re = cal_exact_batch(z, sa, sn, udb->ug->u.a[p.tn].len, &q0l, &t0l, &e0l, &q1l, &t1l, &e1l, udb->ug);
			if(!re) {//no unmask errors
				zt = ((uint32_t)-1); zt <<= 32; zt |= (i<<1); occ[2]++;
				kv_push(uint64_t, *b0, zt); continue;
			}
			// if(p.qn == 4 && p.tn == 3) {
			// 	fprintf(stderr, "[M::%s]\tutg%.6u%c\tq0l::%lu\tt0l::%lu\te0l::%lu\tutg%.6u%c\tq1l::%lu\tt1l::%lu\te1l::%lu\n", __func__, 
			// 	p.qn+1, "lc"[udb->ug->u.a[p.qn].circ], q0l, t0l, e0l,
			// 	p.tn+1, "lc"[udb->ug->u.a[p.tn].circ], q1l, t1l, e1l);
			// }
			mm = ((re <= maxe)?((uint64_t)(0x8000000000000000)):(0));
			///left end
			if(q0l >= minov && t0l >= minov) {
				zt = MIN(q0l, t0l); zt <<= 32; zt |= (i<<1); zt |= mm; occ[!!mm]++;
				kv_push(uint64_t, *b0, zt);
			}

			///right end
			if(q1l >= minov && t1l >= minov) {
				zt = MIN(q1l, t1l); zt <<= 32; zt |= (i<<1); zt += 1; zt |= mm; occ[!!mm]++;
				kv_push(uint64_t, *b0, zt);
			}
		}
	}

	radix_sort_gfa64(b0->a, b0->a+b0->n);
	uint64_t *a0, *a1, *a2, a0n, a1n, a2n, *a, m;
	a2 = b0->a; a2n = occ[0]; mn[2] = mocc>>2;//high error
	a1 = a2 + a2n; a1n = occ[1]; mn[1] = mocc>>1;//low error
	a0 = a1 + a1n; a0n = occ[2]; mn[0] = mocc>>2;//0 error
	mn[1] = mocc - mn[0] - mn[2];

	sn = a2n; a = a2;//high error
	for (i = 0, si = sn>>1; i < si; i++) {
		m = a[i]; a[i] = a[sn-i-1]; a[sn-i-1] = m;
	}

	sn = a1n; a = a1;//low error
	for (i = 0, si = sn>>1; i < si; i++) {
		m = a[i]; a[i] = a[sn-i-1]; a[sn-i-1] = m;
	}
	
	sn = a0n; a = a0;//0 error
	for (i = 0; i < sn; i++) {
		z = &(ol->list[(((uint32_t)a[i])>>1)]);
		q0l = z->x_pos_e+1-z->x_pos_s;
		t0l = z->y_pos_e+1-z->y_pos_s;
		m = ((uint32_t)-1) - (MIN(q0l, t0l)); m <<= 32; m |= ((uint32_t)a[i]);
		a[i] = m;
	}
	radix_sort_gfa64(a, a+sn);///sort by length
	///a1 -> a2 -> a0
	if(mn[1] > a1n) mn[1] = a1n;
	if(mn[2] > a2n) mn[2] = a2n;
	if(mn[0] > a0n) mn[0] = a0n;

	///reassign a1
	mn[1] = mocc - mn[0] - mn[2];
	if(mn[1] > a1n) mn[1] = a1n;

	///reassign a2
	mn[2] = mocc - mn[1] - mn[0];
	if(mn[2] > a2n) mn[2] = a2n;

	///reassign a0
	mn[0] = mocc - mn[1] - mn[2];
	if(mn[0] > a0n) mn[0] = a0n;

	res->n = res->m = mn[0]+mn[1]+mn[2]; 
	MALLOC(res->a, res->n);
	res->n = 0;
	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t1\t\n", __func__); 
	// fprintf(stderr, "\n[M::%s]\tutg%.6lu%c\t#s::%u\tmn[0]::%lu\tmn[1]::%lu\tmn[2]::%lu\n", __func__, 
	// rid+1, "lc"[udb->ug->u.a[rid].circ], (uint32_t)mk->srt.n, mn[0], mn[1], mn[2]);
	push_emask_lst(mk, ol, minov, udb->ug, a2, mn[2], res, 1);
	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t2\t\n", __func__); 
	// fprintf(stderr, "[M::%s]\tutg%.6lu%c\tres->n::%u\n", __func__, rid+1, "lc"[udb->ug->u.a[rid].circ], res->n);
	push_emask_lst(mk, ol, minov, udb->ug, a1, mn[1], res, 1);
	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t3\t\n", __func__); 
	// fprintf(stderr, "[M::%s]\tutg%.6lu%c\tres->n::%u\n", __func__, rid+1, "lc"[udb->ug->u.a[rid].circ], res->n);
	push_emask_lst(mk, ol, minov, udb->ug, a0, mn[0], res, 0);
	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t4\t\n", __func__); 
	// fprintf(stderr, "[M::%s]\tutg%.6lu%c\tres->n::%u\n", __func__, rid+1, "lc"[udb->ug->u.a[rid].circ], res->n);
	srt_kv_emask_t(res, mk, rid, udb->ug);
	// if(ol->length > 0 && ol->list[0].x_id == 29033) fprintf(stderr, "[M::%s]\t5\t\n", __func__); 
	
	// for (k = 0; k < mk->srt.n; k++) {
	// 	fprintf(stderr, "[M::%s]\tutg%.6u%c\tq::[%u,\t%u)\t%c\tutg%.6u%c\tt::[%u,\t%u)\n", __func__, 
	// 	mk->srt.a[k].qn+1, "lc"[udb->ug->u.a[mk->srt.a[k].qn].circ], mk->srt.a[k].qs, mk->srt.a[k].qe, "+-"[mk->srt.a[k].rev],
	// 	mk->srt.a[k].tn+1, "lc"[udb->ug->u.a[mk->srt.a[k].tn].circ], mk->srt.a[k].ts, mk->srt.a[k].te);
	// }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %rbx
movq %rcx, 0x8(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, %rbp
movq 0x118(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x110(%rsp), %r12
xorl %eax, %eax
movq %rax, (%r9)
movq %rsi, 0x20(%rsp)
movq (%rsi), %rsi
movq 0x10(%rsi), %rcx
leaq (%r8,%r8,4), %rdx
movl (%rcx,%rdx,8), %ecx
movl %ecx, 0x50(%rsp)
movq %rax, (%r12)
leaq 0x18(%r12), %rdx
movq %rax, 0x20(%r12)
movl %r8d, %edi
movq %rdx, 0x40(%rsp)
callq 0x1c90d8
movq 0x10(%rbp), %rax
cmpq %rax, 0x8(%r12)
jae 0x1cc9a5
decq %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x10, %rcx
orq %rax, %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x8(%r12)
movq 0x10(%r12), %rdi
leaq 0x8(,%rcx,8), %rsi
callq 0x2370
movq %rax, 0x10(%r12)
movq 0x10(%rbp), %rax
movq 0x10(%r12), %rdi
testq %rax, %rax
movq %rbx, 0x10(%rsp)
je 0x1cca1c
movl $0x10, %ebx
xorl %r14d, %r14d
movl $0x2, %r15d
movq (%r12), %rax
cmpq 0x8(%r12), %rax
jne 0x1cc9f2
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%r12)
shlq $0x3, %rsi
callq 0x2370
movq %rax, %rdi
movq %rax, 0x10(%r12)
movq (%r12), %rax
movq (%rbp), %rcx
movl (%rcx,%rbx), %ecx
shlq $0x20, %rcx
orq %r14, %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r12)
movq %rcx, (%rdi,%rax,8)
incq %r14
addq $0xa8, %rbx
cmpq 0x10(%rbp), %r14
jb 0x1cc9c2
movq (%r12), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x19dd99
xorl %r13d, %r13d
movq 0x10(%rsp), %rbx
movq %r13, (%rbx)
movq %r13, 0xb8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq %r13, 0x80(%rsp)
movl $0x0, %r14d
movl $0x0, %eax
movl $0x0, %ecx
movq %rcx, 0x28(%rsp)
cmpq %r13, (%r12)
movq %rbp, 0x30(%rsp)
je 0x1cce35
xorl %ebp, %ebp
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %r9
movq %r12, 0x18(%rsp)
movq 0x10(%r12), %rax
movl (%rax,%rbp,8), %eax
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
imulq $0xa8, %rax, %rdx
leaq (%rcx,%rdx), %r14
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rsi), %r12
movl (%rcx,%rdx), %ebx
movl 0x10(%rcx,%rdx), %eax
leaq (%rax,%rax,4), %r10
movl (%r12,%r10,8), %r13d
movl %ebx, 0x54(%rsp)
movl %eax, 0x60(%rsp)
movl 0x30(%rcx,%rdx), %r15d
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl %eax, %r15d
movl 0x1c(%rcx,%rdx), %edi
shll $0x1f, %edi
leal (%r15,%rdi), %eax
addl $0x40000000, %eax       # imm = 0x40000000
movl %eax, 0x6c(%rsp)
movl 0x4(%rcx,%rdx), %eax
movl %eax, 0x58(%rsp)
movl 0x8(%rcx,%rdx), %ecx
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
incl %ecx
movl %ecx, 0x5c(%rsp)
testl %edi, %edi
je 0x1ccb16
movl 0x18(%r14), %edx
notl %edx
addl %r13d, %edx
movl 0x14(%r14), %r8d
movl %r13d, %edi
subl %r8d, %edi
jmp 0x1ccb20
movl 0x14(%r14), %edx
movl 0x18(%r14), %edi
incl %edi
movl %edx, 0x64(%rsp)
movl %edi, 0x68(%rsp)
subl %eax, %ecx
cmpq %r9, %rcx
jb 0x1ccd50
subl %edx, %edi
cmpq %r9, %rdi
jb 0x1ccd50
movq %r10, 0x48(%rsp)
leaq 0x54(%rsp), %rdi
callq 0x1c3c2d
testl %eax, %eax
je 0x1ccd5a
testl %r15d, %r15d
je 0x1ccd69
leaq (%rbx,%rbx,4), %rax
movl (%r12,%rax,8), %ecx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andq %rbx, %rcx
subq $0x8, %rsp
leaq 0x5c(%rsp), %rdi
movq 0x48(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
movq %r13, %r8
leaq 0xb8(%rsp), %r9
leaq 0xd8(%rsp), %rax
pushq %rax
callq 0x1cab51
addq $0x10, %rsp
movq 0xb0(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movq 0x48(%rsp), %rsi
movl (%rcx,%rsi,8), %ecx
andq %rbx, %rcx
subq $0x10, %rsp
movq %r14, %rdi
movq %rax, %rsi
leaq 0xb8(%rsp), %r8
leaq 0xb0(%rsp), %r9
leaq 0xd0(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
leaq 0xb8(%rsp), %rax
pushq %rax
leaq 0xf0(%rsp), %rax
pushq %rax
callq 0x1cb063
addq $0x30, %rsp
testq %rax, %rax
je 0x1ccda9
movq %rax, %r14
xorl %r13d, %r13d
cmpq 0x38(%rsp), %rax
setbe %r13b
shlq $0x3f, %r13
movq 0xa8(%rsp), %rax
movq 0x8(%rsp), %r9
cmpq %r9, %rax
movq 0x18(%rsp), %r12
jb 0x1cccb8
movq 0xa0(%rsp), %rbx
cmpq %r9, %rbx
jb 0x1cccb8
xorl %ecx, %ecx
cmpq 0x38(%rsp), %r14
setbe %cl
cmpq %rbx, %rax
cmovbq %rax, %rbx
incq 0x70(%rsp,%rcx,8)
movq 0x10(%rsp), %r15
movq (%r15), %rcx
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rcx
jne 0x1ccc9b
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r15)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x8(%rsp), %r9
movq %rax, 0x10(%r15)
movq (%r15), %rcx
shlq $0x20, %rbx
leaq (,%rbp,2), %rdx
orq %rbx, %rdx
orq %r13, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r15)
movq %rdx, (%rax,%rcx,8)
movq 0x98(%rsp), %rax
cmpq %r9, %rax
jb 0x1cce11
movq 0x90(%rsp), %rbx
cmpq %r9, %rbx
jb 0x1cce11
xorl %ecx, %ecx
cmpq 0x38(%rsp), %r14
setbe %cl
cmpq %rbx, %rax
cmovbq %rax, %rbx
incq 0x70(%rsp,%rcx,8)
movq 0x10(%rsp), %r14
movq (%r14), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rcx
jne 0x1ccd2e
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%r14)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq 0x8(%rsp), %r9
movq %rax, 0x10(%r14)
movq (%r14), %rcx
shlq $0x20, %rbx
leaq (,%rbp,2), %rdx
orq %rbx, %rdx
orq %r13, %rdx
orq $0x1, %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r14)
jmp 0x1cce0d
movq 0x18(%rsp), %r12
jmp 0x1cce11
movq 0x18(%rsp), %r12
movq 0x8(%rsp), %r9
jmp 0x1cce11
movq 0x10(%rsp), %rbx
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
jne 0x1ccda2
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
movq 0x18(%rsp), %r12
jmp 0x1ccde7
movq 0x10(%rsp), %rbx
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rcx
movq 0x18(%rsp), %r12
jne 0x1ccde7
leaq (%rcx,%rcx), %rsi
testq %rcx, %rcx
movl $0x2, %ecx
cmoveq %rcx, %rsi
movq %rsi, 0x8(%rbx)
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2370
movq %rax, 0x10(%rbx)
movq (%rbx), %rcx
movq 0x8(%rsp), %r9
leaq (,%rbp,2), %rdx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
orq %rsi, %rdx
incq 0x28(%rsp)
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movq %rdx, (%rax,%rcx,8)
incq %rbp
cmpq (%r12), %rbp
jb 0x1cca85
movq 0x10(%rsp), %rbx
movq (%rbx), %rax
movq 0x70(%rsp), %r14
movq 0x78(%rsp), %r13
movq 0x30(%rsp), %rbp
movq 0x10(%rbx), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x19dd99
movq 0x10(%rbx), %r10
cmpq $0x2, %r14
jb 0x1cce7c
movq %r14, %rax
shrq %rax
negq %rax
leaq (%r10,%r14,8), %rcx
addq $-0x8, %rcx
xorl %edx, %edx
movq %r10, %rsi
movq (%rsi), %rdi
movq (%rcx,%rdx,8), %r8
movq %r8, (%rsi)
movq %rdi, (%rcx,%rdx,8)
decq %rdx
addq $0x8, %rsi
cmpq %rdx, %rax
jne 0x1cce62
leaq (%r10,%r14,8), %r11
cmpq $0x2, %r13
movq 0x28(%rsp), %r9
jb 0x1ccec6
movq %r13, %rax
shrq %rax
negq %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%r14,8), %rcx
addq %r10, %rcx
addq $-0x8, %rcx
xorl %edx, %edx
movq %r11, %rsi
movq (%rsi), %rdi
movq (%rcx,%rdx,8), %r8
movq %r8, (%rsi)
movq %rdi, (%rcx,%rdx,8)
decq %rdx
addq $0x8, %rsi
cmpq %rdx, %rax
jne 0x1cceac
movq %r11, 0x48(%rsp)
leaq (%r11,%r13,8), %rdi
testq %r9, %r9
je 0x1ccf26
movq (%rbp), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%r14,8), %rcx
addq %r10, %rcx
xorl %edx, %edx
movl (%rcx,%rdx,8), %esi
shrl %esi
imulq $0xa8, %rsi, %rsi
movl 0x8(%rax,%rsi), %r11d
subl 0x4(%rax,%rsi), %r11d
movl 0x18(%rax,%rsi), %r8d
incl %r11d
subl 0x14(%rax,%rsi), %r8d
incl %r8d
cmpl %r8d, %r11d
cmovbl %r11d, %r8d
notl %r8d
movl %r8d, 0x4(%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %r9
jne 0x1ccee9
movl 0x50(%rsp), %eax
shrl $0x8, %eax
andl $0x7fffff, %eax         # imm = 0x7FFFFF
cmpl $0x11, %eax
movl $0x10, %ebp
cmovael %eax, %ebp
movl %ebp, %ebx
shrl $0x2, %ebx
leaq (%rdi,%r9,8), %rsi
movq %r9, %r15
movq %r10, 0x40(%rsp)
movq %rdi, 0x10(%rsp)
callq 0x19dd99
cmpq %r14, %rbx
movq %r14, %rax
cmovbq %rbx, %rax
cmpq %r15, %rbx
cmovaeq %r15, %rbx
addq %rbx, %rax
movq %r14, %rcx
movq %rbp, %r14
subq %rax, %r14
cmpq %r13, %r14
cmovaeq %r13, %r14
subq %r14, %rbp
movq %rbp, %r13
subq %rbx, %r13
cmpq %rcx, %r13
cmovaeq %rcx, %r13
subq %r13, %rbp
cmpq %r15, %rbp
cmovaeq %r15, %rbp
leaq (%r14,%r13), %rdi
addq %rbp, %rdi
movq 0x88(%rsp), %rbx
movq %rdi, 0x10(%rbx)
shlq $0x5, %rdi
callq 0x2280
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movl $0x1, %eax
movq %r12, %rdi
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %r15
movq %r15, %rdx
movq 0x40(%rsp), %r8
movq %r13, %r9
pushq %rax
pushq %rbx
callq 0x1cbd6f
addq $0x10, %rsp
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movq %r12, %rdi
movq 0x30(%rsp), %r13
movq %r13, %rsi
movq %r15, %rdx
movq 0x48(%rsp), %r8
movq %r14, %r9
movl $0x1, %eax
pushq %rax
pushq %rbx
callq 0x1cbd6f
addq $0x10, %rsp
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %r8
movq %rbp, %r9
xorl %eax, %eax
pushq %rax
pushq %rbx
callq 0x1cbd6f
addq $0x10, %rsp
movq %rbx, %rdi
movq %r12, %rsi
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1cc475