// File: /workspace/github_c_makefile_star2_O1/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 $0x58, %rsp
movq %rsi, %rbx
movl %edi, %r15d
callq 0x683e
leaq 0x30(%rsp), %rdi
callq 0x7501
movslq %r15d, %r13
leal -0x1(%r13), %eax
movl %eax, 0x14(%rsp)
movl %r13d, %eax
negl %eax
movq %rax, 0x28(%rsp)
movl $0x1, %r14d
xorl %r9d, %r9d
movq $0x0, 0x8(%rsp)
movq %r15, (%rsp)
cmpl %r15d, %r14d
setl %al
jge 0x841e
movslq %r14d, %rcx
leal (%r9,%r15), %edx
subl %r14d, %edx
incq %rcx
movq 0x28(%rsp), %rax
leal (%rax,%r14), %edi
movb $0x1, %al
xorl %esi, %esi
movq -0x8(%rbx,%rcx,8), %r8
cmpb $0x2d, (%r8)
jne 0x83fe
cmpb $0x0, 0x1(%r8)
jne 0x8418
cmpq %r13, %rcx
setl %al
decl %esi
incq %rcx
cmpl %esi, %edi
jne 0x83ec
movl %edx, %r9d
movl %r15d, %r14d
movl %r15d, %edi
jmp 0x8421
subl %esi, %r9d
subl %esi, %r14d
movl %r14d, %edi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb $0x1, %al
je 0x8540
movslq %edi, %r15
movq (%rbx,%r15,8), %r12
cmpb $0x2d, (%r12)
jne 0x8469
movzbl 0x1(%r12), %eax
testl %eax, %eax
je 0x8469
cmpl $0x2d, %eax
jne 0x8475
cmpb $0x0, 0x2(%r12)
je 0x84d9
movl $0x3f, %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r12d, %r12d
jmp 0x85e5
xorl %r12d, %r12d
movq (%rsp), %r15
jmp 0x8543
movq %rdi, 0x18(%rsp)
movq %r9, 0x20(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x1, %eax
adcl $0x0, %eax
cltq
movsbl (%r12,%rax), %ebp
incq %rax
movq %rax, 0x8(%rsp)
movl $0x9, %edx
leaq 0x13d3(%rip), %rdi      # 0x9878
movl %ebp, %esi
callq 0x1120
testq %rax, %rax
je 0x84fc
cmpb $0x3a, 0x1(%rax)
movq 0x20(%rsp), %r9
movq 0x18(%rsp), %rdi
jne 0x8518
movq 0x8(%rsp), %rax
cmpb $0x0, (%r12,%rax)
je 0x85ca
addq %rax, %r12
jmp 0x85e0
testl %r9d, %r9d
jle 0x8525
movl %r9d, %ecx
leaq (%rbx,%r15,8), %rdx
xorl %eax, %eax
movq -0x8(%rdx), %rsi
movq %rsi, (%rdx)
addq $-0x8, %rdx
incq %rax
cmpq %rax, %rcx
jne 0x84e7
jmp 0x8527
movl $0x3f, %ebp
xorl %r12d, %r12d
movq 0x20(%rsp), %r9
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rdi
jmp 0x85e5
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
jmp 0x85e5
xorl %eax, %eax
movq (%rsp), %r15
movl %edi, %ecx
subl %eax, %ecx
movslq %ecx, %rax
movq %r12, (%rbx,%rax,8)
incl %edi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %edi, %r14d
xorl %r12d, %r12d
testl %ebp, %ebp
js 0x866a
cmpl $0x6c, %ebp
jg 0x8575
cmpl $0x63, %ebp
je 0x859a
cmpl $0x6b, %ebp
jne 0x83ca
movq %r12, %rdi
movq %r9, %r12
callq 0x11e0
movq %r12, %r9
movl %eax, 0x30(%rsp)
jmp 0x83ca
cmpl $0x6d, %ebp
je 0x85b1
cmpl $0x77, %ebp
jne 0x83ca
movq %r12, %rdi
movq %r9, %r12
callq 0x11e0
movq %r12, %r9
movl %eax, 0x34(%rsp)
jmp 0x83ca
movq %r12, %rdi
movq %r9, %r12
callq 0x11e0
movq %r12, %r9
movl %eax, 0x3c(%rsp)
jmp 0x83ca
movq %r12, %rdi
movq %r9, %r12
callq 0x1090
movq %r12, %r9
movsd %xmm0, 0x48(%rsp)
jmp 0x83ca
cmpl 0x14(%rsp), %edi
jge 0x8660
leal 0x1(%rdi), %r14d
movslq %edi, %rax
movq 0x8(%rbx,%rax,8), %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x8608
movq %rax, %rdx
movslq %r14d, %rax
movq (%rbx,%rax,8), %rax
movl %edx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x8608
movq %rdx, 0x8(%rsp)
movl %r14d, %edi
jmp 0x846c
leal 0x1(%r14), %eax
testl %r9d, %r9d
setle %cl
cmpl %r14d, %edi
setg %dl
movq $0x0, 0x8(%rsp)
orb %cl, %dl
jne 0x8656
movl %r9d, %ecx
leaq (%rbx,%r15,8), %rdx
negq %rcx
movq (%rbx,%r15,8), %rsi
xorl %edi, %edi
movq -0x8(%rdx,%rdi,8), %r8
movq %r8, (%rdx,%rdi,8)
decq %rdi
cmpq %rdi, %rcx
jne 0x8635
movq %rsi, (%rdx,%rdi,8)
incq %r15
addq $0x8, %rdx
cmpl %r15d, %eax
jne 0x862f
movl %eax, %r14d
movl %eax, %edi
jmp 0x846c
movl $0x3a, %ebp
jmp 0x845c
subl %r9d, %edi
cmpl %r15d, %edi
je 0x86da
movslq %edi, %rax
movq (%rbx,%rax,8), %rdi
callq 0x5cad
movq %rax, %r14
leaq 0x4bb0(%rip), %r15      # 0xd238
cmpl $0x3, (%r15)
jae 0x86e6
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x77ed
movq %rax, %r12
movq 0x4933(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x825b
movq %r12, %rdi
callq 0x8354
movq %r14, %rdi
callq 0x20e6
cmpl $0x3, (%r15)
jae 0x86ed
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %rdi
callq 0x15c0
jmp 0x86c9
callq 0x14b2
jmp 0x868e
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x14dc
jmp 0x86c9