#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int bwa_aln(int, char **);
int bwa_aln_my_core(char *, char *, int /*<<< orphan*/ *);
int bwa_bwt2sa(int, char **);
int bwa_bwtsw2(int, char **);
int bwa_bwtupdate(int, char **);
int bwa_fa2pac(int, char **);
int bwa_index(int, char **);
int bwa_pac2bwt(int, char **);
int bwa_pac2cspac(int, char **);
int bwa_pac_rev(int, char **);
int bwa_sai2sam_pe(int, char **);
int bwa_sai2sam_se(int, char **);
int bwa_stdsw(int, char **);
int bwt_bwtgen_main(int, char **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int usage();
int main(int argc, char *argv[]) {
  if (argc < 2)
    return usage();
  if (strcmp(argv[1], "fa2pac") == 0)
    return bwa_fa2pac(argc - 1, argv + 1);
  else if (strcmp(argv[1], "pac2bwt") == 0)
    return bwa_pac2bwt(argc - 1, argv + 1);
  else if (strcmp(argv[1], "pac2bwtgen") == 0)
    return bwt_bwtgen_main(argc - 1, argv + 1);
  else if (strcmp(argv[1], "bwtupdate") == 0)
    return bwa_bwtupdate(argc - 1, argv + 1);
  else if (strcmp(argv[1], "pac_rev") == 0)
    return bwa_pac_rev(argc - 1, argv + 1);
  else if (strcmp(argv[1], "bwt2sa") == 0)
    return bwa_bwt2sa(argc - 1, argv + 1);
  else if (strcmp(argv[1], "index") == 0)
    return bwa_index(argc - 1, argv + 1);
  else if (strcmp(argv[1], "aln") == 0)
    return bwa_aln(argc - 1, argv + 1);
  else if (strcmp(argv[1], "myaln+") == 0)
    return bwa_aln_my_core("test/test.fa", "TTGATCGTGACACGCC", NULL);
  else if (strcmp(argv[1], "myaln-") == 0)
    return bwa_aln_my_core("test/test.fa", "GGCGTGTCACGATCAA", NULL);
  else if (strcmp(argv[1], "sw") == 0)
    return bwa_stdsw(argc - 1, argv + 1);
  else if (strcmp(argv[1], "samse") == 0)
    return bwa_sai2sam_se(argc - 1, argv + 1);
  else if (strcmp(argv[1], "sampe") == 0)
    return bwa_sai2sam_pe(argc - 1, argv + 1);
  else if (strcmp(argv[1], "pac2cspac") == 0)
    return bwa_pac2cspac(argc - 1, argv + 1);
  else if (strcmp(argv[1], "stdsw") == 0)
    return bwa_stdsw(argc - 1, argv + 1);
  else if (strcmp(argv[1], "bwtsw2") == 0)
    return bwa_bwtsw2(argc - 1, argv + 1);
  else if (strcmp(argv[1], "dbwtsw") == 0)
    return bwa_bwtsw2(argc - 1, argv + 1);
  else if (strcmp(argv[1], "bwasw") == 0)
    return bwa_bwtsw2(argc - 1, argv + 1);
  else {
    fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    123f <main+0x2f>
mov    $0x0,%al
call   10e0 <usage@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdb2(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1278 <main+0x68>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10d0 <bwa_fa2pac@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd80(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12b1 <main+0xa1>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10c0 <bwa_pac2bwt@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd4f(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12ea <main+0xda>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1030 <bwt_bwtgen_main@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd21(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1323 <main+0x113>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1120 <bwa_bwtupdate@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcf2(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    135c <main+0x14c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10b0 <bwa_pac_rev@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcc1(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1395 <main+0x185>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1100 <bwa_bwt2sa@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc8f(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13ce <main+0x1be>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1130 <bwa_index@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc5c(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1407 <main+0x1f7>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1070 <bwa_aln@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc27(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1444 <main+0x234>
lea    0xc18(%rip),%rdi
lea    0xc1e(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1060 <bwa_aln_my_core@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc0f(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1481 <main+0x271>
lea    0xbdb(%rip),%rdi
lea    0xbf9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1060 <bwa_aln_my_core@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc17(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    14ba <main+0x2aa>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <bwa_stdsw@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xbb1(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    14f3 <main+0x2e3>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   10f0 <bwa_sai2sam_se@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xb7e(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    152c <main+0x31c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1110 <bwa_sai2sam_pe@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xb4b(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1565 <main+0x355>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1080 <bwa_pac2cspac@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xb1c(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    159e <main+0x38e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <bwa_stdsw@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xae9(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    15d7 <main+0x3c7>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <bwa_bwtsw2@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xab7(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1610 <main+0x400>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <bwa_bwtsw2@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xa85(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1649 <main+0x439>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <bwa_bwtsw2@plt>
mov    %eax,-0x4(%rbp)
jmp    166d <main+0x45d>
mov    0x2990(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xa49(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x1,%edi
jg     1225 <main+0x15>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10e0 <usage@plt>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
add    $0x8,%rbx
lea    0xdc7(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1403 <main+0x1f3>
mov    (%rbx),%rdi
lea    0xdb6(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1416 <main+0x206>
mov    (%rbx),%rdi
lea    0xda6(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1429 <main+0x219>
mov    (%rbx),%rdi
lea    0xd99(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     143c <main+0x22c>
mov    (%rbx),%rdi
lea    0xd8b(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     144f <main+0x23f>
mov    (%rbx),%rdi
lea    0xd7b(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1462 <main+0x252>
mov    (%rbx),%rdi
lea    0xd6a(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1475 <main+0x265>
mov    (%rbx),%rdi
lea    0xd58(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1488 <main+0x278>
mov    (%rbx),%rdi
lea    0xd44(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     149b <main+0x28b>
mov    (%rbx),%rdi
lea    0xd51(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14ab <main+0x29b>
mov    (%rbx),%rdi
lea    0xd7e(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14c6 <main+0x2b6>
mov    (%rbx),%rdi
lea    0xd39(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14d9 <main+0x2c9>
mov    (%rbx),%rdi
lea    0xd27(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14ec <main+0x2dc>
mov    (%rbx),%rdi
lea    0xd15(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14ff <main+0x2ef>
mov    (%rbx),%rdi
lea    0xd07(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     14c6 <main+0x2b6>
mov    (%rbx),%rdi
lea    0xcf5(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1512 <main+0x302>
mov    (%rbx),%rdi
lea    0xce4(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1512 <main+0x302>
mov    (%rbx),%rdi
lea    0xcd3(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1512 <main+0x302>
mov    0x2bfa(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xcb8(%rip),%rsi
call   10a0 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10d0 <bwa_fa2pac@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10c0 <bwa_pac2bwt@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <bwt_bwtgen_main@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1120 <bwa_bwtupdate@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10b0 <bwa_pac_rev@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1100 <bwa_bwt2sa@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1130 <bwa_index@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <bwa_aln@plt>
lea    0xba2(%rip),%rdi
lea    0xba8(%rip),%rsi
jmp    14b9 <main+0x2a9>
lea    0xb92(%rip),%rdi
lea    0xbb0(%rip),%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <bwa_aln_my_core@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <bwa_stdsw@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10f0 <bwa_sai2sam_se@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1110 <bwa_sai2sam_pe@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1080 <bwa_pac2cspac@plt>
add    $0xffffffff,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <bwa_bwtsw2@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fa2pac\00"
@.str.1 = [8 x i8] c"pac2bwt\00"
@.str.2 = [11 x i8] c"pac2bwtgen\00"
@.str.3 = [10 x i8] c"bwtupdate\00"
@.str.4 = [8 x i8] c"pac_rev\00"
@.str.5 = [7 x i8] c"bwt2sa\00"
@.str.6 = [6 x i8] c"index\00"
@.str.7 = [4 x i8] c"aln\00"
@.str.8 = [7 x i8] c"myaln+\00"
@.str.9 = [13 x i8] c"test/test.fa\00"
@.str.10 = [17 x i8] c"TTGATCGTGACACGCC\00"
@.str.11 = [7 x i8] c"myaln-\00"
@.str.12 = [17 x i8] c"GGCGTGTCACGATCAA\00"
@.str.13 = [3 x i8] c"sw\00"
@.str.14 = [6 x i8] c"samse\00"
@.str.15 = [6 x i8] c"sampe\00"
@.str.16 = [10 x i8] c"pac2cspac\00"
@.str.17 = [6 x i8] c"stdsw\00"
@.str.18 = [7 x i8] c"bwtsw2\00"
@.str.19 = [7 x i8] c"dbwtsw\00"
@.str.20 = [6 x i8] c"bwasw\00"
@stderr = global i32 0
@.str.21 = [34 x i8] c"[main] unrecognized command '%s'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
store i32 %9, i32* %3
br label %224
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %10
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 1
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = call i32 @bwa_fa2pac(i32 %18, i8** %20)
store i32 %21, i32* %3
br label %224
22: ; preds = %10
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %22
%29 = load i32, i32* %4
%30 = sub nsw i32 %29, 1
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = call i32 @bwa_pac2bwt(i32 %30, i8** %32)
store i32 %33, i32* %3
br label %224
34: ; preds = %22
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %46
40: ; preds = %34
%41 = load i32, i32* %4
%42 = sub nsw i32 %41, 1
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = call i32 @bwt_bwtgen_main(i32 %42, i8** %44)
store i32 %45, i32* %3
br label %224
46: ; preds = %34
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 1
%49 = load i8*, i8** %48
%50 = call i64 @strcmp(i8* %49, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %58
52: ; preds = %46
%53 = load i32, i32* %4
%54 = sub nsw i32 %53, 1
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 1
%57 = call i32 @bwa_bwtupdate(i32 %54, i8** %56)
store i32 %57, i32* %3
br label %224
58: ; preds = %46
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %70
64: ; preds = %58
%65 = load i32, i32* %4
%66 = sub nsw i32 %65, 1
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = call i32 @bwa_pac_rev(i32 %66, i8** %68)
store i32 %69, i32* %3
br label %224
70: ; preds = %58
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 1
%73 = load i8*, i8** %72
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %82
76: ; preds = %70
%77 = load i32, i32* %4
%78 = sub nsw i32 %77, 1
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 1
%81 = call i32 @bwa_bwt2sa(i32 %78, i8** %80)
store i32 %81, i32* %3
br label %224
82: ; preds = %70
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 1
%85 = load i8*, i8** %84
%86 = call i64 @strcmp(i8* %85, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %94
88: ; preds = %82
%89 = load i32, i32* %4
%90 = sub nsw i32 %89, 1
%91 = load i8**, i8*** %5
%92 = getelementptr inbounds i8*, i8** %91, i64 1
%93 = call i32 @bwa_index(i32 %90, i8** %92)
store i32 %93, i32* %3
br label %224
94: ; preds = %82
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 1
%97 = load i8*, i8** %96
%98 = call i64 @strcmp(i8* %97, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %106
100: ; preds = %94
%101 = load i32, i32* %4
%102 = sub nsw i32 %101, 1
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 1
%105 = call i32 @bwa_aln(i32 %102, i8** %104)
store i32 %105, i32* %3
br label %224
106: ; preds = %94
%107 = load i8**, i8*** %5
%108 = getelementptr inbounds i8*, i8** %107, i64 1
%109 = load i8*, i8** %108
%110 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %106
%113 = call i32 @bwa_aln_my_core(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32* null)
store i32 %113, i32* %3
br label %224
114: ; preds = %106
%115 = load i8**, i8*** %5
%116 = getelementptr inbounds i8*, i8** %115, i64 1
%117 = load i8*, i8** %116
%118 = call i64 @strcmp(i8* %117, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %122
120: ; preds = %114
%121 = call i32 @bwa_aln_my_core(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32* null)
store i32 %121, i32* %3
br label %224
122: ; preds = %114
%123 = load i8**, i8*** %5
%124 = getelementptr inbounds i8*, i8** %123, i64 1
%125 = load i8*, i8** %124
%126 = call i64 @strcmp(i8* %125, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%127 = icmp eq i64 %126, 0
br i1 %127, label %128, label %134
128: ; preds = %122
%129 = load i32, i32* %4
%130 = sub nsw i32 %129, 1
%131 = load i8**, i8*** %5
%132 = getelementptr inbounds i8*, i8** %131, i64 1
%133 = call i32 @bwa_stdsw(i32 %130, i8** %132)
store i32 %133, i32* %3
br label %224
134: ; preds = %122
%135 = load i8**, i8*** %5
%136 = getelementptr inbounds i8*, i8** %135, i64 1
%137 = load i8*, i8** %136
%138 = call i64 @strcmp(i8* %137, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%139 = icmp eq i64 %138, 0
br i1 %139, label %140, label %146
140: ; preds = %134
%141 = load i32, i32* %4
%142 = sub nsw i32 %141, 1
%143 = load i8**, i8*** %5
%144 = getelementptr inbounds i8*, i8** %143, i64 1
%145 = call i32 @bwa_sai2sam_se(i32 %142, i8** %144)
store i32 %145, i32* %3
br label %224
146: ; preds = %134
%147 = load i8**, i8*** %5
%148 = getelementptr inbounds i8*, i8** %147, i64 1
%149 = load i8*, i8** %148
%150 = call i64 @strcmp(i8* %149, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%151 = icmp eq i64 %150, 0
br i1 %151, label %152, label %158
152: ; preds = %146
%153 = load i32, i32* %4
%154 = sub nsw i32 %153, 1
%155 = load i8**, i8*** %5
%156 = getelementptr inbounds i8*, i8** %155, i64 1
%157 = call i32 @bwa_sai2sam_pe(i32 %154, i8** %156)
store i32 %157, i32* %3
br label %224
158: ; preds = %146
%159 = load i8**, i8*** %5
%160 = getelementptr inbounds i8*, i8** %159, i64 1
%161 = load i8*, i8** %160
%162 = call i64 @strcmp(i8* %161, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0))
%163 = icmp eq i64 %162, 0
br i1 %163, label %164, label %170
164: ; preds = %158
%165 = load i32, i32* %4
%166 = sub nsw i32 %165, 1
%167 = load i8**, i8*** %5
%168 = getelementptr inbounds i8*, i8** %167, i64 1
%169 = call i32 @bwa_pac2cspac(i32 %166, i8** %168)
store i32 %169, i32* %3
br label %224
170: ; preds = %158
%171 = load i8**, i8*** %5
%172 = getelementptr inbounds i8*, i8** %171, i64 1
%173 = load i8*, i8** %172
%174 = call i64 @strcmp(i8* %173, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%175 = icmp eq i64 %174, 0
br i1 %175, label %176, label %182
176: ; preds = %170
%177 = load i32, i32* %4
%178 = sub nsw i32 %177, 1
%179 = load i8**, i8*** %5
%180 = getelementptr inbounds i8*, i8** %179, i64 1
%181 = call i32 @bwa_stdsw(i32 %178, i8** %180)
store i32 %181, i32* %3
br label %224
182: ; preds = %170
%183 = load i8**, i8*** %5
%184 = getelementptr inbounds i8*, i8** %183, i64 1
%185 = load i8*, i8** %184
%186 = call i64 @strcmp(i8* %185, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%187 = icmp eq i64 %186, 0
br i1 %187, label %188, label %194
188: ; preds = %182
%189 = load i32, i32* %4
%190 = sub nsw i32 %189, 1
%191 = load i8**, i8*** %5
%192 = getelementptr inbounds i8*, i8** %191, i64 1
%193 = call i32 @bwa_bwtsw2(i32 %190, i8** %192)
store i32 %193, i32* %3
br label %224
194: ; preds = %182
%195 = load i8**, i8*** %5
%196 = getelementptr inbounds i8*, i8** %195, i64 1
%197 = load i8*, i8** %196
%198 = call i64 @strcmp(i8* %197, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0))
%199 = icmp eq i64 %198, 0
br i1 %199, label %200, label %206
200: ; preds = %194
%201 = load i32, i32* %4
%202 = sub nsw i32 %201, 1
%203 = load i8**, i8*** %5
%204 = getelementptr inbounds i8*, i8** %203, i64 1
%205 = call i32 @bwa_bwtsw2(i32 %202, i8** %204)
store i32 %205, i32* %3
br label %224
206: ; preds = %194
%207 = load i8**, i8*** %5
%208 = getelementptr inbounds i8*, i8** %207, i64 1
%209 = load i8*, i8** %208
%210 = call i64 @strcmp(i8* %209, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%211 = icmp eq i64 %210, 0
br i1 %211, label %212, label %218
212: ; preds = %206
%213 = load i32, i32* %4
%214 = sub nsw i32 %213, 1
%215 = load i8**, i8*** %5
%216 = getelementptr inbounds i8*, i8** %215, i64 1
%217 = call i32 @bwa_bwtsw2(i32 %214, i8** %216)
store i32 %217, i32* %3
br label %224
218: ; preds = %206
%219 = load i32, i32* @stderr
%220 = load i8**, i8*** %5
%221 = getelementptr inbounds i8*, i8** %220, i64 1
%222 = load i8*, i8** %221
%223 = call i32 @fprintf(i32 %219, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i8* %222)
store i32 1, i32* %3
br label %224
224: ; preds = %218, %212, %200, %188, %176, %164, %152, %140, %128, %120, %112, %100, %88, %76, %64, %52, %40, %28, %16, %8
%225 = load i32, i32* %3
ret i32 %225
}

LLVM IR (-O2):
@.str = [7 x i8] c"fa2pac\00"
@.str.1 = [8 x i8] c"pac2bwt\00"
@.str.2 = [11 x i8] c"pac2bwtgen\00"
@.str.3 = [10 x i8] c"bwtupdate\00"
@.str.4 = [8 x i8] c"pac_rev\00"
@.str.5 = [7 x i8] c"bwt2sa\00"
@.str.6 = [6 x i8] c"index\00"
@.str.7 = [4 x i8] c"aln\00"
@.str.8 = [7 x i8] c"myaln+\00"
@.str.9 = [13 x i8] c"test/test.fa\00"
@.str.10 = [17 x i8] c"TTGATCGTGACACGCC\00"
@.str.11 = [7 x i8] c"myaln-\00"
@.str.12 = [17 x i8] c"GGCGTGTCACGATCAA\00"
@.str.13 = [3 x i8] c"sw\00"
@.str.14 = [6 x i8] c"samse\00"
@.str.15 = [6 x i8] c"sampe\00"
@.str.16 = [10 x i8] c"pac2cspac\00"
@.str.17 = [6 x i8] c"stdsw\00"
@.str.18 = [7 x i8] c"bwtsw2\00"
@.str.19 = [7 x i8] c"dbwtsw\00"
@.str.20 = [6 x i8] c"bwasw\00"
@stderr = global i32 0
@.str.21 = [34 x i8] c"[main] unrecognized command '%s'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %135
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = add nsw i32 %0, -1
%13 = tail call i32 @bwa_fa2pac(i32 %12, i8** %7)
br label %135
14: ; preds = %6
%15 = load i8*, i8** %7
%16 = tail call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = add nsw i32 %0, -1
%20 = tail call i32 @bwa_pac2bwt(i32 %19, i8** %7)
br label %135
21: ; preds = %14
%22 = load i8*, i8** %7
%23 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = add nsw i32 %0, -1
%27 = tail call i32 @bwt_bwtgen_main(i32 %26, i8** %7)
br label %135
28: ; preds = %21
%29 = load i8*, i8** %7
%30 = tail call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = add nsw i32 %0, -1
%34 = tail call i32 @bwa_bwtupdate(i32 %33, i8** %7)
br label %135
35: ; preds = %28
%36 = load i8*, i8** %7
%37 = tail call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = add nsw i32 %0, -1
%41 = tail call i32 @bwa_pac_rev(i32 %40, i8** %7)
br label %135
42: ; preds = %35
%43 = load i8*, i8** %7
%44 = tail call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %42
%47 = add nsw i32 %0, -1
%48 = tail call i32 @bwa_bwt2sa(i32 %47, i8** %7)
br label %135
49: ; preds = %42
%50 = load i8*, i8** %7
%51 = tail call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = add nsw i32 %0, -1
%55 = tail call i32 @bwa_index(i32 %54, i8** %7)
br label %135
56: ; preds = %49
%57 = load i8*, i8** %7
%58 = tail call i64 @strcmp(i8* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %56
%61 = add nsw i32 %0, -1
%62 = tail call i32 @bwa_aln(i32 %61, i8** %7)
br label %135
63: ; preds = %56
%64 = load i8*, i8** %7
%65 = tail call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = tail call i32 @bwa_aln_my_core(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i32* null)
br label %135
69: ; preds = %63
%70 = load i8*, i8** %7
%71 = tail call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = tail call i32 @bwa_aln_my_core(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i32* null)
br label %135
75: ; preds = %69
%76 = load i8*, i8** %7
%77 = tail call i64 @strcmp(i8* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %75
%80 = add nsw i32 %0, -1
%81 = tail call i32 @bwa_stdsw(i32 %80, i8** %7)
br label %135
82: ; preds = %75
%83 = load i8*, i8** %7
%84 = tail call i64 @strcmp(i8* %83, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %89
86: ; preds = %82
%87 = add nsw i32 %0, -1
%88 = tail call i32 @bwa_sai2sam_se(i32 %87, i8** %7)
br label %135
89: ; preds = %82
%90 = load i8*, i8** %7
%91 = tail call i64 @strcmp(i8* %90, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %89
%94 = add nsw i32 %0, -1
%95 = tail call i32 @bwa_sai2sam_pe(i32 %94, i8** %7)
br label %135
96: ; preds = %89
%97 = load i8*, i8** %7
%98 = tail call i64 @strcmp(i8* %97, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0))
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %103
100: ; preds = %96
%101 = add nsw i32 %0, -1
%102 = tail call i32 @bwa_pac2cspac(i32 %101, i8** %7)
br label %135
103: ; preds = %96
%104 = load i8*, i8** %7
%105 = tail call i64 @strcmp(i8* %104, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %103
%108 = add nsw i32 %0, -1
%109 = tail call i32 @bwa_stdsw(i32 %108, i8** %7)
br label %135
110: ; preds = %103
%111 = load i8*, i8** %7
%112 = tail call i64 @strcmp(i8* %111, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %117
114: ; preds = %110
%115 = add nsw i32 %0, -1
%116 = tail call i32 @bwa_bwtsw2(i32 %115, i8** %7)
br label %135
117: ; preds = %110
%118 = load i8*, i8** %7
%119 = tail call i64 @strcmp(i8* %118, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0))
%120 = icmp eq i64 %119, 0
br i1 %120, label %121, label %124
121: ; preds = %117
%122 = add nsw i32 %0, -1
%123 = tail call i32 @bwa_bwtsw2(i32 %122, i8** %7)
br label %135
124: ; preds = %117
%125 = load i8*, i8** %7
%126 = tail call i64 @strcmp(i8* %125, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0))
%127 = icmp eq i64 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %124
%129 = add nsw i32 %0, -1
%130 = tail call i32 @bwa_bwtsw2(i32 %129, i8** %7)
br label %135
131: ; preds = %124
%132 = load i32, i32* @stderr
%133 = load i8*, i8** %7
%134 = tail call i32 @fprintf(i32 %132, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i8* %133)
br label %135
135: ; preds = %131, %128, %121, %114, %107, %100, %93, %86, %79, %73, %67, %60, %53, %46, %39, %32, %25, %18, %11, %4
%136 = phi i32 [ %5, %4 ], [ %13, %11 ], [ %20, %18 ], [ %27, %25 ], [ %34, %32 ], [ %41, %39 ], [ %48, %46 ], [ %55, %53 ], [ %62, %60 ], [ %68, %67 ], [ %74, %73 ], [ %81, %79 ], [ %88, %86 ], [ %95, %93 ], [ %102, %100 ], [ %109, %107 ], [ %116, %114 ], [ %123, %121 ], [ %130, %128 ], [ 1, %131 ]
ret i32 %136
}