#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 atoi(char *);
scalar_t__ cleanUniprotReference(int, char const *);
int command_index(int, char **);
char *downloadUniprotReference(int, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char getopt(int, char **, char *);
char *optarg;
int optind;
int /*<<< orphan*/ stderr;
int command_prepare(int argc, char *argv[]) {
  char c;
  char refArg[] = "-p0";
  const char *refName, *proxyAddress;
  int refType, valid;
  const char *passArgs[] = {"index", "-r3", refArg, NULL};
  valid = 1;
  refType = -1;
  refName = NULL;
  proxyAddress = NULL;
  while ((c = getopt(argc, argv, "r:f:P:")) >= 0) {
    if (c == 'r')
      refType = atoi(optarg);
    if (c == 'f')
      refName = optarg;
    if (c == 'P')
      proxyAddress = optarg;
    if (c == '?')
      valid = 0;
  }
  if ((refType < 1) || (refType > 2))
    valid = 0;
  if (!valid) {
    fprintf(stderr, "\n");
    fprintf(stderr, "Usage: paladin prepare [options]\n\n");
    fprintf(stderr, "Options:\n\n");
    fprintf(stderr, "    -r <#>         Reference Database:\n");
    fprintf(stderr,
            "                     1: UniProtKB Reviewed (Swiss-Prot)\n");
    fprintf(stderr,
            "                     2: UniProtKB Clustered 90%% (UniRef90)\n\n");
    fprintf(stderr, "    -f <ref.fasta> Skip download, use local copy of "
                    "reference database (may be indexed)\n");
    fprintf(stderr, "    -P <address>   HTTP or SOCKS proxy address\n\n");
    fprintf(stderr, "Examples:\n\n");
    fprintf(stderr, "   paladin prepare -r2\n");
    fprintf(stderr, "   paladin prepare -r1 -f uniprot_sprot.fasta.gz\n");
    fprintf(stderr, "\n");
    return 1;
  }
  if (!refName) {
    if ((refName = downloadUniprotReference(refType, proxyAddress))[0] == 0) {
      return 1;
    }
  }
  if (cleanUniprotReference(refType, refName) == 0) {
    optind = 1;
    ((char *)passArgs[2])[2] = '0' + refType;
    passArgs[3] = refName;
    return command_index(4, (char **)passArgs);
  }
  return 0;
}


x86 assembly (clang, -O0):
<command_prepare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xe8b(%rip),%eax
mov    %eax,-0x15(%rbp)
lea    0xe85(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe80(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    -0x15(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe44(%rip),%rdx
call   1070 <getopt@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
jl     124c <command_prepare+0xec>
movsbl -0x11(%rbp),%eax
cmp    $0x72,%eax
jne    11fd <command_prepare+0x9d>
mov    0x2e06(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x2c(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x66,%eax
jne    1218 <command_prepare+0xb8>
mov    0x2de7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x50,%eax
jne    1233 <command_prepare+0xd3>
mov    0x2dcc(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x3f,%eax
jne    1247 <command_prepare+0xe7>
movl   $0x0,-0x30(%rbp)
jmp    11bc <command_prepare+0x5c>
cmpl   $0x1,-0x2c(%rbp)
jl     1260 <command_prepare+0x100>
cmpl   $0x2,-0x2c(%rbp)
jle    1267 <command_prepare+0x107>
movl   $0x0,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    1379 <command_prepare+0x219>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
lea    0xe5f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
lea    0xd7f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
lea    0xd8d(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
lea    0xd83(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
lea    0xd96(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
lea    0xdba(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%edi
lea    0xde3(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
lea    0xe27(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
lea    0xe3a(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2c86(%rip),%rax
mov    (%rax),%edi
lea    0xe3d(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2c71(%rip),%rax
mov    (%rax),%edi
lea    0xd78(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1408 <command_prepare+0x2a8>
cmpq   $0x0,-0x20(%rbp)
jne    13b1 <command_prepare+0x251>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1060 <downloadUniprotReference@plt>
mov    %rax,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    13ac <command_prepare+0x24c>
movl   $0x1,-0x4(%rbp)
jmp    1408 <command_prepare+0x2a8>
jmp    13b1 <command_prepare+0x251>
mov    -0x2c(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1050 <cleanUniprotReference@plt>
cmp    $0x0,%rax
jne    1401 <command_prepare+0x2a1>
mov    0x2c12(%rip),%rax
movl   $0x1,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x40(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x50(%rbp),%rsi
mov    $0x4,%edi
call   1030 <command_index@plt>
mov    %eax,-0x4(%rbp)
jmp    1408 <command_prepare+0x2a8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_prepare>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movl   $0x30702d,(%rsp)
lea    0xe84(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xe7e(%rip),%rax
mov    %rax,0x18(%rsp)
mov    %rsp,%rax
mov    %rax,0x20(%rsp)
lea    0xe6e(%rip),%rdx
mov    %edi,0x4(%rsp)
mov    %rsi,%r12
call   1070 <getopt@plt>
test   %al,%al
js     1293 <command_prepare+0x133>
mov    %eax,%ebx
mov    $0xffffffff,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r15d
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    1203 <command_prepare+0xa3>
nopl   0x0(%rax)
cmp    $0x66,%bl
cmove  %r14,%r13
cmp    $0x50,%bl
cmove  %r14,%rbp
cmp    $0x3f,%bl
mov    $0x0,%eax
cmove  %eax,%r15d
mov    0x4(%rsp),%edi
mov    %r12,%rsi
lea    0xe12(%rip),%rdx
call   1070 <getopt@plt>
mov    %eax,%ebx
test   %al,%al
js     1221 <command_prepare+0xc1>
mov    0x2dee(%rip),%rax
mov    (%rax),%r14
cmp    $0x72,%bl
jne    11d0 <command_prepare+0x70>
mov    %r14,%rdi
call   1080 <atoi@plt>
mov    %rax,0x8(%rsp)
jmp    11d0 <command_prepare+0x70>
mov    0x8(%rsp),%rbx
lea    -0x3(%rbx),%eax
cmp    $0xfffffffe,%eax
jb     1293 <command_prepare+0x133>
test   %r15d,%r15d
je     1293 <command_prepare+0x133>
test   %r13,%r13
jne    124e <command_prepare+0xee>
mov    %ebx,%edi
mov    %rbp,%rsi
call   1060 <downloadUniprotReference@plt>
mov    %rax,%r13
cmpb   $0x0,(%rax)
je     134d <command_prepare+0x1ed>
mov    %ebx,%edi
mov    %r13,%rsi
call   1050 <cleanUniprotReference@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1352 <command_prepare+0x1f2>
mov    0x2d73(%rip),%rax
movl   $0x1,(%rax)
add    $0x30,%bl
mov    %bl,0x2(%rsp)
mov    %r13,0x28(%rsp)
lea    0x10(%rsp),%rsi
mov    $0x4,%edi
call   1030 <command_index@plt>
jmp    1352 <command_prepare+0x1f2>
mov    0x2d36(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xe38(%rip),%rbx
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xd5b(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xd6f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xd6b(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xd84(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xdae(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xddd(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe27(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe49(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe46(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe4f(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.command_prepare.refArg = [4 x i8] c"-p0\00"
@.str = [6 x i8] c"index\00"
@.str.1 = [4 x i8] c"-r3\00"
@.str.2 = [7 x i8] c"r:f:P:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [35 x i8] c"Usage: paladin prepare [options]\0A\0A\00"
@.str.5 = [11 x i8] c"Options:\0A\0A\00"
@.str.6 = [40 x i8] c" -r <#> Reference Database:\0A\00"
@.str.7 = [57 x i8] c" 1: UniProtKB Reviewed (Swiss-Prot)\0A\00"
@.str.8 = [62 x i8] c" 2: UniProtKB Clustered 90%% (UniRef90)\0A\0A\00"
@.str.9 = [89 x i8] c" -f <ref.fasta> Skip download, use local copy of reference database (may be indexed)\0A\00"
@.str.10 = [49 x i8] c" -P <address> HTTP or SOCKS proxy address\0A\0A\00"
@.str.11 = [12 x i8] c"Examples:\0A\0A\00"
@.str.12 = [24 x i8] c" paladin prepare -r2\0A\00"
@.str.13 = [50 x i8] c" paladin prepare -r1 -f uniprot_sprot.fasta.gz\0A\00"
@optind = global i32 0
define i32 @command_prepare(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca [4 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [4 x i8*]
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = bitcast [4 x i8]* %7 to i8*
%14 = getelementptr inbounds [4 x i8*], [4 x i8*]* %12, i64 0, i64 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds i8*, i8** %14, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %15
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
store i8* %17, i8** %16
%18 = getelementptr inbounds i8*, i8** %16, i64 1
store i8* null, i8** %18
store i32 1, i32* %11
store i32 -1, i32* %10
store i8* null, i8** %8
store i8* null, i8** %9
br label %19
19: ; preds = %49, %2
%20 = load i32, i32* %4
%21 = load i8**, i8*** %5
%22 = call signext i8 @getopt(i32 %20, i8** %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i8 %22, i8* %6
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 0
br i1 %24, label %25, label %50
25: ; preds = %19
%26 = load i8, i8* %6
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 114
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i8*, i8** @optarg
%31 = call i32 @atoi(i8* %30)
store i32 %31, i32* %10
br label %32
32: ; preds = %29, %25
%33 = load i8, i8* %6
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 102
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i8*, i8** @optarg
store i8* %37, i8** %8
br label %38
38: ; preds = %36, %32
%39 = load i8, i8* %6
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 80
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = load i8*, i8** @optarg
store i8* %43, i8** %9
br label %44
44: ; preds = %42, %38
%45 = load i8, i8* %6
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 63
br i1 %47, label %48, label %49
48: ; preds = %44
store i32 0, i32* %11
br label %49
49: ; preds = %48, %44
br label %19
50: ; preds = %19
%51 = load i32, i32* %10
%52 = icmp slt i32 %51, 1
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* %10
%55 = icmp sgt i32 %54, 2
br i1 %55, label %56, label %57
56: ; preds = %53, %50
store i32 0, i32* %11
br label %57
57: ; preds = %56, %53
%58 = load i32, i32* %11
%59 = icmp ne i32 %58, 0
br i1 %59, label %85, label %60
60: ; preds = %57
%61 = load i32, i32* @stderr
%62 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%63 = load i32, i32* @stderr
%64 = call i32 @fprintf(i32 %63, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%65 = load i32, i32* @stderr
%66 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%67 = load i32, i32* @stderr
%68 = call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%69 = load i32, i32* @stderr
%70 = call i32 @fprintf(i32 %69, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0))
%71 = load i32, i32* @stderr
%72 = call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0))
%73 = load i32, i32* @stderr
%74 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.9, i64 0, i64 0))
%75 = load i32, i32* @stderr
%76 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%77 = load i32, i32* @stderr
%78 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%79 = load i32, i32* @stderr
%80 = call i32 @fprintf(i32 %79, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%81 = load i32, i32* @stderr
%82 = call i32 @fprintf(i32 %81, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%83 = load i32, i32* @stderr
%84 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %115
85: ; preds = %57
%86 = load i8*, i8** %8
%87 = icmp ne i8* %86, null
br i1 %87, label %98, label %88
88: ; preds = %85
%89 = load i32, i32* %10
%90 = load i8*, i8** %9
%91 = call i8* @downloadUniprotReference(i32 %89, i8* %90)
store i8* %91, i8** %8
%92 = getelementptr inbounds i8, i8* %91, i64 0
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %97
96: ; preds = %88
store i32 1, i32* %3
br label %115
97: ; preds = %88
br label %98
98: ; preds = %97, %85
%99 = load i32, i32* %10
%100 = load i8*, i8** %8
%101 = call i64 @cleanUniprotReference(i32 %99, i8* %100)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %114
103: ; preds = %98
store i32 1, i32* @optind
%104 = load i32, i32* %10
%105 = add nsw i32 48, %104
%106 = trunc i32 %105 to i8
%107 = getelementptr inbounds [4 x i8*], [4 x i8*]* %12, i64 0, i64 2
%108 = load i8*, i8** %107
%109 = getelementptr inbounds i8, i8* %108, i64 2
store i8 %106, i8* %109
%110 = load i8*, i8** %8
%111 = getelementptr inbounds [4 x i8*], [4 x i8*]* %12, i64 0, i64 3
store i8* %110, i8** %111
%112 = getelementptr inbounds [4 x i8*], [4 x i8*]* %12, i64 0, i64 0
%113 = call i32 @command_index(i32 4, i8** %112)
store i32 %113, i32* %3
br label %115
114: ; preds = %98
store i32 0, i32* %3
br label %115
115: ; preds = %114, %103, %96, %60
%116 = load i32, i32* %3
ret i32 %116
}

LLVM IR (-O2):
@.str = [6 x i8] c"index\00"
@.str.1 = [4 x i8] c"-r3\00"
@.str.2 = [7 x i8] c"r:f:P:\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [35 x i8] c"Usage: paladin prepare [options]\0A\0A\00"
@.str.5 = [11 x i8] c"Options:\0A\0A\00"
@.str.6 = [40 x i8] c" -r <#> Reference Database:\0A\00"
@.str.7 = [57 x i8] c" 1: UniProtKB Reviewed (Swiss-Prot)\0A\00"
@.str.8 = [62 x i8] c" 2: UniProtKB Clustered 90%% (UniRef90)\0A\0A\00"
@.str.9 = [89 x i8] c" -f <ref.fasta> Skip download, use local copy of reference database (may be indexed)\0A\00"
@.str.10 = [49 x i8] c" -P <address> HTTP or SOCKS proxy address\0A\0A\00"
@.str.11 = [12 x i8] c"Examples:\0A\0A\00"
@.str.12 = [24 x i8] c" paladin prepare -r2\0A\00"
@.str.13 = [50 x i8] c" paladin prepare -r1 -f uniprot_sprot.fasta.gz\0A\00"
@optind = global i32 0
define i32 @command_prepare(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca [4 x i8*]
%5 = bitcast i32* %3 to i8*
store i32 3174445, i32* %3
%6 = bitcast [4 x i8*]* %4 to i8*
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 2
%10 = bitcast i8** %9 to i32**
store i32* %3, i32** %10
%11 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 3
%12 = call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp sgt i8 %12, -1
br i1 %13, label %14, label %39
14: ; preds = %2, %24
%15 = phi i8 [ %32, %24 ], [ %12, %2 ]
%16 = phi i32 [ %31, %24 ], [ 1, %2 ]
%17 = phi i32 [ %25, %24 ], [ -1, %2 ]
%18 = phi i8* [ %29, %24 ], [ null, %2 ]
%19 = phi i8* [ %27, %24 ], [ null, %2 ]
%20 = icmp eq i8 %15, 114
%21 = load i8*, i8** @optarg
br i1 %20, label %22, label %24
22: ; preds = %14
%23 = call i32 @atoi(i8* %21)
br label %24
24: ; preds = %14, %22
%25 = phi i32 [ %23, %22 ], [ %17, %14 ]
%26 = icmp eq i8 %15, 102
%27 = select i1 %26, i8* %21, i8* %19
%28 = icmp eq i8 %15, 80
%29 = select i1 %28, i8* %21, i8* %18
%30 = icmp eq i8 %15, 63
%31 = select i1 %30, i32 0, i32 %16
%32 = call signext i8 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%33 = icmp sgt i8 %32, -1
br i1 %33, label %14, label %34
34: ; preds = %24
%35 = icmp eq i32 %31, 0
%36 = add i32 %25, -3
%37 = icmp ult i32 %36, -2
%38 = select i1 %37, i1 true, i1 %35
br i1 %38, label %39, label %64
39: ; preds = %2, %34
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0))
%50 = load i32, i32* @stderr
%51 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0))
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.9, i64 0, i64 0))
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%60 = load i32, i32* @stderr
%61 = call i32 @fprintf(i32 %60, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%62 = load i32, i32* @stderr
%63 = call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %79
64: ; preds = %34
%65 = icmp eq i8* %27, null
br i1 %65, label %66, label %70
66: ; preds = %64
%67 = call i8* @downloadUniprotReference(i32 %25, i8* %29)
%68 = load i8, i8* %67
%69 = icmp eq i8 %68, 0
br i1 %69, label %79, label %70
70: ; preds = %66, %64
%71 = phi i8* [ %27, %64 ], [ %67, %66 ]
%72 = call i64 @cleanUniprotReference(i32 %25, i8* %71)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %79
74: ; preds = %70
store i32 1, i32* @optind
%75 = trunc i32 %25 to i8
%76 = add nuw nsw i8 %75, 48
%77 = getelementptr inbounds i8, i8* %5, i64 2
store i8 %76, i8* %77
store i8* %71, i8** %11
%78 = call i32 @command_index(i32 4, i8** %7)
br label %79
79: ; preds = %70, %66, %74, %39
%80 = phi i32 [ %78, %74 ], [ 1, %39 ], [ 1, %66 ], [ 0, %70 ]
ret i32 %80
}