// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %r14d
callq 0x50e8
cmpl $0x1, %r14d
je 0x1b26a
callq 0x515a
movsd %xmm0, 0x8(%rsp)
leaq 0x8(%rbx), %r15
movq 0x8(%rbx), %r12
leaq 0x10ea(%rip), %rsi      # 0x1c1e5
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b22d
leaq 0x32c0(%rip), %rsi      # 0x1e3d2
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b22d
leaq 0x119e(%rip), %rsi      # 0x1c2c7
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b24e
leaq 0x3299(%rip), %rsi      # 0x1e3d9
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b25c
leaq 0x15fe(%rip), %rsi      # 0x1c755
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b289
leaq 0x1d4b(%rip), %rsi      # 0x1ceb9
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b297
leaq 0x325b(%rip), %rsi      # 0x1e3e0
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2a5
leaq 0x324d(%rip), %rsi      # 0x1e3e9
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2b3
leaq 0x3241(%rip), %rsi      # 0x1e3f4
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2c4
leaq 0x3233(%rip), %rsi      # 0x1e3fd
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2d5
leaq 0x2a97(%rip), %rsi      # 0x1dc78
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2e6
leaq 0x2d53(%rip), %rsi      # 0x1df4b
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x1b2f7
leaq 0x2f86(%rip), %rsi      # 0x1e195
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
jne 0x1b308
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x1a703
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x57c6
movl %eax, %ebp
testl %eax, %eax
je 0x1b276
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x60fc
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x65b7
jmp 0x1b239
callq 0x33b0
movl $0x1, %ebp
jmp 0x1b23f
movl %r14d, %edi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x32ee
jmp 0x1b23f
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xa2fa
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xc1a6
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xa741
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0xddb3
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x16666
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x14234
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x1852b
jmp 0x1b239
leal -0x1(%r14), %edi
movq %r15, %rsi
callq 0x18f89
jmp 0x1b239
callq 0x32cf
jmp 0x1b26f