#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 */
scalar_t__ compress(char *, char *);
int /*<<< orphan*/ exit(int);
scalar_t__ extract(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ unknown_option(char *, char *);
int main(int argc, char **argv) {
  int mode = -1;
  char *in_file;
  char *out_file;
  if (argc < 3) {
    print_usage(argv[0]);
    exit(0);
  }
  if (strcmp(argv[1], "-x") == 0 || strcmp(argv[1], "--extract") == 0) {
    mode = 2;
  } else if (strcmp(argv[1], "-c") == 0 || strcmp(argv[1], "--compress") == 0) {
    mode = 1;
  } else if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
    print_usage(argv[0]);
    exit(0);
  } else {
    unknown_option(argv[1], argv[0]);
    exit(1);
  }
  in_file = argv[2];
  if (argc > 3) {
    out_file = malloc(strlen(argv[3]) + 1);
    strcpy(out_file, argv[3]);
  } else if (mode == 1) {
    out_file = malloc(strlen(argv[2]) + 4);
    if (!out_file) {
      perror("malloc");
      exit(1);
    }
    strcpy(out_file, argv[2]);
    strcat(out_file, ".hf");
  } else {
    printf("output filename required.\n\n");
    print_usage(argv[0]);
    exit(1);
  }
  if (mode == 1) {
    if (compress(in_file, out_file) != 0) {
      fprintf(stderr, "Error compressing");
    }
  } else if (mode == 2) {
    if (extract(in_file, out_file) != 0) {
      fprintf(stderr, "Error extracting");
    }
  } else {
    print_usage(argv[0]);
  }
  free(out_file);
  out_file = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    121a <main+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <print_usage@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd7(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1256 <main+0x76>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdbc(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1262 <main+0x82>
movl   $0x2,-0x14(%rbp)
jmp    131c <main+0x13c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd9c(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     129e <main+0xbe>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd81(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12aa <main+0xca>
movl   $0x1,-0x14(%rbp)
jmp    1317 <main+0x137>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd62(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     12e6 <main+0x106>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd47(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12f9 <main+0x119>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <print_usage@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
call   10b0 <unknown_option@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    131c <main+0x13c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    1365 <main+0x185>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1060 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   10a0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1050 <strcpy@plt>
jmp    13fa <main+0x21a>
cmpl   $0x1,-0x14(%rbp)
jne    13d3 <main+0x1f3>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <strlen@plt>
mov    %rax,%rdi
add    $0x4,%rdi
call   10a0 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    13ad <main+0x1cd>
lea    0xc87(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <strcpy@plt>
mov    -0x28(%rbp),%rdi
lea    0xc63(%rip),%rsi
call   10e0 <strcat@plt>
jmp    13f5 <main+0x215>
lea    0xc56(%rip),%rdi
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <print_usage@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
jmp    13fa <main+0x21a>
cmpl   $0x1,-0x14(%rbp)
jne    1435 <main+0x255>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <compress@plt>
cmp    $0x0,%rax
je     1430 <main+0x250>
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
lea    0xc21(%rip),%rsi
call   1090 <fprintf@plt>
jmp    1481 <main+0x2a1>
cmpl   $0x2,-0x14(%rbp)
jne    1470 <main+0x290>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10d0 <extract@plt>
cmp    $0x0,%rax
je     146b <main+0x28b>
mov    0x2b83(%rip),%rax
mov    (%rax),%edi
lea    0xbf8(%rip),%rsi
call   1090 <fprintf@plt>
jmp    147c <main+0x29c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1100 <print_usage@plt>
jmp    1481 <main+0x2a1>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x28(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jle    127c <main+0x9c>
mov    %edi,%r14d
mov    0x8(%rbx),%rdi
lea    0xdfe(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     128b <main+0xab>
mov    0x8(%rbx),%rdi
lea    0xdec(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     128b <main+0xab>
mov    0x8(%rbx),%rdi
lea    0xde1(%rip),%rsi
call   1080 <strcmp@plt>
mov    $0x1,%r12b
test   %rax,%rax
je     128e <main+0xae>
mov    0x8(%rbx),%rdi
lea    0xdcc(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     128e <main+0xae>
mov    0x8(%rbx),%rdi
lea    0xdc2(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     127c <main+0x9c>
mov    0x8(%rbx),%rdi
lea    0xdb0(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    137d <main+0x19d>
mov    (%rbx),%rdi
call   1100 <print_usage@plt>
xor    %edi,%edi
call   10f0 <exit@plt>
xor    %r12d,%r12d
mov    0x10(%rbx),%r15
cmp    $0x3,%r14d
jbe    12d9 <main+0xf9>
mov    0x18(%rbx),%rbp
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%rdi
call   10a0 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1050 <strcpy@plt>
test   %r12b,%r12b
jne    1311 <main+0x131>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10d0 <extract@plt>
test   %rax,%rax
je     1336 <main+0x156>
lea    0xd6b(%rip),%rsi
jmp    1328 <main+0x148>
test   %r12b,%r12b
je     1349 <main+0x169>
mov    %r15,%rdi
call   1070 <strlen@plt>
lea    0x4(%rax),%rdi
call   10a0 <malloc@plt>
test   %rax,%rax
je     1367 <main+0x187>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1050 <strcpy@plt>
lea    0xd23(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <strcat@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <compress@plt>
test   %rax,%rax
je     1336 <main+0x156>
lea    0xd08(%rip),%rsi
mov    0x2cb1(%rip),%rax
mov    (%rax),%edi
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd03(%rip),%rdi
call   1060 <puts@plt>
mov    (%rbx),%rdi
call   1100 <print_usage@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
lea    0xcb7(%rip),%rdi
call   10c0 <perror@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    (%rbx),%rsi
mov    0x8(%rbx),%rdi
call   10b0 <unknown_option@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-x\00"
@.str.1 = [10 x i8] c"--extract\00"
@.str.2 = [3 x i8] c"-c\00"
@.str.3 = [11 x i8] c"--compress\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.5 = [7 x i8] c"--help\00"
@.str.6 = [7 x i8] c"malloc\00"
@.str.7 = [4 x i8] c".hf\00"
@.str.8 = [28 x i8] c"output filename required.\0A\0A\00"
@stderr = global i32 0
@.str.9 = [18 x i8] c"Error compressing\00"
@.str.10 = [17 x i8] c"Error extracting\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @print_usage(i8* %14)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %29, label %23
23: ; preds = %17
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %23, %17
store i32 2, i32* %6
br label %71
30: ; preds = %23
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %42, label %36
36: ; preds = %30
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = call i64 @strcmp(i8* %39, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %36, %30
store i32 1, i32* %6
br label %70
43: ; preds = %36
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %55, label %49
49: ; preds = %43
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 1
%52 = load i8*, i8** %51
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %61
55: ; preds = %49, %43
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 0
%58 = load i8*, i8** %57
%59 = call i32 @print_usage(i8* %58)
%60 = call i32 @exit(i32 0)
unreachable
61: ; preds = %49
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 0
%67 = load i8*, i8** %66
%68 = call i32 @unknown_option(i8* %64, i8* %67)
%69 = call i32 @exit(i32 1)
unreachable
70: ; preds = %42
br label %71
71: ; preds = %70, %29
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 2
%74 = load i8*, i8** %73
store i8* %74, i8** %7
%75 = load i32, i32* %4
%76 = icmp sgt i32 %75, 3
br i1 %76, label %77, label %89
77: ; preds = %71
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 3
%80 = load i8*, i8** %79
%81 = call i64 @strlen(i8* %80)
%82 = add nsw i64 %81, 1
%83 = call i8* @malloc(i64 %82)
store i8* %83, i8** %8
%84 = load i8*, i8** %8
%85 = load i8**, i8*** %5
%86 = getelementptr inbounds i8*, i8** %85, i64 3
%87 = load i8*, i8** %86
%88 = call i32 @strcpy(i8* %84, i8* %87)
br label %120
89: ; preds = %71
%90 = load i32, i32* %6
%91 = icmp eq i32 %90, 1
br i1 %91, label %92, label %112
92: ; preds = %89
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 2
%95 = load i8*, i8** %94
%96 = call i64 @strlen(i8* %95)
%97 = add nsw i64 %96, 4
%98 = call i8* @malloc(i64 %97)
store i8* %98, i8** %8
%99 = load i8*, i8** %8
%100 = icmp ne i8* %99, null
br i1 %100, label %104, label %101
101: ; preds = %92
%102 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%103 = call i32 @exit(i32 1)
unreachable
104: ; preds = %92
%105 = load i8*, i8** %8
%106 = load i8**, i8*** %5
%107 = getelementptr inbounds i8*, i8** %106, i64 2
%108 = load i8*, i8** %107
%109 = call i32 @strcpy(i8* %105, i8* %108)
%110 = load i8*, i8** %8
%111 = call i32 @strcat(i8* %110, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %119
112: ; preds = %89
%113 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
%114 = load i8**, i8*** %5
%115 = getelementptr inbounds i8*, i8** %114, i64 0
%116 = load i8*, i8** %115
%117 = call i32 @print_usage(i8* %116)
%118 = call i32 @exit(i32 1)
unreachable
119: ; preds = %104
br label %120
120: ; preds = %119, %77
%121 = load i32, i32* %6
%122 = icmp eq i32 %121, 1
br i1 %122, label %123, label %132
123: ; preds = %120
%124 = load i8*, i8** %7
%125 = load i8*, i8** %8
%126 = call i64 @compress(i8* %124, i8* %125)
%127 = icmp ne i64 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %123
%129 = load i32, i32* @stderr
%130 = call i32 @fprintf(i32 %129, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %131
131: ; preds = %128, %123
br label %150
132: ; preds = %120
%133 = load i32, i32* %6
%134 = icmp eq i32 %133, 2
br i1 %134, label %135, label %144
135: ; preds = %132
%136 = load i8*, i8** %7
%137 = load i8*, i8** %8
%138 = call i64 @extract(i8* %136, i8* %137)
%139 = icmp ne i64 %138, 0
br i1 %139, label %140, label %143
140: ; preds = %135
%141 = load i32, i32* @stderr
%142 = call i32 @fprintf(i32 %141, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
br label %143
143: ; preds = %140, %135
br label %149
144: ; preds = %132
%145 = load i8**, i8*** %5
%146 = getelementptr inbounds i8*, i8** %145, i64 0
%147 = load i8*, i8** %146
%148 = call i32 @print_usage(i8* %147)
br label %149
149: ; preds = %144, %143
br label %150
150: ; preds = %149, %131
%151 = load i8*, i8** %8
%152 = call i32 @free(i8* %151)
store i8* null, i8** %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-x\00"
@.str.1 = [10 x i8] c"--extract\00"
@.str.2 = [3 x i8] c"-c\00"
@.str.3 = [11 x i8] c"--compress\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.5 = [7 x i8] c"--help\00"
@.str.6 = [7 x i8] c"malloc\00"
@.str.7 = [4 x i8] c".hf\00"
@stderr = global i32 0
@.str.9 = [18 x i8] c"Error compressing\00"
@.str.10 = [17 x i8] c"Error extracting\00"
@str = [27 x i8] c"output filename required.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @print_usage(i8* %5)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %42, label %13
13: ; preds = %8
%14 = load i8*, i8** %9
%15 = tail call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %42, label %17
17: ; preds = %13
%18 = load i8*, i8** %9
%19 = tail call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %42, label %21
21: ; preds = %17
%22 = load i8*, i8** %9
%23 = tail call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %42, label %25
25: ; preds = %21
%26 = load i8*, i8** %9
%27 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i8*, i8** %9
%31 = tail call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %29, %25
%34 = load i8*, i8** %1
%35 = tail call i32 @print_usage(i8* %34)
%36 = tail call i32 @exit(i32 0)
unreachable
37: ; preds = %29
%38 = load i8*, i8** %9
%39 = load i8*, i8** %1
%40 = tail call i32 @unknown_option(i8* %38, i8* %39)
%41 = tail call i32 @exit(i32 1)
unreachable
42: ; preds = %17, %21, %8, %13
%43 = phi i1 [ false, %13 ], [ false, %8 ], [ true, %21 ], [ true, %17 ]
%44 = getelementptr inbounds i8*, i8** %1, i64 2
%45 = load i8*, i8** %44
%46 = icmp ugt i32 %0, 3
br i1 %46, label %64, label %47
47: ; preds = %42
br i1 %43, label %48, label %59
48: ; preds = %47
%49 = tail call i64 @strlen(i8* dereferenceable(1) %45)
%50 = add nsw i64 %49, 4
%51 = tail call i8* @malloc(i64 %50)
%52 = icmp eq i8* %51, null
br i1 %52, label %53, label %56
53: ; preds = %48
%54 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%55 = tail call i32 @exit(i32 1)
unreachable
56: ; preds = %48
%57 = tail call i32 @strcpy(i8* %51, i8* %45)
%58 = tail call i32 @strcat(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %71
59: ; preds = %47
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%61 = load i8*, i8** %1
%62 = tail call i32 @print_usage(i8* %61)
%63 = tail call i32 @exit(i32 1)
unreachable
64: ; preds = %42
%65 = getelementptr inbounds i8*, i8** %1, i64 3
%66 = load i8*, i8** %65
%67 = tail call i64 @strlen(i8* dereferenceable(1) %66)
%68 = add nsw i64 %67, 1
%69 = tail call i8* @malloc(i64 %68)
%70 = tail call i32 @strcpy(i8* %69, i8* %66)
br i1 %43, label %71, label %75
71: ; preds = %56, %64
%72 = phi i8* [ %51, %56 ], [ %69, %64 ]
%73 = tail call i64 @compress(i8* %45, i8* %72)
%74 = icmp eq i64 %73, 0
br i1 %74, label %83, label %78
75: ; preds = %64
%76 = tail call i64 @extract(i8* %45, i8* %69)
%77 = icmp eq i64 %76, 0
br i1 %77, label %83, label %78
78: ; preds = %75, %71
%79 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), %71 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), %75 ]
%80 = phi i8* [ %72, %71 ], [ %69, %75 ]
%81 = load i32, i32* @stderr
%82 = tail call i32 @fprintf(i32 %81, i8* %79)
br label %83
83: ; preds = %78, %75, %71
%84 = phi i8* [ %69, %75 ], [ %72, %71 ], [ %80, %78 ]
%85 = tail call i32 @free(i8* %84)
ret i32 0
}