// File: /workspace/github_c_makefile_star2_O3/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 $0x88, %rsp
movq %rsi, %r12
movl %edi, %r14d
callq 0x6bde
leaq 0x60(%rsp), %rdi
callq 0x78c5
cmpl $0x2, %r14d
jl 0x8a6d
leal -0x1(%r14), %eax
movl %eax, 0x4c(%rsp)
movl %r14d, %r10d
negl %r10d
xorl %ecx, %ecx
movl $0x1, %r15d
leaq 0x119b(%rip), %rdi      # 0x98b8
movabsq $0x100000000, %rbp      # imm = 0x100000000
movl $0x0, 0x14(%rsp)
movq %r12, 0x8(%rsp)
movq %r14, 0x28(%rsp)
movl %ecx, %r9d
movq %r15, (%rsp)
movslq %r15d, %rbx
leal (%r9,%r14), %ecx
subl %ebx, %ecx
movl %ebx, %eax
leaq (%r10,%rax), %rdx
movq %rbx, %r15
shlq $0x20, %r15
leaq (%r12,%rbx,8), %r11
movq %r11, %r14
xorl %r13d, %r13d
movl %r9d, %r12d
movq %rbx, %rsi
movq (%r11,%r13,8), %r8
cmpb $0x2d, (%r8)
jne 0x8777
cmpb $0x0, 0x1(%r8)
jne 0x8794
incq %rsi
incl %r12d
incq %r13
addq %rbp, %r15
addq $0x8, %r14
movl %edx, %r8d
addl %r13d, %r8d
jne 0x8766
jmp 0x8a76
sarq $0x1d, %r15
movq 0x8(%rsp), %rcx
movq (%rcx,%r15), %r11
cmpb $0x2d, (%r11)
jne 0x8b18
leaq (%rax,%r13), %r8
movl %r9d, %ecx
leaq (%rcx,%r13), %rsi
movzbl 0x1(%r11), %edx
cmpl $0x2d, %edx
movq %rsi, 0x18(%rsp)
je 0x8856
testl %edx, %edx
je 0x8b2a
movq %r8, 0x58(%rsp)
movq %r10, 0x30(%rsp)
movq %r9, 0x38(%rsp)
movl 0x14(%rsp), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x14(%rsp)
cltq
movq %r11, 0x40(%rsp)
movsbl (%r11,%rax), %esi
incq %rax
movq %rax, 0x50(%rsp)
movl $0x9, %edx
movl %esi, 0x24(%rsp)
callq 0x1120
testq %rax, %rax
je 0x886b
cmpb $0x3a, 0x1(%rax)
movq 0x58(%rsp), %r8
jne 0x888d
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
movq 0x38(%rsp), %r9
movq 0x30(%rsp), %r10
leaq 0x1079(%rip), %rdi      # 0x98b8
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
je 0x88d4
addq %rcx, %rax
jmp 0x88fb
cmpb $0x0, 0x2(%r11)
je 0x8b46
movl $0x3f, %edx
jmp 0x88f9
movl $0x3f, %edx
movq 0x38(%rsp), %r9
movq 0x30(%rsp), %r10
leaq 0x1037(%rip), %rdi      # 0x98b8
movq 0x18(%rsp), %rsi
movq 0x58(%rsp), %r8
jmp 0x88a7
movq 0x38(%rsp), %r9
movq 0x30(%rsp), %r10
leaq 0x101a(%rip), %rdi      # 0x98b8
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
cmpl $-0x2, 0x14(%rsp)
jle 0x88f9
movq 0x8(%rsp), %rax
movq (%rax,%r15), %rax
movq 0x50(%rsp), %r11
movl %r11d, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x88f9
movl %r11d, 0x14(%rsp)
movl %r8d, %r15d
xorl %eax, %eax
jmp 0x8964
cmpl %r8d, 0x4c(%rsp)
jle 0x88f4
movq (%rsp), %rax
leal (%rax,%r13), %r8d
incl %r8d
movslq %r8d, %rax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax,8), %rax
jmp 0x88fb
movl $0x3a, %edx
xorl %eax, %eax
leal 0x1(%r8), %r15d
movl $0x0, 0x14(%rsp)
testl %esi, %esi
jle 0x8964
movl %edx, 0x24(%rsp)
movq %rax, 0x40(%rsp)
addq %r13, %rbx
movl %esi, %eax
movslq %r8d, %rcx
movl %r12d, %edx
negq %rdx
movq 0x8(%rsp), %r12
movq (%r12,%rbx,8), %rsi
xorl %r11d, %r11d
movq -0x8(%r14,%r11,8), %r8
movq %r8, (%r14,%r11,8)
decq %r11
cmpq %r11, %rdx
jne 0x892e
movq %rbx, %r8
subq %rax, %r8
movq %rsi, (%r12,%r8,8)
leaq 0x1(%rbx), %rsi
addq $0x8, %r14
cmpq %rcx, %rbx
movq %rsi, %rbx
jl 0x8927
movq 0x40(%rsp), %rax
movl 0x24(%rsp), %edx
jmp 0x8969
movq 0x8(%rsp), %r12
testl %edx, %edx
movq 0x28(%rsp), %r14
js 0x8b1c
cmpl $0x6c, %edx
jg 0x89bf
cmpl $0x63, %edx
movq 0x18(%rsp), %rcx
je 0x8a00
cmpl $0x6b, %edx
jne 0x8a5c
movq %rax, %rdi
movq %r9, %rbx
movq %r15, (%rsp)
movq %r10, %r15
callq 0x11e0
movq 0x18(%rsp), %rcx
leaq 0xf0c(%rip), %rdi       # 0x98b8
movq %r15, %r10
movq (%rsp), %r15
movq %rbx, %r9
movl %eax, 0x60(%rsp)
jmp 0x8a5c
cmpl $0x6d, %edx
movq 0x18(%rsp), %rcx
je 0x8a2e
cmpl $0x77, %edx
jne 0x8a5c
movq %rax, %rdi
movq %r9, %rbx
movq %r15, (%rsp)
movq %r10, %r15
callq 0x11e0
movq 0x18(%rsp), %rcx
leaq 0xec8(%rip), %rdi       # 0x98b8
movq %r15, %r10
movq (%rsp), %r15
movq %rbx, %r9
movl %eax, 0x64(%rsp)
jmp 0x8a5c
movq %rax, %rdi
movq %r9, %rbx
movq %r15, (%rsp)
movq %r10, %r15
callq 0x11e0
movq 0x18(%rsp), %rcx
leaq 0xe9a(%rip), %rdi       # 0x98b8
movq %r15, %r10
movq (%rsp), %r15
movq %rbx, %r9
movl %eax, 0x6c(%rsp)
jmp 0x8a5c
movq %rax, %rdi
movq %r9, %rbx
movq %r15, (%rsp)
movq %r10, %r15
callq 0x1090
movq 0x18(%rsp), %rcx
leaq 0xe6c(%rip), %rdi       # 0x98b8
movq %r15, %r10
movq (%rsp), %r15
movq %rbx, %r9
movsd %xmm0, 0x78(%rsp)
cmpl %r14d, %r15d
jl 0x8739
movl %r15d, %eax
jmp 0x8b3b
movl $0x1, %eax
xorl %ecx, %ecx
jmp 0x8a83
movq 0x28(%rsp), %r14
movl %r14d, %eax
movq 0x8(%rsp), %r12
subl %ecx, %eax
cmpl %r14d, %eax
je 0x8af8
movq %r14, %r13
cltq
movq %r12, %r14
movq (%r12,%rax,8), %rdi
callq 0x608d
movq %rax, %r15
leaq 0x3793(%rip), %rbx      # 0xc238
cmpl $0x3, (%rbx)
jae 0x8b04
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x7b7e
movq %rax, %r12
movq 0x3517(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x85ae
movq %r12, %rdi
callq 0x86a7
movq %r15, %rdi
callq 0x208b
cmpl $0x3, (%rbx)
jae 0x8b0b
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60(%rsp), %rdi
callq 0x1573
jmp 0x8ae4
callq 0x1465
jmp 0x8aaa
movl %r13d, %edi
movq %r14, %rsi
callq 0x148f
jmp 0x8ae4
movl %esi, %eax
jmp 0x8b31
subl %r9d, %r15d
subl %r13d, %r15d
movl %r15d, %eax
jmp 0x8a85
movq (%rsp), %rax
addl %r13d, %eax
movq 0x8(%rsp), %r12
movq 0x28(%rsp), %r14
addl %r13d, %r9d
movl %r9d, %ecx
jmp 0x8a83
addq %r13, %rcx
addq %r13, %rax
testl %ecx, %ecx
jle 0x8b74
movl %ecx, %edx
negq %rdx
movslq %eax, %rsi
movq 0x8(%rsp), %rdi
leaq (%rdi,%rsi,8), %rsi
xorl %edi, %edi
movq -0x8(%rsi,%rdi,8), %r8
movq %r8, (%rsi,%rdi,8)
decq %rdi
cmpq %rdi, %rdx
jne 0x8b63
xorl %edx, %edx
testl %r12d, %r12d
cmovgl %r12d, %edx
movq (%rsp), %rsi
subl %edx, %esi
addl %esi, %r13d
movslq %r13d, %rdx
movq 0x8(%rsp), %r12
movq %r11, (%r12,%rdx,8)
subl %ecx, %eax
incl %eax
movq 0x28(%rsp), %r14
jmp 0x8a85