#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 */
scalar_t__ compile(char *, char *, char *, char *, char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *infile, *prefix, *outdir, *indexfile, *pflag, *optfile;
  int comp;
  if (argc != 7) {
    usage();
  }
  infile = argv[1];
  prefix = argv[2];
  outdir = argv[3];
  indexfile = argv[4];
  pflag = argv[5];
  optfile = argv[6];
  if (compile(infile, prefix, outdir, indexfile, pflag, optfile) < 0) {
    return -1;
  }
  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)
cmpl   $0x7,-0x8(%rbp)
je     1147 <main+0x27>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
call   1030 <compile@plt>
cmp    $0x0,%rax
jge    11c2 <main+0xa2>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c9 <main+0xa9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x7,%edi
je     1130 <main+0x10>
xor    %eax,%eax
call   1040 <usage@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
mov    0x18(%rbx),%rdx
mov    0x20(%rbx),%rcx
mov    0x28(%rbx),%r8
mov    0x30(%rbx),%r9
call   1030 <compile@plt>
sar    $0x3f,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 7
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @usage()
br label %17
17: ; preds = %15, %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %7
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 3
%26 = load i8*, i8** %25
store i8* %26, i8** %8
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 4
%29 = load i8*, i8** %28
store i8* %29, i8** %9
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 5
%32 = load i8*, i8** %31
store i8* %32, i8** %10
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 6
%35 = load i8*, i8** %34
store i8* %35, i8** %11
%36 = load i8*, i8** %6
%37 = load i8*, i8** %7
%38 = load i8*, i8** %8
%39 = load i8*, i8** %9
%40 = load i8*, i8** %10
%41 = load i8*, i8** %11
%42 = call i64 @compile(i8* %36, i8* %37, i8* %38, i8* %39, i8* %40, i8* %41)
%43 = icmp slt i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %17
store i32 -1, i32* %3
br label %46
45: ; preds = %17
store i32 0, i32* %3
br label %46
46: ; preds = %45, %44
%47 = load i32, i32* %3
ret i32 %47
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 7
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %1, i64 4
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 5
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8*, i8** %1, i64 6
%18 = load i8*, i8** %17
%19 = tail call i64 @compile(i8* %8, i8* %10, i8* %12, i8* %14, i8* %16, i8* %18)
%20 = ashr i64 %19, 63
%21 = trunc i64 %20 to i32
ret i32 %21
}