// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi2/main.c
// Function: main
int main(int argc, char *argv[])
{
	int ret = 0, i;
	double t_start;
	liftrlimit();
	if (argc == 1) {
		fprintf(stderr, "Usage: fermi2 <command> [arguments]\n");
		fprintf(stderr, "Command:\n");
		fprintf(stderr, "  diff        compare two FMD-indices\n");
		fprintf(stderr, "  occflt      pick up reads containing low-occurrence k-mers\n");
		fprintf(stderr, "  sub         subset FM-index\n");
		fprintf(stderr, "  unpack      unpack FM-index\n");
		fprintf(stderr, "  correct     error correction\n");
		fprintf(stderr, "  count       k-mer counting (inefficient for long k-mers)\n");
		fprintf(stderr, "  interleave  convert 2-file PE fastq to interleaved fastq\n");
		fprintf(stderr, "  assemble    assemble reads into a unitig graph\n");
		fprintf(stderr, "  simplify    simplify a unitig graph\n");
		fprintf(stderr, "  sa          generate sampled suffix array\n");
		fprintf(stderr, "  match       exact matches\n");
		fprintf(stderr, "  kprof       k-mer profile\n");
		return 1;
	}
	t_start = realtime();
	if (strcmp(argv[1], "diff") == 0) ret = main_diff(argc-1, argv+1);
	else if (strcmp(argv[1], "occflt") == 0) ret = main_diff(argc-1, argv+1);
	else if (strcmp(argv[1], "sub") == 0) ret = main_sub(argc-1, argv+1);
	else if (strcmp(argv[1], "unpack") == 0) ret = main_unpack(argc-1, argv+1);
	else if (strcmp(argv[1], "correct") == 0) ret = main_correct(argc-1, argv+1);
	else if (strcmp(argv[1], "count") == 0) ret = main_count(argc-1, argv+1);
	else if (strcmp(argv[1], "inspectk") == 0) ret = main_inspectk(argc-1, argv+1);
	else if (strcmp(argv[1], "interleave") == 0) ret = main_interleave(argc-1, argv+1);
	else if (strcmp(argv[1], "assemble") == 0) ret = main_assemble(argc-1, argv+1);
	else if (strcmp(argv[1], "simplify") == 0) ret = main_simplify(argc-1, argv+1);
	else if (strcmp(argv[1], "sa") == 0) ret = main_sa(argc-1, argv+1);
	else if (strcmp(argv[1], "match") == 0) ret = main_match(argc-1, argv+1);
	else if (strcmp(argv[1], "kprof") == 0) ret = main_kprof(argc-1, argv+1);
	else {
		fprintf(stderr, "[E::%s] unknown command\n", __func__);
		return 1;
	}
	if (ret == 0) {
		fprintf(stderr, "[M::%s] Version: %s\n", __func__, FM_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\n", __func__, realtime() - t_start, cputime());
	}
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
callq 0x4fb8
cmpl $0x1, %r14d
je 0x1c030
callq 0x502a
movsd %xmm0, (%rsp)
leaq 0x8(%rbx), %r15
movq 0x8(%rbx), %r12
leaq 0x135b(%rip), %rsi      # 0x1d21d
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1bff8
leaq 0x3701(%rip), %rsi      # 0x1f5da
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1bff8
leaq 0x140f(%rip), %rsi      # 0x1d2ff
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c014
leaq 0x36da(%rip), %rsi      # 0x1f5e1
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c022
leaq 0x19af(%rip), %rsi      # 0x1d8cd
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c050
leaq 0x20fc(%rip), %rsi      # 0x1e031
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c05e
leaq 0x369c(%rip), %rsi      # 0x1f5e8
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c06c
leaq 0x368e(%rip), %rsi      # 0x1f5f1
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c07a
leaq 0x3682(%rip), %rsi      # 0x1f5fc
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c08b
leaq 0x3674(%rip), %rsi      # 0x1f605
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c09c
cmpb $0x73, (%r12)
jne 0x1bfbc
cmpb $0x61, 0x1(%r12)
jne 0x1bfbc
cmpb $0x0, 0x2(%r12)
je 0x1c0be
leaq 0x3190(%rip), %rsi      # 0x1f153
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1c0ad
leaq 0x33c3(%rip), %rsi      # 0x1f39d
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
jne 0x1c0cf
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x1b397
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x556f
testl %eax, %eax
je 0x1c03c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x5e9b
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x6370
jmp 0x1c004
callq 0x31b3
movl $0x1, %eax
jmp 0x1c008
movl %r14d, %edi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq 0x30f1
xorl %eax, %eax
jmp 0x1c008
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xa6d1
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xc69a
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xac14
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xe35e
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x17117
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x14921
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x19ad7
jmp 0x1c004
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x190bf
jmp 0x1c004
callq 0x30d2
jmp 0x1c035