#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*/ atoi(char *);
int /*<<< orphan*/ begin_fuzz(char *, int /*<<< orphan*/, int, char **);
int /*<<< orphan*/ check_dumpdir_existance();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ remove_file();
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc < 3) {
    usage();
    exit(0);
  }
  check_dumpdir_existance();
  if (argc == 3)
    begin_fuzz(argv[2], atoi(argv[1]), 0, 0);
  else
    begin_fuzz(argv[2], atoi(argv[1]), argc, argv);
  remove_file();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    118e <main+0x2e>
mov    $0x0,%al
call   1040 <usage@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    $0x0,%al
call   1080 <check_dumpdir_existance@plt>
cmpl   $0x3,-0x8(%rbp)
jne    11ce <main+0x6e>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1060 <begin_fuzz@plt>
jmp    11f9 <main+0x99>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
call   1060 <begin_fuzz@plt>
mov    $0x0,%al
call   1030 <remove_file@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jle    11aa <main+0x4a>
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1080 <check_dumpdir_existance@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%r14
call   1050 <atoi@plt>
mov    %r14,%rdi
mov    %eax,%esi
cmp    $0x3,%ebp
jne    1192 <main+0x32>
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1197 <main+0x37>
mov    %ebp,%edx
mov    %rbx,%rcx
call   1060 <begin_fuzz@plt>
xor    %eax,%eax
call   1030 <remove_file@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
xor    %eax,%eax
call   1040 <usage@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
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 %11
8: ; preds = %2
%9 = call i32 (...) @usage()
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %2
%12 = call i32 (...) @check_dumpdir_existance()
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 3
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
%23 = call i32 @begin_fuzz(i8* %18, i32 %22, i32 0, i8** null)
br label %35
24: ; preds = %11
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 @atoi(i8* %30)
%32 = load i32, i32* %4
%33 = load i8**, i8*** %5
%34 = call i32 @begin_fuzz(i8* %27, i32 %31, i32 %32, i8** %33)
br label %35
35: ; preds = %24, %15
%36 = call i32 (...) @remove_file()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = tail call i32 (...) @check_dumpdir_existance()
%9 = icmp eq i32 %0, 3
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
br i1 %9, label %15, label %17
15: ; preds = %7
%16 = tail call i32 @begin_fuzz(i8* %11, i32 %14, i32 0, i8** null)
br label %19
17: ; preds = %7
%18 = tail call i32 @begin_fuzz(i8* %11, i32 %14, i32 %0, i8** %1)
br label %19
19: ; preds = %17, %15
%20 = tail call i32 (...) @remove_file()
ret i32 0
}