xunge/DecIR huggingface dataset:
/* Variables and functions */
int atoi(char *);
int readNumber(char **lptr) {
  char *ptr = *lptr;
  char *line = *lptr;
  while (*ptr != ' ')
    ptr++;
  *ptr = 0;
  *lptr = ptr + 1;
  return atoi(line);
}


x86 assembly (clang, -O0):
<readNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1153 <readNumber+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1132 <readNumber+0x22>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
call   1030 <atoi@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readNumber>:
mov    %rdi,%rax
mov    (%rdi),%rdi
mov    %rdi,%rcx
nopl   0x0(%rax)
cmpb   $0x20,(%rcx)
lea    0x1(%rcx),%rcx
jne    1120 <readNumber+0x10>
movb   $0x0,-0x1(%rcx)
mov    %rcx,(%rax)
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @readNumber(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %2, %1 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
store i8 0, i8* %4
store i8* %7, i8** %0
%9 = tail call i32 @atoi(i8* %2)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SYS_munmap;
void *ehnlc_syscall2(int /*<<< orphan*/, void *, void *);
int ehnlc_munmap(void *addr, size_t len) {
  void *rv;
  rv = ehnlc_syscall2(SYS_munmap, addr, (void *)len);
  return rv == NULL ? 0 : -1;
}


x86 assembly (clang, -O0):
<ehnlc_munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <ehnlc_syscall2@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_munmap>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <ehnlc_syscall2@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SYS_munmap = global i32 0
define i32 @ehnlc_munmap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i32, i32* @SYS_munmap
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = inttoptr i64 %8 to i8*
%10 = call i8* @ehnlc_syscall2(i32 %6, i8* %7, i8* %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp eq i8* %11, null
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 -1
ret i32 %14
}

LLVM IR (-O2):
@SYS_munmap = global i32 0
define i32 @ehnlc_munmap(i8* %0, i64 %1) {
%3 = load i32, i32* @SYS_munmap
%4 = inttoptr i64 %1 to i8*
%5 = tail call i8* @ehnlc_syscall2(i32 %3, i8* %0, i8* %4)
%6 = icmp ne i8* %5, null
%7 = sext i1 %6 to i32
ret i32 %7
}
void nop(void *v) {
  if (v) {
  } else {
  };
}


x86 assembly (clang, -O0):
<nop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <nop+0x18>
jmp    111d <nop+0x1d>
jmp    111d <nop+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @nop(i8* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned long cris_swapwbrlz(unsigned long);
unsigned long kernel_ffs(unsigned long w) {
  return w ? cris_swapwbrlz(w) + 1 : 0;
}


x86 assembly (clang, -O0):
<kernel_ffs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113d <kernel_ffs+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <cris_swapwbrlz@plt>
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1148 <kernel_ffs+0x38>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1148 <kernel_ffs+0x38>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_ffs>:
test   %rdi,%rdi
je     1124 <kernel_ffs+0x14>
push   %rax
call   1030 <cris_swapwbrlz@plt>
add    $0x1,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @kernel_ffs(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @cris_swapwbrlz(i64 %0)
%5 = add i64 %4, 1
br label %6
6: ; preds = %1, %3
%7 = phi i64 [ %5, %3 ], [ 0, %1 ]
ret i64 %7
}
void oelevator(int dir) {}


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

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

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

LLVM IR (-O2):
define void @oelevator(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
double pow(double volatile, double);
main() {
  volatile double a;
  double c;
  a = 32.0;
  c = pow(a, 1.0 / 3.0);
  if (c + 0.1 > 3.174802 && c - 0.1 < 3.174802)
    exit(0);
  else
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe9d(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe88(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ac <main+0x7c>
movsd  -0x18(%rbp),%xmm1
movsd  0xe79(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe65(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ac <main+0x7c>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4040000000000000,%rax
mov    %rax,(%rsp)
movsd  (%rsp),%xmm0
movsd  0xeb4(%rip),%xmm1
call   1040 <pow@plt>
movsd  0xeaf(%rip),%xmm1
addsd  %xmm0,%xmm1
ucomisd 0xeab(%rip),%xmm1
jbe    1184 <main+0x54>
addsd  0xea9(%rip),%xmm0
movsd  0xe99(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1184 <main+0x54>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store volatile double 3.200000e+01, double* %2
%4 = load volatile double, double* %2
%5 = call double @pow(double %4, double 0x3FD5555555555555)
store double %5, double* %3
%6 = load double, double* %3
%7 = fadd double %6, 1.000000e-01
%8 = fcmp ogt double %7, 0x400965FE974A3401
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load double, double* %3
%11 = fsub double %10, 1.000000e-01
%12 = fcmp olt double %11, 0x400965FE974A3401
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %9, %0
%16 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store volatile double 3.200000e+01, double* %1
%3 = load volatile double, double* %1
%4 = tail call double @pow(double %3, double 0x3FD5555555555555)
%5 = fadd double %4, 1.000000e-01
%6 = fcmp ogt double %5, 0x400965FE974A3401
%7 = fadd double %4, -1.000000e-01
%8 = fcmp olt double %7, 0x400965FE974A3401
%9 = and i1 %6, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %0
%13 = tail call i32 (...) @abort()
unreachable
}
void open64() {}


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

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

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

LLVM IR (-O2):
define void @open64() {
ret void
}
void _cc3_fifo_read_inc(void) {
  (*(volatile unsigned long *)((0xE0028004))) = 0x0800;
  (*(volatile unsigned long *)((0xE002800C))) = 0x0800;
}


x86 assembly (clang, -O0):
<_cc3_fifo_read_inc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0028004,%eax
movq   $0x800,(%rax)
mov    $0xe002800c,%eax
movq   $0x800,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cc3_fifo_read_inc>:
mov    $0xe0028004,%eax
movq   $0x800,(%rax)
movq   $0x800,0x8(%rax)
ret

LLVM IR (-O0):
define void @_cc3_fifo_read_inc() {
store volatile i64 2048, i64* inttoptr (i64 3758260228 to i64*)
store volatile i64 2048, i64* inttoptr (i64 3758260236 to i64*)
ret void
}

LLVM IR (-O2):
define void @_cc3_fifo_read_inc() {
store volatile i64 2048, i64* inttoptr (i64 3758260228 to i64*)
store volatile i64 2048, i64* inttoptr (i64 3758260236 to i64*)
ret void
}
void gencvt_w_d() {}


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

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

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

LLVM IR (-O2):
define void @gencvt_w_d() {
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
scalar_t__ strspn(char *, char *);
int is_number(char *val) {
  if (strspn(val, "0123456789.") == strlen(val)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strspn@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    1165 <is_number+0x45>
movl   $0x1,-0x4(%rbp)
jmp    116c <is_number+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
call   1040 <strspn@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"0123456789.\00"
define i32 @is_number(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strspn(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = icmp eq i64 %5, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [12 x i8] c"0123456789.\00"
define i32 @is_number(i8* nocapture %0) {
%2 = tail call i64 @strspn(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void bitmap_scnlistprintf(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<bitmap_scnlistprintf>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_scnlistprintf>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.bitmap_scnlistprintf = [21 x i8] c"bitmap_scnlistprintf\00"
define void @bitmap_scnlistprintf() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.bitmap_scnlistprintf, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.bitmap_scnlistprintf = [21 x i8] c"bitmap_scnlistprintf\00"
define void @bitmap_scnlistprintf() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.bitmap_scnlistprintf, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signal(int, void (*)(int));
void setsig(int sig, void (*handler)(int)) { signal(sig, handler); }


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

x86 assembly (clang, -O2):
<setsig>:
jmp    1030 <signal@plt>

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

LLVM IR (-O2):
define void @setsig(i32 %0, void (i32)* %1) {
%3 = tail call i32 @signal(i32 %0, void (i32)* %1)
ret void
}
void black_hole_(void *key) {}


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

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

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

LLVM IR (-O2):
define void @black_hole_(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ flag;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, char *, int);
int cf_socket_reusable(int sd) {
  int flag = 1;
  return setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *)&flag, sizeof(flag));
}


x86 assembly (clang, -O0):
<cf_socket_reusable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cf_socket_reusable>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @cf_socket_reusable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_REUSEADDR
%7 = bitcast i32* %3 to i8*
%8 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i8* %7, i32 4)
ret i32 %8
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @cf_socket_reusable(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_REUSEADDR
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i8* %3, i32 4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_149() {
  Assert_real((isqrt(149) == 12),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              750, ("Integer square root of 149 should be 12"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_149>:
push   %rax
mov    $0x95,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x2ee,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 149 should be 12\00"
define void @t_sqrt_149() {
%1 = call i32 @isqrt(i32 149)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 149 should be 12\00"
define void @t_sqrt_149() {
%1 = tail call i32 @isqrt(i32 149)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 750, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_close;
int syscall_1(int /*<<< orphan*/, int);
int close(int fd) { return syscall_1(SYS_close, fd); }


x86 assembly (clang, -O0):
<close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_1@plt>

LLVM IR (-O0):
@SYS_close = global i32 0
define i32 @close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_close
%4 = load i32, i32* %2
%5 = call i32 @syscall_1(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SYS_close = global i32 0
define i32 @close(i32 %0) {
%2 = load i32, i32* @SYS_close
%3 = tail call i32 @syscall_1(i32 %2, i32 %0)
ret i32 %3
}
/* Variables and functions */
int XParseGeometry(char const *, int *, int *, unsigned int *, unsigned int *);
void x_parse_geometry(const char *str, int *flags, int *x, int *y,
                      unsigned int *w, unsigned int *h) {
  *flags = XParseGeometry(str, x, y, w, h);
}


x86 assembly (clang, -O0):
<x_parse_geometry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1030 <XParseGeometry@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_parse_geometry>:
push   %rbx
mov    %rsi,%rbx
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r9,%r8
call   1030 <XParseGeometry@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @x_parse_geometry(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = load i32*, i32** %11
%17 = load i32*, i32** %12
%18 = call i32 @XParseGeometry(i8* %13, i32* %14, i32* %15, i32* %16, i32* %17)
%19 = load i32*, i32** %8
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
define void @x_parse_geometry(i8* %0, i32* nocapture writeonly %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32 @XParseGeometry(i8* %0, i32* %2, i32* %3, i32* %4, i32* %5)
store i32 %7, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _my_log(char *, int, char *, char *, int, char const *);
void log_err(const char *errstr) {
  do {
    _my_log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/"
            "master/transfer/org_fix.c",
            382, "[ ERROR ] at %s:%d ,err info: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/"
            "master/transfer/org_fix.c",
            382, errstr);
  } while (0);
}


x86 assembly (clang, -O0):
<log_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%r9
lea    0xed9(%rip),%rcx
mov    $0x17e,%r8d
lea    0xf66(%rip),%rdx
mov    %rcx,%rdi
mov    %r8d,%esi
call   1030 <_my_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_err>:
mov    %rdi,%r9
lea    0xf80(%rip),%rdx
lea    0xedf(%rip),%rcx
mov    %rcx,%rdi
mov    $0x17e,%esi
mov    $0x17e,%r8d
jmp    1030 <_my_log@plt>

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/master/transfer/org_fix.c\00"
@.str.1 = [34 x i8] c"[ ERROR ] at %s:%d ,err info: %s\0A\00"
define void @log_err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = call i32 @_my_log(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 382, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 382, i8* %4)
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/master/transfer/org_fix.c\00"
@.str.1 = [34 x i8] c"[ ERROR ] at %s:%d ,err info: %s\0A\00"
define void @log_err(i8* %0) {
%2 = tail call i32 @_my_log(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 382, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 382, i8* %0)
ret void
}
int satsw(int x) {
  if (x < -32768)
    return -32768;
  else if (x > 32767)
    return 32767;
  else
    return x;
}


x86 assembly (clang, -O0):
<satsw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffff8000,-0x8(%rbp)
jge    1120 <satsw+0x20>
movl   $0xffff8000,-0x4(%rbp)
jmp    113f <satsw+0x3f>
cmpl   $0x7fff,-0x8(%rbp)
jle    1139 <satsw+0x39>
movl   $0x7fff,-0x4(%rbp)
jmp    113f <satsw+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<satsw>:
cmp    $0x7fff,%edi
mov    $0x7fff,%ecx
cmovl  %edi,%ecx
cmp    $0xffff8001,%ecx
mov    $0xffff8000,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @satsw(i32 %0) {
%2 = icmp slt i32 %0, 32767
%3 = select i1 %2, i32 %0, i32 32767
%4 = icmp sgt i32 %3, -32768
%5 = select i1 %4, i32 %3, i32 -32768
ret i32 %5
}
int cmp_ull(const void *l, const void *r) {
  const unsigned long long *left = l;
  const unsigned long long *right = r;
  if (*left < *right) {
    return -1;
  }
  if (*left > *right) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_ull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jae    113c <cmp_ull+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <cmp_ull+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jbe    115c <cmp_ull+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <cmp_ull+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_ull>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_ull(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %7
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %7
%15 = load i64, i64* %14
%16 = icmp ult i64 %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %26
18: ; preds = %2
%19 = load i64*, i64** %6
%20 = load i64, i64* %19
%21 = load i64*, i64** %7
%22 = load i64, i64* %21
%23 = icmp ugt i64 %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 1, i32* %3
br label %26
25: ; preds = %18
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @cmp_ull(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
%8 = icmp ugt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void mdp4_dsi_video_base_swap(int cndx, struct mdp4_overlay_pipe *pipe) {}


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

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

LLVM IR (-O0):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dsi_video_base_swap(i32 %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca i32
%4 = alloca %struct.mdp4_overlay_pipe*
store i32 %0, i32* %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dsi_video_base_swap(i32 %0, %struct.mdp4_overlay_pipe* nocapture %1) {
ret void
}
/* Variables and functions */
char *__strcpbrk(char const *, char const *);
size_t strlen(char const *);
size_t strspn(const char *s1, const char *s2) {
  char *first_occ = __strcpbrk(s1, s2);
  if (first_occ == NULL)
    return strlen(s1);
  else if (first_occ == s1)
    return 0;
  else
    return (first_occ - s1);
}


x86 assembly (clang, -O0):
<strspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <__strcpbrk@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115e <strspn+0x3e>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x8(%rbp)
jmp    1188 <strspn+0x68>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1179 <strspn+0x59>
movq   $0x0,-0x8(%rbp)
jmp    1188 <strspn+0x68>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strspn>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__strcpbrk@plt>
test   %rax,%rax
je     1135 <strspn+0x15>
sub    %rbx,%rax
je     113e <strspn+0x1e>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @strspn(i8* %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @__strcpbrk(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i64 @strlen(i8* %13)
store i64 %14, i64* %3
br label %26
15: ; preds = %2
%16 = load i8*, i8** %6
%17 = load i8*, i8** %4
%18 = icmp eq i8* %16, %17
br i1 %18, label %19, label %20
19: ; preds = %15
store i64 0, i64* %3
br label %26
20: ; preds = %15
%21 = load i8*, i8** %6
%22 = load i8*, i8** %4
%23 = ptrtoint i8* %21 to i64
%24 = ptrtoint i8* %22 to i64
%25 = sub i64 %23, %24
store i64 %25, i64* %3
br label %26
26: ; preds = %20, %19, %12
%27 = load i64, i64* %3
ret i64 %27
}

LLVM IR (-O2):
define i64 @strspn(i8* %0, i8* %1) {
%3 = tail call i8* @__strcpbrk(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %13
7: ; preds = %2
%8 = icmp eq i8* %3, %0
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = ptrtoint i8* %3 to i64
%11 = ptrtoint i8* %0 to i64
%12 = sub i64 %10, %11
br label %13
13: ; preds = %7, %9, %5
%14 = phi i64 [ %6, %5 ], [ %12, %9 ], [ 0, %7 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ output_banks();
int /*<<< orphan*/ scan_c_file(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int i = 1;
  while (*++argv)
    scan_c_file(*argv, i++);
  output_banks();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     1173 <main+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
call   1040 <scan_c_file@plt>
jmp    113d <main+0x1d>
mov    $0x0,%al
call   1030 <output_banks@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     1155 <main+0x35>
mov    %rsi,%r14
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x1(%rbx),%esi
call   1040 <scan_c_file@plt>
mov    (%r14,%rbx,8),%rdi
add    $0x1,%rbx
test   %rdi,%rdi
jne    1140 <main+0x20>
xor    %eax,%eax
call   1030 <output_banks@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %13, %6 ], [ %4, %2 ]
%8 = phi i8** [ %12, %6 ], [ %3, %2 ]
%9 = phi i32 [ %10, %6 ], [ 1, %2 ]
%10 = add nuw nsw i32 %9, 1
%11 = tail call i32 @scan_c_file(i8* %7, i32 %9)
%12 = getelementptr inbounds i8*, i8** %8, i64 1
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %6
15: ; preds = %6, %2
%16 = tail call i32 (...) @output_banks()
ret i32 0
}
float quintic_ease_in(float p) { return p * p * p * p * p; }


x86 assembly (clang, -O0):
<quintic_ease_in>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quintic_ease_in>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quintic_ease_in(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = load float, float* %2
%11 = fmul float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @quintic_ease_in(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = fmul float %3, %0
%5 = fmul float %4, %0
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ cprintf(char *);
int my_main(void) { cprintf("MYMAIN\n"); }


x86 assembly (clang, -O0):
<my_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <cprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"MYMAIN\0A\00"
define i32 @my_main() {
%1 = alloca i32
%2 = call i32 @cprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [8 x i8] c"MYMAIN\0A\00"
define i32 @my_main() {
%1 = tail call i32 @cprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int main() {
  char a_str[] = {"Hello, World."};
  reverseStr(a_str);
  printf("After a string is reversed, you got: %s\n", a_str);
  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,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rdi
mov    $0x0,%al
call   1040 <reverseStr@plt>
lea    -0x12(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x2e646c726f5720,%rax
mov    %rax,0x6(%rsp)
movabs $0x57202c6f6c6c6548,%rax
2c 20 57
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <reverseStr@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a_str = [14 x i8] c"Hello, World.\00"
@.str = [41 x i8] c"After a string is reversed, you got: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
store i32 0, i32* %1
%3 = bitcast [14 x i8]* %2 to i8*
%4 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @reverseStr to i32 (i8*, ...)*)(i8* %4)
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a_str = [14 x i8] c"Hello, World.\00"
@.str = [41 x i8] c"After a string is reversed, you got: %s\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @reverseStr to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void log_init() { return; }


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

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

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

LLVM IR (-O2):
define void @log_init() {
ret void
}
int localvars_after_alloca(c, s, i, l)
char c;
short s;
int i;
long l;
{
  char *z = __builtin_alloca(s + 50);
  c = 'a';
  s = 5;
  i = 6;
  l = 7;
}


x86 assembly (clang, -O0):
<localvars_after_alloca>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
movswq -0x8(%rbp),%rcx
add    $0x41,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,-0x20(%rbp)
movb   $0x61,-0x5(%rbp)
movw   $0x5,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movq   $0x7,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @localvars_after_alloca(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
%9 = alloca i64
%10 = alloca i8*
%11 = trunc i32 %0 to i8
%12 = trunc i32 %1 to i16
store i8 %11, i8* %6
store i16 %12, i16* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
%13 = load i16, i16* %7
%14 = sext i16 %13 to i32
%15 = add nsw i32 %14, 50
%16 = sext i32 %15 to i64
%17 = alloca i8, i64 %16
store i8* %17, i8** %10
store i8 97, i8* %6
store i16 5, i16* %7
store i32 6, i32* %8
store i64 7, i64* %9
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @localvars_after_alloca(i32 %0, i32 %1, i32 %2, i64 %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x39() {
  Assert_real((isodigit(57) == 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_isodigit.c",
              290, ("isodigit should be 0 for 9"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x39>:
push   %rax
mov    $0x39,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x122,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for 9\00"
define void @t_isodigit_0x39() {
%1 = call i64 @isodigit(i32 57)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 290, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for 9\00"
define void @t_isodigit_0x39() {
%1 = tail call i64 @isodigit(i32 57)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 290, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct jx {
  int dummy;
};

/* Variables and functions */
struct jx *interfaces_of_host() {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.jx = type { i32 }
define %struct.jx* @interfaces_of_host() {
ret %struct.jx* null
}

LLVM IR (-O2):
%struct.jx = type { i32 }
define noalias %struct.jx* @interfaces_of_host() {
ret %struct.jx* null
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int);
int ToLower(int c) {
  if (isupper(c)) {
    return tolower(c);
  }
  return c;
}


x86 assembly (clang, -O0):
<ToLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     114d <ToLower+0x2d>
mov    -0x8(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0x4(%rbp)
jmp    1153 <ToLower+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToLower>:
push   %rbx
mov    %edi,%ebx
call   1040 <isupper@plt>
test   %rax,%rax
je     1135 <ToLower+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tolower@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ToLower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isupper(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @tolower(i32 %8)
store i32 %9, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @ToLower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @tolower(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
unsigned int __blcfill_u32(unsigned int);
unsigned int test__blcfill_u32(unsigned int a) { return __blcfill_u32(a); }


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

x86 assembly (clang, -O2):
<test__blcfill_u32>:
jmp    1030 <__blcfill_u32@plt>

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

LLVM IR (-O2):
define i32 @test__blcfill_u32(i32 %0) {
%2 = tail call i32 @__blcfill_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void packet_destroy(unsigned char *packet) { free(packet); }


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

x86 assembly (clang, -O2):
<packet_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @packet_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1(int, int, int, int);
void g1() { f1(41, 42, 43, 44); }


x86 assembly (clang, -O0):
<g1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
mov    $0x2a,%esi
mov    $0x2b,%edx
mov    $0x2c,%ecx
call   1030 <f1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g1>:
mov    $0x29,%edi
mov    $0x2a,%esi
mov    $0x2b,%edx
mov    $0x2c,%ecx
jmp    1030 <f1@plt>

LLVM IR (-O0):
define void @g1() {
%1 = call i32 @f1(i32 41, i32 42, i32 43, i32 44)
ret void
}

LLVM IR (-O2):
define void @g1() {
%1 = tail call i32 @f1(i32 41, i32 42, i32 43, i32 44)
ret void
}
/* Type definitions */
struct snd_kcontrol {
  int dummy;
};
struct snd_ctl_elem_info {
  int dummy;
};

/* Variables and functions */
int snd_ctl_enum_info(struct snd_ctl_elem_info *, int, int,
                      char const *const *);
int ac97_surround_jack_mode_info(struct snd_kcontrol *kcontrol,
                                 struct snd_ctl_elem_info *uinfo) {
  static const char *const texts[] = {"Shared", "Independent"};
  return snd_ctl_enum_info(uinfo, 1, 2, texts);
}


x86 assembly (clang, -O0):
<ac97_surround_jack_mode_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
lea    0x2cdb(%rip),%rcx
call   1030 <snd_ctl_enum_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ac97_surround_jack_mode_info>:
mov    %rsi,%rdi
lea    0x2cf6(%rip),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
jmp    1030 <snd_ctl_enum_info@plt>

LLVM IR (-O0):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@ac97_surround_jack_mode_info.texts = internal constant [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Shared\00"
@.str.1 = [12 x i8] c"Independent\00"
define i32 @ac97_surround_jack_mode_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_ctl_elem_info*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_ctl_elem_info* %1, %struct.snd_ctl_elem_info** %4
%5 = load %struct.snd_ctl_elem_info*, %struct.snd_ctl_elem_info** %4
%6 = call i32 @snd_ctl_enum_info(%struct.snd_ctl_elem_info* %5, i32 1, i32 2, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @ac97_surround_jack_mode_info.texts, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@ac97_surround_jack_mode_info.texts = internal constant [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Shared\00"
@.str.1 = [12 x i8] c"Independent\00"
define i32 @ac97_surround_jack_mode_info(%struct.snd_kcontrol* nocapture readnone %0, %struct.snd_ctl_elem_info* %1) {
%3 = tail call i32 @snd_ctl_enum_info(%struct.snd_ctl_elem_info* %1, i32 1, i32 2, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @ac97_surround_jack_mode_info.texts, i64 0, i64 0))
ret i32 %3
}