xunge/DecIR huggingface dataset:
/* Variables and functions */
double L0(double, double, double, double);
double L0_x(double, double, double, double);
double L1_x(double sign, double xi, double et, double qq) {
  double l0 = L0(sign, xi, et, qq);
  double l0_x = L0_x(sign, xi, et, qq);
  return l0 + xi * l0_x;
}


x86 assembly (clang, -O0):
<L1_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <L0@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <L0_x@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<L1_x>:
sub    $0x28,%rsp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <L0@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   1040 <L0_x@plt>
mulsd  (%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @L1_x(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 = load double, double* %7
%14 = load double, double* %8
%15 = call double @L0(double %11, double %12, double %13, double %14)
store double %15, double* %9
%16 = load double, double* %5
%17 = load double, double* %6
%18 = load double, double* %7
%19 = load double, double* %8
%20 = call double @L0_x(double %16, double %17, double %18, double %19)
store double %20, double* %10
%21 = load double, double* %9
%22 = load double, double* %6
%23 = load double, double* %10
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double %21)
ret double %24
}

LLVM IR (-O2):
define double @L1_x(double %0, double %1, double %2, double %3) {
%5 = tail call double @L0(double %0, double %1, double %2, double %3)
%6 = tail call double @L0_x(double %0, double %1, double %2, double %3)
%7 = tail call double @llvm.fmuladd.f64(double %1, double %6, double %5)
ret double %7
}
float __ocl_degrees_float(float radians) {
  return (180.0f / 0x1.921fb6p+1f) * radians;
}


x86 assembly (clang, -O0):
<__ocl_degrees_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_degrees_float>:
mulss  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @__ocl_degrees_float(float %0) {
%2 = fmul float %0, 0x404CA5DC00000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ mid_finger();
void chk_egg(int egg) {
  if (egg == 69) {
    mid_finger();
  } else if (egg == 420) {
    mid_finger();
  }
}


x86 assembly (clang, -O0):
<chk_egg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x45,-0x4(%rbp)
jne    1131 <chk_egg+0x21>
mov    $0x0,%al
call   1030 <mid_finger@plt>
jmp    114a <chk_egg+0x3a>
cmpl   $0x1a4,-0x4(%rbp)
jne    1145 <chk_egg+0x35>
mov    $0x0,%al
call   1030 <mid_finger@plt>
jmp    114a <chk_egg+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_egg>:
cmp    $0x1a4,%edi
je     111d <chk_egg+0xd>
cmp    $0x45,%edi
jne    1124 <chk_egg+0x14>
xor    %eax,%eax
jmp    1030 <mid_finger@plt>
ret

LLVM IR (-O0):
define void @chk_egg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 69
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @mid_finger()
br label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 420
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @mid_finger()
br label %12
12: ; preds = %10, %7
br label %13
13: ; preds = %12, %5
ret void
}

LLVM IR (-O2):
define void @chk_egg(i32 %0) {
switch i32 %0, label %4 [
i32 69, label %2
i32 420, label %2
]
2: ; preds = %1, %1
%3 = tail call i32 (...) @mid_finger()
br label %4
4: ; preds = %2, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ knn_full_thread(int, int, int, int, int, float const *,
                                   float const *, int /*<<< orphan*/ *, int *,
                                   float *, int, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *);
void nn_full(int d, int n, int nb, const float *v, const float *b, int nt,
             int *assign, float *dis) {
  knn_full_thread(2, n, nb, d, 1, b, v, NULL, assign, dis, nt, NULL, NULL);
}


x86 assembly (clang, -O0):
<nn_full>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x30(%rbp),%r9
mov    -0x28(%rbp),%rbx
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    -0x34(%rbp),%eax
mov    $0x2,%edi
mov    $0x1,%r8d
xor    %r14d,%r14d
mov    %rbx,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %eax,0x20(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x30(%rsp)
call   1030 <knn_full_thread@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_full>:
sub    $0x38,%rsp
mov    %r8,%r10
mov    %edi,%eax
movaps 0x40(%rsp),%xmm0
xorps  %xmm1,%xmm1
movups %xmm1,0x28(%rsp)
mov    %r9d,0x20(%rsp)
movups %xmm0,0x10(%rsp)
mov    %rcx,(%rsp)
movq   $0x0,0x8(%rsp)
mov    $0x2,%edi
mov    %eax,%ecx
mov    $0x1,%r8d
mov    %r10,%r9
call   1030 <knn_full_thread@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define void @nn_full(i32 %0, i32 %1, i32 %2, float* %3, float* %4, i32 %5, i32* %6, float* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = alloca i32
%15 = alloca i32*
%16 = alloca float*
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store float* %3, float** %12
store float* %4, float** %13
store i32 %5, i32* %14
store i32* %6, i32** %15
store float* %7, float** %16
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %9
%20 = load float*, float** %13
%21 = load float*, float** %12
%22 = load i32*, i32** %15
%23 = load float*, float** %16
%24 = load i32, i32* %14
%25 = call i32 @knn_full_thread(i32 2, i32 %17, i32 %18, i32 %19, i32 1, float* %20, float* %21, i32* null, i32* %22, float* %23, i32 %24, i32* null, i32* null)
ret void
}

LLVM IR (-O2):
define void @nn_full(i32 %0, i32 %1, i32 %2, float* %3, float* %4, i32 %5, i32* %6, float* %7) {
%9 = tail call i32 @knn_full_thread(i32 2, i32 %1, i32 %2, i32 %0, i32 1, float* %4, float* %3, i32* null, i32* %6, float* %7, i32 %5, i32* null, i32* null)
ret void
}
int TestRead(LinkId)
int LinkId;
{}


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

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

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

LLVM IR (-O2):
define i32 @TestRead(i32 %0) {
ret i32 undef
}
void foo236(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo236(i32 %0) {
ret void
}
/* Variables and functions */
int inb(int);
int /*<<< orphan*/ outb(int, int);
void smbus_wait_until_ready(void) {
  int loops;
  loops = 0;
  while (((inb(0x0500 + 0x0) & 1) == 1) && (loops <= (100 * 1000 * 10))) {
    outb(0x80, 0x80);
    ++loops;
  }
}


x86 assembly (clang, -O0):
<smbus_wait_until_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x500,%edi
call   1040 <inb@plt>
mov    %eax,%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x5(%rbp)
jne    1159 <smbus_wait_until_ready+0x39>
cmpl   $0xf4240,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1169 <smbus_wait_until_ready+0x49>
jmp    1183 <smbus_wait_until_ready+0x63>
mov    $0x80,%esi
mov    %esi,%edi
call   1030 <outb@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <smbus_wait_until_ready+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smbus_wait_until_ready>:
push   %rbx
mov    $0x500,%edi
call   1040 <inb@plt>
test   $0x1,%al
je     116a <smbus_wait_until_ready+0x4a>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x80,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x500,%edi
call   1040 <inb@plt>
test   $0x1,%al
je     116a <smbus_wait_until_ready+0x4a>
lea    0x1(%rbx),%eax
cmp    $0xf4240,%ebx
mov    %eax,%ebx
jb     1140 <smbus_wait_until_ready+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @smbus_wait_until_ready() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %11, %0
%3 = call i32 @inb(i32 1280)
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp sle i32 %7, 1000000
br label %9
9: ; preds = %6, %2
%10 = phi i1 [ false, %2 ], [ %8, %6 ]
br i1 %10, label %11, label %15
11: ; preds = %9
%12 = call i32 @outb(i32 128, i32 128)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %2
15: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @smbus_wait_until_ready() {
%1 = tail call i32 @inb(i32 1280)
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %7, %4 ], [ 0, %0 ]
%6 = tail call i32 @outb(i32 128, i32 128)
%7 = add nuw nsw i32 %5, 1
%8 = tail call i32 @inb(i32 1280)
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
%11 = icmp ult i32 %5, 1000000
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %4, label %13
13: ; preds = %4, %0
ret void
}
unsigned foo(unsigned a, unsigned b) { return (a ^ b) | a; }


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

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

LLVM IR (-O0):
define i32 @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
%6 = load i32, i32* %4
%7 = xor i32 %5, %6
%8 = load i32, i32* %3
%9 = or i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int LZ4_compress64kCtx(int /*<<< orphan*/ *, char *, char *, int);
int LZ4_compressCtx(int /*<<< orphan*/ *, char *, char *, int);
int LZ4_compress(char *source, char *dest, int isize) {
  if (isize < (int)((1U << 16) + ((8 + 4) - 1)))
    return LZ4_compress64kCtx(NULL, source, dest, isize);
  return LZ4_compressCtx(NULL, source, dest, isize);
}


x86 assembly (clang, -O0):
<LZ4_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x1000b,-0x1c(%rbp)
jge    115c <LZ4_compress+0x3c>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <LZ4_compress64kCtx@plt>
mov    %eax,-0x4(%rbp)
jmp    1173 <LZ4_compress+0x53>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
call   1040 <LZ4_compressCtx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compress>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
cmp    $0x1000a,%ecx
jg     1137 <LZ4_compress+0x17>
jmp    1030 <LZ4_compress64kCtx@plt>
jmp    1040 <LZ4_compressCtx@plt>

LLVM IR (-O0):
define i32 @LZ4_compress(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 65547
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @LZ4_compress64kCtx(i32* null, i8* %11, i8* %12, i32 %13)
store i32 %14, i32* %4
br label %20
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = call i32 @LZ4_compressCtx(i32* null, i8* %16, i8* %17, i32 %18)
store i32 %19, i32* %4
br label %20
20: ; preds = %15, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @LZ4_compress(i8* %0, i8* %1, i32 %2) {
%4 = icmp slt i32 %2, 65547
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @LZ4_compress64kCtx(i32* null, i8* %0, i8* %1, i32 %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @LZ4_compressCtx(i32* null, i8* %0, i8* %1, i32 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
char *create_error_response(int code, char *message) {
  return "HTTP/1.1 400 Not Found\r\n\r\n";
}


x86 assembly (clang, -O0):
<create_error_response>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"HTTP/1.1 400 Not Found\0D\0A\0D\0A\00"
define i8* @create_error_response(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [27 x i8] c"HTTP/1.1 400 Not Found\0D\0A\0D\0A\00"
define i8* @create_error_response(i32 %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int xor_l(int *, int *);
int intr_wrap_534(int p1, int p2) { return xor_l(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_534>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <xor_l@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_534>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <xor_l@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intr_wrap_534(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @xor_l(i32* %3, i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @intr_wrap_534(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @xor_l(i32* %3, i32* %4)
ret i32 %5
}
void av_pix_fmt_count_planes() {}


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

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

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

LLVM IR (-O2):
define void @av_pix_fmt_count_planes() {
ret void
}
int sata_parse_mcot(char *Temperature) {
  if (Temperature[88] != 0x80)
    return Temperature[88];
  else
    return 0;
}


x86 assembly (clang, -O0):
<sata_parse_mcot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x58(%rax),%eax
cmp    $0x80,%eax
je     112b <sata_parse_mcot+0x2b>
mov    -0x10(%rbp),%rax
movsbl 0x58(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <sata_parse_mcot+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sata_parse_mcot>:
movsbl 0x58(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @sata_parse_mcot(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 88
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
void finalize_matrix(unsigned int ***matrix, unsigned int y) {
  for (; y > 0; --y) {
    free((*matrix)[y - 1]);
  }
  free(*matrix);
  *matrix = 0;
}


x86 assembly (clang, -O0):
<finalize_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    114f <finalize_matrix+0x3f>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <finalize_matrix+0xf>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalize_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
je     1133 <finalize_matrix+0x23>
mov    %esi,%ebx
nopl   (%rax)
mov    (%r14),%rax
mov    -0x8(%rax,%rbx,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <finalize_matrix+0x10>
mov    (%r14),%rdi
call   1030 <free@plt>
movq   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @finalize_matrix(i32*** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %9, %6 ]
%8 = load i32**, i32*** %0
%9 = add nsw i64 %7, -1
%10 = getelementptr inbounds i32*, i32** %8, i64 %9
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = icmp eq i64 %9, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = bitcast i32*** %0 to i8**
%16 = load i8*, i8** %15
tail call void @free(i8* %16)
store i32** null, i32*** %0
ret void
}
int __esp_enabled() { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @__esp_enabled() {
ret i32 -1
}
void dummyaudio_AiLenChanged(void) { return; }


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

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

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

LLVM IR (-O2):
define void @dummyaudio_AiLenChanged() {
ret void
}
void XwcTextExtents() {}


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

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

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

LLVM IR (-O2):
define void @XwcTextExtents() {
ret void
}
int XHeightOfScreen() {}


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

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

LLVM IR (-O0):
define i32 @XHeightOfScreen() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XHeightOfScreen() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_pawn_defenders_from_west(int);
void w_pawn_defenders_from_west_test(void **state) {
  assert_int_equal(0x0000000000080000ul,
                   w_pawn_defenders_from_west(0x0000000010080000ul));
}


x86 assembly (clang, -O0):
<w_pawn_defenders_from_west_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x10080000,%edi
call   1030 <w_pawn_defenders_from_west@plt>
mov    %eax,%esi
mov    $0x80000,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_pawn_defenders_from_west_test>:
push   %rax
mov    $0x10080000,%edi
call   1030 <w_pawn_defenders_from_west@plt>
mov    $0x80000,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @w_pawn_defenders_from_west_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_pawn_defenders_from_west(i32 268959744)
%4 = call i32 @assert_int_equal(i32 524288, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_pawn_defenders_from_west_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_pawn_defenders_from_west(i32 268959744)
%3 = tail call i32 @assert_int_equal(i32 524288, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *,
                           char *);
void fprintf_string(FILE *s, char *m1, char *x, char *m2) {
  fprintf(s, "%s = \"%s\"%s", m1, x, m2);
}


x86 assembly (clang, -O0):
<fprintf_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprintf_string>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s = \22%s\22%s\00"
define void @fprintf_string(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s = \22%s\22%s\00"
define void @fprintf_string(i32* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_world() {
  printf("Hello Pythonista! This string is brought to you from C.\n");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"Hello Pythonista! This string is brought to you from C.\0A\00"
define void @hello_world() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [56 x i8] c"Hello Pythonista! This string is brought to you from C.\00"
define void @hello_world() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
ret void
}
float maths_clip(float input_value, float clip_value) {
  if (input_value > clip_value)
    return clip_value;
  if (input_value < -clip_value)
    return -clip_value;
  return input_value;
}


x86 assembly (clang, -O0):
<maths_clip>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    112c <maths_clip+0x2c>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <maths_clip+0x72>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
ucomiss %xmm1,%xmm0
jbe    1168 <maths_clip+0x68>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1172 <maths_clip+0x72>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<maths_clip>:
movaps 0xef9(%rip),%xmm3
xorps  %xmm1,%xmm3
maxss  %xmm0,%xmm3
movaps %xmm1,%xmm2
cmpltss %xmm0,%xmm2
movaps %xmm2,%xmm0
andnps %xmm3,%xmm0
andps  %xmm1,%xmm2
orps   %xmm0,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @maths_clip(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %5
store float %10, float* %3
br label %21
11: ; preds = %2
%12 = load float, float* %4
%13 = load float, float* %5
%14 = fneg float %13
%15 = fcmp olt float %12, %14
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load float, float* %5
%18 = fneg float %17
store float %18, float* %3
br label %21
19: ; preds = %11
%20 = load float, float* %4
store float %20, float* %3
br label %21
21: ; preds = %19, %16, %9
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @maths_clip(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = fneg float %1
%5 = fcmp ogt float %4, %0
%6 = select i1 %5, float %4, float %0
%7 = select i1 %3, float %1, float %6
ret float %7
}
void resched_cpu(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @resched_cpu(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ xisupper(int);
int xtolower(int c) { return ((xisupper(c)) ? (c | ('a' - 'A')) : c); }


x86 assembly (clang, -O0):
<xtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <xisupper@plt>
cmp    $0x0,%rax
je     113b <xtolower+0x2b>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <xtolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <xisupper@plt>
mov    %ebx,%ecx
or     $0x20,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @xtolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @xisupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @xtolower(i32 %0) {
%2 = tail call i64 @xisupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = or i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int parent(int i) { return i % 2 == 0 ? i / 2 - 1 : i / 2; }


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1131 <parent+0x31>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <parent+0x3f>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
mov    %edi,%ecx
and    $0x1,%ecx
sar    %eax
add    %ecx,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @parent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 2
%9 = sub nsw i32 %8, 1
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 2
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @parent(i32 %0) {
%2 = and i32 %0, 1
%3 = sdiv i32 %0, 2
%4 = add nsw i32 %2, -1
%5 = add nsw i32 %3, %4
ret i32 %5
}
int mini(int a, int b, int c) {
  int min;
  if (a <= b && a <= c)
    min = a;
  if (b <= a && b <= c)
    min = b;
  if (c <= a && c <= b)
    min = c;
  return min;
}


x86 assembly (clang, -O0):
<mini>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     112b <mini+0x2b>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     112b <mini+0x2b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1149 <mini+0x49>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1149 <mini+0x49>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1167 <mini+0x67>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1167 <mini+0x67>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mini>:
cmp    %edx,%esi
mov    %esi,%ecx
cmovg  %edi,%ecx
cmp    %edi,%esi
cmovg  %edi,%ecx
cmp    %esi,%edx
mov    %edx,%eax
cmovg  %ecx,%eax
cmp    %edi,%edx
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mini(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load i32, i32* %4
%13 = load i32, i32* %6
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %4
store i32 %16, i32* %7
br label %17
17: ; preds = %15, %11, %3
%18 = load i32, i32* %5
%19 = load i32, i32* %4
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = icmp sle i32 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load i32, i32* %5
store i32 %26, i32* %7
br label %27
27: ; preds = %25, %21, %17
%28 = load i32, i32* %6
%29 = load i32, i32* %4
%30 = icmp sle i32 %28, %29
br i1 %30, label %31, label %37
31: ; preds = %27
%32 = load i32, i32* %6
%33 = load i32, i32* %5
%34 = icmp sle i32 %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = load i32, i32* %6
store i32 %36, i32* %7
br label %37
37: ; preds = %35, %31, %27
%38 = load i32, i32* %7
ret i32 %38
}

LLVM IR (-O2):
define i32 @mini(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %0
%5 = icmp sgt i32 %1, %2
%6 = or i1 %4, %5
%7 = select i1 %6, i32 %0, i32 %1
%8 = icmp sgt i32 %2, %0
%9 = icmp sgt i32 %2, %1
%10 = or i1 %8, %9
%11 = select i1 %10, i32 %7, i32 %2
ret i32 %11
}
/* Variables and functions */
int check_highlight_bound(size_t height, int opt_l, size_t line_num) {
  if (opt_l && line_num >= height) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_highlight_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1133 <check_highlight_bound+0x33>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1133 <check_highlight_bound+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <check_highlight_bound+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_highlight_bound>:
test   %esi,%esi
setne  %al
cmp    %rdi,%rdx
setae  %cl
and    %al,%cl
movzbl %cl,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @check_highlight_bound(i64 %0, i32 %1, i64 %2) {
%4 = icmp ne i32 %1, 0
%5 = icmp uge i64 %2, %0
%6 = and i1 %4, %5
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_ctr();
void spr_read_ctr(void *opaque, int sprn) { gen_op_load_ctr(); }


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

x86 assembly (clang, -O2):
<spr_read_ctr>:
xor    %eax,%eax
jmp    1030 <gen_op_load_ctr@plt>

LLVM IR (-O0):
define void @spr_read_ctr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @gen_op_load_ctr()
ret void
}

LLVM IR (-O2):
define void @spr_read_ctr(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_load_ctr()
ret void
}
void ol_backend_kelvin_neilb_uninit(struct ol_backend_kelvin_s *self) {
  (void)(self);
}


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

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

LLVM IR (-O0):
%struct.ol_backend_kelvin_s = type opaque
define void @ol_backend_kelvin_neilb_uninit(%struct.ol_backend_kelvin_s* %0) {
%2 = alloca %struct.ol_backend_kelvin_s*
store %struct.ol_backend_kelvin_s* %0, %struct.ol_backend_kelvin_s** %2
%3 = load %struct.ol_backend_kelvin_s*, %struct.ol_backend_kelvin_s** %2
ret void
}

LLVM IR (-O2):
%struct.ol_backend_kelvin_s = type opaque
define void @ol_backend_kelvin_neilb_uninit(%struct.ol_backend_kelvin_s* nocapture %0) {
ret void
}
/* Variables and functions */
int omp_get_active_level();
int omp_get_level();
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
void level3(int parent) {
#pragma omp parallel num_threads(2)
  {
#pragma omp critical
    printf("L3: parent %d, thread %d / %d, level %d (nested regions %d)\n",
           parent, omp_get_thread_num(), omp_get_num_threads(),
           omp_get_active_level(), omp_get_level());
  }
}


x86 assembly (clang, -O0):
<level3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <omp_get_active_level@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <omp_get_level@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    %eax,%r9d
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<level3>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <omp_get_active_level@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <omp_get_level@plt>
lea    0xe7c(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"L3: parent %d, thread %d / %d, level %d (nested regions %d)\0A\00"
define void @level3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @omp_get_thread_num()
%5 = call i32 (...) @omp_get_num_threads()
%6 = call i32 (...) @omp_get_active_level()
%7 = call i32 (...) @omp_get_level()
%8 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"L3: parent %d, thread %d / %d, level %d (nested regions %d)\0A\00"
define void @level3(i32 %0) {
%2 = tail call i32 (...) @omp_get_thread_num()
%3 = tail call i32 (...) @omp_get_num_threads()
%4 = tail call i32 (...) @omp_get_active_level()
%5 = tail call i32 (...) @omp_get_level()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2, i32 %3, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ strncat(char *, char const *, size_t);
size_t trio_length(char *);
__attribute__((visibility("default"))) int
trio_append_max(char *target, size_t max, const char *source) {
  size_t length;
  assert(target);
  assert(source);
  length = trio_length(target);
  if (max > length) {
    strncat(target, source, max - length - 1);
  }
  return (!(1 == 0));
}


x86 assembly (clang, -O0):
<trio_append_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <trio_length@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    118a <trio_append_max+0x5a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
sub    -0x20(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncat@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_append_max>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <trio_length@plt>
cmp    %r15,%rax
jae    116c <trio_append_max+0x3c>
not    %rax
add    %r15,%rax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <strncat@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @trio_append_max(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @assert(i8* %0)
%5 = tail call i32 @assert(i8* %2)
%6 = tail call i64 @trio_length(i8* %0)
%7 = icmp ult i64 %6, %1
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = xor i64 %6, -1
%10 = add i64 %9, %1
%11 = tail call i32 @strncat(i8* %0, i8* %2, i64 %10)
br label %12
12: ; preds = %8, %3
ret i32 1
}
/* Variables and functions */
unsigned int readl(void *);
int /*<<< orphan*/ writel(unsigned int, void *);
void apq_clear_gpio_bits(unsigned n, void *addr) {
  writel(readl(addr) & ~n, addr);
}


x86 assembly (clang, -O0):
<apq_clear_gpio_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <readl@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apq_clear_gpio_bits>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <readl@plt>
not    %ebp
and    %eax,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <writel@plt>

LLVM IR (-O0):
define void @apq_clear_gpio_bits(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @readl(i8* %5)
%7 = load i32, i32* %3
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = load i8*, i8** %4
%11 = call i32 @writel(i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @apq_clear_gpio_bits(i32 %0, i8* %1) {
%3 = tail call i32 @readl(i8* %1)
%4 = xor i32 %0, -1
%5 = and i32 %3, %4
%6 = tail call i32 @writel(i32 %5, i8* %1)
ret void
}
void XInitThreads() {}


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

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

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

LLVM IR (-O2):
define void @XInitThreads() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
char *print_text(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *in = "hiya";
  char *out = (char *)malloc(20 * sizeof(char));
  printf("%zu\n", print_text(in, out));
  printf("%s\n", in);
  free(out);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x14,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <print_text@plt>
mov    %rax,%rsi
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x14,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xea8(%rip),%r14
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <print_text@plt>
lea    0xe9b(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
lea    0xe91(%rip),%rdi
mov    %r14,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"hiya\00"
@.str.1 = [5 x i8] c"%zu\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = call i64 @malloc(i32 20)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i8* @print_text(i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 @free(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"hiya\00"
@.str.1 = [5 x i8] c"%zu\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 20)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i8* @print_text(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
double pow(double, double);
double omegaK(double x) { return pow(x, -1.5); }


x86 assembly (clang, -O0):
<omegaK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omegaK>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @omegaK(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double -1.500000e+00)
ret double %4
}

LLVM IR (-O2):
define double @omegaK(double %0) {
%2 = tail call double @pow(double %0, double -1.500000e+00)
ret double %2
}
/* Type definitions */
struct zint_symbol {
  int dummy;
};

/* Variables and functions */
int render_plot(struct zint_symbol *, float, float);
int ZBarcode_Render(struct zint_symbol *symbol, float width, float height) {
  return render_plot(symbol, width, height);
}


x86 assembly (clang, -O0):
<ZBarcode_Render>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1030 <render_plot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZBarcode_Render>:
jmp    1030 <render_plot@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define i32 @ZBarcode_Render(%struct.zint_symbol* %0, float %1, float %2) {
%4 = alloca %struct.zint_symbol*
%5 = alloca float
%6 = alloca float
store %struct.zint_symbol* %0, %struct.zint_symbol** %4
store float %1, float* %5
store float %2, float* %6
%7 = load %struct.zint_symbol*, %struct.zint_symbol** %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call i32 @render_plot(%struct.zint_symbol* %7, float %8, float %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define i32 @ZBarcode_Render(%struct.zint_symbol* %0, float %1, float %2) {
%4 = tail call i32 @render_plot(%struct.zint_symbol* %0, float %1, float %2)
ret i32 %4
}