#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 /*<<< orphan*/ abort();
int /*<<< orphan*/ append(int, int, char **, int);
int /*<<< orphan*/ append_all(int, int, char **, int);
int /*<<< orphan*/ delete (int, int, char **, int);
int /*<<< orphan*/ extract(int, int, char **, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int getopt(int, char **, char *);
int /*<<< orphan*/ isprint(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ table_of_contents(int, int, char **, int);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  extern char *optarg;
  extern int optind, opterr, optopt;
  int v_flag = 0;
  int q_flag = 0;
  int x_flag = 0;
  int t_flag = 0;
  int d_flag = 0;
  int A_flag = 0;
  int c;
  while ((c = getopt(argc, argv, "vqxtdA")) != -1) {
    switch (c) {
    case 'q':
      q_flag = 1;
      break;
    case 'v':
      v_flag = 1;
      break;
    case 'x':
      x_flag = 1;
      break;
    case 't':
      t_flag = 1;
      break;
    case 'd':
      d_flag = 1;
      break;
    case 'A':
      A_flag = 1;
      break;
    case '?':
      if (optopt == 'c')
        fprintf(stderr, "Option -%c requires an argument.\n", optopt);
      else if (isprint(optopt))
        fprintf(stderr, "Unknown option `-%c'.\n", optopt);
      else
        fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt);
      return 1;
    default:
      abort();
    }
  }
  if (argc == 1) {
    usage();
    return -1;
  }
  if (((q_flag || t_flag || x_flag || d_flag) == 0) && v_flag) {
    printf("-v flag requires another command!\n");
    usage();
    return -1;
  }
  if (q_flag) {
    append(optind, argc, argv, v_flag);
  } else if (A_flag) {
    append_all(optind, argc, argv, v_flag);
  } else if (t_flag) {
    table_of_contents(optind, argc, argv, v_flag);
  } else if (x_flag) {
    extract(optind, argc, argv, v_flag);
  } else if (d_flag) {
    delete (optind, argc, argv, v_flag);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeea(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0xffffffff,%eax
je     1328 <main+0x178>
mov    -0x2c(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x39,%eax
ja     131c <main+0x16c>
mov    -0x38(%rbp),%rax
lea    0xdd1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x18(%rbp)
jmp    1323 <main+0x173>
movl   $0x1,-0x14(%rbp)
jmp    1323 <main+0x173>
movl   $0x1,-0x1c(%rbp)
jmp    1323 <main+0x173>
movl   $0x1,-0x20(%rbp)
jmp    1323 <main+0x173>
movl   $0x1,-0x24(%rbp)
jmp    1323 <main+0x173>
movl   $0x1,-0x28(%rbp)
jmp    1323 <main+0x173>
mov    0x2d61(%rip),%rax
cmpl   $0x63,(%rax)
jne    12b3 <main+0x103>
mov    0x2d41(%rip),%rax
mov    (%rax),%edi
mov    0x2d48(%rip),%rax
mov    (%rax),%edx
lea    0xe46(%rip),%rsi
call   1060 <fprintf@plt>
jmp    1310 <main+0x160>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   10a0 <isprint@plt>
cmp    $0x0,%eax
je     12ed <main+0x13d>
mov    0x2d07(%rip),%rax
mov    (%rax),%edi
mov    0x2d0e(%rip),%rax
mov    (%rax),%edx
lea    0xe2e(%rip),%rsi
call   1060 <fprintf@plt>
jmp    130b <main+0x15b>
mov    0x2ce4(%rip),%rax
mov    (%rax),%edi
mov    0x2ceb(%rip),%rax
mov    (%rax),%edx
lea    0xe22(%rip),%rsi
call   1060 <fprintf@plt>
jmp    1310 <main+0x160>
movl   $0x1,-0x4(%rbp)
jmp    1488 <main+0x2d8>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11f0 <main+0x40>
cmpl   $0x1,-0x8(%rbp)
jne    1345 <main+0x195>
mov    $0x0,%al
call   1090 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1488 <main+0x2d8>
mov    $0x1,%al
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x39(%rbp)
jne    137c <main+0x1cc>
mov    $0x1,%al
cmpl   $0x0,-0x20(%rbp)
mov    %al,-0x39(%rbp)
jne    137c <main+0x1cc>
mov    $0x1,%al
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x39(%rbp)
jne    137c <main+0x1cc>
cmpl   $0x0,-0x24(%rbp)
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    13b6 <main+0x206>
cmpl   $0x0,-0x14(%rbp)
je     13b6 <main+0x206>
lea    0xdac(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1488 <main+0x2d8>
cmpl   $0x0,-0x18(%rbp)
je     13dd <main+0x22d>
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <append@plt>
jmp    1488 <main+0x2d8>
cmpl   $0x0,-0x28(%rbp)
je     1404 <main+0x254>
mov    0x2be2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1070 <append_all@plt>
jmp    1483 <main+0x2d3>
cmpl   $0x0,-0x20(%rbp)
je     142b <main+0x27b>
mov    0x2bbb(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1080 <table_of_contents@plt>
jmp    147e <main+0x2ce>
cmpl   $0x0,-0x1c(%rbp)
je     1452 <main+0x2a2>
mov    0x2b94(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   10c0 <extract@plt>
jmp    1479 <main+0x2c9>
cmpl   $0x0,-0x24(%rbp)
je     1474 <main+0x2c4>
mov    0x2b6d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   10d0 <delete@plt>
jmp    1479 <main+0x2c9>
jmp    147e <main+0x2ce>
jmp    1483 <main+0x2d3>
jmp    1488 <main+0x2d8>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0x0,0x14(%rsp)
lea    0xf16(%rip),%r15
lea    0xe27(%rip),%r14
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %r13d,%r13d
movl   $0x0,0x10(%rsp)
xor    %r12d,%r12d
mov    %r12d,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%r12d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   10b0 <getopt@plt>
mov    $0x1,%ecx
cmp    $0x41,%eax
je     1210 <main+0x60>
lea    -0x3f(%rax),%ecx
cmp    $0x39,%ecx
ja     1271 <main+0xc1>
movslq (%r14,%rcx,4),%rax
add    %r14,%rax
jmp    *%rax
movl   $0x1,0x10(%rsp)
jmp    11ff <main+0x4f>
movl   $0x1,0xc(%rsp)
jmp    11ff <main+0x4f>
movl   $0x1,0x14(%rsp)
jmp    11ff <main+0x4f>
movl   $0x1,0x4(%rsp)
mov    $0x1,%al
mov    %eax,0x8(%rsp)
jmp    11ff <main+0x4f>
mov    $0x1,%r13d
jmp    11ff <main+0x4f>
cmp    $0xffffffff,%eax
jne    13cc <main+0x21c>
cmp    $0x1,%ebp
je     12b0 <main+0x100>
mov    0xc(%rsp),%esi
mov    %esi,%eax
mov    0x14(%rsp),%ecx
or     %ecx,%eax
mov    %r13d,%edx
or     %r13d,%eax
mov    0x10(%rsp),%r13d
or     %r13d,%eax
sete   %al
and    0x8(%rsp),%al
cmp    $0x1,%al
jne    1301 <main+0x151>
lea    0xe9f(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1090 <usage@plt>
mov    $0xffffffff,%r15d
jmp    1335 <main+0x185>
mov    0x2d22(%rip),%rax
mov    (%rax),%ebx
cmp    $0x63,%ebx
jne    12e4 <main+0x134>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
lea    0xe12(%rip),%rsi
mov    $0x63,%edx
jmp    132a <main+0x17a>
mov    %ebx,%edi
call   10a0 <isprint@plt>
mov    0x2ce6(%rip),%rcx
mov    (%rcx),%edi
test   %eax,%eax
je     1321 <main+0x171>
lea    0xe12(%rip),%rsi
jmp    1328 <main+0x178>
test   %esi,%esi
je     1347 <main+0x197>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    0x4(%rsp),%ecx
call   1040 <append@plt>
xor    %r15d,%r15d
jmp    1335 <main+0x185>
lea    0xe00(%rip),%rsi
mov    %ebx,%edx
call   1060 <fprintf@plt>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   %r12d,%r12d
je     1368 <main+0x1b8>
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    0x4(%rsp),%ecx
call   1070 <append_all@plt>
xor    %r15d,%r15d
jmp    1335 <main+0x185>
test   %ecx,%ecx
je     1388 <main+0x1d8>
mov    0x2c5d(%rip),%rax
mov    (%rax),%edi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    0x4(%rsp),%ecx
call   1080 <table_of_contents@plt>
xor    %r15d,%r15d
jmp    1335 <main+0x185>
test   %edx,%edx
je     13a8 <main+0x1f8>
mov    0x2c3d(%rip),%rax
mov    (%rax),%edi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    0x4(%rsp),%ecx
call   10c0 <extract@plt>
xor    %r15d,%r15d
jmp    1335 <main+0x185>
xor    %r15d,%r15d
test   %r13d,%r13d
je     1335 <main+0x185>
mov    0x2c19(%rip),%rax
mov    (%rax),%edi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    0x4(%rsp),%ecx
call   10d0 <delete@plt>
jmp    1335 <main+0x185>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"vqxtdA\00"
@optopt = external global i32
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.3 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@.str.4 = [35 x i8] c"-v flag requires another command!\0A\00"
@optind = external global i32
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
br label %13
13: ; preds = %49, %2
%14 = load i32, i32* %4
%15 = load i8**, i8*** %5
%16 = call i32 @getopt(i32 %14, i8** %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %16, i32* %12
%17 = icmp ne i32 %16, -1
br i1 %17, label %18, label %50
18: ; preds = %13
%19 = load i32, i32* %12
switch i32 %19, label %47 [
i32 113, label %20
i32 118, label %21
i32 120, label %22
i32 116, label %23
i32 100, label %24
i32 65, label %25
i32 63, label %26
]
20: ; preds = %18
store i32 1, i32* %7
br label %49
21: ; preds = %18
store i32 1, i32* %6
br label %49
22: ; preds = %18
store i32 1, i32* %8
br label %49
23: ; preds = %18
store i32 1, i32* %9
br label %49
24: ; preds = %18
store i32 1, i32* %10
br label %49
25: ; preds = %18
store i32 1, i32* %11
br label %49
26: ; preds = %18
%27 = load i32, i32* @optopt
%28 = icmp eq i32 %27, 99
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = load i32, i32* @stderr
%31 = load i32, i32* @optopt
%32 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %46
33: ; preds = %26
%34 = load i32, i32* @optopt
%35 = call i32 @isprint(i32 %34)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %33
%38 = load i32, i32* @stderr
%39 = load i32, i32* @optopt
%40 = call i32 @fprintf(i32 %38, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %39)
br label %45
41: ; preds = %33
%42 = load i32, i32* @stderr
%43 = load i32, i32* @optopt
%44 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %41, %37
br label %46
46: ; preds = %45, %29
store i32 1, i32* %3
br label %126
47: ; preds = %18
%48 = call i32 (...) @abort()
unreachable
49: ; preds = %25, %24, %23, %22, %21, %20
br label %13
50: ; preds = %13
%51 = load i32, i32* %4
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = call i32 (...) @usage()
store i32 -1, i32* %3
br label %126
55: ; preds = %50
%56 = load i32, i32* %7
%57 = icmp ne i32 %56, 0
br i1 %57, label %67, label %58
58: ; preds = %55
%59 = load i32, i32* %9
%60 = icmp ne i32 %59, 0
br i1 %60, label %67, label %61
61: ; preds = %58
%62 = load i32, i32* %8
%63 = icmp ne i32 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %61
%65 = load i32, i32* %10
%66 = icmp ne i32 %65, 0
br label %67
67: ; preds = %64, %61, %58, %55
%68 = phi i1 [ true, %61 ], [ true, %58 ], [ true, %55 ], [ %66, %64 ]
%69 = zext i1 %68 to i32
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %77
71: ; preds = %67
%72 = load i32, i32* %6
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%76 = call i32 (...) @usage()
store i32 -1, i32* %3
br label %126
77: ; preds = %71, %67
%78 = load i32, i32* %7
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %86
80: ; preds = %77
%81 = load i32, i32* @optind
%82 = load i32, i32* %4
%83 = load i8**, i8*** %5
%84 = load i32, i32* %6
%85 = call i32 @append(i32 %81, i32 %82, i8** %83, i32 %84)
br label %126
86: ; preds = %77
%87 = load i32, i32* %11
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %95
89: ; preds = %86
%90 = load i32, i32* @optind
%91 = load i32, i32* %4
%92 = load i8**, i8*** %5
%93 = load i32, i32* %6
%94 = call i32 @append_all(i32 %90, i32 %91, i8** %92, i32 %93)
br label %125
95: ; preds = %86
%96 = load i32, i32* %9
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %104
98: ; preds = %95
%99 = load i32, i32* @optind
%100 = load i32, i32* %4
%101 = load i8**, i8*** %5
%102 = load i32, i32* %6
%103 = call i32 @table_of_contents(i32 %99, i32 %100, i8** %101, i32 %102)
br label %124
104: ; preds = %95
%105 = load i32, i32* %8
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %113
107: ; preds = %104
%108 = load i32, i32* @optind
%109 = load i32, i32* %4
%110 = load i8**, i8*** %5
%111 = load i32, i32* %6
%112 = call i32 @extract(i32 %108, i32 %109, i8** %110, i32 %111)
br label %123
113: ; preds = %104
%114 = load i32, i32* %10
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %122
116: ; preds = %113
%117 = load i32, i32* @optind
%118 = load i32, i32* %4
%119 = load i8**, i8*** %5
%120 = load i32, i32* %6
%121 = call i32 @delete(i32 %117, i32 %118, i8** %119, i32 %120)
br label %122
122: ; preds = %116, %113
br label %123
123: ; preds = %122, %107
br label %124
124: ; preds = %123, %98
br label %125
125: ; preds = %124, %89
br label %126
126: ; preds = %46, %53, %74, %125, %80
%127 = load i32, i32* %3
ret i32 %127
}

LLVM IR (-O2):
@.str = [7 x i8] c"vqxtdA\00"
@optopt = external global i32
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.3 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@optind = external global i32
@str = [34 x i8] c"-v flag requires another command!\00"
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %29, %2
%4 = phi i1 [ false, %2 ], [ true, %29 ]
%5 = phi i32 [ 0, %2 ], [ 1, %29 ]
%6 = phi i32 [ 0, %2 ], [ %12, %29 ]
%7 = phi i32 [ 0, %2 ], [ %18, %29 ]
%8 = phi i32 [ 0, %2 ], [ %23, %29 ]
%9 = phi i32 [ 0, %2 ], [ %27, %29 ]
%10 = phi i32 [ 0, %2 ], [ %30, %29 ]
br label %11
11: ; preds = %29, %3
%12 = phi i32 [ %6, %3 ], [ 1, %29 ]
%13 = phi i32 [ %7, %3 ], [ %18, %29 ]
%14 = phi i32 [ %8, %3 ], [ %23, %29 ]
%15 = phi i32 [ %9, %3 ], [ %27, %29 ]
%16 = phi i32 [ %10, %3 ], [ %30, %29 ]
br label %17
17: ; preds = %29, %11
%18 = phi i32 [ %13, %11 ], [ 1, %29 ]
%19 = phi i32 [ %14, %11 ], [ %23, %29 ]
%20 = phi i32 [ %15, %11 ], [ %27, %29 ]
%21 = phi i32 [ %16, %11 ], [ %30, %29 ]
br label %22
22: ; preds = %29, %17
%23 = phi i32 [ %19, %17 ], [ 1, %29 ]
%24 = phi i32 [ %20, %17 ], [ %27, %29 ]
%25 = phi i32 [ %21, %17 ], [ %30, %29 ]
br label %26
26: ; preds = %29, %22
%27 = phi i32 [ %24, %22 ], [ 1, %29 ]
%28 = phi i32 [ %25, %22 ], [ %30, %29 ]
br label %29
29: ; preds = %29, %26
%30 = phi i32 [ %28, %26 ], [ 1, %29 ]
%31 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
switch i32 %31, label %46 [
i32 -1, label %48
i32 113, label %11
i32 118, label %3
i32 120, label %17
i32 116, label %22
i32 100, label %26
i32 65, label %29
i32 63, label %32
]
32: ; preds = %29
%33 = load i32, i32* @optopt
%34 = icmp eq i32 %33, 99
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i32, i32* @stderr
%37 = tail call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 99)
br label %86
38: ; preds = %32
%39 = tail call i32 @isprint(i32 %33)
%40 = icmp eq i32 %39, 0
%41 = load i32, i32* @stderr
br i1 %40, label %44, label %42
42: ; preds = %38
%43 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %33)
br label %86
44: ; preds = %38
%45 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %33)
br label %86
46: ; preds = %29
%47 = tail call i32 (...) @abort()
unreachable
48: ; preds = %29
%49 = icmp eq i32 %0, 1
br i1 %49, label %50, label %52
50: ; preds = %48
%51 = tail call i32 (...) @usage()
br label %86
52: ; preds = %48
%53 = icmp ne i32 %12, 0
%54 = icmp ne i32 %23, 0
%55 = select i1 %53, i1 true, i1 %54
%56 = icmp ne i32 %18, 0
%57 = select i1 %55, i1 true, i1 %56
%58 = icmp eq i32 %27, 0
%59 = xor i1 %57, true
%60 = select i1 %59, i1 %58, i1 false
%61 = and i1 %60, %4
br i1 %61, label %62, label %65
62: ; preds = %52
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%64 = tail call i32 (...) @usage()
br label %86
65: ; preds = %52
br i1 %53, label %66, label %69
66: ; preds = %65
%67 = load i32, i32* @optind
%68 = tail call i32 @append(i32 %67, i32 %0, i8** %1, i32 %5)
br label %86
69: ; preds = %65
%70 = icmp eq i32 %30, 0
br i1 %70, label %74, label %71
71: ; preds = %69
%72 = load i32, i32* @optind
%73 = tail call i32 @append_all(i32 %72, i32 %0, i8** %1, i32 %5)
br label %86
74: ; preds = %69
br i1 %54, label %75, label %78
75: ; preds = %74
%76 = load i32, i32* @optind
%77 = tail call i32 @table_of_contents(i32 %76, i32 %0, i8** %1, i32 %5)
br label %86
78: ; preds = %74
br i1 %56, label %79, label %82
79: ; preds = %78
%80 = load i32, i32* @optind
%81 = tail call i32 @extract(i32 %80, i32 %0, i8** %1, i32 %5)
br label %86
82: ; preds = %78
br i1 %58, label %86, label %83
83: ; preds = %82
%84 = load i32, i32* @optind
%85 = tail call i32 @delete(i32 %84, i32 %0, i8** %1, i32 %5)
br label %86
86: ; preds = %66, %75, %82, %83, %79, %71, %35, %44, %42, %62, %50
%87 = phi i32 [ -1, %50 ], [ -1, %62 ], [ 1, %42 ], [ 1, %44 ], [ 1, %35 ], [ 0, %71 ], [ 0, %79 ], [ 0, %83 ], [ 0, %82 ], [ 0, %75 ], [ 0, %66 ]
ret i32 %87
}