xunge/DecIR huggingface dataset:
/* Type definitions */
struct rusage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int getrusage(int who, struct rusage *usage) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<getrusage>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getrusage(i32 %0, %struct.rusage* %1) {
%3 = alloca i32
%4 = alloca %struct.rusage*
store i32 %0, i32* %3
store %struct.rusage* %1, %struct.rusage** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getrusage(i32 %0, %struct.rusage* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x3b() {
  Assert_real((isdigit(59) == 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",
              300, ("isdigit should be 0 for ;"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x3b>:
push   %rax
mov    $0x3b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x12c,%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_0x3b() {
%1 = call i64 @isdigit(i32 59)
%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 300, 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_0x3b() {
%1 = tail call i64 @isdigit(i32 59)
%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 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *sv_get_song_name(int);
const char *vox_get_song_name(int slot) { return sv_get_song_name(slot); }


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

x86 assembly (clang, -O2):
<vox_get_song_name>:
jmp    1030 <sv_get_song_name@plt>

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

LLVM IR (-O2):
define i8* @vox_get_song_name(i32 %0) {
%2 = tail call i8* @sv_get_song_name(i32 %0)
ret i8* %2
}
void _isreadpg(fd, buf) int fd;
char *buf;
{
  if (read(fd, buf, 1024) != 1024)
    _isfatal_error("read failed");
}


x86 assembly (clang, -O0):
<_isreadpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x400,%edx
mov    $0x0,%al
call   1040 <read@plt>
cmp    $0x400,%eax
je     115b <_isreadpg+0x3b>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <_isfatal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isreadpg>:
push   %rax
mov    $0x400,%edx
xor    %eax,%eax
call   1040 <read@plt>
cmp    $0x400,%eax
jne    1136 <_isreadpg+0x16>
pop    %rax
ret
lea    0xec3(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <_isfatal_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"read failed\00"
define void @_isreadpg(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %1, i32 1024)
%4 = icmp eq i32 %3, 1024
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @_isfatal_error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
unsigned char *otp_encrypt(unsigned char *, size_t *, unsigned char const *,
                           size_t, unsigned char const *,
                           unsigned char const *);
unsigned char *crypt_encrypt_otp(unsigned char *out, size_t *out_len,
                                 const unsigned char *in, size_t in_len,
                                 const unsigned char *nonce,
                                 const unsigned char *key) {
  return otp_encrypt(out, out_len, in, in_len, nonce, key);
}


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

x86 assembly (clang, -O2):
<crypt_encrypt_otp>:
jmp    1030 <otp_encrypt@plt>

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

LLVM IR (-O2):
define i8* @crypt_encrypt_otp(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @otp_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
long long pow(int y) {
  long long x = 1;
  while (y--)
    x *= 2;
  return x;
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1134 <pow+0x34>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <pow+0xf>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
test   %edi,%edi
je     1118 <pow+0x18>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
cmp    $0x7,%eax
jae    111e <pow+0x1e>
mov    $0x1,%eax
jmp    1139 <pow+0x39>
mov    $0x1,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
shl    $0x8,%rax
add    $0xfffffff8,%edi
jne    1130 <pow+0x30>
test   %ecx,%ecx
je     1148 <pow+0x48>
nopl   (%rax)
add    %rax,%rax
add    $0xffffffff,%ecx
jne    1140 <pow+0x40>
ret

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

LLVM IR (-O2):
define i64 @pow(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %15, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %9
9: ; preds = %9, %7
%10 = phi i64 [ 1, %7 ], [ %12, %9 ]
%11 = phi i32 [ 0, %7 ], [ %13, %9 ]
%12 = shl i64 %10, 8
%13 = add i32 %11, 8
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %9
15: ; preds = %9, %3
%16 = phi i64 [ undef, %3 ], [ %12, %9 ]
%17 = phi i64 [ 1, %3 ], [ %12, %9 ]
%18 = icmp eq i32 %5, 0
br i1 %18, label %25, label %19
19: ; preds = %15, %19
%20 = phi i64 [ %22, %19 ], [ %17, %15 ]
%21 = phi i32 [ %23, %19 ], [ 0, %15 ]
%22 = shl nsw i64 %20, 1
%23 = add i32 %21, 1
%24 = icmp eq i32 %23, %5
br i1 %24, label %25, label %19
25: ; preds = %15, %19, %1
%26 = phi i64 [ 1, %1 ], [ %16, %15 ], [ %22, %19 ]
ret i64 %26
}
void XtGetSelectionValuesIncremental() {}


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

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

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

LLVM IR (-O2):
define void @XtGetSelectionValuesIncremental() {
ret void
}
/* Variables and functions */
int log(int);
int bytes_for(int bytes) { return bytes * (int)(8 * (log(2) / (log(10)))) + 2; }


x86 assembly (clang, -O0):
<bytes_for>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x2,%edi
call   1030 <log@plt>
mov    %eax,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x3,%ecx
imul   %ecx,%eax
add    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_for>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x2,%edi
call   1030 <log@plt>
mov    %eax,%ebp
mov    $0xa,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
imul   %ebx,%eax
lea    0x2(,%rax,8),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @bytes_for(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log(i32 2)
%5 = call i32 @log(i32 10)
%6 = sdiv i32 %4, %5
%7 = mul nsw i32 8, %6
%8 = mul nsw i32 %3, %7
%9 = add nsw i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @bytes_for(i32 %0) {
%2 = tail call i32 @log(i32 2)
%3 = tail call i32 @log(i32 10)
%4 = sdiv i32 %2, %3
%5 = shl i32 %0, 3
%6 = mul i32 %5, %4
%7 = or i32 %6, 2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __NR_gettid;
scalar_t__ syscall(int /*<<< orphan*/);
long int rfs__gettid(void) { return (long int)syscall(__NR_gettid); }


x86 assembly (clang, -O0):
<rfs__gettid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@__NR_gettid = global i32 0
define i64 @rfs__gettid() {
%1 = load i32, i32* @__NR_gettid
%2 = call i64 @syscall(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
@__NR_gettid = global i32 0
define i64 @rfs__gettid() {
%1 = load i32, i32* @__NR_gettid
%2 = tail call i64 @syscall(i32 %1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ LLdivLL(int, int, long long *, int /*<<< orphan*/ *);
int jc(int);
int c(int p, int q) {
  long long x;
  LLdivLL(jc(p), (jc(q) * jc(p - q)), &x, NULL);
  return x;
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <jc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <jc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <jc@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edi
imul   %eax,%esi
lea    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <LLdivLL@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %edi,%ebp
call   1030 <jc@plt>
mov    %eax,%r14d
mov    %r15d,%edi
call   1030 <jc@plt>
mov    %eax,%ebx
sub    %r15d,%ebp
mov    %ebp,%edi
call   1030 <jc@plt>
imul   %eax,%ebx
mov    %rsp,%rdx
mov    %r14d,%edi
mov    %ebx,%esi
xor    %ecx,%ecx
call   1040 <LLdivLL@plt>
mov    (%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @jc(i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @jc(i32 %8)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = call i32 @jc(i32 %12)
%14 = mul nsw i32 %9, %13
%15 = call i32 @LLdivLL(i32 %7, i32 %14, i64* %5, i32* null)
%16 = load i64, i64* %5
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @c(i32 %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i32 @jc(i32 %0)
%6 = tail call i32 @jc(i32 %1)
%7 = sub nsw i32 %0, %1
%8 = tail call i32 @jc(i32 %7)
%9 = mul nsw i32 %8, %6
%10 = call i32 @LLdivLL(i32 %5, i32 %9, i64* %3, i32* null)
%11 = load i64, i64* %3
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int testLibCycleB2();
int testLibCycleA2(void) { return testLibCycleB2(); }


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

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

LLVM IR (-O0):
define i32 @testLibCycleA2() {
%1 = call i32 (...) @testLibCycleB2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @testLibCycleA2() {
%1 = tail call i32 (...) @testLibCycleB2()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ finish(int /*<<< orphan*/);
void inter(int n) { finish(0); }


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

x86 assembly (clang, -O2):
<inter>:
xor    %edi,%edi
jmp    1030 <finish@plt>

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

LLVM IR (-O2):
define void @inter(i32 %0) {
%2 = tail call i32 @finish(i32 0)
ret void
}
void inittransitionengine() {}


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

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

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

LLVM IR (-O2):
define void @inittransitionengine() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cons_init();
int /*<<< orphan*/ eval_init();
int /*<<< orphan*/ lisp_init();
int /*<<< orphan*/ object_init();
int /*<<< orphan*/ str_init();
int /*<<< orphan*/ symtab_init();
int /*<<< orphan*/ vector_init();
void wisp_init() {
  object_init();
  symtab_init();
  cons_init();
  str_init();
  lisp_init();
  vector_init();
  eval_init();
}


x86 assembly (clang, -O0):
<wisp_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <object_init@plt>
mov    $0x0,%al
call   1060 <symtab_init@plt>
mov    $0x0,%al
call   1040 <cons_init@plt>
mov    $0x0,%al
call   1090 <str_init@plt>
mov    $0x0,%al
call   1050 <lisp_init@plt>
mov    $0x0,%al
call   1030 <vector_init@plt>
mov    $0x0,%al
call   1070 <eval_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wisp_init>:
push   %rax
xor    %eax,%eax
call   1080 <object_init@plt>
xor    %eax,%eax
call   1060 <symtab_init@plt>
xor    %eax,%eax
call   1040 <cons_init@plt>
xor    %eax,%eax
call   1090 <str_init@plt>
xor    %eax,%eax
call   1050 <lisp_init@plt>
xor    %eax,%eax
call   1030 <vector_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <eval_init@plt>

LLVM IR (-O0):
define void @wisp_init() {
%1 = call i32 (...) @object_init()
%2 = call i32 (...) @symtab_init()
%3 = call i32 (...) @cons_init()
%4 = call i32 (...) @str_init()
%5 = call i32 (...) @lisp_init()
%6 = call i32 (...) @vector_init()
%7 = call i32 (...) @eval_init()
ret void
}

LLVM IR (-O2):
define void @wisp_init() {
%1 = tail call i32 (...) @object_init()
%2 = tail call i32 (...) @symtab_init()
%3 = tail call i32 (...) @cons_init()
%4 = tail call i32 (...) @str_init()
%5 = tail call i32 (...) @lisp_init()
%6 = tail call i32 (...) @vector_init()
%7 = tail call i32 (...) @eval_init()
ret void
}
/* Variables and functions */
scalar_t__ genrand_int32();
int rollDie(int min, int max) {
  int random_value;
  random_value = (int)(((float)genrand_int32() / (float)0xFFFFFFFF) * (max));
  return random_value + min;
}


x86 assembly (clang, -O0):
<rollDie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <genrand_int32@plt>
cvtsi2ss %rax,%xmm0
movss  0xece(%rip),%xmm1
divss  %xmm1,%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rollDie>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <genrand_int32@plt>
cvtsi2ss %rax,%xmm0
mulss  0xed5(%rip),%xmm0
cvtsi2ss %ebx,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rollDie(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 (...) @genrand_int32()
%7 = sitofp i64 %6 to float
%8 = fdiv float %7, 0x41F0000000000000
%9 = load i32, i32* %4
%10 = sitofp i32 %9 to float
%11 = fmul float %8, %10
%12 = fptosi float %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @rollDie(i32 %0, i32 %1) {
%3 = tail call i64 (...) @genrand_int32()
%4 = sitofp i64 %3 to float
%5 = fmul float %4, 0x3DF0000000000000
%6 = sitofp i32 %1 to float
%7 = fmul float %5, %6
%8 = fptosi float %7 to i32
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void print_line(int fd, const char *str) {
  write(fd, str, strlen(str));
  write(fd, "\n", 1);
}


x86 assembly (clang, -O0):
<print_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%edi
lea    0xea2(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xebd(%rip),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @print_line(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @write(i32 %5, i8* %6, i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @write(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @print_line(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int test_imm_6Dint16_mem(short *val) {
  return ((*val) & (0x6D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Dint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 109
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ struct_by_value_17_x();
int main() {
  struct_by_value_17_x();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <struct_by_value_17_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <struct_by_value_17_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @struct_by_value_17_x()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct TakeoverProcess {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct TakeoverProcess *);
void takeoverProcessDelete(struct TakeoverProcess *takeoverProcess) {
  free(takeoverProcess);
}


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

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

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

LLVM IR (-O2):
%struct.TakeoverProcess = type { i32 }
define void @takeoverProcessDelete(%struct.TakeoverProcess* nocapture %0) {
%2 = tail call i32 @free(%struct.TakeoverProcess* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cout(char *);
void cout_endl() { cout("\r\n"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @cout_endl() {
%1 = call i32 @cout(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @cout_endl() {
%1 = tail call i32 @cout(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void double_test_call(void) {}


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

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

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

LLVM IR (-O2):
define void @double_test_call() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t add_loop(int64_t x, int64_t y) {
  uint64_t ret = x;
  for (uint64_t i = y; i > 0; --i) {
    ret++;
  }
  return ret;
}


x86 assembly (clang, -O0):
<add_loop>:
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)
cmpq   $0x0,-0x20(%rbp)
jle    1144 <add_loop+0x44>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <add_loop+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_loop>:
xor    %eax,%eax
test   %rsi,%rsi
cmovns %rsi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @add_loop(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
store i64 %7, i64* %5
%8 = load i64, i64* %4
store i64 %8, i64* %6
br label %9
9: ; preds = %15, %2
%10 = load i64, i64* %6
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i64, i64* %5
%14 = add nsw i64 %13, 1
store i64 %14, i64* %5
br label %15
15: ; preds = %12
%16 = load i64, i64* %6
%17 = add nsw i64 %16, -1
store i64 %17, i64* %6
br label %9
18: ; preds = %9
%19 = load i64, i64* %5
ret i64 %19
}

LLVM IR (-O2):
define i64 @add_loop(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
%4 = select i1 %3, i64 %1, i64 0
%5 = add i64 %4, %0
ret i64 %5
}
/* Variables and functions */
size_t strlen(char const *);
size_t html_tbl_strlen(const char *p, void *arg) { return (strlen(p)); }


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

x86 assembly (clang, -O2):
<html_tbl_strlen>:
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i64 @html_tbl_strlen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @html_tbl_strlen(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ dd_drawline(unsigned char, unsigned char, unsigned char,
                               unsigned char);
void dd_hline(unsigned char x, unsigned char y, unsigned char w) {
  dd_drawline(x, y, x + w, y);
}


x86 assembly (clang, -O0):
<dd_hline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x2(%rbp),%cl
movzbl -0x1(%rbp),%eax
movzbl -0x3(%rbp),%esi
add    %esi,%eax
movzbl %dl,%edi
movzbl %cl,%esi
movzbl %al,%edx
movzbl -0x2(%rbp),%ecx
call   1030 <dd_drawline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_hline>:
add    %dil,%dl
movzbl %dl,%edx
mov    %esi,%ecx
jmp    1030 <dd_drawline@plt>

LLVM IR (-O0):
define void @dd_hline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %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 i8, i8* %4
%8 = load i8, i8* %5
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = add nsw i32 %10, %12
%14 = trunc i32 %13 to i8
%15 = load i8, i8* %5
%16 = call i32 @dd_drawline(i8 zeroext %7, i8 zeroext %8, i8 zeroext %14, i8 zeroext %15)
ret void
}

LLVM IR (-O2):
define void @dd_hline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = add i8 %2, %0
%5 = tail call i32 @dd_drawline(i8 zeroext %0, i8 zeroext %1, i8 zeroext %4, i8 zeroext %1)
ret void
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_foul(struct ship *ship, long a) { Write(9, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_foul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x9,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_foul>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x9,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_foul(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 9, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_foul(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 9, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
int intCmpFn(const void *p1, const void *p2) {
  int v1, v2;
  v1 = *((int *)p1);
  v2 = *((int *)p2);
  if (v1 == v2)
    return 0;
  return (v1 < v2) ? -1 : +1;
}


x86 assembly (clang, -O0):
<intCmpFn>:
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),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <intCmpFn+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114e <intCmpFn+0x4e>
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%esi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intCmpFn>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @intCmpFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ ShutMemory();
void VPE_Shut(void) { ShutMemory(); }


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

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

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

LLVM IR (-O2):
define void @VPE_Shut() {
%1 = tail call i32 (...) @ShutMemory()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ writetbuf(char *, int);
putempty() {
  char buf[512];
  bzero(buf, sizeof(buf));
  (void)writetbuf(buf, 1);
}


x86 assembly (clang, -O0):
<putempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
lea    -0x210(%rbp),%rdi
mov    $0x200,%esi
call   1040 <bzero@plt>
lea    -0x210(%rbp),%rdi
mov    $0x1,%esi
call   1030 <writetbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putempty>:
push   %rbx
sub    $0x200,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1040 <bzero@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <writetbuf@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @putempty() {
%1 = alloca i32
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @bzero(i8* %3, i32 512)
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%6 = call i32 @writetbuf(i8* %5, i32 1)
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @putempty() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @bzero(i8* %2, i32 512)
%4 = call i32 @writetbuf(i8* %2, i32 1)
ret i32 undef
}
/* Type definitions */
struct statvfs {
  unsigned long long f_bfree;
  scalar_t__ f_bsize;
};

/* Variables and functions */
int statvfs(char const *, struct statvfs *);
unsigned long long get_free_space(const char *path) {
  unsigned long long result = 0;
  struct statvfs sfs;
  if (statvfs(path, &sfs) != -1) {
    result = (unsigned long long)sfs.f_bsize * sfs.f_bfree;
  }
  return result;
}


x86 assembly (clang, -O0):
<get_free_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <statvfs@plt>
cmp    $0xffffffff,%eax
je     1147 <get_free_space+0x37>
mov    -0x18(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_free_space>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1030 <statvfs@plt>
mov    0x8(%rsp),%rdx
imul   0x10(%rsp),%rdx
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
cmovne %rdx,%rcx
mov    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.statvfs = type { i64, i64 }
define i64 @get_free_space(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca %struct.statvfs
store i8* %0, i8** %2
store i64 0, i64* %3
%5 = load i8*, i8** %2
%6 = call i32 @statvfs(i8* %5, %struct.statvfs* %4)
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %4, i32 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %4, i32 0, i32 0
%12 = load i64, i64* %11
%13 = mul i64 %10, %12
store i64 %13, i64* %3
br label %14
14: ; preds = %8, %1
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
%struct.statvfs = type { i64, i64 }
define i64 @get_free_space(i8* nocapture %0) {
%2 = alloca %struct.statvfs
%3 = bitcast %struct.statvfs* %2 to i8*
%4 = call i32 @statvfs(i8* %0, %struct.statvfs* %2)
%5 = icmp eq i32 %4, -1
%6 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 1
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.statvfs, %struct.statvfs* %2, i64 0, i32 0
%9 = load i64, i64* %8
%10 = mul i64 %9, %7
%11 = select i1 %5, i64 0, i64 %10
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void PECIBypassEnable(unsigned long ulBase) {
  DEBUG_ASSERT(ulBase == 0x400B0000);
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= 0x00000800;
}


x86 assembly (clang, -O0):
<PECIBypassEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x400b0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     $0x800,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PECIBypassEnable>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x400b0000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
orq    $0x800,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PECIBypassEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1074462720
%5 = zext i1 %4 to i32
%6 = call i32 @DEBUG_ASSERT(i32 %5)
%7 = load i64, i64* %2
%8 = add i64 %7, 0
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = or i64 %10, 2048
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @PECIBypassEnable(i64 %0) {
%2 = icmp eq i64 %0, 1074462720
%3 = zext i1 %2 to i32
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = inttoptr i64 %0 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 2048
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void listProcessCommand(char *args[]) {
  interrupt(0x21, 0xb, 0, 0, 0);
  return;
}


x86 assembly (clang, -O0):
<listProcessCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x21,%edi
mov    $0xb,%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <interrupt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listProcessCommand>:
mov    $0x21,%edi
mov    $0xb,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <interrupt@plt>

LLVM IR (-O0):
define void @listProcessCommand(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @interrupt(i32 33, i32 11, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @listProcessCommand(i8** nocapture readnone %0) {
%2 = tail call i32 @interrupt(i32 33, i32 11, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ manual_list_();
void manual_list_aux_() { manual_list_(); }


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

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

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

LLVM IR (-O2):
define void @manual_list_aux_() {
%1 = tail call i32 (...) @manual_list_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void handle(int signo) {
  printf("catch SIGSEGV\n");
  exit(0);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"catch SIGSEGV\0A\00"
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [14 x i8] c"catch SIGSEGV\00"
define void @handle(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ isspace(int);
scalar_t__ strchr(char *, int);
bool is_separator(int c) {
  return c == '\0' || isspace(c) || strchr(",.()+-/*=~%[];:{}", c);
}


x86 assembly (clang, -O0):
<is_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116d <is_separator+0x4d>
mov    -0x4(%rbp),%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <is_separator+0x4d>
mov    -0x4(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_separator>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
test   %edi,%edi
je     114e <is_separator+0x2e>
mov    %edi,%ebp
call   1040 <isspace@plt>
test   %rax,%rax
jne    114e <is_separator+0x2e>
lea    0xec1(%rip),%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c",.()+-/*=~%[];:{}\00"
define i32 @is_separator(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @isspace(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i64 @strchr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %9, %5, %1
%14 = phi i1 [ true, %5 ], [ true, %1 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [18 x i8] c",.()+-/*=~%[];:{}\00"
define i32 @is_separator(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @isspace(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 @strchr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 1, %3 ], [ 1, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ isblank(char const);
int line_empty(const char *str) {
  while (isblank(*str) || *str == '\n') {
    ++str;
  }
  return *str == '\0';
}


x86 assembly (clang, -O0):
<line_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isblank@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    114a <line_empty+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <line_empty+0x4a>
jmp    116b <line_empty+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <line_empty+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_empty>:
push   %rbx
mov    %rdi,%rbx
jmp    1124 <line_empty+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isblank@plt>
test   %rax,%rax
jne    1120 <line_empty+0x10>
movzbl (%rbx),%ecx
cmp    $0xa,%cl
je     1120 <line_empty+0x10>
xor    %eax,%eax
test   %cl,%cl
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @line_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isblank(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %13, 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 label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @line_empty(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %11, %10 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isblank(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %3
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %12
10: ; preds = %2, %7
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %7
%13 = icmp eq i8 %8, 0
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
unsigned short csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_partial(unsigned char *, int, int /*<<< orphan*/);
extern unsigned short ip_compute_csum(unsigned char *buff, int len) {
  return csum_fold(csum_partial(buff, len, 0));
}


x86 assembly (clang, -O0):
<ip_compute_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
call   1040 <csum_fold@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_compute_csum>:
push   %rax
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <csum_fold@plt>

LLVM IR (-O0):
define zeroext i16 @ip_compute_csum(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 = load i32, i32* %4
%7 = call i32 @csum_partial(i8* %5, i32 %6, i32 0)
%8 = call zeroext i16 @csum_fold(i32 %7)
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @ip_compute_csum(i8* %0, i32 %1) {
%3 = tail call i32 @csum_partial(i8* %0, i32 %1, i32 0)
%4 = tail call zeroext i16 @csum_fold(i32 %3)
ret i16 %4
}
unsigned int GPMCEmptyWriteBuffStatusGet(unsigned int baseAddr) {
  unsigned int status;
  status = ((*((volatile unsigned int *)(baseAddr + (0x54)))) & (0x00000001u));
  return (status);
}


x86 assembly (clang, -O0):
<GPMCEmptyWriteBuffStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x54,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCEmptyWriteBuffStatusGet>:
add    $0x54,%edi
mov    (%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @GPMCEmptyWriteBuffStatusGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 84
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @GPMCEmptyWriteBuffStatusGet(i32 %0) {
%2 = add i32 %0, 84
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
sUalrm() { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<sUalrm>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @sUalrm() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @sUalrm() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = tail call i32 @exit(i32 %1)
unreachable
}
double ft_degtorad(double deg) { return (deg * 3.14159265358979323846 / 180); }


x86 assembly (clang, -O0):
<ft_degtorad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_degtorad>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ft_degtorad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x400921FB54442D18
%5 = fdiv double %4, 1.800000e+02
ret double %5
}

LLVM IR (-O2):
define double @ft_degtorad(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = fdiv double %2, 1.800000e+02
ret double %3
}