#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, char *);
int getopt(int, char **, char *);
int huffman_decode_file(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int huffman_encode_file(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int memory_decode_file(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int memory_encode_file(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
char *optarg;
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ usage(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  char memory = 0;
  char compress = 1;
  int opt;
  const char *file_in = NULL, *file_out = NULL;
  FILE *in = stdin;
  FILE *out = stdout;
  int close_in = 0;
  int close_out = 0;
  int rc = 0;
  while ((opt = getopt(argc, argv, "i:o:cdhvm")) != -1) {
    switch (opt) {
    case 'i':
      file_in = optarg;
      break;
    case 'o':
      file_out = optarg;
      break;
    case 'c':
      compress = 1;
      break;
    case 'd':
      compress = 0;
      break;
    case 'h':
      usage(stdout);
      return 0;
    case 'm':
      memory = 1;
      break;
    default:
      usage(stderr);
      return 1;
    }
  }
  if (file_in) {
    in = fopen(file_in, "rb");
    if (!in) {
      fprintf(stderr, "Can't open input file '%s': %s\n", file_in,
              strerror(errno));
      return 1;
    }
    close_in = 1;
  }
  if (file_out) {
    out = fopen(file_out, "wb");
    if (!out) {
      fprintf(stderr, "Can't open output file '%s': %s\n", file_out,
              strerror(errno));
      return 1;
    }
    close_out = 1;
  }
  if (memory) {
    return compress ? memory_encode_file(in, out) : memory_decode_file(in, out);
  }
  if (compress) {
    rc = huffman_encode_file(in, out);
  } else {
    rc = huffman_decode_file(in, out);
  }
  if (close_in) {
    fclose(in);
  }
  if (close_out) {
    fclose(out);
  }
  return rc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movb   $0x1,-0x12(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2e08(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2dda(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe24(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
je     12c6 <main+0x126>
mov    -0x18(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0xc,%eax
ja     12a6 <main+0x106>
mov    -0x50(%rbp),%rax
lea    0xdbf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2da7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    12c1 <main+0x121>
mov    0x2d94(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    12c1 <main+0x121>
movb   $0x1,-0x12(%rbp)
jmp    12c1 <main+0x121>
movb   $0x0,-0x12(%rbp)
jmp    12c1 <main+0x121>
mov    0x2d37(%rip),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    1458 <main+0x2b8>
movb   $0x1,-0x11(%rbp)
jmp    12c1 <main+0x121>
mov    0x2d23(%rip),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x2b8>
jmp    1202 <main+0x62>
cmpq   $0x0,-0x20(%rbp)
je     133e <main+0x19e>
mov    -0x20(%rbp),%rdi
lea    0xd62(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1337 <main+0x197>
mov    0x2cd9(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    %rax,%rcx
lea    0xd1b(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x2b8>
movl   $0x1,-0x3c(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     13b6 <main+0x216>
mov    -0x28(%rbp),%rdi
lea    0xd0d(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    13af <main+0x20f>
mov    0x2c61(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rdx
mov    %rax,%rcx
lea    0xcc6(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1458 <main+0x2b8>
movl   $0x1,-0x40(%rbp)
cmpb   $0x0,-0x11(%rbp)
je     13fd <main+0x25d>
movsbl -0x12(%rbp),%eax
cmp    $0x0,%eax
je     13e2 <main+0x242>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <memory_encode_file@plt>
mov    %eax,-0x74(%rbp)
jmp    13f2 <main+0x252>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1080 <memory_decode_file@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1458 <main+0x2b8>
cmpb   $0x0,-0x12(%rbp)
je     141c <main+0x27c>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1030 <huffman_encode_file@plt>
mov    %eax,-0x44(%rbp)
jmp    142c <main+0x28c>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1070 <huffman_decode_file@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     143f <main+0x29f>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
cmpl   $0x0,-0x40(%rbp)
je     1452 <main+0x2b2>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e26(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x20(%rsp)
mov    0x2df7(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x18(%rsp)
mov    $0x1,%al
mov    %eax,0xc(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
lea    0xe47(%rip),%r14
mov    0x2e0c(%rip),%r15
lea    0xe0d(%rip),%r12
mov    $0x1,%al
mov    %eax,0x8(%rsp)
xor    %r13d,%r13d
jmp    1203 <main+0x63>
xchg   %ax,%ax
mov    (%r15),%r13
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   10b0 <getopt@plt>
cmp    $0x6f,%eax
je     1200 <main+0x60>
lea    -0x63(%rax),%ecx
cmp    $0xa,%ecx
ja     124c <main+0xac>
movslq (%r12,%rcx,4),%rax
add    %r12,%rax
jmp    *%rax
mov    $0x1,%al
mov    %eax,0x8(%rsp)
jmp    1203 <main+0x63>
movl   $0x0,0x8(%rsp)
jmp    1203 <main+0x63>
mov    (%r15),%rax
mov    %rax,0x10(%rsp)
jmp    1203 <main+0x63>
movl   $0x0,0xc(%rsp)
jmp    1203 <main+0x63>
cmp    $0xffffffff,%eax
jne    12c2 <main+0x122>
mov    0x10(%rsp),%r15
test   %r15,%r15
mov    0x20(%rsp),%rbp
je     127b <main+0xdb>
lea    0xdcf(%rip),%rsi
mov    %r15,%rdi
call   10a0 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
je     1315 <main+0x175>
test   %r13,%r13
mov    0x18(%rsp),%r14
je     12a0 <main+0x100>
lea    0xdcd(%rip),%rsi
mov    %r13,%rdi
call   10a0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
je     133c <main+0x19c>
testb  $0x1,0xc(%rsp)
je     12f1 <main+0x151>
cmpb   $0x0,0x8(%rsp)
je     1370 <main+0x1d0>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1030 <huffman_encode_file@plt>
jmp    137b <main+0x1db>
mov    0x2d07(%rip),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
mov    $0x1,%ebx
jmp    1397 <main+0x1f7>
mov    0x2cde(%rip),%rax
mov    (%rax),%rdi
call   1090 <usage@plt>
xor    %ebx,%ebx
jmp    1397 <main+0x1f7>
cmpb   $0x0,0x8(%rsp)
je     13a8 <main+0x208>
mov    %rbp,%rdi
mov    %r14,%rsi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <memory_encode_file@plt>
mov    0x2cb4(%rip),%rax
mov    (%rax),%rbx
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd05(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
jmp    1361 <main+0x1c1>
mov    0x2c8d(%rip),%rax
mov    (%rax),%rbx
mov    0x2c7b(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd01(%rip),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
mov    %rax,%rcx
call   1060 <fprintf@plt>
mov    $0x1,%ebx
jmp    1397 <main+0x1f7>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1070 <huffman_decode_file@plt>
mov    %eax,%ebx
test   %r15,%r15
je     138a <main+0x1ea>
mov    %rbp,%rdi
call   1050 <fclose@plt>
test   %r13,%r13
je     1397 <main+0x1f7>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbp,%rdi
mov    %r14,%rsi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <memory_decode_file@plt>

LLVM IR (-O0):
@stdin = global i32* null
@stdout = global i32* null
@.str = [10 x i8] c"i:o:cdhvm\00"
@optarg = global i8* null
@stderr = global i32* null
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [32 x i8] c"Can't open input file '%s': %s\0A\00"
@errno = global i32 0
@.str.3 = [3 x i8] c"wb\00"
@.str.4 = [33 x i8] c"Can't open output file '%s': %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 0, i8* %6
store i8 1, i8* %7
store i8* null, i8** %9
store i8* null, i8** %10
%16 = load i32*, i32** @stdin
store i32* %16, i32** %11
%17 = load i32*, i32** @stdout
store i32* %17, i32** %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
br label %18
18: ; preds = %38, %2
%19 = load i32, i32* %4
%20 = load i8**, i8*** %5
%21 = call i32 @getopt(i32 %19, i8** %20, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 %21, i32* %8
%22 = icmp ne i32 %21, -1
br i1 %22, label %23, label %39
23: ; preds = %18
%24 = load i32, i32* %8
switch i32 %24, label %35 [
i32 105, label %25
i32 111, label %27
i32 99, label %29
i32 100, label %30
i32 104, label %31
i32 109, label %34
]
25: ; preds = %23
%26 = load i8*, i8** @optarg
store i8* %26, i8** %9
br label %38
27: ; preds = %23
%28 = load i8*, i8** @optarg
store i8* %28, i8** %10
br label %38
29: ; preds = %23
store i8 1, i8* %7
br label %38
30: ; preds = %23
store i8 0, i8* %7
br label %38
31: ; preds = %23
%32 = load i32*, i32** @stdout
%33 = call i32 @usage(i32* %32)
store i32 0, i32* %3
br label %111
34: ; preds = %23
store i8 1, i8* %6
br label %38
35: ; preds = %23
%36 = load i32*, i32** @stderr
%37 = call i32 @usage(i32* %36)
store i32 1, i32* %3
br label %111
38: ; preds = %34, %30, %29, %27, %25
br label %18
39: ; preds = %18
%40 = load i8*, i8** %9
%41 = icmp ne i8* %40, null
br i1 %41, label %42, label %54
42: ; preds = %39
%43 = load i8*, i8** %9
%44 = call i32* @fopen(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %44, i32** %11
%45 = load i32*, i32** %11
%46 = icmp ne i32* %45, null
br i1 %46, label %53, label %47
47: ; preds = %42
%48 = load i32*, i32** @stderr
%49 = load i8*, i8** %9
%50 = load i32, i32* @errno
%51 = call i8* @strerror(i32 %50)
%52 = call i32 @fprintf(i32* %48, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %49, i8* %51)
store i32 1, i32* %3
br label %111
53: ; preds = %42
store i32 1, i32* %13
br label %54
54: ; preds = %53, %39
%55 = load i8*, i8** %10
%56 = icmp ne i8* %55, null
br i1 %56, label %57, label %69
57: ; preds = %54
%58 = load i8*, i8** %10
%59 = call i32* @fopen(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %59, i32** %12
%60 = load i32*, i32** %12
%61 = icmp ne i32* %60, null
br i1 %61, label %68, label %62
62: ; preds = %57
%63 = load i32*, i32** @stderr
%64 = load i8*, i8** %10
%65 = load i32, i32* @errno
%66 = call i8* @strerror(i32 %65)
%67 = call i32 @fprintf(i32* %63, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %64, i8* %66)
store i32 1, i32* %3
br label %111
68: ; preds = %57
store i32 1, i32* %14
br label %69
69: ; preds = %68, %54
%70 = load i8, i8* %6
%71 = icmp ne i8 %70, 0
br i1 %71, label %72, label %86
72: ; preds = %69
%73 = load i8, i8* %7
%74 = sext i8 %73 to i32
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %80
76: ; preds = %72
%77 = load i32*, i32** %11
%78 = load i32*, i32** %12
%79 = call i32 @memory_encode_file(i32* %77, i32* %78)
br label %84
80: ; preds = %72
%81 = load i32*, i32** %11
%82 = load i32*, i32** %12
%83 = call i32 @memory_decode_file(i32* %81, i32* %82)
br label %84
84: ; preds = %80, %76
%85 = phi i32 [ %79, %76 ], [ %83, %80 ]
store i32 %85, i32* %3
br label %111
86: ; preds = %69
%87 = load i8, i8* %7
%88 = icmp ne i8 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %86
%90 = load i32*, i32** %11
%91 = load i32*, i32** %12
%92 = call i32 @huffman_encode_file(i32* %90, i32* %91)
store i32 %92, i32* %15
br label %97
93: ; preds = %86
%94 = load i32*, i32** %11
%95 = load i32*, i32** %12
%96 = call i32 @huffman_decode_file(i32* %94, i32* %95)
store i32 %96, i32* %15
br label %97
97: ; preds = %93, %89
%98 = load i32, i32* %13
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %103
100: ; preds = %97
%101 = load i32*, i32** %11
%102 = call i32 @fclose(i32* %101)
br label %103
103: ; preds = %100, %97
%104 = load i32, i32* %14
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %109
106: ; preds = %103
%107 = load i32*, i32** %12
%108 = call i32 @fclose(i32* %107)
br label %109
109: ; preds = %106, %103
%110 = load i32, i32* %15
store i32 %110, i32* %3
br label %111
111: ; preds = %109, %84, %62, %47, %35, %31
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
@stdin = global i32* null
@stdout = global i32* null
@.str = [10 x i8] c"i:o:cdhvm\00"
@optarg = global i8* null
@stderr = global i32* null
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [32 x i8] c"Can't open input file '%s': %s\0A\00"
@errno = global i32 0
@.str.3 = [3 x i8] c"wb\00"
@.str.4 = [33 x i8] c"Can't open output file '%s': %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i32*, i32** @stdin
%4 = load i32*, i32** @stdout
br label %5
5: ; preds = %17, %2
%6 = phi i1 [ true, %2 ], [ false, %17 ]
%7 = phi i8 [ 1, %2 ], [ %11, %17 ]
%8 = phi i8* [ null, %2 ], [ %15, %17 ]
%9 = phi i8* [ null, %2 ], [ %18, %17 ]
br label %10
10: ; preds = %25, %5
%11 = phi i8 [ %7, %5 ], [ %26, %25 ]
%12 = phi i8* [ %8, %5 ], [ %15, %25 ]
%13 = phi i8* [ %9, %5 ], [ %18, %25 ]
br label %14
14: ; preds = %10, %20
%15 = phi i8* [ %12, %10 ], [ %21, %20 ]
%16 = phi i8* [ %13, %10 ], [ %18, %20 ]
br label %17
17: ; preds = %14, %22
%18 = phi i8* [ %23, %22 ], [ %16, %14 ]
%19 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
switch i32 %19, label %30 [
i32 -1, label %33
i32 105, label %20
i32 111, label %22
i32 99, label %25
i32 100, label %24
i32 104, label %27
i32 109, label %5
]
20: ; preds = %17
%21 = load i8*, i8** @optarg
br label %14
22: ; preds = %17
%23 = load i8*, i8** @optarg
br label %17
24: ; preds = %17
br label %25
25: ; preds = %17, %24
%26 = phi i8 [ 0, %24 ], [ 1, %17 ]
br label %10
27: ; preds = %17
%28 = load i32*, i32** @stdout
%29 = tail call i32 @usage(i32* %28)
br label %74
30: ; preds = %17
%31 = load i32*, i32** @stderr
%32 = tail call i32 @usage(i32* %31)
br label %74
33: ; preds = %17
%34 = icmp eq i8* %15, null
br i1 %34, label %43, label %35
35: ; preds = %33
%36 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %43
38: ; preds = %35
%39 = load i32*, i32** @stderr
%40 = load i32, i32* @errno
%41 = tail call i8* @strerror(i32 %40)
%42 = tail call i32 @fprintf(i32* %39, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %15, i8* %41)
br label %74
43: ; preds = %35, %33
%44 = phi i32* [ %3, %33 ], [ %36, %35 ]
%45 = icmp eq i8* %18, null
br i1 %45, label %54, label %46
46: ; preds = %43
%47 = tail call i32* @fopen(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = load i32*, i32** @stderr
%51 = load i32, i32* @errno
%52 = tail call i8* @strerror(i32 %51)
%53 = tail call i32 @fprintf(i32* %50, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %18, i8* %52)
br label %74
54: ; preds = %46, %43
%55 = phi i32* [ %4, %43 ], [ %47, %46 ]
%56 = icmp eq i8 %11, 0
br i1 %6, label %62, label %57
57: ; preds = %54
br i1 %56, label %60, label %58
58: ; preds = %57
%59 = tail call i32 @memory_encode_file(i32* %44, i32* %55)
br label %74
60: ; preds = %57
%61 = tail call i32 @memory_decode_file(i32* %44, i32* %55)
br label %74
62: ; preds = %54
br i1 %56, label %65, label %63
63: ; preds = %62
%64 = tail call i32 @huffman_encode_file(i32* %44, i32* %55)
br label %67
65: ; preds = %62
%66 = tail call i32 @huffman_decode_file(i32* %44, i32* %55)
br label %67
67: ; preds = %65, %63
%68 = phi i32 [ %64, %63 ], [ %66, %65 ]
br i1 %34, label %71, label %69
69: ; preds = %67
%70 = tail call i32 @fclose(i32* %44)
br label %71
71: ; preds = %69, %67
br i1 %45, label %74, label %72
72: ; preds = %71
%73 = tail call i32 @fclose(i32* %55)
br label %74
74: ; preds = %71, %72, %58, %60, %49, %38, %30, %27
%75 = phi i32 [ 1, %30 ], [ 0, %27 ], [ 1, %49 ], [ 1, %38 ], [ %59, %58 ], [ %61, %60 ], [ %68, %72 ], [ %68, %71 ]
ret i32 %75
}