xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_shuffle_ps(int /*<<< orphan*/, int /*<<< orphan*/, int);
__m128 __mm_shuffle_ps(__m128 A, __m128 B, int const I) {
  return _mm_shuffle_ps(A, B, 1);
}


x86 assembly (clang, -O0):
<__mm_shuffle_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1030 <_mm_shuffle_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mm_shuffle_ps>:
mov    $0x1,%edx
jmp    1030 <_mm_shuffle_ps@plt>

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

LLVM IR (-O2):
define i32 @__mm_shuffle_ps(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_mm_shuffle_ps(i32 %0, i32 %1, i32 1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ readop();
void main() {
  while (readop()) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <main+0x9>
mov    $0x0,%al
call   1030 <readop@plt>
cmp    $0x0,%rax
je     112f <main+0x1f>
jmp    1119 <main+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <readop@plt>
test   %rax,%rax
jne    1120 <main+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @readop()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @readop()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double realtime(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  t.tv_sec -= (2017 - 1970) * 3600 * 24 * 365;
  return (1. + (double)t.tv_usec + ((double)t.tv_sec * 1000000.)) / 1000000.;
}


x86 assembly (clang, -O0):
<realtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x10(%rbp),%rax
sub    $0x58587480,%rax
mov    %rax,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
addsd  %xmm0,%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xead(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe9d(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    $0xffffffffa7a78b80,%rax
add    0x8(%rsp),%rax
cvtsi2sdq 0x10(%rsp),%xmm1
addsd  0xec5(%rip),%xmm1
cvtsi2sd %rax,%xmm0
movsd  0xec0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @realtime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = sub nsw i64 %4, 1482192000
store i64 %5, i64* %3
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fadd double 1.000000e+00, %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 1.000000e+06, double %9)
%14 = fdiv double %13, 1.000000e+06
ret double %14
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @realtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = add nsw i64 %5, -1482192000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fadd double %9, 1.000000e+00
%11 = sitofp i64 %6 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 1.000000e+06, double %10)
%13 = fdiv double %12, 1.000000e+06
ret double %13
}
void xfuse_devredir_cb_enum_dir(void *vp, struct xrdp_inode *xinode) {}


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

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

LLVM IR (-O0):
%struct.xrdp_inode = type opaque
define void @xfuse_devredir_cb_enum_dir(i8* %0, %struct.xrdp_inode* %1) {
%3 = alloca i8*
%4 = alloca %struct.xrdp_inode*
store i8* %0, i8** %3
store %struct.xrdp_inode* %1, %struct.xrdp_inode** %4
ret void
}

LLVM IR (-O2):
%struct.xrdp_inode = type opaque
define void @xfuse_devredir_cb_enum_dir(i8* nocapture %0, %struct.xrdp_inode* nocapture %1) {
ret void
}
/* Variables and functions */
int a_to_i(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int n;
  char s[] = "123456789";
  n = a_to_i(s);
  printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x1e(%rbp)
mov    0xec0(%rip),%ax
mov    %ax,-0x16(%rbp)
lea    -0x1e(%rbp),%rdi
call   1040 <a_to_i@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,0x8(%rsp)
movw   $0x39,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <a_to_i@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [10 x i8] c"123456789\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [10 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [10 x i8]* %7 to i8*
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 0
%10 = call i32 @a_to_i(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [10 x i8] c"123456789\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @a_to_i(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void set_host_control_word(void) {}


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

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

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

LLVM IR (-O2):
define void @set_host_control_word() {
ret void
}
double bot_vector_dot_3d(const double v1[3], const double v2[3]) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<bot_vector_dot_3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_vector_dot_3d>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bot_vector_dot_3d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @bot_vector_dot_3d(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
void ab9cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab9cdefghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void product(int var1, int var2) {
  int mult = 0;
  mult = var1 * var2;
  printf("Product is %d, when 1 added to both", mult);
}


x86 assembly (clang, -O0):
<product>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<product>:
imul   %edi,%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Product is %d, when 1 added to both\00"
define void @product(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Product is %d, when 1 added to both\00"
define void @product(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int fputc(int c, FILE *stream) {
  char str[2] = {(char)c, '\0'};
  return 0 == fputs(str, stream) ? c : -1;
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x12(%rbp)
movb   $0x0,-0x11(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputs@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    114f <fputc+0x3f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115c <fputc+0x4c>
mov    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    115c <fputc+0x4c>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %bl,0xe(%rsp)
movb   $0x0,0xf(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <fputs@plt>
neg    %rax
sbb    %eax,%eax
or     %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fputc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [2 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = trunc i32 %7 to i8
store i8 %8, i8* %6
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 0, i8* %9
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%11 = load i32*, i32** %4
%12 = call i64 @fputs(i8* %10, i32* %11)
%13 = icmp eq i64 0, %12
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = load i32, i32* %3
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %14
%18 = phi i32 [ %15, %14 ], [ -1, %16 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @fputc(i32 %0, i32* nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %0 to i8
store i8 %5, i8* %4
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %6
%7 = call i64 @fputs(i8* %4, i32* %1)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 %0, i32 -1
ret i32 %9
}
/* Variables and functions */
int data(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int an, idade;
  printf("Qual ano você nasceu?");
  scanf("%d", &an);
  idade = data(an);
  printf("%d", idade);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <data@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <data@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Qual ano voc\C3\AA nasceu?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @data(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Qual ano voc\C3\AA nasceu?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @data(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
unsigned long srnd(const unsigned int seed) { return (seed); }


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

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

LLVM IR (-O0):
define i64 @srnd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @srnd(i32 %0) {
%2 = zext i32 %0 to i64
ret i64 %2
}
/* Variables and functions */
int WIFSTOPPED(int);
int goose_WIFSTOPPED(int status) { return WIFSTOPPED(status); }


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

x86 assembly (clang, -O2):
<goose_WIFSTOPPED>:
jmp    1030 <WIFSTOPPED@plt>

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

LLVM IR (-O2):
define i32 @goose_WIFSTOPPED(i32 %0) {
%2 = tail call i32 @WIFSTOPPED(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *__parse_cap(char const *, int, int);
char *__tscroll(const char *cap, int n1, int n2) {
  return (__parse_cap(cap, n1, n2));
}


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

x86 assembly (clang, -O2):
<__tscroll>:
jmp    1030 <__parse_cap@plt>

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

LLVM IR (-O2):
define i8* @__tscroll(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @__parse_cap(i8* %0, i32 %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
unsigned long calculate_num_lines(char const *, char);
unsigned long new_num_lines(const char *atatline) {
  return calculate_num_lines(atatline, '+');
}


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

x86 assembly (clang, -O2):
<new_num_lines>:
mov    $0x2b,%esi
jmp    1030 <calculate_num_lines@plt>

LLVM IR (-O0):
define i64 @new_num_lines(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @calculate_num_lines(i8* %3, i8 signext 43)
ret i64 %4
}

LLVM IR (-O2):
define i64 @new_num_lines(i8* %0) {
%2 = tail call i64 @calculate_num_lines(i8* %0, i8 signext 43)
ret i64 %2
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *get_filename(const char *path) {
  const char *filename = strrchr(path, '/');
  if (filename == NULL)
    filename = path;
  else
    filename++;
  return filename;
}


x86 assembly (clang, -O0):
<get_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <get_filename+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <get_filename+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_filename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %2
store i8* %9, i8** %3
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @get_filename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
void *malloc(int);
void *LZ4_create() { return malloc((1 << 14)); }


x86 assembly (clang, -O0):
<LZ4_create>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4000,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_create>:
mov    $0x4000,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @LZ4_create() {
%1 = call i8* @malloc(i32 16384)
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @LZ4_create() {
%1 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  puts("hello world.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world.\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))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void writeRightTower(int n, int max) {
  printf("%i", n);
  if (n == max) {
    return;
  } else {
    writeRightTower(n + 1, max);
    printf("%i", n);
  }
}


x86 assembly (clang, -O0):
<writeRightTower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    114e <writeRightTower+0x2e>
jmp    116b <writeRightTower+0x4b>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1040 <writeRightTower@plt>
mov    -0x4(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeRightTower>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xed2(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    %ebp,%ebx
jne    1140 <writeRightTower+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0x1(%rbx),%edi
mov    %ebp,%esi
call   1040 <writeRightTower@plt>
lea    0xeaf(%rip),%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @writeRightTower(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 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %2
br label %17
11: ; preds = %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10, %11
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @writeRightTower(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = icmp eq i32 %0, %1
br i1 %4, label %5, label %6
5: ; preds = %2, %6
ret void
6: ; preds = %2
%7 = add nsw i32 %0, 1
tail call void @writeRightTower(i32 %7, i32 %1)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
}
void MirrorRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @MirrorRow_NEON() {
ret void
}
void sw_hiber(int force) {}


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

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

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

LLVM IR (-O2):
define void @sw_hiber(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void EPIFIFOConfig(unsigned long ulBase, unsigned long ulConfig) {
  DEBUG_ASSERT(ulBase == 0x400D0000);
  DEBUG_ASSERT(ulConfig == (ulConfig & 0x00030077));
  (*((volatile unsigned long *)(ulBase + 0x00000200))) = ulConfig;
}


x86 assembly (clang, -O0):
<EPIFIFOConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x400d0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x30077,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x200(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIFIFOConfig>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x400d0000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   $0xfffffffffffcff88,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %r14,0x200(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074593792
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = load i64, i64* %4
%11 = and i64 %10, 196727
%12 = icmp eq i64 %9, %11
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %4
%16 = load i64, i64* %3
%17 = add i64 %16, 512
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
ret void
}

LLVM IR (-O2):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = and i64 %1, 196727
%7 = icmp eq i64 %6, %1
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = add i64 %0, 512
%11 = inttoptr i64 %10 to i64*
store volatile i64 %1, i64* %11
ret void
}
void setval_241(unsigned *p) { *p = 2421745830U; }


x86 assembly (clang, -O0):
<setval_241>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x9058e8a6,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_241>:
movl   $0x9058e8a6,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_241(i32* nocapture writeonly %0) {
store i32 -1873221466, i32* %0
ret void
}
void test_error() {}


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

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

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

LLVM IR (-O2):
define void @test_error() {
ret void
}
void SUPERCRINKLE_init(void) {}


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

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

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

LLVM IR (-O2):
define void @SUPERCRINKLE_init() {
ret void
}
/* Type definitions */
struct aom_read_bit_buffer {
  int dummy;
};

/* Variables and functions */
scalar_t__ aom_rb_read_bit(struct aom_read_bit_buffer *);
int aom_rb_read_literal(struct aom_read_bit_buffer *, int);
int aom_rb_read_signed_literal(struct aom_read_bit_buffer *rb, int bits) {
  const int value = aom_rb_read_literal(rb, bits);
  return aom_rb_read_bit(rb) ? -value : value;
}


x86 assembly (clang, -O0):
<aom_rb_read_signed_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <aom_rb_read_literal@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <aom_rb_read_bit@plt>
cmp    $0x0,%rax
je     115e <aom_rb_read_signed_literal+0x3e>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <aom_rb_read_signed_literal+0x44>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aom_rb_read_signed_literal>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <aom_rb_read_literal@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <aom_rb_read_bit@plt>
mov    %ebp,%ecx
neg    %ecx
test   %rax,%rax
cmove  %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.aom_read_bit_buffer = type { i32 }
define i32 @aom_rb_read_signed_literal(%struct.aom_read_bit_buffer* %0, i32 %1) {
%3 = alloca %struct.aom_read_bit_buffer*
%4 = alloca i32
%5 = alloca i32
store %struct.aom_read_bit_buffer* %0, %struct.aom_read_bit_buffer** %3
store i32 %1, i32* %4
%6 = load %struct.aom_read_bit_buffer*, %struct.aom_read_bit_buffer** %3
%7 = load i32, i32* %4
%8 = call i32 @aom_rb_read_literal(%struct.aom_read_bit_buffer* %6, i32 %7)
store i32 %8, i32* %5
%9 = load %struct.aom_read_bit_buffer*, %struct.aom_read_bit_buffer** %3
%10 = call i64 @aom_rb_read_bit(%struct.aom_read_bit_buffer* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %5
%14 = sub nsw i32 0, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %12
%18 = phi i32 [ %14, %12 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
%struct.aom_read_bit_buffer = type { i32 }
define i32 @aom_rb_read_signed_literal(%struct.aom_read_bit_buffer* %0, i32 %1) {
%3 = tail call i32 @aom_rb_read_literal(%struct.aom_read_bit_buffer* %0, i32 %1)
%4 = tail call i64 @aom_rb_read_bit(%struct.aom_read_bit_buffer* %0)
%5 = icmp eq i64 %4, 0
%6 = sub nsw i32 0, %3
%7 = select i1 %5, i32 %3, i32 %6
ret i32 %7
}
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *xstrtok_r(char *str, const char *delim, char **ctx) {
  return strtok_r(str, delim, ctx);
}


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

x86 assembly (clang, -O2):
<xstrtok_r>:
jmp    1030 <strtok_r@plt>

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

LLVM IR (-O2):
define i8* @xstrtok_r(i8* %0, i8* nocapture %1, i8** %2) {
%4 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** %2)
ret i8* %4
}
unsigned invert(unsigned x, int p, int n) {
  return (x & (~0 << p + 1)) |
         (~(~0 << n) ^ (~(~0 << n) & (x >> (p + 1 - n)))) << (p + 1 - n) |
         (x & ~(~0 << (p + 1 - n)));
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%esi
shl    %cl,%esi
mov    %esi,%ecx
xor    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%esi
mov    -0x14(%rbp),%ecx
and    %esi,%ecx
xor    %ecx,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%r8d
add    $0x1,%esi
mov    $0xffffffff,%r9d
mov    %esi,%ecx
shl    %cl,%r9d
mov    $0xffffffff,%eax
mov    %r8d,%ecx
shl    %cl,%eax
sub    %edx,%esi
mov    %edi,%edx
mov    %esi,%ecx
shr    %cl,%edx
or     %eax,%edx
not    %edx
shl    %cl,%edx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
or     %r9d,%eax
and    %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = shl i32 -1, %9
%11 = and i32 %7, %10
%12 = load i32, i32* %6
%13 = shl i32 -1, %12
%14 = xor i32 %13, -1
%15 = load i32, i32* %6
%16 = shl i32 -1, %15
%17 = xor i32 %16, -1
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
%21 = load i32, i32* %6
%22 = sub nsw i32 %20, %21
%23 = lshr i32 %18, %22
%24 = and i32 %17, %23
%25 = xor i32 %14, %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %6
%29 = sub nsw i32 %27, %28
%30 = shl i32 %25, %29
%31 = or i32 %11, %30
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
%35 = load i32, i32* %6
%36 = sub nsw i32 %34, %35
%37 = shl i32 -1, %36
%38 = xor i32 %37, -1
%39 = and i32 %32, %38
%40 = or i32 %31, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = shl nsw i32 -1, %4
%6 = shl nsw i32 -1, %2
%7 = sub nsw i32 %4, %2
%8 = lshr i32 %0, %7
%9 = or i32 %8, %6
%10 = xor i32 %9, -1
%11 = shl i32 %10, %7
%12 = shl nsw i32 -1, %7
%13 = xor i32 %12, -1
%14 = or i32 %5, %13
%15 = and i32 %14, %0
%16 = or i32 %15, %11
ret i32 %16
}
/* Type definitions */
struct quat {
  int dummy;
};
struct mat4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quat_from_mat4(float *, float *);
__attribute__((always_)) struct quat *psquat_from_mat4(struct quat *result,
                                                       struct mat4 *a) {
  quat_from_mat4((float *)result, (float *)a);
  return result;
}


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

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

LLVM IR (-O0):
%struct.quat = type { i32 }
%struct.mat4 = type { i32 }
define %struct.quat* @psquat_from_mat4(%struct.quat* %0, %struct.mat4* %1) {
%3 = alloca %struct.quat*
%4 = alloca %struct.mat4*
store %struct.quat* %0, %struct.quat** %3
store %struct.mat4* %1, %struct.mat4** %4
%5 = load %struct.quat*, %struct.quat** %3
%6 = bitcast %struct.quat* %5 to float*
%7 = load %struct.mat4*, %struct.mat4** %4
%8 = bitcast %struct.mat4* %7 to float*
%9 = call i32 @quat_from_mat4(float* %6, float* %8)
%10 = load %struct.quat*, %struct.quat** %3
ret %struct.quat* %10
}

LLVM IR (-O2):
%struct.quat = type { i32 }
%struct.mat4 = type { i32 }
define %struct.quat* @psquat_from_mat4(%struct.quat* returned %0, %struct.mat4* %1) {
%3 = bitcast %struct.quat* %0 to float*
%4 = bitcast %struct.mat4* %1 to float*
%5 = tail call i32 @quat_from_mat4(float* %3, float* %4)
ret %struct.quat* %0
}
int main() {
  int i;
  int j;
  int k;
  i = 1;
  k = 0;
  while (k < 1000) {
    while (i < 100) {
      j = 100;
      while (j > 1)
        j = j - i;
      i = i + 1;
    }
    k = k - j;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3e8,-0x10(%rbp)
jge    1170 <main+0x70>
jmp    112b <main+0x2b>
cmpl   $0x64,-0x8(%rbp)
jge    1162 <main+0x62>
movl   $0x64,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1154 <main+0x54>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113c <main+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <main+0x2b>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
size_t base64_encoded_len(size_t raw_len) {
  return (((raw_len + 3 - 1) / 3) * 4);
}


x86 assembly (clang, -O0):
<base64_encoded_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3,%rax
sub    $0x1,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encoded_len>:
lea    0x2(%rdi),%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
lea    (%rdx,%rdx,1),%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i64 @base64_encoded_len(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 3
%5 = sub i64 %4, 1
%6 = udiv i64 %5, 3
%7 = mul i64 %6, 4
ret i64 %7
}

LLVM IR (-O2):
define i64 @base64_encoded_len(i64 %0) {
%2 = add i64 %0, 2
%3 = udiv i64 %2, 3
%4 = shl i64 %3, 2
ret i64 %4
}
int sl_isdigit(int c) { return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<sl_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <sl_isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sl_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @sl_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @sl_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void test() {
#pragma omp target parallel
  ;
}


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

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

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

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

/* Variables and functions */
int OK;
int /*<<< orphan*/ wclrtobot(int /*<<< orphan*/ *);
int /*<<< orphan*/ wmove(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int werase(WINDOW *win) {
  wmove(win, 0, 0);
  wclrtobot(win);
  return OK;
}


x86 assembly (clang, -O0):
<werase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <wmove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wclrtobot@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<werase>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1040 <wmove@plt>
mov    %rbx,%rdi
call   1030 <wclrtobot@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @werase(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wmove(i32* %3, i32 0, i32 0)
%5 = load i32*, i32** %2
%6 = call i32 @wclrtobot(i32* %5)
%7 = load i32, i32* @OK
ret i32 %7
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @werase(i32* %0) {
%2 = tail call i32 @wmove(i32* %0, i32 0, i32 0)
%3 = tail call i32 @wclrtobot(i32* %0)
%4 = load i32, i32* @OK
ret i32 %4
}
int main() { return ((1 + 1) + (1 + 1) + ((1 + 1) + (1 + 1) + (1 + 1))); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
int execute_io_cancel() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_io_cancel() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ VL_ScreenRect(int, int, int, int, int);
void VH_VLine(int y1, int y2, int x, int colour) {
  VL_ScreenRect(x, y1, 1, y2 - y1 + 1, colour);
}


x86 assembly (clang, -O0):
<VH_VLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%r8d
mov    $0x1,%edx
call   1030 <VL_ScreenRect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VH_VLine>:
mov    %ecx,%r8d
mov    %edi,%eax
sub    %edi,%esi
lea    0x1(%rsi),%ecx
mov    %edx,%edi
mov    %eax,%esi
mov    $0x1,%edx
jmp    1030 <VL_ScreenRect@plt>

LLVM IR (-O0):
define void @VH_VLine(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %5
%13 = sub nsw i32 %11, %12
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %8
%16 = call i32 @VL_ScreenRect(i32 %9, i32 %10, i32 1, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @VH_VLine(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = tail call i32 @VL_ScreenRect(i32 %2, i32 %0, i32 1, i32 %6, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fftw_free(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<fftw_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @fftw_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void test_conjl(_Complex long double ld) {
  if (conjl(ld) != conjl(ld))
    link_failure_conjl();
}


x86 assembly (clang, -O0):
<test_conjl>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fchs
fxch   %st(1)
fucomip %st(0),%st
setp   %al
fucomip %st(0),%st
setp   %cl
or     %cl,%al
test   $0x1,%al
jne    113a <test_conjl+0x2a>
jmp    1141 <test_conjl+0x31>
mov    $0x0,%al
call   1030 <link_failure_conjl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_conjl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jp     1121 <test_conjl+0x11>
ret
xor    %eax,%eax
jmp    1030 <link_failure_conjl@plt>

LLVM IR (-O0):
define void @test_conjl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = fneg x86_fp80 %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%8 = load x86_fp80, x86_fp80* %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%10 = load x86_fp80, x86_fp80* %9
%11 = fneg x86_fp80 %10
%12 = fcmp une x86_fp80 %3, %8
%13 = fcmp une x86_fp80 %6, %11
%14 = or i1 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = call i32 (...) @link_failure_conjl()
br label %17
17: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
define void @test_conjl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = fcmp uno x86_fp80 %3, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 (...) @link_failure_conjl()
br label %9
9: ; preds = %7, %1
ret void
}
RCU_DEF_INIT_FUNC(user_m5_init, param) {}


x86 assembly (clang, -O0):
<RCU_DEF_INIT_FUNC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @RCU_DEF_INIT_FUNC(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @RCU_DEF_INIT_FUNC(i32 %0, i32 %1) {
ret i32 undef
}