// File: chhylp123[P]hifiasm/inter.cpp
// Function: renew_consensus_chain(kv_ul_ov_t*, unsigned int, unsigned int, kv_ul_ov_t*, asg64_v*, R_to_U*, ug_opt_t const*, asg_t const*, long, double, unsigned int, Chain_Data*, unsigned long, unsigned int)
void renew_consensus_chain(kv_ul_ov_t *in, uint32_t in_s, uint32_t in_e, kv_ul_ov_t *idx, asg64_v *ou, R_to_U *ri,
const ug_opt_t *uopt, const asg_t *rg, int64_t bw, double diff_ec_ul, uint32_t arc_id, Chain_Data* dp, uint64_t rlen, uint32_t ulid)
{	
	if(in_e <= in_s) return;
	uint64_t mqs, mqe, k, l, ou_n = ou->n, stn, etn;
	collect_pp_ovlps(in->a + in_s, in_e - in_s, idx, uopt, rg, rlen, ulid, &mqs, &mqe);
	// if(ulid == 7723 && in_e-in_s == 2 && in->a[in_s].tn == (7723>>1) && in->a[in_e-1].tn == (7829>>1)) {
	// 	fprintf(stderr, "-0-[M::%s] ulid::%u, idx->n::%u\n", __func__, ulid, (uint32_t)idx->n);
	// }
	if(!idx->n) return;///it is possible
	kv_resize(uint64_t, *ou, (ou_n+(in_e-in_s)));
	for (k = in_s; k < in_e; k++) {
		if(in->a[k].el) continue;
		ou->a[ou_n++] = in->a[k].tn;
	}
	assert(ou_n <= ou->m);
	radix_sort_gfa64(ou->a+ou->n, ou->a+ou_n);
	gen_linear_rchains_dedup(idx, in, rg, uopt, bw, diff_ec_ul, rlen, dp, ulid, ou->a+ou->n, ou_n-ou->n);
	// if(ulid == 7723 && in_e-in_s == 2 && in->a[in_s].tn == (7723>>1) && in->a[in_e-1].tn == (7829>>1)) {
	// 	fprintf(stderr, "-1-[M::%s] ulid::%u, idx->n::%u\n", __func__, ulid, (uint32_t)idx->n);
	// }
	if(!idx->n) return;///it is possible
	stn = etn = (uint64_t)-1;
	if(in_e > in_s && in->a[in_s].el) stn = in->a[in_s].tn;
	if(in_e-in_s>1 && in->a[in_e-1].el) etn = in->a[in_e-1].tn;
	idx->n = gen_cns_chain_linear_hard(idx->a, idx->n, rg, rlen, bw, diff_ec_ul, dp, UG_SKIP_N, UG_ITER_N, UG_DIS_N, mqs, mqe, ulid, stn, etn);
	// if(ulid == 7723 && in_e-in_s == 2 && in->a[in_s].tn == (7723>>1) && in->a[in_e-1].tn == (7829>>1)) {
	// 	fprintf(stderr, "-2-[M::%s] ulid::%u, idx->n::%u\n", __func__, ulid, (uint32_t)idx->n);
	// }
	if(!idx->n) return;
	assert((stn==((uint64_t)-1))||((idx->a[0].tn == stn) && (idx->a[0].el)));
	assert((etn==((uint64_t)-1))||((idx->a[idx->n-1].tn == etn) && (idx->a[idx->n-1].el)));
	if((stn != ((uint64_t)-1)) && (etn != ((uint64_t)-1)) && idx->n < 2) return;///could happen for circle
	if(((stn != ((uint64_t)-1)) || (etn != ((uint64_t)-1))) && idx->n < 1) return;///not sure if it will happen
	ou_n = ou->n;
	for (k = in_s; k < in_e; k++) {
		if(in->a[k].el) continue;
		kv_push(uint64_t, *ou, in->a[k].tn);
	}
	for (k = 0; k < idx->n; k++) {
		if(idx->a[k].el) continue;
		kv_push(uint64_t, *ou, idx->a[k].tn);
	}
	if(ou->n == ou_n) return;
	radix_sort_gfa64(ou->a+ou_n, ou->a+ou->n);
	for (k = ou_n+1, l = ou_n; k <= ou->n; k++) {
		if(k == ou->n || ou->a[l] != ou->a[k]) {
			if(k-l > 1) break;
			l = k;
		}
	}
	assert(k > ou->n);
	ou->n = ou_n;
	l = arc_id; 
	if(arc_id == (uint32_t)-1) {///this is an isloated node
		l = idx->a[0].tn; l |= ((uint64_t)0x80000000);
	}
	l <<= 32; l |= ((uint64_t)((uint32_t)-1));
	kv_push(uint64_t, *ou, l);
	for (k = 0; k < idx->n; k++) {
		l = ((uint64_t)(idx->a[k].tn<<1))|((uint64_t)idx->a[k].rev);
		if(idx->a[k].el) l += ((uint64_t)0x100000000);
		kv_push(uint64_t, *ou, l);
	}
	kv_push(uint64_t, *ou, ((uint64_t)-1));
	for (k = in_s; k < in_e; k++) {
		l = ((uint64_t)(in->a[k].tn<<1))|((uint64_t)in->a[k].rev);
		if(in->a[k].el) l += ((uint64_t)0x100000000);
		kv_push(uint64_t, *ou, l);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xe0, %rsp
movl 0x40(%rbp), %eax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movl 0x28(%rbp), %eax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movsd %xmm0, -0x40(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x2eb150
jmp 0x2ebce0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %eax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x28(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movq 0x38(%rbp), %r9
movl 0x40(%rbp), %eax
movl %eax, %r11d
leaq -0x48(%rbp), %r10
leaq -0x50(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x2e9c80
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2eb1b7
jmp 0x2ebce0
jmp 0x2eb1b9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x68(%rbp), %rcx
movl -0x20(%rbp), %edx
subl -0x1c(%rbp), %edx
movl %edx, %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2eb2ab
movq -0x68(%rbp), %rcx
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x30(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2eb2ad
movl -0x1c(%rbp), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0x20(%rbp), %ecx
cmpq %rcx, %rax
jae 0x2eb31c
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eb2df
jmp 0x2eb30e
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x68(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x68(%rbp)
movq %rdx, (%rax,%rcx,8)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2eb2b4
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x2eb32c
jmp 0x2eb34b
leaq 0xa927c(%rip), %rdi     # 0x3945af
leaq 0xa54f5(%rip), %rsi     # 0x39082f
movl $0x4945, %edx           # imm = 0x4945
leaq 0xa9277(%rip), %rcx     # 0x3945bd
callq 0x2130
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x68(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x20(%rbp), %r8
movsd -0x40(%rbp), %xmm0
movq 0x38(%rbp), %r9
movq 0x30(%rbp), %rbx
movl 0x40(%rbp), %eax
movl %eax, %r11d
movq -0x30(%rbp), %rax
movq 0x10(%rax), %r10
movq -0x30(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %r10
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %r14
subq (%r14), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2ead70
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2eb3e9
jmp 0x2ebce0
movq $-0x1, -0x78(%rbp)
movq $-0x1, -0x70(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jbe 0x2eb438
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eb438
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x70(%rbp)
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
cmpl $0x1, %eax
jbe 0x2eb484
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eb484
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x18(%rbp), %rdx
movq 0x38(%rbp), %rcx
movq 0x20(%rbp), %r8
movsd -0x40(%rbp), %xmm0
movq 0x30(%rbp), %r9
movq -0x48(%rbp), %r14
movq -0x50(%rbp), %rbx
movl 0x40(%rbp), %eax
movl %eax, %r11d
movq -0x70(%rbp), %r10
movq -0x78(%rbp), %rax
movq $0x64, (%rsp)
movq $0x1388, 0x8(%rsp)      # imm = 0x1388
movq $0xc350, 0x10(%rsp)     # imm = 0xC350
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
callq 0x2ea310
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2eb511
jmp 0x2ebce0
movb $0x1, %al
cmpq $-0x1, -0x70(%rbp)
movb %al, -0x79(%rbp)
je 0x2eb553
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x70(%rbp), %rcx
movb %al, -0x7a(%rbp)
jne 0x2eb54d
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x2eb55c
jmp 0x2eb55e
jmp 0x2eb57d
leaq 0xa9116(%rip), %rdi     # 0x39467b
leaq 0xa52c3(%rip), %rsi     # 0x39082f
movl $0x4954, %edx           # imm = 0x4954
leaq 0xa9045(%rip), %rcx     # 0x3945bd
callq 0x2130
movb $0x1, %al
cmpq $-0x1, -0x78(%rbp)
movb %al, -0x7b(%rbp)
je 0x2eb5e5
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
cmpq -0x78(%rbp), %rcx
movb %al, -0x7c(%rbp)
jne 0x2eb5df
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x7c(%rbp)
movb -0x7c(%rbp), %al
movb %al, -0x7b(%rbp)
movb -0x7b(%rbp), %al
testb $0x1, %al
jne 0x2eb5ee
jmp 0x2eb5f0
jmp 0x2eb60f
leaq 0xa90c5(%rip), %rdi     # 0x3946bc
leaq 0xa5231(%rip), %rsi     # 0x39082f
movl $0x4955, %edx           # imm = 0x4955
leaq 0xa8fb3(%rip), %rcx     # 0x3945bd
callq 0x2130
cmpq $-0x1, -0x70(%rbp)
je 0x2eb62d
cmpq $-0x1, -0x78(%rbp)
je 0x2eb62d
movq -0x28(%rbp), %rax
cmpq $0x2, 0x8(%rax)
jae 0x2eb62d
jmp 0x2ebce0
cmpq $-0x1, -0x70(%rbp)
jne 0x2eb63b
cmpq $-0x1, -0x78(%rbp)
je 0x2eb64b
movq -0x28(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jae 0x2eb64b
jmp 0x2ebce0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0x20(%rbp), %ecx
cmpq %rcx, %rax
jae 0x2eb746
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eb68f
jmp 0x2eb735
jmp 0x2eb691
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2eb702
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2eb6c1
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x88(%rbp)
jmp 0x2eb6cf
movl $0x2, %eax
movq %rax, -0x88(%rbp)
jmp 0x2eb6cf
movq -0x88(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2eb735
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2eb65d
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2eb839
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eb782
jmp 0x2eb828
jmp 0x2eb784
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2eb7f5
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2eb7b4
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x90(%rbp)
jmp 0x2eb7c2
movl $0x2, %eax
movq %rax, -0x90(%rbp)
jmp 0x2eb7c2
movq -0x90(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2eb828
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2eb74e
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq -0x68(%rbp), %rax
jne 0x2eb84b
jmp 0x2ebce0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x68(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x27a9b0
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x2eb8f1
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
je 0x2eb8c9
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x58(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x2eb8e1
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
cmpq $0x1, %rax
jbe 0x2eb8d9
jmp 0x2eb8f1
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2eb8e3
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2eb88d
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x2eb900
jmp 0x2eb91f
leaq 0xa8e04(%rip), %rdi     # 0x39470b
leaq 0xa4f21(%rip), %rsi     # 0x39082f
movl $0x4969, %edx           # imm = 0x4969
leaq 0xa8ca3(%rip), %rcx     # 0x3945bd
callq 0x2130
movq -0x68(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl 0x28(%rbp), %eax
movq %rax, -0x60(%rbp)
cmpl $-0x1, 0x28(%rbp)
jne 0x2eb957
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movq %rax, -0x60(%rbp)
movabsq $0x80000000, %rax       # imm = 0x80000000
orq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
shlq $0x20, %rax
movq %rax, -0x60(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
orq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2eb9e6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2eb9a5
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x98(%rbp)
jmp 0x2eb9b3
movl $0x2, %eax
movq %rax, -0x98(%rbp)
jmp 0x2eb9b3
movq -0x98(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2ebb2b
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shll %eax
movl %eax, %eax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x58(%rbp), %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2eba84
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2eba86
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2ebaf7
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ebab6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xa0(%rbp)
jmp 0x2ebac4
movl $0x2, %eax
movq %rax, -0xa0(%rbp)
jmp 0x2ebac4
movq -0xa0(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2ebb1a
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2eba0f
jmp 0x2ebb2d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2ebb9e
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ebb5d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xa8(%rbp)
jmp 0x2ebb6b
movl $0x2, %eax
movq %rax, -0xa8(%rbp)
jmp 0x2ebb6b
movq -0xa8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movq $-0x1, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl -0x20(%rbp), %ecx
cmpq %rcx, %rax
jae 0x2ebce0
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shll %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x58(%rbp), %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
shrl $0x1e, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2ebc39
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x2ebc3b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2ebcac
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ebc6b
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb0(%rbp)
jmp 0x2ebc79
movl $0x2, %eax
movq %rax, -0xb0(%rbp)
jmp 0x2ebc79
movq -0xb0(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2ebccf
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2ebbc6
addq $0xe0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)