xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
char *input(char *prompt) {
  char *buffer = malloc(10000 * sizeof(char *));
  printf("%s", prompt);
  fgets(buffer, 10000, stdin);
  buffer[strlen(buffer) - 1] = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x13880,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x13880,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xea5(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x2710,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i8* @input(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 80000)
store i8* %4, i8** %3
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %7, i32 10000, i32 %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %10, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i8* @input(i8* %0) {
%2 = tail call dereferenceable_or_null(80000) i8* @malloc(i32 80000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stdin
%5 = tail call i32 @fgets(i8* %2, i32 10000, i32 %4)
%6 = tail call i32 @strlen(i8* %2)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %2, i64 %8
store i8 0, i8* %9
ret i8* %2
}
int lettura_matrice(int matrice[], unsigned int numero_posizione) {
  return (matrice[numero_posizione]);
}


x86 assembly (clang, -O0):
<lettura_matrice>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lettura_matrice>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @lettura_matrice(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
double dms2deg(double d, double m, double s) {
  return (d + m / 60.0 + s / 3600.0);
}


x86 assembly (clang, -O0):
<dms2deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xee3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xec6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dms2deg>:
unpcklpd %xmm2,%xmm1
divpd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dms2deg(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* %4
%8 = load double, double* %5
%9 = fdiv double %8, 6.000000e+01
%10 = fadd double %7, %9
%11 = load double, double* %6
%12 = fdiv double %11, 3.600000e+03
%13 = fadd double %10, %12
ret double %13
}

LLVM IR (-O2):
define double @dms2deg(double %0, double %1, double %2) {
%4 = insertelement <2 x double> poison, double %1, i64 0
%5 = insertelement <2 x double> %4, double %2, i64 1
%6 = fdiv <2 x double> %5, <double 6.000000e+01, double 3.600000e+03>
%7 = extractelement <2 x double> %6, i64 0
%8 = fadd double %7, %0
%9 = extractelement <2 x double> %6, i64 1
%10 = fadd double %8, %9
ret double %10
}
/* Variables and functions */
int check_for_control_characters(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int check_for_control_characters_cstr(const char *buf) {
  return check_for_control_characters(buf, strlen(buf));
}


x86 assembly (clang, -O0):
<check_for_control_characters_cstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <check_for_control_characters@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_for_control_characters_cstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <check_for_control_characters@plt>

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

LLVM IR (-O2):
define i32 @check_for_control_characters_cstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @check_for_control_characters(i8* %0, i32 %2)
ret i32 %3
}
void sample_state() {}


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

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

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

LLVM IR (-O2):
define void @sample_state() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_5(void *dest, void *src) {
  memcpy(dest, src, 5);
}


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

x86 assembly (clang, -O2):
<memcpy_5>:
mov    $0x5,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_5(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
scalar_t__ ceph_frag_bits(int /*<<< orphan*/);
int /*<<< orphan*/ ceph_frag_make(scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ ceph_frag_value(int /*<<< orphan*/);
__u32 ceph_frag_left_child(__u32 f) {
  return ceph_frag_make(ceph_frag_bits(f) + 1, ceph_frag_value(f));
}


x86 assembly (clang, -O0):
<ceph_frag_left_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ceph_frag_bits@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <ceph_frag_value@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <ceph_frag_make@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceph_frag_left_child>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <ceph_frag_bits@plt>
lea    0x1(%rax),%r14
mov    %ebx,%edi
call   1050 <ceph_frag_value@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ceph_frag_make@plt>

LLVM IR (-O0):
define i32 @ceph_frag_left_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ceph_frag_bits(i32 %3)
%5 = add nsw i64 %4, 1
%6 = load i32, i32* %2
%7 = call i32 @ceph_frag_value(i32 %6)
%8 = call i32 @ceph_frag_make(i64 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @ceph_frag_left_child(i32 %0) {
%2 = tail call i64 @ceph_frag_bits(i32 %0)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @ceph_frag_value(i32 %0)
%5 = tail call i32 @ceph_frag_make(i64 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x3a() {
  Assert_real((isalnum(58) == 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_isalnum.c",
              295, ("isalnum should be 0 for :"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x3a>:
push   %rax
mov    $0x3a,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x127,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for :\00"
define void @t_isalnum_0x3a() {
%1 = call i64 @isalnum(i32 58)
%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 295, i8* getelementptr inbounds ([26 x i8], [26 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for :\00"
define void @t_isalnum_0x3a() {
%1 = tail call i64 @isalnum(i32 58)
%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 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int my_strlen(char *c) {
  int length = -1;
  if (c != ((void *)0)) {
    ++length;
    for (; *c != '\0'; c++)
      ++length;
  }
  return length;
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <my_strlen+0x52>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114d <my_strlen+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <my_strlen+0x23>
jmp    1152 <my_strlen+0x52>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
test   %rdi,%rdi
je     111c <my_strlen+0x1c>
cmpb   $0x0,(%rdi)
je     1122 <my_strlen+0x22>
xor    %eax,%eax
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <my_strlen+0x10>
ret
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ -1, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
const char *LZ4_versionString(void) { return "1.8.2"; }


x86 assembly (clang, -O0):
<LZ4_versionString>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.8.2\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.8.2\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void printDebugInfo(void *copter_state) {}


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

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

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

LLVM IR (-O2):
define void @printDebugInfo(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_write_004x(int /*<<< orphan*/);
void io_write_0040() { io_write_004x(0); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <io_write_004x@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %edi,%edi
jmp    1030 <io_write_004x@plt>

LLVM IR (-O0):
define void @io_write_0040() {
%1 = call i32 @io_write_004x(i32 0)
ret void
}

LLVM IR (-O2):
define void @io_write_0040() {
%1 = tail call i32 @io_write_004x(i32 0)
ret void
}
float clampf(float value, float min, float max) {
  return value < min ? min : (value > max ? max : value);
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clampf+0x35>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1167 <clampf+0x67>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1153 <clampf+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clampf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp olt float %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %5
br label %22
12: ; preds = %3
%13 = load float, float* %4
%14 = load float, float* %6
%15 = fcmp ogt float %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load float, float* %6
br label %20
18: ; preds = %12
%19 = load float, float* %4
br label %20
20: ; preds = %18, %16
%21 = phi float [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi float [ %11, %10 ], [ %21, %20 ]
ret float %23
}

LLVM IR (-O2):
define float @clampf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ takes_array_of_floats(float *);
void test_array_of_floats(void) {
  float a[4] = {1.0, 2.0, 3.0, 4.0};
  takes_array_of_floats(a);
}


x86 assembly (clang, -O0):
<test_array_of_floats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <takes_array_of_floats@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_array_of_floats>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <takes_array_of_floats@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_array_of_floats.a = [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00]
define void @test_array_of_floats() {
%1 = alloca [4 x float]
%2 = bitcast [4 x float]* %1 to i8*
%3 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%4 = call i32 @takes_array_of_floats(float* %3)
ret void
}

LLVM IR (-O2):
@__const.test_array_of_floats.a = [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00]
define void @test_array_of_floats() {
%1 = alloca [4 x float]
%2 = bitcast [4 x float]* %1 to i8*
%3 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%4 = call i32 @takes_array_of_floats(float* %3)
ret void
}
void show_ddr_info(void) {}


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

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

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

LLVM IR (-O2):
define void @show_ddr_info() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setup();
int /*<<< orphan*/ shell_loop();
int main(void) {
  setup();
  shell_loop();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @shell_loop()
ret i32 0
}
/* Variables and functions */
scalar_t__ isprime(long);
long prime(long i) {
  if ((i & 1) == 0)
    i++;
  for (;;) {
    if (isprime(i))
      return (i);
    i += 2;
  }
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    113a <prime+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    113f <prime+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <isprime@plt>
cmp    $0x0,%rax
je     115c <prime+0x4c>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    113f <prime+0x2f>

x86 assembly (clang, -O2):
<prime>:
push   %rbx
mov    %edi,%ebx
not    %ebx
and    $0x1,%ebx
add    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <isprime@plt>
add    $0x2,%rbx
test   %rax,%rax
je     1120 <prime+0x10>
add    $0xfffffffffffffffe,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @prime(i64 %0) {
%2 = and i64 %0, 1
%3 = xor i64 %2, 1
%4 = add nsw i64 %3, %0
br label %5
5: ; preds = %5, %1
%6 = phi i64 [ %4, %1 ], [ %9, %5 ]
%7 = tail call i64 @isprime(i64 %6)
%8 = icmp eq i64 %7, 0
%9 = add nsw i64 %6, 2
br i1 %8, label %5, label %10
10: ; preds = %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xa4() {
  Assert_real((ispunct(164) == 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_ispunct.c",
              825, ("ispunct should be 0 for 0xa4"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xa4>:
push   %rax
mov    $0xa4,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x339,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa4\00"
define void @t_ispunct_0xa4() {
%1 = call i64 @ispunct(i32 164)
%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 825, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa4\00"
define void @t_ispunct_0xa4() {
%1 = tail call i64 @ispunct(i32 164)
%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 825, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
void terminate_str_r(char *str, char what) {
  char *dummy = strrchr(str, what);
  if (dummy)
    *dummy = 0x00;
}


x86 assembly (clang, -O0):
<terminate_str_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1145 <terminate_str_r+0x35>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate_str_r>:
push   %rax
call   1030 <strrchr@plt>
test   %rax,%rax
je     111e <terminate_str_r+0xe>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @terminate_str_r(i8* %0, i8 signext %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
store i8 0, i8* %3
br label %6
6: ; preds = %5, %2
ret void
}
/* Type definitions */
struct btrfs_feature_attr {
  int dummy;
};
struct attribute {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ attr_to_btrfs_attr(struct attribute *);
struct btrfs_feature_attr *to_btrfs_feature_attr(int /*<<< orphan*/);
struct btrfs_feature_attr *attr_to_btrfs_feature_attr(struct attribute *attr) {
  return to_btrfs_feature_attr(attr_to_btrfs_attr(attr));
}


x86 assembly (clang, -O0):
<attr_to_btrfs_feature_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <attr_to_btrfs_attr@plt>
mov    %eax,%edi
call   1040 <to_btrfs_feature_attr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attr_to_btrfs_feature_attr>:
push   %rax
call   1030 <attr_to_btrfs_attr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <to_btrfs_feature_attr@plt>

LLVM IR (-O0):
%struct.btrfs_feature_attr = type { i32 }
%struct.attribute = type { i32 }
define %struct.btrfs_feature_attr* @attr_to_btrfs_feature_attr(%struct.attribute* %0) {
%2 = alloca %struct.attribute*
store %struct.attribute* %0, %struct.attribute** %2
%3 = load %struct.attribute*, %struct.attribute** %2
%4 = call i32 @attr_to_btrfs_attr(%struct.attribute* %3)
%5 = call %struct.btrfs_feature_attr* @to_btrfs_feature_attr(i32 %4)
ret %struct.btrfs_feature_attr* %5
}

LLVM IR (-O2):
%struct.btrfs_feature_attr = type { i32 }
%struct.attribute = type { i32 }
define %struct.btrfs_feature_attr* @attr_to_btrfs_feature_attr(%struct.attribute* %0) {
%2 = tail call i32 @attr_to_btrfs_attr(%struct.attribute* %0)
%3 = tail call %struct.btrfs_feature_attr* @to_btrfs_feature_attr(i32 %2)
ret %struct.btrfs_feature_attr* %3
}
int MPI_Get_processor_name(char *proc_name, int *proc_name_len) {
  proc_name[0] = 'm';
  proc_name[1] = 'a';
  proc_name[2] = 's';
  proc_name[3] = 't';
  proc_name[4] = 'e';
  proc_name[5] = 'r';
  proc_name[6] = 0;
  *proc_name_len = 6;
  return 1;
}


x86 assembly (clang, -O0):
<MPI_Get_processor_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x6d,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x61,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x73,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0x74,0x3(%rax)
mov    -0x8(%rbp),%rax
movb   $0x65,0x4(%rax)
mov    -0x8(%rbp),%rax
movb   $0x72,0x5(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x6(%rax)
mov    -0x10(%rbp),%rax
movl   $0x6,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPI_Get_processor_name>:
movl   $0x7473616d,(%rdi)
movw   $0x7265,0x4(%rdi)
movb   $0x0,0x6(%rdi)
movl   $0x6,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @MPI_Get_processor_name(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 109, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 97, i8* %8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 2
store i8 115, i8* %10
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 3
store i8 116, i8* %12
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 4
store i8 101, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 5
store i8 114, i8* %16
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 6
store i8 0, i8* %18
%19 = load i32*, i32** %4
store i32 6, i32* %19
ret i32 1
}

LLVM IR (-O2):
define i32 @MPI_Get_processor_name(i8* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i8 109, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 97, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 2
store i8 115, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 3
store i8 116, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 4
store i8 101, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 5
store i8 114, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 6
store i8 0, i8* %8
store i32 6, i32* %1
ret i32 1
}
void foo703(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo703(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ESRCH;
int /*<<< orphan*/ errno;
int kill(int pid, int sig) {
  errno = ESRCH;
  return -1;
}


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ESRCH = global i32 0
@errno = global i32 0
define i32 @kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ESRCH
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESRCH = global i32 0
@errno = global i32 0
define i32 @kill(i32 %0, i32 %1) {
%3 = load i32, i32* @ESRCH
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
char *malloc(int);
int main(int argc, char *argv[]) {
  char *pointer1 = 0;
  char *pointer2 = 0;
  pointer1 = malloc(64);
  pointer2 = pointer1;
  pointer1 = NULL;
  pointer2 = NULL;
  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)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x40,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
%8 = call i8* @malloc(i32 64)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
store i8* %9, i8** %7
store i8* null, i8** %6
store i8* null, i8** %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
double sum_x_array(double *values, int length, double (*fn)(double)) {
  double sum = 0;
  int i = 0;
  for (i = 0; i != length; ++i) {
    sum += (*fn)(values[i]);
  }
  return sum;
}


x86 assembly (clang, -O0):
<sum_x_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1160 <sum_x_array+0x60>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x24(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
call   *%rax
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1129 <sum_x_array+0x29>
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_x_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     114c <sum_x_array+0x4c>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
xorps  %xmm0,%xmm0
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  (%r15,%rbx,8),%xmm0
call   *%r14
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1120 <sum_x_array+0x20>
jmp    114f <sum_x_array+0x4f>
xorps  %xmm0,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define double @sum_x_array(double* %0, i32 %1, double (double)* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca double (double)*
%7 = alloca double
%8 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store double (double)* %2, double (double)** %6
store double 0.000000e+00, double* %7
store i32 0, i32* %8
store i32 0, i32* %8
br label %9
9: ; preds = %23, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load double (double)*, double (double)** %6
%15 = load double*, double** %4
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
%19 = load double, double* %18
%20 = call double %14(double %19)
%21 = load double, double* %7
%22 = fadd double %21, %20
store double %22, double* %7
br label %23
23: ; preds = %13
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %9
26: ; preds = %9
%27 = load double, double* %7
ret double %27
}

LLVM IR (-O2):
define double @sum_x_array(double* nocapture %0, i32 %1, double (double)* nocapture %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %14, %7 ]
%9 = phi double [ 0.000000e+00, %5 ], [ %13, %7 ]
%10 = getelementptr inbounds double, double* %0, i64 %8
%11 = load double, double* %10
%12 = tail call double %2(double %11)
%13 = fadd double %9, %12
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %16, label %7
16: ; preds = %7, %3
%17 = phi double [ 0.000000e+00, %3 ], [ %13, %7 ]
ret double %17
}
/* Variables and functions */
int /*<<< orphan*/ write_to_console(char *, int, int, int);
void print_version() {
  write_to_console("This software is under GNU GPL license. See "
                   "http://minegrado.info/DWN/LICENSE.txt for details.\n",
                   0x1 | 0x2, 1, 1);
  write_to_console("crivello version "
                   "1.5a"
                   " developed by OmegaSoftware (C) a Niccolo' Ferrari "
                   "company, on 06 feb 2015, with GNU GPL license.\nFor "
                   "info:\nniccolo.ferrari@hotmail.it\nomegasoftware."
                   "altervista.org\nminegrado.info\nminegrado.info/DWN\n",
                   0x0, 1, 1);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xf2d(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <write_to_console@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <write_to_console@plt>
lea    0xf2d(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rax
jmp    1030 <write_to_console@plt>

LLVM IR (-O0):
@.str = [96 x i8] c"This software is under GNU GPL license. See http://minegrado.info/DWN/LICENSE.txt for details.\0A\00"
@.str.1 = [220 x i8] c"crivello version 1.5a developed by OmegaSoftware (C) a Niccolo' Ferrari company, on 06 feb 2015, with GNU GPL license.\0AFor info:\0Aniccolo.ferrari@hotmail.it\0Aomegasoftware.altervista.org\0Aminegrado.info\0Aminegrado.info/DWN\0A\00"
define void @print_version() {
%1 = call i32 @write_to_console(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i32 3, i32 1, i32 1)
%2 = call i32 @write_to_console(i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [96 x i8] c"This software is under GNU GPL license. See http://minegrado.info/DWN/LICENSE.txt for details.\0A\00"
@.str.1 = [220 x i8] c"crivello version 1.5a developed by OmegaSoftware (C) a Niccolo' Ferrari company, on 06 feb 2015, with GNU GPL license.\0AFor info:\0Aniccolo.ferrari@hotmail.it\0Aomegasoftware.altervista.org\0Aminegrado.info\0Aminegrado.info/DWN\0A\00"
define void @print_version() {
%1 = tail call i32 @write_to_console(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0), i32 3, i32 1, i32 1)
%2 = tail call i32 @write_to_console(i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 1, i32 1)
ret void
}
/* Variables and functions */
char toupper(char);
unsigned char mutils_hex_char_to_bin(char x) {
  if (x >= '0' && x <= '9')
    return (x - '0');
  x = toupper(x);
  return ((x - 'A') + 10);
}


x86 assembly (clang, -O0):
<mutils_hex_char_to_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1147 <mutils_hex_char_to_bin+0x37>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1147 <mutils_hex_char_to_bin+0x37>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1160 <mutils_hex_char_to_bin+0x50>
movsbl -0x2(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutils_hex_char_to_bin>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
jb     1127 <mutils_hex_char_to_bin+0x17>
push   %rax
movsbl %dil,%edi
call   1030 <toupper@plt>
add    $0xc9,%al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define zeroext i8 @mutils_hex_char_to_bin(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %24
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = call signext i8 @toupper(i8 signext %17)
store i8 %18, i8* %3
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %20, 65
%22 = add nsw i32 %21, 10
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %24
24: ; preds = %16, %11
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define zeroext i8 @mutils_hex_char_to_bin(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call signext i8 @toupper(i8 signext %0)
%6 = add i8 %5, -55
br label %7
7: ; preds = %1, %4
%8 = phi i8 [ %6, %4 ], [ %2, %1 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ initiate_randomness();
int rand();
int generate_random_number(void) {
  initiate_randomness();
  int r = rand();
  return r;
}


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

x86 assembly (clang, -O2):
<generate_random_number>:
push   %rax
xor    %eax,%eax
call   1030 <initiate_randomness@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <rand@plt>

LLVM IR (-O0):
define i32 @generate_random_number() {
%1 = alloca i32
%2 = call i32 (...) @initiate_randomness()
%3 = call i32 (...) @rand()
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @generate_random_number() {
%1 = tail call i32 (...) @initiate_randomness()
%2 = tail call i32 (...) @rand()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rv() {
  printf("faz algo aqui");
  return;
}


x86 assembly (clang, -O0):
<rv>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"faz algo aqui\00"
define void @rv() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"faz algo aqui\00"
define void @rv() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
scalar_t__ substr(char *, scalar_t__);
char *eval_sqstr(char *s) {
  char *p;
  p = (char *)substr(s + 1, strlen(s) - 2);
  return p;
}


x86 assembly (clang, -O0):
<eval_sqstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
sub    $0x2,%rsi
call   1040 <substr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_sqstr>:
push   %rbx
lea    0x1(%rdi),%rbx
call   1030 <strlen@plt>
lea    -0x2(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <substr@plt>

LLVM IR (-O0):
define i8* @eval_sqstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = sub nsw i64 %7, 2
%9 = call i64 @substr(i8* %5, i64 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @eval_sqstr(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, -2
%5 = tail call i64 @substr(i8* %2, i64 %4)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
void INT_Excep_TPU10_TGI10A(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU10_TGI10A() {
ret void
}
/* Variables and functions */
scalar_t__ __builtin_lceill(long double);
int /*<<< orphan*/ link_failure_builtin_lceill();
void test_builtin_lceill(long double ld) {
  if (__builtin_lceill(ld) != __builtin_lceill(ld))
    link_failure_builtin_lceill();
}


x86 assembly (clang, -O0):
<test_builtin_lceill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_lceill@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <__builtin_lceill@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_builtin_lceill+0x43>
mov    $0x0,%al
call   1030 <link_failure_builtin_lceill@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_lceill>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_lceill@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <__builtin_lceill@plt>
cmp    %rax,%rbx
jne    1151 <test_builtin_lceill+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_lceill@plt>

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

LLVM IR (-O2):
define void @test_builtin_lceill(x86_fp80 %0) {
%2 = tail call i64 @__builtin_lceill(x86_fp80 %0)
%3 = tail call i64 @__builtin_lceill(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_lceill()
br label %7
7: ; preds = %5, %1
ret void
}
void gtk_window_get_screen() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_screen() {
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn93() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn93");
  return result;
}


x86 assembly (clang, -O0):
<fn93>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn93>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn93\00"
define i8* @fn93() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn93\00"
define i8* @fn93() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}