xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int main() {
  puts("Hello there!");
  getchar();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello there!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello there!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct can_frame {
  int /*<<< orphan*/ *data;
};

/* Variables and functions */
int /*<<< orphan*/ byteorder(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void sdo_set_indicated_size(struct can_frame *frame, uint32_t size) {
  byteorder(&frame->data[4], &size, 4);
}


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

x86 assembly (clang, -O2):
<sdo_set_indicated_size>:
push   %rax
mov    %esi,0x4(%rsp)
mov    (%rdi),%rdi
add    $0x10,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <byteorder@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define void @sdo_set_indicated_size(%struct.can_frame* %0, i32 %1) {
%3 = alloca %struct.can_frame*
%4 = alloca i32
store %struct.can_frame* %0, %struct.can_frame** %3
store i32 %1, i32* %4
%5 = load %struct.can_frame*, %struct.can_frame** %3
%6 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 4
%9 = call i32 @byteorder(i32* %8, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define void @sdo_set_indicated_size(%struct.can_frame* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 4
%7 = call i32 @byteorder(i32* %6, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int access(char const *, int);
int fb_lfs_access(const char *path, int amode) { return (access(path, amode)); }


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

x86 assembly (clang, -O2):
<fb_lfs_access>:
jmp    1030 <access@plt>

LLVM IR (-O0):
define i32 @fb_lfs_access(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 = call i32 @access(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @fb_lfs_access(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @access(i8* %0, i32 %1)
ret i32 %3
}
double dot(const double *u, const double *v) {
  return u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
}


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

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

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

LLVM IR (-O2):
define double @dot(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t gg_fix32(uint32_t x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @gg_fix32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xf4() {
  Assert_real((isalnum(244) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1225, ("isalnum should be 0 for 0xf4"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xf4>:
push   %rax
mov    $0xf4,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf4\00"
define void @t_isalnum_0xf4() {
%1 = call i64 @isalnum(i32 244)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf4\00"
define void @t_isalnum_0xf4() {
%1 = tail call i64 @isalnum(i32 244)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo_1_2_2_2_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_2_1_1_1() {
ret void
}
void a_or(volatile int *p, int v) {
  __asm__("lock ; or %1, %0" : "=m"(*p) : "r"(v) : "memory");
}


x86 assembly (clang, -O0):
<a_or>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
lock or %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_or>:
lock or %esi,(%rdi)
ret

LLVM IR (-O0):
define void @a_or(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
ret void
}

LLVM IR (-O2):
define void @a_or(i32* %0, i32 %1) {
tail call void asm "lock ; or $1, $0", "=*m,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void halt_os_error(const char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<halt_os_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<halt_os_error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @halt_os_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @halt_os_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
scalar_t__ abs(float);
float max(float, int /*<<< orphan*/);
int /*<<< orphan*/ min(float, scalar_t__);
float fOpGroove(float a, float b, float ra, float rb) {
  return max(a, min(a + ra, rb - abs(b)));
}


x86 assembly (clang, -O0):
<fOpGroove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
movss  -0x1c(%rbp),%xmm1
movss  -0x18(%rbp),%xmm0
cvtsi2ss %rax,%xmm2
subss  %xmm2,%xmm1
cvttss2si %xmm1,%rdi
call   1040 <min@plt>
movss  -0x14(%rbp),%xmm0
mov    %eax,%edi
call   1050 <max@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fOpGroove>:
sub    $0x18,%rsp
movss  %xmm3,0x10(%rsp)
movss  %xmm0,0x14(%rsp)
addss  %xmm0,%xmm2
movss  %xmm2,0xc(%rsp)
movaps %xmm1,%xmm0
call   1030 <abs@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0x10(%rsp),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%rdi
movss  0xc(%rsp),%xmm0
call   1040 <min@plt>
movss  0x14(%rsp),%xmm0
mov    %eax,%edi
add    $0x18,%rsp
jmp    1050 <max@plt>

LLVM IR (-O0):
define float @fOpGroove(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %5
%11 = load float, float* %7
%12 = fadd float %10, %11
%13 = load float, float* %8
%14 = load float, float* %6
%15 = call i64 @abs(float %14)
%16 = sitofp i64 %15 to float
%17 = fsub float %13, %16
%18 = fptosi float %17 to i64
%19 = call i32 @min(float %12, i64 %18)
%20 = call float @max(float %9, i32 %19)
ret float %20
}

LLVM IR (-O2):
define float @fOpGroove(float %0, float %1, float %2, float %3) {
%5 = fadd float %0, %2
%6 = tail call i64 @abs(float %1)
%7 = sitofp i64 %6 to float
%8 = fsub float %3, %7
%9 = fptosi float %8 to i64
%10 = tail call i32 @min(float %5, i64 %9)
%11 = tail call float @max(float %0, i32 %10)
ret float %11
}
float float_mov(float v1, float *src, float *dst) {
  float v2 = *src;
  *dst = v2;
  return v2;
}


x86 assembly (clang, -O0):
<float_mov>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x1c(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_mov>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define float @float_mov(float %0, float* %1, float* %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
%7 = alloca float
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%8 = load float*, float** %5
%9 = load float, float* %8
store float %9, float* %7
%10 = load float, float* %7
%11 = load float*, float** %6
store float %10, float* %11
%12 = load float, float* %7
ret float %12
}

LLVM IR (-O2):
define float @float_mov(float %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = load float, float* %1
store float %4, float* %2
ret float %4
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_data_present(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x40)) == __cpu_to_le16(0x0008);
}


x86 assembly (clang, -O0):
<ieee80211_is_data_present>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x4c,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_data_present>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x4c,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x8,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_data_present(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 76)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 8)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_data_present(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 76)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 8)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int rand();
double randomf(double a, double b) {
  double aa;
  aa = ((double)(rand() % 10001)) / 10000.0;
  return a + (b - a) * aa;
}


x86 assembly (clang, -O0):
<randomf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x2711,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xec3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomf>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffffd1b1b919,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0xd,%ecx
add    %edx,%ecx
imul   $0x2711,%ecx,%ecx
sub    %ecx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  0xea9(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @randomf(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 10001
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 1.000000e+04
store double %9, double* %5
%10 = load double, double* %3
%11 = load double, double* %4
%12 = load double, double* %3
%13 = fsub double %11, %12
%14 = load double, double* %5
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double %10)
ret double %15
}

LLVM IR (-O2):
define double @randomf(double %0, double %1) {
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 10001
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.000000e+04
%7 = fsub double %1, %0
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double %0)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  printf("%ld\n", time(NULL));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int exact_square(int n) {
  int i;
  for (i = 0; i <= n; i++) {
    if (n == i * i)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114b <exact_square+0x4b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <exact_square+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1152 <exact_square+0x52>
jmp    113d <exact_square+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
test   %edi,%edi
js     1120 <exact_square+0x20>
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1123 <exact_square+0x23>
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 0, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
int main() {
  pid_t pid1 = fork();
  if (pid1 == 0) {
    printf("b\n");
  } else {
    pid_t pid2 = fork();
    if (pid2 == 0) {
      printf("c\n");
    } else {
      printf("a\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <main+0x36>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    118e <main+0x6e>
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117d <main+0x5d>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1189 <main+0x69>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    118e <main+0x6e>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
je     114b <main+0x2b>
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
lea    0xec4(%rip),%rax
lea    0xebb(%rip),%rdi
cmove  %rax,%rdi
jmp    1152 <main+0x32>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [2 x i8] c"a\00"
@str.3 = [2 x i8] c"c\00"
@str.4 = [2 x i8] c"b\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @fork()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
br label %7
7: ; preds = %3, %0
%8 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0), %0 ], [ %6, %3 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_mathematica_comment_entities();
void all_mathematica_tests() { test_mathematica_comment_entities(); }


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

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

LLVM IR (-O0):
define void @all_mathematica_tests() {
%1 = call i32 (...) @test_mathematica_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_mathematica_tests() {
%1 = tail call i32 (...) @test_mathematica_comment_entities()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(void *);
uint32_t hashInt(void *keyP, uint32_t tableSize) {
  assert(keyP);
  int *valueP = (int *)keyP;
  int result = (*valueP) / tableSize;
  if (result < 0)
    result += tableSize;
  return result;
}


x86 assembly (clang, -O0):
<hashInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1150 <hashInt+0x40>
mov    -0xc(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashInt>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%eax
cltd
idiv   %ebp
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ebp,%ecx
add    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hashInt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32, i32* %4
%14 = sdiv i32 %12, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i32, i32* %4
%19 = load i32, i32* %6
%20 = add nsw i32 %19, %18
store i32 %20, i32* %6
br label %21
21: ; preds = %17, %2
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
define i32 @hashInt(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = sdiv i32 %5, %1
%7 = icmp slt i32 %6, 0
%8 = select i1 %7, i32 %1, i32 0
%9 = add nsw i32 %8, %6
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ungetc(int, void *);
void f_reject(void *data, int ch) { ungetc(ch, data); }


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

x86 assembly (clang, -O2):
<f_reject>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <ungetc@plt>

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

LLVM IR (-O2):
define void @f_reject(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @ungetc(i32 %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(unsigned int, unsigned int *, unsigned int *,
                         unsigned int *, unsigned int *);
unsigned int cpuid_ebx(unsigned int op) {
  unsigned int eax, ebx, ecx, edx;
  cpuid(op, &eax, &ebx, &ecx, &edx);
  return ebx;
}


x86 assembly (clang, -O0):
<cpuid_ebx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_ebx>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_ebx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @cpuid(i32 %0, i32* %2, i32* %3, i32* %4, i32* %5)
%11 = load i32, i32* %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test() {
  printf("hello world!\n");
  return 5;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
define i32 @test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 5
}

LLVM IR (-O2):
@str = [13 x i8] c"hello world!\00"
define i32 @test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ __assert_fail();
int main(void) {
  int s__state = 1;
  int blastFlag = 1;
  while (1) {
    if (s__state == 1) {
    } else if (s__state == 2) {
      s__state = 3;
    } else if (s__state == 3) {
      if (blastFlag == 2) {
        blastFlag = 3;
      }
      s__state = 4;
    } else {
      if (blastFlag == 4) {
        __assert_fail();
        return -1;
      }
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    113c <main+0x2c>
jmp    11ac <main+0x9c>
cmpl   $0x2,-0x8(%rbp)
jne    1152 <main+0x42>
movl   $0x3,-0x8(%rbp)
jmp    11a7 <main+0x97>
cmpl   $0x3,-0x8(%rbp)
jne    1179 <main+0x69>
cmpl   $0x2,-0xc(%rbp)
jne    116d <main+0x5d>
movl   $0x3,-0xc(%rbp)
movl   $0x4,-0x8(%rbp)
jmp    11a2 <main+0x92>
cmpl   $0x4,-0xc(%rbp)
jne    1196 <main+0x86>
mov    $0x0,%al
call   1030 <__assert_fail@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b1 <main+0xa1>
movl   $0x0,-0x4(%rbp)
jmp    11b1 <main+0xa1>
jmp    11a7 <main+0x97>
jmp    11ac <main+0x9c>
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ trace_printk(char *, int, unsigned int, unsigned int,
                                unsigned int);
void tv_dramc(unsigned long long timestamp, int chann, unsigned int *value) {
  trace_printk(""
               "%x,%x,%x,%x\n",
               chann, value[0], value[1], value[2]);
}


x86 assembly (clang, -O0):
<tv_dramc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%r8d
lea    0xebe(%rip),%rdi
call   1030 <trace_printk@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_dramc>:
mov    (%rdx),%eax
mov    0x4(%rdx),%ecx
mov    0x8(%rdx),%r8d
lea    0xee0(%rip),%rdi
mov    %eax,%edx
jmp    1030 <trace_printk@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%x,%x,%x,%x\0A\00"
define void @tv_dramc(i64 %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %5
%8 = load i32*, i32** %6
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32, i32* %15
%17 = call i32 @trace_printk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %13, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%x,%x,%x,%x\0A\00"
define void @tv_dramc(i64 %0, i32 %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = getelementptr inbounds i32, i32* %2, i64 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %2, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @trace_printk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %4, i32 %6, i32 %8)
ret void
}
/* Type definitions */
typedef enum xprt_stat { ____Placeholder_xprt_stat } xprt_stat;
typedef int /*<<< orphan*/ SVCXPRT;

/* Variables and functions */
int XPRT_IDLE;
enum xprt_stat svcudp_stat(SVCXPRT *xprt) { return (XPRT_IDLE); }


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

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

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

LLVM IR (-O2):
@XPRT_IDLE = global i32 0
define i32 @svcudp_stat(i32* nocapture readnone %0) {
%2 = load i32, i32* @XPRT_IDLE
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ uartTx(char *, int);
void lcdMoveLeft() { uartTx("\xFE\x10", 2); }


x86 assembly (clang, -O0):
<lcdMoveLeft>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
call   1030 <uartTx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdMoveLeft>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
jmp    1030 <uartTx@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"\FE\10\00"
define void @lcdMoveLeft() {
%1 = tail call i32 @uartTx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *p = malloc(size);
  if (!p) {
    fprintf(stderr, "Virtual memory exhausted\n");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1170 <xmalloc+0x40>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1050 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Virtual memory exhausted\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Virtual memory exhausted\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int pthread_sigmask(int, int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int sigprocmask(int how, const sigset_t *set, sigset_t *oset) {
  return (pthread_sigmask(how, set, oset));
}


x86 assembly (clang, -O0):
<sigprocmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <pthread_sigmask@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigprocmask>:
jmp    1030 <pthread_sigmask@plt>

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

LLVM IR (-O2):
define i32 @sigprocmask(i32 %0, i32* %1, i32* %2) {
%4 = tail call i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2)
ret i32 %4
}
int ctoi(const char c) { return (c - '0'); }


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ctoi(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
ret i32 %5
}

LLVM IR (-O2):
define i32 @ctoi(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_print() {
  printf("\n\tHere is the hash table. The buckets are numbered in order "
         "followed by their entries and counts. Beneath each entry is a list "
         "of their next-words with their respective counts.\n\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [179 x i8] c"\0A\09Here is the hash table. The buckets are numbered in order followed by their entries and counts. Beneath each entry is a list of their next-words with their respective counts.\0A\0A\00"
define void @msg_print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [178 x i8] c"\0A\09Here is the hash table. The buckets are numbered in order followed by their entries and counts. Beneath each entry is a list of their next-words with their respective counts.\0A\00"
define void @msg_print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([178 x i8], [178 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vmi_set_lazy_mode(int);
void arch_leave_lazy_mmu_mode(void) { vmi_set_lazy_mode(0x00); }


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

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

LLVM IR (-O0):
define void @arch_leave_lazy_mmu_mode() {
%1 = call i32 @vmi_set_lazy_mode(i32 0)
ret void
}

LLVM IR (-O2):
define void @arch_leave_lazy_mmu_mode() {
%1 = tail call i32 @vmi_set_lazy_mode(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void foo(double d) {
  printf("%hhf", d);
  printf("%llf", d);
  printf("%zu", d);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%hhf\00"
@.str.1 = [5 x i8] c"%llf\00"
@.str.2 = [4 x i8] c"%zu\00"
define void @foo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %3)
%5 = load double, double* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%hhf\00"
@.str.1 = [5 x i8] c"%llf\00"
@.str.2 = [4 x i8] c"%zu\00"
define void @foo(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %0)
ret void
}
int security_inode_symlink(struct inode *dir, struct dentry *dentry,
                           const char *old_name) {
  return 0;
}


x86 assembly (clang, -O0):
<security_inode_symlink>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_symlink(%struct.inode* %0, %struct.dentry* %1, i8* %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.dentry*
%6 = alloca i8*
store %struct.inode* %0, %struct.inode** %4
store %struct.dentry* %1, %struct.dentry** %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_symlink(%struct.inode* nocapture readnone %0, %struct.dentry* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
struct instr {
  int dummy;
};

/* Variables and functions */
struct instr **labels_get_ptr(char *);
struct instr *labels_get(char *label) {
  struct instr **i = labels_get_ptr(label);
  if (i)
    return *i;
  return NULL;
}


x86 assembly (clang, -O0):
<labels_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <labels_get_ptr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1144 <labels_get+0x34>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    114c <labels_get+0x3c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labels_get>:
push   %rax
call   1030 <labels_get_ptr@plt>
test   %rax,%rax
je     1120 <labels_get+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.instr = type { i32 }
define %struct.instr* @labels_get(i8* %0) {
%2 = alloca %struct.instr*
%3 = alloca i8*
%4 = alloca %struct.instr**
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.instr** @labels_get_ptr(i8* %5)
store %struct.instr** %6, %struct.instr*** %4
%7 = load %struct.instr**, %struct.instr*** %4
%8 = icmp ne %struct.instr** %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load %struct.instr**, %struct.instr*** %4
%11 = load %struct.instr*, %struct.instr** %10
store %struct.instr* %11, %struct.instr** %2
br label %13
12: ; preds = %1
store %struct.instr* null, %struct.instr** %2
br label %13
13: ; preds = %12, %9
%14 = load %struct.instr*, %struct.instr** %2
ret %struct.instr* %14
}

LLVM IR (-O2):
%struct.instr = type { i32 }
define %struct.instr* @labels_get(i8* %0) {
%2 = tail call %struct.instr** @labels_get_ptr(i8* %0)
%3 = icmp eq %struct.instr** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = load %struct.instr*, %struct.instr** %2
br label %6
6: ; preds = %1, %4
%7 = phi %struct.instr* [ %5, %4 ], [ null, %1 ]
ret %struct.instr* %7
}
void ASN1_OCTET_STRING_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_OCTET_STRING_cmp() {
ret void
}
void gdk_drawable_get_clip_region() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drawable_get_clip_region() {
ret void
}
/* Variables and functions */
scalar_t__ exp(float);
float expf(float x) { return (float)exp(x); }


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

x86 assembly (clang, -O2):
<expf>:
push   %rax
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @expf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @exp(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @expf(float %0) {
%2 = tail call i64 @exp(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ be32toh(int /*<<< orphan*/);
uint32_t ReadBE32(const unsigned char *ptr) {
  return be32toh(*((uint32_t *)ptr));
}


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

x86 assembly (clang, -O2):
<ReadBE32>:
mov    (%rdi),%edi
jmp    1030 <be32toh@plt>

LLVM IR (-O0):
define i32 @ReadBE32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @be32toh(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ReadBE32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @be32toh(i32 %3)
ret i32 %4
}