xunge/DecIR huggingface dataset:
int ft_get_res_length(long long n, int base_length) {
  int i;
  if (n == 0)
    return (1);
  i = (n < 0 ? 1 : 0);
  while (n != 0) {
    n /= base_length;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_get_res_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1122 <ft_get_res_length+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1167 <ft_get_res_length+0x67>
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1161 <ft_get_res_length+0x61>
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1137 <ft_get_res_length+0x37>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_get_res_length>:
test   %rdi,%rdi
je     1142 <ft_get_res_length+0x42>
mov    %rdi,%rax
mov    %rdi,%rcx
shr    $0x3f,%rcx
movslq %esi,%rdi
jmp    112d <ft_get_res_length+0x2d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cqto
idiv   %rdi
add    $0x1,%ecx
test   %rax,%rax
je     113f <ft_get_res_length+0x3f>
mov    %rax,%rdx
or     %rdi,%rdx
shr    $0x20,%rdx
jne    1120 <ft_get_res_length+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <ft_get_res_length+0x25>
mov    %ecx,%eax
ret
mov    $0x1,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_get_res_length(i64 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %27
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp slt i64 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
store i32 %14, i32* %6
br label %15
15: ; preds = %18, %10
%16 = load i64, i64* %4
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = load i64, i64* %4
%22 = sdiv i64 %21, %20
store i64 %22, i64* %4
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %15
25: ; preds = %15
%26 = load i32, i32* %6
store i32 %26, i32* %3
br label %27
27: ; preds = %25, %9
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @ft_get_res_length(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = lshr i64 %0, 63
%6 = trunc i64 %5 to i32
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %4, %8
%9 = phi i32 [ %6, %4 ], [ %12, %8 ]
%10 = phi i64 [ %0, %4 ], [ %11, %8 ]
%11 = sdiv i64 %10, %7
%12 = add nuw nsw i32 %9, 1
%13 = icmp eq i64 %11, 0
br i1 %13, label %14, label %8
14: ; preds = %8, %2
%15 = phi i32 [ 1, %2 ], [ %12, %8 ]
ret i32 %15
}
void RTTestIFailed(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestIFailed() {
ret void
}
/* Variables and functions */
unsigned int ft_sizelen(size_t nbr) {
  unsigned int len;
  len = 1;
  while (nbr > 9) {
    nbr /= 10;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_sizelen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpq   $0x9,-0x8(%rbp)
jbe    113a <ft_sizelen+0x3a>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_sizelen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sizelen>:
mov    $0x1,%ecx
cmp    $0xa,%rdi
jb     1136 <ft_sizelen+0x36>
mov    $0x1,%ecx
movabs $0xcccccccccccccccd,%rsi
cc cc cc
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%ecx
cmp    $0x63,%rdi
mov    %rdx,%rdi
ja     1120 <ft_sizelen+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_sizelen(i64 %0) {
%2 = icmp ugt i64 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i64 %5, 10
%7 = add i32 %4, 1
%8 = icmp ugt i64 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
int mop_is_dashdash(const char *arg) {
  return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] == '\0';
}


x86 assembly (clang, -O0):
<mop_is_dashdash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1154 <mop_is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <mop_is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <mop_is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mop_is_dashdash>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <mop_is_dashdash+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <mop_is_dashdash+0x1b>
cmpb   $0x2d,0x1(%rdi)
jne    111b <mop_is_dashdash+0x1b>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @mop_is_dashdash(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 %23
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %23
11: ; preds = %5
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 45
br i1 %16, label %17, label %23
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br label %23
23: ; preds = %17, %11, %5, %1
%24 = phi i1 [ false, %11 ], [ false, %5 ], [ false, %1 ], [ %22, %17 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @mop_is_dashdash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %6, %3, %1
%16 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %14, %10 ]
ret i32 %16
}
double d6_to_double(int x) { return x / 64.; }


x86 assembly (clang, -O0):
<d6_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d6_to_double>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @d6_to_double(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 6.400000e+01
ret double %5
}

LLVM IR (-O2):
define double @d6_to_double(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 1.562500e-02
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ die(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int xmkusock(void) {
  int sd = socket(AF_UNIX, SOCK_STREAM, 0);
  if (sd < 0)
    die("socket:");
  return sd;
}


x86 assembly (clang, -O0):
<xmkusock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    115a <xmkusock+0x3a>
lea    0xeab(%rip),%rdi
call   1030 <die@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmkusock>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    114c <xmkusock+0x2c>
lea    0xeb9(%rip),%rdi
call   1030 <die@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [8 x i8] c"socket:\00"
define i32 @xmkusock() {
%1 = alloca i32
%2 = load i32, i32* @AF_UNIX
%3 = load i32, i32* @SOCK_STREAM
%4 = call i32 @socket(i32 %2, i32 %3, i32 0)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @die(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@AF_UNIX = global i32 0
@SOCK_STREAM = global i32 0
@.str = [8 x i8] c"socket:\00"
define i32 @xmkusock() {
%1 = load i32, i32* @AF_UNIX
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @die(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ kvm_hypercall0_amd(unsigned int);
int /*<<< orphan*/ kvm_hypercall0_intel(unsigned int);
int /*<<< orphan*/ printf(char *);
int main(int ac, char **av) {
  kvm_hypercall0_intel(-1u);
  printf("Hypercall via VMCALL: OK\n");
  kvm_hypercall0_amd(-1u);
  printf("Hypercall via VMMCALL: OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%edi
call   1050 <kvm_hypercall0_intel@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1030 <kvm_hypercall0_amd@plt>
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1050 <kvm_hypercall0_intel@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <kvm_hypercall0_amd@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Hypercall via VMCALL: OK\0A\00"
@.str.1 = [27 x i8] c"Hypercall via VMMCALL: OK\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @kvm_hypercall0_intel(i32 -1)
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @kvm_hypercall0_amd(i32 -1)
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"Hypercall via VMCALL: OK\00"
@str.2 = [26 x i8] c"Hypercall via VMMCALL: OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @kvm_hypercall0_intel(i32 -1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @kvm_hypercall0_amd(i32 -1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void set_dr1(void *value) { asm volatile("mov %0,%%dr1" : : "r"(value)); }


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

x86 assembly (clang, -O2):
<set_dr1>:
mov    %rdi,%db1
ret

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

LLVM IR (-O2):
define void @set_dr1(i8* %0) {
tail call void asm sideeffect "mov $0,%dr1", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int link(char *, char *);
int /*<<< orphan*/ perror(char *);
void cmd_link(int argc, char *argv[]) {
  if (link(argv[1], argv[2]) == -1)
    perror("link");
}


x86 assembly (clang, -O0):
<cmd_link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <link@plt>
cmp    $0xffffffff,%eax
jne    1159 <cmd_link+0x39>
lea    0xeac(%rip),%rdi
call   1030 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_link>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <link@plt>
cmp    $0xffffffff,%eax
je     1135 <cmd_link+0x15>
pop    %rax
ret
lea    0xec4(%rip),%rdi
pop    %rax
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"link\00"
define void @cmd_link(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @link(i8* %4, i8* %6)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}
void topla(int s1, int s2, int *y) {}


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

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

LLVM IR (-O0):
define void @topla(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @topla(i32 %0, i32 %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_test_callback() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_test_callback>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_test_callback>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_test_callback() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_test_callback() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
const char *eat_front_whitespace(const char *s) {
  while ((*s == '\t') || (*s == '\n') || (*s == ' '))
    s++;
  return s;
}


x86 assembly (clang, -O0):
<eat_front_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     1142 <eat_front_whitespace+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x9(%rbp)
je     1142 <eat_front_whitespace+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <eat_front_whitespace+0x52>
jmp    1163 <eat_front_whitespace+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <eat_front_whitespace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_front_whitespace>:
mov    %rdi,%rax
movabs $0x100000600,%rcx
nopl   (%rax)
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1125 <eat_front_whitespace+0x25>
bt     %rdx,%rcx
jae    1125 <eat_front_whitespace+0x25>
add    $0x1,%rax
jmp    1110 <eat_front_whitespace+0x10>
ret

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

LLVM IR (-O2):
define i8* @eat_front_whitespace(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 9, label %5
i8 10, label %5
i8 32, label %5
]
5: ; preds = %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
void init_openmp(void) { return; }


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

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

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

LLVM IR (-O2):
define void @init_openmp() {
ret void
}
/* Variables and functions */
unsigned char VIM_HAPI_StopCapture();
unsigned char Avi_StopCaptureJpeg(void) {
  unsigned char result;
  result = VIM_HAPI_StopCapture();
  return result;
}


x86 assembly (clang, -O0):
<Avi_StopCaptureJpeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <VIM_HAPI_StopCapture@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @Avi_StopCaptureJpeg() {
%1 = alloca i8
%2 = call zeroext i8 (...) @VIM_HAPI_StopCapture()
store i8 %2, i8* %1
%3 = load i8, i8* %1
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @Avi_StopCaptureJpeg() {
%1 = tail call zeroext i8 (...) @VIM_HAPI_StopCapture()
ret i8 %1
}
long *functhatdoesthings2(int *const a, const char *const *const *const b) {
  int c = *a;
  char d = ***b;
}


x86 assembly (clang, -O0):
<functhatdoesthings2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x1d(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i64* @functhatdoesthings2(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
ret i64* undef
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ system(char *);
void *dhcpcd_handler(void *arg) {
  while (1) {
    system("dhcpcd -D -I looper -h looper");
    sleep(10);
  }
}


x86 assembly (clang, -O0):
<dhcpcd_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <system@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    112c <dhcpcd_handler+0xc>

x86 assembly (clang, -O2):
<dhcpcd_handler>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <system@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    1130 <dhcpcd_handler+0x10>

LLVM IR (-O0):
@.str = [30 x i8] c"dhcpcd -D -I looper -h looper\00"
define i8* @dhcpcd_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @sleep(i32 10)
br label %3
}

LLVM IR (-O2):
@.str = [30 x i8] c"dhcpcd -D -I looper -h looper\00"
define noalias i8* @dhcpcd_handler(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @system(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 10)
br label %2
}
void g_byte_array_remove_index_fast() {}


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

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

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

LLVM IR (-O2):
define void @g_byte_array_remove_index_fast() {
ret void
}
/* Type definitions */
struct statvfs {
  long f_bsize;
  long f_bavail;
};

/* Variables and functions */
scalar_t__ statvfs(char *, struct statvfs *);
long int disk_usage() {
  struct statvfs sbuf;
  if (statvfs("/", &sbuf) < 0) {
    return -1;
  }
  return sbuf.f_bsize * sbuf.f_bavail;
}


x86 assembly (clang, -O0):
<disk_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <statvfs@plt>
cmp    $0x0,%rax
jge    113f <disk_usage+0x2f>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    114c <disk_usage+0x3c>
mov    -0x18(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_usage>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <statvfs@plt>
mov    0x10(%rsp),%rcx
imul   0x8(%rsp),%rcx
test   %rax,%rax
mov    $0xffffffffffffffff,%rax
cmovns %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.statvfs = type { i64, i64 }
@.str = [2 x i8] c"/\00"
define i64 @disk_usage() {
%1 = alloca i64
%2 = alloca %struct.statvfs
%3 = call i64 @statvfs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.statvfs* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 -1, i64* %1
br label %12
6: ; preds = %0
%7 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i32 0, i32 0
%8 = load i64, i64* %7
%9 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i32 0, i32 1
%10 = load i64, i64* %9
%11 = mul nsw i64 %8, %10
store i64 %11, i64* %1
br label %12
12: ; preds = %6, %5
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
%struct.statvfs = type { i64, i64 }
@.str = [2 x i8] c"/\00"
define i64 @disk_usage() {
%1 = alloca %struct.statvfs
%2 = bitcast %struct.statvfs* %1 to i8*
%3 = call i64 @statvfs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.statvfs* %1)
%4 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, %5
%9 = icmp sgt i64 %3, -1
%10 = select i1 %9, i64 %8, i64 -1
ret i64 %10
}
char *str_strip_end_char(str)
char *str;
{
  int length;
  length = strlen(str);
  str[length - 1] = '\0';
  return str;
}


x86 assembly (clang, -O0):
<str_strip_end_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_strip_end_char>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0xffffffff,%eax
cltq
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @str_strip_end_char(i8* returned %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 32
%4 = add i64 %3, -4294967296
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x3d() {
  Assert_real((isdigit(61) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              310, ("isdigit should be 0 for ="));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x3d>:
push   %rax
mov    $0x3d,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x136,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for =\00"
define void @t_isdigit_0x3d() {
%1 = call i64 @isdigit(i32 61)
%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 310, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for =\00"
define void @t_isdigit_0x3d() {
%1 = tail call i64 @isdigit(i32 61)
%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 310, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ startApplication();
int main() { startApplication(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @startApplication()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @startApplication()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mpga_get_bitrate_index(const uint8_t *p_mpga) { return p_mpga[2] >> 4; }


x86 assembly (clang, -O0):
<mpga_get_bitrate_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
sar    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpga_get_bitrate_index>:
mov    0x8(%rdi),%eax
sar    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @mpga_get_bitrate_index(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @mpga_get_bitrate_index(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
ret i32 %4
}
int isupper(int ch) { return ((ch >= 'A') && (ch <= 'Z')); }


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
double norm2_2d(double *x) {
  double out;
  out = *x * *x;
  x++;
  ;
  out += *x * *x;
  return out;
}


x86 assembly (clang, -O0):
<norm2_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm2_2d>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @norm2_2d(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
%4 = load double*, double** %2
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = load double, double* %6
%8 = fmul double %5, %7
store double %8, double* %3
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i32 1
store double* %10, double** %2
%11 = load double*, double** %2
%12 = load double, double* %11
%13 = load double*, double** %2
%14 = load double, double* %13
%15 = load double, double* %3
%16 = call double @llvm.fmuladd.f64(double %12, double %14, double %15)
store double %16, double* %3
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @norm2_2d(double* nocapture %0) {
%2 = load double, double* %0
%3 = fmul double %2, %2
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %3)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ t(int);
void test(int function_parameter2) { t(function_parameter2); }


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <t@plt>

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

LLVM IR (-O2):
define void @test(i32 %0) {
%2 = tail call i32 @t(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetTextColor(int, int);
int /*<<< orphan*/ cls();
void InitializeVideo() {
  SetTextColor(0x07, 0x00);
  cls();
}


x86 assembly (clang, -O0):
<InitializeVideo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
xor    %esi,%esi
call   1030 <SetTextColor@plt>
mov    $0x0,%al
call   1040 <cls@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitializeVideo>:
push   %rax
mov    $0x7,%edi
xor    %esi,%esi
call   1030 <SetTextColor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cls@plt>

LLVM IR (-O0):
define void @InitializeVideo() {
%1 = call i32 @SetTextColor(i32 7, i32 0)
%2 = call i32 (...) @cls()
ret void
}

LLVM IR (-O2):
define void @InitializeVideo() {
%1 = tail call i32 @SetTextColor(i32 7, i32 0)
%2 = tail call i32 (...) @cls()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double, double,
                           char *);
void Circle(FILE *F, double r, double x, double y, char *color) {
  fprintf(F, "<circle cx=\"%.2lf\" cy=\"%.2lf\" r=\"%.2lf\" fill=\"%s\"/>", x,
          y, r, color);
}


x86 assembly (clang, -O0):
<Circle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mov    -0x28(%rbp),%rdx
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Circle>:
mov    %rsi,%rdx
movaps %xmm0,%xmm3
lea    0xee3(%rip),%rsi
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"<circle cx=\22%.2lf\22 cy=\22%.2lf\22 r=\22%.2lf\22 fill=\22%s\22/>\00"
define void @Circle(i32* %0, double %1, double %2, double %3, i8* %4) {
%6 = alloca i32*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i8*
store i32* %0, i32** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store i8* %4, i8** %10
%11 = load i32*, i32** %6
%12 = load double, double* %8
%13 = load double, double* %9
%14 = load double, double* %7
%15 = load i8*, i8** %10
%16 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %12, double %13, double %14, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"<circle cx=\22%.2lf\22 cy=\22%.2lf\22 r=\22%.2lf\22 fill=\22%s\22/>\00"
define void @Circle(i32* nocapture %0, double %1, double %2, double %3, i8* %4) {
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %2, double %3, double %1, i8* %4)
ret void
}
unsigned int f57(unsigned int x, unsigned int y) {
  return (x << (8 * sizeof(unsigned int) - y)) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f57>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x20,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f57>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f57(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = sub i64 32, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %5, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = lshr i32 %11, %12
%14 = xor i32 %10, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f57(i32 %0, i32 %1) {
%3 = sub i32 32, %1
%4 = shl i32 %0, %3
%5 = lshr i32 %0, %1
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x83() {
  Assert_real((islower(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_islower.c",
              660, ("islower should be 0 for 0x83"));
}


x86 assembly (clang, -O0):
<t_islower_0x83>:
push   %rbp
mov    %rsp,%rbp
mov    $0x83,%edi
call   1030 <islower@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_islower_0x83>:
push   %rax
mov    $0x83,%edi
call   1030 <islower@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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x83\00"
define void @t_islower_0x83() {
%1 = call i64 @islower(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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x83\00"
define void @t_islower_0x83() {
%1 = tail call i64 @islower(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
}
long long int russian(long long int a, long long int b) {
  long long int x = a;
  long long int y = b;
  long long int z = 0;
  while (x > 0) {
    if (x % 2 == 1)
      z += y;
    y = y << 1;
    x = x >> 1;
  }
  return z;
}


x86 assembly (clang, -O0):
<russian>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    1170 <russian+0x70>
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x1,%rdx
jne    1153 <russian+0x53>
mov    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <russian+0x24>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<russian>:
xor    %eax,%eax
test   %rdi,%rdi
jle    112d <russian+0x2d>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
neg    %rdx
and    %rsi,%rdx
add    %rdx,%rax
add    %rsi,%rsi
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <russian+0x10>
ret

LLVM IR (-O0):
define i64 @russian(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
store i64 %8, i64* %5
%9 = load i64, i64* %4
store i64 %9, i64* %6
store i64 0, i64* %7
br label %10
10: ; preds = %21, %2
%11 = load i64, i64* %5
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i64, i64* %5
%15 = srem i64 %14, 2
%16 = icmp eq i64 %15, 1
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = add nsw i64 %19, %18
store i64 %20, i64* %7
br label %21
21: ; preds = %17, %13
%22 = load i64, i64* %6
%23 = shl i64 %22, 1
store i64 %23, i64* %6
%24 = load i64, i64* %5
%25 = ashr i64 %24, 1
store i64 %25, i64* %5
br label %10
26: ; preds = %10
%27 = load i64, i64* %7
ret i64 %27
}

LLVM IR (-O2):
define i64 @russian(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = phi i64 [ %12, %4 ], [ %1, %2 ]
%7 = phi i64 [ %13, %4 ], [ %0, %2 ]
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i64 0, i64 %6
%11 = add nsw i64 %10, %5
%12 = shl i64 %6, 1
%13 = lshr i64 %7, 1
%14 = icmp ult i64 %7, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i64 [ 0, %2 ], [ %11, %4 ]
ret i64 %16
}
void counter$clock$set_rate(char arg_0x82b59f8, char arg_0x82b5b58) {
  clock$clock$set_rate(arg_0x82b59f8, arg_0x82b5b58);
}


x86 assembly (clang, -O0):
<counter$clock$set_rate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
movsbl -0x2(%rbp),%esi
mov    $0x0,%al
call   1030 <clock$clock$set_rate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<counter$clock$set_rate>:
xor    %eax,%eax
jmp    1030 <clock$clock$set_rate@plt>

LLVM IR (-O0):
define void @"counter$clock$set_rate"(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @"clock$clock$set_rate" to i32 (i32, i32, ...)*)(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @"counter$clock$set_rate"(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @"clock$clock$set_rate" to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ft_free(void *ptr, int len) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @ft_free(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
int do_fs_inode_setattr(struct stp_inode *inode) { return -1; }


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

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

LLVM IR (-O0):
%struct.stp_inode = type opaque
define i32 @do_fs_inode_setattr(%struct.stp_inode* %0) {
%2 = alloca %struct.stp_inode*
store %struct.stp_inode* %0, %struct.stp_inode** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.stp_inode = type opaque
define i32 @do_fs_inode_setattr(%struct.stp_inode* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ yyerror(char *);
void *yymalloc(unsigned bytes) {
  void *ptr = (void *)malloc(bytes);
  if (ptr != 0)
    return (ptr);
  yyerror("yyparse: memory exhausted");
  return (0);
}


x86 assembly (clang, -O0):
<yymalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114f <yymalloc+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <yymalloc+0x43>
lea    0xeaa(%rip),%rdi
call   1030 <yyerror@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yymalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     112d <yymalloc+0xd>
pop    %rcx
ret
lea    0xecc(%rip),%rdi
call   1030 <yyerror@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"yyparse: memory exhausted\00"
define i8* @yymalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = inttoptr i64 %2 to i8*
br label %8
6: ; preds = %1
%7 = tail call i32 @yyerror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ null, %6 ]
ret i8* %9
}
assert(x) {
  if (!x)
    abort();
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <assert+0x1a>
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
push   %rax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret i32 undef
}
/* Variables and functions */
int ap_get_string_set_int(int, int, char *, int, int);
int ap_get_file_path_for_track(int session, char *path, int track) {
  return (ap_get_string_set_int(session, 0xcc32, path, 1024, track));
}


x86 assembly (clang, -O0):
<ap_get_file_path_for_track>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%r8d
mov    $0xcc32,%esi
mov    $0x400,%ecx
call   1030 <ap_get_string_set_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_get_file_path_for_track>:
mov    %edx,%r8d
mov    %rsi,%rdx
mov    $0xcc32,%esi
mov    $0x400,%ecx
jmp    1030 <ap_get_string_set_int@plt>

LLVM IR (-O0):
define i32 @ap_get_file_path_for_track(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @ap_get_string_set_int(i32 %7, i32 52274, i8* %8, i32 1024, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ap_get_file_path_for_track(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @ap_get_string_set_int(i32 %0, i32 52274, i8* %1, i32 1024, i32 %2)
ret i32 %4
}