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

/* Variables and functions */
int get_flag(uint32_t flags, uint32_t flag) { return (flags & flag) != 0; }


x86 assembly (clang, -O0):
<get_flag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_flag>:
xor    %eax,%eax
test   %edi,%esi
setne  %al
ret

LLVM IR (-O0):
define i32 @get_flag(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 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_flag(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xc0() {
  Assert_real((isxdigit(192) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              965, ("isxdigit should be 0 for 0xc0"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xc0>:
push   %rax
mov    $0xc0,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3c5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc0\00"
define void @t_isxdigit_0xc0() {
%1 = tail call i64 @isxdigit(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
short *find_exponent(float number) {
  int power = 0;
  float res = number;
  short *exponent;
  exponent = (short *)malloc(8 * sizeof(short));
  if (number < 1.0) {
  } else {
    while (res > 1.0) {
      res /= 2.0;
      power += 1;
    }
  }
  short biased_exponent = 127 + power;
  return exponent;
}


x86 assembly (clang, -O0):
<find_exponent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    115c <find_exponent+0x4c>
jmp    11ad <find_exponent+0x9d>
jmp    1161 <find_exponent+0x51>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11a8 <find_exponent+0x98>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <find_exponent+0x51>
jmp    11ad <find_exponent+0x9d>
mov    -0x8(%rbp),%eax
add    $0x7f,%eax
mov    %ax,-0x1a(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_exponent>:
mov    $0x10,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i16* @find_exponent(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca i16*
%6 = alloca i16
store float %0, float* %2
store i32 0, i32* %3
%7 = load float, float* %2
store float %7, float* %4
%8 = call i64 @malloc(i32 16)
%9 = inttoptr i64 %8 to i16*
store i16* %9, i16** %5
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fcmp olt double %11, 1.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %1
br label %27
14: ; preds = %1
br label %15
15: ; preds = %19, %14
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = fcmp ogt double %17, 1.000000e+00
br i1 %18, label %19, label %26
19: ; preds = %15
%20 = load float, float* %4
%21 = fpext float %20 to double
%22 = fdiv double %21, 2.000000e+00
%23 = fptrunc double %22 to float
store float %23, float* %4
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %15
26: ; preds = %15
br label %27
27: ; preds = %26, %13
%28 = load i32, i32* %3
%29 = add nsw i32 127, %28
%30 = trunc i32 %29 to i16
store i16 %30, i16* %6
%31 = load i16*, i16** %5
ret i16* %31
}

LLVM IR (-O2):
define i16* @find_exponent(float %0) {
%2 = tail call i64 @malloc(i32 16)
%3 = inttoptr i64 %2 to i16*
ret i16* %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int do_open(char *file) { return open(file, O_RDONLY); }


x86 assembly (clang, -O0):
<do_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):
<do_open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @do_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 i32 %5
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @do_open(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
int Min0(int arg1, int arg2) {
  if (arg1 < arg2)
    return (arg1);
  else
    return (arg2);
}


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

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

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

LLVM IR (-O2):
define i32 @Min0(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*/ saveconfig();
void zresmdown(void) { saveconfig(); }


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

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

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

LLVM IR (-O2):
define void @zresmdown() {
%1 = tail call i32 (...) @saveconfig()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_116() {
  Assert_real((isqrt(116) == 10),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              585, ("Integer square root of 116 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_116>:
push   %rbp
mov    %rsp,%rbp
mov    $0x74,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x249,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_116>:
push   %rax
mov    $0x74,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x249,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 116 should be 10\00"
define void @t_sqrt_116() {
%1 = call i32 @isqrt(i32 116)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 116 should be 10\00"
define void @t_sqrt_116() {
%1 = tail call i32 @isqrt(i32 116)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int close_log(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<close_log>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @close_log(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int my_square_root(int cute) {
  int i;
  i = 0;
  if (cute == 1)
    return (1);
  while (i <= (cute / 2)) {
    if (cute == (i * i))
      return (i);
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_square_root>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1124 <my_square_root+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1179 <my_square_root+0x79>
jmp    1129 <my_square_root+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jg     1172 <my_square_root+0x72>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1164 <my_square_root+0x64>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <my_square_root+0x79>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <my_square_root+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_square_root>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1132 <my_square_root+0x32>
xor    %eax,%eax
cmp    $0xffffffff,%edi
jl     1132 <my_square_root+0x32>
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
add    $0x1,%ecx
xor    %eax,%eax
nop
mov    %eax,%edx
imul   %eax,%edx
cmp    %edi,%edx
je     1132 <my_square_root+0x32>
add    $0x1,%eax
cmp    %eax,%ecx
jne    1120 <my_square_root+0x20>
xor    %eax,%eax
ret

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

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

/* Variables and functions */
int rotr(int, int);
uint32_t s1(uint32_t x) { return rotr(x, 17) ^ rotr(x, 19) ^ (x >> 10); }


x86 assembly (clang, -O0):
<s1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x11,%esi
call   1030 <rotr@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x13,%esi
call   1030 <rotr@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0xa,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x11,%esi
call   1030 <rotr@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x13,%esi
call   1030 <rotr@plt>
sar    $0xa,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotr(i32 %3, i32 17)
%5 = load i32, i32* %2
%6 = call i32 @rotr(i32 %5, i32 19)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 10
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s1(i32 %0) {
%2 = tail call i32 @rotr(i32 %0, i32 17)
%3 = tail call i32 @rotr(i32 %0, i32 19)
%4 = ashr i32 %0, 10
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float volume(double, int);
int main3() {
  float v1 = volume(22.5, 44);
  printf("volume is %f", v1);
  return 0;
}


x86 assembly (clang, -O0):
<main3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed0(%rip),%xmm0
mov    $0x2c,%edi
call   1030 <volume@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main3>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x2c,%edi
call   1030 <volume@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"volume is %f\00"
define i32 @main3() {
%1 = alloca float
%2 = call float @volume(double 2.250000e+01, i32 44)
store float %2, float* %1
%3 = load float, float* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"volume is %f\00"
define i32 @main3() {
%1 = tail call float @volume(double 2.250000e+01, i32 44)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %1)
ret i32 0
}
/* Variables and functions */
int core4_safe(char const *);
int U_EMRINTERSECTCLIPRECT_safe(const char *record) {
  return (core4_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRINTERSECTCLIPRECT_safe>:
jmp    1030 <core4_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRINTERSECTCLIPRECT_safe(i8* %0) {
%2 = tail call i32 @core4_safe(i8* %0)
ret i32 %2
}
void _Unwind_VRS_Set() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_VRS_Set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nRF905_receive();
void nRF905_leaveStandBy(void) { nRF905_receive(); }


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

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

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

LLVM IR (-O2):
define void @nRF905_leaveStandBy() {
%1 = tail call i32 (...) @nRF905_receive()
ret void
}
void X509V3_EXT_get_nid(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_get_nid() {
ret void
}
double sqr(double x, double a) { return x * x - a; }


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
mulsd  %xmm0,%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sqr(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fneg double %7
%9 = call double @llvm.fmuladd.f64(double %5, double %6, double %8)
ret double %9
}

LLVM IR (-O2):
define double @sqr(double %0, double %1) {
%3 = fneg double %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ test6_Y_set__E();
void test6_Led2_targetInit__I() {
  { test6_Y_set__E(); }
}


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

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

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

LLVM IR (-O2):
define void @test6_Led2_targetInit__I() {
%1 = tail call i32 (...) @test6_Y_set__E()
ret void
}
int test_imm_C1uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xC1 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C1uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 193
%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_C1uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 193
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xd7() {
  Assert_real((isalpha(215) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              1080, ("isalpha should be 0 for 0xd7"));
}


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int);
int sigfillset(sigset_t *set) {
  if (set == NULL) {
    __set_errno(EINVAL);
    return -1;
  }
  memset(set, 0xff, sizeof(sigset_t));
  return 0;
}


x86 assembly (clang, -O0):
<sigfillset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <sigfillset+0x31>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <sigfillset+0x4b>
mov    -0x10(%rbp),%rdi
mov    $0xff,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigfillset>:
push   %rax
test   %rdi,%rdi
je     1139 <sigfillset+0x19>
mov    $0xff,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sigfillset(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = call i32 @__set_errno(i32 %7)
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32*, i32** %3
%11 = call i32 @memset(i32* %10, i32 255, i32 4)
store i32 0, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sigfillset(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = tail call i32 @__set_errno(i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @memset(i32* %0, i32 255, i32 4)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ -1, %3 ], [ 0, %6 ]
ret i32 %9
}
char *strerror(int errnum) { return "string error : not supported"; }


x86 assembly (clang, -O0):
<strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strerror>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [29 x i8] c"string error : not supported\00"
define i8* @strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [29 x i8] c"string error : not supported\00"
define i8* @strerror(i32 %0) {
ret i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding(int /*<<< orphan*/ const *);
void add_d(const uint32_t *fcr31, const double *source1, const double *source2,
           double *target) {
  set_rounding(fcr31);
  *target = *source1 + *source2;
}


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

x86 assembly (clang, -O2):
<add_d>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
call   1030 <set_rounding@plt>
movsd  (%rbx),%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @add_d(i32* %0, double* %1, double* %2, double* %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store i32* %0, i32** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load i32*, i32** %5
%10 = call i32 @set_rounding(i32* %9)
%11 = load double*, double** %6
%12 = load double, double* %11
%13 = load double*, double** %7
%14 = load double, double* %13
%15 = fadd double %12, %14
%16 = load double*, double** %8
store double %15, double* %16
ret void
}

LLVM IR (-O2):
define void @add_d(i32* %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = tail call i32 @set_rounding(i32* %0)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fadd double %6, %7
store double %8, double* %3
ret void
}
/* Variables and functions */
int fibo(int);
int /*<<< orphan*/ print_str(char *);
int main() {
  int f = fibo(9);
  print_str("fibo[9] computed as return value should be equal to 55.\n");
  return f;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x9,%edi
call   1040 <fibo@plt>
mov    %eax,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <print_str@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x9,%edi
call   1040 <fibo@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
call   1030 <print_str@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [57 x i8] c"fibo[9] computed as return value should be equal to 55.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @fibo(i32 9)
store i32 %3, i32* %2
%4 = call i32 @print_str(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [57 x i8] c"fibo[9] computed as return value should be equal to 55.\0A\00"
define i32 @main() {
%1 = tail call i32 @fibo(i32 9)
%2 = tail call i32 @print_str(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void INT_Excep_SCIFA11_RXIF11(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCIFA11_RXIF11() {
ret void
}
unsigned int get_sysctl_sched_cfs_boost(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_sysctl_sched_cfs_boost() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void parenthandler(int signo __attribute__((unused))) {
  printf("Expected - Caught signal\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Expected - Caught signal\0A\00"
define void @parenthandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Expected - Caught signal\00"
define void @parenthandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
void __attribute__((
    __warning__("curl_easy_setopt expects a curl_ssl_ctx_callback argument for "
                "this option"))) __attribute__((__unused__))
__attribute__((__no__)) _curl_easy_setopt_err_ssl_ctx_cb(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_ssl_ctx_cb() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
void *malloc(int);
void *iso_alloc_a4k(int count) { return malloc(count); }


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

x86 assembly (clang, -O2):
<iso_alloc_a4k>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @iso_alloc_a4k(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
void g_utf8_strlen() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_strlen() {
ret void
}
/* Variables and functions */
long double expl(int);
int logl(long double);
long double sqrtl(long double num) { return expl(logl(num) / 2); }


x86 assembly (clang, -O0):
<sqrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logl@plt>
mov    %eax,%edi
mov    %edi,%eax
shr    $0x1f,%eax
add    %eax,%edi
sar    %edi
call   1040 <expl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrtl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <logl@plt>
mov    %eax,%edi
shr    $0x1f,%edi
add    %eax,%edi
sar    %edi
add    $0x18,%rsp
jmp    1040 <expl@plt>

LLVM IR (-O0):
define x86_fp80 @sqrtl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @logl(x86_fp80 %3)
%5 = sdiv i32 %4, 2
%6 = call x86_fp80 @expl(i32 %5)
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @sqrtl(x86_fp80 %0) {
%2 = tail call i32 @logl(x86_fp80 %0)
%3 = sdiv i32 %2, 2
%4 = tail call x86_fp80 @expl(i32 %3)
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
scalar_t__ strlen(char *);
int write(int, char *, scalar_t__);
void write_to_server(int filedes) {
  int nbytes;
  nbytes = write(filedes, "Yow!!! Are we having fun yet?!?",
                 strlen("Yow!!! Are we having fun yet?!?") + 1);
  if (nbytes < 0) {
    perror("write");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<write_to_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xea8(%rip),%rdi
call   1040 <strlen@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rdx
add    $0x1,%rdx
lea    0xe92(%rip),%rsi
call   1030 <write@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    119a <write_to_server+0x5a>
lea    0xe99(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_server>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x20,%edx
call   1030 <write@plt>
test   %eax,%eax
js     1148 <write_to_server+0x18>
pop    %rax
ret
lea    0xed1(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Yow!!! Are we having fun yet?!?\00"
@.str.1 = [6 x i8] c"write\00"
@EXIT_FAILURE = global i32 0
define void @write_to_server(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @strlen(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = add nsw i64 %5, 1
%7 = call i32 @write(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Yow!!! Are we having fun yet?!?\00"
@.str.1 = [6 x i8] c"write\00"
@EXIT_FAILURE = global i32 0
define void @write_to_server(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 32)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned char *);
unsigned int logic_byte_shift_left(unsigned char to_shift, size_t shift_by,
                                   unsigned char *p_result) {
  assert(p_result);
  unsigned int err_code = 0;
  if (!p_result) {
    err_code = 2;
    goto end;
  }
  *p_result = (to_shift << shift_by);
end:
  return err_code;
}


x86 assembly (clang, -O0):
<logic_byte_shift_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <assert@plt>
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114d <logic_byte_shift_left+0x3d>
movl   $0x2,-0x1c(%rbp)
jmp    115f <logic_byte_shift_left+0x4f>
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logic_byte_shift_left>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rdx,%rdi
call   1030 <assert@plt>
test   %rbx,%rbx
je     1138 <logic_byte_shift_left+0x28>
movzbl %bpl,%eax
mov    %r14d,%ecx
shl    %cl,%eax
mov    %al,(%rbx)
xor    %eax,%eax
jmp    113d <logic_byte_shift_left+0x2d>
mov    $0x2,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @logic_byte_shift_left(i8 zeroext %0, i64 %1, i8* %2) {
%4 = tail call i32 @assert(i8* %2)
%5 = icmp eq i8* %2, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = zext i8 %0 to i32
%8 = trunc i64 %1 to i32
%9 = shl i32 %7, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ 0, %6 ], [ 2, %3 ]
ret i32 %12
}
unsigned int mem_get_le24_as_int(const void *vmem) {
  unsigned int val;
  const unsigned char *mem = (const unsigned char *)vmem;
  val = mem[2] << 16;
  val |= mem[1] << 8;
  val |= mem[0];
  return val;
}


x86 assembly (clang, -O0):
<mem_get_le24_as_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_get_le24_as_int>:
movzbl 0x2(%rdi),%eax
shl    $0x10,%eax
movzbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movzbl (%rdi),%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @mem_get_le24_as_int(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 16
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 8
%10 = or i32 %9, %5
%11 = load i8, i8* %0
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void snos_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<snos_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):
<snos_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @snos_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ wc_1();
int main() {
  wc_1();
  getchar();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @wc_1()
%2 = tail call i32 (...) @getchar()
ret i32 0
}
void g_param_spec_pool_list() {}


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

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

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

LLVM IR (-O2):
define void @g_param_spec_pool_list() {
ret void
}
void dimensions(int x[]) {
  x[0] = 2;
  x[1] = 7;
  x[2] = 1;
  x[3] = 2;
}


x86 assembly (clang, -O0):
<dimensions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dimensions>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @dimensions(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 2, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 7, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 1, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 2, i32* %10
ret void
}

LLVM IR (-O2):
define void @dimensions(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 2, i32 7, i32 1, i32 2>, <4 x i32>* %2
ret void
}
int js_an_count_bits(unsigned long c) {
  int i = 0;
  while (c) {
    i += c & 1;
    c >>= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<js_an_count_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113d <js_an_count_bits+0x3d>
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <js_an_count_bits+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<js_an_count_bits>:
xor    %eax,%eax
test   %rdi,%rdi
je     1123 <js_an_count_bits+0x23>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <js_an_count_bits+0x10>
ret

LLVM IR (-O0):
define i32 @js_an_count_bits(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i64, i64* %2
%9 = and i64 %8, 1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = add i64 %11, %9
%13 = trunc i64 %12 to i32
store i32 %13, i32* %3
%14 = load i64, i64* %2
%15 = lshr i64 %14, 1
store i64 %15, i64* %2
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @js_an_count_bits(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %9, %3 ], [ %0, %1 ]
%6 = trunc i64 %5 to i32
%7 = and i32 %6, 1
%8 = add i32 %7, %4
%9 = lshr i64 %5, 1
%10 = icmp ult i64 %5, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ RevoCalibrationHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void RevoCalibrationLogging() { UAVObjLogging(RevoCalibrationHandle()); }


x86 assembly (clang, -O0):
<RevoCalibrationLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <RevoCalibrationHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RevoCalibrationLogging>:
push   %rax
xor    %eax,%eax
call   1040 <RevoCalibrationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @RevoCalibrationLogging() {
%1 = call i32 (...) @RevoCalibrationHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @RevoCalibrationLogging() {
%1 = tail call i32 (...) @RevoCalibrationHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
void f153(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({
      a:
        goto a;
        0;
    });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f153>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    1120 <f153+0x20>

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

LLVM IR (-O0):
define void @f153() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
br label %11
11: ; preds = %11, %0
br label %11
}

LLVM IR (-O2):
define void @f153() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
double log(double);
double midi_to_logf(int midi) {
  double logf;
  logf = log(440.0) + (double)(midi - 69) * log(2.0) / 12.0;
  return (logf);
}


x86 assembly (clang, -O0):
<midi_to_logf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  0xeed(%rip),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x45,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec4(%rip),%xmm0
call   1030 <log@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe9e(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<midi_to_logf>:
add    $0xffffffbb,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xef1(%rip),%xmm0
divsd  0xef1(%rip),%xmm0
addsd  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @midi_to_logf(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = call double @log(double 4.400000e+02)
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 69
%7 = sitofp i32 %6 to double
%8 = call double @log(double 2.000000e+00)
%9 = fmul double %7, %8
%10 = fdiv double %9, 1.200000e+01
%11 = fadd double %4, %10
store double %11, double* %3
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @midi_to_logf(i32 %0) {
%2 = add nsw i32 %0, -69
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3FE62E42FEFA39EF
%5 = fdiv double %4, 1.200000e+01
%6 = fadd double %5, 0x401858DB7958D4AC
ret double %6
}