// File: chhylp123[P]hifiasm/inter.cpp
// Function: worker_for_contain_dedup(void*, long, int)
static void worker_for_contain_dedup(void *data, long i, int tid)
{
    utepdat_t *s = (utepdat_t*)data; asg64_v ou; 
	kv_ul_ov_t *idx = &(s->ll[tid].lo), *dump = &(s->ll[tid].tk); 
	uint32_t k, v = i, l, dump_n; 

	if(!gen_dup_path(s->rg, s->uopt->ruIndex, dump, v)) return;
	// if(v == 7723) {
	// 	fprintf(stderr, "[M::%s] v::%u, dump->n::%u\n", __func__, v, (uint32_t)dump->n);
	// }


	copy_asg_arr(ou, s->ll[tid].srt.a); 
	for (k = 1, l = 0, dump_n = dump->n; k <= dump_n; k++) {
		if(k == dump_n || (dump->a[k].tn == ((uint32_t)-1))) {
			assert(k > l || k == dump_n); 
			if(k > l) {
				assert(dump->a[k].tn == ((uint32_t)-1));
				renew_consensus_chain(dump, l, k, idx, &ou, s->uopt->ruIndex, s->uopt, s->rg, G_CHAIN_BW, 
							0.02/**s->opt->diff_ec_ul**/, dump->a[k].qn, &(s->hab[tid]->clist.chainDP), dump->a[k-1].qe, v);
			}
			l = k + 1;
		}
	}
	copy_asg_arr(s->ll[tid].srt.a, ou);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
addq $0x18, %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movl %eax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %rsi
movq -0x60(%rbp), %rdx
movl -0x68(%rbp), %eax
movl %eax, %ecx
callq 0x2e9110
cmpl $0x0, %eax
jne 0x2f01ee
jmp 0x2f043a
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x50(%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x1, -0x64(%rbp)
movl $0x0, -0x6c(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x70(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x70(%rbp), %eax
ja 0x2f03e0
movl -0x64(%rbp), %eax
cmpl -0x70(%rbp), %eax
je 0x2f0290
movq -0x60(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0xc(%rax)
jne 0x2f03d0
movl -0x64(%rbp), %ecx
movb $0x1, %al
cmpl -0x6c(%rbp), %ecx
movb %al, -0x71(%rbp)
ja 0x2f02a9
movl -0x64(%rbp), %eax
cmpl -0x70(%rbp), %eax
sete %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x2f02b2
jmp 0x2f02b4
jmp 0x2f02d3
leaq 0xa579f(%rip), %rdi     # 0x395a5a
leaq 0xa056d(%rip), %rsi     # 0x39082f
movl $0x498d, %edx           # imm = 0x498D
leaq 0xa57a1(%rip), %rcx     # 0x395a6f
callq 0x2130
movl -0x64(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jbe 0x2f03c7
movq -0x60(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %ecx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0xc(%rax)
jne 0x2f02f8
jmp 0x2f0317
leaq 0xa57a1(%rip), %rdi     # 0x395aa0
leaq 0xa0529(%rip), %rsi     # 0x39082f
movl $0x498f, %edx           # imm = 0x498F
leaq 0xa575d(%rip), %rcx     # 0x395a6f
callq 0x2130
movq -0x60(%rbp), %rdi
movl -0x6c(%rbp), %esi
movl -0x64(%rbp), %edx
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x30(%rax), %r9
movq -0x38(%rbp), %rax
movq 0x28(%rax), %r15
movq -0x38(%rbp), %rax
movq 0x20(%rax), %r14
movq -0x60(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %r8d
imulq $0x1c, %r8, %r8
addq %r8, %rax
movl (%rax), %ebx
movq -0x38(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x2c(%rbp), %r8
movq (%rax,%r8,8), %r11
addq $0x48, %r11
addq $0x18, %r11
movq -0x60(%rbp), %rax
movq (%rax), %rax
movl -0x64(%rbp), %r8d
subl $0x1, %r8d
movl %r8d, %r8d
imulq $0x1c, %r8, %r8
addq %r8, %rax
movl 0x8(%rax), %eax
movl %eax, %r10d
movl -0x68(%rbp), %eax
leaq -0x50(%rbp), %r8
movsd 0x8ecaa(%rip), %xmm0    # 0x37f048
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq $0x10, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x2eb100
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x2f03d2
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2f0261
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x58(%rax)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x50(%rax)
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)