xunge/DecIR huggingface dataset:
/* Variables and functions */
void *calloc(unsigned int, unsigned int);
void *HeapAllocate(unsigned int number, unsigned int size) {
  return calloc(number, size);
}


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

x86 assembly (clang, -O2):
<HeapAllocate>:
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @HeapAllocate(i32 %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
double fabs(double const);
char f_abs(double *a, const double *b) {
  *a = fabs(*b);
  return (0);
}


x86 assembly (clang, -O0):
<f_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xee5(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_abs>:
movsd  (%rsi),%xmm0
andps  0xef5(%rip),%xmm0
movlps %xmm0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @f_abs(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call double @llvm.fabs.f64(double %3)
store double %4, double* %0
ret i8 0
}
utmpname(newfile) char *newfile;
{
  extern char utmpfile[];
  if (strlen(newfile) > 79)
    return (0);
  else
    strcpy(&utmpfile[0], newfile);
  endutent();
  return (1);
}


x86 assembly (clang, -O0):
<utmpname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x4f,%rax
jbe    115b <utmpname+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1179 <utmpname+0x49>
mov    -0x10(%rbp),%rsi
mov    0x2e82(%rip),%rdi
call   1030 <strcpy@plt>
mov    $0x0,%al
call   1050 <endutent@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utmpname>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x4f,%rcx
ja     115f <utmpname+0x2f>
mov    0x2e9d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
call   1050 <endutent@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@utmpfile = external global [0 x i8]
define i32 @utmpname(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strlen(i8* %4)
%6 = icmp ugt i64 %5, 79
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strcpy(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @utmpfile, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8
%12 = call i32 (...) @endutent()
store i32 1, i32* %2
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@utmpfile = external global [0 x i8]
define i32 @utmpname(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp ugt i64 %2, 79
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i8* @strcpy(i8* dereferenceable(1) getelementptr inbounds ([0 x i8], [0 x i8]* @utmpfile, i64 0, i64 0), i8* dereferenceable(1) %0)
%6 = tail call i32 (...) @endutent()
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
void sigactexit(int signum, siginfo_t *info, void *myact) { exit(1); }


x86 assembly (clang, -O0):
<sigactexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigactexit>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @sigactexit(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @sigactexit(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void mysignal_handler(int signalno) { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<mysignal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<mysignal_handler>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @mysignal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @mysignal_handler(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
int read(int, void *, int);
void Read(int fd, void *buf, int count) {
  if (read(fd, buf, count) < count)
    error(fd);
}


x86 assembly (clang, -O0):
<Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
cmp    -0x14(%rbp),%eax
jge    1152 <Read+0x32>
mov    -0x4(%rbp),%edi
call   1040 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %edi,%ebx
call   1030 <read@plt>
cmp    %ebp,%eax
jge    113d <Read+0x1d>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <error@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @Read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = icmp slt i32 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @error(i32 %0)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stdout;
void pdie(const char *msg) {
  fflush(stdout);
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<pdie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<pdie>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @pdie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @perror(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
define void @pdie(i8* nocapture %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @perror(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, long, long);
int expect_val(long expected, long ret) {
  printf("\tVAL Expected %d, Got %d\n", expected, ret);
  fflush(NULL);
  if (ret == expected) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<expect_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1167 <expect_val+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116e <expect_val+0x4e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_val>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <fflush@plt>
xor    %eax,%eax
cmp    %rbx,%r14
setne  %al
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\09VAL Expected %d, Got %d\0A\00"
define i32 @expect_val(i64 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %7)
%9 = call i32 @fflush(i32* null)
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [26 x i8] c"\09VAL Expected %d, Got %d\0A\00"
define i32 @expect_val(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%4 = tail call i32 @fflush(i32* null)
%5 = icmp ne i64 %1, %0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int _read_and_test(char const *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ err(int, char const *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int read_and_test(const char *fn, bool expected_result) {
  int result;
  FILE *fp = fopen(fn, "r");
  if (fp == NULL) {
    err(1, fn);
  }
  result = _read_and_test(fn, fp, expected_result);
  fclose(fp);
  return result;
}


x86 assembly (clang, -O0):
<read_and_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117c <read_and_test+0x3c>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1050 <err@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <_read_and_test@plt>
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_and_test>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbp
lea    0xeaf(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116b <read_and_test+0x2b>
mov    $0x1,%edi
mov    %rbp,%rsi
call   1050 <err@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <_read_and_test@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @read_and_test(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %8, i32** %6
%9 = load i32*, i32** %6
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @err(i32 1, i8* %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %3
%16 = load i32*, i32** %6
%17 = load i32, i32* %4
%18 = call i32 @_read_and_test(i8* %15, i32* %16, i32 %17)
store i32 %18, i32* %5
%19 = load i32*, i32** %6
%20 = call i32 @fclose(i32* %19)
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @read_and_test(i8* %0, i32 %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* %0)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @_read_and_test(i8* %0, i32* %3, i32 %1)
%9 = tail call i32 @fclose(i32* %3)
ret i32 %8
}
void modp_stack(int special) {}


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

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

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

LLVM IR (-O2):
define void @modp_stack(i32 %0) {
ret void
}
/* Type definitions */
struct str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct str *);
int /*<<< orphan*/ str_setlen(struct str *, int /*<<< orphan*/);
void str_free(struct str *s) {
  str_setlen(s, 0);
  free(s);
}


x86 assembly (clang, -O0):
<str_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <str_setlen@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_free>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <str_setlen@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.str = type { i32 }
define void @str_free(%struct.str* %0) {
%2 = alloca %struct.str*
store %struct.str* %0, %struct.str** %2
%3 = load %struct.str*, %struct.str** %2
%4 = call i32 @str_setlen(%struct.str* %3, i32 0)
%5 = load %struct.str*, %struct.str** %2
%6 = call i32 @free(%struct.str* %5)
ret void
}

LLVM IR (-O2):
%struct.str = type { i32 }
define void @str_free(%struct.str* %0) {
%2 = tail call i32 @str_setlen(%struct.str* %0, i32 0)
%3 = tail call i32 @free(%struct.str* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ count;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
int get_XGraphicsExposeEvent_count(void *_p) {
  return (int)((XGraphicsExposeEvent *)_p)->count;
}


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

x86 assembly (clang, -O2):
<get_XGraphicsExposeEvent_count>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XGraphicsExposeEvent_count(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XGraphicsExposeEvent_count(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char *copy_word(char *to, char *from) {
  while (*from > ' ')
    *to++ = *from++;
  *to = 0;
  return to;
}


x86 assembly (clang, -O0):
<copy_word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jle    1143 <copy_word+0x43>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <copy_word+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_word>:
mov    %rdi,%rax
mov    (%rsi),%cl
cmp    $0x21,%cl
jl     1122 <copy_word+0x22>
add    $0x1,%rsi
xchg   %ax,%ax
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
cmp    $0x20,%cl
jg     1110 <copy_word+0x10>
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define i8* @copy_word(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp sgt i8 %3, 32
br i1 %4, label %5, label %13
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp sgt i8 %11, 32
br i1 %12, label %5, label %13
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %14
}
void g_date_valid_julian() {}


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

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

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

LLVM IR (-O2):
define void @g_date_valid_julian() {
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
pid_t octave_vfork_wrapper(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @octave_vfork_wrapper() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @octave_vfork_wrapper() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ genericError(char *, int);
void errorUnexpectedRelation() {
  genericError("There is a relation that we didn't expect!", 9);
}


x86 assembly (clang, -O0):
<errorUnexpectedRelation>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x9,%esi
call   1030 <genericError@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorUnexpectedRelation>:
lea    0xee9(%rip),%rdi
mov    $0x9,%esi
jmp    1030 <genericError@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"There is a relation that we didn't expect!\00"
define void @errorUnexpectedRelation() {
%1 = call i32 @genericError(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"There is a relation that we didn't expect!\00"
define void @errorUnexpectedRelation() {
%1 = tail call i32 @genericError(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x05() {
  Assert_real((isspace(5) == 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_isspace.c",
              30, ("isspace should be 0 for 0x05"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x05>:
push   %rax
mov    $0x5,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x05\00"
define void @t_isspace_0x05() {
%1 = call i64 @isspace(i32 5)
%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 30, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x05\00"
define void @t_isspace_0x05() {
%1 = tail call i64 @isspace(i32 5)
%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 30, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RAWToRGB24Row_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RAWToRGB24Row_Any_NEON() {
ret void
}
int rdp_max(const int a, const int b) { return a > b ? a : b; }


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

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

LLVM IR (-O0):
define i32 @rdp_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @rdp_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ drv_FW8888_send_text(char const *, int);
int /*<<< orphan*/ drv_FW8888_set_cursor(int const, int const);
void drv_FW8888_write(const int row, const int col, const char *data, int len) {
  drv_FW8888_set_cursor(row, col);
  drv_FW8888_send_text(data, len);
}


x86 assembly (clang, -O0):
<drv_FW8888_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <drv_FW8888_set_cursor@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <drv_FW8888_send_text@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_FW8888_write>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1030 <drv_FW8888_set_cursor@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <drv_FW8888_send_text@plt>

LLVM IR (-O0):
define void @drv_FW8888_write(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @drv_FW8888_set_cursor(i32 %9, i32 %10)
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @drv_FW8888_send_text(i8* %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @drv_FW8888_write(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @drv_FW8888_set_cursor(i32 %0, i32 %1)
%6 = tail call i32 @drv_FW8888_send_text(i8* %2, i32 %3)
ret void
}
/* Type definitions */
typedef scalar_t__ bp;

/* Variables and functions */
int /*<<< orphan*/ coalesce(void *);
void mm_free(void *bp) {
  size_t size = ((*((unsigned int *)(((char *)(bp)-4)))) & ~0x7);
  (*(unsigned int *)(((char *)(bp)-4)) = (((size) | (0))));
  (*(unsigned int *)(((char *)(bp) +
                      ((*((unsigned int *)(((char *)(bp)-4)))) & ~0x7) - 8)) =
       (((size) | (0))));
  coalesce(bp);
}


x86 assembly (clang, -O0):
<mm_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x4(%rax),%eax
and    $0xfffffff8,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
or     $0x0,%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,-0x4(%rax)
mov    -0x10(%rbp),%rax
or     $0x0,%rax
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x4(%rcx),%ecx
and    $0xfffffff8,%ecx
mov    %ecx,%ecx
mov    %edx,-0x8(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1030 <coalesce@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_free>:
mov    -0x4(%rdi),%eax
and    $0xfffffff8,%eax
mov    %eax,-0x4(%rdi)
mov    %eax,-0x8(%rdi,%rax,1)
jmp    1030 <coalesce@plt>

LLVM IR (-O0):
define void @mm_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 -4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, -8
%9 = zext i32 %8 to i64
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = or i64 %10, 0
%12 = trunc i64 %11 to i32
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 -4
%15 = bitcast i8* %14 to i32*
store i32 %12, i32* %15
%16 = load i64, i64* %3
%17 = or i64 %16, 0
%18 = trunc i64 %17 to i32
%19 = load i8*, i8** %2
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 -4
%22 = bitcast i8* %21 to i32*
%23 = load i32, i32* %22
%24 = and i32 %23, -8
%25 = zext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %19, i64 %25
%27 = getelementptr inbounds i8, i8* %26, i64 -8
%28 = bitcast i8* %27 to i32*
store i32 %18, i32* %28
%29 = load i8*, i8** %2
%30 = call i32 @coalesce(i8* %29)
ret void
}

LLVM IR (-O2):
define void @mm_free(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = and i32 %4, -8
%6 = zext i32 %5 to i64
store i32 %5, i32* %3
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = getelementptr inbounds i8, i8* %7, i64 -8
%9 = bitcast i8* %8 to i32*
store i32 %5, i32* %9
%10 = tail call i32 @coalesce(i8* %0)
ret void
}
/* Type definitions */
struct tilecontext {
  int dummy;
};
struct graphics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ drawPixel(double, double, struct graphics *, double, double,
                             long long, struct tilecontext *);
void drawBrush(double x, double y, struct graphics *g, double bright,
               double brush, double hue, long long meta, int gaussian,
               struct tilecontext *tc) {
  drawPixel(x, y, g, bright, hue, meta, tc);
}


x86 assembly (clang, -O0):
<drawBrush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
mov    %rcx,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rdi
movsd  -0x20(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
mov    -0x38(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1030 <drawPixel@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawBrush>:
movaps %xmm4,%xmm3
mov    %rcx,%rdx
jmp    1030 <drawPixel@plt>

LLVM IR (-O0):
%struct.graphics = type { i32 }
%struct.tilecontext = type { i32 }
define void @drawBrush(double %0, double %1, %struct.graphics* %2, double %3, double %4, double %5, i64 %6, i32 %7, %struct.tilecontext* %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca %struct.graphics*
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i64
%17 = alloca i32
%18 = alloca %struct.tilecontext*
store double %0, double* %10
store double %1, double* %11
store %struct.graphics* %2, %struct.graphics** %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store i64 %6, i64* %16
store i32 %7, i32* %17
store %struct.tilecontext* %8, %struct.tilecontext** %18
%19 = load double, double* %10
%20 = load double, double* %11
%21 = load %struct.graphics*, %struct.graphics** %12
%22 = load double, double* %13
%23 = load double, double* %15
%24 = load i64, i64* %16
%25 = load %struct.tilecontext*, %struct.tilecontext** %18
%26 = call i32 @drawPixel(double %19, double %20, %struct.graphics* %21, double %22, double %23, i64 %24, %struct.tilecontext* %25)
ret void
}

LLVM IR (-O2):
%struct.graphics = type { i32 }
%struct.tilecontext = type { i32 }
define void @drawBrush(double %0, double %1, %struct.graphics* %2, double %3, double %4, double %5, i64 %6, i32 %7, %struct.tilecontext* %8) {
%10 = tail call i32 @drawPixel(double %0, double %1, %struct.graphics* %2, double %3, double %5, i64 %6, %struct.tilecontext* %8)
ret void
}
/* Variables and functions */
float fmod(float a, float b) {
  while (a >= b) {
    a -= b;
  }
  while (a < 0) {
    a += b;
  }
  return a;
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1135 <fmod+0x35>
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    110e <fmod+0xe>
jmp    113a <fmod+0x3a>
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    115b <fmod+0x5b>
movss  -0x8(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <fmod+0x3a>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
ucomiss %xmm1,%xmm0
jb     1119 <fmod+0x19>
cs nopw 0x0(%rax,%rax,1)
nop
subss  %xmm1,%xmm0
ucomiss %xmm1,%xmm0
jae    1110 <fmod+0x10>
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
jbe    1139 <fmod+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addss  %xmm1,%xmm0
ucomiss %xmm0,%xmm2
ja     1130 <fmod+0x30>
ret

LLVM IR (-O0):
define float @fmod(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
br label %5
5: ; preds = %9, %2
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fcmp oge float %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %11, %10
store float %12, float* %3
br label %5
13: ; preds = %5
br label %14
14: ; preds = %17, %13
%15 = load float, float* %3
%16 = fcmp olt float %15, 0.000000e+00
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load float, float* %4
%19 = load float, float* %3
%20 = fadd float %19, %18
store float %20, float* %3
br label %14
21: ; preds = %14
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @fmod(float %0, float %1) {
%3 = fcmp ult float %0, %1
br i1 %3, label %4, label %7
4: ; preds = %7, %2
%5 = phi float [ %0, %2 ], [ %9, %7 ]
%6 = fcmp olt float %5, 0.000000e+00
br i1 %6, label %11, label %15
7: ; preds = %2, %7
%8 = phi float [ %9, %7 ], [ %0, %2 ]
%9 = fsub float %8, %1
%10 = fcmp ult float %9, %1
br i1 %10, label %4, label %7
11: ; preds = %4, %11
%12 = phi float [ %13, %11 ], [ %5, %4 ]
%13 = fadd float %12, %1
%14 = fcmp olt float %13, 0.000000e+00
br i1 %14, label %11, label %15
15: ; preds = %11, %4
%16 = phi float [ %5, %4 ], [ %13, %11 ]
ret float %16
}
int test_imm_0Euint8_mem(unsigned char *val) {
  return ((*val) & (-0x0E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Euint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -14
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ e0();
void f0() { e0(); }


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

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

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

LLVM IR (-O2):
define void @f0() {
%1 = tail call i32 (...) @e0()
ret void
}
int CL_GetKeyDest(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @CL_GetKeyDest() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @CL_GetKeyDest() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_logtalk_empty_comments() {
  test_parser_verify_parse(test_parser_sourcefile("logtalk", " %\n"), "logtalk",
                           "", "%\n", 0);
}


x86 assembly (clang, -O0):
<test_logtalk_empty_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec4(%rip),%rdx
lea    0xebb(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_logtalk_empty_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xecd(%rip),%rdx
lea    0xec4(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"logtalk\00"
@.str.1 = [4 x i8] c" %\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [3 x i8] c"%\0A\00"
define void @test_logtalk_empty_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"logtalk\00"
@.str.1 = [4 x i8] c" %\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [3 x i8] c"%\0A\00"
define void @test_logtalk_empty_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int /*<<< orphan*/);
char *strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char *s = strcpy((char *)malloc(strlen("Hello World")), "Hello World");
  free(s);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%rdi
lea    0xe84(%rip),%rsi
call   1040 <strcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
movabs $0x6f57206f6c6c6548,%rcx
20 57 6f
mov    %rcx,(%rax)
movl   $0x646c72,0x8(%rax)
mov    %rax,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = call i8* @strcpy(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @malloc(i32 %1)
%3 = inttoptr i64 %2 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(12) %3, i8* align 1 dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 12, i1 false)
%4 = tail call i32 @free(i8* %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int, int);
main() {
  if (!f(1, 2))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <f@plt>
cmp    $0x0,%eax
jne    115e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <f@plt>
test   %eax,%eax
jne    114b <main+0x1b>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 1, i32 2)
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 2)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xresizerequest_type(void *_p, int _v) {
  ((XEvent *)_p)->xresizerequest.type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xresizerequest_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xresizerequest_type(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xresizerequest_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void RTAvlrFileOffsetGetRoot(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrFileOffsetGetRoot() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int system_has_frequencyscaling() {
  int fd;
  fd = open("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors",
            O_RDONLY);
  if (-1 == fd) {
    return 0;
  }
  (void)close(fd);
  return 1;
}


x86 assembly (clang, -O0):
<system_has_frequencyscaling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x8(%rbp)
mov    $0xffffffff,%eax
cmp    -0x8(%rbp),%eax
jne    115a <system_has_frequencyscaling+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1169 <system_has_frequencyscaling+0x49>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_has_frequencyscaling>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     1149 <system_has_frequencyscaling+0x29>
mov    %eax,%edi
call   1030 <close@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [65 x i8] c"/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors\00"
@O_RDONLY = global i32 0
define i32 @system_has_frequencyscaling() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 -1, %5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
store i32 1, i32* %1
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [65 x i8] c"/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors\00"
@O_RDONLY = global i32 0
define i32 @system_has_frequencyscaling() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @close(i32 %2)
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ 1, %4 ], [ 0, %0 ]
ret i32 %7
}
int _start() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_start() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void put32_be(void *p, uint32_t x) {
  *((uint8_t *)p) = x >> 24 & 0xff;
  *((uint8_t *)p + 1) = x >> 16 & 0xff;
  *((uint8_t *)p + 2) = x >> 8 & 0xff;
  *((uint8_t *)p + 3) = x & 0xff;
}


x86 assembly (clang, -O0):
<put32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put32_be>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @put32_be(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = getelementptr inbounds i8, i8* %0, i64 8
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
%13 = and i32 %1, 255
%14 = getelementptr inbounds i8, i8* %0, i64 12
%15 = bitcast i8* %14 to i32*
store i32 %13, i32* %15
ret void
}
struct bwb_line *bwb_RSET(struct bwb_line *l) {
  bwx_DEBUG(__FUNCTION__);
  return dio_lrset(l, -1);
}


x86 assembly (clang, -O0):
<bwb_RSET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1040 <dio_lrset@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_RSET>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1040 <dio_lrset@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_RSET = [9 x i8] c"bwb_RSET\00"
define %struct.bwb_line* @bwb_RSET(%struct.bwb_line* %0) {
%2 = alloca %struct.bwb_line*
store %struct.bwb_line* %0, %struct.bwb_line** %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.bwb_RSET, i64 0, i64 0))
%4 = load %struct.bwb_line*, %struct.bwb_line** %2
%5 = call i32 (%struct.bwb_line*, i32, ...) bitcast (i32 (...)* @dio_lrset to i32 (%struct.bwb_line*, i32, ...)*)(%struct.bwb_line* %4, i32 -1)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.bwb_line*
ret %struct.bwb_line* %7
}

LLVM IR (-O2):
%struct.bwb_line = type opaque
@__FUNCTION__.bwb_RSET = [9 x i8] c"bwb_RSET\00"
define %struct.bwb_line* @bwb_RSET(%struct.bwb_line* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.bwb_RSET, i64 0, i64 0))
%3 = tail call i32 (%struct.bwb_line*, i32, ...) bitcast (i32 (...)* @dio_lrset to i32 (%struct.bwb_line*, i32, ...)*)(%struct.bwb_line* %0, i32 -1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.bwb_line*
ret %struct.bwb_line* %5
}