xunge/DecIR huggingface dataset:
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ printf(char *);
void sonarReport(int boatPos, int fishPos) {
  float d;
  for (d = 8; (int)d > abs(boatPos - fishPos); d /= 2) {
    printf("***");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<sonarReport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
cvttss2si -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jle    1182 <sonarReport+0x62>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
movss  0xe90(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113b <sonarReport+0x1b>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sonarReport>:
push   %rbp
push   %rbx
push   %rax
sub    %esi,%edi
mov    %edi,%ebp
neg    %ebp
cmovs  %edi,%ebp
cmp    $0x7,%ebp
ja     1164 <sonarReport+0x44>
movss  0xec7(%rip),%xmm0
lea    0xec8(%rip),%rbx
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xea8(%rip),%xmm0
cvttss2si %xmm0,%eax
cmp    %eax,%ebp
jl     1140 <sonarReport+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"***\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @sonarReport(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
store float 8.000000e+00, float* %5
br label %6
6: ; preds = %16, %2
%7 = load float, float* %5
%8 = fptosi float %7 to i32
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @abs(i32 %11)
%13 = icmp sgt i32 %8, %12
br i1 %13, label %14, label %19
14: ; preds = %6
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14
%17 = load float, float* %5
%18 = fdiv float %17, 2.000000e+00
store float %18, float* %5
br label %6
19: ; preds = %6
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"***\00"
define void @sonarReport(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @llvm.abs.i32(i32 %3, i1 true)
%5 = icmp ult i32 %4, 8
br i1 %5, label %6, label %12
6: ; preds = %2, %6
%7 = phi float [ %9, %6 ], [ 8.000000e+00, %2 ]
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = fmul float %7, 5.000000e-01
%10 = fptosi float %9 to i32
%11 = icmp slt i32 %4, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ input_param(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("Enter 1 file name.\n");
    return 1;
  }
  char *filename = argv[1];
  input_param(filename);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1174 <main+0x54>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <input_param@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <input_param@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter 1 file name.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %17
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = call i32 @input_param(i8* %15)
store i32 0, i32* %3
br label %17
17: ; preds = %11, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [19 x i8] c"Enter 1 file name.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @input_param(i8* %8)
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %11
}
/* Type definitions */
struct dyn_elf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _dl_parse_relocation_information(struct dyn_elf *,
                                                    unsigned long,
                                                    unsigned long);
void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
                                           unsigned long rel_addr,
                                           unsigned long rel_size) {
  _dl_parse_relocation_information(rpnt, rel_addr, rel_size);
}


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

x86 assembly (clang, -O2):
<_dl_parse_lazy_relocation_information>:
jmp    1030 <_dl_parse_relocation_information@plt>

LLVM IR (-O0):
%struct.dyn_elf = type { i32 }
define void @_dl_parse_lazy_relocation_information(%struct.dyn_elf* %0, i64 %1, i64 %2) {
%4 = alloca %struct.dyn_elf*
%5 = alloca i64
%6 = alloca i64
store %struct.dyn_elf* %0, %struct.dyn_elf** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.dyn_elf*, %struct.dyn_elf** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @_dl_parse_relocation_information(%struct.dyn_elf* %7, i64 %8, i64 %9)
ret void
}

LLVM IR (-O2):
%struct.dyn_elf = type { i32 }
define void @_dl_parse_lazy_relocation_information(%struct.dyn_elf* %0, i64 %1, i64 %2) {
%4 = tail call i32 @_dl_parse_relocation_information(%struct.dyn_elf* %0, i64 %1, i64 %2)
ret void
}
int main() {
  int a = 4 + 5;
  int b = 12;
  int c = 18;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x9,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0x12,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 9, i32* %1
store i32 12, i32* %2
store i32 18, i32* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ls_cost_nm3_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_cost_nm3_incref() {
ret void
}
/* Variables and functions */
void *alloca(int);
int /*<<< orphan*/ f(void *, double);
double g(double a, double b, double c, double d) {
  double x, y, z;
  void *p;
  x = a + b;
  y = c * d;
  p = alloca(16);
  f(p, y);
  z = x * y * a;
  return z + b;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x10,%edi
call   1040 <alloca@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
call   1030 <f@plt>
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
sub    $0x28,%rsp
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    $0x10,%edi
call   1040 <alloca@plt>
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
call   1030 <f@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @g(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i8*
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fadd double %13, %14
store double %15, double* %9
%16 = load double, double* %7
%17 = load double, double* %8
%18 = fmul double %16, %17
store double %18, double* %10
%19 = call i8* @alloca(i32 16)
store i8* %19, i8** %12
%20 = load i8*, i8** %12
%21 = load double, double* %10
%22 = call i32 @f(i8* %20, double %21)
%23 = load double, double* %9
%24 = load double, double* %10
%25 = fmul double %23, %24
%26 = load double, double* %5
%27 = fmul double %25, %26
store double %27, double* %11
%28 = load double, double* %11
%29 = load double, double* %6
%30 = fadd double %28, %29
ret double %30
}

LLVM IR (-O2):
define double @g(double %0, double %1, double %2, double %3) {
%5 = fadd double %0, %1
%6 = fmul double %2, %3
%7 = tail call i8* @alloca(i32 16)
%8 = tail call i32 @f(i8* %7, double %6)
%9 = fmul double %5, %6
%10 = fmul double %9, %0
%11 = fadd double %10, %1
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 5;
  int i;
  int a = 0, b = 1, c;
  for (i = 1; i <= n; i++) {
    if (i == n)
      printf("The 5th fibonicchi number is %d ", a);
    c = a + b;
    a = b;
    b = c;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1185 <main+0x75>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1162 <main+0x52>
mov    -0x10(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"The 5th fibonicchi number is %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 0, i32* %4
store i32 1, i32* %5
store i32 1, i32* %3
br label %7
7: ; preds = %24, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %27
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = add nsw i32 %19, %20
store i32 %21, i32* %6
%22 = load i32, i32* %5
store i32 %22, i32* %4
%23 = load i32, i32* %6
store i32 %23, i32* %5
br label %24
24: ; preds = %18
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %7
27: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"The 5th fibonicchi number is %d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
/* Variables and functions */
int f466(int *);
int f467(int *p) { return f466(p); }


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

x86 assembly (clang, -O2):
<f467>:
jmp    1030 <f466@plt>

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

LLVM IR (-O2):
define i32 @f467(i32* %0) {
%2 = tail call i32 @f466(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void noSet8(uint16_t addr, uint8_t val) {
  (void)addr;
  (void)val;
}


x86 assembly (clang, -O0):
<noSet8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @noSet8(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
ret void
}

LLVM IR (-O2):
define void @noSet8(i32 %0, i32 %1) {
ret void
}
int occampi_decl_post_setup(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @occampi_decl_post_setup() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_paths(char *email) {
  printf("show_paths %s", email);
  return;
}


x86 assembly (clang, -O0):
<show_paths>:
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):
<show_paths>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"show_paths %s\00"
define void @show_paths(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Fb_DrawColoredCharacterAt(unsigned int, unsigned int,
                                             unsigned int, int);
void Fb_DrawCharacterAt(unsigned int ch, unsigned int x, unsigned int y) {
  Fb_DrawColoredCharacterAt(ch, x, y, 0xFFFF);
}


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

x86 assembly (clang, -O2):
<Fb_DrawCharacterAt>:
mov    $0xffff,%ecx
jmp    1030 <Fb_DrawColoredCharacterAt@plt>

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

LLVM IR (-O2):
define void @Fb_DrawCharacterAt(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Fb_DrawColoredCharacterAt(i32 %0, i32 %1, i32 %2, i32 65535)
ret void
}
/* Variables and functions */
int memcmp(int const *, int const *, int);
int os_routing_avl_cmp_route_key(const void *p1, const void *p2) {
  const int *ss1, *ss2;
  ss1 = p1;
  ss2 = p2;
  return memcmp(ss1, ss2, sizeof(*ss1));
}


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

x86 assembly (clang, -O2):
<os_routing_avl_cmp_route_key>:
mov    $0x4,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @os_routing_avl_cmp_route_key(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32*, i32** %6
%13 = call i32 @memcmp(i32* %11, i32* %12, i32 4)
ret i32 %13
}

LLVM IR (-O2):
define i32 @os_routing_avl_cmp_route_key(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @memcmp(i32* %3, i32* %4, i32 4)
ret i32 %5
}
void intc_init(void) {
  *(volatile unsigned int *)(0xB2200000 + (0x0C)) = 0xFFFFFFFF;
}


x86 assembly (clang, -O0):
<intc_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb220000c,%eax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<intc_init>:
mov    $0xb220000c,%eax
movl   $0xffffffff,(%rax)
ret

LLVM IR (-O0):
define void @intc_init() {
store volatile i32 -1, i32* inttoptr (i64 2988441612 to i32*)
ret void
}

LLVM IR (-O2):
define void @intc_init() {
store volatile i32 -1, i32* inttoptr (i64 2988441612 to i32*)
ret void
}
unsigned int vhaddu4(unsigned int a, unsigned int b) {
  unsigned int r, s;
  s = a ^ b;
  r = a & b;
  s = s & 0xfefefefe;
  s = s >> 1;
  s = r + s;
  return s;
}


x86 assembly (clang, -O0):
<vhaddu4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
and    $0xfefefefe,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vhaddu4>:
mov    %esi,%eax
xor    %edi,%eax
and    %edi,%esi
shr    %eax
and    $0x7f7f7f7f,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @vhaddu4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %6
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = and i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %6
%14 = and i32 %13, -16843010
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = lshr i32 %15, 1
store i32 %16, i32* %6
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = add i32 %17, %18
store i32 %19, i32* %6
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
define i32 @vhaddu4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = and i32 %1, %0
%5 = lshr i32 %3, 1
%6 = and i32 %5, 2139062143
%7 = add i32 %6, %4
ret i32 %7
}
/* Variables and functions */
char tolower(char);
int IsVowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}


x86 assembly (clang, -O0):
<IsVowel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
je     117f <IsVowel+0x6f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x65,%ecx
mov    %al,-0x2(%rbp)
je     117f <IsVowel+0x6f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x69,%ecx
mov    %al,-0x2(%rbp)
je     117f <IsVowel+0x6f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6f,%ecx
mov    %al,-0x2(%rbp)
je     117f <IsVowel+0x6f>
movsbl -0x1(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsVowel>:
push   %rax
call   1030 <tolower@plt>
lea    -0x61(%rax),%ecx
ror    %cl
cmp    $0x8,%cl
jae    1132 <IsVowel+0x22>
movzbl %cl,%edx
mov    $0x1,%ecx
mov    $0x95,%esi
bt     %edx,%esi
jb     1139 <IsVowel+0x29>
xor    %ecx,%ecx
cmp    $0x75,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IsVowel(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @tolower(i8 signext %3)
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 97
br i1 %7, label %24, label %8
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 101
br i1 %11, label %24, label %12
12: ; preds = %8
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 105
br i1 %15, label %24, label %16
16: ; preds = %12
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 111
br i1 %19, label %24, label %20
20: ; preds = %16
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 117
br label %24
24: ; preds = %20, %16, %12, %8, %1
%25 = phi i1 [ true, %16 ], [ true, %12 ], [ true, %8 ], [ true, %1 ], [ %23, %20 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @IsVowel(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 signext %0)
%3 = add i8 %2, -97
%4 = tail call i8 @llvm.fshl.i8(i8 %3, i8 %3, i8 7)
%5 = icmp ult i8 %4, 8
br i1 %5, label %9, label %6
6: ; preds = %9, %1
%7 = icmp eq i8 %2, 117
%8 = zext i1 %7 to i32
br label %13
9: ; preds = %1
%10 = lshr i8 -107, %4
%11 = and i8 %10, 1
%12 = icmp eq i8 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %9, %6
%14 = phi i32 [ %8, %6 ], [ 1, %9 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ const *EVP_rc2_cfb64();
const EVP_CIPHER *EVP_rc2_cfb(void) { return EVP_rc2_cfb64(); }


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

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

LLVM IR (-O0):
define i32* @EVP_rc2_cfb() {
%1 = call i32* (...) @EVP_rc2_cfb64()
ret i32* %1
}

LLVM IR (-O2):
define i32* @EVP_rc2_cfb() {
%1 = tail call i32* (...) @EVP_rc2_cfb64()
ret i32* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
void stackprotfix(void (*f)(char *, size_t)) {
  char buffer[10];
  f(buffer, sizeof(buffer));
}


x86 assembly (clang, -O0):
<stackprotfix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    -0x12(%rbp),%rdi
mov    $0xa,%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stackprotfix>:
sub    $0x18,%rsp
mov    %rdi,%rax
lea    0xe(%rsp),%rdi
mov    $0xa,%esi
call   *%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @stackprotfix(void (i8*, i64)* %0) {
%2 = alloca void (i8*, i64)*
%3 = alloca [10 x i8]
store void (i8*, i64)* %0, void (i8*, i64)** %2
%4 = load void (i8*, i64)*, void (i8*, i64)** %2
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
ret void
}

LLVM IR (-O2):
define void @stackprotfix(void (i8*, i64)* nocapture %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xac() {
  Assert_real((isdigit(172) == 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_isdigit.c",
              865, ("isdigit should be 0 for 0xac"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xac>:
push   %rax
mov    $0xac,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x361,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xac\00"
define void @t_isdigit_0xac() {
%1 = call i64 @isdigit(i32 172)
%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 865, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xac\00"
define void @t_isdigit_0xac() {
%1 = tail call i64 @isdigit(i32 172)
%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 865, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int log(double);
double reb_random_uniform(int, int);
double sqrt(int);
double reb_random_rayleigh(double sigma) {
  double y = reb_random_uniform(0., 1.);
  return sigma * sqrt(-2 * log(y));
}


x86 assembly (clang, -O0):
<reb_random_rayleigh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <reb_random_uniform@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
imul   $0xfffffffe,%eax,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reb_random_rayleigh>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <reb_random_uniform@plt>
call   1030 <log@plt>
lea    (%rax,%rax,1),%edi
neg    %edi
call   1050 <sqrt@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @reb_random_rayleigh(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call double @reb_random_uniform(i32 0, i32 1)
store double %4, double* %3
%5 = load double, double* %2
%6 = load double, double* %3
%7 = call i32 @log(double %6)
%8 = mul nsw i32 -2, %7
%9 = call double @sqrt(i32 %8)
%10 = fmul double %5, %9
ret double %10
}

LLVM IR (-O2):
define double @reb_random_rayleigh(double %0) {
%2 = tail call double @reb_random_uniform(i32 0, i32 1)
%3 = tail call i32 @log(double %2)
%4 = mul nsw i32 %3, -2
%5 = tail call double @sqrt(i32 %4)
%6 = fmul double %5, %0
ret double %6
}
int abs(int n) {
  if (n < 0)
    return -n;
  return n;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
double Radians(double arg) { return (arg * 1.745329251994330E-2); }


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

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

LLVM IR (-O0):
define double @Radians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3F91DF46A2529D3A
ret double %4
}

LLVM IR (-O2):
define double @Radians(double %0) {
%2 = fmul double %0, 0x3F91DF46A2529D3A
ret double %2
}
__attribute__((noipa)) void *return_alloca_index_cst(int n) {
  int *p = (int *)__builtin_alloca(n);
  p = &p[1];
  sink(p);
  return p;
}


x86 assembly (clang, -O0):
<return_alloca_index_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <sink@plt>
mov    -0x10(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_alloca_index_cst>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
movslq %edi,%rax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
mov    %rcx,%rdx
sub    %rax,%rdx
mov    %rdx,%rsp
neg    %rax
lea    (%rcx,%rax,1),%rbx
add    $0x4,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <sink@plt>
mov    %rbx,%rax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @return_alloca_index_cst(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = call i32 (i32*, ...) bitcast (i32 (...)* @sink to i32 (i32*, ...)*)(i32* %10)
%12 = load i32*, i32** %3
%13 = bitcast i32* %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
define i8* @return_alloca_index_cst(i32 %0) {
%2 = sext i32 %0 to i64
%3 = alloca i8, i64 %2
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = bitcast i8* %4 to i32*
%6 = call i32 (i32*, ...) bitcast (i32 (...)* @sink to i32 (i32*, ...)*)(i32* %5)
ret i8* %4
}
void mutateParam(float *param) {
  *param *= 0.75 + __extension__({
              double tmp = ((((double)ya_random()) * ((double)(0.5))) /
                            ((double)((unsigned int)~0)));
              tmp < 0 ? (-tmp) : tmp;
            });
}


x86 assembly (clang, -O0):
<mutateParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ya_random@plt>
cvtsi2sd %eax,%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1178 <mutateParam+0x68>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1182 <mutateParam+0x72>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe7c(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutateParam>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <ya_random@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xed9(%rip),%xmm0
divsd  0xed9(%rip),%xmm0
movapd 0xee9(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
addsd  0xeb4(%rip),%xmm3
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm3,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @mutateParam(float* %0) {
%2 = alloca float*
%3 = alloca double
%4 = alloca double
store float* %0, float** %2
%5 = call i32 (...) @ya_random()
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 5.000000e-01
%8 = fdiv double %7, 0x41EFFFFFFFE00000
store double %8, double* %3
%9 = load double, double* %3
%10 = fcmp olt double %9, 0.000000e+00
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = fneg double %12
br label %16
14: ; preds = %1
%15 = load double, double* %3
br label %16
16: ; preds = %14, %11
%17 = phi double [ %13, %11 ], [ %15, %14 ]
store double %17, double* %4
%18 = load double, double* %4
%19 = fadd double 7.500000e-01, %18
%20 = load float*, float** %2
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = fmul double %22, %19
%24 = fptrunc double %23 to float
store float %24, float* %20
ret void
}

LLVM IR (-O2):
define void @mutateParam(float* nocapture %0) {
%2 = tail call i32 (...) @ya_random()
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 5.000000e-01
%5 = fdiv double %4, 0x41EFFFFFFFE00000
%6 = fcmp olt double %5, 0.000000e+00
%7 = fneg double %5
%8 = select i1 %6, double %7, double %5
%9 = fadd double %8, 7.500000e-01
%10 = load float, float* %0
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = fptrunc double %12 to float
store float %13, float* %0
ret void
}
int rotate_byte_left(int x) { return ((x << 1) | (x >> 7)) & 255; }


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

x86 assembly (clang, -O2):
<rotate_byte_left>:
lea    (%rdi,%rdi,1),%eax
shr    $0x7,%edi
or     %eax,%edi
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @rotate_byte_left(i32 %0) {
%2 = shl i32 %0, 1
%3 = lshr i32 %0, 7
%4 = or i32 %2, %3
%5 = and i32 %4, 255
ret i32 %5
}
int MediaSetEncodingInterval(int streamid, int value) { return 0; }


x86 assembly (clang, -O0):
<MediaSetEncodingInterval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @MediaSetEncodingInterval(i32 %0, i32 %1) {
ret i32 0
}
void MMA8491Q_READ_REGISTER() {}


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

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

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

LLVM IR (-O2):
define void @MMA8491Q_READ_REGISTER() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_2(char *input) { invalid_phase("2c"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"2c\00"
define void @phase_2(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int, int, int);
void test_multiple(void) {
  __emit_string_literal_range("01234"
                              "\x35"
                              "\066"
                              "789",
                              5, 3, 8);
}


x86 assembly (clang, -O0):
<test_multiple>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
mov    $0x8,%ecx
call   1030 <__emit_string_literal_range@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multiple>:
lea    0xee9(%rip),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
mov    $0x8,%ecx
jmp    1030 <__emit_string_literal_range@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define void @test_multiple() {
%1 = call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 3, i32 8)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define void @test_multiple() {
%1 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 3, i32 8)
ret void
}
/* Variables and functions */
unsigned int _blsmsk_u32(unsigned int);
unsigned int func_blsmsk32_2(unsigned int X) { return _blsmsk_u32(X); }


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

x86 assembly (clang, -O2):
<func_blsmsk32_2>:
jmp    1030 <_blsmsk_u32@plt>

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

LLVM IR (-O2):
define i32 @func_blsmsk32_2(i32 %0) {
%2 = tail call i32 @_blsmsk_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ escape(void *);
void *malloc(int);
__attribute__((no)) void *leakFooSupp() {
  void *ptr = malloc(4);
  escape(ptr);
  return ptr;
}


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

x86 assembly (clang, -O2):
<leakFooSupp>:
push   %rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <escape@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @leakFooSupp() {
%1 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%2 = tail call i32 @escape(i8* %1)
ret i8* %1
}
void event_base_free(struct event_base *base) { (void)base; }


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

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

LLVM IR (-O0):
%struct.event_base = type opaque
define void @event_base_free(%struct.event_base* %0) {
%2 = alloca %struct.event_base*
store %struct.event_base* %0, %struct.event_base** %2
%3 = load %struct.event_base*, %struct.event_base** %2
ret void
}

LLVM IR (-O2):
%struct.event_base = type opaque
define void @event_base_free(%struct.event_base* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printMeter100Needle(int);
void printSpeedometerNeedle(int speed) {
  printMeter100Needle(speed);
  return;
}


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

x86 assembly (clang, -O2):
<printSpeedometerNeedle>:
jmp    1030 <printMeter100Needle@plt>

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

LLVM IR (-O2):
define void @printSpeedometerNeedle(i32 %0) {
%2 = tail call i32 @printMeter100Needle(i32 %0)
ret void
}
void *xmalloc(size)
int size;
{
  void *result = malloc(size);
  if (!result)
    fatal("virtual memory exhausted", 0);
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <xmalloc+0x33>
lea    0xeb6(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
movslq %edi,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1141 <xmalloc+0x21>
lea    0xec8(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0)
br label %7
7: ; preds = %5, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void bar(const char *s) { printf("%s!\n", s); }


x86 assembly (clang, -O0):
<bar>:
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):
<bar>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s!\0A\00"
define void @bar(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void ASN1_item_unpack(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_item_unpack() {
ret void
}
void GB_ISGT_f_FP64(double *z, const double *x, const double *y) {
  (*z) = ((*x) > (*y));
}


x86 assembly (clang, -O0):
<GB_ISGT_f_FP64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_ISGT_f_FP64>:
movsd  (%rdx),%xmm0
cmpltsd (%rsi),%xmm0
movsd  0xeef(%rip),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @GB_ISGT_f_FP64(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = load double, double* %7
%9 = load double*, double** %6
%10 = load double, double* %9
%11 = fcmp ogt double %8, %10
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to double
%14 = load double*, double** %4
store double %13, double* %14
ret void
}

LLVM IR (-O2):
define void @GB_ISGT_f_FP64(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fcmp ogt double %4, %5
%7 = uitofp i1 %6 to double
store double %7, double* %0
ret void
}
int function_a(int n) { return n <= 0 ? 1 : function_a(n - 1) + 1; }


x86 assembly (clang, -O0):
<function_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1132 <function_a+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <function_a+0x33>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <function_a@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_a>:
lea    0x1(%rdi),%ecx
test   %edi,%edi
mov    $0x1,%eax
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @function_a(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = add nuw i32 %0, 1
%4 = select i1 %2, i32 1, i32 %3
ret i32 %4
}
/* Variables and functions */
int sum(int, int);
int triple(int x) { return x + sum(x, x); }


x86 assembly (clang, -O0):
<triple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <sum@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triple>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%esi
call   1030 <sum@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @triple(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @sum(i32 %4, i32 %5)
%7 = add nsw i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @triple(i32 %0) {
%2 = tail call i32 @sum(i32 %0, i32 %0)
%3 = add nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ yield();
void prog1() {
  print("inside prog1\n");
  while (!0) {
    print("1");
    yield();
  }
}


x86 assembly (clang, -O0):
<prog1>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <print@plt>
lea    0xed7(%rip),%rdi
call   1040 <print@plt>
mov    $0x0,%al
call   1030 <yield@plt>
jmp    1130 <prog1+0x10>

x86 assembly (clang, -O2):
<prog1>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <print@plt>
lea    0xeda(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <print@plt>
xor    %eax,%eax
call   1030 <yield@plt>
jmp    1140 <prog1+0x20>

LLVM IR (-O0):
@.str = [14 x i8] c"inside prog1\0A\00"
@.str.1 = [2 x i8] c"1\00"
define void @prog1() {
%1 = call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @yield()
br label %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"inside prog1\0A\00"
@.str.1 = [2 x i8] c"1\00"
define void @prog1() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @yield()
br label %2
}