int main(int ac, char **av) {
  if (ac > 1) {
    printf("%s = ", av[1]);
    printf("%d\n\nEval expr - Copyright (c) 2015 Romain Vermot\n",
           eval_expr(av[1]));
  } else
    printf("Usage: %s expr\n", av[0]);
  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   $0x1,-0x8(%rbp)
jle    117a <main+0x5a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1040 <eval_expr@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <main+0x6f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jl     1158 <main+0x38>
mov    0x8(%rbx),%rsi
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rbx),%rdi
xor    %eax,%eax
call   1040 <eval_expr@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1169 <main+0x49>
mov    (%rbx),%rsi
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s = \00"
@.str.1 = [50 x i8] c"%d\0A\0AEval expr - Copyright (c) 2015 Romain Vermot\0A\00"
@.str.2 = [16 x i8] c"Usage: %s expr\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 sgt i32 %6, 1
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @eval_expr to i32 (i8*, ...)*)(i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %23
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %18, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s = \00"
@.str.1 = [50 x i8] c"%d\0A\0AEval expr - Copyright (c) 2015 Romain Vermot\0A\00"
@.str.2 = [16 x i8] c"Usage: %s expr\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %5
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @eval_expr to i32 (i8*, ...)*)(i8* %8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %14
11: ; preds = %2
%12 = load i8*, i8** %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %4
ret i32 0
}