xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, long);
void copy_uivector(uint *src, long nl1, long nh1, uint *dst, long nl2,
                   long nh2) {
  long len = nh1 - nl1 + 1;
  static long size = sizeof(uint);
  memcpy(dst + nl2, src + nl1, len * size);
}


x86 assembly (clang, -O0):
<copy_uivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x38(%rbp),%rdx
imul   0x2ebe(%rip),%rdx
call   1030 <memcpy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_uivector>:
sub    %rsi,%rdx
lea    (%rcx,%r8,4),%rax
lea    (%rdi,%rsi,4),%rsi
lea    0x4(,%rdx,4),%rdx
mov    %rax,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@copy_uivector.size = internal global i64 4
define void @copy_uivector(i32* %0, i64 %1, i64 %2, i32* %3, i64 %4, i64 %5) {
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i32* %0, i32** %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i32* %3, i32** %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%14 = load i64, i64* %9
%15 = load i64, i64* %8
%16 = sub nsw i64 %14, %15
%17 = add nsw i64 %16, 1
store i64 %17, i64* %13
%18 = load i32*, i32** %10
%19 = load i64, i64* %11
%20 = getelementptr inbounds i32, i32* %18, i64 %19
%21 = load i32*, i32** %7
%22 = load i64, i64* %8
%23 = getelementptr inbounds i32, i32* %21, i64 %22
%24 = load i64, i64* %13
%25 = load i64, i64* @copy_uivector.size
%26 = mul nsw i64 %24, %25
%27 = call i32 @memcpy(i32* %20, i32* %23, i64 %26)
ret void
}

LLVM IR (-O2):
define void @copy_uivector(i32* %0, i64 %1, i64 %2, i32* %3, i64 %4, i64 %5) {
%7 = sub nsw i64 %2, %1
%8 = getelementptr inbounds i32, i32* %3, i64 %4
%9 = getelementptr inbounds i32, i32* %0, i64 %1
%10 = shl i64 %7, 2
%11 = add i64 %10, 4
%12 = tail call i32 @memcpy(i32* %8, i32* %9, i64 %11)
ret void
}
/* Variables and functions */
scalar_t__ remquo(double, double, int *);
float remquof(float x, float y, int *quo) {
  return (float)remquo((double)x, (double)y, quo);
}


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

x86 assembly (clang, -O2):
<remquof>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <remquo@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @remquof(float %0, float %1, i32* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32*
store float %0, float* %4
store float %1, float* %5
store i32* %2, i32** %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = load i32*, i32** %6
%12 = call i64 @remquo(double %8, double %10, i32* %11)
%13 = sitofp i64 %12 to float
ret float %13
}

LLVM IR (-O2):
define float @remquof(float %0, float %1, i32* %2) {
%4 = fpext float %0 to double
%5 = fpext float %1 to double
%6 = tail call i64 @remquo(double %4, double %5, i32* %2)
%7 = sitofp i64 %6 to float
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ _test_1(int, int *, int *, int **, int);
void soru_1(int a, int *p) {
  int a_deger = a;
  int *a_adres = &a;
  int *p_deger = p;
  int **p_adres = &p;
  int p_gosterdigi_deger = *p;
  _test_1(a_deger, a_adres, p_deger, p_adres, p_gosterdigi_deger);
}


x86 assembly (clang, -O0):
<soru_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x34(%rbp),%r8d
call   1030 <_test_1@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_1>:
sub    $0x18,%rsp
mov    %rsi,%rdx
mov    %edi,0xc(%rsp)
mov    %rsi,0x10(%rsp)
mov    (%rsi),%r8d
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
call   1030 <_test_1@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @soru_1(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %1
%6 = call i32 @_test_1(i32 %0, i32* %3, i32* %1, i32** %4, i32 %5)
ret void
}
char bimaru_max(char *s) {
  char max = 0;
  while (*s != '\0') {
    if (*s - 1 > max)
      max = *s - 1;
    s++;
  }
  return max;
}


x86 assembly (clang, -O0):
<bimaru_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <bimaru_max+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x1,%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jle    113f <bimaru_max+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x1,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <bimaru_max+0xc>
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bimaru_max>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <bimaru_max+0x2c>
add    $0x1,%rdi
xor    %edx,%edx
nopl   0x0(%rax)
movsbl %cl,%eax
add    $0xffffffff,%eax
movzbl %dl,%ecx
cmp    %ecx,%eax
cmovle %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <bimaru_max+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @bimaru_max(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i8 [ %13, %4 ], [ 0, %1 ]
%7 = phi i8* [ %14, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add nsw i32 %8, -1
%10 = zext i8 %6 to i32
%11 = icmp sgt i32 %9, %10
%12 = trunc i32 %9 to i8
%13 = select i1 %11, i8 %12, i8 %6
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i8 [ 0, %1 ], [ %13, %4 ]
ret i8 %18
}
int conta_divisoes(int a, int b) {
  int contador;
  contador = 0;
  while (a % b == 0) {
    a /= b;
    contador++;
  }
  return contador;
}


x86 assembly (clang, -O0):
<conta_divisoes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    113b <conta_divisoes+0x3b>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <conta_divisoes+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conta_divisoes>:
mov    %edi,%eax
cltd
idiv   %esi
xor    %ecx,%ecx
test   %edx,%edx
jne    1121 <conta_divisoes+0x21>
xor    %ecx,%ecx
nopl   (%rax)
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%ecx
mov    %eax,%edi
cltd
idiv   %esi
test   %edx,%edx
je     1110 <conta_divisoes+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @conta_divisoes(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %8, %5 ], [ %0, %2 ]
%8 = sdiv i32 %7, %1
%9 = add nuw nsw i32 %6, 1
%10 = srem i32 %8, %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %5, label %12
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %13
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int wave_send_once(int pi, unsigned wave_id) {
  return pigpio_command(pi, 51, wave_id, 0, 1);
}


x86 assembly (clang, -O0):
<wave_send_once>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x33,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_send_once>:
mov    %esi,%edx
mov    $0x33,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @wave_send_once(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 51, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ open(char const *, int /*<<< orphan*/);
void FT_Stream_Open(const char *filepathname) { open(filepathname, O_RDONLY); }


x86 assembly (clang, -O0):
<FT_Stream_Open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FT_Stream_Open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define void @FT_Stream_Open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = call i32 @open(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define void @FT_Stream_Open(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret void
}
void RAND_poll(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_poll() {
ret void
}
/* Type definitions */
struct ByteAry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ByteAry_add(struct ByteAry *, unsigned char *, int);
void ByteAry_addULong(struct ByteAry *self, unsigned long src) {
  ByteAry_add(self, (unsigned char *)&src, 4);
}


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

x86 assembly (clang, -O2):
<ByteAry_addULong>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <ByteAry_add@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.ByteAry = type { i32 }
define void @ByteAry_addULong(%struct.ByteAry* %0, i64 %1) {
%3 = alloca %struct.ByteAry*
%4 = alloca i64
store %struct.ByteAry* %0, %struct.ByteAry** %3
store i64 %1, i64* %4
%5 = load %struct.ByteAry*, %struct.ByteAry** %3
%6 = bitcast i64* %4 to i8*
%7 = call i32 @ByteAry_add(%struct.ByteAry* %5, i8* %6, i32 4)
ret void
}

LLVM IR (-O2):
%struct.ByteAry = type { i32 }
define void @ByteAry_addULong(%struct.ByteAry* %0, i64 %1) {
%3 = alloca i64
store i64 %1, i64* %3
%4 = bitcast i64* %3 to i8*
%5 = call i32 @ByteAry_add(%struct.ByteAry* %0, i8* %4, i32 4)
ret void
}
/* Variables and functions */
float pow(float, int);
float calculate(float x, float y, float z) { return (pow(x, 2) + (y + z)); }


x86 assembly (clang, -O0):
<calculate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movss  -0x8(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate>:
push   %rax
movss  %xmm2,0x4(%rsp)
movss  %xmm1,(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
movss  (%rsp),%xmm1
addss  0x4(%rsp),%xmm1
addss  %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @calculate(float %0, float %1, float %2) {
%4 = tail call float @pow(float %0, i32 2)
%5 = fadd float %1, %2
%6 = fadd float %5, %4
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p256_square(uintptr_t, uintptr_t);
void fiat_p256_square(uint64_t out1[4], const uint64_t arg1[4]) {
  internal_fiat_p256_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p256_square>:
jmp    1030 <internal_fiat_p256_square@plt>

LLVM IR (-O0):
define void @fiat_p256_square(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p256_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p256_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p256_square(i64 %3, i64 %4)
ret void
}
unsigned int HashTable_getStringHash(const char *key) {
  unsigned int h = 0;
  unsigned char c;
  while ((c = (unsigned char)*key++) != 0) {
    h = (h << 3) ^ h ^ c;
  }
  return h;
}


x86 assembly (clang, -O0):
<HashTable_getStringHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movzbl %al,%eax
cmp    $0x0,%eax
je     1146 <HashTable_getStringHash+0x46>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
xor    -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <HashTable_getStringHash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashTable_getStringHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <HashTable_getStringHash+0x2c>
add    $0x1,%rdi
xor    %edx,%edx
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    0x0(,%rdx,8),%eax
xor    %edx,%eax
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <HashTable_getStringHash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @HashTable_getStringHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %12, %4 ], [ 0, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = shl i32 %7, 3
%11 = xor i32 %10, %7
%12 = xor i32 %11, %8
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
unsigned short ExpansionRom_GetWord(const unsigned char *pAddr, int Offset) {
  unsigned short WordData;
  WordData = (unsigned short)((pAddr[(Offset & 0x03fff)]) |
                              ((pAddr[(Offset + 1) & 0x03fff]) << 8));
  return WordData;
}


x86 assembly (clang, -O0):
<ExpansionRom_GetWord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
and    $0x3fff,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
and    $0x3fff,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xe(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExpansionRom_GetWord>:
mov    %esi,%eax
and    $0x3fff,%eax
movzbl (%rdi,%rax,1),%ecx
add    $0x1,%esi
and    $0x3fff,%esi
movzbl (%rdi,%rsi,1),%eax
shl    $0x8,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @ExpansionRom_GetWord(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i16
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = and i32 %7, 16383
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
%16 = and i32 %15, 16383
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %13, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 8
%22 = or i32 %12, %21
%23 = trunc i32 %22 to i16
store i16 %23, i16* %5
%24 = load i16, i16* %5
ret i16 %24
}

LLVM IR (-O2):
define zeroext i16 @ExpansionRom_GetWord(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 16383
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = add nsw i32 %1, 1
%9 = and i32 %8, 16383
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i16
%14 = shl nuw i16 %13, 8
%15 = or i16 %14, %7
ret i16 %15
}
int test_imm_11uint8_reg(unsigned char val) {
  return ((val) & (-0x11 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_11uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffef,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_11uint8_reg>:
test   $0xef,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_11uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -17
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int demoC() {
  int arr[2] = {9, 2};
  int *p;
  p = &arr[0];
  *p = 1;
  *(p + 1) = 3;
  printf("%d\n", p);
  printf("%d\n", *arr);
  printf("%d\n", arr[1]);
}


x86 assembly (clang, -O0):
<demoC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x3,0x4(%rax)
mov    -0x18(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<demoC>:
push   %rbx
sub    $0x10,%rsp
movabs $0x300000001,%rax
mov    %rax,0x8(%rsp)
lea    0xed5(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @demoC() {
%1 = alloca i64
%2 = bitcast i64* %1 to [2 x i32]*
%3 = bitcast i64* %1 to i8*
store i64 12884901889, i64* %1
%4 = bitcast i64* %1 to i32*
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%9 = load i32, i32* %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 undef
}
int test_imm_F4int32_mem(int *val) {
  return ((*val) & (0xF4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F4int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 244
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, scalar_t__);
scalar_t__ rdpmc();
int main(int argc, char *argv[]) {
  int res = 0, i, j;
  uint64_t start_1 = 0;
  uint64_t stop_2 = 0;
  start_1 = rdpmc();
  stop_2 = rdpmc();
  printf("\nTimestamp : %lu\n", stop_2 - start_1);
  return 0;
  uint64_t start = rdpmc();
  uint64_t stop = rdpmc();
  printf("\ncycles %lu ", stop - start);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    $0x0,%al
call   1040 <rdpmc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1040 <rdpmc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
sub    -0x28(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <rdpmc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <rdpmc@plt>
sub    %rbx,%rax
lea    0xec4(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\0ATimestamp : %lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i64 0, i64* %9
store i64 0, i64* %10
%13 = call i64 (...) @rdpmc()
store i64 %13, i64* %9
%14 = call i64 (...) @rdpmc()
store i64 %14, i64* %10
%15 = load i64, i64* %10
%16 = load i64, i64* %9
%17 = sub nsw i64 %15, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0ATimestamp : %lu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @rdpmc()
%4 = tail call i64 (...) @rdpmc()
%5 = sub nsw i64 %4, %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}
void get_trace_clock(void) {}


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

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

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

LLVM IR (-O2):
define void @get_trace_clock() {
ret void
}
bzero(b, length) register char *b;
register int length;
{
  while (length-- > 0)
    *b++ = 0;
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    1136 <bzero+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
jmp    110b <bzero+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
jle    1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ stderr;
void *piece_allocate(size_t size) {
  void *allocated = malloc(size);
  if (allocated == NULL) {
    fprintf(stderr, "out of memory trying to allocate %lu bytes\n", size);
    exit(1);
  }
  memset(allocated, 0, size);
  return allocated;
}


x86 assembly (clang, -O0):
<piece_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1187 <piece_allocate+0x47>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_allocate>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
test   %rax,%rax
je     116c <piece_allocate+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"out of memory trying to allocate %lu bytes\0A\00"
define i8* @piece_allocate(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i64, i64* %2
%16 = call i32 @memset(i8* %14, i32 0, i64 %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"out of memory trying to allocate %lu bytes\0A\00"
define i8* @piece_allocate(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
int codegen_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @codegen_shutdown() {
ret i32 0
}
double appolonius(double x1, double x3, double x4, double x7, double x8) {
  return x1 * (x1 - 2 * x7) - x3 * (x3 * x3 - 2 * x7) - x4 * (x4 - 2 * x8);
}


x86 assembly (clang, -O0):
<appolonius>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm5
movsd  0xeb5(%rip),%xmm4
mulsd  -0x20(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
addsd  %xmm3,%xmm3
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<appolonius>:
mulsd  0xef8(%rip),%xmm3
movapd %xmm1,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm3,%xmm5
addsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm5
mulsd  %xmm3,%xmm0
subsd  %xmm5,%xmm0
addsd  %xmm4,%xmm4
movapd %xmm2,%xmm1
subsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @appolonius(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %6
%13 = load double, double* %9
%14 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %13, double %12)
%15 = load double, double* %7
%16 = load double, double* %7
%17 = load double, double* %7
%18 = load double, double* %9
%19 = fmul double 2.000000e+00, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %16, double %17, double %20)
%22 = fmul double %15, %21
%23 = fneg double %22
%24 = call double @llvm.fmuladd.f64(double %11, double %14, double %23)
%25 = load double, double* %8
%26 = load double, double* %8
%27 = load double, double* %10
%28 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %27, double %26)
%29 = fneg double %25
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double %24)
ret double %30
}

LLVM IR (-O2):
define double @appolonius(double %0, double %1, double %2, double %3, double %4) {
%6 = tail call double @llvm.fmuladd.f64(double %3, double -2.000000e+00, double %0)
%7 = fmul double %3, -2.000000e+00
%8 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %7)
%9 = fneg double %8
%10 = fmul double %9, %1
%11 = tail call double @llvm.fmuladd.f64(double %0, double %6, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %4, double -2.000000e+00, double %2)
%13 = fneg double %2
%14 = tail call double @llvm.fmuladd.f64(double %13, double %12, double %11)
ret double %14
}
/* Variables and functions */
int const SIGPIPE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int const, char *);
int /*<<< orphan*/ stderr;
void __attribute__((noreturn)) do_signal(const int sig) {
  fprintf(stderr, "receive: UNEXPECTED SIGNAL %d%s- terminating\n", sig,
          sig == SIGPIPE ? " [SIGPIPE]" : "");
  fflush(stderr);
  exit(100);
}


x86 assembly (clang, -O0):
<do_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%esi
mov    0x2e87(%rip),%rax
mov    (%rax),%r8d
lea    0xed2(%rip),%rcx
lea    0xecc(%rip),%rax
cmp    %r8d,%esi
cmove  %rax,%rcx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x64,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<do_signal>:
push   %rbx
mov    %edi,%edx
mov    0x2ea6(%rip),%rbx
mov    (%rbx),%edi
test   %edx,%edx
lea    0xee9(%rip),%rax
lea    0xee1(%rip),%rcx
cmove  %rax,%rcx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x64,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"receive: UNEXPECTED SIGNAL %d%s- terminating\0A\00"
@SIGPIPE = constant i32 0
@.str.1 = [11 x i8] c" [SIGPIPE]\00"
@.str.2 = [1 x i8] zeroinitializer
define void @do_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @SIGPIPE
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fflush(i32 %11)
%13 = call i32 @exit(i32 100)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"receive: UNEXPECTED SIGNAL %d%s- terminating\0A\00"
@SIGPIPE = constant i32 0
@.str.1 = [11 x i8] c" [SIGPIPE]\00"
@.str.2 = [1 x i8] zeroinitializer
define void @do_signal(i32 %0) {
%2 = load i32, i32* @stderr
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 @exit(i32 100)
unreachable
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int hashtable_eqfn_int32(void *k1, void *k2) {
  int32_t i1 = *((int32_t *)k1);
  int32_t i2 = *((int32_t *)k2);
  return (i1 == i2);
}


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

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

LLVM IR (-O0):
define i32 @hashtable_eqfn_int32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp eq i64 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @hashtable_eqfn_int32(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int fun1142() { return 1142; }


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

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

LLVM IR (-O0):
define i32 @fun1142() {
ret i32 1142
}

LLVM IR (-O2):
define i32 @fun1142() {
ret i32 1142
}
/* Variables and functions */
int /*<<< orphan*/ sgi_set_partition(int, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
void sgi_delete_partition(int i) { sgi_set_partition(i, 0, 0, 0); }


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

x86 assembly (clang, -O2):
<sgi_delete_partition>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <sgi_set_partition@plt>

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

LLVM IR (-O2):
define void @sgi_delete_partition(i32 %0) {
%2 = tail call i32 @sgi_set_partition(i32 %0, i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int socklen_t;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
scalar_t__ getsockopt(int, int /*<<< orphan*/, int, char *, int *);
int net_sock_getbuf(int s, int flag) {
  int sbz;
  socklen_t gsz = sizeof(int);
  if (getsockopt(s, SOL_SOCKET, flag, (char *)&sbz, &gsz) < 0) {
    return 4096;
  }
  return sbz;
}


x86 assembly (clang, -O0):
<net_sock_getbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <getsockopt@plt>
cmp    $0x0,%rax
jge    1157 <net_sock_getbuf+0x47>
movl   $0x1000,-0x4(%rbp)
jmp    115d <net_sock_getbuf+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_sock_getbuf>:
push   %rax
mov    %esi,%edx
movl   $0x4,(%rsp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1030 <getsockopt@plt>
mov    %rax,%rcx
mov    $0x1000,%eax
test   %rcx,%rcx
js     1141 <net_sock_getbuf+0x31>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
define i32 @net_sock_getbuf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 4, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* @SOL_SOCKET
%10 = load i32, i32* %5
%11 = bitcast i32* %6 to i8*
%12 = call i64 @getsockopt(i32 %8, i32 %9, i32 %10, i8* %11, i32* %7)
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 4096, i32* %3
br label %17
15: ; preds = %2
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
define i32 @net_sock_getbuf(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 4, i32* %4
%7 = load i32, i32* @SOL_SOCKET
%8 = call i64 @getsockopt(i32 %0, i32 %7, i32 %1, i8* %5, i32* %4)
%9 = icmp slt i64 %8, 0
%10 = load i32, i32* %3
%11 = select i1 %9, i32 4096, i32 %10
ret i32 %11
}
int cdrom_exit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cdrom_exit() {
ret i32 0
}
void IMGcopyWbright(short *imageBuf, int imgPitch, short *backBuf,
                    int backPitch, int srcX1, int srcY1, int srcX2, int srcY2,
                    int brightness) {}


x86 assembly (clang, -O0):
<IMGcopyWbright>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @IMGcopyWbright(i16* %0, i32 %1, i16* %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i16*
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i16* %0, i16** %10
store i32 %1, i32* %11
store i16* %2, i16** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
ret void
}

LLVM IR (-O2):
define void @IMGcopyWbright(i16* nocapture %0, i32 %1, i16* nocapture %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
ret void
}
void setScreenSpecifics(void) {}


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

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

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

LLVM IR (-O2):
define void @setScreenSpecifics() {
ret void
}
int test_imm_7Cint64_lowword_reg(long long val) {
  return ((val) & (0x7C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Cint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x7c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Cint64_lowword_reg>:
test   $0x7c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Cint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 124
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ name_get(unsigned int);
int /*<<< orphan*/ warn(char *, int /*<<< orphan*/);
void do_closefile(int fd, unsigned name) {
  if (close(fd)) {
    warn("%s: close", name_get(name));
  }
}


x86 assembly (clang, -O0):
<do_closefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0x0,%rax
je     1166 <do_closefile+0x36>
mov    -0x8(%rbp),%edi
call   1050 <name_get@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1030 <warn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_closefile>:
push   %rbx
mov    %esi,%ebx
call   1040 <close@plt>
test   %rax,%rax
je     1153 <do_closefile+0x23>
mov    %ebx,%edi
call   1050 <name_get@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <warn@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s: close\00"
define void @do_closefile(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 = call i64 @close(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @name_get(i32 %9)
%11 = call i32 @warn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s: close\00"
define void @do_closefile(i32 %0, i32 %1) {
%3 = tail call i64 @close(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @name_get(i32 %1)
%7 = tail call i32 @warn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %2
ret void
}