xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int i;
  int sum1, sum2;
  sum1 = 0;
  sum2 = 0;
  for (i = 0; i < 10; i++) {
    sum1 += i;
  }
  for (i = 10; i < 20; i++) {
    sum2 += i;
  }
  printf("sum1: %d, sum2: %d, total: %d\n", sum1, sum2, sum1 + sum2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1155 <main+0x45>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
movl   $0xa,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    117d <main+0x6d>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115c <main+0x4c>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2d,%esi
mov    $0x91,%edx
mov    $0xbe,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"sum1: %d, sum2: %d, total: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 45, i32 145, i32 190)
ret i32 0
}
/* Variables and functions */
int partition(int *, int, int, int *);
void quicksort(int ar[], int l, int r) {
  int m = 0, n = 0;
  if (l >= r) {
    return;
  }
  m = partition(ar, l, r, &n);
  quicksort(ar, l, m - 1);
  quicksort(ar, n + 1, r);
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1151 <quicksort+0x31>
jmp    118b <quicksort+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x18(%rbp),%rcx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
cmp    %edx,%esi
jge    1163 <quicksort+0x43>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
lea    0xc(%rsp),%rcx
call   1030 <partition@plt>
lea    -0x1(%rax),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
mov    0xc(%rsp),%esi
add    $0x1,%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <quicksort@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = icmp slt i32 %1, %2
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = call i32 @partition(i32* %0, i32 %1, i32 %2, i32* %4)
%9 = add nsw i32 %8, -1
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
br label %12
12: ; preds = %3, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b, c;
  scanf("%d", &a);
  b = a * a;
  c = a * a * a;
  printf("%d\n", b);
  printf("%d\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
double M_PI;
double cos(double);
double drho_dx(double L, double a_rhox, double rho_x, double x) {
  return M_PI * a_rhox * rho_x * cos(M_PI * a_rhox * x / L) / L;
}


x86 assembly (clang, -O0):
<drho_dx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drho_dx>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mulsd  (%rax),%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @drho_dx(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double, double* %7
%13 = fmul double %11, %12
%14 = load double, double* @M_PI
%15 = load double, double* %6
%16 = fmul double %14, %15
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = load double, double* %5
%20 = fdiv double %18, %19
%21 = call double @cos(double %20)
%22 = fmul double %13, %21
%23 = load double, double* %5
%24 = fdiv double %22, %23
ret double %24
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @drho_dx(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fmul double %5, %1
%7 = fmul double %6, %2
%8 = fmul double %6, %3
%9 = fdiv double %8, %0
%10 = tail call double @cos(double %9)
%11 = fmul double %10, %7
%12 = fdiv double %11, %0
ret double %12
}
/* Variables and functions */
scalar_t__ is_wall_or_door(int, int);
int door_direction(int x, int y) {
  if (is_wall_or_door(x - 1, y) && is_wall_or_door(x + 1, y)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<door_direction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <is_wall_or_door@plt>
cmp    $0x0,%rax
je     115a <door_direction+0x4a>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <is_wall_or_door@plt>
cmp    $0x0,%rax
je     115a <door_direction+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <door_direction+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<door_direction>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <is_wall_or_door@plt>
test   %rax,%rax
je     113d <door_direction+0x2d>
add    $0x1,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <is_wall_or_door@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    113f <door_direction+0x2f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @door_direction(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i64 @is_wall_or_door(i32 %3, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = add nsw i32 %0, 1
%8 = tail call i64 @is_wall_or_door(i32 %7, i32 %1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6, %2
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %12
}
unsigned long rdpmc_reference_cycles() {
  unsigned a, d, c;
  c = (1 << 30) + 2;
  __asm__ volatile("rdpmc" : "=a"(a), "=d"(d) : "c"(c));
  return ((unsigned long)a) | (((unsigned long)d) << 32);
  ;
}


x86 assembly (clang, -O0):
<rdpmc_reference_cycles>:
push   %rbp
mov    %rsp,%rbp
movl   $0x40000002,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
rdpmc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdpmc_reference_cycles>:
mov    $0x40000002,%ecx
rdpmc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdpmc_reference_cycles() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1073741826, i32* %3
%4 = load i32, i32* %3
%5 = call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
%6 = extractvalue { i32, i32 } %5, 0
%7 = extractvalue { i32, i32 } %5, 1
store i32 %6, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = shl i64 %11, 32
%13 = or i64 %9, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @rdpmc_reference_cycles() {
%1 = tail call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 1073741826)
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void invocation_error(const char *program) {
  fprintf(stderr, "%s: invocation error\n", program);
  fprintf(stderr, "pease run '%s --help' for more informations\n", program);
}


x86 assembly (clang, -O0):
<invocation_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invocation_error>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xedc(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"%s: invocation error\0A\00"
@.str.1 = [45 x i8] c"pease run '%s --help' for more informations\0A\00"
define void @invocation_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"%s: invocation error\0A\00"
@.str.1 = [45 x i8] c"pease run '%s --help' for more informations\0A\00"
define void @invocation_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void pti_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pti_init() {
ret void
}
/* Variables and functions */
scalar_t__ fdopen(int, char const *);
void *c_fdopen(int fildes, const char *mode) {
  return (void *)fdopen(fildes, mode);
}


x86 assembly (clang, -O0):
<c_fdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fdopen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fdopen>:
jmp    1030 <fdopen@plt>

LLVM IR (-O0):
define i8* @c_fdopen(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i64 @fdopen(i32 %5, i8* %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @c_fdopen(i32 %0, i8* %1) {
%3 = tail call i64 @fdopen(i32 %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Sep 26 "
         "18:45:08 CEST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 "
         "USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 "
         "USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0";
}


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

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

LLVM IR (-O0):
@.str = [437 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Sep 26 18:45:08 CEST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([437 x i8], [437 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [437 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=10 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Sep 26 18:45:08 CEST 2012 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=0\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([437 x i8], [437 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ my_putstr(char *);
void signalLost(int bytesRead) {
  if (bytesRead <= 0) {
    my_putstr("\n\033[0;31m[!]\033[m The reading failed!");
    my_putstr(" Check if the server is started or if he has been stopped.\n");
  }
}


x86 assembly (clang, -O0):
<signalLost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     113d <signalLost+0x2d>
lea    0xed4(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xeeb(%rip),%rdi
call   1030 <my_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalLost>:
test   %edi,%edi
jle    1115 <signalLost+0x5>
ret
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xefa(%rip),%rdi
pop    %rax
jmp    1030 <my_putstr@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"\0A\1B[0;31m[!]\1B[m The reading failed!\00"
@.str.1 = [60 x i8] c" Check if the server is started or if he has been stopped.\0A\00"
define void @signalLost(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @my_putstr(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @my_putstr(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0A\1B[0;31m[!]\1B[m The reading failed!\00"
@.str.1 = [60 x i8] c" Check if the server is started or if he has been stopped.\0A\00"
define void @signalLost(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @my_putstr(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @my_putstr(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
char square_to_file(int);
char square_to_rank(int);
char *square_to_coord(int square) {
  char *s = (char *)malloc(3);
  s[0] = square_to_file(square);
  s[1] = square_to_rank(square);
  s[2] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<square_to_coord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <square_to_file@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%edi
call   1030 <square_to_rank@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x2(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<square_to_coord>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1040 <square_to_file@plt>
mov    %al,(%rbx)
mov    %ebp,%edi
call   1030 <square_to_rank@plt>
mov    %al,0x1(%rbx)
movb   $0x0,0x2(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @square_to_coord(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 3)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i32, i32* %2
%7 = call signext i8 @square_to_file(i32 %6)
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %2
%11 = call signext i8 @square_to_rank(i32 %10)
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 2
store i8 0, i8* %15
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @square_to_coord(i32 %0) {
%2 = tail call i64 @malloc(i32 3)
%3 = inttoptr i64 %2 to i8*
%4 = tail call signext i8 @square_to_file(i32 %0)
store i8 %4, i8* %3
%5 = tail call signext i8 @square_to_rank(i32 %0)
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %3, i64 2
store i8 0, i8* %7
ret i8* %3
}
char *skip_padding(char *string) {
  char *ret = string;
  while (*ret == '0' && ret[1]) {
    ++ret;
  }
  return ret;
}


x86 assembly (clang, -O0):
<skip_padding>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jne    1136 <skip_padding+0x36>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1146 <skip_padding+0x46>
jmp    1157 <skip_padding+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_padding+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_padding>:
mov    (%rdi),%cl
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rdi,%rax
cmp    $0x30,%cl
jne    1124 <skip_padding+0x24>
lea    0x1(%rax),%rdi
movzbl 0x1(%rax),%ecx
test   %cl,%cl
jne    1110 <skip_padding+0x10>
ret

LLVM IR (-O0):
define i8* @skip_padding(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 = %18, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 48
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %16
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @skip_padding(i8* %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %7, %1
%4 = phi i8 [ %2, %1 ], [ %9, %7 ]
%5 = phi i8* [ %0, %1 ], [ %8, %7 ]
%6 = icmp eq i8 %4, 48
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
ret i8* %5
}
void pal_memory_unmap(void *ptr) { return; }


x86 assembly (clang, -O0):
<pal_memory_unmap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pal_memory_unmap(i8* nocapture %0) {
ret void
}
void fun2(void) {
  int i;
  float *fp;
#pragma acc kernels deviceptr(fp, u, fun2, i, fp)
  ;
}


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

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

LLVM IR (-O0):
define void @fun2() {
%1 = alloca i32
%2 = alloca float*
ret void
}

LLVM IR (-O2):
define void @fun2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lflush();
int /*<<< orphan*/ usleep(int);
void nap(int x) {
  if (x <= 0)
    return;
  lflush();
  usleep(x * 1000);
}


x86 assembly (clang, -O0):
<nap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     113a <nap+0x1a>
jmp    114d <nap+0x2d>
mov    $0x0,%al
call   1030 <lflush@plt>
imul   $0x3e8,-0x4(%rbp),%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nap>:
test   %edi,%edi
jle    113a <nap+0x1a>
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <lflush@plt>
imul   $0x3e8,%ebx,%edi
pop    %rbx
jmp    1040 <usleep@plt>
ret

LLVM IR (-O0):
define void @nap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = call i32 (...) @lflush()
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, 1000
%10 = call i32 @usleep(i32 %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @nap(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 (...) @lflush()
%5 = mul nsw i32 %0, 1000
%6 = tail call i32 @usleep(i32 %5)
br label %7
7: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _libc_exit_func(int);
void _exit(int status) { _libc_exit_func(status); }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_libc_exit_func@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
call   1030 <_libc_exit_func@plt>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_libc_exit_func(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 @_libc_exit_func(i32 %0)
unreachable
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_scale(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               float);
__attribute__((always_)) struct vec2i *
psvec2i_scale(struct vec2i *result, struct vec2i *a, float scalar) {
  vec2i_scale((int32_t *)result, (int32_t *)a, scalar);
  return result;
}


x86 assembly (clang, -O0):
<psvec2i_scale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1030 <vec2i_scale@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2i_scale>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_scale@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_scale(%struct.vec2i* %0, %struct.vec2i* %1, float %2) {
%4 = alloca %struct.vec2i*
%5 = alloca %struct.vec2i*
%6 = alloca float
store %struct.vec2i* %0, %struct.vec2i** %4
store %struct.vec2i* %1, %struct.vec2i** %5
store float %2, float* %6
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = load %struct.vec2i*, %struct.vec2i** %5
%10 = bitcast %struct.vec2i* %9 to i32*
%11 = load float, float* %6
%12 = call i32 @vec2i_scale(i32* %8, i32* %10, float %11)
%13 = load %struct.vec2i*, %struct.vec2i** %4
ret %struct.vec2i* %13
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_scale(%struct.vec2i* returned %0, %struct.vec2i* %1, float %2) {
%4 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%6 = tail call i32 @vec2i_scale(i32* %4, i32* %5, float %2)
ret %struct.vec2i* %0
}
/* Variables and functions */
int /*<<< orphan*/ print_debug_char(char);
void debug(int c) {
  print_debug_char(c);
  print_debug_char('\r');
  print_debug_char('\n');
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <print_debug_char@plt>
mov    $0xd,%edi
call   1030 <print_debug_char@plt>
mov    $0xa,%edi
call   1030 <print_debug_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
push   %rax
movsbl %dil,%edi
call   1030 <print_debug_char@plt>
mov    $0xd,%edi
call   1030 <print_debug_char@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <print_debug_char@plt>

LLVM IR (-O0):
define void @debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @print_debug_char(i8 signext %4)
%6 = call i32 @print_debug_char(i8 signext 13)
%7 = call i32 @print_debug_char(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @debug(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @print_debug_char(i8 signext %2)
%4 = tail call i32 @print_debug_char(i8 signext 13)
%5 = tail call i32 @print_debug_char(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free3(void ***);
void free3float(float ***p) { free3((void ***)p); }


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

x86 assembly (clang, -O2):
<free3float>:
jmp    1030 <free3@plt>

LLVM IR (-O0):
define void @free3float(float*** %0) {
%2 = alloca float***
store float*** %0, float**** %2
%3 = load float***, float**** %2
%4 = bitcast float*** %3 to i8***
%5 = call i32 @free3(i8*** %4)
ret void
}

LLVM IR (-O2):
define void @free3float(float*** %0) {
%2 = bitcast float*** %0 to i8***
%3 = tail call i32 @free3(i8*** %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay();
int main() {
  int i = 0;
  volatile unsigned long *gpmcon = (volatile unsigned long *)0x7F008820;
  volatile unsigned long *gpmdat = (volatile unsigned long *)0x7F008824;
  *gpmcon = 0x1111;
  while (1) {
    *gpmdat = i;
    i++;
    if (i == 16)
      i = 0;
    delay();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x7f008820,%eax
mov    %rax,-0x10(%rbp)
mov    $0x7f008824,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x1111,(%rax)
movslq -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jne    1168 <main+0x58>
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <delay@plt>
jmp    1143 <main+0x33>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
movq   $0x1111,0x7f008820
xor    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq %ebx,%rbx
mov    %rbx,0x7f008824
7f
add    $0x1,%ebx
cmp    $0x10,%ebx
cmove  %ebp,%ebx
xor    %eax,%eax
call   1030 <delay@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64*
%4 = alloca i64*
store i32 0, i32* %1
store i32 0, i32* %2
store i64* inttoptr (i64 2130741280 to i64*), i64** %3
store i64* inttoptr (i64 2130741284 to i64*), i64** %4
%5 = load i64*, i64** %3
store volatile i64 4369, i64* %5
br label %6
6: ; preds = %0, %15
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %4
store volatile i64 %8, i64* %9
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 16
br i1 %13, label %14, label %15
14: ; preds = %6
store i32 0, i32* %2
br label %15
15: ; preds = %14, %6
%16 = call i32 (...) @delay()
br label %6
}

LLVM IR (-O2):
define i32 @main() {
store volatile i64 4369, i64* inttoptr (i64 2130741280 to i64*)
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = sext i32 %2 to i64
store volatile i64 %3, i64* inttoptr (i64 2130741284 to i64*)
%4 = add nsw i32 %2, 1
%5 = icmp eq i32 %4, 16
%6 = select i1 %5, i32 0, i32 %4
%7 = tail call i32 (...) @delay()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ riotboot_hdr_print(int /*<<< orphan*/);
int /*<<< orphan*/ riotboot_slot_get_hdr(unsigned int);
void riotboot_slot_print_hdr(unsigned slot) {
  riotboot_hdr_print(riotboot_slot_get_hdr(slot));
}


x86 assembly (clang, -O0):
<riotboot_slot_print_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <riotboot_slot_get_hdr@plt>
mov    %eax,%edi
call   1040 <riotboot_hdr_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<riotboot_slot_print_hdr>:
push   %rax
call   1030 <riotboot_slot_get_hdr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <riotboot_hdr_print@plt>

LLVM IR (-O0):
define void @riotboot_slot_print_hdr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @riotboot_slot_get_hdr(i32 %3)
%5 = call i32 @riotboot_hdr_print(i32 %4)
ret void
}

LLVM IR (-O2):
define void @riotboot_slot_print_hdr(i32 %0) {
%2 = tail call i32 @riotboot_slot_get_hdr(i32 %0)
%3 = tail call i32 @riotboot_hdr_print(i32 %2)
ret void
}
/* Variables and functions */
double hf(double, int);
double chg(double v) { return hf(v, 2); }


x86 assembly (clang, -O0):
<chg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <hf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chg>:
mov    $0x2,%edi
jmp    1030 <hf@plt>

LLVM IR (-O0):
define double @chg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @hf(double %3, i32 2)
ret double %4
}

LLVM IR (-O2):
define double @chg(double %0) {
%2 = tail call double @hf(double %0, i32 2)
ret double %2
}
void RTMemPageAllocZTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPageAllocZTag() {
ret void
}
/* Variables and functions */
void *realloc(void *, int);
void *my_realloc(void *p, int size) { return realloc(p, size); }


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

x86 assembly (clang, -O2):
<my_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @my_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  uint8_t reg = 0x66;
  uint8_t mask = 0xf0;
  reg &= ~mask;
  reg |= 0x30;
  printf("reg: %u\n", reg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x66,-0x8(%rbp)
movl   $0xf0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x36,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"reg: %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 102, i32* %2
store i32 240, i32* %3
%4 = load i32, i32* %3
%5 = xor i32 %4, -1
%6 = load i32, i32* %2
%7 = and i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = or i32 %8, 48
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"reg: %u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 54)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void overlap_write_begin(FILE *file) { fprintf(file, "[\n"); }


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

x86 assembly (clang, -O2):
<overlap_write_begin>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"[\0A\00"
define void @overlap_write_begin(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"[\0A\00"
define void @overlap_write_begin(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 2, i64 1, i32* %0)
ret void
}
void PowerCtrlPadSleepEnable(void) {
  (*((volatile unsigned long *)(0x40090000 + 0x0000002C))) = 0;
  (*((volatile unsigned long *)(0x40092000 + 0x0000002C)));
}


x86 assembly (clang, -O0):
<PowerCtrlPadSleepEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4009002c,%eax
movq   $0x0,(%rax)
mov    $0x4009202c,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowerCtrlPadSleepEnable>:
movq   $0x0,0x4009002c
mov    0x4009202c,%rax
40
ret

LLVM IR (-O0):
define void @PowerCtrlPadSleepEnable() {
store volatile i64 0, i64* inttoptr (i64 1074331692 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 1074339884 to i64*)
ret void
}

LLVM IR (-O2):
define void @PowerCtrlPadSleepEnable() {
store volatile i64 0, i64* inttoptr (i64 1074331692 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 1074339884 to i64*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL_RES;
typedef int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
MYSQL_RES *mysql_use_result(MYSQL *handle) {
  printf("mysql_use_result(%s)\n", (handle ? "MYSQL" : "NULL"));
  return (0);
}


x86 assembly (clang, -O0):
<mysql_use_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xef5(%rip),%rsi
lea    0xee8(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysql_use_result>:
push   %rax
test   %rdi,%rdi
lea    0xf01(%rip),%rax
lea    0xef4(%rip),%rsi
cmove  %rax,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"mysql_use_result(%s)\0A\00"
@.str.1 = [6 x i8] c"MYSQL\00"
@.str.2 = [5 x i8] c"NULL\00"
define i32* @mysql_use_result(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32* null
}

LLVM IR (-O2):
@.str = [22 x i8] c"mysql_use_result(%s)\0A\00"
@.str.1 = [6 x i8] c"MYSQL\00"
@.str.2 = [5 x i8] c"NULL\00"
define noalias i32* @mysql_use_result(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32* null
}
issp(c) {
  return c == ' ' || c == '\n' || c == '\t' || c == 12;
  printf("issp=> ");
}


x86 assembly (clang, -O0):
<issp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <issp+0x3e>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <issp+0x3e>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <issp+0x3e>
cmpl   $0xc,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issp>:
cmp    $0x20,%edi
ja     111d <issp+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    111d <issp+0x1d>
ret
xor    %eax,%eax
cmp    $0xc,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @issp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 10
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 9
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 12
br label %14
14: ; preds = %11, %8, %5, %1
%15 = phi i1 [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @issp(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int args_count, char *args[]) {
  printf("Hello, Mina!\n");
  return EXIT_SUCCESS;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, Mina!\0A\00"
@EXIT_SUCCESS = global i32 0
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 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [13 x i8] c"Hello, Mina!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Type definitions */
struct sl {
  int dummy;
};

/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
struct sl *create_sl_with_head_and_tail();
int /*<<< orphan*/ destroy_sl(struct sl *);
int /*<<< orphan*/ sl_random_insert(struct sl *);
int main() {
  struct sl *sl = create_sl_with_head_and_tail();
  while (__VERIFIER_nondet_int())
    sl_random_insert(sl);
  destroy_sl(sl);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <create_sl_with_head_and_tail@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1179 <main+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <sl_random_insert@plt>
jmp    115a <main+0x1a>
mov    -0x10(%rbp),%rdi
call   1040 <destroy_sl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <create_sl_with_head_and_tail@plt>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1166 <main+0x26>
mov    %rbx,%rdi
call   1030 <sl_random_insert@plt>
jmp    1150 <main+0x10>
mov    %rbx,%rdi
call   1040 <destroy_sl@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sl = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sl*
store i32 0, i32* %1
%3 = call %struct.sl* (...) @create_sl_with_head_and_tail()
store %struct.sl* %3, %struct.sl** %2
br label %4
4: ; preds = %7, %0
%5 = call i64 (...) @__VERIFIER_nondet_int()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load %struct.sl*, %struct.sl** %2
%9 = call i32 @sl_random_insert(%struct.sl* %8)
br label %4
10: ; preds = %4
%11 = load %struct.sl*, %struct.sl** %2
%12 = call i32 @destroy_sl(%struct.sl* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.sl = type { i32 }
define i32 @main() {
%1 = tail call %struct.sl* (...) @create_sl_with_head_and_tail()
%2 = tail call i64 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0, %4
%5 = tail call i32 @sl_random_insert(%struct.sl* %1)
%6 = tail call i64 (...) @__VERIFIER_nondet_int()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %0
%9 = tail call i32 @destroy_sl(%struct.sl* %1)
ret i32 0
}
void gdk_drop_finish() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drop_finish() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void GPIO_clearEventDio(uint32_t dioNumber) {
  ;
  (*((volatile unsigned long *)(0x40022000 + 0x000000E0))) = (1 << dioNumber);
}


x86 assembly (clang, -O0):
<GPIO_clearEventDio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0x400220e0,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIO_clearEventDio>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,0x400220e0
40
ret

LLVM IR (-O0):
define void @GPIO_clearEventDio(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* inttoptr (i64 1073881312 to i64*)
ret void
}

LLVM IR (-O2):
define void @GPIO_clearEventDio(i32 %0) {
%2 = shl nuw i32 1, %0
%3 = sext i32 %2 to i64
store volatile i64 %3, i64* inttoptr (i64 1073881312 to i64*)
ret void
}