xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void oct(char *buf, int c) { sprintf(buf, "%03o ", c); }


x86 assembly (clang, -O0):
<oct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%03o \00"
define void @oct(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 @sprintf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%03o \00"
define void @oct(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int truncf(double);
double trun8(double x) { return truncf(x * 1e8) / 1e8; }


x86 assembly (clang, -O0):
<trun8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xec5(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trun8>:
push   %rax
mulsd  0xee7(%rip),%xmm0
call   1030 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xed3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @trun8(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+08
%5 = call i32 @truncf(double %4)
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 1.000000e+08
ret double %7
}

LLVM IR (-O2):
define double @trun8(double %0) {
%2 = fmul double %0, 1.000000e+08
%3 = tail call i32 @truncf(double %2)
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+08
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ init_preloader();
void __attribute__((constructor)) setup_preloader() { init_preloader(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @setup_preloader, i8* null }]
define void @setup_preloader() {
%1 = call i32 (...) @init_preloader()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @setup_preloader, i8* null }]
define void @setup_preloader() {
%1 = tail call i32 (...) @init_preloader()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *__xrealloc(void *ptr, size_t size, char *at) {
  void *new_ptr;
  new_ptr = realloc(ptr, size);
  if (!new_ptr) {
    fprintf(stderr, "%s: out of memory", at);
    abort();
  }
  return new_ptr;
}


x86 assembly (clang, -O0):
<__xrealloc>:
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
call   1050 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1180 <__xrealloc+0x50>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xrealloc>:
push   %rbx
mov    %rdx,%rbx
call   1050 <realloc@plt>
test   %rax,%rax
je     1140 <__xrealloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"%s: out of memory\00"
define i8* @__xrealloc(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call i8* @realloc(i8* %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp ne i8* %11, null
br i1 %12, label %18, label %13
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %6
%16 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"%s: out of memory\00"
define noalias i8* @__xrealloc(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int nacl_nano_main(int, char **);
scalar_t__ nacl_startup_untar(char *, char *, char *);
int nacl_main(int argc, char *argv[]) {
  if (nacl_startup_untar(argv[0], "nano.tar", "/"))
    return -1;
  return nacl_nano_main(argc, argv);
}


x86 assembly (clang, -O0):
<nacl_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec3(%rip),%rsi
lea    0xec5(%rip),%rdx
call   1030 <nacl_startup_untar@plt>
cmp    $0x0,%rax
je     115f <nacl_main+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <nacl_main+0x4e>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <nacl_nano_main@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nacl_main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
lea    0xece(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <nacl_startup_untar@plt>
test   %rax,%rax
je     114f <nacl_main+0x2f>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <nacl_nano_main@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"nano.tar\00"
@.str.1 = [2 x i8] c"/\00"
define i32 @nacl_main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @nacl_startup_untar(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @nacl_nano_main(i32 %0, i8** %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Type definitions */
struct xfs_dir2_data_hdr {
  int dummy;
};
struct xfs_dir2_data_entry {
  int dummy;
};

/* Variables and functions */
int xfs_dir3_data_entry_offset(struct xfs_dir2_data_hdr *);
struct xfs_dir2_data_entry *
xfs_dir3_data_entry_p(struct xfs_dir2_data_hdr *hdr) {
  return (struct xfs_dir2_data_entry *)((char *)hdr +
                                        xfs_dir3_data_entry_offset(hdr));
}


x86 assembly (clang, -O0):
<xfs_dir3_data_entry_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <xfs_dir3_data_entry_offset@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_dir3_data_entry_p>:
push   %rbx
mov    %rdi,%rbx
call   1030 <xfs_dir3_data_entry_offset@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.xfs_dir2_data_entry = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_entry* @xfs_dir3_data_entry_p(%struct.xfs_dir2_data_hdr* %0) {
%2 = alloca %struct.xfs_dir2_data_hdr*
store %struct.xfs_dir2_data_hdr* %0, %struct.xfs_dir2_data_hdr** %2
%3 = load %struct.xfs_dir2_data_hdr*, %struct.xfs_dir2_data_hdr** %2
%4 = bitcast %struct.xfs_dir2_data_hdr* %3 to i8*
%5 = load %struct.xfs_dir2_data_hdr*, %struct.xfs_dir2_data_hdr** %2
%6 = call i32 @xfs_dir3_data_entry_offset(%struct.xfs_dir2_data_hdr* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = bitcast i8* %8 to %struct.xfs_dir2_data_entry*
ret %struct.xfs_dir2_data_entry* %9
}

LLVM IR (-O2):
%struct.xfs_dir2_data_entry = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_entry* @xfs_dir3_data_entry_p(%struct.xfs_dir2_data_hdr* %0) {
%2 = bitcast %struct.xfs_dir2_data_hdr* %0 to i8*
%3 = tail call i32 @xfs_dir3_data_entry_offset(%struct.xfs_dir2_data_hdr* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
%6 = bitcast i8* %5 to %struct.xfs_dir2_data_entry*
ret %struct.xfs_dir2_data_entry* %6
}
/* Variables and functions */
scalar_t__ fgetc(char *);
int toIFE(char *f) {
  char ch;
  while ((ch = (char)fgetc(f))) {
    if (ch == ']') {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<toIFE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     114e <toIFE+0x3e>
movsbl -0x11(%rbp),%eax
cmp    $0x5d,%eax
jne    1149 <toIFE+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1155 <toIFE+0x45>
jmp    111c <toIFE+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toIFE>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
test   %al,%al
je     1134 <toIFE+0x24>
cmp    $0x5d,%al
jne    1120 <toIFE+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @toIFE(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @fgetc(i8* %0)
%4 = trunc i64 %3 to i8
switch i8 %4, label %2 [
i8 0, label %6
i8 93, label %5
]
5: ; preds = %2
br label %6
6: ; preds = %2, %5
%7 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %7
}
/* Variables and functions */
void v_ntoh(void *, int);
void v64_ntoh(void *p) { return v_ntoh(p, 8); }


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

x86 assembly (clang, -O2):
<v64_ntoh>:
mov    $0x8,%esi
jmp    1030 <v_ntoh@plt>

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

LLVM IR (-O2):
define void @v64_ntoh(i8* %0) {
tail call void @v_ntoh(i8* %0, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  int r = rand() % 13;
  printf("Número sorteado %d", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0xd,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
movslq %eax,%rsi
imul   $0x4ec4ec4f,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%ecx
lea    (%rax,%rcx,4),%eax
sub    %eax,%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"N\C3\BAmero sorteado %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 13
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"N\C3\BAmero sorteado %d\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 13
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int RAND_MAX;
int rand();
int randint(int limit) {
  int divisor = RAND_MAX / (limit + 1);
  int retval;
  do {
    retval = rand() / divisor;
  } while (retval >= limit);
  return retval;
}


x86 assembly (clang, -O0):
<randint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1130 <randint+0x20>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randint>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ecc(%rip),%rax
mov    (%rax),%eax
lea    0x1(%rbx),%ecx
cltd
idiv   %ecx
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebp
cmp    %ebx,%eax
jge    1130 <randint+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define i32 @randint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* @RAND_MAX
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %5, %7
store i32 %8, i32* %3
br label %9
9: ; preds = %13, %1
%10 = call i32 (...) @rand()
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
store i32 %12, i32* %4
br label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp sge i32 %14, %15
br i1 %16, label %9, label %17
17: ; preds = %13
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define i32 @randint(i32 %0) {
%2 = load i32, i32* @RAND_MAX
%3 = add nsw i32 %0, 1
%4 = sdiv i32 %2, %3
br label %5
5: ; preds = %5, %1
%6 = tail call i32 (...) @rand()
%7 = sdiv i32 %6, %4
%8 = icmp slt i32 %7, %0
br i1 %8, label %9, label %5
9: ; preds = %5
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t u32_load_unaligned(const void *p) {
  return *((uint32_t *)p);
}


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

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

LLVM IR (-O0):
define i32 @u32_load_unaligned(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @u32_load_unaligned(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ debug_log_close();
void spider_end() { debug_log_close(); }


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

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

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

LLVM IR (-O2):
define void @spider_end() {
%1 = tail call i32 (...) @debug_log_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x6c() {
  Assert_real((isbdigit(108) == 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_isbdigit.c",
              545, ("isbdigit should be 0 for l"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for l\00"
define void @t_isbdigit_0x6c() {
%1 = call i64 @isbdigit(i32 108)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for l\00"
define void @t_isbdigit_0x6c() {
%1 = tail call i64 @isbdigit(i32 108)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g5_set_nMC(int /*<<< orphan*/, int);
void g5_set_n(int n) { g5_set_nMC(0, n); }


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

x86 assembly (clang, -O2):
<g5_set_n>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <g5_set_nMC@plt>

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

LLVM IR (-O2):
define void @g5_set_n(i32 %0) {
%2 = tail call i32 @g5_set_nMC(i32 0, i32 %0)
ret void
}
/* Variables and functions */
int EINTR;
int scalanative_eintr() { return EINTR; }


x86 assembly (clang, -O0):
<scalanative_eintr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_eintr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EINTR = global i32 0
define i32 @scalanative_eintr() {
%1 = load i32, i32* @EINTR
ret i32 %1
}

LLVM IR (-O2):
@EINTR = global i32 0
define i32 @scalanative_eintr() {
%1 = load i32, i32* @EINTR
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello, ");
  printf("wo\trld");
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"hello, \00"
@.str.1 = [7 x i8] c"wo\09rld\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"hello, \00"
@.str.1 = [7 x i8] c"wo\09rld\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello World!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int main(void) {
  while (1)
    fork();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fork@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <fork@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @fork()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @fork()
br label %1
}
int ncp6335d_restart_config() { return 0; }


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

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

LLVM IR (-O0):
define i32 @ncp6335d_restart_config() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ncp6335d_restart_config() {
ret i32 0
}
/* Variables and functions */
int random();
int number(int from, int to) { return ((random() % (to - from + 1)) + from); }


x86 assembly (clang, -O0):
<number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <random@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @number(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @random()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @number(i32 %0, i32 %1) {
%3 = tail call i32 (...) @random()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, short);
void write_byte_mode1(short ioaddr, unsigned char value) {
  outb(value & 0x0f, ioaddr + 0);
  outb(0x10 | 0x08, ioaddr + 2);
  outb((value >> 4) | 0x10, ioaddr + 0);
  outb(0x10 | 0, ioaddr + 2);
}


x86 assembly (clang, -O0):
<write_byte_mode1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%edi
and    $0xf,%edi
movswl -0x2(%rbp),%eax
add    $0x0,%eax
movswl %ax,%esi
call   1030 <outb@plt>
movswl -0x2(%rbp),%eax
add    $0x2,%eax
mov    $0x18,%edi
movswl %ax,%esi
call   1030 <outb@plt>
movzbl -0x3(%rbp),%edi
sar    $0x4,%edi
or     $0x10,%edi
movswl -0x2(%rbp),%eax
add    $0x0,%eax
movswl %ax,%esi
call   1030 <outb@plt>
movswl -0x2(%rbp),%eax
add    $0x2,%eax
mov    $0x10,%edi
movswl %ax,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_byte_mode1>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
mov    %esi,%edi
and    $0xf,%edi
mov    %r14d,%esi
call   1030 <outb@plt>
lea    0x2(%r14),%eax
movswl %ax,%ebp
mov    $0x18,%edi
mov    %ebp,%esi
call   1030 <outb@plt>
shr    $0x4,%ebx
or     $0x10,%ebx
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <outb@plt>
mov    $0x10,%edi
mov    %ebp,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @write_byte_mode1(i16 signext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 15
%8 = load i16, i16* %3
%9 = sext i16 %8 to i32
%10 = add nsw i32 %9, 0
%11 = trunc i32 %10 to i16
%12 = call i32 @outb(i32 %7, i16 signext %11)
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = add nsw i32 %14, 2
%16 = trunc i32 %15 to i16
%17 = call i32 @outb(i32 24, i16 signext %16)
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = ashr i32 %19, 4
%21 = or i32 %20, 16
%22 = load i16, i16* %3
%23 = sext i16 %22 to i32
%24 = add nsw i32 %23, 0
%25 = trunc i32 %24 to i16
%26 = call i32 @outb(i32 %21, i16 signext %25)
%27 = load i16, i16* %3
%28 = sext i16 %27 to i32
%29 = add nsw i32 %28, 2
%30 = trunc i32 %29 to i16
%31 = call i32 @outb(i32 16, i16 signext %30)
ret void
}

LLVM IR (-O2):
define void @write_byte_mode1(i16 signext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = and i32 %3, 15
%5 = tail call i32 @outb(i32 %4, i16 signext %0)
%6 = add i16 %0, 2
%7 = tail call i32 @outb(i32 24, i16 signext %6)
%8 = lshr i32 %3, 4
%9 = or i32 %8, 16
%10 = tail call i32 @outb(i32 %9, i16 signext %0)
%11 = tail call i32 @outb(i32 16, i16 signext %6)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xkey;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xkey_type(void *_p) { return (int)((XEvent *)_p)->xkey.type; }


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xkey_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xkey_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  printf("%d\n", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
scalar_t__ UINT16_MAX;
scalar_t__ UINT8_MAX;
uint32_t mp_sizeof_binl(uint32_t len) {
  if (len <= UINT8_MAX) {
    return 1 + sizeof(uint8_t);
  } else if (len <= UINT16_MAX) {
    return 1 + sizeof(uint16_t);
  } else {
    return 1 + sizeof(uint32_t);
  }
}


x86 assembly (clang, -O0):
<mp_sizeof_binl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%rax
jg     1129 <mp_sizeof_binl+0x29>
movq   $0x5,-0x8(%rbp)
jmp    1152 <mp_sizeof_binl+0x52>
mov    -0x10(%rbp),%rax
mov    0x2ea4(%rip),%rcx
cmp    (%rcx),%rax
jg     114a <mp_sizeof_binl+0x4a>
movq   $0x5,-0x8(%rbp)
jmp    1152 <mp_sizeof_binl+0x52>
movq   $0x9,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_sizeof_binl>:
mov    0x2ed9(%rip),%rax
cmp    %rdi,(%rax)
setl   %al
mov    0x2ec4(%rip),%rcx
cmp    %rdi,(%rcx)
setl   %cl
and    %al,%cl
movzbl %cl,%eax
lea    0x5(,%rax,4),%rax
ret

LLVM IR (-O0):
@UINT8_MAX = global i64 0
@UINT16_MAX = global i64 0
define i64 @mp_sizeof_binl(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @UINT8_MAX
%6 = icmp sle i64 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 5, i64* %2
br label %14
8: ; preds = %1
%9 = load i64, i64* %3
%10 = load i64, i64* @UINT16_MAX
%11 = icmp sle i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i64 5, i64* %2
br label %14
13: ; preds = %8
store i64 9, i64* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
@UINT8_MAX = global i64 0
@UINT16_MAX = global i64 0
define i64 @mp_sizeof_binl(i64 %0) {
%2 = load i64, i64* @UINT8_MAX
%3 = icmp slt i64 %2, %0
%4 = load i64, i64* @UINT16_MAX
%5 = icmp slt i64 %4, %0
%6 = select i1 %3, i1 %5, i1 false
%7 = select i1 %6, i64 9, i64 5
ret i64 %7
}
unsigned tilde_zero() { return ~0; }


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

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

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

LLVM IR (-O2):
define i32 @tilde_zero() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int m_entry_nr5(void) {
  int res = 1;
  printf("\n>> Called m_entry_nr5\n");
  res = 0;
  return res;
}


x86 assembly (clang, -O0):
<m_entry_nr5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"\0A>> Called m_entry_nr5\0A\00"
define i32 @m_entry_nr5() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [23 x i8] c"\0A>> Called m_entry_nr5\00"
define i32 @m_entry_nr5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int mdp4_writeback_start(struct fb_info *info) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fb_info = type opaque
define i32 @mdp4_writeback_start(%struct.fb_info* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct pollfd {
  int dummy;
};
struct _session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ msglog(int /*<<< orphan*/, char *, int);
int stop_session(int, struct pollfd *, struct pollfd *, struct _session *);
int outer_failure(int sesno, struct pollfd *in_fd, struct pollfd *out_fd,
                  struct _session *sess) {
  msglog(0, "[%i.?] <session failure>\n", sesno);
  return stop_session(sesno, in_fd, out_fd, sess);
}


x86 assembly (clang, -O0):
<outer_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
lea    0xebd(%rip),%rsi
call   1030 <msglog@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <stop_session@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outer_failure>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec7(%rip),%rsi
xor    %edi,%edi
mov    %ebp,%edx
call   1030 <msglog@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <stop_session@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32 }
%struct._session = type { i32 }
@.str = [26 x i8] c"[%i.?] <session failure>\0A\00"
define i32 @outer_failure(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3) {
%5 = alloca i32
%6 = alloca %struct.pollfd*
%7 = alloca %struct.pollfd*
%8 = alloca %struct._session*
store i32 %0, i32* %5
store %struct.pollfd* %1, %struct.pollfd** %6
store %struct.pollfd* %2, %struct.pollfd** %7
store %struct._session* %3, %struct._session** %8
%9 = load i32, i32* %5
%10 = call i32 @msglog(i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %5
%12 = load %struct.pollfd*, %struct.pollfd** %6
%13 = load %struct.pollfd*, %struct.pollfd** %7
%14 = load %struct._session*, %struct._session** %8
%15 = call i32 @stop_session(i32 %11, %struct.pollfd* %12, %struct.pollfd* %13, %struct._session* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
%struct._session = type { i32 }
@.str = [26 x i8] c"[%i.?] <session failure>\0A\00"
define i32 @outer_failure(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3) {
%5 = tail call i32 @msglog(i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @stop_session(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_xor() {
  gen_pop();
  gen_call("ccxor");
}


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

x86 assembly (clang, -O2):
<gen_xor>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ccxor\00"
define i32 @gen_xor() {
%1 = alloca i32
%2 = call i32 (...) @gen_pop()
%3 = call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccxor\00"
define i32 @gen_xor() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_uname_string() {
  printf("NOT IMPLEMENTED:"
         "pa_uname_string"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_uname_string\00"
define i32 @pa_uname_string() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void RTAvlrFileOffsetGetLeft(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrFileOffsetGetLeft() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_pu16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_subs_pu16(__m64 a, __m64 b) { return _mm_subs_pu16(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_subs_pu16>:
jmp    1030 <_mm_subs_pu16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_subs_pu16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_pu16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ GC_malloc(int);
int /*<<< orphan*/ _throw_badalloc();
void *_cycalloc(int n) {
  void *ans = (void *)GC_malloc(n);
  if (!ans)
    _throw_badalloc();
  return ans;
}


x86 assembly (clang, -O0):
<_cycalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <GC_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <_cycalloc+0x29>
mov    $0x0,%al
call   1040 <_throw_badalloc@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cycalloc>:
push   %rbx
call   1030 <GC_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <_cycalloc+0x15>
xor    %eax,%eax
call   1040 <_throw_badalloc@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_cycalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @GC_malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 (...) @_throw_badalloc()
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @_cycalloc(i32 %0) {
%2 = tail call i64 @GC_malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @_throw_badalloc()
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
__attribute__((visibility("default"))) void (*louis_get_log_callback(void))(
    const int level, const char *message) {
  return log_get_callback();
}


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

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

LLVM IR (-O0):
define void (i32, i8*)* @louis_get_log_callback() {
%1 = call i32 (...) @log_get_callback()
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to void (i32, i8*)*
ret void (i32, i8*)* %3
}

LLVM IR (-O2):
define void (i32, i8*)* @louis_get_log_callback() {
%1 = tail call i32 (...) @log_get_callback()
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to void (i32, i8*)*
ret void (i32, i8*)* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int try_parse_int_imp(char *, void *, int, int);
bool try_parse_int32(char *str, int32_t *value_ptr) {
  return try_parse_int_imp(str, (void *)value_ptr, sizeof(int32_t), true);
}


x86 assembly (clang, -O0):
<try_parse_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1030 <try_parse_int_imp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_parse_int32>:
mov    $0x4,%edx
mov    $0x1,%ecx
jmp    1030 <try_parse_int_imp@plt>

LLVM IR (-O0):
define i32 @try_parse_int32(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 = bitcast i32* %6 to i8*
%8 = call i32 @try_parse_int_imp(i8* %5, i8* %7, i32 4, i32 1)
ret i32 %8
}

LLVM IR (-O2):
define i32 @try_parse_int32(i8* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @try_parse_int_imp(i8* %0, i8* %3, i32 4, i32 1)
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_quaddobl_start_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(267, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_start_solutions_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x10b,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_start_solutions_to_container>:
mov    $0x10b,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_start_solutions_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 267, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_start_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 267, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int fun708() { return 708; }


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

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

LLVM IR (-O0):
define i32 @fun708() {
ret i32 708
}

LLVM IR (-O2):
define i32 @fun708() {
ret i32 708
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char const *, int, int, int /*<<< orphan*/ *);
void output_bin(FILE *outb, const char *array, int len) {
  int i;
  for (i = 0; i < len; i++)
    fwrite(&array[i], 1, 1, outb);
}


x86 assembly (clang, -O0):
<output_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115f <output_bin+0x4f>
mov    -0x10(%rbp),%rdi
movslq -0x18(%rbp),%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <output_bin+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_bin>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1146 <output_bin+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
mov    %r15,%rsi
call   1030 <fputc@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <output_bin+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @output_bin(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = tail call i32 @fputc(i32 %11, i32* %0)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}