#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*/ argsparse_init(int *);
scalar_t__ argsparse_request(int, char const **, int *, char **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ show_help();
int /*<<< orphan*/ show_version();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int ulz77_compress_file(char *, char *);
int ulz77_decompress_file(char *, char *);
int /*<<< orphan*/ ulz77_error_description_print(int);
int ulz77_stream_compress(char *, char *, size_t);
int ulz77_stream_decompress(char *, char *);
int main(int argc, const char *argv[]) {
  int ret = 0;
  int mode = 0;
  int method = 1;
  char *src_file = NULL;
  char *dst_file = NULL;
  size_t bs = 1024 * 1024 * 1;
  int arg_idx;
  char *arg_p;
  argsparse_init(&arg_idx);
  while (argsparse_request(argc, argv, &arg_idx, &arg_p) == 0) {
    if (!strcmp(arg_p, "--version")) {
      show_version();
      goto done;
    } else if (!strcmp(arg_p, "--help")) {
      show_help();
      goto done;
    } else if (!strcmp(arg_p, "-c")) {
      if (argsparse_request(argc, argv, &arg_idx, &arg_p) != 0) {
        fprintf(stderr, "Error : Invalid argument\n");
        ret = 0;
        goto fail;
      }
      src_file = arg_p;
      mode = 0;
    } else if (!strcmp(arg_p, "-d")) {
      if (argsparse_request(argc, argv, &arg_idx, &arg_p) != 0) {
        fprintf(stderr, "Error : Invalid argument\n");
        ret = 0;
        goto fail;
      }
      src_file = arg_p;
      mode = 1;
    } else if (!strcmp(arg_p, "-o")) {
      if (argsparse_request(argc, argv, &arg_idx, &arg_p) != 0) {
        fprintf(stderr, "Error : Invalid argument\n");
        ret = 0;
        goto fail;
      }
      dst_file = arg_p;
    } else if (!strcmp(arg_p, "--method")) {
      if (argsparse_request(argc, argv, &arg_idx, &arg_p) != 0) {
        fprintf(stderr, "Error : Invalid argument\n");
        ret = 0;
        goto fail;
      }
      if (!strcmp(arg_p, "stream")) {
        method = 0;
      } else if (!strcmp(arg_p, "file")) {
        method = 1;
      } else {
        fprintf(stderr, "Error : Invalid argument\n");
        ret = 0;
        goto fail;
      }
    } else {
      fprintf(stderr, "Error : Invalid argument\n");
      ret = 0;
      goto fail;
    }
  }
  if (src_file == NULL) {
    fprintf(stderr, "Error : Not specified source file\n");
    ret = 0;
    goto fail;
  }
  if (dst_file == NULL) {
    fprintf(stderr, "Error : Not specified destination file\n");
    ret = 0;
    goto fail;
  }
  if (mode == 0) {
    if (method == 1) {
      ret = ulz77_compress_file(dst_file, src_file);
    } else {
      ret = ulz77_stream_compress(dst_file, src_file, bs);
    }
  } else if (mode == 1) {
    if (method == 1) {
      ret = ulz77_decompress_file(dst_file, src_file);
    } else {
      ret = ulz77_stream_decompress(dst_file, src_file);
    }
  }
  if (ret != 0)
    goto fail;
  goto done;
fail:
  if (ret != 0) {
    ulz77_error_description_print(ret);
  }
done:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x100000,-0x38(%rbp)
lea    -0x3c(%rbp),%rdi
call   1060 <argsparse_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <argsparse_request@plt>
cmp    $0x0,%rax
jne    14ad <main+0x2fd>
mov    -0x48(%rbp),%rdi
lea    0xddb(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    123f <main+0x8f>
mov    $0x0,%al
call   1030 <show_version@plt>
jmp    15b5 <main+0x405>
mov    -0x48(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1264 <main+0xb4>
mov    $0x0,%al
call   10c0 <show_help@plt>
jmp    15b5 <main+0x405>
mov    -0x48(%rbp),%rdi
lea    0xda2(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    12d0 <main+0x120>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <argsparse_request@plt>
cmp    $0x0,%rax
je     12bc <main+0x10c>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edi
lea    0xd69(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
mov    -0x48(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    149e <main+0x2ee>
mov    -0x48(%rbp),%rdi
lea    0xd53(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    133c <main+0x18c>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <argsparse_request@plt>
cmp    $0x0,%rax
je     1328 <main+0x178>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
lea    0xcfd(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
mov    -0x48(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x18(%rbp)
jmp    1499 <main+0x2e9>
mov    -0x48(%rbp),%rdi
lea    0xcea(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    13a1 <main+0x1f1>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <argsparse_request@plt>
cmp    $0x0,%rax
je     1394 <main+0x1e4>
mov    0x2c66(%rip),%rax
mov    (%rax),%edi
lea    0xc91(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
mov    -0x48(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1494 <main+0x2e4>
mov    -0x48(%rbp),%rdi
lea    0xc88(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    146e <main+0x2be>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <argsparse_request@plt>
cmp    $0x0,%rax
je     13f9 <main+0x249>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    0xc2c(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
mov    -0x48(%rbp),%rdi
lea    0xc39(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    141e <main+0x26e>
movl   $0x0,-0x1c(%rbp)
jmp    1469 <main+0x2b9>
mov    -0x48(%rbp),%rdi
lea    0xc1b(%rip),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%eax
jne    1443 <main+0x293>
movl   $0x1,-0x1c(%rbp)
jmp    1464 <main+0x2b4>
mov    0x2b96(%rip),%rax
mov    (%rax),%edi
lea    0xbc1(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
jmp    1469 <main+0x2b9>
jmp    148f <main+0x2df>
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
lea    0xb96(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
jmp    1494 <main+0x2e4>
jmp    1499 <main+0x2e9>
jmp    149e <main+0x2ee>
jmp    14a3 <main+0x2f3>
jmp    14a8 <main+0x2f8>
jmp    11fc <main+0x4c>
cmpq   $0x0,-0x28(%rbp)
jne    14d9 <main+0x329>
mov    0x2b21(%rip),%rax
mov    (%rax),%edi
lea    0xb81(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
cmpq   $0x0,-0x30(%rbp)
jne    1505 <main+0x355>
mov    0x2af5(%rip),%rax
mov    (%rax),%edi
lea    0xb78(%rip),%rsi
call   10b0 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    159e <main+0x3ee>
cmpl   $0x0,-0x18(%rbp)
jne    1547 <main+0x397>
cmpl   $0x1,-0x1c(%rbp)
jne    152e <main+0x37e>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10d0 <ulz77_compress_file@plt>
mov    %eax,-0x14(%rbp)
jmp    1542 <main+0x392>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1090 <ulz77_stream_compress@plt>
mov    %eax,-0x14(%rbp)
jmp    158a <main+0x3da>
cmpl   $0x1,-0x18(%rbp)
jne    1585 <main+0x3d5>
cmpl   $0x1,-0x1c(%rbp)
jne    1570 <main+0x3c0>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <ulz77_decompress_file@plt>
mov    %eax,-0x14(%rbp)
jmp    1580 <main+0x3d0>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <ulz77_stream_decompress@plt>
mov    %eax,-0x14(%rbp)
jmp    1585 <main+0x3d5>
jmp    158a <main+0x3da>
cmpl   $0x0,-0x14(%rbp)
je     1599 <main+0x3e9>
jmp    159e <main+0x3ee>
jmp    15b5 <main+0x405>
cmpl   $0x0,-0x14(%rbp)
je     15b0 <main+0x400>
mov    -0x14(%rbp),%edi
call   1080 <ulz77_error_description_print@plt>
jmp    15b5 <main+0x405>
xor    %eax,%eax
add    $0x50,%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,%r12
mov    %edi,%ebp
lea    0x1c(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <argsparse_init@plt>
lea    0x8(%rsp),%rcx
mov    %ebp,%edi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1070 <argsparse_request@plt>
test   %rax,%rax
je     120d <main+0x5d>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
lea    0xe52(%rip),%rsi
call   10b0 <fprintf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
mov    %rax,0x20(%rsp)
mov    $0x1,%ebx
lea    0x1c(%rsp),%r14
lea    0x8(%rsp),%r13
xor    %eax,%eax
mov    %rax,0x10(%rsp)
movl   $0x0,0x4(%rsp)
jmp    1263 <main+0xb3>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <argsparse_request@plt>
test   %rax,%rax
jne    13fa <main+0x24a>
mov    0x8(%rsp),%r15
mov    %r15,%rdi
lea    0xd8e(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     13e2 <main+0x232>
mov    %r15,%rdi
lea    0xd81(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     13ee <main+0x23e>
mov    %r15,%rdi
lea    0xd71(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     1350 <main+0x1a0>
mov    %r15,%rdi
lea    0xd77(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     1380 <main+0x1d0>
mov    %r15,%rdi
lea    0xd63(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     13a2 <main+0x1f2>
mov    %r15,%rdi
lea    0xd4f(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
jne    13cd <main+0x21d>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <argsparse_request@plt>
test   %rax,%rax
jne    13cd <main+0x21d>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
lea    0xd23(%rip),%rsi
call   10a0 <strcmp@plt>
test   %eax,%eax
je     13c6 <main+0x216>
mov    %rbx,%rdi
lea    0xd13(%rip),%rsi
call   10a0 <strcmp@plt>
mov    $0x1,%ebx
test   %eax,%eax
je     124a <main+0x9a>
jmp    13cd <main+0x21d>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <argsparse_request@plt>
test   %rax,%rax
jne    13cd <main+0x21d>
movl   $0x0,0x4(%rsp)
jmp    1240 <main+0x90>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <argsparse_request@plt>
test   %rax,%rax
jne    13cd <main+0x21d>
movl   $0x1,0x4(%rsp)
jmp    1240 <main+0x90>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1070 <argsparse_request@plt>
test   %rax,%rax
jne    13cd <main+0x21d>
mov    0x8(%rsp),%rax
mov    %rax,0x20(%rsp)
jmp    124a <main+0x9a>
xor    %ebx,%ebx
jmp    124a <main+0x9a>
mov    0x2c0c(%rip),%rax
mov    (%rax),%edi
lea    0xc37(%rip),%rsi
jmp    11f7 <main+0x47>
xor    %eax,%eax
call   1030 <show_version@plt>
jmp    11fc <main+0x4c>
xor    %eax,%eax
call   10c0 <show_help@plt>
jmp    11fc <main+0x4c>
mov    0x10(%rsp),%rsi
test   %rsi,%rsi
je     11e7 <main+0x37>
mov    0x20(%rsp),%rdi
test   %rdi,%rdi
je     1425 <main+0x275>
cmpl   $0x0,0x4(%rsp)
je     143a <main+0x28a>
cmp    $0x1,%ebx
jne    1446 <main+0x296>
call   1040 <ulz77_decompress_file@plt>
jmp    1457 <main+0x2a7>
mov    0x2bb4(%rip),%rax
mov    (%rax),%edi
lea    0xc37(%rip),%rsi
jmp    11f7 <main+0x47>
cmp    $0x1,%ebx
jne    144d <main+0x29d>
call   10d0 <ulz77_compress_file@plt>
jmp    1457 <main+0x2a7>
call   1050 <ulz77_stream_decompress@plt>
jmp    1457 <main+0x2a7>
mov    $0x100000,%edx
call   1090 <ulz77_stream_compress@plt>
test   %eax,%eax
je     11fc <main+0x4c>
mov    %eax,%edi
call   1080 <ulz77_error_description_print@plt>
jmp    11fc <main+0x4c>

LLVM IR (-O0):
@.str = [10 x i8] c"--version\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-c\00"
@stderr = global i32 0
@.str.3 = [26 x i8] c"Error : Invalid argument\0A\00"
@.str.4 = [3 x i8] c"-d\00"
@.str.5 = [3 x i8] c"-o\00"
@.str.6 = [9 x i8] c"--method\00"
@.str.7 = [7 x i8] c"stream\00"
@.str.8 = [5 x i8] c"file\00"
@.str.9 = [35 x i8] c"Error : Not specified source file\0A\00"
@.str.10 = [40 x i8] c"Error : Not specified destination file\0A\00"
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 i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i32
%13 = alloca i8*
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 1, i32* %8
store i8* null, i8** %9
store i8* null, i8** %10
store i64 1048576, i64* %11
%14 = call i32 @argsparse_init(i32* %12)
br label %15
15: ; preds = %109, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i64 @argsparse_request(i32 %16, i8** %17, i32* %12, i8** %13)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %110
20: ; preds = %15
%21 = load i8*, i8** %13
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %20
%25 = call i32 (...) @show_version()
br label %166
26: ; preds = %20
%27 = load i8*, i8** %13
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = call i32 (...) @show_help()
br label %166
32: ; preds = %26
%33 = load i8*, i8** %13
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %46, label %36
36: ; preds = %32
%37 = load i32, i32* %4
%38 = load i8**, i8*** %5
%39 = call i64 @argsparse_request(i32 %37, i8** %38, i32* %12, i8** %13)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
44: ; preds = %36
%45 = load i8*, i8** %13
store i8* %45, i8** %9
store i32 0, i32* %7
br label %107
46: ; preds = %32
%47 = load i8*, i8** %13
%48 = call i32 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
br i1 %49, label %60, label %50
50: ; preds = %46
%51 = load i32, i32* %4
%52 = load i8**, i8*** %5
%53 = call i64 @argsparse_request(i32 %51, i8** %52, i32* %12, i8** %13)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %50
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
58: ; preds = %50
%59 = load i8*, i8** %13
store i8* %59, i8** %9
store i32 1, i32* %7
br label %106
60: ; preds = %46
%61 = load i8*, i8** %13
%62 = call i32 @strcmp(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%63 = icmp ne i32 %62, 0
br i1 %63, label %74, label %64
64: ; preds = %60
%65 = load i32, i32* %4
%66 = load i8**, i8*** %5
%67 = call i64 @argsparse_request(i32 %65, i8** %66, i32* %12, i8** %13)
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %64
%70 = load i32, i32* @stderr
%71 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
72: ; preds = %64
%73 = load i8*, i8** %13
store i8* %73, i8** %10
br label %105
74: ; preds = %60
%75 = load i8*, i8** %13
%76 = call i32 @strcmp(i8* %75, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%77 = icmp ne i32 %76, 0
br i1 %77, label %101, label %78
78: ; preds = %74
%79 = load i32, i32* %4
%80 = load i8**, i8*** %5
%81 = call i64 @argsparse_request(i32 %79, i8** %80, i32* %12, i8** %13)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %78
%84 = load i32, i32* @stderr
%85 = call i32 @fprintf(i32 %84, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
86: ; preds = %78
%87 = load i8*, i8** %13
%88 = call i32 @strcmp(i8* %87, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%89 = icmp ne i32 %88, 0
br i1 %89, label %91, label %90
90: ; preds = %86
store i32 0, i32* %8
br label %100
91: ; preds = %86
%92 = load i8*, i8** %13
%93 = call i32 @strcmp(i8* %92, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%94 = icmp ne i32 %93, 0
br i1 %94, label %96, label %95
95: ; preds = %91
store i32 1, i32* %8
br label %99
96: ; preds = %91
%97 = load i32, i32* @stderr
%98 = call i32 @fprintf(i32 %97, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
99: ; preds = %95
br label %100
100: ; preds = %99, %90
br label %104
101: ; preds = %74
%102 = load i32, i32* @stderr
%103 = call i32 @fprintf(i32 %102, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %159
104: ; preds = %100
br label %105
105: ; preds = %104, %72
br label %106
106: ; preds = %105, %58
br label %107
107: ; preds = %106, %44
br label %108
108: ; preds = %107
br label %109
109: ; preds = %108
br label %15
110: ; preds = %15
%111 = load i8*, i8** %9
%112 = icmp eq i8* %111, null
br i1 %112, label %113, label %116
113: ; preds = %110
%114 = load i32, i32* @stderr
%115 = call i32 @fprintf(i32 %114, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %6
br label %159
116: ; preds = %110
%117 = load i8*, i8** %10
%118 = icmp eq i8* %117, null
br i1 %118, label %119, label %122
119: ; preds = %116
%120 = load i32, i32* @stderr
%121 = call i32 @fprintf(i32 %120, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %6
br label %159
122: ; preds = %116
%123 = load i32, i32* %7
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %138
125: ; preds = %122
%126 = load i32, i32* %8
%127 = icmp eq i32 %126, 1
br i1 %127, label %128, label %132
128: ; preds = %125
%129 = load i8*, i8** %10
%130 = load i8*, i8** %9
%131 = call i32 @ulz77_compress_file(i8* %129, i8* %130)
store i32 %131, i32* %6
br label %137
132: ; preds = %125
%133 = load i8*, i8** %10
%134 = load i8*, i8** %9
%135 = load i64, i64* %11
%136 = call i32 @ulz77_stream_compress(i8* %133, i8* %134, i64 %135)
store i32 %136, i32* %6
br label %137
137: ; preds = %132, %128
br label %154
138: ; preds = %122
%139 = load i32, i32* %7
%140 = icmp eq i32 %139, 1
br i1 %140, label %141, label %153
141: ; preds = %138
%142 = load i32, i32* %8
%143 = icmp eq i32 %142, 1
br i1 %143, label %144, label %148
144: ; preds = %141
%145 = load i8*, i8** %10
%146 = load i8*, i8** %9
%147 = call i32 @ulz77_decompress_file(i8* %145, i8* %146)
store i32 %147, i32* %6
br label %152
148: ; preds = %141
%149 = load i8*, i8** %10
%150 = load i8*, i8** %9
%151 = call i32 @ulz77_stream_decompress(i8* %149, i8* %150)
store i32 %151, i32* %6
br label %152
152: ; preds = %148, %144
br label %153
153: ; preds = %152, %138
br label %154
154: ; preds = %153, %137
%155 = load i32, i32* %6
%156 = icmp ne i32 %155, 0
br i1 %156, label %157, label %158
157: ; preds = %154
br label %159
158: ; preds = %154
br label %166
159: ; preds = %157, %119, %113, %101, %96, %83, %69, %55, %41
%160 = load i32, i32* %6
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %165
162: ; preds = %159
%163 = load i32, i32* %6
%164 = call i32 @ulz77_error_description_print(i32 %163)
br label %165
165: ; preds = %162, %159
br label %166
166: ; preds = %165, %158, %30, %24
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"--version\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [3 x i8] c"-c\00"
@stderr = global i32 0
@.str.3 = [26 x i8] c"Error : Invalid argument\0A\00"
@.str.4 = [3 x i8] c"-d\00"
@.str.5 = [3 x i8] c"-o\00"
@.str.6 = [9 x i8] c"--method\00"
@.str.7 = [7 x i8] c"stream\00"
@.str.8 = [5 x i8] c"file\00"
@.str.9 = [35 x i8] c"Error : Not specified source file\0A\00"
@.str.10 = [40 x i8] c"Error : Not specified destination file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = bitcast i32* %3 to i8*
%6 = bitcast i8** %4 to i8*
%7 = call i32 @argsparse_init(i32* %3)
%8 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %89
10: ; preds = %2, %80
%11 = phi i8* [ %84, %80 ], [ null, %2 ]
%12 = phi i8* [ %83, %80 ], [ null, %2 ]
%13 = phi i32 [ %82, %80 ], [ 1, %2 ]
%14 = phi i32 [ %81, %80 ], [ 0, %2 ]
%15 = load i8*, i8** %4
%16 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = call i32 (...) @show_version()
br label %115
20: ; preds = %10
%21 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 (...) @show_help()
br label %115
25: ; preds = %20
%26 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %25
%29 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%30 = icmp eq i64 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
34: ; preds = %28
%35 = load i8*, i8** %4
br label %80
36: ; preds = %25
%37 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %47
39: ; preds = %36
%40 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%41 = icmp eq i64 %40, 0
br i1 %41, label %45, label %42
42: ; preds = %39
%43 = load i32, i32* @stderr
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
45: ; preds = %39
%46 = load i8*, i8** %4
br label %80
47: ; preds = %36
%48 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %58
50: ; preds = %47
%51 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%52 = icmp eq i64 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
56: ; preds = %50
%57 = load i8*, i8** %4
br label %80
58: ; preds = %47
%59 = call i32 @strcmp(i8* dereferenceable(1) %15, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %77
61: ; preds = %58
%62 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%63 = icmp eq i64 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %61
%65 = load i32, i32* @stderr
%66 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
67: ; preds = %61
%68 = load i8*, i8** %4
%69 = call i32 @strcmp(i8* dereferenceable(1) %68, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%70 = icmp eq i32 %69, 0
br i1 %70, label %80, label %71
71: ; preds = %67
%72 = call i32 @strcmp(i8* dereferenceable(1) %68, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%73 = icmp eq i32 %72, 0
br i1 %73, label %80, label %74
74: ; preds = %71
%75 = load i32, i32* @stderr
%76 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
77: ; preds = %58
%78 = load i32, i32* @stderr
%79 = call i32 @fprintf(i32 %78, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %115
80: ; preds = %71, %67, %45, %56, %34
%81 = phi i32 [ %14, %56 ], [ 1, %45 ], [ 0, %34 ], [ %14, %67 ], [ %14, %71 ]
%82 = phi i32 [ %13, %56 ], [ %13, %45 ], [ %13, %34 ], [ 0, %67 ], [ 1, %71 ]
%83 = phi i8* [ %12, %56 ], [ %46, %45 ], [ %35, %34 ], [ %12, %67 ], [ %12, %71 ]
%84 = phi i8* [ %57, %56 ], [ %11, %45 ], [ %11, %34 ], [ %11, %67 ], [ %11, %71 ]
%85 = call i64 @argsparse_request(i32 %0, i8** %1, i32* %3, i8** %4)
%86 = icmp eq i64 %85, 0
br i1 %86, label %10, label %87
87: ; preds = %80
%88 = icmp eq i8* %83, null
br i1 %88, label %89, label %92
89: ; preds = %2, %87
%90 = load i32, i32* @stderr
%91 = call i32 @fprintf(i32 %90, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
br label %115
92: ; preds = %87
%93 = icmp eq i8* %84, null
br i1 %93, label %94, label %97
94: ; preds = %92
%95 = load i32, i32* @stderr
%96 = call i32 @fprintf(i32 %95, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
br label %115
97: ; preds = %92
%98 = icmp eq i32 %81, 0
%99 = icmp eq i32 %82, 1
br i1 %98, label %100, label %105
100: ; preds = %97
br i1 %99, label %101, label %103
101: ; preds = %100
%102 = call i32 @ulz77_compress_file(i8* %84, i8* %83)
br label %110
103: ; preds = %100
%104 = call i32 @ulz77_stream_compress(i8* %84, i8* %83, i64 1048576)
br label %110
105: ; preds = %97
br i1 %99, label %106, label %108
106: ; preds = %105
%107 = call i32 @ulz77_decompress_file(i8* %84, i8* %83)
br label %110
108: ; preds = %105
%109 = call i32 @ulz77_stream_decompress(i8* %84, i8* %83)
br label %110
110: ; preds = %108, %106, %101, %103
%111 = phi i32 [ %102, %101 ], [ %104, %103 ], [ %107, %106 ], [ %109, %108 ]
%112 = icmp eq i32 %111, 0
br i1 %112, label %115, label %113
113: ; preds = %110
%114 = call i32 @ulz77_error_description_print(i32 %111)
br label %115
115: ; preds = %31, %42, %53, %64, %74, %77, %89, %94, %113, %110, %23, %18
ret i32 0
}