#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*/ evaluate(char *, int);
int parseOptions(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int i = parseOptions(argc, argv);
  for (; i < argc; i++)
    evaluate(argv[i], argc - i != 1);
  printf("\n");
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <parseOptions@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1191 <main+0x61>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
call   1050 <evaluate@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1155 <main+0x25>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%r15d
call   1040 <parseOptions@plt>
cmp    %r15d,%eax
jge    117b <main+0x4b>
movslq %eax,%rcx
sub    %eax,%r15d
lea    -0x1(%r15),%r12
lea    (%r14,%rcx,8),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
xor    %esi,%esi
cmp    %ebx,%r12d
setne  %sil
call   1050 <evaluate@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @parseOptions(i32 %7, i8** %8)
store i32 %9, i32* %6
br label %10
10: ; preds = %26, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load i8**, i8*** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = load i32, i32* %4
%21 = load i32, i32* %6
%22 = sub nsw i32 %20, %21
%23 = icmp ne i32 %22, 1
%24 = zext i1 %23 to i32
%25 = call i32 @evaluate(i8* %19, i32 %24)
br label %26
26: ; preds = %14
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %10
29: ; preds = %10
%30 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parseOptions(i32 %0, i8** %1)
%4 = icmp slt i32 %3, %0
br i1 %4, label %5, label %19
5: ; preds = %2
%6 = sext i32 %3 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %16, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = sub i32 %0, %11
%13 = icmp ne i32 %12, 1
%14 = zext i1 %13 to i32
%15 = tail call i32 @evaluate(i8* %10, i32 %14)
%16 = add nsw i64 %8, 1
%17 = trunc i64 %16 to i32
%18 = icmp eq i32 %17, %0
br i1 %18, label %19, label %7
19: ; preds = %7, %2
%20 = tail call i32 @putchar(i32 10)
ret i32 0
}