#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 /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  setbuf(stdout, NULL);
  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    0x2e83(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <parseOptions@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b3 <main+0x73>
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   1060 <evaluate@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <main+0x37>
lea    0xe46(%rip),%rdi
call   1040 <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
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
mov    %r15d,%edi
mov    %r14,%rsi
call   1050 <parseOptions@plt>
cmp    %r15d,%eax
jge    119b <main+0x5b>
movslq %eax,%rcx
sub    %eax,%r15d
lea    -0x1(%r15),%r12
lea    (%r14,%rcx,8),%r14
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r14,%rbx,8),%rdi
xor    %esi,%esi
cmp    %ebx,%r12d
setne  %sil
call   1060 <evaluate@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1180 <main+0x40>
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):
@stdout = global i32 0
@.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* @stdout
%8 = call i32 @setbuf(i32 %7, i32* null)
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @parseOptions(i32 %9, i8** %10)
store i32 %11, i32* %6
br label %12
12: ; preds = %28, %2
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %31
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = load i32, i32* %4
%23 = load i32, i32* %6
%24 = sub nsw i32 %22, %23
%25 = icmp ne i32 %24, 1
%26 = zext i1 %25 to i32
%27 = call i32 @evaluate(i8* %21, i32 %26)
br label %28
28: ; preds = %16
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %12
31: ; preds = %12
%32 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

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