xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_s16(scalar_t__);
scalar_t__ plcvm_lpm_u8();
int plcvm_pop();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_s2_cs8(void) {
  plcvm_push(plcvm_get_s16(plcvm_pop() * 2 + plcvm_lpm_u8()));
}


x86 assembly (clang, -O0):
<cb_ldm_s2_cs8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <plcvm_pop@plt>
shl    $0x1,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <plcvm_lpm_u8@plt>
mov    -0x8(%rbp),%rdi
add    %rax,%rdi
call   1050 <plcvm_get_s16@plt>
mov    %eax,%edi
call   1040 <plcvm_push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_s2_cs8>:
push   %rbx
xor    %eax,%eax
call   1030 <plcvm_pop@plt>
add    %eax,%eax
movslq %eax,%rbx
xor    %eax,%eax
call   1060 <plcvm_lpm_u8@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1050 <plcvm_get_s16@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_s2_cs8() {
%1 = call i32 (...) @plcvm_pop()
%2 = mul nsw i32 %1, 2
%3 = sext i32 %2 to i64
%4 = call i64 (...) @plcvm_lpm_u8()
%5 = add nsw i64 %3, %4
%6 = call i32 @plcvm_get_s16(i64 %5)
%7 = call i32 @plcvm_push(i32 %6)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_s2_cs8() {
%1 = tail call i32 (...) @plcvm_pop()
%2 = shl nsw i32 %1, 1
%3 = sext i32 %2 to i64
%4 = tail call i64 (...) @plcvm_lpm_u8()
%5 = add nsw i64 %4, %3
%6 = tail call i32 @plcvm_get_s16(i64 %5)
%7 = tail call i32 @plcvm_push(i32 %6)
ret void
}
int compare_double(void const *a, void const *b) {
  double const *pa = a;
  double const *pb = b;
  int res;
  if (*pa < *pb)
    res = -1;
  if (*pa == *pb)
    res = 0;
  if (*pa > *pb)
    res = 1;
  return res;
}


x86 assembly (clang, -O0):
<compare_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    113d <compare_double+0x3d>
movl   $0xffffffff,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1160 <compare_double+0x60>
jp     1160 <compare_double+0x60>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    117d <compare_double+0x7d>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
ucomisd %xmm1,%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rcx
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_double(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to double*
store double* %9, double** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to double*
store double* %11, double** %6
%12 = load double*, double** %5
%13 = load double, double* %12
%14 = load double*, double** %6
%15 = load double, double* %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %7
br label %18
18: ; preds = %17, %2
%19 = load double*, double** %5
%20 = load double, double* %19
%21 = load double*, double** %6
%22 = load double, double* %21
%23 = fcmp oeq double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 0, i32* %7
br label %25
25: ; preds = %24, %18
%26 = load double*, double** %5
%27 = load double, double* %26
%28 = load double*, double** %6
%29 = load double, double* %28
%30 = fcmp ogt double %27, %29
br i1 %30, label %31, label %32
31: ; preds = %25
store i32 1, i32* %7
br label %32
32: ; preds = %31, %25
%33 = load i32, i32* %7
ret i32 %33
}

LLVM IR (-O2):
define i32 @compare_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp une double %5, %6
%8 = sext i1 %7 to i32
%9 = fcmp ogt double %5, %6
%10 = select i1 %9, i32 1, i32 %8
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "V4L1 API is not configured!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"V4L1 API is not configured!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"V4L1 API is not configured!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW_MATRIX;
int /*<<< orphan*/ glGetFloatv(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glMultMatrixf(int /*<<< orphan*/ *);
void vGLMultiply(GLfloat mMatrix[16], GLfloat mMatrixA[16],
                 GLfloat mMatrixB[16]) {
  glMatrixMode(GL_MODELVIEW_MATRIX);
  glLoadIdentity();
  glMultMatrixf(mMatrixA);
  glMultMatrixf(mMatrixB);
  glGetFloatv(GL_MODELVIEW_MATRIX, mMatrix);
}


x86 assembly (clang, -O0):
<vGLMultiply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
mov    -0x10(%rbp),%rdi
call   1050 <glMultMatrixf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <glMultMatrixf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1060 <glGetFloatv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vGLMultiply>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    0x2e90(%rip),%r12
mov    (%r12),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
mov    %rbx,%rdi
call   1050 <glMultMatrixf@plt>
mov    %r14,%rdi
call   1050 <glMultMatrixf@plt>
mov    (%r12),%edi
mov    %r15,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1060 <glGetFloatv@plt>

LLVM IR (-O0):
@GL_MODELVIEW_MATRIX = global i32 0
define void @vGLMultiply(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* @GL_MODELVIEW_MATRIX
%8 = call i32 @glMatrixMode(i32 %7)
%9 = call i32 (...) @glLoadIdentity()
%10 = load i32*, i32** %5
%11 = call i32 @glMultMatrixf(i32* %10)
%12 = load i32*, i32** %6
%13 = call i32 @glMultMatrixf(i32* %12)
%14 = load i32, i32* @GL_MODELVIEW_MATRIX
%15 = load i32*, i32** %4
%16 = call i32 @glGetFloatv(i32 %14, i32* %15)
ret void
}

LLVM IR (-O2):
@GL_MODELVIEW_MATRIX = global i32 0
define void @vGLMultiply(i32* %0, i32* %1, i32* %2) {
%4 = load i32, i32* @GL_MODELVIEW_MATRIX
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @glMultMatrixf(i32* %1)
%8 = tail call i32 @glMultMatrixf(i32* %2)
%9 = load i32, i32* @GL_MODELVIEW_MATRIX
%10 = tail call i32 @glGetFloatv(i32 %9, i32* %0)
ret void
}
/* Type definitions */
typedef int x;
typedef int uint16_t;

/* Variables and functions */
uint16_t swap_uint16(uint16_t x) {
  return ((((x) >> 8) & 0xff) | (((x)&0xff) << 8));
}


x86 assembly (clang, -O0):
<swap_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_uint16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @swap_uint16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = and i32 %4, 255
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @swap_uint16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
int putenv(char *);
int octave_putenv_wrapper(char *str) { return putenv(str); }


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

x86 assembly (clang, -O2):
<octave_putenv_wrapper>:
jmp    1030 <putenv@plt>

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

LLVM IR (-O2):
define i32 @octave_putenv_wrapper(i8* %0) {
%2 = tail call i32 @putenv(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void empty_mapping(int32_t n, int32_t *a) {
  int32_t i;
  assert(n >= 0);
  for (i = 0; i < n; i++) {
    a[i] = -1;
  }
}


x86 assembly (clang, -O0):
<empty_mapping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1169 <empty_mapping+0x59>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movq   $0xffffffffffffffff,(%rax,%rcx,8)
ff
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113a <empty_mapping+0x2a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_mapping>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
shr    $0x3f,%rdi
xor    $0x1,%edi
call   1040 <assert@plt>
test   %rbx,%rbx
jle    114f <empty_mapping+0x2f>
shl    $0x3,%rbx
mov    %r14,%rdi
mov    $0xff,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @empty_mapping(i64 %0, i64* nocapture writeonly %1) {
%3 = lshr i64 %0, 63
%4 = trunc i64 %3 to i32
%5 = xor i32 %4, 1
%6 = tail call i32 @assert(i32 %5)
%7 = icmp sgt i64 %0, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = bitcast i64* %1 to i8*
%10 = shl nuw i64 %0, 3
br label %11
11: ; preds = %8, %2
ret void
}
void sysfs_delete_link(struct kobject *k, struct kobject *t, const char *name) {
}


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

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

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

LLVM IR (-O2):
%struct.kobject = type opaque
define void @sysfs_delete_link(%struct.kobject* nocapture %0, %struct.kobject* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WATCHDOG_ENABLER_RestoreConfig();
void WATCHDOG_ENABLER_Wakeup(void) { WATCHDOG_ENABLER_RestoreConfig(); }


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

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

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

LLVM IR (-O2):
define void @WATCHDOG_ENABLER_Wakeup() {
%1 = tail call i32 (...) @WATCHDOG_ENABLER_RestoreConfig()
ret void
}
void ptr_diddle(char *s) { ++s; }


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

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

LLVM IR (-O0):
define void @ptr_diddle(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i32 1
store i8* %4, i8** %2
ret void
}

LLVM IR (-O2):
define void @ptr_diddle(i8* nocapture %0) {
ret void
}
int f2(int i) {
  void *labs[2] = {&&lab1, &&lab2};
  goto *labs[i & 1];
lab1:
  return 1;
lab2:
  return 2;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    0x2d32(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2d2f(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cltq
mov    -0x20(%rbp,%rax,8),%rax
mov    %rax,-0x28(%rbp)
jmp    114b <f2+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1146 <f2+0x46>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret
mov    -0x28(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<f2>:
and    $0x1,%edi
lea    0x2d36(%rip),%rax
jmp    *(%rax,%rdi,8)
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret

LLVM IR (-O0):
@__const.f2.labs = [2 x i8*] [i8* blockaddress(@f2, %11), i8* blockaddress(@f2, %12)]
define i32 @f2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i8*]
store i32 %0, i32* %3
%5 = bitcast [2 x i8*]* %4 to i8*
%6 = load i32, i32* %3
%7 = and i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 %8
%10 = load i8*, i8** %9
br label %15
11: ; preds = %15
store i32 1, i32* %2
br label %13
12: ; preds = %15
store i32 2, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
15: ; preds = %1
%16 = phi i8* [ %10, %1 ]
indirectbr i8* %16, [label %11, label %12]
}

LLVM IR (-O2):
@__const.f2.labs = [2 x i8*] [i8* blockaddress(@f2, %7), i8* blockaddress(@f2, %6)]
define i32 @f2(i32 %0) {
%2 = and i32 %0, 1
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* @__const.f2.labs, i64 0, i64 %3
%5 = load i8*, i8** %4
indirectbr i8* %5, [label %7, label %6]
6: ; preds = %1
br label %7
7: ; preds = %1, %6
%8 = phi i32 [ 2, %6 ], [ 1, %1 ]
ret i32 %8
}
int icbrt_with_bits(a, bits)
int a;
int bits;
{ return icbrt_with_guess(a, a >> 2 * bits / 3); }


x86 assembly (clang, -O0):
<icbrt_with_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
sar    %cl,%esi
mov    $0x0,%al
call   1030 <icbrt_with_guess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icbrt_with_bits>:
add    %esi,%esi
movslq %esi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
shr    $0x20,%rcx
add    %eax,%ecx
mov    %edi,%esi
sar    %cl,%esi
xor    %eax,%eax
jmp    1030 <icbrt_with_guess@plt>

LLVM IR (-O0):
define i32 @icbrt_with_bits(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* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 2, %7
%9 = sdiv i32 %8, 3
%10 = ashr i32 %6, %9
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @icbrt_with_guess to i32 (i32, i32, ...)*)(i32 %5, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @icbrt_with_bits(i32 %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = sdiv i32 %3, 3
%5 = ashr i32 %0, %4
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @icbrt_with_guess to i32 (i32, i32, ...)*)(i32 %0, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ docfunctions(char *, char *);
void intfunc(char *filename) { docfunctions(filename, "-nofunction"); }


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

x86 assembly (clang, -O2):
<intfunc>:
lea    0xee9(%rip),%rsi
jmp    1030 <docfunctions@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"-nofunction\00"
define void @intfunc(i8* %0) {
%2 = tail call i32 @docfunctions(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
double Function_zero(double value, void *nullP) {
  assert(nullP == NULL);
  return 0.0;
}


x86 assembly (clang, -O0):
<Function_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Function_zero>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Function_zero(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @Function_zero(double %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_add(long *target, long value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_long_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_add(i64* %0, i64 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32
store i64* %0, i64** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_add(i64* nocapture readnone %0, i64 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
void USBUART_SOF_ISR(void) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<USBUART_SOF_ISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <USBUART_SOF_ISR+0x9>
jmp    110e <USBUART_SOF_ISR+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @USBUART_SOF_ISR() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @USBUART_SOF_ISR() {
ret void
}
void glutKeyboardFunc(void (*func)(unsigned char, int, int)) {}


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

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

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

LLVM IR (-O2):
define void @glutKeyboardFunc(void (i8, i32, i32)* nocapture %0) {
ret void
}
/* Variables and functions */
size_t fd_hash(const void *fd, const size_t len) { return *(int *)&fd; }


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

x86 assembly (clang, -O2):
<fd_hash>:
movslq %edi,%rax
ret

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

LLVM IR (-O2):
define i64 @fd_hash(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ delay_internal(int /*<<< orphan*/, unsigned int);
void delayMicroseconds(unsigned int us) { delay_internal(0, us); }


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

x86 assembly (clang, -O2):
<delayMicroseconds>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <delay_internal@plt>

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

LLVM IR (-O2):
define void @delayMicroseconds(i32 %0) {
%2 = tail call i32 @delay_internal(i32 0, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int s_issock(mode_t mode) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @s_issock(i32 %0) {
ret i32 -1
}
int id(void (*f)(void)) {
  f();
  ((void (*)(int))f)(10);
  return 10;
  return (20 + 1);
  return (int *)id;
}


x86 assembly (clang, -O0):
<id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
mov    $0xa,%edi
call   *-0x8(%rbp)
mov    $0xa,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id>:
push   %rbx
mov    %rdi,%rbx
call   *%rdi
mov    $0xa,%edi
call   *%rbx
mov    $0xa,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @id(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = load void ()*, void ()** %2
%5 = bitcast void ()* %4 to void (i32)*
ret i32 10
}

LLVM IR (-O2):
define i32 @id(void ()* nocapture %0) {
tail call void %0()
%2 = bitcast void ()* %0 to void (i32)*
tail call void %2(i32 10)
ret i32 10
}
void d2i_OCSP_RESPBYTES(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OCSP_RESPBYTES() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_north();
int /*<<< orphan*/ do_west();
void do_north_west_corner(void) {
  do_north();
  do_west();
}


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

x86 assembly (clang, -O2):
<do_north_west_corner>:
push   %rax
xor    %eax,%eax
call   1040 <do_north@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <do_west@plt>

LLVM IR (-O0):
define void @do_north_west_corner() {
%1 = call i32 (...) @do_north()
%2 = call i32 (...) @do_west()
ret void
}

LLVM IR (-O2):
define void @do_north_west_corner() {
%1 = tail call i32 (...) @do_north()
%2 = tail call i32 (...) @do_west()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_reading_test();
int /*<<< orphan*/ prefix_test();
int /*<<< orphan*/ simple_test();
int main(int argc, char *argv[]) {
  simple_test();
  prefix_test();
  file_reading_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <simple_test@plt>
mov    $0x0,%al
call   1040 <prefix_test@plt>
mov    $0x0,%al
call   1050 <file_reading_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @simple_test()
%7 = call i32 (...) @prefix_test()
%8 = call i32 (...) @file_reading_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @simple_test()
%4 = tail call i32 (...) @prefix_test()
%5 = tail call i32 (...) @file_reading_test()
ret i32 0
}
unsigned char parity_even_bit(unsigned char d) {
  int i, j = 0;
  for (i = 0; i < 8; i++)
    if (d & (1 << (i)))
      j++;
  return j & 1;
}


x86 assembly (clang, -O0):
<parity_even_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1159 <parity_even_bit+0x59>
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1146 <parity_even_bit+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <parity_even_bit+0x4b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <parity_even_bit+0x18>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity_even_bit>:
mov    %edi,%eax
and    $0x1,%al
mov    %edi,%ecx
shr    %cl
and    $0x1,%cl
add    %al,%cl
mov    %edi,%eax
shr    $0x2,%al
and    $0x1,%al
add    %cl,%al
mov    %edi,%ecx
shr    $0x3,%cl
and    $0x1,%cl
add    %al,%cl
mov    %edi,%eax
shr    $0x4,%al
add    %cl,%al
mov    %edi,%ecx
shr    $0x5,%cl
add    %al,%cl
mov    %edi,%eax
shr    $0x6,%al
add    %cl,%al
shr    $0x7,%dil
add    %dil,%al
and    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i8 @parity_even_bit(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = load i32, i32* %3
%12 = shl i32 1, %11
%13 = and i32 %10, %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %8
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %18
18: ; preds = %15, %8
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %5
22: ; preds = %5
%23 = load i32, i32* %4
%24 = and i32 %23, 1
%25 = trunc i32 %24 to i8
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @parity_even_bit(i8 zeroext %0) {
%2 = and i8 %0, 1
%3 = lshr i8 %0, 1
%4 = and i8 %3, 1
%5 = add nuw nsw i8 %4, %2
%6 = lshr i8 %0, 2
%7 = and i8 %6, 1
%8 = add nuw nsw i8 %7, %5
%9 = lshr i8 %0, 3
%10 = and i8 %9, 1
%11 = add nuw nsw i8 %10, %8
%12 = lshr i8 %0, 4
%13 = add nuw nsw i8 %12, %11
%14 = lshr i8 %0, 5
%15 = add nuw nsw i8 %14, %13
%16 = lshr i8 %0, 6
%17 = add nuw nsw i8 %16, %15
%18 = lshr i8 %0, 7
%19 = add nuw nsw i8 %18, %17
%20 = and i8 %19, 1
ret i8 %20
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_new_with_proplist() {
  printf("NOT IMPLEMENTED:"
         "pa_context_new_with_proplist"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"NOT IMPLEMENTED:pa_context_new_with_proplist\0A\00"
define i32 @pa_context_new_with_proplist() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [45 x i8] c"NOT IMPLEMENTED:pa_context_new_with_proplist\00"
define i32 @pa_context_new_with_proplist() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int test_imm_1Bint16_mem(short *val) {
  return ((*val) & (-0x1B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Bint16_mem>:
movzwl (%rdi),%eax
test   $0xffe5,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -27
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
remove(file) const char *file;
{ return (unlink(file)); }


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

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

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

LLVM IR (-O2):
define i32 @remove(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
unsigned callee_flat_u_noabs(unsigned bla) { return bla + 1; }


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

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

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

LLVM IR (-O2):
define i32 @callee_flat_u_noabs(i32 %0) {
%2 = add i32 %0, 1
ret i32 %2
}
void testfunc1() {}


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

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

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

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

/* Variables and functions */
unsigned int fputs(char *, int /*<<< orphan*/ *);
void puts_binding(ffi_cif *cif, unsigned int *ret, void *args[], FILE *stream) {
  *ret = fputs(*(char **)args[0], stream);
}


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

x86 assembly (clang, -O2):
<puts_binding>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdx),%rax
mov    (%rax),%rdi
mov    %rcx,%rsi
call   1030 <fputs@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @puts_binding(i32* %0, i32* %1, i8** %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8**
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8** %2, i8*** %7
store i32* %3, i32** %8
%9 = load i8**, i8*** %7
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
%14 = load i32*, i32** %8
%15 = call i32 @fputs(i8* %13, i32* %14)
%16 = load i32*, i32** %6
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @puts_binding(i32* nocapture readnone %0, i32* nocapture writeonly %1, i8** nocapture %2, i32* nocapture %3) {
%5 = bitcast i8** %2 to i8***
%6 = load i8**, i8*** %5
%7 = load i8*, i8** %6
%8 = tail call i32 @fputs(i8* %7, i32* %3)
store i32 %8, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int num(int a) {
  printf("a = %d\n", a);
  return a;
}


x86 assembly (clang, -O0):
<num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"a = %d\0A\00"
define i32 @num(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"a = %d\0A\00"
define i32 @num(i32 returned %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t xorshift(uint64_t *state) {
  uint64_t x = *state;
  x ^= x >> 12;
  x ^= x << 25;
  x ^= x >> 27;
  *state = x;
  return x * UINT64_C(2685821657736338717);
}


x86 assembly (clang, -O0):
<xorshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0xc,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x19,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1b,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x4f6cdd1d,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xorshift>:
push   %rbx
mov    (%rdi),%eax
mov    %eax,%ecx
sar    $0xc,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0x19,%eax
xor    %ecx,%eax
mov    %eax,%ebx
sar    $0x1b,%ebx
xor    %eax,%ebx
mov    %ebx,(%rdi)
mov    $0x4f6cdd1d,%edi
call   1030 <UINT64_C@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @xorshift(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = ashr i32 %6, 12
%8 = load i32, i32* %3
%9 = xor i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = shl i32 %10, 25
%12 = load i32, i32* %3
%13 = xor i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = ashr i32 %14, 27
%16 = load i32, i32* %3
%17 = xor i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = load i32*, i32** %2
store i32 %18, i32* %19
%20 = load i32, i32* %3
%21 = call i32 @UINT64_C(i32 1332534557)
%22 = mul nsw i32 %20, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @xorshift(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = ashr i32 %2, 12
%4 = xor i32 %3, %2
%5 = shl i32 %4, 25
%6 = xor i32 %5, %4
%7 = ashr i32 %6, 27
%8 = xor i32 %7, %6
store i32 %8, i32* %0
%9 = tail call i32 @UINT64_C(i32 1332534557)
%10 = mul nsw i32 %8, %9
ret i32 %10
}
void rop3_235_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = *D | stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_235_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_235_0_0>:
xor    %edx,%esi
not    %sil
or     %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_235_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %8
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_235_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, %2
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
store i8 %7, i8* %0
ret void
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "genfiles/insert_checks.c",
        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/insert_checks.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/insert_checks.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int yyerror() {
  printf("\nEntered expression is invalid!!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\0AEntered expression is invalid!!\0A\00"
define i32 @yyerror() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [33 x i8] c"\0AEntered expression is invalid!!\00"
define i32 @yyerror() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int func1(int in) { return in % 2; }


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
mov    %edi,%eax
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @func1(i32 %0) {
%2 = srem i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SX1257Reset();
int /*<<< orphan*/ SX1257SetSleep();
void SX1257Init(void) {
  SX1257Reset();
  SX1257SetSleep();
}


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

x86 assembly (clang, -O2):
<SX1257Init>:
push   %rax
xor    %eax,%eax
call   1030 <SX1257Reset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <SX1257SetSleep@plt>

LLVM IR (-O0):
define void @SX1257Init() {
%1 = call i32 (...) @SX1257Reset()
%2 = call i32 (...) @SX1257SetSleep()
ret void
}

LLVM IR (-O2):
define void @SX1257Init() {
%1 = tail call i32 (...) @SX1257Reset()
%2 = tail call i32 (...) @SX1257SetSleep()
ret void
}
double X_imp(int i, double K, double P) {
  double X;
  X = (K - (i % (int)P)) / (K - (i % (int)P) + 1);
  return X;
}


x86 assembly (clang, -O0):
<X_imp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x4(%rbp),%eax
cvttsd2si -0x18(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x4(%rbp),%eax
cvttsd2si -0x18(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm2
subsd  %xmm2,%xmm1
movsd  0xeb7(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<X_imp>:
mov    %edi,%eax
cvttsd2si %xmm1,%ecx
cltd
idiv   %ecx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
subsd  %xmm1,%xmm0
movsd  0xee4(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @X_imp(i32 %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %5
%9 = load i32, i32* %4
%10 = load double, double* %6
%11 = fptosi double %10 to i32
%12 = srem i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = fsub double %8, %13
%15 = load double, double* %5
%16 = load i32, i32* %4
%17 = load double, double* %6
%18 = fptosi double %17 to i32
%19 = srem i32 %16, %18
%20 = sitofp i32 %19 to double
%21 = fsub double %15, %20
%22 = fadd double %21, 1.000000e+00
%23 = fdiv double %14, %22
store double %23, double* %7
%24 = load double, double* %7
ret double %24
}

LLVM IR (-O2):
define double @X_imp(i32 %0, double %1, double %2) {
%4 = fptosi double %2 to i32
%5 = srem i32 %0, %4
%6 = sitofp i32 %5 to double
%7 = fsub double %1, %6
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %7, %8
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int ENOSYS;
int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock) { return -ENOSYS; }


x86 assembly (clang, -O0):
<pthread_rwlock_trywrlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_rwlock_trywrlock>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_rwlock_trywrlock(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printTooManyScalarsError() {
  fprintf(stderr, "Too many scalars in input; not enough files. (see -h)\n");
}


x86 assembly (clang, -O0):
<printTooManyScalarsError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTooManyScalarsError>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"Too many scalars in input; not enough files. (see -h)\0A\00"
define void @printTooManyScalarsError() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"Too many scalars in input; not enough files. (see -h)\0A\00"
define void @printTooManyScalarsError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}