xunge/DecIR huggingface dataset:
int fibo(int n) {
  if (n == 0)
    return 0;
  if (n == 1)
    return 1;
  return fibo(n - 1) + fibo(n - 2);
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fibo+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibo+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibo+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibo+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%ebx
jb     1132 <fibo+0x22>
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibo@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x2,%ebx
jae    1120 <fibo+0x10>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fibo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @fibo(i32 %13)
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 2
%17 = call i32 @fibo(i32 %16)
%18 = add nsw i32 %14, %17
store i32 %18, i32* %2
br label %19
19: ; preds = %11, %10, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @fibo(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i32 [ 0, %1 ], [ %10, %6 ]
%4 = phi i32 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i32 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i32 %4, -1
%8 = tail call i32 @fibo(i32 %7)
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i32 %4, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x99() {
  Assert_real((isdigit(153) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              770, ("isdigit should be 0 for 0x99"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x99>:
push   %rbp
mov    %rsp,%rbp
mov    $0x99,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x302,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x99>:
push   %rax
mov    $0x99,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x302,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x99\00"
define void @t_isdigit_0x99() {
%1 = call i64 @isdigit(i32 153)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x99\00"
define void @t_isdigit_0x99() {
%1 = tail call i64 @isdigit(i32 153)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *return_const_char_ptr() { return "1234"; }


x86 assembly (clang, -O0):
<return_const_char_ptr>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_const_char_ptr>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1234\00"
define i8* @return_const_char_ptr() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
define i8* @return_const_char_ptr() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
int isdivisable(int a, int n) {
  int i, y = 0;
  for (i = 2; i <= n; i++) {
    if (a % i == 0 && n % i == 0) {
      y = i;
    }
  }
  return y;
}


x86 assembly (clang, -O0):
<isdivisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     115d <isdivisable+0x5d>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114a <isdivisable+0x4a>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114a <isdivisable+0x4a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114f <isdivisable+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <isdivisable+0x18>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdivisable>:
xor    %r9d,%r9d
cmp    $0x2,%esi
jge    110c <isdivisable+0xc>
mov    %r9d,%eax
ret
mov    %esi,%r8d
neg    %esi
mov    $0x2,%ecx
xor    %r9d,%r9d
jmp    112e <isdivisable+0x2e>
nopl   0x0(%rax,%rax,1)
lea    (%rsi,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
je     1108 <isdivisable+0x8>
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    1120 <isdivisable+0x20>
mov    %r8d,%eax
cltd
idiv   %ecx
test   %edx,%edx
cmove  %ecx,%r9d
jmp    1120 <isdivisable+0x20>

LLVM IR (-O0):
define i32 @isdivisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %6
store i32 2, i32* %5
br label %7
7: ; preds = %24, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %27
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %11
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = srem i32 %17, %18
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load i32, i32* %5
store i32 %22, i32* %6
br label %23
23: ; preds = %21, %16, %11
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %7
27: ; preds = %7
%28 = load i32, i32* %6
ret i32 %28
}

LLVM IR (-O2):
define i32 @isdivisable(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %17, label %4
4: ; preds = %2, %13
%5 = phi i32 [ %14, %13 ], [ 0, %2 ]
%6 = phi i32 [ %15, %13 ], [ 2, %2 ]
%7 = srem i32 %0, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = srem i32 %1, %6
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 %6, i32 %5
br label %13
13: ; preds = %9, %4
%14 = phi i32 [ %5, %4 ], [ %12, %9 ]
%15 = add nuw i32 %6, 1
%16 = icmp eq i32 %6, %1
br i1 %16, label %17, label %4
17: ; preds = %13, %2
%18 = phi i32 [ 0, %2 ], [ %14, %13 ]
ret i32 %18
}
int getScaledSize(int srcSize, double scalePercentage) {
  double srcSizeDbl = (double)srcSize;
  double resultSizeDbl = srcSizeDbl * scalePercentage;
  return (int)resultSizeDbl;
}


x86 assembly (clang, -O0):
<getScaledSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getScaledSize>:
cvtsi2sd %edi,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @getScaledSize(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
store double %8, double* %5
%9 = load double, double* %5
%10 = load double, double* %4
%11 = fmul double %9, %10
store double %11, double* %6
%12 = load double, double* %6
%13 = fptosi double %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @getScaledSize(i32 %0, double %1) {
%3 = sitofp i32 %0 to double
%4 = fmul double %3, %1
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int error(int, char *);
int /*<<< orphan*/ zaber_reset_all();
int cmd_zreset(int argc, char *argv[]) {
  if (argc > 1)
    return error((-2), "No arguments for zreset!");
  zaber_reset_all();
  return 0;
}


x86 assembly (clang, -O0):
<cmd_zreset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1152 <cmd_zreset+0x32>
mov    $0xfffffffe,%edi
lea    0xebb(%rip),%rsi
call   1040 <error@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <cmd_zreset+0x40>
mov    $0x0,%al
call   1030 <zaber_reset_all@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_zreset>:
cmp    $0x2,%edi
jl     1136 <cmd_zreset+0x16>
lea    0xed4(%rip),%rsi
mov    $0xfffffffe,%edi
jmp    1040 <error@plt>
push   %rax
xor    %eax,%eax
call   1030 <zaber_reset_all@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"No arguments for zreset!\00"
define i32 @cmd_zreset(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
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 %10
8: ; preds = %2
%9 = call i32 @error(i32 -2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 %9, i32* %3
br label %12
10: ; preds = %2
%11 = call i32 (...) @zaber_reset_all()
store i32 0, i32* %3
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [25 x i8] c"No arguments for zreset!\00"
define i32 @cmd_zreset(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @error(i32 -2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 (...) @zaber_reset_all()
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ 0, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ uart_tx_byte(unsigned char);
void __console_tx_byte(unsigned char byte) { uart_tx_byte(byte); }


x86 assembly (clang, -O0):
<__console_tx_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <uart_tx_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_byte>:
jmp    1030 <uart_tx_byte@plt>

LLVM IR (-O0):
define void @__console_tx_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @uart_tx_byte(i8 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @__console_tx_byte(i8 zeroext %0) {
%2 = tail call i32 @uart_tx_byte(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void user_hello_part1() { printf("Hello from part1\n"); }


x86 assembly (clang, -O0):
<user_hello_part1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_hello_part1>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Hello from part1\0A\00"
define void @user_hello_part1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello from part1\00"
define void @user_hello_part1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ configureIeee802154Patch();
int /*<<< orphan*/ enterIeee802154CpeHdPatch();
void refreshIeee802154Patch(void) {
  enterIeee802154CpeHdPatch();
  configureIeee802154Patch();
}


x86 assembly (clang, -O0):
<refreshIeee802154Patch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <enterIeee802154CpeHdPatch@plt>
mov    $0x0,%al
call   1030 <configureIeee802154Patch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<refreshIeee802154Patch>:
push   %rax
xor    %eax,%eax
call   1040 <enterIeee802154CpeHdPatch@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <configureIeee802154Patch@plt>

LLVM IR (-O0):
define void @refreshIeee802154Patch() {
%1 = call i32 (...) @enterIeee802154CpeHdPatch()
%2 = call i32 (...) @configureIeee802154Patch()
ret void
}

LLVM IR (-O2):
define void @refreshIeee802154Patch() {
%1 = tail call i32 (...) @enterIeee802154CpeHdPatch()
%2 = tail call i32 (...) @configureIeee802154Patch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fzz_printInputSet(int);
int /*<<< orphan*/ fzz_printOutputSet(int /*<<< orphan*/);
int /*<<< orphan*/ fzz_printRules();
int /*<<< orphan*/ fzz_printSystem();
int /*<<< orphan*/ printf(char *);
void printExample() {
  printf("\n");
  fzz_printInputSet(1);
  printf("\n");
  fzz_printOutputSet(0);
  printf("\n");
  fzz_printRules();
  fzz_printSystem();
}


x86 assembly (clang, -O0):
<printExample>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
call   1070 <printf@plt>
mov    $0x1,%edi
call   1060 <fzz_printInputSet@plt>
lea    0xe8f(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   1030 <fzz_printOutputSet@plt>
lea    0xe7c(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   1050 <fzz_printRules@plt>
mov    $0x0,%al
call   1040 <fzz_printSystem@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printExample>:
push   %rax
mov    $0xa,%edi
call   1050 <putchar@plt>
mov    $0x1,%edi
call   1070 <fzz_printInputSet@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
xor    %edi,%edi
call   1030 <fzz_printOutputSet@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
xor    %eax,%eax
call   1060 <fzz_printRules@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <fzz_printSystem@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @printExample() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @fzz_printInputSet(i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @fzz_printOutputSet(i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @fzz_printRules()
%7 = call i32 (...) @fzz_printSystem()
ret void
}

LLVM IR (-O2):
define void @printExample() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @fzz_printInputSet(i32 1)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @fzz_printOutputSet(i32 0)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (...) @fzz_printRules()
%7 = tail call i32 (...) @fzz_printSystem()
ret void
}
void calculate_orbit(double *values, float c, double (*F)(float, double)) {
  int i = 0;
  for (i = 1; i <= 300; i++) {
    values[i] = F(c, values[i - 1]);
  }
}


x86 assembly (clang, -O0):
<calculate_orbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x12c,-0x1c(%rbp)
jg     1168 <calculate_orbit+0x68>
mov    -0x18(%rbp),%rax
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rcx
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm1
call   *%rax
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <calculate_orbit+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_orbit>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
movss  %xmm0,0xc(%rsp)
mov    %rdi,%r15
movsd  (%rdi),%xmm1
mov    $0x1,%ebx
xchg   %ax,%ax
movss  0xc(%rsp),%xmm0
call   *%r14
movaps %xmm0,%xmm1
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    $0x12d,%rbx
jne    1120 <calculate_orbit+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @calculate_orbit(double* %0, float %1, double (float, double)* %2) {
%4 = alloca double*
%5 = alloca float
%6 = alloca double (float, double)*
%7 = alloca i32
store double* %0, double** %4
store float %1, float* %5
store double (float, double)* %2, double (float, double)** %6
store i32 0, i32* %7
store i32 1, i32* %7
br label %8
8: ; preds = %25, %3
%9 = load i32, i32* %7
%10 = icmp sle i32 %9, 300
br i1 %10, label %11, label %28
11: ; preds = %8
%12 = load double (float, double)*, double (float, double)** %6
%13 = load float, float* %5
%14 = load double*, double** %4
%15 = load i32, i32* %7
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %14, i64 %17
%19 = load double, double* %18
%20 = call double %12(float %13, double %19)
%21 = load double*, double** %4
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
store double %20, double* %24
br label %25
25: ; preds = %11
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %8
28: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @calculate_orbit(double* nocapture %0, float %1, double (float, double)* nocapture %2) {
%4 = load double, double* %0
br label %5
5: ; preds = %3, %5
%6 = phi double [ %4, %3 ], [ %8, %5 ]
%7 = phi i64 [ 1, %3 ], [ %10, %5 ]
%8 = tail call double %2(float %1, double %6)
%9 = getelementptr inbounds double, double* %0, i64 %7
store double %8, double* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, 301
br i1 %11, label %12, label %5
12: ; preds = %5
ret void
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *module_symbol(void *handle, const char *symbol) {
  return dlsym(handle, symbol);
}


x86 assembly (clang, -O0):
<module_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dlsym@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_symbol>:
jmp    1030 <dlsym@plt>

LLVM IR (-O0):
define i8* @module_symbol(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @dlsym(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @module_symbol(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
void g_markup_error_quark() {}


x86 assembly (clang, -O0):
<g_markup_error_quark>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_markup_error_quark>:
ret

LLVM IR (-O0):
define void @g_markup_error_quark() {
ret void
}

LLVM IR (-O2):
define void @g_markup_error_quark() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trainer_dp_3(int /*<<< orphan*/);
void trainer_dp_3_launcher(void) { trainer_dp_3(0); }


x86 assembly (clang, -O0):
<trainer_dp_3_launcher>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <trainer_dp_3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trainer_dp_3_launcher>:
xor    %edi,%edi
jmp    1030 <trainer_dp_3@plt>

LLVM IR (-O0):
define void @trainer_dp_3_launcher() {
%1 = call i32 @trainer_dp_3(i32 0)
ret void
}

LLVM IR (-O2):
define void @trainer_dp_3_launcher() {
%1 = tail call i32 @trainer_dp_3(i32 0)
ret void
}
void n_null_receivebuf(struct tty_struct *tty, const unsigned char *cp,
                       char *fp, int cnt) {}


x86 assembly (clang, -O0):
<n_null_receivebuf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_null_receivebuf>:
ret

LLVM IR (-O0):
%struct.tty_struct = type opaque
define void @n_null_receivebuf(%struct.tty_struct* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.tty_struct*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.tty_struct* %0, %struct.tty_struct** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%struct.tty_struct = type opaque
define void @n_null_receivebuf(%struct.tty_struct* nocapture %0, i8* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_ISGID;
scalar_t__ stat(char *, struct stat *);
int unary_g(char *s) {
  struct stat buf;
  if (stat(s, &buf))
    return 0;
  return S_ISGID & buf.st_mode;
}


x86 assembly (clang, -O0):
<unary_g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <unary_g+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    114e <unary_g+0x3e>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_g>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    0x2ec0(%rip),%rcx
mov    (%rsp),%edx
and    (%rcx),%edx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_ISGID = global i32 0
define i32 @unary_g(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %14
9: ; preds = %1
%10 = load i32, i32* @S_ISGID
%11 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%12 = load i32, i32* %11
%13 = and i32 %10, %12
store i32 %13, i32* %2
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_ISGID = global i32 0
define i32 @unary_g(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @S_ISGID
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, %6
%10 = select i1 %5, i32 %9, i32 0
ret i32 %10
}
/* Variables and functions */
int cntl0(unsigned char);
unsigned clz(unsigned char n) { return cntl0(n); }


x86 assembly (clang, -O0):
<clz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <cntl0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clz>:
jmp    1030 <cntl0@plt>

LLVM IR (-O0):
define i32 @clz(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @cntl0(i8 zeroext %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @clz(i8 zeroext %0) {
%2 = tail call i32 @cntl0(i8 zeroext %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rotate(int /*<<< orphan*/, int);
void shift_rows(uint8_t data[]) {
  *(uint32_t *)&data[(4)] = rotate(*(uint32_t *)&data[(4)], 8);
  *(uint32_t *)&data[(8)] = rotate(*(uint32_t *)&data[(8)], 16);
  *(uint32_t *)&data[(12)] = rotate(*(uint32_t *)&data[(4)], 24);
}


x86 assembly (clang, -O0):
<shift_rows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
mov    $0x8,%esi
call   1030 <rotate@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edi
mov    $0x10,%esi
call   1030 <rotate@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
mov    $0x18,%esi
call   1030 <rotate@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x30(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_rows>:
push   %rbx
mov    %rdi,%rbx
mov    0x10(%rdi),%edi
mov    $0x8,%esi
call   1030 <rotate@plt>
mov    %eax,0x10(%rbx)
mov    0x20(%rbx),%edi
mov    $0x10,%esi
call   1030 <rotate@plt>
mov    %eax,0x20(%rbx)
mov    0x10(%rbx),%edi
mov    $0x18,%esi
call   1030 <rotate@plt>
mov    %eax,0x30(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @shift_rows(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = call i32 @rotate(i32 %5, i32 8)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %6, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 8
%11 = load i32, i32* %10
%12 = call i32 @rotate(i32 %11, i32 16)
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 8
store i32 %12, i32* %14
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = load i32, i32* %16
%18 = call i32 @rotate(i32 %17, i32 24)
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 12
store i32 %18, i32* %20
ret void
}

LLVM IR (-O2):
define void @shift_rows(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = tail call i32 @rotate(i32 %3, i32 8)
store i32 %4, i32* %2
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = load i32, i32* %5
%7 = tail call i32 @rotate(i32 %6, i32 16)
store i32 %7, i32* %5
%8 = load i32, i32* %2
%9 = tail call i32 @rotate(i32 %8, i32 24)
%10 = getelementptr inbounds i32, i32* %0, i64 12
store i32 %9, i32* %10
ret void
}
void mirror_y(unsigned char *bitmap) {
  int c;
  int v;
  for (c = 0; c < 4; c++) {
    v = bitmap[7 - c];
    bitmap[7 - c] = bitmap[c];
    bitmap[c] = v;
  }
}


x86 assembly (clang, -O0):
<mirror_y>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    116a <mirror_y+0x6a>
mov    -0x8(%rbp),%rax
mov    $0x7,%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    $0x7,%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mirror_y+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mirror_y>:
mov    0x7(%rdi),%al
mov    (%rdi),%cl
mov    %cl,0x7(%rdi)
mov    %al,(%rdi)
movzwl 0x1(%rdi),%eax
rol    $0x8,%ax
movzwl 0x5(%rdi),%ecx
rol    $0x8,%cx
mov    %cx,0x1(%rdi)
mov    %ax,0x5(%rdi)
rolw   $0x8,0x3(%rdi)
ret

LLVM IR (-O0):
define void @mirror_y(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %5
5: ; preds = %32, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %35
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sub nsw i32 7, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
store i32 %15, i32* %4
%16 = load i8*, i8** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sub nsw i32 7, %22
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %21, i64 %24
store i8 %20, i8* %25
%26 = load i32, i32* %4
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %2
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
store i8 %27, i8* %31
br label %32
32: ; preds = %8
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %5
35: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @mirror_y(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = load i8, i8* %0
store i8 %4, i8* %2
store i8 %3, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 6
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 5
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
store i8 %12, i8* %9
store i8 %10, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 4
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
store i8 %16, i8* %13
store i8 %14, i8* %15
ret void
}
void gara(unsigned int *posizioneLeprePtr,
          unsigned int *posizioneTartarugaPtr) {
  unsigned int muoviTartaruga(unsigned int posizioneAttuale);
  unsigned int muoviLepre(unsigned int posizioneAttuale);
  *posizioneLeprePtr = muoviLepre(*posizioneLeprePtr);
  *posizioneTartarugaPtr = muoviTartaruga(*posizioneTartarugaPtr);
  return;
}


x86 assembly (clang, -O0):
<gara>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <muoviLepre@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <muoviTartaruga@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gara>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <muoviLepre@plt>
mov    %eax,(%rbx)
mov    (%r14),%edi
call   1040 <muoviTartaruga@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @gara(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 @muoviLepre(i32 %6)
%8 = load i32*, i32** %3
store i32 %7, i32* %8
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = call i32 @muoviTartaruga(i32 %10)
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @gara(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @muoviLepre(i32 %3)
store i32 %4, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @muoviTartaruga(i32 %5)
store i32 %6, i32* %1
ret void
}
/* Type definitions */
struct ooExcepError {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printError(struct ooExcepError *);
int /*<<< orphan*/ printf(char *);
void unhandled(struct ooExcepError *e) {
  printf("Unhandled exception\n");
  printError(e);
  return;
}


x86 assembly (clang, -O0):
<unhandled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <printError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unhandled>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <printError@plt>

LLVM IR (-O0):
%struct.ooExcepError = type { i32 }
@.str = [21 x i8] c"Unhandled exception\0A\00"
define void @unhandled(%struct.ooExcepError* %0) {
%2 = alloca %struct.ooExcepError*
store %struct.ooExcepError* %0, %struct.ooExcepError** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.ooExcepError*, %struct.ooExcepError** %2
%5 = call i32 @printError(%struct.ooExcepError* %4)
ret void
}

LLVM IR (-O2):
%struct.ooExcepError = type { i32 }
@str = [20 x i8] c"Unhandled exception\00"
define void @unhandled(%struct.ooExcepError* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printError(%struct.ooExcepError* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_text_line(char *);
void oleo_show_options() { io_text_line("File format: oleo."); }


x86 assembly (clang, -O0):
<oleo_show_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <io_text_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<oleo_show_options>:
lea    0xee9(%rip),%rdi
jmp    1030 <io_text_line@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"File format: oleo.\00"
define void @oleo_show_options() {
%1 = call i32 @io_text_line(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"File format: oleo.\00"
define void @oleo_show_options() {
%1 = tail call i32 @io_text_line(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
float atan2(float y, float x) {
  return fmod(((native_atan2(y, x)) * 57.2957795131f), 360.f);
}


x86 assembly (clang, -O0):
<atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1040 <native_atan2@plt>
cvtsi2ss %eax,%xmm0
movss  0xeb1(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe99(%rip),%xmm1
call   1030 <fmod@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1040 <native_atan2@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0xec1(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebd(%rip),%xmm1
call   1030 <fmod@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @atan2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @native_atan2 to i32 (double, double, ...)*)(double %6, double %8)
%10 = sitofp i32 %9 to float
%11 = fmul float %10, 0x404CA5DC20000000
%12 = fpext float %11 to double
%13 = call double @fmod(double %12, double 3.600000e+02)
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @atan2(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i32 (double, double, ...) bitcast (i32 (...)* @native_atan2 to i32 (double, double, ...)*)(double %3, double %4)
%6 = sitofp i32 %5 to float
%7 = fmul float %6, 0x404CA5DC20000000
%8 = fpext float %7 to double
%9 = tail call double @fmod(double %8, double 3.600000e+02)
%10 = fptrunc double %9 to float
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M750_f(char *s) {
  debug("M750_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M750_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M750_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M750_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M750_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M750_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M750_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int setuid(int);
int main() {
  if (setuid(1) == -1) {
    perror("setuid");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <setuid@plt>
cmp    $0xffffffff,%eax
jne    115a <main+0x3a>
lea    0xeb7(%rip),%rdi
call   1030 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1161 <main+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <setuid@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1136 <main+0x16>
pop    %rcx
ret
lea    0xec3(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"setuid\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setuid(i32 1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"setuid\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 1, %3 ], [ 0, %0 ]
ret i32 %6
}
int CheckGrid(void) { return 1; }


x86 assembly (clang, -O0):
<CheckGrid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckGrid>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @CheckGrid() {
ret i32 1
}

LLVM IR (-O2):
define i32 @CheckGrid() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void bye(void) { puts("Goodbye, cruel world...."); }


x86 assembly (clang, -O0):
<bye>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bye>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Goodbye, cruel world....\00"
define void @bye() {
%1 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Goodbye, cruel world....\00"
define void @bye() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ equal_clone(char *);
int /*<<< orphan*/ fail_test(int);
void test_clone() {
  if (!equal_clone("empty_r1"))
    fail_test(186);
  ;
  if (!equal_clone("storage_r1"))
    fail_test(189);
  ;
}


x86 assembly (clang, -O0):
<test_clone>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <equal_clone@plt>
cmp    $0x0,%eax
jne    1143 <test_clone+0x23>
mov    $0xba,%edi
call   1030 <fail_test@plt>
lea    0xebf(%rip),%rdi
call   1040 <equal_clone@plt>
cmp    $0x0,%eax
jne    1162 <test_clone+0x42>
mov    $0xbd,%edi
call   1030 <fail_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_clone>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <equal_clone@plt>
test   %eax,%eax
jne    113b <test_clone+0x1b>
mov    $0xba,%edi
call   1030 <fail_test@plt>
lea    0xec7(%rip),%rdi
call   1040 <equal_clone@plt>
test   %eax,%eax
je     114d <test_clone+0x2d>
pop    %rax
ret
mov    $0xbd,%edi
pop    %rax
jmp    1030 <fail_test@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"empty_r1\00"
@.str.1 = [11 x i8] c"storage_r1\00"
define void @test_clone() {
%1 = call i32 @equal_clone(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @fail_test(i32 186)
br label %5
5: ; preds = %3, %0
%6 = call i32 @equal_clone(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 @fail_test(i32 189)
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"empty_r1\00"
@.str.1 = [11 x i8] c"storage_r1\00"
define void @test_clone() {
%1 = tail call i32 @equal_clone(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @fail_test(i32 186)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @equal_clone(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @fail_test(i32 189)
br label %10
10: ; preds = %8, %5
ret void
}
/* Type definitions */
struct pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pool_new_str(struct pool *, char const *);
int xml_node_add_text_id(int, int /*<<< orphan*/, struct pool *);
int xml_node_add_text(int node, const char *text, struct pool *p) {
  return xml_node_add_text_id(node, pool_new_str(p, text), p);
}


x86 assembly (clang, -O0):
<xml_node_add_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pool_new_str@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1040 <xml_node_add_text_id@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_node_add_text>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %edi,%ebp
mov    %rdx,%rdi
call   1030 <pool_new_str@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <xml_node_add_text_id@plt>

LLVM IR (-O0):
%struct.pool = type { i32 }
define i32 @xml_node_add_text(i32 %0, i8* %1, %struct.pool* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.pool*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.pool* %2, %struct.pool** %6
%7 = load i32, i32* %4
%8 = load %struct.pool*, %struct.pool** %6
%9 = load i8*, i8** %5
%10 = call i32 @pool_new_str(%struct.pool* %8, i8* %9)
%11 = load %struct.pool*, %struct.pool** %6
%12 = call i32 @xml_node_add_text_id(i32 %7, i32 %10, %struct.pool* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.pool = type { i32 }
define i32 @xml_node_add_text(i32 %0, i8* %1, %struct.pool* %2) {
%4 = tail call i32 @pool_new_str(%struct.pool* %2, i8* %1)
%5 = tail call i32 @xml_node_add_text_id(i32 %0, i32 %4, %struct.pool* %2)
ret i32 %5
}
void gtk_widget_class_list_style_properties() {}


x86 assembly (clang, -O0):
<gtk_widget_class_list_style_properties>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_widget_class_list_style_properties>:
ret

LLVM IR (-O0):
define void @gtk_widget_class_list_style_properties() {
ret void
}

LLVM IR (-O2):
define void @gtk_widget_class_list_style_properties() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int parse_iaid1(int /*<<< orphan*/ *, char const *, size_t, int);
int parse_iaid(uint8_t *iaid, const char *arg, size_t len) {
  return parse_iaid1(iaid, arg, len, 1);
}


x86 assembly (clang, -O0):
<parse_iaid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <parse_iaid1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_iaid>:
mov    $0x1,%ecx
jmp    1030 <parse_iaid1@plt>

LLVM IR (-O0):
define i32 @parse_iaid(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @parse_iaid1(i32* %7, i8* %8, i64 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @parse_iaid(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @parse_iaid1(i32* %0, i8* %1, i64 %2, i32 1)
ret i32 %4
}
char *LastChar(strpt)
char *strpt;
{
  char *c;
  c = strpt;
  while (*c != '\0')
    c++;
  return (--c);
}


x86 assembly (clang, -O0):
<LastChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <LastChar+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <LastChar+0x10>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LastChar>:
mov    %rdi,%rax
add    $0xfffffffffffffffe,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x2(%rax)
lea    0x1(%rax),%rax
jne    1110 <LastChar+0x10>
ret

LLVM IR (-O0):
define i8* @LastChar(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @LastChar(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 -1
ret i8* %8
}
/* Variables and functions */
char *HMACSHA1(unsigned char const *, void *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *sign(char *hash_string, const char *key) {
  return HMACSHA1((const unsigned char *)hash_string, (void *)key, strlen(key));
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <HMACSHA1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <HMACSHA1@plt>

LLVM IR (-O0):
define i8* @sign(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @HMACSHA1(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @sign(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @HMACSHA1(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
void free_dma(unsigned int dmanr) { return; }


x86 assembly (clang, -O0):
<free_dma>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_dma>:
ret

LLVM IR (-O0):
define void @free_dma(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @free_dma(i32 %0) {
ret void
}