xunge/DecIR huggingface dataset:
callrts(sname) char *sname;
{
  ot("CALL ");
  outasm(sname);
  nl();
}


x86 assembly (clang, -O0):
<callrts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1050 <ot@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <outasm@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callrts>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <ot@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <outasm@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"CALL \00"
define i32 @callrts(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @outasm to i32 (i8*, ...)*)(i8* %5)
%7 = call i32 (...) @nl()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"CALL \00"
define i32 @callrts(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outasm to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (...) @nl()
ret i32 undef
}
/* Type definitions */
struct sched_param {
  int sched_priority;
};
typedef int /*<<< orphan*/ pthread_t;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ SCHED_FIFO;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ pthread_setaffinity_np(int /*<<< orphan*/, int,
                                          int /*<<< orphan*/ *);
int sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                       struct sched_param *);
int /*<<< orphan*/ stderr;
void set_pthread_cpu(pthread_t th, int cpu) {
  cpu_set_t run_cpu_mask;
  struct sched_param param;
  CPU_ZERO(&run_cpu_mask);
  CPU_SET(cpu, &run_cpu_mask);
  pthread_setaffinity_np(th, sizeof(cpu_set_t), &run_cpu_mask);
  param.sched_priority = 1;
  if (0 && sched_setscheduler(0, SCHED_FIFO, &param) == -1) {
    fprintf(stderr, "could not set SCHED_FIFO, run as root?\n");
  }
}


x86 assembly (clang, -O0):
<set_pthread_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1050 <CPU_SET@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
lea    -0xc(%rbp),%rdx
call   1030 <pthread_setaffinity_np@plt>
movl   $0x1,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pthread_cpu>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xc(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
mov    %ebp,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <pthread_setaffinity_np@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
@stderr = global i32 0
define void @set_pthread_cpu(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sched_param
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 @CPU_ZERO(i32* %5)
%8 = load i32, i32* %4
%9 = call i32 @CPU_SET(i32 %8, i32* %5)
%10 = load i32, i32* %3
%11 = call i32 @pthread_setaffinity_np(i32 %10, i32 4, i32* %5)
%12 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %6, i32 0, i32 0
store i32 1, i32* %12
ret void
}

LLVM IR (-O2):
@SCHED_FIFO = global i32 0
@stderr = global i32 0
define void @set_pthread_cpu(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @CPU_ZERO(i32* %3)
%6 = call i32 @CPU_SET(i32 %1, i32* %3)
%7 = call i32 @pthread_setaffinity_np(i32 %0, i32 4, i32* %3)
ret void
}
int bcmp(s1, s2, n)
char *s1, *s2;
int n;
{ return memcmp(s1, s2, n); }


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

x86 assembly (clang, -O2):
<bcmp>:
movslq %edx,%rdx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @bcmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %4)
ret i32 %5
}
char toHex(unsigned char c) { return "0123456789abcdef"[c & 0xf]; }


x86 assembly (clang, -O0):
<toHex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xee5(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toHex>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
define signext i8 @toHex(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
define signext i8 @toHex(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ register_default_print_fn();
int /*<<< orphan*/ setup_parser();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void setup_awl(void) {
  srand(time(NULL));
  register_default_print_fn();
  setup_parser();
}


x86 assembly (clang, -O0):
<setup_awl>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <register_default_print_fn@plt>
mov    $0x0,%al
call   1030 <setup_parser@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_awl>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <register_default_print_fn@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <setup_parser@plt>

LLVM IR (-O0):
define void @setup_awl() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
%3 = call i32 (...) @register_default_print_fn()
%4 = call i32 (...) @setup_parser()
ret void
}

LLVM IR (-O2):
define void @setup_awl() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @register_default_print_fn()
%4 = tail call i32 (...) @setup_parser()
ret void
}
void gtk_icon_size_lookup() {}


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

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

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

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

/* Variables and functions */
uint32_t get_padded_length(uint32_t length, uint32_t aligned_at) {
  uint32_t padding =
      aligned_at - (length - (aligned_at * (length / aligned_at)));
  return length + ((padding == aligned_at) ? 0 : padding);
}


x86 assembly (clang, -O0):
<get_padded_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0x18(%rbp),%edx
mov    %eax,%esi
mov    -0x14(%rbp),%eax
imul   %esi,%edx
sub    %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    114e <get_padded_length+0x4e>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    1154 <get_padded_length+0x54>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_padded_length>:
mov    %edi,%eax
cltd
idiv   %esi
sub    %edx,%esi
test   %edx,%edx
cmove  %edx,%esi
lea    (%rsi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @get_padded_length(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = sub nsw i32 %1, %3
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i32 0, i32 %4
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void add(int a, int b) { printf("Addition is %d;\n", a + b); }


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

x86 assembly (clang, -O2):
<add>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Addition is %d;\0A\00"
define void @add(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 = add nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Addition is %d;\0A\00"
define void @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
int xstrncpy(char *dest, const char *src, size_t destsize) {
  int srclen = strlen(src);
  if (srclen + 1 > destsize)
    return -1;
  strcpy(dest, src);
  return srclen;
}


x86 assembly (clang, -O0):
<xstrncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
cltq
cmp    -0x20(%rbp),%rax
jbe    115e <xstrncpy+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <xstrncpy+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrncpy>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebx
lea    0x1(%rbx),%eax
movslq %eax,%rcx
mov    $0xffffffff,%eax
cmp    %r12,%rcx
ja     1158 <xstrncpy+0x38>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @xstrncpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = icmp ugt i64 %6, %2
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %10
10: ; preds = %3, %8
%11 = phi i32 [ %4, %8 ], [ -1, %3 ]
ret i32 %11
}
void libaes_init(void) {}


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

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

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

LLVM IR (-O2):
define void @libaes_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printChar(char);
int /*<<< orphan*/ printInt(int);
int /*<<< orphan*/ printStr(char *);
int /*<<< orphan*/ readInt(int);
void main() {
  int number, i, factorial = 1;
  printStr("enter a number: ");
  readInt(number);
  for (i = 1; i <= number; i++) {
    factorial = factorial * i;
  }
  printStr("Factorial = ");
  printInt(factorial);
  printChar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printStr@plt>
mov    -0x4(%rbp),%edi
call   1050 <readInt@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     118e <main+0x4e>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <main+0x2a>
lea    0xe7c(%rip),%rdi
call   1040 <printStr@plt>
mov    -0xc(%rbp),%edi
call   1030 <printInt@plt>
mov    $0xa,%edi
call   1060 <printChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printStr@plt>
call   1040 <readInt@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"enter a number: \00"
@.str.1 = [13 x i8] c"Factorial = \00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %3
%4 = call i32 @printStr(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 @readInt(i32 %5)
store i32 1, i32* %2
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = mul nsw i32 %12, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %11
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %7
18: ; preds = %7
%19 = call i32 @printStr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32, i32* %3
%21 = call i32 @printInt(i32 %20)
%22 = call i32 @printChar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"enter a number: \00"
define void @main() {
%1 = tail call i32 @printStr(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @readInt(i32 undef)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void set_tweak_in_tweakey(uint8_t *tweakey, uint8_t *tweak) {
  memcpy(tweakey + 16, tweak, 8);
}


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

x86 assembly (clang, -O2):
<set_tweak_in_tweakey>:
add    $0x40,%rdi
mov    $0x8,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @set_tweak_in_tweakey(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 = getelementptr inbounds i32, i32* %5, i64 16
%7 = load i32*, i32** %4
%8 = call i32 @memcpy(i32* %6, i32* %7, i32 8)
ret void
}

LLVM IR (-O2):
define void @set_tweak_in_tweakey(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 16
%4 = tail call i32 @memcpy(i32* %3, i32* %1, i32 8)
ret void
}
/* Variables and functions */
int time_before_eq(unsigned long, unsigned long);
int cfs_time_aftereq(unsigned long t1, unsigned long t2) {
  return time_before_eq(t2, t1);
}


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

x86 assembly (clang, -O2):
<cfs_time_aftereq>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <time_before_eq@plt>

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

LLVM IR (-O2):
define i32 @cfs_time_aftereq(i64 %0, i64 %1) {
%3 = tail call i32 @time_before_eq(i64 %1, i64 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_st32_raw(int, int);
void gen_op_stf32_raw(int addr, int dest) { gen_op_st32_raw(addr, dest); }


x86 assembly (clang, -O0):
<gen_op_stf32_raw>:
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 <gen_op_st32_raw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_op_stf32_raw>:
jmp    1030 <gen_op_st32_raw@plt>

LLVM IR (-O0):
define void @gen_op_stf32_raw(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 i32 @gen_op_st32_raw(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @gen_op_stf32_raw(i32 %0, i32 %1) {
%3 = tail call i32 @gen_op_st32_raw(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x54() {
  Assert_real((isupper(84)),
              "/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_isupper.c",
              425, ("isupper should be 1 for T"));
}


x86 assembly (clang, -O0):
<t_isupper_0x54>:
push   %rbp
mov    %rsp,%rbp
mov    $0x54,%edi
call   1030 <isupper@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1a9,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x54>:
push   %rax
mov    $0x54,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1a9,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for T\00"
define void @t_isupper_0x54() {
%1 = call i32 @isupper(i32 84)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for T\00"
define void @t_isupper_0x54() {
%1 = tail call i32 @isupper(i32 84)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ test(double);
int main() {
  test(+0.0);
  test(-0.0);
  printf("negzero = %f  poszero = %f\n", -0.0, +0.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
call   1040 <test@plt>
movsd  0xec1(%rip),%xmm0
call   1040 <test@plt>
lea    0xebd(%rip),%rdi
movsd  0xead(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xorps  %xmm0,%xmm0
call   1040 <test@plt>
movsd  0xecf(%rip),%xmm0
call   1040 <test@plt>
lea    0xecb(%rip),%rdi
xorps  %xmm1,%xmm1
movsd  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"negzero = %f poszero = %f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(double 0.000000e+00)
%3 = call i32 @test(double -0.000000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double -0.000000e+00, double 0.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"negzero = %f poszero = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @test(double 0.000000e+00)
%2 = tail call i32 @test(double -0.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double -0.000000e+00, double 0.000000e+00)
ret i32 0
}
double pr60102(double x, int m) {
  double y;
  y = m % 2 ? x : 1;
  return y;
}


x86 assembly (clang, -O0):
<pr60102>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     112f <pr60102+0x2f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1141 <pr60102+0x41>
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1141 <pr60102+0x41>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr60102>:
test   $0x1,%dil
jne    110e <pr60102+0xe>
movsd  0xef2(%rip),%xmm0
ret

LLVM IR (-O0):
define double @pr60102(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = srem i32 %6, 2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %3
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %9
%13 = phi double [ %10, %9 ], [ 1.000000e+00, %11 ]
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @pr60102(double %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, double 1.000000e+00, double %0
ret double %5
}
/* Variables and functions */
int strcmp(char *, char *);
int a_comp(const void *s1, const void *s2) {
  return strcmp(*(char **)s1, *(char **)s2);
}


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

x86 assembly (clang, -O2):
<a_comp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @a_comp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @a_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
size_t array_next_count(size_t want) {
  if (want < 2048) {
    return (want < 20) ? want + 4 : want * 2;
  } else {
    return want + 2048;
  }
}


x86 assembly (clang, -O0):
<array_next_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x800,-0x10(%rbp)
jae    114b <array_next_count+0x4b>
cmpq   $0x14,-0x10(%rbp)
jae    1132 <array_next_count+0x32>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
jmp    113e <array_next_count+0x3e>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <array_next_count+0x59>
mov    -0x10(%rbp),%rax
add    $0x800,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_next_count>:
cmp    $0x7ff,%rdi
ja     111a <array_next_count+0x1a>
lea    0x4(%rdi),%rcx
lea    (%rdi,%rdi,1),%rax
cmp    $0x14,%rdi
cmovb  %rcx,%rax
ret
add    $0x800,%rdi
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @array_next_count(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ult i64 %4, 2048
br i1 %5, label %6, label %17
6: ; preds = %1
%7 = load i64, i64* %3
%8 = icmp ult i64 %7, 20
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i64, i64* %3
%11 = add i64 %10, 4
br label %15
12: ; preds = %6
%13 = load i64, i64* %3
%14 = mul i64 %13, 2
br label %15
15: ; preds = %12, %9
%16 = phi i64 [ %11, %9 ], [ %14, %12 ]
store i64 %16, i64* %2
br label %20
17: ; preds = %1
%18 = load i64, i64* %3
%19 = add i64 %18, 2048
store i64 %19, i64* %2
br label %20
20: ; preds = %17, %15
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
define i64 @array_next_count(i64 %0) {
%2 = icmp ult i64 %0, 2048
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = icmp ult i64 %0, 20
%5 = add nuw nsw i64 %0, 4
%6 = shl nuw nsw i64 %0, 1
%7 = select i1 %4, i64 %5, i64 %6
br label %10
8: ; preds = %1
%9 = add i64 %0, 2048
br label %10
10: ; preds = %8, %3
%11 = phi i64 [ %7, %3 ], [ %9, %8 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void talloc_abort_double_free(void) { abort(); }


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

x86 assembly (clang, -O2):
<talloc_abort_double_free>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @talloc_abort_double_free() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @talloc_abort_double_free() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ get_min_max(int *, int *, int *, int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int arr[] = {1, 2, 3};
  int max;
  int min;
  get_min_max(arr, &min, &max, 3);
  printf("max val is %d, min val is %d\n", min, max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x3,%ecx
call   1040 <get_min_max@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
mov    $0x3,%ecx
call   1040 <get_min_max@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [30 x i8] c"max val is %d, min val is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [3 x i32]* %2 to i8*
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = call i32 @get_min_max(i32* %6, i32* %4, i32* %3, i32 3)
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [30 x i8] c"max val is %d, min val is %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [3 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%8 = call i32 @get_min_max(i32* %7, i32* %3, i32* %2, i32 3)
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
int write(int, char *, int);
int scputc(int fd, char c) {
  int retval;
  retval = write(fd, &c, 1);
  if (retval == 1)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<scputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    114b <scputc+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1152 <scputc+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scputc>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @scputc(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
%5 = icmp ne i32 %4, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ eroare(char *);
void sari_subrutina(void) {
  eroare(" din pacate nu am avut timp sa implementez subrutinele");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c" din pacate nu am avut timp sa implementez subrutinele\00"
define void @sari_subrutina() {
%1 = call i32 @eroare(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c" din pacate nu am avut timp sa implementez subrutinele\00"
define void @sari_subrutina() {
%1 = tail call i32 @eroare(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}
void *test_anti_range_50(signed char n) {
  extern void *alloc_anti_range_50(signed char) __attribute__((alloc_size(1)));
  if ((-0x7f - 1) + 2 <= n && n <= 12)
    n = (-0x7f - 1) + 2 - 1;
  return alloc_anti_range_50(n);
}


x86 assembly (clang, -O0):
<test_anti_range_50>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0xffffff82,%eax
cmp    %ecx,%eax
jg     1140 <test_anti_range_50+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0xc,%eax
jg     1140 <test_anti_range_50+0x30>
movb   $0x81,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_50@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_50>:
lea    0x7e(%rdi),%eax
cmp    $0x8b,%al
mov    $0x81,%eax
cmovae %edi,%eax
movsbl %al,%edi
jmp    1030 <alloc_anti_range_50@plt>

LLVM IR (-O0):
define i8* @test_anti_range_50(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 -126, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 12
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -127, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_50(i8 signext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_50(i8 signext %0) {
%2 = add i8 %0, 126
%3 = icmp ult i8 %2, -117
%4 = select i1 %3, i8 -127, i8 %0
%5 = tail call i8* @alloc_anti_range_50(i8 signext %4)
ret i8* %5
}
void abe_null_subroutine_0(void) {}


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

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

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

LLVM IR (-O2):
define void @abe_null_subroutine_0() {
ret void
}
void init_sub_rel_pixel_span_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_sub_rel_pixel_span_funcs_c() {
ret void
}
int encode_rederr(int code) { return code < 0 ? 32767 : code; }


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

x86 assembly (clang, -O2):
<encode_rederr>:
test   %edi,%edi
mov    $0x7fff,%eax
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @encode_rederr(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 32767, i32 %0
ret i32 %3
}
float limit_float(float valeur, float inf, float sup) {
  if (valeur < inf)
    return inf;
  else if (valeur > sup)
    return sup;
  else
    return valeur;
}


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

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

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

LLVM IR (-O2):
define float @limit_float(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
}
int drm_cpu_valid(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @drm_cpu_valid() {
ret i32 1
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
void TotalPrice(int32_t count, const double *price, double *total) {
  *total = (double)count * (*price);
}


x86 assembly (clang, -O0):
<TotalPrice>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TotalPrice>:
cvtsi2sd %rdi,%xmm0
mulsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @TotalPrice(i64 %0, double* %1, double* %2) {
%4 = alloca i64
%5 = alloca double*
%6 = alloca double*
store i64 %0, i64* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to double
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fmul double %8, %10
%12 = load double*, double** %6
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @TotalPrice(i64 %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = sitofp i64 %0 to double
%5 = load double, double* %1
%6 = fmul double %5, %4
store double %6, double* %2
ret void
}
int compare(const void *left, const void *right) {
  return (*(int *)right - *(int *)left);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ dispevars();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Content-type: text/plain\n\n");
  dispevars();
  printf("step counter\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <dispevars@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <dispevars@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Content-type: text/plain\0A\0A\00"
@.str.1 = [14 x i8] c"step counter\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @dispevars()
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"Content-type: text/plain\0A\00"
@str.2 = [13 x i8] c"step counter\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @dispevars()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct elf32_hdr {
  int dummy;
};

/* Variables and functions */
unsigned int PER_LINUX;
int /*<<< orphan*/ set_personality(unsigned int);
void elf_set_personality(const struct elf32_hdr *x) {
  unsigned int personality = PER_LINUX;
  set_personality(personality);
}


x86 assembly (clang, -O0):
<elf_set_personality>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <set_personality@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_set_personality>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <set_personality@plt>

LLVM IR (-O0):
%struct.elf32_hdr = type { i32 }
@PER_LINUX = global i32 0
define void @elf_set_personality(%struct.elf32_hdr* %0) {
%2 = alloca %struct.elf32_hdr*
%3 = alloca i32
store %struct.elf32_hdr* %0, %struct.elf32_hdr** %2
%4 = load i32, i32* @PER_LINUX
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @set_personality(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.elf32_hdr = type { i32 }
@PER_LINUX = global i32 0
define void @elf_set_personality(%struct.elf32_hdr* nocapture readnone %0) {
%2 = load i32, i32* @PER_LINUX
%3 = tail call i32 @set_personality(i32 %2)
ret void
}
void g_string_insert_len() {}


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

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

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

LLVM IR (-O2):
define void @g_string_insert_len() {
ret void
}
void dot_replace(char *lbl) {
  for (; *lbl; lbl++)
    if (*lbl == '.')
      *lbl = '_';
}


x86 assembly (clang, -O0):
<dot_replace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <dot_replace+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    112c <dot_replace+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
jmp    1131 <dot_replace+0x31>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <dot_replace+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot_replace>:
jmp    1117 <dot_replace+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x5f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2e,%al
je     1110 <dot_replace+0x10>
test   %al,%al
jne    1113 <dot_replace+0x13>
ret

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

LLVM IR (-O2):
define void @dot_replace(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 46, label %5
]
5: ; preds = %2
store i8 95, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void barWrite32(uint32_t bar, uint32_t offset, uint32_t value) {
  volatile uint32_t *pReg = (volatile uint32_t *)(bar | (offset & 0xFF));
  *pReg = value;
}


x86 assembly (clang, -O0):
<barWrite32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<barWrite32>:
movzbl %sil,%eax
or     %edi,%eax
cltq
mov    %edx,(%rax)
ret

LLVM IR (-O0):
define void @barWrite32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = and i32 %9, 255
%11 = or i32 %8, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %7
%14 = load i32, i32* %6
%15 = load i32*, i32** %7
store volatile i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @barWrite32(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 255
%5 = or i32 %4, %0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
store volatile i32 %2, i32* %7
ret void
}
int test_imm_F1int16_reg(short val) {
  return ((val) & (-0xF1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F1int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff0f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F1int16_reg>:
test   $0xff0f,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F1int16_reg(i16 signext %0) {
%2 = and i16 %0, -241
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0x83() {
  Assert_real((isascii(131) == 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_isascii.c",
              660, ("isascii should be 0 for 0x83"));
}


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

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