xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
uint8_t rotateL_fun_uint8_t(uint8_t x, int32_t i) {
  if ((i %= 8) == 0)
    return x;
  return (x << i) | (x >> (8 - i));
}


x86 assembly (clang, -O0):
<rotateL_fun_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateL_fun_uint8_t+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rotateL_fun_uint8_t+0x48>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
mov    $0x8,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateL_fun_uint8_t>:
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
and    $0xfffffff8,%eax
sub    %eax,%esi
mov    %edi,%edx
mov    %esi,%ecx
shl    %cl,%edx
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
sar    %cl,%eax
or     %edx,%eax
test   %esi,%esi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @rotateL_fun_uint8_t(i32 %0, i32 %1) {
%3 = srem i32 %1, 8
%4 = icmp eq i32 %3, 0
%5 = shl i32 %0, %3
%6 = sub nsw i32 8, %3
%7 = ashr i32 %0, %6
%8 = or i32 %7, %5
%9 = select i1 %4, i32 %0, i32 %8
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef float int16_t;

/* Variables and functions */
uint16_t axis_to_pwm(int16_t value) {
  float value_fl = value;
  return (uint16_t)((value_fl - -32767.0f) / (32767.0f - -32767.0f) *
                        (1900.0f - 1100.0f) +
                    1100.0f);
}


x86 assembly (clang, -O0):
<axis_to_pwm>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xeec(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xedc(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec0(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<axis_to_pwm>:
addss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
mulss  0xef0(%rip),%xmm0
addss  0xeec(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @axis_to_pwm(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
store float %4, float* %3
%5 = load float, float* %3
%6 = fsub float %5, -3.276700e+04
%7 = fdiv float %6, 6.553400e+04
%8 = call float @llvm.fmuladd.f32(float %7, float 8.000000e+02, float 1.100000e+03)
%9 = fptosi float %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @axis_to_pwm(float %0) {
%2 = fadd float %0, 3.276700e+04
%3 = fdiv float %2, 6.553400e+04
%4 = tail call float @llvm.fmuladd.f32(float %3, float 8.000000e+02, float 1.100000e+03)
%5 = fptosi float %4 to i32
ret i32 %5
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t template_func(void *context) { return 0u; }


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

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

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

LLVM IR (-O2):
define i32 @template_func(i8* nocapture readnone %0) {
ret i32 0
}
void *return_pointer_0() { return (void *)42; }


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

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

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

LLVM IR (-O2):
define i8* @return_pointer_0() {
ret i8* inttoptr (i64 42 to i8*)
}
void aliyun_iot_common_log_init() {}


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

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

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

LLVM IR (-O2):
define void @aliyun_iot_common_log_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int build_minute() {
  int m;
  sscanf("16:19:17", "%*d:%d:%*d", &m);
  return m;
}


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

x86 assembly (clang, -O2):
<build_minute>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"16:19:17\00"
@.str.1 = [11 x i8] c"%*d:%d:%*d\00"
define i32 @build_minute() {
%1 = alloca i32
%2 = call i32 @sscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [9 x i8] c"16:19:17\00"
@.str.1 = [11 x i8] c"%*d:%d:%*d\00"
define i32 @build_minute() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ setlinebuf(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void bufferlines() {
  setlinebuf(stdout);
  return;
}


x86 assembly (clang, -O0):
<bufferlines>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <setlinebuf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufferlines>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <setlinebuf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @bufferlines() {
%1 = load i32, i32* @stdout
%2 = call i32 @setlinebuf(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @bufferlines() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setlinebuf(i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int checksum_nofold(void *, size_t, int);
uint16_t checksum_fold(void *data, size_t len, uint32_t sum) {
  sum = checksum_nofold(data, len, sum);
  while (sum > 0xFFFF)
    sum = (sum & 0xFFFF) + (sum >> 16);
  return ~sum;
}


x86 assembly (clang, -O0):
<checksum_fold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <checksum_nofold@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffff,-0x14(%rbp)
jle    115b <checksum_fold+0x4b>
mov    -0x14(%rbp),%eax
and    $0xffff,%eax
mov    -0x14(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <checksum_fold+0x26>
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checksum_fold>:
push   %rax
call   1030 <checksum_nofold@plt>
cmp    $0x10000,%eax
jl     112f <checksum_fold+0x1f>
nopl   (%rax)
movzwl %ax,%ecx
shr    $0x10,%eax
add    %ecx,%eax
cmp    $0xffff,%eax
ja     1120 <checksum_fold+0x10>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @checksum_fold(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call i32 @checksum_nofold(i8* %7, i64 %8, i32 %9)
store i32 %10, i32* %6
br label %11
11: ; preds = %14, %3
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 65535
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i32, i32* %6
%16 = and i32 %15, 65535
%17 = load i32, i32* %6
%18 = ashr i32 %17, 16
%19 = add nsw i32 %16, %18
store i32 %19, i32* %6
br label %11
20: ; preds = %11
%21 = load i32, i32* %6
%22 = xor i32 %21, -1
ret i32 %22
}

LLVM IR (-O2):
define i32 @checksum_fold(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @checksum_nofold(i8* %0, i64 %1, i32 %2)
%5 = icmp sgt i32 %4, 65535
br i1 %5, label %6, label %12
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ %4, %3 ]
%8 = and i32 %7, 65535
%9 = lshr i32 %7, 16
%10 = add nuw nsw i32 %8, %9
%11 = icmp ugt i32 %10, 65535
br i1 %11, label %6, label %12
12: ; preds = %6, %3
%13 = phi i32 [ %4, %3 ], [ %10, %6 ]
%14 = xor i32 %13, -1
ret i32 %14
}
void gdk_window_get_state() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_get_state() {
ret void
}
__attribute((always_)) int glm_sign(int val) {
  return ((val >> 31) - (-val >> 31));
}


x86 assembly (clang, -O0):
<glm_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glm_sign>:
mov    %edi,%ecx
sar    $0x1f,%ecx
xor    %eax,%eax
test   %edi,%edi
setg   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @glm_sign(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = load i32, i32* %2
%6 = sub nsw i32 0, %5
%7 = ashr i32 %6, 31
%8 = sub nsw i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @glm_sign(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp sgt i32 %0, 0
%4 = zext i1 %3 to i32
%5 = add nsw i32 %2, %4
ret i32 %5
}
void g_scanner_cur_token() {}


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

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

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

LLVM IR (-O2):
define void @g_scanner_cur_token() {
ret void
}
int m_min_int(int left, int right) { return (left < right) ? left : right; }


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

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

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

LLVM IR (-O2):
define i32 @m_min_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int genrand_int32();
double genrand_res53(void) {
  unsigned long a = genrand_int32() >> 5, b = genrand_int32() >> 6;
  return (((double)a) * 67108864.0 + ((double)b)) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<genrand_res53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %al,-0x11(%rbp)
call   1030 <genrand_int32@plt>
mov    %eax,%ecx
mov    -0x11(%rbp),%al
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    %rcx,-0x8(%rbp)
call   1030 <genrand_int32@plt>
sar    $0x6,%eax
cltq
mov    %rax,-0x10(%rbp)
movaps 0xeca(%rip),%xmm3
movq   -0x8(%rbp),%xmm0
punpckldq %xmm3,%xmm0
movapd 0xec9(%rip),%xmm2
subpd  %xmm2,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movq   -0x10(%rbp),%xmm1
punpckldq %xmm3,%xmm1
subpd  %xmm2,%xmm1
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe82(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe6a(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_res53>:
push   %rbx
xor    %eax,%eax
call   1030 <genrand_int32@plt>
sar    $0x5,%eax
movslq %eax,%rbx
xor    %eax,%eax
call   1030 <genrand_int32@plt>
sar    $0x6,%eax
cltq
movq   %rbx,%xmm1
movdqa 0xec9(%rip),%xmm2
punpckldq %xmm2,%xmm1
movapd 0xecd(%rip),%xmm3
subpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movq   %rax,%xmm1
punpckldq %xmm2,%xmm1
subpd  %xmm3,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  0xeb0(%rip),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  0xea8(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @genrand_res53() {
%1 = alloca i64
%2 = alloca i64
%3 = call i32 (...) @genrand_int32()
%4 = ashr i32 %3, 5
%5 = sext i32 %4 to i64
store i64 %5, i64* %1
%6 = call i32 (...) @genrand_int32()
%7 = ashr i32 %6, 6
%8 = sext i32 %7 to i64
store i64 %8, i64* %2
%9 = load i64, i64* %1
%10 = uitofp i64 %9 to double
%11 = load i64, i64* %2
%12 = uitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double %10, double 0x4190000000000000, double %12)
%14 = fmul double %13, 0x3CA0000000000000
ret double %14
}

LLVM IR (-O2):
define double @genrand_res53() {
%1 = tail call i32 (...) @genrand_int32()
%2 = ashr i32 %1, 5
%3 = sext i32 %2 to i64
%4 = tail call i32 (...) @genrand_int32()
%5 = ashr i32 %4, 6
%6 = sext i32 %5 to i64
%7 = uitofp i64 %3 to double
%8 = uitofp i64 %6 to double
%9 = tail call double @llvm.fmuladd.f64(double %7, double 0x4190000000000000, double %8)
%10 = fmul double %9, 0x3CA0000000000000
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int access(const char *pathname, mode_t mode) { return -1; }


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @access(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @access(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ lucas(int);
int /*<<< orphan*/ primes(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Nomerata na Lucas:\n");
  lucas(100);
  printf("\nDvoini Nechetni:\n");
  primes(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x64,%edi
call   1040 <lucas@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1050 <primes@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x64,%edi
call   1040 <lucas@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1050 <primes@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Nomerata na Lucas:\0A\00"
@.str.1 = [19 x i8] c"\0ADvoini Nechetni:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @lucas(i32 100)
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @primes(i32 10)
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Nomerata na Lucas:\00"
@str.2 = [18 x i8] c"\0ADvoini Nechetni:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @lucas(i32 100)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @primes(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *, char const *);
void TV_Module_Print(const char *msg) { Com_Printf("%s", msg); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @TV_Module_Print(i8* %0) {
%2 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(unsigned long, unsigned char, int);
int /*<<< orphan*/ GPIOPadConfigSet(unsigned long, unsigned char, int, int);
void GPIOPinTypeSSI(unsigned long ulPort, unsigned char ucPins) {
  ;
  GPIODirModeSet(ulPort, ucPins, 0x00000002);
  GPIOPadConfigSet(ulPort, ucPins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeSSI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%edx
movzbl -0x9(%rbp),%esi
call   1040 <GPIODirModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
mov    $0x8,%ecx
movzbl -0x9(%rbp),%esi
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeSSI>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

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

LLVM IR (-O2):
define void @GPIOPinTypeSSI(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @GPIODirModeSet(i64 %0, i8 zeroext %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i64 %0, i8 zeroext %1, i32 1, i32 8)
ret void
}
void XkbAllocCompatMap() {}


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

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

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

LLVM IR (-O2):
define void @XkbAllocCompatMap() {
ret void
}
int md5_test(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @md5_test() {
ret i32 2
}

LLVM IR (-O2):
define i32 @md5_test() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ glutSolidTorus(int, int, int, int);
void torus(void) { glutSolidTorus(10., 20., 20, 20); }


x86 assembly (clang, -O0):
<torus>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x14,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <glutSolidTorus@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<torus>:
mov    $0xa,%edi
mov    $0x14,%esi
mov    $0x14,%edx
mov    $0x14,%ecx
jmp    1030 <glutSolidTorus@plt>

LLVM IR (-O0):
define void @torus() {
%1 = call i32 @glutSolidTorus(i32 10, i32 20, i32 20, i32 20)
ret void
}

LLVM IR (-O2):
define void @torus() {
%1 = tail call i32 @glutSolidTorus(i32 10, i32 20, i32 20, i32 20)
ret void
}
/* Variables and functions */
int SIGILL;
int scalanative_libc_sigill() { return SIGILL; }


x86 assembly (clang, -O0):
<scalanative_libc_sigill>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_libc_sigill>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SIGILL = global i32 0
define i32 @scalanative_libc_sigill() {
%1 = load i32, i32* @SIGILL
ret i32 %1
}

LLVM IR (-O2):
@SIGILL = global i32 0
define i32 @scalanative_libc_sigill() {
%1 = load i32, i32* @SIGILL
ret i32 %1
}
int mystrlen(const char *s) {
  int result = 0;
  while (*s++)
    result++;
  return result;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <mystrlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mystrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
cmpb   $0x0,(%rdi)
je     111c <mystrlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <mystrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @mystrlen(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 i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
__attribute__((always_)) void reload_segments(unsigned short cs,
                                              unsigned short ds) {
  far_jmp(cs, (unsigned long)&&reload_cs);
reload_cs:
  __asm__ __volatile__("movw %0, %%ds\n"
                       "movw %0, %%es\n"
                       "movw %0, %%fs\n"
                       "movw %0, %%gs\n"
                       "movw %0, %%ss"
                       :
                       : "q"(ds));
}


x86 assembly (clang, -O0):
<reload_segments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%edi
xor    %eax,%eax
lea    0x5(%rip),%rsi
call   1030 <far_jmp@plt>
mov    -0x4(%rbp),%ax
mov    %eax,%ds
mov    %eax,%es
mov    %eax,%fs
mov    %eax,%gs
mov    %eax,%ss
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reload_segments>:
push   %rbx
mov    %esi,%ebx
lea    0x7(%rip),%rsi
xor    %eax,%eax
call   1030 <far_jmp@plt>
mov    %ebx,%ds
mov    %ebx,%es
mov    %ebx,%fs
mov    %ebx,%gs
mov    %ebx,%ss
pop    %rbx
ret

LLVM IR (-O0):
define void @reload_segments(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = call i32 (i32, i64, ...) bitcast (i32 (...)* @far_jmp to i32 (i32, i64, ...)*)(i32 %6, i64 ptrtoint (i8* blockaddress(@reload_segments, %8) to i64))
br label %8
8: ; preds = %2, %10
%9 = load i16, i16* %4
ret void
10: ; No predecessors!
indirectbr i8* undef, [label %8]
}

LLVM IR (-O2):
define void @reload_segments(i16 zeroext %0, i16 zeroext %1) {
%3 = zext i16 %0 to i32
%4 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @far_jmp to i32 (i32, i64, ...)*)(i32 %3, i64 ptrtoint (i8* blockaddress(@reload_segments, %5) to i64))
br label %5
5: ; preds = %2
tail call void asm sideeffect "movw $0, %ds\0Amovw $0, %es\0Amovw $0, %fs\0Amovw $0, %gs\0Amovw $0, %ss", "q,~{dirflag},~{fpsr},~{flags}"(i16 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __breakpoint__inv(size_t *);
size_t add2(size_t x) {
  ++x;
  __breakpoint__inv(&x);
  ++x;
  return x;
}


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

x86 assembly (clang, -O2):
<add2>:
push   %rax
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <__breakpoint__inv@plt>
mov    (%rsp),%rax
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @add2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1
store i64 %4, i64* %2
%5 = call i32 @__breakpoint__inv(i64* %2)
%6 = load i64, i64* %2
%7 = add i64 %6, 1
store i64 %7, i64* %2
%8 = load i64, i64* %2
ret i64 %8
}

LLVM IR (-O2):
define i64 @add2(i64 %0) {
%2 = alloca i64
%3 = add i64 %0, 1
store i64 %3, i64* %2
%4 = call i32 @__breakpoint__inv(i64* %2)
%5 = load i64, i64* %2
%6 = add i64 %5, 1
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ msm_ois_wait_time_ms(unsigned short);
void WitTim(unsigned short time_ms) { msm_ois_wait_time_ms(time_ms); }


x86 assembly (clang, -O0):
<WitTim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <msm_ois_wait_time_ms@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WitTim>:
jmp    1030 <msm_ois_wait_time_ms@plt>

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

LLVM IR (-O2):
define void @WitTim(i16 zeroext %0) {
%2 = tail call i32 @msm_ois_wait_time_ms(i16 zeroext %0)
ret void
}
/* Variables and functions */
int dist_rand(int, int, int, int, int);
int disk_rand() {
  int num = dist_rand(10, 50, 80, 95, 100);
  switch (num) {
  case 0:
    return 2048;
  case 1:
    return 50 * 1024;
  case 2:
    return 200 * 1024;
  case 3:
    return 500 * 1024;
  case 4:
    return 1000 * 1024;
  }
  return 2048;
}


x86 assembly (clang, -O0):
<disk_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x50,%edx
mov    $0x5f,%ecx
mov    $0x64,%r8d
call   1030 <dist_rand@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x4,%rax
ja     119b <disk_rand+0x8b>
mov    -0x10(%rbp),%rax
lea    0xeaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x800,-0x4(%rbp)
jmp    11a2 <disk_rand+0x92>
movl   $0xc800,-0x4(%rbp)
jmp    11a2 <disk_rand+0x92>
movl   $0x32000,-0x4(%rbp)
jmp    11a2 <disk_rand+0x92>
movl   $0x7d000,-0x4(%rbp)
jmp    11a2 <disk_rand+0x92>
movl   $0xfa000,-0x4(%rbp)
jmp    11a2 <disk_rand+0x92>
movl   $0x800,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_rand>:
push   %rax
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x50,%edx
mov    $0x5f,%ecx
mov    $0x64,%r8d
call   1030 <dist_rand@plt>
add    $0xffffffff,%eax
mov    $0x800,%ecx
cmp    $0x3,%eax
ja     1149 <disk_rand+0x39>
cltq
lea    0xeba(%rip),%rcx
mov    (%rcx,%rax,4),%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @disk_rand() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @dist_rand(i32 10, i32 50, i32 80, i32 95, i32 100)
store i32 %3, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %10 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
]
5: ; preds = %0
store i32 2048, i32* %1
br label %11
6: ; preds = %0
store i32 51200, i32* %1
br label %11
7: ; preds = %0
store i32 204800, i32* %1
br label %11
8: ; preds = %0
store i32 512000, i32* %1
br label %11
9: ; preds = %0
store i32 1024000, i32* %1
br label %11
10: ; preds = %0
store i32 2048, i32* %1
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@switch.table.disk_rand = [4 x i32] [i32 51200, i32 204800, i32 512000, i32 1024000]
define i32 @disk_rand() {
%1 = tail call i32 @dist_rand(i32 10, i32 50, i32 80, i32 95, i32 100)
%2 = add i32 %1, -1
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.disk_rand, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %0
%9 = phi i32 [ 2048, %0 ], [ %7, %4 ]
ret i32 %9
}
void rudder_center() {}


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

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

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

LLVM IR (-O2):
define void @rudder_center() {
ret void
}
void md_onsignal_exit() {}


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

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

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

LLVM IR (-O2):
define void @md_onsignal_exit() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ message_type;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xclient_message_type(void *_p) {
  return (unsigned long)((XEvent *)_p)->xclient.message_type;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xclient_message_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int testfunc7(void) {
  int a;
  int b;
}


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

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

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

LLVM IR (-O2):
define i32 @testfunc7() {
ret i32 undef
}
/* Variables and functions */
int random_main(int /*<<< orphan*/, int, char **);
int random_text_main(int argc, char **argv) {
  return random_main(0, argc, argv);
}


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

x86 assembly (clang, -O2):
<random_text_main>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <random_main@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void dump_packet(u_char *buf, int size) {
  int i;
  for (i = 0; i < size; ++i) {
    printf("%x ", buf[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <dump_packet+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <dump_packet+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_packet>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <dump_packet+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <dump_packet+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%x \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @dump_packet(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%x \00"
define void @dump_packet(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void *memset6(void *s, int c) { return __builtin_memset(s, c, 514); }


x86 assembly (clang, -O0):
<memset6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x202,%edx
movzbl %al,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset6>:
mov    $0x202,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define i8* @memset6(i8* returned writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
tail call void @llvm.memset.p0i8.i64(i8* align 1 dereferenceable(514) %0, i8 %3, i64 514, i1 false)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ test_strings();
int /*<<< orphan*/ tests_show_summary();
int main(void) {
  test_strings();
  tests_show_summary();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_strings@plt>
mov    $0x0,%al
call   1030 <tests_show_summary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_strings@plt>
xor    %eax,%eax
call   1030 <tests_show_summary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_strings()
%3 = call i32 (...) @tests_show_summary()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_strings()
%2 = tail call i32 (...) @tests_show_summary()
ret i32 0
}
int eq(int bc, int pc) {
  if (bc >= 'a' && bc <= 'z')
    bc -= 0x20;
  if (pc >= 'a' && pc <= 'z')
    pc -= 0x20;
  if (bc == pc)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <eq+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <eq+0x27>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x61,-0xc(%rbp)
jl     1144 <eq+0x44>
cmpl   $0x7a,-0xc(%rbp)
jg     1144 <eq+0x44>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    115c <eq+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <eq+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%eax
cmovae %edi,%ecx
lea    -0x61(%rsi),%eax
lea    -0x20(%rsi),%edx
cmp    $0x1a,%eax
cmovae %esi,%edx
xor    %eax,%eax
cmp    %edx,%ecx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @eq(i32 %0, i32 %1) {
%3 = add i32 %0, -97
%4 = icmp ult i32 %3, 26
%5 = add nsw i32 %0, -32
%6 = select i1 %4, i32 %5, i32 %0
%7 = add i32 %1, -97
%8 = icmp ult i32 %7, 26
%9 = add nsw i32 %1, -32
%10 = select i1 %8, i32 %9, i32 %1
%11 = icmp eq i32 %6, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ encrypt_block(void *, void const *);
void aes_encrypt(void *out, const void *in, size_t sz) {
  for (size_t i = 0; i < sz; i += 8) {
    encrypt_block(out, in);
    out += 8;
    in += 8;
  }
}


x86 assembly (clang, -O0):
<aes_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1170 <aes_encrypt+0x60>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <encrypt_block@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <aes_encrypt+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_encrypt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <aes_encrypt+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
lea    (%r14,%rbx,1),%rsi
call   1030 <encrypt_block@plt>
add    $0x8,%rbx
cmp    %r12,%rbx
jb     1130 <aes_encrypt+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @aes_encrypt(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %13, %6 ], [ 0, %3 ]
%8 = phi i8* [ %11, %6 ], [ %0, %3 ]
%9 = phi i8* [ %12, %6 ], [ %1, %3 ]
%10 = tail call i32 @encrypt_block(i8* %8, i8* %9)
%11 = getelementptr i8, i8* %8, i64 8
%12 = getelementptr i8, i8* %9, i64 8
%13 = add i64 %7, 8
%14 = icmp ult i64 %13, %2
br i1 %14, label %6, label %5
}
/* Variables and functions */
int partition(int *, int, int);
void sort(int *nums, int l, int r) {
  int i = partition(nums, l, r);
  if (l < i - 1)
    sort(nums, l, i - 1);
  if (r > i)
    sort(nums, i, r);
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1167 <sort+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <sort@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1182 <sort+0x62>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%ebp
mov    %rdi,%r14
jmp    1147 <sort+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%ebp
cmp    %r15d,%ebx
jge    1169 <sort+0x49>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
cmp    %ebp,%edx
jle    1140 <sort+0x20>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <sort@plt>
jmp    1140 <sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @sort(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 = load i32, i32* %6
%11 = call i32 @partition(i32* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sub nsw i32 %13, 1
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i32*, i32** %4
%27 = load i32, i32* %7
%28 = load i32, i32* %6
br label %29
29: ; preds = %25, %21
ret void
}

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %10, %3
%5 = phi i32 [ %1, %3 ], [ %6, %10 ]
%6 = tail call i32 @partition(i32* %0, i32 %5, i32 %2)
%7 = add nsw i32 %6, -1
%8 = icmp sgt i32 %7, %5
br i1 %8, label %9, label %10
9: ; preds = %4
tail call void @sort(i32* %0, i32 %5, i32 %7)
br label %10
10: ; preds = %9, %4
%11 = icmp slt i32 %6, %2
br i1 %11, label %4, label %12
12: ; preds = %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iexit();
int /*<<< orphan*/ iwrites(char *);
int main() {
  iwrites("Hello again!\n");
  iexit();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <iwrites@plt>
mov    $0x0,%al
call   1040 <iexit@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello again!\0A\00"
define i32 @main() {
%1 = call i32 @iwrites(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @iexit()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello again!\0A\00"
define i32 @main() {
%1 = tail call i32 @iwrites(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @iexit()
ret i32 0
}
void ptrace_sandbox_permit_connect(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_connect(%struct.pt_sandbox* nocapture %0) {
ret void
}