xunge/DecIR huggingface dataset:
/* Type definitions */
struct offscreen_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ render_gradient(struct offscreen_buffer *, int, int);
void render(struct offscreen_buffer *buffer, int xoffset, int yoffset) {
  render_gradient(buffer, xoffset, yoffset);
}


x86 assembly (clang, -O0):
<render>:
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 <render_gradient@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render>:
jmp    1030 <render_gradient@plt>

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

LLVM IR (-O2):
%struct.offscreen_buffer = type { i32 }
define void @render(%struct.offscreen_buffer* %0, i32 %1, i32 %2) {
%4 = tail call i32 @render_gradient(%struct.offscreen_buffer* %0, i32 %1, i32 %2)
ret void
}
void free_list_index_of(void) {}


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

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

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

LLVM IR (-O2):
define void @free_list_index_of() {
ret void
}
void ux500_ci_dbg_remove(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @ux500_ci_dbg_remove() {
ret void
}
void Msp430TimerCapComP__2__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__2__Compare__default__fired() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int main(void) {
  float c;
  float f = 27.0;
  c = (f - 32) / 1.8;
  printf("%f degrees Fahrenheit equals %f Celsius", f, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee5(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xecf(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movss  0xee0(%rip),%xmm0
movss  0xedc(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"%f degrees Fahrenheit equals %f Celsius\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.700000e+01, float* %3
%4 = load float, float* %3
%5 = fsub float %4, 3.200000e+01
%6 = fpext float %5 to double
%7 = fdiv double %6, 1.800000e+00
%8 = fptrunc double %7 to float
store float %8, float* %2
%9 = load float, float* %3
%10 = load float, float* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), float %9, float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"%f degrees Fahrenheit equals %f Celsius\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), float 2.700000e+01, float 0xC00638E380000000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_rwlock_rdlock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_rwlock_unlock(int /*<<< orphan*/ *);
int sync_get(pthread_rwlock_t *lock, int *var) {
  int tmp;
  pthread_rwlock_rdlock(lock);
  { tmp = *var; }
  pthread_rwlock_unlock(lock);
  return tmp;
}


x86 assembly (clang, -O0):
<sync_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_rwlock_rdlock@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_rwlock_unlock@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_get>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <pthread_rwlock_rdlock@plt>
mov    (%r14),%ebp
mov    %rbx,%rdi
call   1040 <pthread_rwlock_unlock@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sync_get(i32* %0, i32* nocapture %1) {
%3 = tail call i32 @pthread_rwlock_rdlock(i32* %0)
%4 = load i32, i32* %1
%5 = tail call i32 @pthread_rwlock_unlock(i32* %0)
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XUnmapEvent;

/* Variables and functions */
unsigned long get_XUnmapEvent_serial(void *_p) {
  return (unsigned long)((XUnmapEvent *)_p)->serial;
}


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

x86 assembly (clang, -O2):
<get_XUnmapEvent_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XUnmapEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XUnmapEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int end_tag(int, int /*<<< orphan*/);
int drv_end_tag(int p) { return end_tag(p, 0); }


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

x86 assembly (clang, -O2):
<drv_end_tag>:
xor    %esi,%esi
jmp    1030 <end_tag@plt>

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

LLVM IR (-O2):
define i32 @drv_end_tag(i32 %0) {
%2 = tail call i32 @end_tag(i32 %0, i32 0)
ret i32 %2
}
int fun(int a, int b, int c) {
  int lokalna = 10;
  return (a + b - c + lokalna);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
lea    (%rdi,%rsi,1),%eax
sub    %edx,%eax
add    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @fun(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
store i32 10, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @fun(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, 10
%5 = add i32 %4, %1
%6 = sub i32 %5, %2
ret i32 %6
}
void shiftdown(short int buffer[]) {
  int i;
  buffer[102] = 0;
  buffer[103] = 0;
  for (i = 0; i < 102; i++) {
    buffer[i] = buffer[i + 1];
  }
}


x86 assembly (clang, -O0):
<shiftdown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movw   $0x0,0xcc(%rax)
mov    -0x8(%rbp),%rax
movw   $0x0,0xce(%rax)
movl   $0x0,-0xc(%rbp)
cmpl   $0x66,-0xc(%rbp)
jge    115e <shiftdown+0x5e>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,2),%dx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <shiftdown+0x29>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiftdown>:
push   %rax
movl   $0x0,0xcc(%rdi)
lea    0x2(%rdi),%rsi
mov    $0xcc,%edx
call   1030 <memmove@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @shiftdown(i16* nocapture %0) {
%2 = bitcast i16* %0 to i8*
%3 = getelementptr inbounds i16, i16* %0, i64 102
store i16 0, i16* %3
%4 = getelementptr inbounds i16, i16* %0, i64 103
store i16 0, i16* %4
%5 = getelementptr i16, i16* %0, i64 1
%6 = bitcast i16* %5 to i8*
ret void
}
p1char(c) {
  if ((c & 0377) == 0200) {
    putchar('.');
    putchar('.');
    c = '.';
  }
  putchar(c);
}


x86 assembly (clang, -O0):
<p1char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
cmp    $0x80,%eax
jne    114d <p1char+0x3d>
mov    $0x2e,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    $0x2e,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
movl   $0x2e,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p1char>:
push   %rbx
mov    %edi,%ebx
cmp    $0x80,%bl
jne    1135 <p1char+0x25>
mov    $0x2e,%ebx
mov    $0x2e,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    $0x2e,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @p1char(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 255
%6 = icmp eq i32 %5, 128
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 46)
%9 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 46)
store i32 46, i32* %3
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %3
%12 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %11)
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @p1char(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 46)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 46)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ 46, %4 ], [ %0, %1 ]
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %8)
ret i32 undef
}
/* Variables and functions */
scalar_t__ malloc(int);
void main() {
  int **y;
  int *z;
  y = (int **)malloc(sizeof(int *));
  *y = (int *)0;
  int t = (*y != 0);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movq   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32**
%2 = alloca i32*
%3 = alloca i32
%4 = call i64 @malloc(i32 8)
%5 = inttoptr i64 %4 to i32**
store i32** %5, i32*** %1
%6 = load i32**, i32*** %1
store i32* null, i32** %6
%7 = load i32**, i32*** %1
%8 = load i32*, i32** %7
%9 = icmp ne i32* %8, null
%10 = zext i1 %9 to i32
store i32 %10, i32* %3
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to i32**
store i32* null, i32** %2
ret void
}
/* Variables and functions */
double fma(double volatile, double volatile, double volatile);
int /*<<< orphan*/ printf(char *, double volatile);
int main() {
  volatile double x1, y1, z1, w;
  x1 = 1 + 1e-15;
  y1 = 1 + 1e-15;
  z1 = 1;
  w = fma(x1, y1, z1);
  printf("%g\n", w);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1040 <fma@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x3ff0000000000005,%rax
mov    %rax,0x20(%rsp)
mov    %rax,0x18(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1040 <fma@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
store volatile double 0x3FF0000000000005, double* %1
store volatile double 0x3FF0000000000005, double* %2
store volatile double 1.000000e+00, double* %3
%5 = load volatile double, double* %1
%6 = load volatile double, double* %2
%7 = load volatile double, double* %3
%8 = call double @llvm.fma.f64(double %5, double %6, double %7)
store volatile double %8, double* %4
%9 = load volatile double, double* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
store volatile double 0x3FF0000000000005, double* %1
store volatile double 0x3FF0000000000005, double* %2
store volatile double 1.000000e+00, double* %3
%9 = load volatile double, double* %1
%10 = load volatile double, double* %2
%11 = load volatile double, double* %3
%12 = tail call double @llvm.fma.f64(double %9, double %10, double %11)
store volatile double %12, double* %4
%13 = load volatile double, double* %4
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
int getInfo(char *buf, int bufLen) {
  static const char *INFO = "info { name=Env }";
  int reqLen = strlen(INFO) + 1;
  if (buf != 0 && reqLen <= bufLen) {
    memcpy(buf, INFO, reqLen);
  }
  return reqLen;
}


x86 assembly (clang, -O0):
<getInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2efa(%rip),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116b <getInfo+0x4b>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     116b <getInfo+0x4b>
mov    -0x8(%rbp),%rdi
mov    0x2ecd(%rip),%rsi
mov    -0x10(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInfo>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
test   %rbx,%rbx
je     1154 <getInfo+0x34>
cmp    %r14d,%eax
jge    1154 <getInfo+0x34>
lea    0xeb6(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@getInfo.INFO = internal global i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0)
@.str = [18 x i8] c"info { name=Env }\00"
define i32 @getInfo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** @getInfo.INFO
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %20
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = load i8*, i8** @getInfo.INFO
%18 = load i32, i32* %5
%19 = call i32 @memcpy(i8* %16, i8* %17, i32 %18)
br label %20
20: ; preds = %15, %11, %2
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
@.str = [18 x i8] c"info { name=Env }\00"
define i32 @getInfo(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %3, 1
%5 = icmp ne i8* %0, null
%6 = icmp slt i32 %3, %1
%7 = select i1 %5, i1 %6, i1 false
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @memcpy(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %10
10: ; preds = %8, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lib_printf(char *);
void lib_new_line(void) { lib_printf("\n"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @lib_new_line() {
%1 = call i32 @lib_printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @lib_new_line() {
%1 = tail call i32 @lib_printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
void machine_drive_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @machine_drive_flush() {
ret void
}
int somarpar(int vet[], int n) {
  return n > 0 ? somarpar(vet, n - 1) + (vet[n] % 2 == 0 ? vet[n] : 0) : 0;
}


x86 assembly (clang, -O0):
<somarpar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1184 <somarpar+0x74>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <somarpar@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116a <somarpar+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
jmp    1174 <somarpar+0x64>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1174 <somarpar+0x64>
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    118e <somarpar+0x7e>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    118e <somarpar+0x7e>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<somarpar>:
test   %esi,%esi
jle    113f <somarpar+0x2f>
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x1(%rbx),%esi
call   1030 <somarpar@plt>
mov    %eax,%ecx
mov    %ebx,%eax
mov    (%r14,%rax,4),%edx
xor    %eax,%eax
test   $0x1,%dl
cmove  %edx,%eax
add    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @somarpar(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2, %6
%5 = phi i32 [ %15, %6 ], [ 0, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = tail call i32 @somarpar(i32* %0, i32 %7)
%9 = zext i32 %1 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = and i32 %11, 1
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i32 %11, i32 0
%15 = add nsw i32 %14, %8
br label %4
}
/* Variables and functions */
long long atoll(char const *);
long long int atoq(const char *string) { return atoll(string); }


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

x86 assembly (clang, -O2):
<atoq>:
jmp    1030 <atoll@plt>

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

LLVM IR (-O2):
define i64 @atoq(i8* nocapture %0) {
%2 = tail call i64 @atoll(i8* %0)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadu_si64(void const *);
__m128i test_mm_loadu_si64(void const *A) { return _mm_loadu_si64(A); }


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

x86 assembly (clang, -O2):
<test_mm_loadu_si64>:
jmp    1030 <_mm_loadu_si64@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ m162_init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ m163_reset();
int /*<<< orphan*/ printf(char *);
void m163_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
               uint32_t prgRAMsizeIn, uint8_t *chrROMin,
               uint32_t chrROMsizeIn) {
  m162_init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  m163_reset();
  printf("Mapper 163 protection regs inited\n");
}


x86 assembly (clang, -O0):
<m163_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <m162_init@plt>
mov    $0x0,%al
call   1030 <m163_reset@plt>
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m163_init>:
push   %rax
call   1050 <m162_init@plt>
xor    %eax,%eax
call   1030 <m163_reset@plt>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Mapper 163 protection regs inited\0A\00"
define void @m163_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @m162_init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @m163_reset()
%21 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Mapper 163 protection regs inited\00"
define void @m163_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @m162_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @m163_reset()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  int i = 1;
  switch (i) {
    printf("\nHello");
  case 1:
    printf("\none");
    break;
  case 2:
    printf("\ntwo");
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     114b <main+0x3b>
jmp    113a <main+0x2a>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     115c <main+0x4c>
jmp    1168 <main+0x58>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1168 <main+0x58>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0Aone\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_6Auint8_mem(unsigned char *val) {
  return ((*val) & (0x6A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Auint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x6a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Auint8_mem>:
testb  $0x6a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Auint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 106
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint8_t OH_handleExecuteRequest(uint32_t parameterType,
                                uint8_t *parameterBuffer, uint8_t *resultBuffer,
                                uint32_t *p_stackUse) {
  return 1;
}


x86 assembly (clang, -O0):
<OH_handleExecuteRequest>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OH_handleExecuteRequest(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
ret i32 1
}

LLVM IR (-O2):
define i32 @OH_handleExecuteRequest(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
ret i32 1
}
/* Type definitions */
struct winsize {
  int ws_row;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int ioctl(int, int /*<<< orphan*/, struct winsize *);
int winhi(void) {
  struct winsize win;
  int rows = 24;
  if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_row > 0)
    rows = win.ws_row;
  return rows;
}


x86 assembly (clang, -O0):
<winhi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x18,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
je     114f <winhi+0x3f>
cmpl   $0x0,-0x8(%rbp)
jle    114f <winhi+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<winhi>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1030 <ioctl@plt>
mov    (%rsp),%ecx
test   %ecx,%ecx
mov    $0x18,%edx
cmovle %edx,%ecx
cmp    $0xffffffff,%eax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @winhi() {
%1 = alloca %struct.winsize
%2 = alloca i32
store i32 24, i32* %2
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 1, i32 %3, %struct.winsize* %1)
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %13
6: ; preds = %0
%7 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%12 = load i32, i32* %11
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %6, %0
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @winhi() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 1, i32 %3, %struct.winsize* %1)
%5 = icmp ne i32 %4, -1
%6 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 0
%9 = select i1 %5, i1 %8, i1 false
%10 = select i1 %9, i32 %7, i32 24
ret i32 %10
}
/* Type definitions */
typedef int const GLfloat;

/* Variables and functions */
GLfloat DOT4(const GLfloat a[4], const GLfloat b[4]) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
}


x86 assembly (clang, -O0):
<DOT4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    -0x10(%rbp),%rdx
imul   0x4(%rdx),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
mov    -0x10(%rbp),%rdx
imul   0x8(%rdx),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0xc(%rcx),%ecx
mov    -0x10(%rbp),%rdx
imul   0xc(%rdx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DOT4>:
movdqu (%rdi),%xmm0
movdqu (%rsi),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @DOT4(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %7, %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = mul nsw i32 %14, %17
%19 = add nsw i32 %11, %18
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 2
%25 = load i32, i32* %24
%26 = mul nsw i32 %22, %25
%27 = add nsw i32 %19, %26
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 3
%30 = load i32, i32* %29
%31 = load i32*, i32** %4
%32 = getelementptr inbounds i32, i32* %31, i64 3
%33 = load i32, i32* %32
%34 = mul nsw i32 %30, %33
%35 = add nsw i32 %27, %34
ret i32 %35
}

LLVM IR (-O2):
define i32 @DOT4(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %0 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = bitcast i32* %1 to <4 x i32>*
%6 = load <4 x i32>, <4 x i32>* %5
%7 = mul nsw <4 x i32> %6, %4
%8 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void def_free_func(void *opaque, void *address) { (void)opaque, free(address); }


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

x86 assembly (clang, -O2):
<def_free_func>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @def_free_func(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
void xfs_cleanup_procfs(void) {}


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

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

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

LLVM IR (-O2):
define void @xfs_cleanup_procfs() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XmbTextPropertyToTextList() {
  printf("XmbTextPropertyToTextList called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"XmbTextPropertyToTextList called\0A\00"
define i32 @XmbTextPropertyToTextList() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"XmbTextPropertyToTextList called\00"
define i32 @XmbTextPropertyToTextList() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned int sv_get_ticks_per_second();
unsigned int vox_get_ticks_per_second() { return sv_get_ticks_per_second(); }


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

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

LLVM IR (-O0):
define i32 @vox_get_ticks_per_second() {
%1 = call i32 (...) @sv_get_ticks_per_second()
ret i32 %1
}

LLVM IR (-O2):
define i32 @vox_get_ticks_per_second() {
%1 = tail call i32 (...) @sv_get_ticks_per_second()
ret i32 %1
}
void EXTI2_IRQ_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @EXTI2_IRQ_Handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _logname_error(char const *message, int ret) {
  fputs("logname"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_logname_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_logname_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"logname: \00"
@stderr = global i32 0
define i32 @_logname_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"logname: \00"
@stderr = global i32 0
define i32 @_logname_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s[10] = {'\0'};
  s[0] = 71;
  s[1] = 65;
  s[2] = 89;
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
movb   $0x47,-0xe(%rbp)
movb   $0x41,-0xd(%rbp)
movb   $0x59,-0xc(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x11(%rsp)
movw   $0x4147,0xe(%rsp)
movb   $0x59,0x10(%rsp)
lea    0xec9(%rip),%rdi
lea    0xe(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
store i8 71, i8* %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
store i8 65, i8* %4
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 2
store i8 89, i8* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_char(long);
void output_str(char *s) {
  long n;
  n = 0;
output_str_j1:
  if (s[n] != 0) {
    output_char((long)s[n]);
    n = n + 1;
    goto output_str_j1;
  }
  return;
}


x86 assembly (clang, -O0):
<output_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <output_str+0x4c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbq (%rax,%rcx,1),%rdi
call   1030 <output_char@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <output_str+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_str>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1134 <output_str+0x24>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbq %al,%rdi
call   1030 <output_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <output_str+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @output_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i64 [ %9, %4 ], [ 0, %1 ]
%7 = sext i8 %5 to i64
%8 = tail call i32 @output_char(i64 %7)
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int do_test_with_offset(int /*<<< orphan*/);
int do_test(void) { return do_test_with_offset(0); }


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

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

LLVM IR (-O0):
define i32 @do_test() {
%1 = call i32 @do_test_with_offset(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @do_test() {
%1 = tail call i32 @do_test_with_offset(i32 0)
ret i32 %1
}
void __attribute__((no)) HEX00_parseutilsDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_parseutilsDatInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _phe_escape_html(char *, char const *, size_t);
void phe_escape_html(char *dst, const char *input, size_t input_size) {
  _phe_escape_html(dst, input, input_size);
}


x86 assembly (clang, -O0):
<phe_escape_html>:
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 <_phe_escape_html@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phe_escape_html>:
jmp    1030 <_phe_escape_html@plt>

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

LLVM IR (-O2):
define void @phe_escape_html(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_phe_escape_html(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
void print_str(const char *p) {
  for (; *p; p++)
    putchar(*p);
}


x86 assembly (clang, -O0):
<print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <print_str+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <print_str+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_str>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print_str+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print_str+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, size_t);
void uninitvar_strncpy(void) {
  char *s;
  char *ct;
  size_t n;
  (void)strncpy(s, ct, n);
}


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

x86 assembly (clang, -O2):
<uninitvar_strncpy>:
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @uninitvar_strncpy() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i64
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = call i32 @strncpy(i8* %4, i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strncpy() {
%1 = tail call i32 @strncpy(i8* undef, i8* undef, i64 undef)
ret void
}
int do_test(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @do_test() {
ret i32 0
}