// File: /workspace/github_c_makefile_star2_O1/lh3[P]partig/pdist.c
// Function: pt_pdist
pt_match_t *pt_pdist(const pt_pdopt_t *opt, const gfa_t *g)
{
	pt_match_t *ma;
	int64_t n_an;
	uint32_t n_mz;
	pt_mz1_t *mz;
	pt128_t *an = 0;

	PT_CALLOC(ma, 1);
	PT_CALLOC(ma->info, g->n_seg);
	ma->n_seg = g->n_seg;
	mz = pt_collect_minimizers(opt, g, &n_mz);
	an = pt_collect_anchors(g, n_mz, mz, opt->max_occ, &n_an, ma->info);
	free(mz);
	ma->ma = pt_cal_sim(n_an, an, ma->info, opt->k, opt->min_cnt, opt->min_sim, &ma->n_ma);
	free(an);
	pt_pdist_idx(ma);
	pt_pdist_symm(ma);
	pt_pdist_flt(ma, opt->min_cnt, opt->diff_thres);
	pt_pdist_symm(ma);
	return ma;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r13
movq %rdi, %r12
movl $0x20, %r14d
movl $0x1, %edi
movl $0x20, %esi
callq 0x1130
movq %rax, %r15
movl 0x4(%r13), %ebx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x1130
movq %rax, %rbp
movq %rax, 0x10(%r15)
movq %r15, 0x20(%rsp)
movl %ebx, (%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
testq %rbx, %rbx
je 0x7887
xorl %ebx, %ebx
leaq 0x50(%rsp), %r15
movq 0x10(%r13), %rax
movq (%rax,%r14), %rdi
movl -0x20(%rax,%r14), %esi
movl (%r12), %ecx
movl 0x4(%r12), %edx
movl 0x8(%r12), %r9d
movq %r15, (%rsp)
movl %ebx, %r8d
callq 0x68b8
incq %rbx
movl 0x4(%r13), %eax
addq $0x40, %r14
cmpq %rax, %rbx
jb 0x7850
movq %r13, 0x30(%rsp)
leaq 0x59a5(%rip), %rbx      # 0xd238
cmpl $0x3, (%rbx)
jae 0x820a
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x74df
cmpl $0x3, (%rbx)
jae 0x8219
movl 0x50(%rsp), %edx
movq 0x58(%rsp), %r15
xorl %ecx, %ecx
testl %edx, %edx
movq %r12, 0x98(%rsp)
je 0x7c18
movl 0xc(%r12), %eax
movl %eax, 0x94(%rsp)
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
leaq 0x18(%r15), %rax
movq %rax, 0xa0(%rsp)
movl $0x1, %r10d
movl $0xfffffff, %r11d       # imm = 0xFFFFFFF
xorl %eax, %eax
xorl %edi, %edi
xorl %r14d, %r14d
movq %rbp, 0x70(%rsp)
movq %r15, 0x40(%rsp)
movl %edx, 0x68(%rsp)
cmpl %edx, %r10d
je 0x7942
movl %r10d, %edx
shlq $0x4, %rdx
movq (%r15,%rdx), %rdx
movl %ecx, %esi
shlq $0x4, %rsi
cmpq (%r15,%rsi), %rdx
je 0x7c06
movl %r10d, %edx
subl %ecx, %edx
cmpl $0x1, %edx
jne 0x7963
movl %ecx, %ecx
shlq $0x4, %rcx
movl 0x8(%r15,%rcx), %ecx
andl %r11d, %ecx
incl 0x4(%rbp,%rcx,8)
jmp 0x7c03
cmpl %ecx, %r10d
jbe 0x7c03
cmpl 0x94(%rsp), %edx
ja 0x7c03
movl %ecx, %r13d
movl %r10d, %esi
movq %r13, %rbx
shlq $0x4, %rbx
addq 0xa0(%rsp), %rbx
movl %r10d, 0x78(%rsp)
movq %rsi, 0x38(%rsp)
movq %r13, %rcx
incq %r13
shlq $0x4, %rcx
movl 0x8(%r15,%rcx), %edx
andl %r11d, %edx
incl (%rbp,%rdx,8)
cmpq %rsi, %r13
jae 0x7bf6
leaq (%r15,%rcx), %r10
addq $0x8, %r10
movq %r14, %r12
shlq $0x4, %r12
movq %rbx, 0x80(%rsp)
movq %r13, 0x88(%rsp)
movq %r13, %r15
movq %r10, 0x48(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, %r13
movq (%r10), %rbp
movq (%rbx), %r15
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rbp, %rdx
movl $0xfffffff, %esi        # imm = 0xFFFFFFF
andq %rsi, %rdx
shlq $0x6, %rdx
movl (%rcx,%rdx), %edx
movq %rdx, 0x18(%rsp)
movq %r15, %rdx
andq %rsi, %rdx
shlq $0x6, %rdx
movl (%rcx,%rdx), %r14d
cmpq %rax, %r13
jne 0x7a69
movq %r14, 0x28(%rsp)
movq %rax, %r14
sarq %r14
addq %rax, %r14
testq %rax, %rax
movl $0x10, %eax
cmoveq %rax, %r14
movq %r14, %rsi
shlq $0x4, %rsi
callq 0x11a0
movq 0x48(%rsp), %r10
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movq %rax, %rdi
movq %r14, %rax
movq 0x28(%rsp), %r14
xorq %rbp, %r15
movabsq $0x80000000000000, %rcx # imm = 0x80000000000000
andq %rcx, %r15
movq %r15, %rbp
shrq $0x37, %rbp
movq (%rbx), %rdx
movq (%r10), %rcx
shlq $0x21, %rcx
andq %r8, %rcx
movl %edx, %esi
andl $0xfffffff, %esi        # imm = 0xFFFFFFF
leaq (%rcx,%rsi,2), %rcx
orq %rbp, %rcx
movq %rcx, (%rdi,%r12)
movq (%r10), %rcx
testq %r15, %r15
jne 0x7ab7
movq (%rbx), %rdx
shrq $0x1c, %rdx
andl $0x7ffffff, %edx        # imm = 0x7FFFFFF
jmp 0x7ad3
shrq $0x38, %rdx
movq (%rbx), %rsi
shrq $0x1c, %rsi
notl %esi
orl $0xf8000000, %esi       # imm = 0xF8000000
addl %edx, %r14d
leal (%rsi,%r14), %edx
decl %edx
shlq $0x4, %rcx
andq %r9, %rcx
movl %edx, %edx
orq %rcx, %rdx
movq %rdx, 0x8(%rdi,%r12)
leaq 0x1(%r13), %r14
cmpq %rax, %r14
jne 0x7b37
movq %r14, 0x28(%rsp)
movq %rax, %r14
sarq %r14
addq %rax, %r14
testq %rax, %rax
movl $0x10, %eax
cmoveq %rax, %r14
movq %r14, %rsi
shlq $0x4, %rsi
callq 0x11a0
movq 0x48(%rsp), %r10
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movq %rax, %rdi
movq %r14, %rax
movq 0x28(%rsp), %r14
movq (%r10), %rdx
movq (%rbx), %rcx
shlq $0x21, %rcx
andq %r8, %rcx
movl %edx, %esi
andl $0xfffffff, %esi        # imm = 0xFFFFFFF
leaq (%rcx,%rsi,2), %rcx
orq %rbp, %rcx
movq %rcx, 0x10(%rdi,%r12)
movq (%rbx), %rcx
testq %r15, %r15
jne 0x7b6f
movq (%r10), %rdx
shrq $0x1c, %rdx
andl $0x7ffffff, %edx        # imm = 0x7FFFFFF
jmp 0x7b90
shrq $0x38, %rdx
movq (%r10), %rsi
shrq $0x1c, %rsi
notl %esi
orl $0xf8000000, %esi       # imm = 0xF8000000
movq 0x18(%rsp), %r15
addl %edx, %r15d
leal (%rsi,%r15), %edx
decl %edx
movq 0x38(%rsp), %rsi
movq 0x10(%rsp), %r15
shlq $0x4, %rcx
andq %r9, %rcx
movl %edx, %edx
orq %rcx, %rdx
movq %rdx, 0x18(%rdi,%r12)
incq %r15
addq $0x10, %rbx
addq $0x20, %r12
incq %r14
cmpq %rsi, %r15
jb 0x79de
addq $0x2, %r13
movq %r13, %r14
movq 0x98(%rsp), %r12
movq 0x70(%rsp), %rbp
movq 0x40(%rsp), %r15
movl 0x78(%rsp), %r10d
movl $0xfffffff, %r11d       # imm = 0xFFFFFFF
movq 0x88(%rsp), %r13
movq 0x80(%rsp), %rbx
addq $0x10, %rbx
cmpq %rsi, %r13
jne 0x7998
movl %r10d, %ecx
incl %r10d
movl 0x68(%rsp), %edx
cmpl %edx, %r10d
jbe 0x7922
jmp 0x7c1d
xorl %r14d, %r14d
xorl %edi, %edi
leaq 0x5614(%rip), %rbx      # 0xd238
cmpl $0x3, (%rbx)
movq %rdi, 0x18(%rsp)
jae 0x8228
movq %r14, %rsi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x67b3
cmpl $0x3, (%rbx)
jae 0x823a
movq %r15, %rdi
callq 0x1040
movq $0x0, 0x30(%rsp)
testq %r14, %r14
jle 0x7cbb
movq 0x18(%rsp), %r10
leaq 0x10(%r10), %rax
movq %r14, %rcx
negq %rcx
movl $0x1, %edx
xorl %esi, %esi
xorl %ebx, %ebx
movq 0x20(%rsp), %r9
movq %rcx, %rdi
addq %rdx, %rdi
je 0x7c95
movq (%rax), %rdi
movq %rsi, %r8
shlq $0x4, %r8
cmpq (%r10,%r8), %rdi
je 0x7ca5
movq %rdx, %rdi
subq %rsi, %rdi
cmpq %rdi, %rbx
cmovleq %rdi, %rbx
movq %rdx, %rsi
addq $0x10, %rax
leaq (%rcx,%rdx), %rdi
incq %rdi
incq %rdx
cmpq $0x1, %rdi
jne 0x7c7d
jmp 0x7cc2
xorl %ebx, %ebx
movq 0x20(%rsp), %r9
movq 0x10(%r9), %rax
movq %rax, 0x80(%rsp)
movl (%r12), %ebp
movslq 0x10(%r12), %rax
movq %rax, 0x38(%rsp)
movsd 0x18(%r12), %xmm0
movsd %xmm0, 0x78(%rsp)
addq $0x4, %r9
movq %r9, 0x68(%rsp)
leaq (,%rbx,8), %rdi
callq 0x1190
movq %rax, %r12
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x1190
movq %rax, 0x48(%rsp)
testq %r14, %r14
jle 0x7f55
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd 0x1955(%rip), %xmm1     # 0x9680
divsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rsp)
movq 0x18(%rsp), %rdx
leaq 0x8(%rdx), %rax
movq %rax, 0x88(%rsp)
xorl %r15d, %r15d
movl $0x1, %r13d
movq $0x0, 0x30(%rsp)
movl $0x0, 0x40(%rsp)
xorl %ebx, %ebx
movq 0x38(%rsp), %rbp
movq %r14, 0x28(%rsp)
cmpq %r14, %r13
je 0x7d8d
movq %r13, %rax
shlq $0x4, %rax
movq (%rdx,%rax), %rax
movq %r15, %rcx
shlq $0x4, %rcx
cmpq (%rdx,%rcx), %rax
je 0x7e98
movq %r13, %rax
subq %r15, %rax
cmpq %rbp, %rax
jge 0x7da0
movq %r13, %r15
jmp 0x7e98
xorl %r14d, %r14d
movq %r13, %rax
subq %r15, %rax
jle 0x7dd0
movq %r15, %rcx
shlq $0x4, %rcx
addq 0x88(%rsp), %rcx
xorl %r14d, %r14d
movq (%rcx), %rdx
movq %rdx, (%r12,%r14,8)
incq %r14
addq $0x10, %rcx
cmpq %r14, %rax
jne 0x7dbd
movq %rbx, 0x10(%rsp)
movl %r14d, %ebx
leaq (%r12,%rbx,8), %rsi
movq %r12, %rdi
callq 0x202b
testl %r14d, %r14d
je 0x7dfc
xorl %eax, %eax
movl $0x0, 0x4(%r12,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x7deb
movl %ebx, %edi
movq %r12, %rsi
movq 0x48(%rsp), %rdx
callq 0x7536
cmpl %ebp, %eax
jae 0x7e1e
movq %r13, %r15
movq 0x18(%rsp), %rdx
movq 0x28(%rsp), %r14
jmp 0x7e93
shlq $0x4, %r15
movq 0x18(%rsp), %rdx
movq (%rdx,%r15), %r14
movq %r14, %r15
shrq $0x21, %r15
movl %r14d, %ebp
shrl %ebp
cmpl %r15d, %ebp
jne 0x7e41
movq %r13, %r15
jmp 0x7e89
movl %eax, %ebx
movl %ebp, %eax
movq 0x80(%rsp), %rdx
movl (%rdx,%rax,8), %eax
movl %ebx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
addl (%rdx,%r15,8), %eax
addsd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
callq 0x10b0
ucomisd 0x78(%rsp), %xmm0
jae 0x7ead
movq %r13, %r15
movq 0x18(%rsp), %rdx
movq 0x28(%rsp), %r14
movq 0x38(%rsp), %rbp
movq 0x10(%rsp), %rbx
leaq 0x1(%r13), %rax
cmpq %r14, %r13
movq %rax, %r13
jne 0x7d6c
jmp 0x7f57
movq 0x30(%rsp), %rsi
movl 0x40(%rsp), %eax
cmpl %eax, %esi
jne 0x7f06
movl %eax, %ecx
shrl %ecx
addl %eax, %ecx
testl %eax, %eax
movl $0x10, %eax
cmovel %eax, %ecx
movq %rcx, 0x40(%rsp)
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
movq 0x10(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x11a0
movsd 0x10(%rsp), %xmm0
movq 0x30(%rsp), %rsi
movq 0x40(%rsp), %rcx
movl %ecx, 0x40(%rsp)
movq 0x18(%rsp), %rdx
jmp 0x7f10
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rax
movq %r14, %rdi
shrq $0x20, %rdi
xorl %r14d, %edi
andl $0x1, %edi
movl %esi, %ecx
incl %esi
movq %rsi, 0x30(%rsp)
leaq (%rcx,%rcx,2), %rcx
movl %r15d, (%rax,%rcx,8)
movl %ebp, 0x4(%rax,%rcx,8)
movl %ebx, 0x8(%rax,%rcx,8)
movl %edi, 0xc(%rax,%rcx,8)
movsd %xmm0, 0x10(%rax,%rcx,8)
movq %r13, %r15
movq 0x28(%rsp), %r14
movq 0x38(%rsp), %rbp
movq %rax, %rbx
jmp 0x7e98
xorl %ebx, %ebx
movq 0x48(%rsp), %rdi
callq 0x1040
movq %r12, %rdi
callq 0x1040
movq 0x68(%rsp), %r13
movq 0x30(%rsp), %rdi
movl %edi, (%r13)
leaq 0x52ba(%rip), %rax      # 0xd238
cmpl $0x3, (%rax)
jae 0x8247
movq 0x20(%rsp), %r14
movq %rbx, 0x18(%r14)
movq 0x18(%rsp), %rdi
callq 0x1040
movq %r14, %rdi
callq 0x774d
movq %r14, %rdi
callq 0x7617
movq 0x98(%rsp), %rax
movl 0x10(%rax), %ebp
movsd 0x20(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x4(%r14), %ebx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1130
movsd 0x10(%rsp), %xmm2
movl (%r14), %ecx
testq %rcx, %rcx
je 0x8101
movq 0x20(%rsp), %rdx
movq 0x8(%rdx), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
testl %r8d, %r8d
je 0x80f5
movq %r8, %rdi
shrq $0x20, %rdi
leal (%rdi,%r8), %r9d
xorl %r10d, %r10d
cmpl %edi, %r9d
jbe 0x8042
movq 0x20(%rsp), %r10
movq 0x18(%r10), %r10
movl %r9d, %r11d
subq %rdi, %r11
leaq (%rdi,%rdi,2), %r14
leaq (%r10,%r14,8), %r14
addq $0x8, %r14
xorl %r15d, %r15d
movl (%r14), %r10d
cmpl %r10d, %r15d
cmoval %r15d, %r10d
addq $0x18, %r14
movl %r10d, %r15d
decq %r11
jne 0x802c
cmpl %edi, %r9d
jbe 0x809b
movq 0x20(%rsp), %r11
movq 0x18(%r11), %r14
movl %r10d, %r11d
xorps %xmm0, %xmm0
cvtsi2sd %r11, %xmm0
mulsd %xmm2, %xmm0
movl %r9d, %r11d
leaq (%rdi,%rdi,2), %r15
leaq (%r14,%r15,8), %r14
addq $0x8, %r14
movq %rdi, %r15
movl (%r14), %r12d
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
ucomisd %xmm0, %xmm1
jae 0x808a
addl %ebp, %r12d
cmpl %r10d, %r12d
jb 0x808f
movb $0x1, (%rax,%r15)
incq %r15
addq $0x18, %r14
cmpq %r15, %r11
jne 0x8071
leal 0x1(%rdi), %r10d
cmpl %r9d, %r10d
jae 0x80f5
movq 0x20(%rsp), %r9
movq 0x18(%r9), %r9
movl %r10d, %r11d
decl %r8d
leaq (%r11,%r11,2), %r10
leaq (%r9,%r10,8), %r10
addq $0x8, %r10
movl %edi, %r14d
movq %r11, %rdi
movl -0x4(%r10), %r15d
leaq (%r14,%r14,2), %r11
cmpl 0x4(%r9,%r11,8), %r15d
jne 0x80e8
leaq (%r9,%r11,8), %r11
movl (%r10), %r15d
cmpl 0x8(%r11), %r15d
cmovbeq %rdi, %r14
movb $0x0, (%rax,%r14)
leaq 0x1(%rdi), %r11
addq $0x18, %r10
decl %r8d
jne 0x80bf
incq %rsi
cmpq %rcx, %rsi
jne 0x7fee
testq %rbx, %rbx
je 0x81bf
xorl %ecx, %ecx
movq 0x20(%rsp), %r11
cmpb $0x0, (%rax,%rcx)
je 0x816e
movq 0x8(%r11), %rdx
movq 0x18(%r11), %r9
leaq (%rcx,%rcx,2), %rdi
movl 0x4(%r9,%rdi,8), %esi
movq (%rdx,%rsi,8), %r8
movq %r8, %rdx
shrq $0x20, %rdx
addl %edx, %r8d
cmpl %edx, %r8d
jbe 0x816e
movl (%r9,%rdi,8), %esi
movl 0xc(%r9,%rdi,8), %edi
movl %r8d, %r8d
leaq (%rdx,%rdx,2), %r10
leaq (%r9,%r10,8), %r9
addq $0xc, %r9
cmpl %esi, -0x8(%r9)
jne 0x8162
cmpl %edi, (%r9)
jne 0x8162
movb $0x1, (%rax,%rdx)
incq %rdx
addq $0x18, %r9
cmpq %rdx, %r8
jne 0x8153
incq %rcx
cmpq %rbx, %rcx
jne 0x8111
testl %ebx, %ebx
je 0x81c8
shlq $0x3, %rbx
leaq (%rbx,%rbx,2), %rdx
xorl %esi, %esi
movq %rax, %rdi
xorl %ecx, %ecx
cmpb $0x0, (%rdi)
je 0x81b1
movq 0x18(%r11), %r8
movl %ecx, %r9d
incl %ecx
leaq (%r9,%r9,2), %r9
movq 0x10(%r8,%rsi), %r10
movq %r10, 0x10(%r8,%r9,8)
movupd (%r8,%rsi), %xmm0
movupd %xmm0, (%r8,%r9,8)
addq $0x18, %rsi
incq %rdi
cmpq %rsi, %rdx
jne 0x8189
jmp 0x81ca
xorl %ecx, %ecx
movq 0x20(%rsp), %r11
jmp 0x81ca
xorl %ecx, %ecx
movl %ecx, 0x4(%r11)
movq %rax, %rdi
movq %r11, %rbx
callq 0x1040
movq %rbx, %rdi
callq 0x774d
leaq 0x5050(%rip), %rax      # 0xd238
cmpl $0x3, (%rax)
jae 0x8251
movq %rbx, %rdi
callq 0x7617
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rdi
callq 0x1361
jmp 0x789c
leaq 0x50(%rsp), %rdi
callq 0x1399
jmp 0x78ba
movq %r14, %rdi
callq 0x13d1
movq 0x18(%rsp), %rdi
jmp 0x7c32
movq %r14, %rdi
callq 0x140a
jmp 0x7c4a
callq 0x1443
jmp 0x7f87
movq %r13, %rdi
callq 0x147a
jmp 0x81ed