xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int _execve(const char *path, char *const argv[], char *const envp[]) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<_execve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_execve>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_execve(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* @ENOTSUP
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_execve(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @ENOTSUP
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __memmove_ppc(void *, void const *, size_t);
void __bcopy_ppc(const void *src, void *dest, size_t n) {
  __memmove_ppc(dest, src, n);
}


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

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

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

LLVM IR (-O2):
define void @__bcopy_ppc(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @__memmove_ppc(i8* %1, i8* %0, i64 %2)
ret void
}
/* Variables and functions */
long get_num(char *, char *);
char *tt_transformedTopology(char *, int, long);
char *macttTopology(char *arg) {
  int tbl;
  long top;
  top = get_num("ttTopology", arg);
  tbl = (int)get_num("ttTopology", arg);
  return tt_transformedTopology(arg, tbl, top);
}


x86 assembly (clang, -O0):
<macttTopology>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <get_num@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <tt_transformedTopology@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macttTopology>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xed1(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <tt_transformedTopology@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ttTopology\00"
define i8* @macttTopology(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = load i64, i64* %4
%13 = call i8* @tt_transformedTopology(i8* %10, i32 %11, i64 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"ttTopology\00"
define i8* @macttTopology(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = trunc i64 %3 to i32
%5 = tail call i8* @tt_transformedTopology(i8* %0, i32 %4, i64 %2)
ret i8* %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t minu32(uint32_t a, uint32_t b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<minu32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <minu32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <minu32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minu32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @minu32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void ub_dentry_alloc_start(void) {}


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

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

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

LLVM IR (-O2):
define void @ub_dentry_alloc_start() {
ret void
}
/* Variables and functions */
scalar_t__ _get_sysfs_numeric(char *, char *, unsigned int *);
unsigned int get_sysfs_uint(char *sysfs_attr) {
  unsigned int number;
  if (_get_sysfs_numeric(sysfs_attr, "%u", &number) == 0)
    return number;
  else
    return ((unsigned int)-1);
}


x86 assembly (clang, -O0):
<get_sysfs_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <_get_sysfs_numeric@plt>
cmp    $0x0,%rax
jne    1145 <get_sysfs_uint+0x35>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <get_sysfs_uint+0x3c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sysfs_uint>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <_get_sysfs_numeric@plt>
neg    %rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @get_sysfs_uint(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @_get_sysfs_numeric(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ isprime(unsigned int);
unsigned int CCutil_nextprime(unsigned int x) {
  if (x < 3)
    return 3;
  x |= 1;
  while (!isprime(x))
    x += 2;
  return x;
}


x86 assembly (clang, -O0):
<CCutil_nextprime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jae    1131 <CCutil_nextprime+0x21>
movl   $0x3,-0x4(%rbp)
jmp    116b <CCutil_nextprime+0x5b>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isprime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1157 <CCutil_nextprime+0x47>
jmp    1165 <CCutil_nextprime+0x55>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <CCutil_nextprime+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCutil_nextprime>:
mov    $0x3,%eax
cmp    $0x3,%edi
jb     1134 <CCutil_nextprime+0x24>
push   %rbx
mov    %edi,%ebx
or     $0x1,%ebx
mov    %ebx,%edi
call   1030 <isprime@plt>
add    $0x2,%ebx
test   %eax,%eax
je     1120 <CCutil_nextprime+0x10>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CCutil_nextprime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 3
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 3, i32* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = or i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %15, %7
%11 = load i32, i32* %3
%12 = call i32 @isprime(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* %3
%17 = add i32 %16, 2
store i32 %17, i32* %3
br label %10
18: ; preds = %10
%19 = load i32, i32* %3
store i32 %19, i32* %2
br label %20
20: ; preds = %18, %6
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @CCutil_nextprime(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = or i32 %0, 1
br label %5
5: ; preds = %5, %3
%6 = phi i32 [ %4, %3 ], [ %9, %5 ]
%7 = tail call i32 @isprime(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = add i32 %6, 2
br i1 %8, label %5, label %10
10: ; preds = %5, %1
%11 = phi i32 [ 3, %1 ], [ %6, %5 ]
ret i32 %11
}
int(abs)(int value) { return value < 0 ? -value : value; }


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

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct vec3 {
  int dummy;
};
struct mat3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_multiply_mat3(float *, float *, float *);
__attribute__((always_)) struct vec3 *
psvec3_multiply_mat3(struct vec3 *result, struct vec3 *a, struct mat3 *m) {
  vec3_multiply_mat3((float *)result, (float *)a, (float *)m);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3_multiply_mat3>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_multiply_mat3@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
%struct.mat3 = type { i32 }
define %struct.vec3* @psvec3_multiply_mat3(%struct.vec3* %0, %struct.vec3* %1, %struct.mat3* %2) {
%4 = alloca %struct.vec3*
%5 = alloca %struct.vec3*
%6 = alloca %struct.mat3*
store %struct.vec3* %0, %struct.vec3** %4
store %struct.vec3* %1, %struct.vec3** %5
store %struct.mat3* %2, %struct.mat3** %6
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load %struct.mat3*, %struct.mat3** %6
%12 = bitcast %struct.mat3* %11 to float*
%13 = call i32 @vec3_multiply_mat3(float* %8, float* %10, float* %12)
%14 = load %struct.vec3*, %struct.vec3** %4
ret %struct.vec3* %14
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
%struct.mat3 = type { i32 }
define %struct.vec3* @psvec3_multiply_mat3(%struct.vec3* returned %0, %struct.vec3* %1, %struct.mat3* %2) {
%4 = bitcast %struct.vec3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = bitcast %struct.mat3* %2 to float*
%7 = tail call i32 @vec3_multiply_mat3(float* %4, float* %5, float* %6)
ret %struct.vec3* %0
}
/* Type definitions */
struct rlimit {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, int, struct rlimit const *,
            struct rlimit *);
int prlimit(pid_t pid, int resource, const struct rlimit *new_limit,
            struct rlimit *old_limit) {
  return syscall(302, pid, resource, new_limit, old_limit);
}


x86 assembly (clang, -O0):
<prlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x12e,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prlimit>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x12e,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.rlimit = type { i32 }
define i32 @prlimit(i32 %0, i32 %1, %struct.rlimit* %2, %struct.rlimit* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.rlimit*
%8 = alloca %struct.rlimit*
store i32 %0, i32* %5
store i32 %1, i32* %6
store %struct.rlimit* %2, %struct.rlimit** %7
store %struct.rlimit* %3, %struct.rlimit** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load %struct.rlimit*, %struct.rlimit** %7
%12 = load %struct.rlimit*, %struct.rlimit** %8
%13 = call i32 @syscall(i32 302, i32 %9, i32 %10, %struct.rlimit* %11, %struct.rlimit* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
define i32 @prlimit(i32 %0, i32 %1, %struct.rlimit* %2, %struct.rlimit* %3) {
%5 = tail call i32 @syscall(i32 302, i32 %0, i32 %1, %struct.rlimit* %2, %struct.rlimit* %3)
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t clock_ns() {
  struct timespec t;
  clock_gettime(CLOCK_MONOTONIC, &t);
  return (uint64_t)t.tv_sec * 1000000000 + t.tv_nsec * 1;
}


x86 assembly (clang, -O0):
<clock_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%rax
imul   $0x3b9aca00,%eax,%eax
mov    -0x10(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_ns>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x10(%rsp),%eax
3b
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @clock_ns() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @clock_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = mul nsw i32 %7, 1000000000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
ret i32 %11
}
int nr(unsigned int xe, unsigned int qqn) {
  unsigned int oo, wo = 0;
  for (oo = 0; oo < 4; ++oo) {
    unsigned int qq = qqn;
    do {
      wo += 1;
      xe += wo;
    } while (qq-- > 0);
  }
  return xe;
}


x86 assembly (clang, -O0):
<nr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jae    1161 <nr+0x61>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
ja     1128 <nr+0x28>
jmp    1153 <nr+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <nr+0x18>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr>:
lea    -0x1(%rsi),%eax
imul   %esi,%eax
lea    (%rsi,%rsi,2),%ecx
add    %ecx,%ecx
add    $0x14,%ecx
imul   %esi,%ecx
add    %edi,%ecx
and    $0xfffffffe,%eax
lea    (%rcx,%rax,2),%eax
add    $0xa,%eax
ret

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

LLVM IR (-O2):
define i32 @nr(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = mul i32 %3, %1
%5 = mul i32 %1, 6
%6 = add i32 %5, 20
%7 = mul i32 %6, %1
%8 = add i32 %7, %0
%9 = shl i32 %4, 1
%10 = and i32 %9, -4
%11 = add i32 %8, %10
%12 = add i32 %11, 10
ret i32 %12
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
double get_wtime() {
  struct timeval tp;
  gettimeofday(&tp, 0);
  return tp.tv_sec + (tp.tv_usec * 1.0e-6);
}


x86 assembly (clang, -O0):
<get_wtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_wtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @get_wtime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = call double @llvm.fmuladd.f64(double %6, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %7
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @get_wtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %8
}
/* Variables and functions */
float asinf(float);
float sqrtf(float);
float atanf(float x) { return asinf(x / sqrtf(x * x + 1)); }


x86 assembly (clang, -O0):
<atanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb3(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
call   1040 <asinf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atanf>:
push   %rax
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm0
addss  0xed0(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113e <atanf+0x1e>
sqrtss %xmm0,%xmm0
jmp    114f <atanf+0x2f>
movss  %xmm2,0x4(%rsp)
call   1030 <sqrtf@plt>
movss  0x4(%rsp),%xmm2
divss  %xmm0,%xmm2
movaps %xmm2,%xmm0
pop    %rax
jmp    1040 <asinf@plt>

LLVM IR (-O0):
define float @atanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = call float @llvm.fmuladd.f32(float %4, float %5, float 1.000000e+00)
%7 = call float @sqrtf(float %6)
%8 = fdiv float %3, %7
%9 = call float @asinf(float %8)
ret float %9
}

LLVM IR (-O2):
define float @atanf(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float %0, float 1.000000e+00)
%3 = tail call float @sqrtf(float %2)
%4 = fdiv float %0, %3
%5 = tail call float @asinf(float %4)
ret float %5
}
void ff_hevc_put_hevc_qpel_h4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_h4_12_sse4() {
ret void
}
int do_517() { return 517; }


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

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

LLVM IR (-O0):
define i32 @do_517() {
ret i32 517
}

LLVM IR (-O2):
define i32 @do_517() {
ret i32 517
}
/* Variables and functions */
int bar1();
int main(void) { return bar1(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar1()
ret i32 %1
}
int gpio_i2c_reset(unsigned char busnum, short adr, char freq) { return 0; }


x86 assembly (clang, -O0):
<gpio_i2c_reset>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %si,%cx
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cx,-0x4(%rbp)
mov    %al,-0x5(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gpio_i2c_reset(i8 zeroext %0, i16 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i16
%6 = alloca i8
store i8 %0, i8* %4
store i16 %1, i16* %5
store i8 %2, i8* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @gpio_i2c_reset(i8 zeroext %0, i16 signext %1, i8 signext %2) {
ret i32 0
}
/* Variables and functions */
int glutGetWindow();
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ glutSetWindow(int);
int glipRedisplayImage(int winNo) {
  glutSetWindow(winNo);
  if (glutGetWindow() != winNo)
    return 0;
  else
    glutPostRedisplay();
  return winNo;
}


x86 assembly (clang, -O0):
<glipRedisplayImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <glutSetWindow@plt>
mov    $0x0,%al
call   1030 <glutGetWindow@plt>
cmp    -0x8(%rbp),%eax
je     115f <glipRedisplayImage+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116c <glipRedisplayImage+0x3c>
mov    $0x0,%al
call   1040 <glutPostRedisplay@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glipRedisplayImage>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1050 <glutSetWindow@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <glutGetWindow@plt>
cmp    %ebx,%eax
jne    1150 <glipRedisplayImage+0x20>
xor    %eax,%eax
call   1040 <glutPostRedisplay@plt>
mov    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @glipRedisplayImage(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @glutSetWindow(i32 %4)
%6 = call i32 (...) @glutGetWindow()
%7 = load i32, i32* %3
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %14
10: ; preds = %1
%11 = call i32 (...) @glutPostRedisplay()
br label %12
12: ; preds = %10
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @glipRedisplayImage(i32 %0) {
%2 = tail call i32 @glutSetWindow(i32 %0)
%3 = tail call i32 (...) @glutGetWindow()
%4 = icmp eq i32 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @glutPostRedisplay()
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %0, %5 ], [ 0, %1 ]
ret i32 %8
}
stime(p) long *p;
{ return _stime(*p); }


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

x86 assembly (clang, -O2):
<stime>:
mov    (%rdi),%rdi
xor    %eax,%eax
jmp    1030 <_stime@plt>

LLVM IR (-O0):
define i32 @stime(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 (i64, ...) bitcast (i32 (...)* @_stime to i32 (i64, ...)*)(i64 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @stime(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 (i64, ...) bitcast (i32 (...)* @_stime to i32 (i64, ...)*)(i64 %2)
ret i32 %3
}
int mat_norm_squared_i3(const int a[3]) {
  return a[0] * a[0] + a[1] * a[1] + a[2] * a[2];
}


x86 assembly (clang, -O0):
<mat_norm_squared_i3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
imul   (%rcx),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    -0x8(%rbp),%rdx
imul   0x4(%rdx),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
mov    -0x8(%rbp),%rdx
imul   0x8(%rdx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat_norm_squared_i3>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
imul   %eax,%eax
imul   %ecx,%ecx
add    %eax,%ecx
mov    0x8(%rdi),%eax
imul   %eax,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @mat_norm_squared_i3(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = mul nsw i32 %5, %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = mul nsw i32 %12, %15
%17 = add nsw i32 %9, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 2
%20 = load i32, i32* %19
%21 = load i32*, i32** %2
%22 = getelementptr inbounds i32, i32* %21, i64 2
%23 = load i32, i32* %22
%24 = mul nsw i32 %20, %23
%25 = add nsw i32 %17, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @mat_norm_squared_i3(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul nsw i32 %2, %2
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, %5
%7 = add nuw nsw i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, %9
%11 = add nuw nsw i32 %7, %10
ret i32 %11
}
int do_263() { return 263; }


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

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

LLVM IR (-O0):
define i32 @do_263() {
ret i32 263
}

LLVM IR (-O2):
define i32 @do_263() {
ret i32 263
}
/* Type definitions */
struct sockaddr_un {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int unixsock_accept(int usfd) {
  int nsfd, len;
  struct sockaddr_un addr;
  len = sizeof addr;
  nsfd = accept(usfd, (struct sockaddr *)&addr, &len);
  return nsfd;
}


x86 assembly (clang, -O0):
<unixsock_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unixsock_accept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @unixsock_accept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sockaddr_un
store i32 %0, i32* %2
store i32 4, i32* %4
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_un* %5 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %4)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @unixsock_accept(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_un
%4 = bitcast i32* %2 to i8*
%5 = bitcast %struct.sockaddr_un* %3 to i8*
store i32 4, i32* %2
%6 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xb8() {
  Assert_real((isalpha(184) == 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_isalpha.c",
              925, ("isalpha should be 0 for 0xb8"));
}


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

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


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

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

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

LLVM IR (-O2):
define void @d2i_USERNOTICE() {
ret void
}
void input_destroy(struct lemon *lemon, struct input *input) {}


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

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

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

LLVM IR (-O2):
%struct.lemon = type opaque
%struct.input = type opaque
define void @input_destroy(%struct.lemon* nocapture %0, %struct.input* nocapture %1) {
ret void
}
int isnewline(int character) {
  if (character == '\n')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isnewline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    111d <isnewline+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <isnewline+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnewline>:
xor    %eax,%eax
cmp    $0xa,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isnewline(i32 %0) {
%2 = icmp eq i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ shlib_first();
int main(void) {
  shlib_first();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @shlib_first()
ret i32 0
}
void rotr(int *a, int *b, int *c) {
  int help1, help2;
  help1 = *b;
  *b = *a;
  help2 = *c;
  *c = help1;
  *a = help2;
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    (%rsi),%eax
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
mov    (%rdx),%ecx
mov    %eax,(%rdx)
mov    %ecx,(%rdi)
ret

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

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %0
store i32 %5, i32* %1
%6 = load i32, i32* %2
store i32 %4, i32* %2
store i32 %6, i32* %0
ret void
}
void reboot(void) { return; }


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

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

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

LLVM IR (-O2):
define void @reboot() {
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ subs(int, int);
int main(int argc, char **argv) {
  if (argc != 3)
    return 1;
  int n, k;
  n = atoi(argv[1]);
  k = atoi(argv[2]);
  subs(n, k);
  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)
cmpl   $0x3,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    117e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <subs@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x3,%edi
jne    1155 <main+0x35>
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <subs@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @subs(i32 %7, i32 %10)
br label %12
12: ; preds = %2, %4
%13 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %13
}
main() {
  int five;
  five = 5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRB0_get(void) { return U_WMRCORENONE_get("U_WMRB0"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB0\00"
define i32 @U_WMRB0_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB0\00"
define i32 @U_WMRB0_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x02() {
  Assert_real((isascii(2)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              15, ("isascii should be 1 for 0x02"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x02>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xf,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x02\00"
define void @t_isascii_0x02() {
%1 = call i32 @isascii(i32 2)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x02\00"
define void @t_isascii_0x02() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printDouble(double v) { printf("%f\n", v); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define void @printDouble(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define void @printDouble(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
long LONG_MIN;
int /*<<< orphan*/ free(char *);
char *getInfoField(char *, char *);
long strtol(char *, int /*<<< orphan*/ *, int);
long getLongInfoField(char *info, char *field) {
  char *value = getInfoField(info, field);
  long l;
  if (!value)
    return LONG_MIN;
  l = strtol(value, NULL, 10);
  free(value);
  return l;
}


x86 assembly (clang, -O0):
<getLongInfoField>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <getInfoField@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116f <getLongInfoField+0x3f>
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1196 <getLongInfoField+0x66>
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLongInfoField>:
push   %r14
push   %rbx
push   %rax
call   1050 <getInfoField@plt>
test   %rax,%rax
je     1160 <getLongInfoField+0x30>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    116a <getLongInfoField+0x3a>
mov    0x2e81(%rip),%rax
mov    (%rax),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LONG_MIN = global i64 0
define i64 @getLongInfoField(i8* %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i8* @getInfoField(i8* %8, i8* %9)
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %2
%14 = load i64, i64* @LONG_MIN
store i64 %14, i64* %3
br label %21
15: ; preds = %2
%16 = load i8*, i8** %6
%17 = call i64 @strtol(i8* %16, i32* null, i32 10)
store i64 %17, i64* %7
%18 = load i8*, i8** %6
%19 = call i32 @free(i8* %18)
%20 = load i64, i64* %7
store i64 %20, i64* %3
br label %21
21: ; preds = %15, %13
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
@LONG_MIN = global i64 0
define i64 @getLongInfoField(i8* %0, i8* %1) {
%3 = tail call i8* @getInfoField(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = load i64, i64* @LONG_MIN
br label %10
7: ; preds = %2
%8 = tail call i64 @strtol(i8* nocapture %3, i32* null, i32 10)
%9 = tail call i32 @free(i8* %3)
br label %10
10: ; preds = %7, %5
%11 = phi i64 [ %8, %7 ], [ %6, %5 ]
ret i64 %11
}