#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*/ archivage(int, char const **);
int /*<<< orphan*/ desarchivage(char const **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char const *, char *);
int main(int argc, char const *argv[]) {
  if (argc < 3) {
    exit(0);
  } else if (strcmp(argv[1], "-cf") == 0) {
    archivage(argc, argv);
  } else if (argc == 3 && strcmp(argv[1], "-xf") == 0) {
    desarchivage(argv);
  } else
    printf("usage : \n");
  return 0;
}


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   $0x3,-0x8(%rbp)
jge    1177 <main+0x27>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe7a(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11a6 <main+0x56>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <archivage@plt>
jmp    11ed <main+0x9d>
cmpl   $0x3,-0x8(%rbp)
jne    11dc <main+0x8c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe45(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11dc <main+0x8c>
mov    -0x10(%rbp),%rdi
call   1030 <desarchivage@plt>
jmp    11e8 <main+0x98>
lea    0xe25(%rip),%rdi
call   1050 <printf@plt>
jmp    11ed <main+0x9d>
jmp    11f2 <main+0xa2>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x2,%edi
jle    11b7 <main+0x67>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
lea    0xe98(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     119a <main+0x4a>
cmp    $0x3,%ebp
jne    118c <main+0x3c>
mov    0x8(%rbx),%rdi
lea    0xe82(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11a6 <main+0x56>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
jmp    11ae <main+0x5e>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <archivage@plt>
jmp    11ae <main+0x5e>
mov    %rbx,%rdi
call   1040 <desarchivage@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"-cf\00"
@.str.1 = [4 x i8] c"-xf\00"
@.str.2 = [10 x i8] c"usage : \0A\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 slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %10
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = call i32 @archivage(i32 %17, i8** %18)
br label %35
20: ; preds = %10
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 3
br i1 %22, label %23, label %32
23: ; preds = %20
%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 ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %23
%30 = load i8**, i8*** %5
%31 = call i32 @desarchivage(i8** %30)
br label %34
32: ; preds = %23, %20
%33 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
br label %35
35: ; preds = %34, %16
br label %36
36: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"-cf\00"
@.str.1 = [4 x i8] c"-xf\00"
@str = [9 x i8] c"usage : \00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 @archivage(i32 %0, i8** %1)
br label %23
13: ; preds = %6
%14 = icmp eq i32 %0, 3
br i1 %14, label %15, label %21
15: ; preds = %13
%16 = load i8*, i8** %7
%17 = tail call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = tail call i32 @desarchivage(i8** %1)
br label %23
21: ; preds = %15, %13
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %23
23: ; preds = %11, %21, %19
ret i32 0
}