xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
void f24(long j) {
  if ((j & ((1UL << (24)) - 1)) >= ((1UL << ((24) - 1)) + 2))
    abort();
}


x86 assembly (clang, -O0):
<f24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffff,%rax
cmp    $0x800002,%rax
jb     1139 <f24+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f24>:
and    $0xfffffe,%edi
cmp    $0x800002,%edi
jae    111f <f24+0xf>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f24(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 16777215
%5 = icmp uge i64 %4, 8388610
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f24(i64 %0) {
%2 = and i64 %0, 16777214
%3 = icmp ugt i64 %2, 8388609
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
void VecSelfScalarMult3fv(float v[3], float s) {
  v[0] *= s;
  v[1] *= s;
  v[2] *= s;
}


x86 assembly (clang, -O0):
<VecSelfScalarMult3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSelfScalarMult3fv>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSelfScalarMult3fv(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = fmul float %8, %5
store float %9, float* %7
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = fmul float %13, %10
store float %14, float* %12
%15 = load float, float* %4
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i64 2
%18 = load float, float* %17
%19 = fmul float %18, %15
store float %19, float* %17
ret void
}

LLVM IR (-O2):
define void @VecSelfScalarMult3fv(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fmul float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fmul float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fmul float %9, %1
store float %10, float* %8
ret void
}
int main(void) {
  _Exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <_Exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <_Exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
tail call void @_Exit(i32 0)
unreachable
}
/* Variables and functions */
char *strrchr(char *, char);
char *mybasename(char *s) {
  char *p;
  if ((p = strrchr(s, '/')) != NULL)
    p++;
  else
    p = s;
  return p;
}


x86 assembly (clang, -O0):
<mybasename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1149 <mybasename+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1151 <mybasename+0x41>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mybasename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mybasename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void gperfctr_init(void) {}


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

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

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

LLVM IR (-O2):
define void @gperfctr_init() {
ret void
}
void bla1() {
  struct XXX;
  int XXX;
}


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

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

LLVM IR (-O0):
define void @bla1() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @bla1() {
ret void
}
float glmComputeVectorLength3fPow2(const float v[3]) {
  return v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
}


x86 assembly (clang, -O0):
<glmComputeVectorLength3fPow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorLength3fPow2>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @glmComputeVectorLength3fPow2(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
ret float %9
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ gen(int *, int *, int, int, int, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int *, int *, int);
void gen_129539(uint8_t *b, uint32_t *buflen) {
  gen(b, buflen, 8, 129539, 2, 0, 0);
  uint8_t sentence[] = {0x79, 0xd3, 0x57, 0x00, 0x83, 0x00, 0xff, 0x7f};
  memcpy(&b[10], sentence, 8);
  *buflen = 18;
}


x86 assembly (clang, -O0):
<gen_129539>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
mov    $0x1fa03,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1040 <gen@plt>
mov    0xea2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x28,%rdi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movl   $0x12,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_129539>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movl   $0x0,(%rsp)
mov    $0x8,%edx
mov    $0x1fa03,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
call   1040 <gen@plt>
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
add    $0x28,%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movl   $0x12,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.gen_129539.sentence = [8 x i32] [i32 121, i32 211, i32 87, i32 0, i32 131, i32 0, i32 255, i32 127]
define void @gen_129539(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [8 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = call i32 @gen(i32* %6, i32* %7, i32 8, i32 129539, i32 2, i32 0, i32 0)
%9 = bitcast [8 x i32]* %5 to i8*
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 10
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%13 = call i32 @memcpy(i32* %11, i32* %12, i32 8)
%14 = load i32*, i32** %4
store i32 18, i32* %14
ret void
}

LLVM IR (-O2):
@__const.gen_129539.sentence = [8 x i32] [i32 121, i32 211, i32 87, i32 0, i32 131, i32 0, i32 255, i32 127]
define void @gen_129539(i32* %0, i32* %1) {
%3 = alloca [8 x i32]
%4 = tail call i32 @gen(i32* %0, i32* %1, i32 8, i32 129539, i32 2, i32 0, i32 0)
%5 = bitcast [8 x i32]* %3 to i8*
%6 = getelementptr inbounds i32, i32* %0, i64 10
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 @memcpy(i32* %6, i32* %7, i32 8)
store i32 18, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _prop_request_change(int, int *, int);
int /*<<< orphan*/ msleep(int);
void gui_uilock(int x) {
  int unlocked = 0x41000000;
  _prop_request_change(0x80020009, &unlocked, 4);
  msleep(200);
  _prop_request_change(0x80020009, &x, 4);
  msleep(200);
}


x86 assembly (clang, -O0):
<gui_uilock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x41000000,-0x8(%rbp)
mov    $0x80020009,%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <_prop_request_change@plt>
mov    $0xc8,%edi
call   1030 <msleep@plt>
mov    $0x80020009,%edi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1040 <_prop_request_change@plt>
mov    $0xc8,%edi
call   1030 <msleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_uilock>:
push   %rax
mov    %edi,0x4(%rsp)
movl   $0x41000000,(%rsp)
mov    %rsp,%rsi
mov    $0x80020009,%edi
mov    $0x4,%edx
call   1040 <_prop_request_change@plt>
mov    $0xc8,%edi
call   1030 <msleep@plt>
lea    0x4(%rsp),%rsi
mov    $0x80020009,%edi
mov    $0x4,%edx
call   1040 <_prop_request_change@plt>
mov    $0xc8,%edi
call   1030 <msleep@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @gui_uilock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1090519040, i32* %3
%4 = call i32 @_prop_request_change(i32 -2147352567, i32* %3, i32 4)
%5 = call i32 @msleep(i32 200)
%6 = call i32 @_prop_request_change(i32 -2147352567, i32* %2, i32 4)
%7 = call i32 @msleep(i32 200)
ret void
}

LLVM IR (-O2):
define void @gui_uilock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
store i32 1090519040, i32* %3
%5 = call i32 @_prop_request_change(i32 -2147352567, i32* %3, i32 4)
%6 = call i32 @msleep(i32 200)
%7 = call i32 @_prop_request_change(i32 -2147352567, i32* %2, i32 4)
%8 = call i32 @msleep(i32 200)
ret void
}
/* Type definitions */
typedef scalar_t__ __v8hi;
typedef scalar_t__ __m128i;

/* Variables and functions */
__m128i __attribute__((__always___, __nodebug__))
_mm_cmpeq_epi16(__m128i a, __m128i b) {
  return (__m128i)((__v8hi)a == (__v8hi)b);
}


x86 assembly (clang, -O0):
<_mm_cmpeq_epi16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cmpeq_epi16>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @_mm_cmpeq_epi16(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @_mm_cmpeq_epi16(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ airSingleSscanf(char const *, char *, double *);
double airAtod(const char *str) {
  double val = 0.0;
  airSingleSscanf(str, "%lf", &val);
  return val;
}


x86 assembly (clang, -O0):
<airAtod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <airSingleSscanf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airAtod>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rsi
mov    %rsp,%rdx
call   1030 <airSingleSscanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @airAtod(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
store double 0.000000e+00, double* %3
%4 = load i8*, i8** %2
%5 = call i32 @airSingleSscanf(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @airAtod(i8* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%4 = call i32 @airSingleSscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
ret double %5
}
int yywrap() { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @yywrap() {
ret i32 1
}
int emac1_ifoutdiscards_set(unsigned int dev_id,
                            union emac1_ifoutdiscards_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac1_ifoutdiscards_u = type opaque
define i32 @emac1_ifoutdiscards_set(i32 %0, %union.emac1_ifoutdiscards_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_ifoutdiscards_u*
store i32 %0, i32* %3
store %union.emac1_ifoutdiscards_u* %1, %union.emac1_ifoutdiscards_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_ifoutdiscards_u = type opaque
define i32 @emac1_ifoutdiscards_set(i32 %0, %union.emac1_ifoutdiscards_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
scalar_t__ asuint(float);
int isok_f(float ygot, int exgot, float ywant, int exwant, int exmay) {
  return asuint(ygot) == asuint(ywant) && ((exgot ^ exwant) & ~exmay) == 0;
}


x86 assembly (clang, -O0):
<isok_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asuint@plt>
mov    %rax,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <asuint@plt>
mov    -0x20(%rbp),%rcx
mov    %rax,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x15(%rbp)
jne    116f <isok_f+0x5f>
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isok_f>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%ebp
movss  %xmm1,0x4(%rsp)
mov    %edi,%r14d
call   1030 <asuint@plt>
mov    %rax,%rbx
movss  0x4(%rsp),%xmm0
call   1030 <asuint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
jne    1150 <isok_f+0x40>
xor    %r14d,%ebp
not    %r15d
xor    %eax,%eax
test   %r15d,%ebp
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isok_f(float %0, i32 %1, float %2, i32 %3, i32 %4) {
%6 = alloca float
%7 = alloca i32
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
store float %0, float* %6
store i32 %1, i32* %7
store float %2, float* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load float, float* %6
%12 = call i64 @asuint(float %11)
%13 = load float, float* %8
%14 = call i64 @asuint(float %13)
%15 = icmp eq i64 %12, %14
br i1 %15, label %16, label %24
16: ; preds = %5
%17 = load i32, i32* %7
%18 = load i32, i32* %9
%19 = xor i32 %17, %18
%20 = load i32, i32* %10
%21 = xor i32 %20, -1
%22 = and i32 %19, %21
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %16, %5
%25 = phi i1 [ false, %5 ], [ %23, %16 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @isok_f(float %0, i32 %1, float %2, i32 %3, i32 %4) {
%6 = tail call i64 @asuint(float %0)
%7 = tail call i64 @asuint(float %2)
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = xor i32 %3, %1
%11 = xor i32 %4, -1
%12 = and i32 %10, %11
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %9, %5
%16 = phi i32 [ 0, %5 ], [ %14, %9 ]
ret i32 %16
}
/* Type definitions */
struct dlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct dlist *);
void dlist_free(struct dlist *list) { free(list); }


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

x86 assembly (clang, -O2):
<dlist_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.dlist = type { i32 }
define void @dlist_free(%struct.dlist* %0) {
%2 = alloca %struct.dlist*
store %struct.dlist* %0, %struct.dlist** %2
%3 = load %struct.dlist*, %struct.dlist** %2
%4 = call i32 @free(%struct.dlist* %3)
ret void
}

LLVM IR (-O2):
%struct.dlist = type { i32 }
define void @dlist_free(%struct.dlist* nocapture %0) {
%2 = tail call i32 @free(%struct.dlist* %0)
ret void
}
/* Variables and functions */
bool pb_is_little_endian() {
  int i = 1;
  return ((char *)&i)[0] ? true : false;
}


x86 assembly (clang, -O0):
<pb_is_little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movsbl -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pb_is_little_endian() {
%1 = alloca i32
store i32 1, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 0
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @pb_is_little_endian() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int __infer_nondet_int();
int pthread_mutex_unlock(pthread_mutex_t *mutex) {
  if (mutex == 0)
    while (1)
      ;
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<pthread_mutex_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1131 <pthread_mutex_unlock+0x21>
jmp    112c <pthread_mutex_unlock+0x1c>
jmp    112c <pthread_mutex_unlock+0x1c>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutex_unlock>:
test   %rdi,%rdi
je     1120 <pthread_mutex_unlock+0x10>
xor    %eax,%eax
jmp    1030 <__infer_nondet_int@plt>
nopl   0x0(%rax)
jmp    1120 <pthread_mutex_unlock+0x10>

LLVM IR (-O0):
define i32 @pthread_mutex_unlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
br label %6
6: ; preds = %5, %6
br label %6
7: ; preds = %1
%8 = call i32 (...) @__infer_nondet_int()
ret i32 %8
}

LLVM IR (-O2):
define i32 @pthread_mutex_unlock(i32* readnone %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
%5 = tail call i32 (...) @__infer_nondet_int()
ret i32 %5
}
int Operand_my_encode(unsigned int *valp) {
  int error;
  error = ((*valp & ~0x3) != 0) || ((*valp & 0x2) == 0);
  *valp = *valp & 1;
  return error;
}


x86 assembly (clang, -O0):
<Operand_my_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xfffffffc,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
jne    1131 <Operand_my_encode+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_my_encode>:
mov    (%rdi),%ecx
xor    %edx,%edx
test   $0x2,%cl
sete   %dl
cmp    $0x4,%ecx
mov    $0x1,%eax
cmovb  %edx,%eax
and    $0x1,%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define i32 @Operand_my_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = and i32 %5, -4
%7 = icmp ne i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = and i32 %10, 2
%12 = icmp eq i32 %11, 0
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ true, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
store i32 %15, i32* %3
%16 = load i32*, i32** %2
%17 = load i32, i32* %16
%18 = and i32 %17, 1
%19 = load i32*, i32** %2
store i32 %18, i32* %19
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @Operand_my_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ult i32 %2, 4
%4 = lshr i32 %2, 1
%5 = and i32 %4, 1
%6 = xor i32 %5, 1
%7 = select i1 %3, i32 %6, i32 1
%8 = and i32 %2, 1
store i32 %8, i32* %0
ret i32 %7
}
int __objc_dynamic_init(const char *exec_path) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @__objc_dynamic_init(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, unsigned long);
int /*<<< orphan*/ udelay(int);
void addi_eeprom_clk_93c76(unsigned long iobase, unsigned int val) {
  outl(val & ~(1 << 0), iobase);
  udelay(100);
  outl(val | (1 << 0), iobase);
  udelay(100);
}


x86 assembly (clang, -O0):
<addi_eeprom_clk_93c76>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
and    $0xfffffffe,%edi
mov    -0x8(%rbp),%rsi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
mov    -0xc(%rbp),%edi
or     $0x1,%edi
mov    -0x8(%rbp),%rsi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addi_eeprom_clk_93c76>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
and    $0xfffffffe,%edi
mov    %r14,%rsi
call   1030 <outl@plt>
mov    $0x64,%edi
call   1040 <udelay@plt>
or     $0x1,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <outl@plt>
mov    $0x64,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <udelay@plt>

LLVM IR (-O0):
define void @addi_eeprom_clk_93c76(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, -2
%7 = load i64, i64* %3
%8 = call i32 @outl(i32 %6, i64 %7)
%9 = call i32 @udelay(i32 100)
%10 = load i32, i32* %4
%11 = or i32 %10, 1
%12 = load i64, i64* %3
%13 = call i32 @outl(i32 %11, i64 %12)
%14 = call i32 @udelay(i32 100)
ret void
}

LLVM IR (-O2):
define void @addi_eeprom_clk_93c76(i64 %0, i32 %1) {
%3 = and i32 %1, -2
%4 = tail call i32 @outl(i32 %3, i64 %0)
%5 = tail call i32 @udelay(i32 100)
%6 = or i32 %1, 1
%7 = tail call i32 @outl(i32 %6, i64 %0)
%8 = tail call i32 @udelay(i32 100)
ret void
}
void RTLinuxSysFsGetLinkDestV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLinuxSysFsGetLinkDestV() {
ret void
}
int _min(int x, int y) {
  int result = y;
  if (x < y) {
    result = x;
  }
  return result;
}


x86 assembly (clang, -O0):
<_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1122 <_min+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cc_assignment_delete(int);
void cc_assignments_clear(void) { cc_assignment_delete(-1); }


x86 assembly (clang, -O0):
<cc_assignments_clear>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <cc_assignment_delete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_assignments_clear>:
mov    $0xffffffff,%edi
jmp    1030 <cc_assignment_delete@plt>

LLVM IR (-O0):
define void @cc_assignments_clear() {
%1 = call i32 @cc_assignment_delete(i32 -1)
ret void
}

LLVM IR (-O2):
define void @cc_assignments_clear() {
%1 = tail call i32 @cc_assignment_delete(i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sexyMove(unsigned long *, unsigned short *);
void prova(unsigned long *positions, unsigned short *orientations) {
  sexyMove(positions, orientations);
  sexyMove(positions, orientations);
  sexyMove(positions, orientations);
  sexyMove(positions, orientations);
  sexyMove(positions, orientations);
  sexyMove(positions, orientations);
}


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

x86 assembly (clang, -O2):
<prova>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <sexyMove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sexyMove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sexyMove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sexyMove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sexyMove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sexyMove@plt>

LLVM IR (-O0):
define void @prova(i64* %0, i16* %1) {
%3 = alloca i64*
%4 = alloca i16*
store i64* %0, i64** %3
store i16* %1, i16** %4
%5 = load i64*, i64** %3
%6 = load i16*, i16** %4
%7 = call i32 @sexyMove(i64* %5, i16* %6)
%8 = load i64*, i64** %3
%9 = load i16*, i16** %4
%10 = call i32 @sexyMove(i64* %8, i16* %9)
%11 = load i64*, i64** %3
%12 = load i16*, i16** %4
%13 = call i32 @sexyMove(i64* %11, i16* %12)
%14 = load i64*, i64** %3
%15 = load i16*, i16** %4
%16 = call i32 @sexyMove(i64* %14, i16* %15)
%17 = load i64*, i64** %3
%18 = load i16*, i16** %4
%19 = call i32 @sexyMove(i64* %17, i16* %18)
%20 = load i64*, i64** %3
%21 = load i16*, i16** %4
%22 = call i32 @sexyMove(i64* %20, i16* %21)
ret void
}

LLVM IR (-O2):
define void @prova(i64* %0, i16* %1) {
%3 = tail call i32 @sexyMove(i64* %0, i16* %1)
%4 = tail call i32 @sexyMove(i64* %0, i16* %1)
%5 = tail call i32 @sexyMove(i64* %0, i16* %1)
%6 = tail call i32 @sexyMove(i64* %0, i16* %1)
%7 = tail call i32 @sexyMove(i64* %0, i16* %1)
%8 = tail call i32 @sexyMove(i64* %0, i16* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t I2CSlaveStatus(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000804))));
}


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

x86 assembly (clang, -O2):
<I2CSlaveStatus>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x804(%rax),%rax
ret

LLVM IR (-O0):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 2052
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 2052
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ gint2_nai_S_cD(double *, double, double *, double, double *,
                                  double *);
void gint2_nai_cD_S(double *a, double a_a, double *b, double b_a, double *c,
                    double *out) {
  gint2_nai_S_cD(b, b_a, a, a_a, c, out);
}


x86 assembly (clang, -O0):
<gint2_nai_cD_S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <gint2_nai_S_cD@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint2_nai_cD_S>:
movaps %xmm0,%xmm2
mov    %rdi,%rax
mov    %rsi,%rdi
movaps %xmm1,%xmm0
mov    %rax,%rsi
movaps %xmm2,%xmm1
jmp    1030 <gint2_nai_S_cD@plt>

LLVM IR (-O0):
define void @gint2_nai_cD_S(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double
%9 = alloca double*
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
store double* %0, double** %7
store double %1, double* %8
store double* %2, double** %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double*, double** %9
%14 = load double, double* %10
%15 = load double*, double** %7
%16 = load double, double* %8
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = call i32 @gint2_nai_S_cD(double* %13, double %14, double* %15, double %16, double* %17, double* %18)
ret void
}

LLVM IR (-O2):
define void @gint2_nai_cD_S(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%7 = tail call i32 @gint2_nai_S_cD(double* %2, double %3, double* %0, double %1, double* %4, double* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int main() {
  while (1) {
    usleep(1000000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xf4240,%edi
call   1030 <usleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xf4240,%edi
call   1030 <usleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @usleep(i32 1000000)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @usleep(i32 1000000)
br label %1
}
void RTMd5FromString(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMd5FromString() {
ret void
}
AR0IR1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((p0[10000000]) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0IR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl 0x989680(%rax),%eax
mov    -0x20(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jg     1144 <AR0IR1+0x44>
movl   $0x1,-0x4(%rbp)
jmp    114b <AR0IR1+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0IR1>:
mov    0x989680(%r8),%cl
xor    %eax,%eax
cmp    (%r9),%cl
setle  %al
ret

LLVM IR (-O0):
define i32 @AR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %12
%17 = getelementptr inbounds i8, i8* %16, i64 10000000
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8*, i8** %13
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %19, %22
br i1 %23, label %24, label %25
24: ; preds = %6
store i32 1, i32* %7
br label %26
25: ; preds = %6
store i32 0, i32* %7
br label %26
26: ; preds = %25, %24
%27 = load i32, i32* %7
ret i32 %27
}

LLVM IR (-O2):
define i32 @AR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
%7 = getelementptr inbounds i8, i8* %4, i64 10000000
%8 = load i8, i8* %7
%9 = load i8, i8* %5
%10 = icmp sle i8 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void Handle(int sig) {
  printf("Got signal %d\n", sig);
  exit(0);
}


x86 assembly (clang, -O0):
<Handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Handle>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Got signal %d\0A\00"
define void @Handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"Got signal %d\0A\00"
define void @Handle(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ alloc_memory(size_t, int, void *, int);
int *alloc_int(size_t nmemb, void *to_free, int n) {
  return (int *)alloc_memory(nmemb, sizeof(int), to_free, n);
}


x86 assembly (clang, -O0):
<alloc_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x4,%esi
call   1030 <alloc_memory@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_int>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <alloc_memory@plt>

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

LLVM IR (-O2):
define i32* @alloc_int(i64 %0, i8* %1, i32 %2) {
%4 = tail call i64 @alloc_memory(i64 %0, i32 4, i8* %1, i32 %2)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ translate_joyname(int *, char **, int /*<<< orphan*/);
char *getJoyNameFromJoySymbol(int joysymbol) {
  char *name;
  translate_joyname(&joysymbol, &name, 0);
  return name;
}


x86 assembly (clang, -O0):
<getJoyNameFromJoySymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <translate_joyname@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getJoyNameFromJoySymbol>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
xor    %edx,%edx
call   1030 <translate_joyname@plt>
mov    0x10(%rsp),%rax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i8* @getJoyNameFromJoySymbol(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = bitcast i8** %3 to i8*
%5 = call i32 @translate_joyname(i32* %2, i8** %3, i32 0)
%6 = load i8*, i8** %3
ret i8* %6
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_prepend_(struct list *, int /*<<< orphan*/);
int /*<<< orphan*/ object_copy(void const *);
void list_prepend(struct list *list, const void *obj) {
  list_prepend_(list, object_copy(obj));
}


x86 assembly (clang, -O0):
<list_prepend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <object_copy@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <list_prepend_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_prepend>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <object_copy@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <list_prepend_@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_prepend(%struct.list* %0, i8* %1) {
%3 = alloca %struct.list*
%4 = alloca i8*
store %struct.list* %0, %struct.list** %3
store i8* %1, i8** %4
%5 = load %struct.list*, %struct.list** %3
%6 = load i8*, i8** %4
%7 = call i32 @object_copy(i8* %6)
%8 = call i32 @list_prepend_(%struct.list* %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_prepend(%struct.list* %0, i8* %1) {
%3 = tail call i32 @object_copy(i8* %1)
%4 = tail call i32 @list_prepend_(%struct.list* %0, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ hash_is_prime(int);
int hash_next_prime(int start) {
  int s;
  for (s = start;; s++) {
    if (hash_is_prime(s)) {
      return s;
    }
  }
  return start;
}


x86 assembly (clang, -O0):
<hash_next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <hash_is_prime@plt>
cmp    $0x0,%rax
je     113c <hash_next_prime+0x2c>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1141 <hash_next_prime+0x31>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1121 <hash_next_prime+0x11>

x86 assembly (clang, -O2):
<hash_next_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <hash_is_prime@plt>
add    $0x1,%ebx
test   %rax,%rax
je     1120 <hash_next_prime+0x10>
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @hash_next_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @hash_is_prime(i32 %3)
%5 = icmp eq i64 %4, 0
%6 = add nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
unsigned int foo(unsigned int a) { return ((unsigned char)(a + 1)) * 4; }


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

x86 assembly (clang, -O2):
<foo>:
lea    0x4(,%rdi,4),%eax
and    $0x3fc,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = shl i32 %0, 2
%3 = add i32 %2, 4
%4 = and i32 %3, 1020
ret i32 %4
}
/* Type definitions */
struct dive_site_table {
  int dummy;
};
struct dive_site {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_dive_site(struct dive_site *);
int /*<<< orphan*/ remove_dive_site(struct dive_site *,
                                    struct dive_site_table *);
void delete_dive_site(struct dive_site *ds, struct dive_site_table *ds_table) {
  if (!ds)
    return;
  remove_dive_site(ds, ds_table);
  free_dive_site(ds);
}


x86 assembly (clang, -O0):
<delete_dive_site>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1140 <delete_dive_site+0x20>
jmp    1156 <delete_dive_site+0x36>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <remove_dive_site@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free_dive_site@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_dive_site>:
test   %rdi,%rdi
je     1137 <delete_dive_site+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <remove_dive_site@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free_dive_site@plt>
ret

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

LLVM IR (-O2):
%struct.dive_site = type { i32 }
%struct.dive_site_table = type { i32 }
define void @delete_dive_site(%struct.dive_site* %0, %struct.dive_site_table* %1) {
%3 = icmp eq %struct.dive_site* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @remove_dive_site(%struct.dive_site* %0, %struct.dive_site_table* %1)
%6 = tail call i32 @free_dive_site(%struct.dive_site* %0)
br label %7
7: ; preds = %2, %4
ret void
}
int get_oct(int note) { return note / 12; }


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

x86 assembly (clang, -O2):
<get_oct>:
movslq %edi,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_oct(i32 %0) {
%2 = sdiv i32 %0, 12
ret i32 %2
}
float Float__MUL_(float x, float y) { return x * y; }


x86 assembly (clang, -O0):
<Float__MUL_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Float__MUL_>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Float__MUL_(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @Float__MUL_(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}