// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/main.c
// Function: main
int main(int argc, char *argv[]) {
	extern char *bwa_pg;
	int i, ret;
	double t_real;
	kstring_t pg = {0,0,0};
	t_real = realtime();

	ksprintf(&pg, "@PG\tID:PALADIN\tPN:PALADIN\tVN:%s\tCL:%s", PACKAGE_VERSION, argv[0]);

	// Process command argument
	for (i = 1; i < argc; ++i) ksprintf(&pg, " %s", argv[i]);
	bwa_pg = pg.s;

	if (argc < 2) return renderMainUsage();
	if (strcmp(argv[1], "index") == 0) ret = command_index(argc-1, argv+1);
	else if (strcmp(argv[1], "prepare") == 0) ret = command_prepare(argc-1, argv+1);
	else if (strcmp(argv[1], "align") == 0) ret = command_align(argc-1, argv+1);
	else if (strcmp(argv[1], "fa2pac") == 0) ret = bwa_fa2pac(argc-1, argv+1);
	else if (strcmp(argv[1], "pac2bwt") == 0) ret = command_pac2bwt(argc-1, argv+1);
	else if (strcmp(argv[1], "bwtupdate") == 0) ret = command_bwtupdate(argc-1, argv+1);
	else if (strcmp(argv[1], "bwt2sa") == 0) ret = command_bwt2sa(argc-1, argv+1);
	else if (strcmp(argv[1], "shm") == 0) ret = main_shm(argc-1, argv+1);
	else if (strcmp(argv[1], "version") == 0) return renderVersion();
	else {
		fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
		return 1;
	}

	err_fflush(stdout);
	err_fclose(stdout);

	// If execution was successful, print time and CPU statistics
	if (ret == 0) {
		fprintf(stderr, "[%s] Version: %s\n", __func__, PACKAGE_VERSION);
		fprintf(stderr, "[%s] CMD:", __func__);
		for (i = 0; i < argc; ++i)
			fprintf(stderr, " %s", argv[i]);
		fprintf(stderr, "\n[%s] Real time: %.3f sec; CPU: %.3f sec\n", __func__, realtime() - t_real, cputime());
	}

	free(bwa_pg);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x3130
movb $0x0, %al
callq 0x132c0
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq -0x38(%rbp), %rdi
leaq 0x2a957(%rip), %rsi     # 0x399db
leaq 0x27fc0(%rip), %rdx     # 0x3704b
movb $0x0, %al
callq 0x139b0
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xf0ca
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq -0x38(%rbp), %rdi
leaq 0x2ae71(%rip), %rsi     # 0x39f29
movb $0x0, %al
callq 0x139b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf099
movq -0x28(%rbp), %rcx
leaq 0x31d8b(%rip), %rax     # 0x40e60
movq %rcx, (%rax)
cmpl $0x2, -0x8(%rbp)
jge 0xf0eb
callq 0xf400
movl %eax, -0x4(%rbp)
jmp 0xf3ef
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x282fb(%rip), %rsi     # 0x373f5
callq 0x34b0
cmpl $0x0, %eax
jne 0xf11f
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x5630
movl %eax, -0x18(%rbp)
jmp 0xf2e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2a8d3(%rip), %rsi     # 0x39a01
callq 0x34b0
cmpl $0x0, %eax
jne 0xf153
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x5ed0
movl %eax, -0x18(%rbp)
jmp 0xf2e6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x286c4(%rip), %rsi     # 0x37826
callq 0x34b0
cmpl $0x0, %eax
jne 0xf187
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x7780
movl %eax, -0x18(%rbp)
jmp 0xf2e4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2b086(%rip), %rsi     # 0x3a21c
callq 0x34b0
cmpl $0x0, %eax
jne 0xf1bb
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x178b0
movl %eax, -0x18(%rbp)
jmp 0xf2e2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x27f19(%rip), %rsi     # 0x370e3
callq 0x34b0
cmpl $0x0, %eax
jne 0xf1ef
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x51d0
movl %eax, -0x18(%rbp)
jmp 0xf2e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2a80b(%rip), %rsi     # 0x39a09
callq 0x34b0
cmpl $0x0, %eax
jne 0xf223
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x54b0
movl %eax, -0x18(%rbp)
jmp 0xf2de
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2a7e1(%rip), %rsi     # 0x39a13
callq 0x34b0
cmpl $0x0, %eax
jne 0xf257
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x5530
movl %eax, -0x18(%rbp)
jmp 0xf2dc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2a70d(%rip), %rsi     # 0x39973
callq 0x34b0
cmpl $0x0, %eax
jne 0xf288
movl -0x8(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xedf0
movl %eax, -0x18(%rbp)
jmp 0xf2da
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x2a783(%rip), %rsi     # 0x39a1a
callq 0x34b0
cmpl $0x0, %eax
jne 0xf2ae
callq 0xf580
movl %eax, -0x4(%rbp)
jmp 0xf3ef
movq 0x30d23(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x2a75b(%rip), %rsi     # 0x39a22
movb $0x0, %al
callq 0x34e0
movl $0x1, -0x4(%rbp)
jmp 0xf3ef
jmp 0xf2dc
jmp 0xf2de
jmp 0xf2e0
jmp 0xf2e2
jmp 0xf2e4
jmp 0xf2e6
jmp 0xf2e8
movq 0x30cc1(%rip), %rax     # 0x3ffb0
movq (%rax), %rdi
callq 0x130e0
movq 0x30cb2(%rip), %rax     # 0x3ffb0
movq (%rax), %rdi
callq 0x131b0
cmpl $0x0, -0x18(%rbp)
jne 0xf3da
movq 0x30cc1(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
leaq 0x2a723(%rip), %rsi     # 0x39a44
leaq 0x27ced(%rip), %rdx     # 0x37015
leaq 0x27d1c(%rip), %rcx     # 0x3704b
movb $0x0, %al
callq 0x34e0
movq 0x30c9b(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
leaq 0x2a70f(%rip), %rsi     # 0x39a56
leaq 0x27cc7(%rip), %rdx     # 0x37015
movb $0x0, %al
callq 0x34e0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xf393
movq 0x30c6d(%rip), %rax     # 0x3ffd8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x2aba8(%rip), %rsi     # 0x39f29
movb $0x0, %al
callq 0x34e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf35c
movq 0x30c3e(%rip), %rax     # 0x3ffd8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movb $0x0, %al
callq 0x132c0
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movb $0x0, %al
callq 0x13260
movq -0x48(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
leaq 0x2a694(%rip), %rsi     # 0x39a60
leaq 0x27c42(%rip), %rdx     # 0x37015
movb $0x2, %al
callq 0x34e0
leaq 0x31a7f(%rip), %rax     # 0x40e60
movq (%rax), %rdi
callq 0x3380
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)