xunge/DecIR huggingface dataset:
void foo(volatile int *a, int *b) {
  *a = 1;
  if (*b)
    *a = 2;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     112d <foo+0x2d>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,(%rdi)
cmpl   $0x0,(%rsi)
je     1111 <foo+0x11>
movl   $0x2,(%rdi)
ret

LLVM IR (-O0):
define void @foo(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
store volatile i32 1, i32* %5
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32*, i32** %3
store volatile i32 2, i32* %10
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @foo(i32* %0, i32* nocapture %1) {
store volatile i32 1, i32* %0
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
store volatile i32 2, i32* %0
br label %6
6: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int printString() {
  char mystring[50];
  printf("Please type a string\n\n");
  scanf("\n%50[^\n]s", mystring);
  printf("%s\n", mystring);
}


x86 assembly (clang, -O0):
<printString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xed6(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x40(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printString>:
push   %rbx
sub    $0x40,%rsp
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Please type a string\0A\0A\00"
@.str.1 = [10 x i8] c"\0A%50[^\0A]s\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @printString() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"\0A%50[^\0A]s\00"
@str = [22 x i8] c"Please type a string\0A\00"
define i32 @printString() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @puts(i8* %2)
ret i32 undef
}
__attribute__((no, noclone)) int bar(int x) { return (x << 2) | 3; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
or     $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0x3(,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = or i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = shl i32 %0, 2
%3 = or i32 %2, 3
ret i32 %3
}
/* Variables and functions */
float __ocml_acosh_f32(float);
float acoshf(float x) { return __ocml_acosh_f32(x); }


x86 assembly (clang, -O0):
<acoshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_acosh_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshf>:
jmp    1030 <__ocml_acosh_f32@plt>

LLVM IR (-O0):
define float @acoshf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__ocml_acosh_f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @acoshf(float %0) {
%2 = tail call float @__ocml_acosh_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void sig_usr1(int signo) {
  printf("SIGUSR1%% \n");
  printf("Sleeping for 5 seconds \n");
  sleep(5);
  printf("Out of SIGUSR1%% \n");
}


x86 assembly (clang, -O0):
<sig_usr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_usr1>:
push   %rax
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
lea    0xea6(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"SIGUSR1%% \0A\00"
@.str.1 = [25 x i8] c"Sleeping for 5 seconds \0A\00"
@.str.2 = [19 x i8] c"Out of SIGUSR1%% \0A\00"
define void @sig_usr1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @sleep(i32 5)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"SIGUSR1%% \0A\00"
@.str.2 = [19 x i8] c"Out of SIGUSR1%% \0A\00"
@str = [24 x i8] c"Sleeping for 5 seconds \00"
define void @sig_usr1(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 5)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}
double f15(double x) {
  double t = x - 0.0;
  return t + 0.0;
}


x86 assembly (clang, -O0):
<f15>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f15>:
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f15(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 0.000000e+00
store double %5, double* %3
%6 = load double, double* %3
%7 = fadd double %6, 0.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f15(double %0) {
%2 = fadd double %0, 0.000000e+00
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_to_sample_spec() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_to_sample_spec"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_to_sample_spec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [47 x i8] c"NOT IMPLEMENTED:pa_format_info_to_sample_spec\0A\00"
define i32 @pa_format_info_to_sample_spec() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [46 x i8] c"NOT IMPLEMENTED:pa_format_info_to_sample_spec\00"
define i32 @pa_format_info_to_sample_spec() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
long double __sub_func(long double d1, long double d2) { return d1 - d2; }


x86 assembly (clang, -O0):
<__sub_func>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fsubrp %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sub_func>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fsubp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @__sub_func(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fsub x86_fp80 %5, %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @__sub_func(x86_fp80 %0, x86_fp80 %1) {
%3 = fsub x86_fp80 %0, %1
ret x86_fp80 %3
}
/* Variables and functions */
void reverse_in_place(char *data, size_t size) {
  char *end = data + (size - 1);
  while (end > data) {
    char tmp = *data;
    *data++ = *end;
    *end-- = tmp;
  }
}


x86 assembly (clang, -O0):
<reverse_in_place>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1166 <reverse_in_place+0x66>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    111f <reverse_in_place+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_in_place>:
lea    -0x1(%rsi),%rax
test   %rax,%rax
jle    113c <reverse_in_place+0x3c>
lea    (%rsi,%rdi,1),%rax
add    $0xfffffffffffffffe,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi),%ecx
movzbl 0x1(%rax),%edx
mov    %dl,(%rdi)
add    $0x1,%rdi
mov    %cl,0x1(%rax)
lea    -0x1(%rax),%rcx
cmp    %rdi,%rax
mov    %rcx,%rax
ja     1120 <reverse_in_place+0x20>
ret

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

LLVM IR (-O2):
define void @reverse_in_place(i8* %0, i64 %1) {
%3 = add i64 %1, -1
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 %3
br label %7
7: ; preds = %5, %7
%8 = phi i8* [ %12, %7 ], [ %0, %5 ]
%9 = phi i8* [ %13, %7 ], [ %6, %5 ]
%10 = load i8, i8* %8
%11 = load i8, i8* %9
%12 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %11, i8* %8
%13 = getelementptr inbounds i8, i8* %9, i64 -1
store i8 %10, i8* %9
%14 = icmp ugt i8* %13, %12
br i1 %14, label %7, label %15
15: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int make_key();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int ret = make_key();
  printf(" make_key returns %d\n", ret);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <make_key@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <make_key@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c" make_key returns %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @make_key()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c" make_key returns %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @make_key()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n,
                   locale_t loc) {
  size_t l = strlen(src);
  if (n > l)
    strcpy(dest, src);
  return l;
}


x86 assembly (clang, -O0):
<__strxfrm_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    115f <__strxfrm_l+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__strxfrm_l>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbx
cmp    %r12,%rax
jae    114c <__strxfrm_l+0x2c>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @__strxfrm_l(i8* noalias %0, i8* noalias %1, i64 %2, i32 %3) {
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = icmp ult i64 %5, %2
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %9
9: ; preds = %7, %4
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ CRYPTO_RWLOCK;

/* Variables and functions */
int /*<<< orphan*/ *OPENSSL_zalloc(int);
CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void) {
  CRYPTO_RWLOCK *lock;
  if ((lock = OPENSSL_zalloc(sizeof(unsigned int))) == NULL) {
    return NULL;
  }
  *(unsigned int *)lock = 1;
  return lock;
}


x86 assembly (clang, -O0):
<CRYPTO_THREAD_lock_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <OPENSSL_zalloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    113d <CRYPTO_THREAD_lock_new+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    114f <CRYPTO_THREAD_lock_new+0x3f>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_THREAD_lock_new>:
push   %rax
mov    $0x4,%edi
call   1030 <OPENSSL_zalloc@plt>
test   %rax,%rax
je     1126 <CRYPTO_THREAD_lock_new+0x16>
movl   $0x1,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @CRYPTO_THREAD_lock_new() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i32* @OPENSSL_zalloc(i32 4)
store i32* %3, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %6
5: ; preds = %0
store i32* null, i32** %1
br label %9
6: ; preds = %0
%7 = load i32*, i32** %2
store i32 1, i32* %7
%8 = load i32*, i32** %2
store i32* %8, i32** %1
br label %9
9: ; preds = %6, %5
%10 = load i32*, i32** %1
ret i32* %10
}

LLVM IR (-O2):
define i32* @CRYPTO_THREAD_lock_new() {
%1 = tail call i32* @OPENSSL_zalloc(i32 4)
%2 = icmp eq i32* %1, null
br i1 %2, label %4, label %3
3: ; preds = %0
store i32 1, i32* %1
br label %4
4: ; preds = %0, %3
ret i32* %1
}
int test_imm_A9uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xa9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A9uint64_midword_reg>:
test   $0xa90000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A9uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 169
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A9uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11075584
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int tegra_dvfs_init(void) { return 0; }


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

x86 assembly (clang, -O2):
<tegra_dvfs_init>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @tegra_dvfs_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @tegra_dvfs_init() {
ret i32 0
}
short horiz_mode_code_black(runlen)
short runlen;
{ return (runlen < 64 ? runlen + 106 : (runlen / 64) + 169); }


x86 assembly (clang, -O0):
<horiz_mode_code_black>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x40,%eax
jge    1127 <horiz_mode_code_black+0x27>
movswl -0x2(%rbp),%eax
add    $0x6a,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <horiz_mode_code_black+0x3b>
movswl -0x2(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
add    $0xa9,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<horiz_mode_code_black>:
mov    %edi,%eax
shl    $0x10,%eax
cmp    $0x3fffff,%eax
jg     1113 <horiz_mode_code_black+0x13>
sar    $0x10,%eax
add    $0x6a,%eax
ret
lea    0x3f(%rdi),%eax
test   %di,%di
cmovns %edi,%eax
cwtl
sar    $0x6,%eax
add    $0xa9,%eax
movzwl %ax,%eax
ret

LLVM IR (-O0):
define signext i16 @horiz_mode_code_black(i32 %0) {
%2 = alloca i16
%3 = trunc i32 %0 to i16
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = icmp slt i32 %5, 64
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = add nsw i32 %9, 106
br label %16
11: ; preds = %1
%12 = load i16, i16* %2
%13 = sext i16 %12 to i32
%14 = sdiv i32 %13, 64
%15 = add nsw i32 %14, 169
br label %16
16: ; preds = %11, %7
%17 = phi i32 [ %10, %7 ], [ %15, %11 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define signext i16 @horiz_mode_code_black(i32 %0) {
%2 = shl i32 %0, 16
%3 = icmp slt i32 %2, 4194304
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = ashr exact i32 %2, 16
%6 = add nsw i32 %5, 106
br label %12
7: ; preds = %1
%8 = trunc i32 %0 to i16
%9 = sdiv i16 %8, 64
%10 = add nsw i16 %9, 169
%11 = zext i16 %10 to i32
br label %12
12: ; preds = %7, %4
%13 = phi i32 [ %6, %4 ], [ %11, %7 ]
%14 = trunc i32 %13 to i16
ret i16 %14
}
/* Variables and functions */
scalar_t__ secure_getenv(char *);
const char *fstab_path(void) {
  return secure_getenv("SYSTEMD_FSTAB") ?: "/etc/fstab";
}


x86 assembly (clang, -O0):
<fstab_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <secure_getenv@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     113f <fstab_path+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    114f <fstab_path+0x3f>
lea    0xec8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    114f <fstab_path+0x3f>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstab_path>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <secure_getenv@plt>
test   %rax,%rax
lea    0xee7(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"SYSTEMD_FSTAB\00"
@.str.1 = [11 x i8] c"/etc/fstab\00"
define i8* @fstab_path() {
%1 = call i64 @secure_getenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = inttoptr i64 %1 to i8*
br label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %3
%7 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %5 ]
ret i8* %7
}

LLVM IR (-O2):
@.str = [14 x i8] c"SYSTEMD_FSTAB\00"
@.str.1 = [11 x i8] c"/etc/fstab\00"
define i8* @fstab_path() {
%1 = tail call i64 @secure_getenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = inttoptr i64 %1 to i8*
%4 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %3
ret i8* %4
}
int main(void) {
  float a = {5.0};
  char b[] = {'a', 'b'};
  char bb[] = {};
  char bbb = 'd';
  char bla[] = "anblea";
  char *blab = "anblea";
  char **blabl = &blab;
  char ***blabla = &blabl;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    0xee5(%rip),%ax
mov    %ax,-0xa(%rbp)
movb   $0x64,-0xc(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x13(%rbp)
mov    0xed3(%rip),%ax
mov    %ax,-0xf(%rbp)
mov    0xecb(%rip),%al
mov    %al,-0xd(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.main.b = [2 x i8] c"ab"
@__const.main.bla = [7 x i8] c"anblea\00"
@.str = [7 x i8] c"anblea\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [2 x i8]
%4 = alloca [0 x i8]
%5 = alloca i8
%6 = alloca [7 x i8]
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i8***
store i32 0, i32* %1
store float 5.000000e+00, float* %2
%10 = bitcast [2 x i8]* %3 to i8*
%11 = bitcast [0 x i8]* %4 to i8*
store i8 100, i8* %5
%12 = bitcast [7 x i8]* %6 to i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %7
store i8** %7, i8*** %8
store i8*** %8, i8**** %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
float pow(float, int);
float inQuad(float t, float b, float c, float d) {
  return c * pow(t / d, 2) + b;
}


x86 assembly (clang, -O0):
<inQuad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inQuad>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @inQuad(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %5
%11 = load float, float* %8
%12 = fdiv float %10, %11
%13 = call float @pow(float %12, i32 2)
%14 = load float, float* %6
%15 = call float @llvm.fmuladd.f32(float %9, float %13, float %14)
ret float %15
}

LLVM IR (-O2):
define float @inQuad(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = tail call float @pow(float %5, i32 2)
%7 = tail call float @llvm.fmuladd.f32(float %2, float %6, float %1)
ret float %7
}
char *nullptr_zero() {
  static char *const base = (char *)0;
  static const unsigned long offset = 0;
  return base + offset;
}


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

x86 assembly (clang, -O2):
<nullptr_zero>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@nullptr_zero.base = internal constant i8* null
@nullptr_zero.offset = internal constant i64 0
define i8* @nullptr_zero() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @nullptr_zero() {
ret i8* null
}
void __ieee754_atan2(void) {}


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

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

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

LLVM IR (-O2):
define void @__ieee754_atan2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void md_sleep(int nsecs) { (void)sleep(nsecs); }


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

x86 assembly (clang, -O2):
<md_sleep>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @md_sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CSFLogDebug(char *, char *);
void sdp_dump_buffer(char *_ptr, int _size_bytes) { CSFLogDebug("sdp", _ptr); }


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

x86 assembly (clang, -O2):
<sdp_dump_buffer>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <CSFLogDebug@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"sdp\00"
define void @sdp_dump_buffer(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 = call i32 @CSFLogDebug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"sdp\00"
define void @sdp_dump_buffer(i8* %0, i32 %1) {
%3 = tail call i32 @CSFLogDebug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage_old(void) {
  fprintf(stderr, "Usage_old: pdf417_enc [-t type] infile outfile [nrows] "
                  "[ncols] [ec_level]\n");
  fprintf(stderr, "\tValid types are: pbm, ps, raw\n\n");
  fprintf(stderr, "\tDefault type is  ps\n\n");
}


x86 assembly (clang, -O0):
<Usage_old>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xf12(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf1e(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage_old>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1c(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2f(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"Usage_old: pdf417_enc [-t type] infile outfile [nrows] [ncols] [ec_level]\0A\00"
@.str.1 = [33 x i8] c"\09Valid types are: pbm, ps, raw\0A\0A\00"
@.str.2 = [23 x i8] c"\09Default type is ps\0A\0A\00"
define void @Usage_old() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"Usage_old: pdf417_enc [-t type] infile outfile [nrows] [ncols] [ec_level]\0A\00"
@.str.1 = [33 x i8] c"\09Valid types are: pbm, ps, raw\0A\0A\00"
@.str.2 = [23 x i8] c"\09Default type is ps\0A\0A\00"
define void @Usage_old() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int test_imm_51uint32_reg(unsigned int val) {
  return ((val) & (0x51 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_51uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x51,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_51uint32_reg>:
test   $0x51,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_51uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 81
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_51uint32_reg(i32 %0) {
%2 = and i32 %0, 81
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned max(unsigned const a, unsigned const b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(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* %4
%7 = icmp ugt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void protect_kernel_linear_mapping_text_rodata(void) {}


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

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

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

LLVM IR (-O2):
define void @protect_kernel_linear_mapping_text_rodata() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __flush_tlb_single(unsigned long);
void __flush_tlb_one(unsigned long addr) { __flush_tlb_single(addr); }


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

x86 assembly (clang, -O2):
<__flush_tlb_one>:
jmp    1030 <__flush_tlb_single@plt>

LLVM IR (-O0):
define void @__flush_tlb_one(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @__flush_tlb_single(i64 %3)
ret void
}

LLVM IR (-O2):
define void @__flush_tlb_one(i64 %0) {
%2 = tail call i32 @__flush_tlb_single(i64 %0)
ret void
}
/* Variables and functions */
double log(double);
int logf_to_midi(double logf) {
  int midi;
  midi = (int)(0.5 + 69.0 + 12.0 / log(2.0) * (logf - log(440.0)));
  return (midi);
}


x86 assembly (clang, -O0):
<logf_to_midi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef3(%rip),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xedb(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb8(%rip),%xmm0
call   1030 <log@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8e(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logf_to_midi>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @logf_to_midi(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = call double @log(double 2.000000e+00)
%5 = fdiv double 1.200000e+01, %4
%6 = load double, double* %2
%7 = call double @log(double 4.400000e+02)
%8 = fsub double %6, %7
%9 = call double @llvm.fmuladd.f64(double %5, double %8, double 6.950000e+01)
%10 = fptosi double %9 to i32
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @logf_to_midi(double %0) {
%2 = fadd double %0, 0xC01858DB7958D4AC
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0x40314FF58BE0A23F, double 6.950000e+01)
%4 = fptosi double %3 to i32
ret i32 %4
}
int precheckPrime(int number) {
  if (number % 2 == 0 || number % 5 == 0) {
    return 0;
  }
  if (number < 3) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<precheckPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     112f <precheckPrime+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113b <precheckPrime+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1158 <precheckPrime+0x58>
cmpl   $0x3,-0x8(%rbp)
jge    1151 <precheckPrime+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1158 <precheckPrime+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precheckPrime>:
imul   $0xcccccccd,%edi,%eax
add    $0x19999999,%eax
cmp    $0x33333333,%eax
setae  %al
cmp    $0x3,%edi
setge  %cl
and    %dil,%cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @precheckPrime(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ne i32 %2, 0
%4 = srem i32 %0, 5
%5 = icmp ne i32 %4, 0
%6 = icmp sgt i32 %0, 2
%7 = and i1 %3, %5
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_retrieve_mixed_cell(int n, int r, int i, int labels[],
                               double *normal) {
  int fail;
  fail = _ada_use_c2phc4c(95, &i, labels, normal, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_retrieve_mixed_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x5f,%edi
lea    -0xc(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_retrieve_mixed_cell>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x5f,%edi
mov    %rcx,%rdx
mov    %r8,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @celcon_retrieve_mixed_cell(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double*
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store double* %4, double** %10
%12 = load i32*, i32** %9
%13 = load double*, double** %10
%14 = call i32 @_ada_use_c2phc4c(i32 95, i32* %8, i32* %12, double* %13, i32 0)
store i32 %14, i32* %11
%15 = load i32, i32* %11
ret i32 %15
}

LLVM IR (-O2):
define i32 @celcon_retrieve_mixed_cell(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca i32
store i32 %2, i32* %6
%7 = call i32 @_ada_use_c2phc4c(i32 95, i32* %6, i32* %3, double* %4, i32 0)
ret i32 %7
}
void done(status) int status;
{
  term_reset();
  exit(status);
}


x86 assembly (clang, -O0):
<done>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <term_reset@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<done>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <term_reset@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @done(i32 %0) {
%2 = tail call i32 (...) @term_reset()
tail call void @exit(i32 %0)
unreachable
}
const char *GetSystemDecimalSeparator() { return '.'; }


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

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

LLVM IR (-O0):
define i8* @GetSystemDecimalSeparator() {
ret i8* inttoptr (i64 46 to i8*)
}

LLVM IR (-O2):
define i8* @GetSystemDecimalSeparator() {
ret i8* inttoptr (i64 46 to i8*)
}
int squarei(int i) { return i * i; }


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

x86 assembly (clang, -O2):
<squarei>:
mov    %edi,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @squarei(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @squarei(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ wgs_gcj02_offset(double const, double const, double *,
                                    double *);
void wgs_wgs84_to_gcj02(const double lat, const double lng, double *mlat,
                        double *mlng) {
  double dlat, dlng;
  wgs_gcj02_offset(lat, lng, &dlat, &dlng);
  *mlat = lat + dlat;
  *mlng = lng + dlng;
}


x86 assembly (clang, -O0):
<wgs_wgs84_to_gcj02>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <wgs_gcj02_offset@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wgs_wgs84_to_gcj02>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0x20(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <wgs_gcj02_offset@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x10(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @wgs_wgs84_to_gcj02(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%11 = load double, double* %5
%12 = load double, double* %6
%13 = call i32 @wgs_gcj02_offset(double %11, double %12, double* %9, double* %10)
%14 = load double, double* %5
%15 = load double, double* %9
%16 = fadd double %14, %15
%17 = load double*, double** %7
store double %16, double* %17
%18 = load double, double* %6
%19 = load double, double* %10
%20 = fadd double %18, %19
%21 = load double*, double** %8
store double %20, double* %21
ret void
}

LLVM IR (-O2):
define void @wgs_wgs84_to_gcj02(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = call i32 @wgs_gcj02_offset(double %0, double %1, double* %5, double* %6)
%10 = load double, double* %5
%11 = fadd double %10, %0
store double %11, double* %2
%12 = load double, double* %6
%13 = fadd double %12, %1
store double %13, double* %3
ret void
}
int fun723() { return 723; }


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

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

LLVM IR (-O0):
define i32 @fun723() {
ret i32 723
}

LLVM IR (-O2):
define i32 @fun723() {
ret i32 723
}
/* Variables and functions */
int /*<<< orphan*/ halt();
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void __attribute__((cdecl)) irq_bpe(unsigned cs, unsigned ip) {
  printf("irq_"
         "bpe"
         "!%x:%x",
         cs, ip);
  halt();
}


x86 assembly (clang, -O0):
<irq_bpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <halt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_bpe>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <halt@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"irq_bpe!%x:%x\00"
define void @irq_bpe(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* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 (...) @halt()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"irq_bpe!%x:%x\00"
define void @irq_bpe(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 (...) @halt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x56() {
  Assert_real((isxdigit(86) == 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_isxdigit.c",
              435, ("isxdigit should be 0 for V"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x56>:
push   %rax
mov    $0x56,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1b3,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for V\00"
define void @t_isxdigit_0x56() {
%1 = call i64 @isxdigit(i32 86)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for V\00"
define void @t_isxdigit_0x56() {
%1 = tail call i64 @isxdigit(i32 86)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
short *test_func_01(short *p, int *x) {
  int r = 0;
  r += *p++;
  *x = r;
  return p;
}


x86 assembly (clang, -O0):
<test_func_01>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movswl (%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_01>:
movswl (%rdi),%ecx
lea    0x2(%rdi),%rax
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define i16* @test_func_01(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
%5 = alloca i32
store i16* %0, i16** %3
store i32* %1, i32** %4
store i32 0, i32* %5
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i32 1
store i16* %7, i16** %3
%8 = load i16, i16* %6
%9 = sext i16 %8 to i32
%10 = load i32, i32* %5
%11 = add nsw i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
store i32 %12, i32* %13
%14 = load i16*, i16** %3
ret i16* %14
}

LLVM IR (-O2):
define i16* @test_func_01(i16* %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %0
%5 = sext i16 %4 to i32
store i32 %5, i32* %1
ret i16* %3
}
void f(int count) {
  int a[count];
  do {
  } while (0);
  if (a[0] != 3) {
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
jmp    1137 <f+0x37>
jmp    113c <f+0x3c>
mov    -0x20(%rbp),%rax
cmpl   $0x3,(%rax)
je     114e <f+0x4e>
jmp    114e <f+0x4e>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
br label %9
9: ; preds = %1
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
%12 = getelementptr inbounds i32, i32* %8, i64 0
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 3
br i1 %14, label %15, label %16
15: ; preds = %11
br label %16
16: ; preds = %15, %11
%17 = load i8*, i8** %3
ret void
}

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