#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*/ compress(char *, char *);
int /*<<< orphan*/ decompress(char *, char *);
int /*<<< orphan*/ error_arguments();
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc > 2) {
    if (strcmp("--decompress", argv[1]) == 0) {
      if (argc > 3) {
        decompress(argv[2], argv[3]);
      } else
        error_arguments();
    } else {
      compress(argv[1], argv[2]);
    }
  } else
    error_arguments();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    11c8 <main+0x88>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe91(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11ae <main+0x6e>
cmpl   $0x3,-0x8(%rbp)
jle    11a2 <main+0x62>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1060 <decompress@plt>
jmp    11a9 <main+0x69>
mov    $0x0,%al
call   1050 <error_arguments@plt>
jmp    11c3 <main+0x83>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <compress@plt>
jmp    11cf <main+0x8f>
mov    $0x0,%al
call   1050 <error_arguments@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x3,%edi
jl     1185 <main+0x45>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rsi
lea    0xea8(%rip),%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1171 <main+0x31>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1030 <compress@plt>
jmp    118c <main+0x4c>
cmp    $0x4,%ebp
jb     1185 <main+0x45>
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
call   1060 <decompress@plt>
jmp    118c <main+0x4c>
xor    %eax,%eax
call   1050 <error_arguments@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"--decompress\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 2
br i1 %7, label %8, label %37
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %28
14: ; preds = %8
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 3
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = call i32 @decompress(i8* %20, i8* %23)
br label %27
25: ; preds = %14
%26 = call i32 (...) @error_arguments()
br label %27
27: ; preds = %25, %17
br label %36
28: ; preds = %8
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 2
%34 = load i8*, i8** %33
%35 = call i32 @compress(i8* %31, i8* %34)
br label %36
36: ; preds = %28, %27
br label %39
37: ; preds = %2
%38 = call i32 (...) @error_arguments()
br label %39
39: ; preds = %37, %36
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@.str = [13 x i8] c"--decompress\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %24
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = icmp ugt i32 %0, 3
br i1 %10, label %11, label %17
11: ; preds = %9
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8*, i8** %1, i64 3
%15 = load i8*, i8** %14
%16 = tail call i32 @decompress(i8* %13, i8* %15)
br label %26
17: ; preds = %9
%18 = tail call i32 (...) @error_arguments()
br label %26
19: ; preds = %4
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32 @compress(i8* %20, i8* %22)
br label %26
24: ; preds = %2
%25 = tail call i32 (...) @error_arguments()
br label %26
26: ; preds = %19, %17, %11, %24
ret i32 0
}