// File: /workspace/github_c_makefile_star2_O3/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 $0x98, %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, 0x18(%rsp)
movl %ebx, (%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
testq %rbx, %rbx
je 0x7c18
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 0x6c58
incq %rbx
movl 0x4(%r13), %eax
addq $0x40, %r14
cmpq %rax, %rbx
jb 0x7be1
movq %r13, 0x20(%rsp)
leaq 0x4614(%rip), %rbx      # 0xc238
cmpl $0x3, (%rbx)
jae 0x855b
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x78a3
cmpl $0x3, (%rbx)
jae 0x856a
movl 0x50(%rsp), %edx
movq 0x58(%rsp), %r15
xorl %ecx, %ecx
testl %edx, %edx
movq %r12, 0x88(%rsp)
je 0x7fa5
movl 0xc(%r12), %eax
movl %eax, 0x84(%rsp)
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
leaq 0x18(%r15), %rax
movq %rax, 0x90(%rsp)
movl $0x1, %r10d
movl $0xfffffff, %r11d       # imm = 0xFFFFFFF
xorl %eax, %eax
xorl %edi, %edi
xorl %r14d, %r14d
movq %rbp, 0x60(%rsp)
movq %r15, 0x48(%rsp)
movl %edx, 0x40(%rsp)
cmpl %edx, %r10d
je 0x7cd3
movl %r10d, %edx
shlq $0x4, %rdx
movq (%r15,%rdx), %rdx
movl %ecx, %esi
shlq $0x4, %rsi
cmpq (%r15,%rsi), %rdx
je 0x7f93
movl %r10d, %edx
subl %ecx, %edx
cmpl $0x1, %edx
jne 0x7cf4
movl %ecx, %ecx
shlq $0x4, %rcx
movl 0x8(%r15,%rcx), %ecx
andl %r11d, %ecx
incl 0x4(%rbp,%rcx,8)
jmp 0x7f90
cmpl %ecx, %r10d
jbe 0x7f90
cmpl 0x84(%rsp), %edx
ja 0x7f90
movl %ecx, %r13d
movl %r10d, %esi
movq %r13, %rbx
shlq $0x4, %rbx
addq 0x90(%rsp), %rbx
movl %r10d, 0x68(%rsp)
movq %rsi, 0x28(%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 0x7f83
leaq (%r15,%rcx), %r10
addq $0x8, %r10
movq %r14, %r12
shlq $0x4, %r12
movq %rbx, 0x70(%rsp)
movq %r13, 0x78(%rsp)
movq %r13, %r15
movq %r10, 0x38(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, %r13
movq (%r10), %rbp
movq (%rbx), %r15
movq 0x20(%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, 0x8(%rsp)
movq %r15, %rdx
andq %rsi, %rdx
shlq $0x6, %rdx
movl (%rcx,%rdx), %r14d
cmpq %rax, %r13
jne 0x7dfc
movq %r14, 0x30(%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 0x38(%rsp), %r10
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movq %rax, %rdi
movq (%rbx), %rcx
movq (%r10), %rdx
movq %r14, %rax
movq 0x30(%rsp), %r14
jmp 0x7e02
movq %rbp, %rdx
movq %r15, %rcx
xorq %rbp, %r15
movabsq $0x80000000000000, %rsi # imm = 0x80000000000000
andq %rsi, %r15
movq %r15, %rbp
shrq $0x37, %rbp
shlq $0x21, %rdx
andq %r8, %rdx
movl %ecx, %esi
andl $0xfffffff, %esi        # imm = 0xFFFFFFF
leaq (%rdx,%rsi,2), %rdx
orq %rbp, %rdx
movq %rdx, (%rdi,%r12)
movq (%r10), %rdx
testq %r15, %r15
jne 0x7e4a
movq (%rbx), %rcx
shrq $0x1c, %rcx
andl $0x7ffffff, %ecx        # imm = 0x7FFFFFF
jmp 0x7e66
shrq $0x38, %rcx
movq (%rbx), %rsi
shrq $0x1c, %rsi
notl %esi
orl $0xf8000000, %esi       # imm = 0xF8000000
addl %ecx, %r14d
leal (%rsi,%r14), %ecx
decl %ecx
shlq $0x4, %rdx
andq %r9, %rdx
movl %ecx, %ecx
orq %rdx, %rcx
movq %rcx, 0x8(%rdi,%r12)
leaq 0x1(%r13), %r14
cmpq %rax, %r14
jne 0x7eca
movq %r14, 0x30(%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 0x38(%rsp), %r10
movabsq $0x7ffffff00000000, %r9 # imm = 0x7FFFFFF00000000
movabsq $0x1ffffffe00000000, %r8 # imm = 0x1FFFFFFE00000000
movq %rax, %rdi
movq %r14, %rax
movq 0x30(%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 0x7f02
movq (%r10), %rdx
shrq $0x1c, %rdx
andl $0x7ffffff, %edx        # imm = 0x7FFFFFF
jmp 0x7f23
shrq $0x38, %rdx
movq (%r10), %rsi
shrq $0x1c, %rsi
notl %esi
orl $0xf8000000, %esi       # imm = 0xF8000000
movq 0x8(%rsp), %r15
addl %edx, %r15d
leal (%rsi,%r15), %edx
decl %edx
movq 0x28(%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 0x7d69
addq $0x2, %r13
movq %r13, %r14
movq 0x88(%rsp), %r12
movq 0x60(%rsp), %rbp
movq 0x48(%rsp), %r15
movl 0x68(%rsp), %r10d
movl $0xfffffff, %r11d       # imm = 0xFFFFFFF
movq 0x78(%rsp), %r13
movq 0x70(%rsp), %rbx
addq $0x10, %rbx
cmpq %rsi, %r13
jne 0x7d29
movl %r10d, %ecx
incl %r10d
movl 0x40(%rsp), %edx
cmpl %edx, %r10d
jbe 0x7cb3
jmp 0x7faa
xorl %r14d, %r14d
xorl %edi, %edi
leaq 0x4287(%rip), %rbx      # 0xc238
cmpl $0x3, (%rbx)
movq %rdi, 0x8(%rsp)
jae 0x8579
movq %r14, %rsi
shlq $0x4, %rsi
addq %rdi, %rsi
callq 0x6b53
cmpl $0x3, (%rbx)
jae 0x858b
movq %r15, %rdi
callq 0x1040
movq $0x0, 0x20(%rsp)
testq %r14, %r14
jle 0x8048
movq 0x8(%rsp), %r10
leaq 0x10(%r10), %rax
movq %r14, %rcx
negq %rcx
movl $0x1, %edx
xorl %esi, %esi
xorl %ebx, %ebx
movq 0x18(%rsp), %r9
movq %rcx, %rdi
addq %rdx, %rdi
je 0x8022
movq (%rax), %rdi
movq %rsi, %r8
shlq $0x4, %r8
cmpq (%r10,%r8), %rdi
je 0x8032
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 0x800a
jmp 0x804f
xorl %ebx, %ebx
movq 0x18(%rsp), %r9
movq 0x10(%r9), %rax
movq %rax, 0x70(%rsp)
movl (%r12), %ebp
movslq 0x10(%r12), %rax
movq %rax, 0x28(%rsp)
movsd 0x18(%r12), %xmm0
movsd %xmm0, 0x68(%rsp)
addq $0x4, %r9
movq %r9, 0x48(%rsp)
leaq (,%rbx,8), %rdi
callq 0x1190
movq %rax, %r12
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x1190
movq %rax, 0x38(%rsp)
testq %r14, %r14
jle 0x82c6
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd 0x160b(%rip), %xmm1     # 0x96c0
divsd %xmm0, %xmm1
movsd %xmm1, 0x60(%rsp)
movq 0x8(%rsp), %rdx
leaq 0x8(%rdx), %rax
movq %rax, 0x78(%rsp)
xorl %r15d, %r15d
movl $0x1, %r13d
movq $0x0, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
xorl %edi, %edi
movq 0x28(%rsp), %rbp
movq %r14, 0x30(%rsp)
cmpq %r14, %r13
je 0x8115
movq %r13, %rax
shlq $0x4, %rax
movq (%rdx,%rax), %rax
movq %r15, %rcx
shlq $0x4, %rcx
cmpq (%rdx,%rcx), %rax
je 0x8220
movq %r13, %rbx
subq %r15, %rbx
cmpq %rbp, %rbx
jge 0x8128
movq %r13, %r15
jmp 0x8220
movq %r13, %rax
subq %r15, %rax
movq %rdi, 0x10(%rsp)
jle 0x817f
movq %r15, %rcx
shlq $0x4, %rcx
addq 0x78(%rsp), %rcx
xorl %edx, %edx
movq (%rcx), %rsi
movq %rsi, (%r12,%rdx,8)
incq %rdx
addq $0x10, %rcx
cmpq %rdx, %rax
jne 0x8143
movl %ebx, %eax
leaq (%r12,%rax,8), %rsi
movq %r12, %rdi
callq 0x1fd0
movl %r13d, %eax
subl %r15d, %eax
xorl %ecx, %ecx
movl $0x0, 0x4(%r12,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x816c
jmp 0x818c
movq %r12, %rdi
movq %r12, %rsi
callq 0x1fd0
xorl %ebx, %ebx
movl %ebx, %edi
movq %r12, %rsi
movq 0x38(%rsp), %rdx
callq 0x78ea
cmpl %ebp, %eax
jae 0x81a9
movq %r13, %r15
movq 0x8(%rsp), %rdx
jmp 0x821b
shlq $0x4, %r15
movq 0x8(%rsp), %rdx
movq (%rdx,%r15), %r14
movq %r14, %r15
shrq $0x21, %r15
movl %r14d, %ebp
shrl %ebp
cmpl %r15d, %ebp
jne 0x81cc
movq %r13, %r15
jmp 0x8211
movl %eax, %ebx
movl %ebp, %eax
movq 0x70(%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 0x60(%rsp), %xmm1
callq 0x10b0
ucomisd 0x68(%rsp), %xmm0
jae 0x8235
movq %r13, %r15
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %rbp
movq 0x10(%rsp), %rdi
leaq 0x1(%r13), %rax
cmpq %r14, %r13
movq %rax, %r13
jne 0x80f4
jmp 0x82c8
movq 0x20(%rsp), %rsi
cmpl 0x40(%rsp), %esi
movq 0x10(%rsp), %rdi
jne 0x827f
movl %esi, %ecx
shrl %ecx
addl %esi, %ecx
testl %esi, %esi
movl $0x10, %eax
cmovel %eax, %ecx
movq %rcx, 0x40(%rsp)
leaq (,%rcx,8), %rax
leaq (%rax,%rax,2), %rsi
movsd %xmm0, 0x10(%rsp)
callq 0x11a0
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movq 0x8(%rsp), %rdx
movq %r14, %rax
shrq $0x20, %rax
xorl %r14d, %eax
andl $0x1, %eax
movl %esi, %ecx
incl %esi
movq %rsi, 0x20(%rsp)
leaq (%rcx,%rcx,2), %rcx
movl %r15d, (%rdi,%rcx,8)
movl %ebp, 0x4(%rdi,%rcx,8)
movl %ebx, 0x8(%rdi,%rcx,8)
movl %eax, 0xc(%rdi,%rcx,8)
movsd %xmm0, 0x10(%rdi,%rcx,8)
movq %r13, %r15
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %rbp
jmp 0x8220
xorl %edi, %edi
movq %rdi, %rbx
movq 0x38(%rsp), %rdi
callq 0x1040
movq %r12, %rdi
callq 0x1040
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rdi
movl %edi, (%rax)
leaq 0x3f48(%rip), %rax      # 0xc238
cmpl $0x3, (%rax)
jae 0x8598
movq 0x18(%rsp), %r14
movq %rbx, 0x18(%r14)
movq 0x8(%rsp), %rdi
callq 0x1040
movq %r14, %rdi
callq 0x7afa
movq %r14, %rdi
callq 0x79c2
movq 0x88(%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 0x845a
movq 0x18(%rsp), %rdx
movq 0x8(%rdx), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
testl %r8d, %r8d
je 0x844e
movq %r8, %rdi
shrq $0x20, %rdi
leal (%rdi,%r8), %r9d
cmpl %edi, %r9d
jbe 0x83f4
movq 0x18(%rsp), %r10
movq 0x18(%r10), %r11
movl %r9d, %r10d
movq %r10, %r15
subq %rdi, %r15
leaq (%rdi,%rdi,2), %r14
leaq (%r11,%r14,8), %r11
addq $0x8, %r11
xorl %r14d, %r14d
movq %r11, %r12
movl %r14d, %r13d
movl (%r12), %r14d
cmpl %r14d, %r13d
cmoval %r13d, %r14d
addq $0x18, %r12
decq %r15
jne 0x83a1
movl %r14d, %r15d
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
mulsd %xmm2, %xmm0
movq %rdi, %r15
movl (%r11), %r12d
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
ucomisd %xmm0, %xmm1
jae 0x83e3
addl %ebp, %r12d
cmpl %r14d, %r12d
jb 0x83e8
movb $0x1, (%rax,%r15)
incq %r15
addq $0x18, %r11
cmpq %r15, %r10
jne 0x83ca
leal 0x1(%rdi), %r10d
cmpl %r9d, %r10d
jae 0x844e
movq 0x18(%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 0x8441
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 0x8418
incq %rsi
cmpq %rcx, %rsi
jne 0x8360
testq %rbx, %rbx
je 0x8514
xorl %ecx, %ecx
movq 0x18(%rsp), %r11
cmpb $0x0, (%rax,%rcx)
je 0x84c7
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 0x84c7
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 0x84bb
cmpl %edi, (%r9)
jne 0x84bb
movb $0x1, (%rax,%rdx)
incq %rdx
addq $0x18, %r9
cmpq %rdx, %r8
jne 0x84ac
incq %rcx
cmpq %rbx, %rcx
jne 0x846a
shlq $0x3, %rbx
leaq (%rbx,%rbx,2), %rcx
xorl %esi, %esi
movq %rax, %rdi
xorl %edx, %edx
cmpb $0x0, (%rdi)
je 0x8506
movq 0x18(%r11), %r8
movl %edx, %r9d
incl %edx
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, %rcx
jne 0x84de
jmp 0x851b
xorl %edx, %edx
movq 0x18(%rsp), %r11
movl %edx, 0x4(%r11)
movq %rax, %rdi
movq %r11, %rbx
callq 0x1040
movq %rbx, %rdi
callq 0x7afa
leaq 0x3cff(%rip), %rax      # 0xc238
cmpl $0x3, (%rax)
jae 0x85a2
movq %rbx, %rdi
callq 0x79c2
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rdi
callq 0x1314
jmp 0x7c2d
leaq 0x50(%rsp), %rdi
callq 0x134c
jmp 0x7c4b
movq %r14, %rdi
callq 0x1384
movq 0x8(%rsp), %rdi
jmp 0x7fbf
movq %r14, %rdi
callq 0x13bd
jmp 0x7fd7
callq 0x13f6
jmp 0x82f9
movq 0x48(%rsp), %rdi
callq 0x142d
jmp 0x853e