// File: /workspace/github_c_makefile_star2_O0/lh3[P]partig/pdist.c
// Function: pt_pdist_flt
static void pt_pdist_flt(pt_match_t *ma, int32_t min_cnt, double diff_thres)
{
	uint32_t i, k;
	uint8_t *mark;
	PT_CALLOC(mark, ma->n_ma);
	for (i = 0; i < ma->n_seg; ++i) {
		uint32_t o = ma->idx[i] >> 32;
		uint32_t n = (uint32_t)ma->idx[i];
		uint32_t j, max = 0;
		if (n == 0) continue;
		for (j = o; j < o + n; ++j)
			max = max > ma->ma[j].m? max : ma->ma[j].m;
		for (j = o; j < o + n; ++j)
			if (ma->ma[j].m >= max * diff_thres || ma->ma[j].m + min_cnt >= max)
				mark[j] = 1;
		for (j = o + 1; j < o + n; ++j) {
			if (ma->ma[j].sid[1] == ma->ma[j-1].sid[1]) {
				if (ma->ma[j].m > ma->ma[j-1].m) mark[j-1] = 0;
				else mark[j] = 0;
			}
		}
	}
	for (i = 0; i < ma->n_ma; ++i)
		if (mark[i])
			pt_pdist_mark_pair(ma, mark, ma->ma[i].sid[1], ma->ma[i].sid[0], ma->ma[i].rev);
	for (i = k = 0; i < ma->n_ma; ++i)
		if (mark[i]) ma->ma[k++] = ma->ma[i];
	ma->n_ma = k;
	free(mark);
	pt_pdist_idx(ma);
	if (pt_verbose >= 3)
		fprintf(stderr, "[%s::%.3f] %d pairs of unitigs remain after filtering\n", __func__, pt_realtime(), ma->n_ma);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x1140
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xb4d7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x20, %rax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0xb34b
jmp 0xb4c9
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jae 0xb3a9
movl -0x38(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x34(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jbe 0xb380
movl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0xb398
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb351
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jae 0xb41c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x8(%rax,%rcx,8), %eax
cvtsi2sd %rax, %xmm0
movl -0x38(%rbp), %eax
cvtsi2sd %rax, %xmm1
mulsd -0x18(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jae 0xb404
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl -0xc(%rbp), %eax
cmpl -0x38(%rbp), %eax
jb 0xb40f
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0xb411
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb3af
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0x2c(%rbp), %ecx
addl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jae 0xb4c7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x34(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jne 0xb4b7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x34(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x34(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jbe 0xb4aa
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
jmp 0xb4b5
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movb $0x0, (%rax,%rcx)
jmp 0xb4b7
jmp 0xb4b9
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb425
jmp 0xb4c9
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb302
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xb551
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0xb544
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %r8d
imulq $0x18, %r8, %r8
addq %r8, %rax
movl 0xc(%rax), %r8d
callq 0xb800
jmp 0xb546
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb4de
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0xb5c9
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0xb5bc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movl %ecx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x1c(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0xb5be
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb55f
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rdi
callq 0x1040
movq -0x8(%rbp), %rdi
callq 0xa5e0
leaq 0x4c4c(%rip), %rax      # 0x10238
cmpl $0x3, (%rax)
jb 0xb624
movq 0x4a00(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
callq 0x8c60
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x21ff(%rip), %rsi      # 0xd815
leaq 0x222f(%rip), %rdx      # 0xd84c
movb $0x1, %al
callq 0x1170
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)