// File: /workspace/github_c_makefile_star2_O2/lh3[P]partig/main.c
// Function: main
int main(int argc, char *argv[])
{
	ketopt_t o = KETOPT_INIT;
	int i, c;
	pt_match_t *ma;
	gfa_t *g;
	pt_pdopt_t po;

	pt_realtime();
	pt_pdopt_init(&po);
	while ((c = ketopt(&o, argc, argv, 1, "k:w:c:m:", 0)) >= 0) {
		if (c == 'k') po.k = atoi(o.arg);
		else if (c == 'w') po.w = atoi(o.arg);
		else if (c == 'c') po.max_occ = atoi(o.arg);
		else if (c == 'm') po.min_sim = atof(o.arg);
	}
	if (o.ind == argc) {
		print_usage(stderr, &po);
		return 0;
	}

	g = gfa_read(argv[o.ind]);
	if (pt_verbose >= 3)
		fprintf(stderr, "[%s::%.3f] read the graph\n", __func__, pt_realtime());

	ma = pt_pdist(&po, g);
	/*
	pt_partition(&so, ma);
	if (fn_link) {
		pt_mcgraph_t *mcg;
		mcg = pt_phase_gen_graph(g, ma, fn_link, weight);
	}
	*/
	pt_match_print(stdout, g, ma);

	pt_match_free(ma);
	gfa_destroy(g);

	if (pt_verbose >= 3) {
		fprintf(stderr, "[M::%s] Version: %s\n", __func__, PT_VERSION);
		fprintf(stderr, "[M::%s] CMD:", __func__);
		for (i = 0; i < argc; ++i)
			fprintf(stderr, " %s", argv[i]);
		fprintf(stderr, "\n[M::%s] Real time: %.3f sec; CPU: %.3f sec; Peak RSS: %.3f GB\n", __func__, pt_realtime(), pt_cputime(), pt_peakrss() / 1024.0 / 1024.0 / 1024.0);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r13
movl %edi, %ebx
callq 0x52aa
leaq 0x40(%rsp), %rdi
callq 0x5f09
movq %rbx, 0x38(%rsp)
movslq %ebx, %r12
leal -0x1(%r12), %r15d
pushq $0x1
popq %rax
movq $0x0, 0x8(%rsp)
movabsq $0x100000000, %r14      # imm = 0x100000000
movl $0x0, 0x4(%rsp)
movq %rax, 0x20(%rsp)
movslq %eax, %rcx
movq %rcx, %rbx
shlq $0x20, %rbx
leaq (,%rcx,8), %rdx
addq %r13, %rdx
xorl %ebp, %ebp
movq %rcx, %rax
leaq (%rcx,%rbp), %rsi
cmpq %r12, %rsi
jge 0x6f9e
movq (%rdx,%rbp,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x6dcc
cmpb $0x0, 0x1(%rsi)
jne 0x6dd7
incq %rax
incq %rbp
addq %r14, %rbx
jmp 0x6db0
sarq $0x1d, %rbx
movq (%r13,%rbx), %rcx
cmpb $0x2d, (%rcx)
jne 0x71be
movl %r15d, 0x2c(%rsp)
movq %r13, 0x10(%rsp)
movl 0x20(%rsp), %r15d
addq %rbp, %r15
movl 0x8(%rsp), %r13d
addq %rbp, %r13
movq %rcx, %rdx
movzbl 0x1(%rcx), %ecx
cmpl $0x2d, %ecx
je 0x6e77
movq %rdx, 0x18(%rsp)
testl %ecx, %ecx
je 0x71df
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x4(%rsp)
movslq %eax, %rcx
movq 0x18(%rsp), %rax
movsbl (%rax,%rcx), %esi
incq %rcx
movq %rcx, 0x30(%rsp)
leaq 0x1a53(%rip), %rdi      # 0x8898
movl %esi, (%rsp)
pushq $0x9
popq %rdx
callq 0x1120
pushq $0x3f
popq %rcx
testq %rax, %rax
je 0x6e8e
cmpb $0x3a, 0x1(%rax)
jne 0x6e8b
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
cmpb $0x0, (%rcx,%rax)
je 0x6f73
addq %rax, %rcx
jmp 0x6ec4
cmpb $0x0, 0x2(%rdx)
je 0x71ec
xorl %ecx, %ecx
pushq $0x3f
popq %rax
movl %eax, (%rsp)
jmp 0x6ec4
movl (%rsp), %ecx
cmpl $-0x2, 0x4(%rsp)
jle 0x6ebf
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rax
movq 0x30(%rsp), %rsi
movl %esi, %edx
cmpb $0x0, (%rax,%rdx)
je 0x6ebf
movl %esi, 0x4(%rsp)
movq %r15, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
jmp 0x6efe
movl %ecx, (%rsp)
xorl %ecx, %ecx
movl %r15d, %ebx
movq %rcx, 0x18(%rsp)
leal 0x1(%rbx), %eax
movq %rax, 0x20(%rsp)
movl $0x0, 0x4(%rsp)
testl %r13d, %r13d
jle 0x6efb
cmpl %ebx, %r15d
jg 0x6efb
movq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x7215
incl %r15d
jmp 0x6ee1
movl (%rsp), %ecx
testl %ecx, %ecx
movl 0x2c(%rsp), %r15d
js 0x71cb
cmpl $0x63, %ecx
je 0x6f51
cmpl $0x6b, %ecx
je 0x6f2f
cmpl $0x6d, %ecx
je 0x6f3f
cmpl $0x77, %ecx
jne 0x6f5f
movq 0x18(%rsp), %rdi
callq 0x11e0
movl %eax, 0x44(%rsp)
jmp 0x6f5f
movq 0x18(%rsp), %rdi
callq 0x11e0
movl %eax, 0x40(%rsp)
jmp 0x6f5f
movq 0x18(%rsp), %rdi
callq 0x1090
movsd %xmm0, 0x58(%rsp)
jmp 0x6f5f
movq 0x18(%rsp), %rdi
callq 0x11e0
movl %eax, 0x4c(%rsp)
movq %r13, 0x8(%rsp)
movq 0x10(%rsp), %r13
movq 0x20(%rsp), %rax
jmp 0x6d91
cmpl %r15d, 0x2c(%rsp)
jle 0x6f95
movq 0x20(%rsp), %rax
leal (%rax,%rbp), %ebx
incl %ebx
movslq %ebx, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
jmp 0x6ec7
xorl %ecx, %ecx
pushq $0x3a
jmp 0x6e85
cmpq %r12, %rcx
cmovgq %rcx, %r12
movq 0x8(%rsp), %rbx
movq 0x38(%rsp), %rax
addl %ebx, %eax
movl %r12d, %ecx
subl %eax, %ecx
cmpl %ebp, %ecx
je 0x7032
movslq %r12d, %rax
movslq %ebx, %rcx
subq %rcx, %rax
subq %rbp, %rax
movq (%r13,%rax,8), %rdi
callq 0x4829
movq %rax, %r15
leaq 0x525e(%rip), %rbx      # 0xc238
cmpl $0x3, (%rbx)
jae 0x70c1
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x6189
movq %rax, %r12
movq 0x4fde(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6c31
movq %r12, %rdi
callq 0x6d1a
movq %r15, %rdi
callq 0x1c14
cmpl $0x3, (%rbx)
jae 0x70ed
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4fbf(%rip), %r14      # 0xbff8
movq (%r14), %rcx
leaq 0x18f0(%rip), %rdi      # 0x8933
pushq $0x21
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1200
movq (%r14), %rcx
leaq 0x18fa(%rip), %rdi      # 0x8955
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x1200
movq (%r14), %rdi
movl 0x40(%rsp), %edx
leaq 0x18eb(%rip), %rsi      # 0x895f
xorl %eax, %eax
callq 0x1160
movq (%r14), %rdi
movl 0x44(%rsp), %edx
leaq 0x18f4(%rip), %rsi      # 0x897d
xorl %eax, %eax
callq 0x1160
movq (%r14), %rdi
movl 0x4c(%rsp), %edx
leaq 0x1908(%rip), %rsi      # 0x89a6
xorl %eax, %eax
callq 0x1160
movq (%r14), %rdi
movsd 0x58(%rsp), %xmm0
leaq 0x1913(%rip), %rsi      # 0x89c8
movb $0x1, %al
callq 0x1160
jmp 0x7021
movq 0x4f30(%rip), %rax      # 0xbff8
movq (%rax), %r12
callq 0x52aa
leaq 0x17ca(%rip), %rsi      # 0x88a1
leaq 0x17de(%rip), %rdx      # 0x88bc
movq %r12, %rdi
movb $0x1, %al
callq 0x1160
jmp 0x6fe3
movq 0x4f04(%rip), %rbx      # 0xbff8
movq (%rbx), %rdi
leaq 0x17c3(%rip), %rsi      # 0x88c1
leaq 0x17b7(%rip), %r15      # 0x88bc
leaq 0x17ca(%rip), %rcx      # 0x88d6
xorl %r14d, %r14d
movq %r15, %rdx
xorl %eax, %eax
callq 0x1160
movq (%rbx), %rdi
leaq 0x17bf(%rip), %rsi      # 0x88e2
movq %r15, %rdx
xorl %eax, %eax
callq 0x1160
movq 0x38(%rsp), %rbp
testl %ebp, %ebp
cmovlel %r14d, %ebp
leaq 0x17b0(%rip), %r12      # 0x88ef
xorl %r14d, %r14d
movq (%rbx), %r15
cmpq %r14, %rbp
je 0x7161
movq (%r13,%r14,8), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1160
incq %r14
jmp 0x7142
callq 0x52aa
movsd %xmm0, 0x10(%rsp)
callq 0x5241
movsd %xmm0, 0x8(%rsp)
callq 0x5284
cvtsi2sd %rax, %xmm2
movsd 0x1707(%rip), %xmm0     # 0x8890
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
leaq 0x1757(%rip), %rsi      # 0x88f3
leaq 0x1719(%rip), %rdx      # 0x88bc
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movb $0x3, %al
callq 0x1160
jmp 0x7021
movq 0x20(%rsp), %r12
addl %ebp, %r12d
jmp 0x6fa5
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rbx
movq 0x20(%rsp), %r12
jmp 0x6faa
movl %eax, %r12d
movq 0x10(%rsp), %r13
jmp 0x6fa5
movq 0x8(%rsp), %rbx
leal (%rbx,%rbp), %edx
movq 0x20(%rsp), %r12
leal (%r12,%rbp), %esi
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x7215
addl %ebp, %r12d
incl %r12d
jmp 0x6faa