xunge/DecIR huggingface dataset:
double FPStoMPH(double FPS) {
  double MPH = 0.681818 * FPS;
  return MPH;
}


x86 assembly (clang, -O0):
<FPStoMPH>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPStoMPH>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @FPStoMPH(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 6.818180e-01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @FPStoMPH(double %0) {
%2 = fmul double %0, 6.818180e-01
ret double %2
}
_Bool unsigned_int_to_bool(unsigned int src) { return src; }


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

x86 assembly (clang, -O2):
<unsigned_int_to_bool>:
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define zeroext i1 @unsigned_int_to_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
ret i1 %4
}

LLVM IR (-O2):
define zeroext i1 @unsigned_int_to_bool(i32 %0) {
%2 = icmp ne i32 %0, 0
ret i1 %2
}
/* Variables and functions */
int /*<<< orphan*/ GetTass17OsculatingCoor(double, double, int, double *);
void GetTass17Coor(double jd, int body, double *xyz) {
  GetTass17OsculatingCoor(jd, jd, body, xyz);
}


x86 assembly (clang, -O0):
<GetTass17Coor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <GetTass17OsculatingCoor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTass17Coor>:
movaps %xmm0,%xmm1
jmp    1030 <GetTass17OsculatingCoor@plt>

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

LLVM IR (-O2):
define void @GetTass17Coor(double %0, i32 %1, double* %2) {
%4 = tail call i32 @GetTass17OsculatingCoor(double %0, double %0, i32 %1, double* %2)
ret void
}
int plus(int a) { return (a == 29999) ? 0 : (a + 1); }


x86 assembly (clang, -O0):
<plus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x752f,-0x4(%rbp)
jne    111e <plus+0x1e>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <plus+0x27>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x752f,%edi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @plus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 29999
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
br label %9
9: ; preds = %6, %5
%10 = phi i32 [ 0, %5 ], [ %8, %6 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @plus(i32 %0) {
%2 = icmp eq i32 %0, 29999
%3 = add nsw i32 %0, 1
%4 = select i1 %2, i32 0, i32 %3
ret i32 %4
}
int read(int file, char *ptr, int len) { return 0; }


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nmi_wait();
void delay(unsigned int i) {
  while (--i)
    nmi_wait();
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1139 <delay+0x29>
mov    $0x0,%al
call   1030 <nmi_wait@plt>
jmp    111b <delay+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
mov    %edi,%ebx
add    $0xffffffff,%ebx
je     112c <delay+0x1c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nmi_wait@plt>
add    $0xffffffff,%ebx
jne    1120 <delay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @nmi_wait()
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 (...) @nmi_wait()
%7 = add i32 %5, -1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
void swap(int *a, int i, int j) {
  int temp = a[i];
  a[i] = a[j];
  a[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int fwWrite(char const *, int, int, int);
int _write(int file, const char *ptr, int len) {
  return fwWrite(ptr, 1, len, file);
  return len;
}


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

x86 assembly (clang, -O2):
<_write>:
mov    %edi,%ecx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fwWrite@plt>

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @fwWrite(i8* %1, i32 1, i32 %2, i32 %0)
ret i32 %4
}
int test_imm_82uint8_mem(unsigned char *val) {
  return ((*val) & (-0x82 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_82uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 126
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_94uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x94 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_94uint64_highword_reg>:
movabs $0x9400000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_94uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 148
%6 = icmp ne i64 %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_94uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 635655159808
%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__ isgraph(int);
void t_isgraph_0x8c() {
  Assert_real((isgraph(140) == 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_isgraph.c",
              705, ("isgraph should be 0 for 0x8c"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x8c>:
push   %rax
mov    $0x8c,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2c1,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x8c\00"
define void @t_isgraph_0x8c() {
%1 = call i64 @isgraph(i32 140)
%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 705, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x8c\00"
define void @t_isgraph_0x8c() {
%1 = tail call i64 @isgraph(i32 140)
%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 705, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main(void) {
  void *a;
  int b = 846434;
  a = (void *)b;
  printf("%f\n", (float *)a);
  printf("%d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xcea62,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xcea62,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0xcea62,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i32 846434, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to float*
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %8)
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* inttoptr (i64 846434 to float*))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 846434)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float number1;
  scanf("%f", &number1);
  exact_square(number1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1030 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = call i32 @exact_square(float %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = call i32 @exact_square(float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void *, int);
void convertIntToByteArray(int value, char *byteArray) {
  memcpy(byteArray, (void *)&value, sizeof(int));
}


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

x86 assembly (clang, -O2):
<convertIntToByteArray>:
push   %rax
mov    %rsi,%rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @convertIntToByteArray(i32 %0, i8* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i8* %1, i8* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
void *zalloc(int size) {
  void *p = malloc(size);
  if (!p) {
    printf("out of memory!\r\n");
    exit(1);
  }
  memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1178 <zalloc+0x38>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <malloc@plt>
test   %rax,%rax
je     1168 <zalloc+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe91(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"out of memory!\0D\0A\00"
define i8* @zalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i32, i32* %2
%14 = call i32 @memset(i8* %12, i32 0, i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@str = [16 x i8] c"out of memory!\0D\00"
define i8* @zalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
%8 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ VW_MarkUpdateBlock(int, int, int, int);
int /*<<< orphan*/ VW_Vlin(int, int, int, int);
void VWB_Vlin(int y1, int y2, int x, int color) {
  if (VW_MarkUpdateBlock(x, y1, x, y2))
    VW_Vlin(y1, y2, x, color);
}


x86 assembly (clang, -O0):
<VWB_Vlin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
call   1040 <VW_MarkUpdateBlock@plt>
cmp    $0x0,%rax
je     1160 <VWB_Vlin+0x40>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <VW_Vlin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VWB_Vlin>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %edi,%ebx
mov    %edx,%edi
mov    %ebx,%esi
mov    %r15d,%ecx
call   1040 <VW_MarkUpdateBlock@plt>
test   %rax,%rax
je     115b <VWB_Vlin+0x3b>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <VW_Vlin@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @VWB_Vlin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = call i64 @VW_MarkUpdateBlock(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @VW_Vlin(i32 %16, i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %15, %4
ret void
}

LLVM IR (-O2):
define void @VWB_Vlin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i64 @VW_MarkUpdateBlock(i32 %2, i32 %0, i32 %2, i32 %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @VW_Vlin(i32 %0, i32 %1, i32 %2, i32 %3)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkInput(int *);
int /*<<< orphan*/ isRemaniderZero(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int number;
  printf("Enter number: ");
  checkInput(&number);
  isRemaniderZero(number);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1050 <checkInput@plt>
mov    -0x8(%rbp),%edi
call   1030 <isRemaniderZero@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1050 <checkInput@plt>
mov    0x4(%rsp),%edi
call   1030 <isRemaniderZero@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @isRemaniderZero(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter number: \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkInput(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @isRemaniderZero(i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
int execute_sched_setaffinity() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_setaffinity() {
ret i32 0
}
void ARGBShuffleRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBShuffleRow_Any_NEON() {
ret void
}
void do_nothing_sl(struct statement_list *e, struct traversal_algorithm *algo) {
  (void)(e);
  (void)(algo);
}


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

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

LLVM IR (-O0):
%struct.statement_list = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_sl(%struct.statement_list* %0, %struct.traversal_algorithm* %1) {
%3 = alloca %struct.statement_list*
%4 = alloca %struct.traversal_algorithm*
store %struct.statement_list* %0, %struct.statement_list** %3
store %struct.traversal_algorithm* %1, %struct.traversal_algorithm** %4
%5 = load %struct.statement_list*, %struct.statement_list** %3
%6 = load %struct.traversal_algorithm*, %struct.traversal_algorithm** %4
ret void
}

LLVM IR (-O2):
%struct.statement_list = type opaque
%struct.traversal_algorithm = type opaque
define void @do_nothing_sl(%struct.statement_list* nocapture %0, %struct.traversal_algorithm* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_135() {
  Assert_real((isqrt(135) == 11),
              "/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",
              680, ("Integer square root of 135 should be 11"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_135>:
push   %rax
mov    $0x87,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x2a8,%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 135 should be 11\00"
define void @t_sqrt_135() {
%1 = call i32 @isqrt(i32 135)
%2 = icmp eq i32 %1, 11
%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 680, 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 135 should be 11\00"
define void @t_sqrt_135() {
%1 = tail call i32 @isqrt(i32 135)
%2 = icmp eq i32 %1, 11
%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 680, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int pthread_key_create(int /*<<< orphan*/ *, void (*)(void *));
int key_create(pthread_key_t *key, void (*destructor)(void *)) {
  if (pthread_key_create)
    return pthread_key_create(key, destructor);
  return 0;
}


x86 assembly (clang, -O0):
<key_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    112f <key_create+0x1f>
jmp    1144 <key_create+0x34>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <pthread_key_create@plt>
mov    %eax,-0x4(%rbp)
jmp    114b <key_create+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_create>:
jmp    1030 <pthread_key_create@plt>

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

LLVM IR (-O2):
define i32 @key_create(i32* %0, void (i8*)* %1) {
%3 = tail call i32 @pthread_key_create(i32* %0, void (i8*)* %1)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef unsigned long long uint64_t;

/* Variables and functions */
uint64_t le32_lget(const uint8_t *addr) {
  uint64_t val = 0;
  val += ((unsigned long long)(addr[3]) << ((3) * 8));
  val += ((unsigned long long)(addr[2]) << ((2) * 8));
  val += ((unsigned long long)(addr[1]) << ((1) * 8));
  val += ((unsigned long long)(addr[0]) << ((0) * 8));
  return val;
}


x86 assembly (clang, -O0):
<le32_lget>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
shl    $0x10,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le32_lget>:
mov    0x18(%rdi),%rcx
shl    $0x18,%rcx
mov    0x8(%rdi),%rax
mov    0x10(%rdi),%rdx
shl    $0x10,%rdx
add    %rcx,%rdx
shl    $0x8,%rax
add    %rdx,%rax
add    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @le32_lget(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = shl i64 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 2
%6 = load i64, i64* %5
%7 = shl i64 %6, 16
%8 = add i64 %7, %4
%9 = getelementptr inbounds i64, i64* %0, i64 1
%10 = load i64, i64* %9
%11 = shl i64 %10, 8
%12 = add i64 %8, %11
%13 = load i64, i64* %0
%14 = add i64 %12, %13
ret i64 %14
}
/* Type definitions */
struct dh_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy_ctx(struct dh_ctx *);
void dh_destroy(struct dh_ctx *ctx) { destroy_ctx(ctx); }


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

x86 assembly (clang, -O2):
<dh_destroy>:
jmp    1030 <destroy_ctx@plt>

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

LLVM IR (-O2):
%struct.dh_ctx = type { i32 }
define void @dh_destroy(%struct.dh_ctx* %0) {
%2 = tail call i32 @destroy_ctx(%struct.dh_ctx* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
void ft_puterr(char *file, int no) {
  if (no != 0) {
    ft_putstr("tail: ");
    ft_putstr(file);
    ft_putstr(": ");
    if (no == 2)
      ft_putstr("No such file or directory\n");
  }
}


x86 assembly (clang, -O0):
<ft_puterr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1165 <ft_puterr+0x55>
lea    0xed0(%rip),%rdi
call   1030 <ft_putstr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ft_putstr@plt>
lea    0xebf(%rip),%rdi
call   1030 <ft_putstr@plt>
cmpl   $0x2,-0xc(%rbp)
jne    1160 <ft_puterr+0x50>
lea    0xeac(%rip),%rdi
call   1030 <ft_putstr@plt>
jmp    1165 <ft_puterr+0x55>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_puterr>:
test   %esi,%esi
je     1156 <ft_puterr+0x46>
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xedc(%rip),%rdi
call   1030 <ft_putstr@plt>
mov    %r14,%rdi
call   1030 <ft_putstr@plt>
lea    0xecc(%rip),%rdi
call   1030 <ft_putstr@plt>
cmp    $0x2,%ebx
lea    0x8(%rsp),%rsp
pop    %rbx
pop    %r14
jne    1156 <ft_puterr+0x46>
lea    0xeb6(%rip),%rdi
jmp    1030 <ft_putstr@plt>
ret

LLVM IR (-O0):
@.str = [7 x i8] c"tail: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [27 x i8] c"No such file or directory\0A\00"
define void @ft_puterr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %2
%8 = call i32 @ft_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %3
%10 = call i32 @ft_putstr(i8* %9)
%11 = call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %16
14: ; preds = %7
%15 = call i32 @ft_putstr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %7
br label %17
17: ; preds = %16, %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"tail: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [27 x i8] c"No such file or directory\0A\00"
define void @ft_puterr(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @ft_putstr(i8* %0)
%7 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %1, 2
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %4, %9, %2
ret void
}
double genann_act_threshold(double a) { return a > 0; }


x86 assembly (clang, -O0):
<genann_act_threshold>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genann_act_threshold>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xeef(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @genann_act_threshold(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @genann_act_threshold(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = uitofp i1 %2 to double
ret double %3
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ sival_ptr;
};
struct TYPE_5__ {
  TYPE_1__ si_value;
};
typedef TYPE_2__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void sighandler(int signo, siginfo_t *pstinfo, void *context) {
  printf("%s\n", (char *)pstinfo->si_value.sival_ptr);
  return;
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
mov    (%rsi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64 }
@.str = [4 x i8] c"%s\0A\00"
define void @sighandler(i32 %0, %struct.TYPE_5__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_5__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_5__* %1, %struct.TYPE_5__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = inttoptr i64 %10 to i8*
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64 }
@.str = [4 x i8] c"%s\0A\00"
define void @sighandler(i32 %0, %struct.TYPE_5__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 0, i32 0
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
int Log2Ceil(int x) {
  int i = 0;
  if (x == 0)
    return 0;
  x--;
  while (x > 0) {
    x >>= 1;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<Log2Ceil>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <Log2Ceil+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1154 <Log2Ceil+0x54>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114e <Log2Ceil+0x4e>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <Log2Ceil+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log2Ceil>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111c <Log2Ceil+0x1c>
add    $0xffffffff,%edi
xor    %eax,%eax
mov    %edi,%ecx
xchg   %ax,%ax
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <Log2Ceil+0x10>
ret

LLVM IR (-O0):
define i32 @Log2Ceil(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, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %21
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add nsw i32 %9, -1
store i32 %10, i32* %3
br label %11
11: ; preds = %14, %8
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i32, i32* %3
%16 = ashr i32 %15, 1
store i32 %16, i32* %3
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %11
19: ; preds = %11
%20 = load i32, i32* %4
store i32 %20, i32* %2
br label %21
21: ; preds = %19, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @Log2Ceil(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = add nsw i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ 0, %3 ]
%7 = phi i32 [ %8, %5 ], [ %4, %3 ]
%8 = lshr i32 %7, 1
%9 = add nuw nsw i32 %6, 1
%10 = icmp ult i32 %7, 2
br i1 %10, label %11, label %5
11: ; preds = %5, %1
%12 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %12
}
int emit_program(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @emit_program() {
ret i32 0
}
void LPCConfigSet(unsigned long ulBase, unsigned long ulConfig) {
  unsigned long ulTemp;
  ;
  ;
  ulTemp = (*((volatile unsigned long *)(ulBase + 0x00000000)));
  ulTemp &= ~0x00000100;
  ulTemp |= (ulConfig & 0x00000100);
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ulTemp;
}


x86 assembly (clang, -O0):
<LPCConfigSet>:
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    -0x18(%rbp),%rax
and    $0xfffffffffffffeff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x100,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCConfigSet>:
mov    $0xfffffffffffffeff,%rax
and    (%rdi),%rax
and    $0x100,%esi
or     %rax,%rsi
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @LPCConfigSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 0
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -257
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = and i64 %12, 256
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %3
%18 = add i64 %17, 0
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
ret void
}

LLVM IR (-O2):
define void @LPCConfigSet(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -257
%6 = and i64 %1, 256
%7 = or i64 %5, %6
store volatile i64 %7, i64* %3
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
void *malloc(size_t);
void *default_alloc(size_t size, int zero,
                    void *user_data __attribute__((unused))) {
  return zero ? calloc(1, size) : malloc(size);
}


x86 assembly (clang, -O0):
<default_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1154 <default_alloc+0x34>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
jmp    1161 <default_alloc+0x41>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_alloc>:
mov    %rdi,%rax
test   %esi,%esi
je     1134 <default_alloc+0x14>
mov    $0x1,%edi
mov    %rax,%rsi
jmp    1030 <calloc@plt>
mov    %rax,%rdi
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @default_alloc(i64 %0, i32 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i64, i64* %4
%11 = call i8* @calloc(i32 1, i64 %10)
br label %15
12: ; preds = %3
%13 = load i64, i64* %4
%14 = call i8* @malloc(i64 %13)
br label %15
15: ; preds = %12, %9
%16 = phi i8* [ %11, %9 ], [ %14, %12 ]
ret i8* %16
}

LLVM IR (-O2):
define i8* @default_alloc(i64 %0, i32 %1, i8* nocapture readnone %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i8* @calloc(i32 1, i64 %0)
br label %9
7: ; preds = %3
%8 = tail call i8* @malloc(i64 %0)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ft_strcpy(char *, char const *);
scalar_t__ ft_strlen(char const *);
scalar_t__ malloc(scalar_t__);
char *ft_strdup(const char *s1) {
  char *s2;
  if ((s2 = (char *)malloc(ft_strlen(s1) + 1)))
    ft_strcpy(s2, s1);
  else
    exit(1);
  return (s2);
}


x86 assembly (clang, -O0):
<ft_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1181 <ft_strdup+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ft_strcpy@plt>
jmp    118b <ft_strdup+0x4b>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <ft_strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1173 <ft_strdup+0x33>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <ft_strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i8* @ft_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @ft_strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @ft_strcpy(i8* %11, i8* %12)
br label %16
14: ; preds = %1
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %10
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @ft_strdup(i8* %0) {
%2 = tail call i64 @ft_strlen(i8* %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @ft_strcpy(i8* %5, i8* %0)
ret i8* %5
9: ; preds = %1
%10 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_message_to_stderr(const char *message) {
  (void)printf("<<<ERR>>> %s", message);
}


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

x86 assembly (clang, -O2):
<print_message_to_stderr>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<<<ERR>>> %s\00"
define void @print_message_to_stderr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<<<ERR>>> %s\00"
define void @print_message_to_stderr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float quintIn(int, float, float, float);
float quintOut(float fraction, float start, float delta, float slope) {
  return quintIn(1 - fraction, start + delta, -delta, slope);
}


x86 assembly (clang, -O0):
<quintOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xecc(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x10(%rbp),%xmm2
call   1030 <quintIn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quintOut>:
movss  0xee8(%rip),%xmm4
subss  %xmm0,%xmm4
cvttss2si %xmm4,%edi
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
xorps  0xee2(%rip),%xmm2
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <quintIn@plt>

LLVM IR (-O0):
define float @quintOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = fsub float 1.000000e+00, %9
%11 = fptosi float %10 to i32
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fadd float %12, %13
%15 = load float, float* %7
%16 = fneg float %15
%17 = load float, float* %8
%18 = call float @quintIn(i32 %11, float %14, float %16, float %17)
ret float %18
}

LLVM IR (-O2):
define float @quintOut(float %0, float %1, float %2, float %3) {
%5 = fsub float 1.000000e+00, %0
%6 = fptosi float %5 to i32
%7 = fadd float %1, %2
%8 = fneg float %2
%9 = tail call float @quintIn(i32 %6, float %7, float %8, float %3)
ret float %9
}