// File: /workspace/github_cpp_makefile_star2_O1/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 $0xe8, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, %r13
movq 0x128(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x120(%rsp), %r12
xorl %eax, %eax
movq %r9, 0x8(%rsp)
movq %rax, (%r9)
movq %rsi, 0x30(%rsp)
movq (%rsi), %rsi
movq 0x10(%rsi), %rcx
leaq (%r8,%r8,4), %rdx
movl (%rcx,%rdx,8), %ecx
movl %ecx, 0x70(%rsp)
movq %rax, (%r12)
leaq 0x18(%r12), %rdx
movq %rax, 0x20(%r12)
movl %r8d, %edi
movq %rdx, 0xb8(%rsp)
callq 0x1bf2ca
movq 0x10(%r13), %rax
cmpq %rax, 0x8(%r12)
jae 0x1c29ba
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)
cmpq $0x0, 0x10(%r13)
je 0x1c2a30
movl $0x10, %ebx
xorl %r14d, %r14d
movl $0x2, %r15d
movq 0x8(%r12), %rax
cmpq %rax, (%r12)
jne 0x1c29fd
leaq (%rax,%rax), %rsi
testq %rax, %rax
cmoveq %r15, %rsi
movq %rsi, 0x8(%r12)
movq 0x10(%r12), %rdi
shlq $0x3, %rsi
callq 0x2370
movq %rax, 0x10(%r12)
movq (%r13), %rax
movl (%rax,%rbx), %eax
shlq $0x20, %rax
orq %r14, %rax
movq (%r12), %rcx
movq 0x10(%r12), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%r12)
movq %rax, (%rdx,%rcx,8)
incq %r14
addq $0xa8, %rbx
cmpq 0x10(%r13), %r14
jb 0x1c29cf
movq (%r12), %rax
movq 0x10(%r12), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x194fef
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq %rcx, 0x68(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq %rcx, 0xa0(%rsp)
movq $0x0, 0x28(%rsp)
cmpq %rcx, (%r12)
movq 0x20(%rsp), %r9
movq %r13, 0x10(%rsp)
je 0x1c2dff
movl $0x40000000, %ebp       # imm = 0x40000000
leaq 0x74(%rsp), %rax
orl 0x18(%rax), %ebp
xorl %r15d, %r15d
movq $0x0, 0x28(%rsp)
movq %r12, 0x18(%rsp)
movq 0x10(%r12), %rax
movl (%rax,%r15,8), %eax
movq (%r13), %rcx
imulq $0xa8, %rax, %rdx
leaq (%rcx,%rdx), %r14
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rsi), %r11
movl (%rcx,%rdx), %r12d
movl 0x10(%rcx,%rdx), %eax
leaq (%rax,%rax,4), %r10
movl (%r11,%r10,8), %r13d
movl %r12d, 0x74(%rsp)
movl %eax, 0x80(%rsp)
movl %ebp, 0x8c(%rsp)
movl 0x30(%rcx,%rdx), %ebx
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl %eax, %ebx
andl $0xc0000000, %ebp       # imm = 0xC0000000
orl %ebx, %ebp
movl %ebp, 0x8c(%rsp)
movl 0x1c(%rcx,%rdx), %edi
shll $0x1f, %edi
leal (%rbx,%rdi), %ebp
addl $0x40000000, %ebp       # imm = 0x40000000
movl %ebp, 0x8c(%rsp)
movl 0x4(%rcx,%rdx), %eax
movl %eax, 0x78(%rsp)
movl 0x8(%rcx,%rdx), %ecx
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
incl %ecx
movl %ecx, 0x7c(%rsp)
testl %edi, %edi
je 0x1c2b50
movl 0x18(%r14), %edx
notl %edx
addl %r13d, %edx
movl %edx, 0x84(%rsp)
movl 0x14(%r14), %r8d
movl %r13d, %edi
subl %r8d, %edi
jmp 0x1c2b61
movl 0x14(%r14), %edx
movl %edx, 0x84(%rsp)
movl 0x18(%r14), %edi
incl %edi
movl %edi, 0x88(%rsp)
subl %eax, %ecx
cmpq %r9, %rcx
jb 0x1c2d15
subl %edx, %edi
cmpq %r9, %rdi
jb 0x1c2d15
movq %r11, 0x48(%rsp)
movq %r10, 0x50(%rsp)
leaq 0x74(%rsp), %rdi
callq 0x1b9e17
testl %eax, %eax
je 0x1c2d8d
testl %ebx, %ebx
je 0x1c2d1c
leaq (%r12,%r12,4), %rax
movq 0x48(%rsp), %rcx
movl (%rcx,%rax,8), %ecx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andq %rbx, %rcx
subq $0x8, %rsp
leaq 0x7c(%rsp), %rdi
movq 0xc0(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movq %r13, %r8
leaq 0x40(%rsp), %r9
leaq 0xe8(%rsp), %rax
pushq %rax
callq 0x1c0b65
addq $0x10, %rsp
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movq 0x50(%rsp), %rsi
movl (%rcx,%rsi,8), %ecx
andq %rbx, %rcx
subq $0x10, %rsp
movq %r14, %rdi
movq %rax, %rsi
leaq 0x70(%rsp), %r8
leaq 0x68(%rsp), %r9
leaq 0xe0(%rsp), %rax
pushq %rax
leaq 0xd8(%rsp), %rax
pushq %rax
leaq 0xe8(%rsp), %rax
pushq %rax
leaq 0x100(%rsp), %rax
pushq %rax
callq 0x1c1081
addq $0x30, %rsp
testq %rax, %rax
je 0x1c2d1c
movq %rax, %r14
xorl %ebx, %ebx
cmpq 0x40(%rsp), %rax
setbe %bl
shlq $0x3f, %rbx
movq 0x60(%rsp), %rax
movq 0x20(%rsp), %r9
cmpq %r9, %rax
movq 0x10(%rsp), %r13
jb 0x1c2cfa
movq 0x58(%rsp), %r12
cmpq %r9, %r12
jb 0x1c2cfa
xorl %ecx, %ecx
cmpq 0x40(%rsp), %r14
setbe %cl
cmpq %r12, %rax
cmovbq %rax, %r12
incq 0x90(%rsp,%rcx,8)
movq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rax
cmpq %rax, (%rdi)
jne 0x1c2cda
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rdi)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %r9
movq %rax, 0x10(%rdi)
shlq $0x20, %r12
leaq (%r15,%r15), %rax
orq %r12, %rax
orq %rbx, %rax
movq (%rdi), %rcx
movq 0x10(%rdi), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rdi)
movq %rax, (%rdx,%rcx,8)
movq 0xc8(%rsp), %rcx
cmpq %r9, %rcx
jae 0x1c2dab
movq 0x18(%rsp), %r12
jmp 0x1c2d9c
movq 0x18(%rsp), %r12
jmp 0x1c2d97
leaq (%r15,%r15), %r14
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
orq %rax, %r14
incq 0x28(%rsp)
movq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rax
cmpq %rax, (%rdi)
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %r13
jne 0x1c2d74
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%rdi)
movq 0x10(%rdi), %rdi
shlq $0x3, %rsi
callq 0x2370
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rdi)
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rdi)
movq %r14, (%rcx,%rax,8)
movq 0x20(%rsp), %r9
jmp 0x1c2d9c
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %r13
incq %r15
cmpq (%r12), %r15
jb 0x1c2a9f
jmp 0x1c2dff
movq 0xc0(%rsp), %rax
cmpq %r9, %rax
movq 0x18(%rsp), %r12
jb 0x1c2d9c
xorl %edx, %edx
cmpq 0x40(%rsp), %r14
setbe %dl
cmpq %rax, %rcx
cmovbq %rcx, %rax
shlq $0x20, %rax
leaq (%r15,%r15), %r14
orq %rax, %r14
orq %rbx, %r14
incq 0x90(%rsp,%rdx,8)
orq $0x1, %r14
movq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rax
cmpq %rax, (%rdi)
je 0x1c2d4a
jmp 0x1c2d74
movq 0x28(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x8(%rsp), %rbx
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x194fef
movq 0x10(%rbx), %r9
movq 0x90(%rsp), %r14
movq 0x98(%rsp), %r13
movq 0xa0(%rsp), %r15
movq %r14, 0x38(%rsp)
movq %r14, %rax
shrq %rax
movq %rax, 0x68(%rsp)
cmpq $0x2, %r14
jb 0x1c2e7d
negq %rax
leaq (%r9,%r14,8), %rcx
addq $-0x8, %rcx
xorl %edx, %edx
movq %r9, %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 0x1c2e63
leaq (%r9,%r14,8), %r10
movq %r13, 0x38(%rsp)
movq %r13, %rax
shrq %rax
movq %rax, 0x68(%rsp)
cmpq $0x2, %r13
jb 0x1c2ecc
negq %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%r14,8), %rcx
addq %r9, %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 0x1c2eb2
leaq (%r10,%r13,8), %rdi
movq %r15, 0x38(%rsp)
testq %r15, %r15
movq %r9, 0x50(%rsp)
movq %r10, 0x48(%rsp)
je 0x1c2f3e
movq 0x10(%rsp), %rax
movq (%rax), %rcx
leaq (,%r13,8), %rax
leaq (%rax,%r14,8), %rdx
addq %r9, %rdx
xorl %esi, %esi
movl (%rdx,%rsi,8), %eax
shrl %eax
imulq $0xa8, %rax, %r8
movl 0x8(%rcx,%r8), %r9d
movl 0x18(%rcx,%r8), %eax
subl 0x4(%rcx,%r8), %r9d
incl %r9d
subl 0x14(%rcx,%r8), %eax
incl %eax
cmpq %rax, %r9
movq %rax, %r8
cmovbq %r9, %r8
notl %r8d
movl %r8d, 0x4(%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %r15
jne 0x1c2efd
jmp 0x1c2f48
movq 0x60(%rsp), %r9
movq 0x58(%rsp), %rax
movq %r9, 0x60(%rsp)
movl 0x70(%rsp), %ecx
shrl $0x8, %ecx
andl $0x7fffff, %ecx         # imm = 0x7FFFFF
cmpl $0x11, %ecx
movl $0x10, %ebp
cmovael %ecx, %ebp
movq %rax, 0x58(%rsp)
movl %ebp, %ebx
shrl $0x2, %ebx
leaq (%rdi,%r15,8), %rsi
movq %rdi, 0x8(%rsp)
callq 0x194fef
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 0xb0(%rsp), %rbx
movq %rdi, 0x10(%rbx)
movq %rdi, 0x8(%rbx)
shlq $0x5, %rdi
callq 0x2280
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x30(%rsp), %rax
movq (%rax), %rcx
movl $0x1, %eax
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %r15
movq %r15, %rdx
movq 0x50(%rsp), %r8
movq %r13, %r9
pushq %rax
pushq %rbx
callq 0x1c1cf2
addq $0x10, %rsp
movq 0x30(%rsp), %r13
movq (%r13), %rcx
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq 0x48(%rsp), %r8
movq %r14, %r9
movl $0x1, %eax
pushq %rax
pushq %rbx
callq 0x1c1cf2
addq $0x10, %rsp
movq (%r13), %rcx
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq 0x8(%rsp), %r8
movq %rbp, %r9
xorl %eax, %eax
pushq %rax
pushq %rbx
callq 0x1c1cf2
addq $0x10, %rsp
movq %rbx, %rdi
movq %r12, %rsi
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c245d