xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int si_int;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
void handle2(int s, siginfo_t *info, void *d) {
  printf("!!!OOKK!!%d!\n", info->si_int);
  sleep(2);
  printf("!!!KK0000000!!!\n");
}


x86 assembly (clang, -O0):
<handle2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle2>:
push   %rax
mov    (%rsi),%esi
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@.str = [14 x i8] c"!!!OOKK!!%d!\0A\00"
@.str.1 = [17 x i8] c"!!!KK0000000!!!\0A\00"
define void @handle2(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @sleep(i32 2)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@.str = [14 x i8] c"!!!OOKK!!%d!\0A\00"
@str = [16 x i8] c"!!!KK0000000!!!\00"
define void @handle2(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @sleep(i32 2)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, char, size_t);
int /*<<< orphan*/ printf(char *, size_t, int /*<<< orphan*/);
void *w_malloc(size_t size) {
  void *ptr = NULL;
  ptr = malloc(size);
  if (ptr == NULL) {
    printf("w_malloc(%zu): errno %d, report to wookie developers\n", size,
           errno);
    exit(-1);
  }
  memset(ptr, '\0', size);
  return ptr;
}


x86 assembly (clang, -O0):
<w_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    118f <w_malloc+0x4f>
mov    -0x8(%rbp),%rsi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
test   %rax,%rax
je     116c <w_malloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
lea    0xe84(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"w_malloc(%zu): errno %d, report to wookie developers\0A\00"
@errno = global i32 0
define i8* @w_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* %2
%10 = load i32, i32* @errno
%11 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %9, i32 %10)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i64, i64* %2
%16 = call i32 @memset(i8* %14, i8 signext 0, i64 %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [54 x i8] c"w_malloc(%zu): errno %d, report to wookie developers\0A\00"
@errno = global i32 0
define i8* @w_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %5)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
%9 = tail call i32 @memset(i8* %2, i8 signext 0, i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t return_int64_3() { return -1073741824; }


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

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

LLVM IR (-O0):
define i32 @return_int64_3() {
ret i32 -1073741824
}

LLVM IR (-O2):
define i32 @return_int64_3() {
ret i32 -1073741824
}
openplotfile(pf) char *pf;
{
  char *mktemp();
  mktemp(pf);
  strcat(pf, ".pf");
  openpl();
}


x86 assembly (clang, -O0):
<openplotfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <mktemp@plt>
mov    -0x10(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strcat@plt>
mov    $0x0,%al
call   1040 <openpl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openplotfile>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <mktemp@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movl   $0x66702e,(%rbx,%rax,1)
xor    %eax,%eax
pop    %rbx
jmp    1040 <openpl@plt>

LLVM IR (-O0):
@.str = [4 x i8] c".pf\00"
define i32 @openplotfile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* (i8*, ...) bitcast (i8* (...)* @mktemp to i8* (i8*, ...)*)(i8* %4)
%6 = load i8*, i8** %3
%7 = call i8* @strcat(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @openpl()
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @openplotfile(i8* %0) {
%2 = tail call i8* (i8*, ...) bitcast (i8* (...)* @mktemp to i8* (i8*, ...)*)(i8* %0)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to i32*
store i32 6713390, i32* %5
%6 = tail call i32 (...) @openpl()
ret i32 undef
}
_Noreturn void _Exit(int ec) {
  __syscall(248, ec);
  for (;;)
    __syscall(1, ec);
}


x86 assembly (clang, -O0):
<_Exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xf8,%edi
mov    $0x0,%al
call   1030 <__syscall@plt>
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <__syscall@plt>
jmp    112a <_Exit+0x1a>

x86 assembly (clang, -O2):
<_Exit>:
push   %rbx
mov    %edi,%ebx
mov    $0xf8,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <__syscall@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <__syscall@plt>
jmp    1130 <_Exit+0x20>

LLVM IR (-O0):
define void @_Exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, i32, ...)*)(i32 248, i32 %3)
br label %5
5: ; preds = %5, %1
%6 = load i32, i32* %2
%7 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, i32, ...)*)(i32 1, i32 %6)
br label %5
}

LLVM IR (-O2):
define void @_Exit(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, i32, ...)*)(i32 248, i32 %0)
br label %3
3: ; preds = %3, %1
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__syscall to i32 (i32, i32, ...)*)(i32 1, i32 %0)
br label %3
}
int pfloat_ConvertToInt(int i) { return i >> 16; }


x86 assembly (clang, -O0):
<pfloat_ConvertToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfloat_ConvertToInt>:
mov    %edi,%eax
sar    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @pfloat_ConvertToInt(i32 %0) {
%2 = ashr i32 %0, 16
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x25() {
  Assert_real((islower(37) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              190, ("islower should be 0 for %"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for %\00"
define void @t_islower_0x25() {
%1 = call i64 @islower(i32 37)
%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 190, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for %\00"
define void @t_islower_0x25() {
%1 = tail call i64 @islower(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/
nrf_drv_radio802154_swi_notify_energy_detected(int /*<<< orphan*/);
void nrf_drv_radio802154_notify_energy_detected(int8_t result) {
  nrf_drv_radio802154_swi_notify_energy_detected(result);
}


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

x86 assembly (clang, -O2):
<nrf_drv_radio802154_notify_energy_detected>:
jmp    1030 <nrf_drv_radio802154_swi_notify_energy_detected@plt>

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

LLVM IR (-O2):
define void @nrf_drv_radio802154_notify_energy_detected(i32 %0) {
%2 = tail call i32 @nrf_drv_radio802154_swi_notify_energy_detected(i32 %0)
ret void
}
/* Variables and functions */
int Cyc_Tcutil_is_pointer_type(void *);
int Cyc_Toc_is_boxed_tvar(void *);
int Cyc_Toc_is_pointer_or_boxed_tvar(void *t) {
  int _T0;
  int _T1;
  _T1 = Cyc_Tcutil_is_pointer_type(t);
  if (!_T1)
    goto _TL82;
  _T0 = 1;
  goto _TL83;
_TL82:
  _T0 = Cyc_Toc_is_boxed_tvar(t);
_TL83:
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Toc_is_pointer_or_boxed_tvar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Cyc_Tcutil_is_pointer_type@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1147 <Cyc_Toc_is_pointer_or_boxed_tvar+0x27>
jmp    1153 <Cyc_Toc_is_pointer_or_boxed_tvar+0x33>
movl   $0x1,-0xc(%rbp)
jmp    115f <Cyc_Toc_is_pointer_or_boxed_tvar+0x3f>
mov    -0x8(%rbp),%rdi
call   1040 <Cyc_Toc_is_boxed_tvar@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Toc_is_pointer_or_boxed_tvar>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Cyc_Tcutil_is_pointer_type@plt>
test   %eax,%eax
je     1134 <Cyc_Toc_is_pointer_or_boxed_tvar+0x14>
mov    $0x1,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Cyc_Toc_is_boxed_tvar@plt>

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

LLVM IR (-O2):
define i32 @Cyc_Toc_is_pointer_or_boxed_tvar(i8* %0) {
%2 = tail call i32 @Cyc_Tcutil_is_pointer_type(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Cyc_Toc_is_boxed_tvar(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
void gtk_progress_bar_get_ellipsize() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_get_ellipsize() {
ret void
}
unsigned long bar(unsigned char c) {
  unsigned long l;
  unsigned int i;
  i = ((unsigned int)c) << 8;
  i |= ((unsigned int)c) << 20;
  asm volatile("" :::);
  i = i & 0x0ffffff0;
  asm volatile("" :::);
  l = (unsigned long)i;
  return l;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x14,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xffffff0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %edi,%eax
imul   $0x100100,%rax,%rax
ret

LLVM IR (-O0):
define i64 @bar(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i64
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
store i32 %7, i32* %4
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 20
%11 = load i32, i32* %4
%12 = or i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = and i32 %13, 268435440
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
store i64 %16, i64* %3
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @bar(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = mul nuw nsw i64 %2, 1048832
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int bof(char *str) {
  char buffer[12];
  strcpy(buffer, str);
  return 1;
}


x86 assembly (clang, -O0):
<bof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bof>:
sub    $0x18,%rsp
mov    %rdi,%rsi
lea    0xc(%rsp),%rdi
call   1030 <strcpy@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @bof(i8* %0) {
%2 = alloca i8*
%3 = alloca [12 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @strcpy(i8* %4, i8* %5)
ret i32 1
}

LLVM IR (-O2):
define i32 @bof(i8* %0) {
%2 = alloca [12 x i8]
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
ret i32 1
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t dvl_convert16(unsigned char msb, unsigned char lsb) {
  return ((((uint16_t)msb) << 8) | lsb);
}


x86 assembly (clang, -O0):
<dvl_convert16>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvl_convert16>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @dvl_convert16(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @dvl_convert16(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = or i32 %4, %5
ret i32 %6
}
int main() {
  int x, y, z;
  x = 0;
  if (x == 5) {
    x++;
    x++;
    if (y > 10) {
      z++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    1146 <main+0x46>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0xc(%rbp)
jle    1141 <main+0x41>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <main+0x46>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int Operand_bt2_decode(unsigned int *valp) {
  *valp = *valp << 1;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_bt2_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_bt2_decode>:
shll   (%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Operand_bt2_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 1
store i32 %3, i32* %0
ret i32 0
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/parse_errors.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/parse_errors.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/parse_errors.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
int genlist_remove_all(struct genlist *, struct entry const *);
int entry_list_remove_all(struct entry_list *tthis, const struct entry *pfoo) {
  return genlist_remove_all((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<entry_list_remove_all>:
jmp    1030 <genlist_remove_all@plt>

LLVM IR (-O0):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define i32 @entry_list_remove_all(%struct.entry_list* %0, %struct.entry* %1) {
%3 = alloca %struct.entry_list*
%4 = alloca %struct.entry*
store %struct.entry_list* %0, %struct.entry_list** %3
store %struct.entry* %1, %struct.entry** %4
%5 = load %struct.entry_list*, %struct.entry_list** %3
%6 = bitcast %struct.entry_list* %5 to %struct.genlist*
%7 = load %struct.entry*, %struct.entry** %4
%8 = call i32 @genlist_remove_all(%struct.genlist* %6, %struct.entry* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.entry_list = type { i32 }
%struct.entry = type { i32 }
%struct.genlist = type { i32 }
define i32 @entry_list_remove_all(%struct.entry_list* %0, %struct.entry* %1) {
%3 = bitcast %struct.entry_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_remove_all(%struct.genlist* %3, %struct.entry* %1)
ret i32 %4
}
/* Variables and functions */
int atoi(char *);
char *get_data();
int main(int argc, char *argv[]) {
  int index = atoi(argv[1]);
  char *ptr = get_data() + index;
  char c = *ptr;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <get_data@plt>
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = call i8* (...) @get_data()
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8* %16, i8** %7
%17 = load i8*, i8** %7
%18 = load i8, i8* %17
store i8 %18, i8* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @get_data()
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long selection;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
void set_XSelectionRequestEvent_selection(void *_p, unsigned long _v) {
  ((XSelectionRequestEvent *)_p)->selection = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XSelectionRequestEvent_selection>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XSelectionRequestEvent_selection(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int getc_unlocked(int /*<<< orphan*/);
int my_getc_unlocked(struct aFILE *fp) {
  return getc_unlocked(_get_actual_fp(fp));
}


x86 assembly (clang, -O0):
<my_getc_unlocked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
call   1030 <getc_unlocked@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_getc_unlocked>:
push   %rax
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <getc_unlocked@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_getc_unlocked(%struct.aFILE* %0) {
%2 = alloca %struct.aFILE*
store %struct.aFILE* %0, %struct.aFILE** %2
%3 = load %struct.aFILE*, %struct.aFILE** %2
%4 = call i32 @_get_actual_fp(%struct.aFILE* %3)
%5 = call i32 @getc_unlocked(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_getc_unlocked(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%3 = tail call i32 @getc_unlocked(i32 %2)
ret i32 %3
}
/* Type definitions */
struct _nibseq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _nibseq_init(struct _nibseq *);
int /*<<< orphan*/ free(struct _nibseq *);
void nibseq_free(struct _nibseq *ns) {
  if (ns) {
    _nibseq_init(ns);
    free(ns);
  }
}


x86 assembly (clang, -O0):
<nibseq_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <nibseq_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <_nibseq_init@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibseq_free>:
test   %rdi,%rdi
je     1137 <nibseq_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <_nibseq_init@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct._nibseq = type { i32 }
define void @nibseq_free(%struct._nibseq* %0) {
%2 = alloca %struct._nibseq*
store %struct._nibseq* %0, %struct._nibseq** %2
%3 = load %struct._nibseq*, %struct._nibseq** %2
%4 = icmp ne %struct._nibseq* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct._nibseq*, %struct._nibseq** %2
%7 = call i32 @_nibseq_init(%struct._nibseq* %6)
%8 = load %struct._nibseq*, %struct._nibseq** %2
%9 = call i32 @free(%struct._nibseq* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct._nibseq = type { i32 }
define void @nibseq_free(%struct._nibseq* %0) {
%2 = icmp eq %struct._nibseq* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @_nibseq_init(%struct._nibseq* %0)
%5 = tail call i32 @free(%struct._nibseq* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int sv_end_of_song(int);
int vox_end_of_song(int slot) { return sv_end_of_song(slot); }


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

x86 assembly (clang, -O2):
<vox_end_of_song>:
jmp    1030 <sv_end_of_song@plt>

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

LLVM IR (-O2):
define i32 @vox_end_of_song(i32 %0) {
%2 = tail call i32 @sv_end_of_song(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR89_set(void) { return U_WMRCORENONE_set("U_WMR89"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR89\00"
define i8* @U_WMR89_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int write_real(char *, double const, size_t);
int option_write_real(char *out, const void *in, size_t n) {
  const double *in_real = in;
  return write_real(out, *in_real, n);
}


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

x86 assembly (clang, -O2):
<option_write_real>:
movsd  (%rsi),%xmm0
mov    %rdx,%rsi
jmp    1030 <write_real@plt>

LLVM IR (-O0):
define i32 @option_write_real(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to double*
store double* %9, double** %7
%10 = load i8*, i8** %4
%11 = load double*, double** %7
%12 = load double, double* %11
%13 = load i64, i64* %6
%14 = call i32 @write_real(i8* %10, double %12, i64 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @option_write_real(i8* %0, i8* nocapture %1, i64 %2) {
%4 = bitcast i8* %1 to double*
%5 = load double, double* %4
%6 = tail call i32 @write_real(i8* %0, double %5, i64 %2)
ret i32 %6
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float float_aleatorio(float a) {
  return ((float)rand() / (float)(RAND_MAX)) * a;
}


x86 assembly (clang, -O0):
<float_aleatorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_aleatorio>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm2
mov    0x2ebe(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm0
mulss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @float_aleatorio(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fdiv float %4, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @float_aleatorio(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %3, %5
%7 = fmul float %6, %0
ret float %7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int time_is_put(uint8_t *time) { return *(time + 19) & 1; }


x86 assembly (clang, -O0):
<time_is_put>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_is_put>:
mov    0x4c(%rdi),%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @time_is_put(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 19
%3 = load i32, i32* %2
%4 = and i32 %3, 1
ret i32 %4
}
void g_type_get_qdata() {}


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

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

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

LLVM IR (-O2):
define void @g_type_get_qdata() {
ret void
}
/* Variables and functions */
int up2power_aux(unsigned int const);
unsigned int up2power(const unsigned int number) {
  if (number == 0)
    return 1;
  return (1 << up2power_aux(number - 1));
}


x86 assembly (clang, -O0):
<up2power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <up2power+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1148 <up2power+0x38>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <up2power_aux@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<up2power>:
test   %edi,%edi
je     112b <up2power+0x1b>
push   %rax
add    $0xffffffff,%edi
call   1030 <up2power_aux@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @up2power(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = tail call i32 @up2power_aux(i32 %4)
%6 = shl nuw i32 1, %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 1, %1 ]
ret i32 %8
}
void outccname(name) char *name;
{
  outbyte('_');
  outstr(name);
}


x86 assembly (clang, -O0):
<outccname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5f,%edi
mov    $0x0,%al
call   1040 <outbyte@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <outstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outccname>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5f,%edi
xor    %eax,%eax
call   1040 <outbyte@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <outstr@plt>

LLVM IR (-O0):
define void @outccname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 95)
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %4)
ret void
}

LLVM IR (-O2):
define void @outccname(i8* %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 95)
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* %0)
ret void
}
void remove_arp_entry(unsigned int mac[8]) { return; }


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

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

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

LLVM IR (-O2):
define void @remove_arp_entry(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
int /*<<< orphan*/ *getcwd(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int pwd(char **command, struct tm start) {
  char cwd[1024];
  if (getcwd(cwd, sizeof(cwd)) != NULL) {
    printf("%s\r\n", cwd);
  } else {
    perror("getcwd:");
  }
  return 0;
}


x86 assembly (clang, -O0):
<pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %esi,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
je     1175 <pwd+0x45>
lea    -0x410(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <pwd+0x51>
lea    0xe89(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwd>:
sub    $0x408,%rsp
mov    %rsp,%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
test   %rax,%rax
je     1162 <pwd+0x32>
lea    0xeb0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x408,%rsp
ret
lea    0xe9c(%rip),%rdi
call   1050 <perror@plt>
jmp    1158 <pwd+0x28>

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [5 x i8] c"%s\0D\0A\00"
@.str.1 = [8 x i8] c"getcwd:\00"
define i32 @pwd(i8** %0, i32 %1) {
%3 = alloca %struct.tm
%4 = alloca i8**
%5 = alloca [1024 x i8]
%6 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 0
store i32 %1, i32* %6
store i8** %0, i8*** %4
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%8 = call i32* @getcwd(i8* %7, i32 1024)
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s\0D\0A\00"
@.str.1 = [8 x i8] c"getcwd:\00"
define i32 @pwd(i8** nocapture readnone %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32* @getcwd(i8* %4, i32 1024)
%6 = icmp eq i32* %5, null
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %11
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}
unsigned long long nlm_crypto_form_pkt_desc5(
    unsigned int dstfraglen, unsigned int cipherout_l3alloc,
    unsigned int cipherclobber, unsigned long long cipherdst_addr) {
  return (((unsigned long long)((dstfraglen - 1)) & ((1ULL << (16)) - 1))
          << (48)) |
         ((unsigned long long)(cipherout_l3alloc) << (46)) |
         ((unsigned long long)(cipherclobber) << (41)) |
         ((unsigned long long)(cipherdst_addr) << (0));
}


x86 assembly (clang, -O0):
<nlm_crypto_form_pkt_desc5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
and    $0xffff,%rax
shl    $0x30,%rax
mov    -0x8(%rbp),%ecx
shl    $0x2e,%rcx
or     %rcx,%rax
mov    -0xc(%rbp),%ecx
shl    $0x29,%rcx
or     %rcx,%rax
mov    -0x18(%rbp),%rcx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_crypto_form_pkt_desc5>:
mov    %esi,%eax
add    $0xffffffff,%edi
shl    $0x30,%rdi
shl    $0x2e,%rax
shl    $0x29,%rdx
or     %rcx,%rax
or     %rdi,%rax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @nlm_crypto_form_pkt_desc5(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = sub i32 %9, 1
%11 = zext i32 %10 to i64
%12 = and i64 %11, 65535
%13 = shl i64 %12, 48
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = shl i64 %15, 46
%17 = or i64 %13, %16
%18 = load i32, i32* %7
%19 = zext i32 %18 to i64
%20 = shl i64 %19, 41
%21 = or i64 %17, %20
%22 = load i64, i64* %8
%23 = shl i64 %22, 0
%24 = or i64 %21, %23
ret i64 %24
}

LLVM IR (-O2):
define i64 @nlm_crypto_form_pkt_desc5(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = add i32 %0, 65535
%6 = zext i32 %5 to i64
%7 = shl i64 %6, 48
%8 = zext i32 %1 to i64
%9 = shl i64 %8, 46
%10 = or i64 %7, %9
%11 = zext i32 %2 to i64
%12 = shl i64 %11, 41
%13 = or i64 %10, %3
%14 = or i64 %13, %12
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ vsi_core_close_sys();
int /*<<< orphan*/ vsi_core_close_user();
void vsi_core_close(void) {
  vsi_core_close_user();
  vsi_core_close_sys();
  return;
}


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

x86 assembly (clang, -O2):
<vsi_core_close>:
push   %rax
xor    %eax,%eax
call   1030 <vsi_core_close_user@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <vsi_core_close_sys@plt>

LLVM IR (-O0):
define void @vsi_core_close() {
%1 = call i32 (...) @vsi_core_close_user()
%2 = call i32 (...) @vsi_core_close_sys()
ret void
}

LLVM IR (-O2):
define void @vsi_core_close() {
%1 = tail call i32 (...) @vsi_core_close_user()
%2 = tail call i32 (...) @vsi_core_close_sys()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ domathf();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(void) {
  domathf();
  exit(0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <domathf@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 (...) @domathf()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @domathf()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ IsDigit(unsigned char);
char toupper(unsigned char);
unsigned DigitVal(unsigned char C) {
  if (IsDigit(C)) {
    return C - '0';
  } else {
    return toupper(C) - 'A' + 10;
  }
}


x86 assembly (clang, -O0):
<DigitVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1040 <IsDigit@plt>
cmp    $0x0,%rax
je     1150 <DigitVal+0x30>
movzbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <DigitVal+0x45>
movzbl -0x5(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DigitVal>:
push   %rbx
mov    %edi,%ebx
call   1040 <IsDigit@plt>
test   %rax,%rax
je     1135 <DigitVal+0x15>
movzbl %bl,%eax
add    $0xffffffd0,%eax
pop    %rbx
ret
movzbl %bl,%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    $0xffffffc9,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @DigitVal(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @IsDigit(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %17
11: ; preds = %1
%12 = load i8, i8* %3
%13 = call signext i8 @toupper(i8 zeroext %12)
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 65
%16 = add nsw i32 %15, 10
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @DigitVal(i8 zeroext %0) {
%2 = tail call i64 @IsDigit(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = zext i8 %0 to i32
%6 = add nsw i32 %5, -48
br label %11
7: ; preds = %1
%8 = tail call signext i8 @toupper(i8 zeroext %0)
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, -55
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ %6, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printerror(char *);
void Usage() {
  printerror("argument syntax error\n./hw2 stream -p=pphrase -l=len\n./hw2 "
             "encrypt -p=pphrase -out=name [pbmfile]\n./hw2 merge pbmfile1 "
             "pbmfile2\n./hw2 decrypt [pbmfile]");
}


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

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

LLVM IR (-O0):
@.str = [152 x i8] c"argument syntax error\0A./hw2 stream -p=pphrase -l=len\0A./hw2 encrypt -p=pphrase -out=name [pbmfile]\0A./hw2 merge pbmfile1 pbmfile2\0A./hw2 decrypt [pbmfile]\00"
define void @Usage() {
%1 = call i32 @printerror(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [152 x i8] c"argument syntax error\0A./hw2 stream -p=pphrase -l=len\0A./hw2 encrypt -p=pphrase -out=name [pbmfile]\0A./hw2 merge pbmfile1 pbmfile2\0A./hw2 decrypt [pbmfile]\00"
define void @Usage() {
%1 = tail call i32 @printerror(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str, i64 0, i64 0))
ret void
}