xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int hd_part(FILE *f) {
  static int count = 0;
  if (!count++)
    printf("No header has been defined for the part table\n");
  return (0);
}


x86 assembly (clang, -O0):
<hd_part>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2f0a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2eff(%rip)
cmp    $0x0,%eax
jne    1142 <hd_part+0x32>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd_part>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0c(%rip)
test   %eax,%eax
jne    1130 <hd_part+0x20>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@hd_part.count = internal global i32 0
@.str = [47 x i8] c"No header has been defined for the part table\0A\00"
define i32 @hd_part(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @hd_part.count
%4 = add nsw i32 %3, 1
store i32 %4, i32* @hd_part.count
%5 = icmp ne i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i32 0
}

LLVM IR (-O2):
@hd_part.count = internal unnamed_addr global i32 0
@str = [46 x i8] c"No header has been defined for the part table\00"
define i32 @hd_part(i32* nocapture readnone %0) {
%2 = load i32, i32* @hd_part.count
%3 = add nsw i32 %2, 1
store i32 %3, i32* @hd_part.count
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MD5(unsigned char *, int, unsigned char *);
unsigned short carbon_hashpos(const char *key, const char *end) {
  unsigned char md5[16];
  MD5((unsigned char *)key, end - key, md5);
  return ((md5[0] << 8) + md5[1]);
}


x86 assembly (clang, -O0):
<carbon_hashpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
lea    -0x20(%rbp),%rdx
call   1030 <MD5@plt>
movzbl -0x20(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1f(%rbp),%ecx
add    %ecx,%eax
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carbon_hashpos>:
sub    $0x18,%rsp
sub    %edi,%esi
mov    %rsp,%rdx
call   1030 <MD5@plt>
movzwl (%rsp),%eax
rol    $0x8,%ax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define zeroext i16 @carbon_hashpos(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%14 = call i32 @MD5(i8* %6, i32 %12, i8* %13)
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 1
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = add nsw i32 %18, %21
%23 = trunc i32 %22 to i16
ret i16 %23
}

LLVM IR (-O2):
define zeroext i16 @carbon_hashpos(i8* %0, i8* %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = call i32 @MD5(i8* %0, i32 %8, i8* %4)
%10 = load i8, i8* %4
%11 = zext i8 %10 to i16
%12 = shl nuw i16 %11, 8
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i16
%16 = or i16 %12, %15
ret i16 %16
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ rdtsc();
void job_body(uint64_t n) {
  uint64_t cnt, t0, t;
  cnt = 0;
  t = t0 = rdtsc();
  while (cnt < n) {
    t = rdtsc();
    t = t - t0;
    cnt++;
  }
}


x86 assembly (clang, -O0):
<job_body>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %rax,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1169 <job_body+0x59>
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1133 <job_body+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<job_body>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <rdtsc@plt>
test   %rbx,%rbx
jle    112d <job_body+0x1d>
xor    %eax,%eax
call   1030 <rdtsc@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <job_body+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @job_body(i64 %0) {
%2 = tail call i64 (...) @rdtsc()
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i64 (...) @rdtsc()
%7 = add nuw nsw i64 %5, 1
%8 = icmp eq i64 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
int gtm_isanlp(int file_des) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @gtm_isanlp(i32 %0) {
ret i32 0
}
void __attribute__((ms_abi)) f4(int a, ...) {
  __builtin_ms_va_list ap;
  __builtin_ms_va_start(ap, a);
  int b = __builtin_va_arg(ap, int);
  __builtin_ms_va_list ap2;
  __builtin_ms_va_copy(ap2, ap);
  __builtin_ms_va_end(ap);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r9,0x28(%rbp)
mov    %r8,0x20(%rbp)
mov    %rdx,0x18(%rbp)
mov    %ecx,-0x4(%rbp)
lea    0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rax
mov    %rdx,0x18(%rsp)
mov    %r8,0x20(%rsp)
mov    %r9,0x28(%rsp)
pop    %rax
ret

LLVM IR (-O0):
define win64cc void @f4(i32 %0, ...) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %2
%6 = bitcast i8** %3 to i8*
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 8
store i8* %8, i8** %3
%9 = bitcast i8* %7 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %4
%11 = load i8*, i8** %3
store i8* %11, i8** %5
%12 = bitcast i8** %3 to i8*
ret void
}

LLVM IR (-O2):
define win64cc void @f4(i32 %0, ...) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 8
store i8* %5, i8** %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __aeabi_memset4_impl(void *, size_t, int /*<<< orphan*/);
void __attribute__((weak)) __aeabi_memclr4_impl(void *dest, size_t n) {
  __aeabi_memset4_impl(dest, n, 0);
}


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

x86 assembly (clang, -O2):
<__aeabi_memclr4_impl>:
xor    %edx,%edx
jmp    1030 <__aeabi_memset4_impl@plt>

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

LLVM IR (-O2):
define weak void @__aeabi_memclr4_impl(i8* %0, i64 %1) {
%3 = tail call i32 @__aeabi_memset4_impl(i8* %0, i64 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void at_signal(int signum) { exit(signum); }


x86 assembly (clang, -O0):
<at_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<at_signal>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @at_signal(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
int GetStats(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @GetStats() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ESPIPE;
int /*<<< orphan*/ errno;
off_t lseek(int fd, off_t offset, int whence) {
  (void)fd;
  (void)offset;
  (void)whence;
  errno = ESPIPE;
  return ((off_t)-1);
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ed4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebb(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @ESPIPE
store i32 %10, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ESPIPE
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __exit(int);
int /*<<< orphan*/ __getpid();
int /*<<< orphan*/ __kill(int /*<<< orphan*/, int, int /*<<< orphan*/);
void __attribute__((noreturn, cold)) abort(void) {
  (void)__kill(__getpid(), 6, 0);
  __exit(1);
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__getpid@plt>
mov    %eax,%edi
mov    $0x6,%esi
xor    %edx,%edx
call   1050 <__kill@plt>
mov    $0x1,%edi
call   1030 <__exit@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
xor    %eax,%eax
call   1040 <__getpid@plt>
mov    %eax,%edi
mov    $0x6,%esi
xor    %edx,%edx
call   1050 <__kill@plt>
mov    $0x1,%edi
call   1030 <__exit@plt>

LLVM IR (-O0):
define void @abort() {
%1 = call i32 (...) @__getpid()
%2 = call i32 @__kill(i32 %1, i32 6, i32 0)
%3 = call i32 @__exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @abort() {
%1 = tail call i32 (...) @__getpid()
%2 = tail call i32 @__kill(i32 %1, i32 6, i32 0)
%3 = tail call i32 @__exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ send_req(int, int, int, int);
int u_reset_stats(int fd, char **argv) {
  argv = argv;
  send_req(fd, 0x00, 0x02, 1);
  send_req(fd, 0x00, 0, 1);
  return 0;
}


x86 assembly (clang, -O0):
<u_reset_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <send_req@plt>
mov    -0x4(%rbp),%edi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1030 <send_req@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_reset_stats>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <send_req@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <send_req@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @u_reset_stats(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
store i8** %5, i8*** %4
%6 = load i32, i32* %3
%7 = call i32 @send_req(i32 %6, i32 0, i32 2, i32 1)
%8 = load i32, i32* %3
%9 = call i32 @send_req(i32 %8, i32 0, i32 0, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @u_reset_stats(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @send_req(i32 %0, i32 0, i32 2, i32 1)
%4 = tail call i32 @send_req(i32 %0, i32 0, i32 0, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char const);
void uart_puts(const char *str) {
  while (*str) {
    uart_putc(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <uart_puts+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <uart_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <uart_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <uart_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @uart_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @uart_putc(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @uart_putc(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_quaddobl_multi_affinization(int m) {
  int fail, b;
  double c;
  fail = _ada_use_c2phc4c(909, &m, &b, &c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_quaddobl_multi_affinization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x38d,%edi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_quaddobl_multi_affinization>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    $0x38d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @syscon_quaddobl_multi_affinization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %2
%6 = call i32 @_ada_use_c2phc4c(i32 909, i32* %2, i32* %4, double* %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @syscon_quaddobl_multi_affinization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
%5 = bitcast i32* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @_ada_use_c2phc4c(i32 909, i32* %2, i32* %3, double* %4, i32 0)
ret i32 %7
}
/* Variables and functions */
int d15(int);
int d16(int a) { return d15(d15(a)); }


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

x86 assembly (clang, -O2):
<d16>:
push   %rax
call   1030 <d15@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d15@plt>

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

LLVM IR (-O2):
define i32 @d16(i32 %0) {
%2 = tail call i32 @d15(i32 %0)
%3 = tail call i32 @d15(i32 %2)
ret i32 %3
}
void *retNull() { return 0; }


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

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

LLVM IR (-O0):
define i8* @retNull() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @retNull() {
ret i8* null
}
/* Variables and functions */
void *to_str(char const *, size_t *);
void *str_to_voidp(const char *data, size_t *dsize) {
  void *retval = NULL;
  if (data == NULL || dsize == NULL) {
    return NULL;
  }
  retval = to_str(data, dsize);
  return retval;
}


x86 assembly (clang, -O0):
<str_to_voidp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113e <str_to_voidp+0x2e>
cmpq   $0x0,-0x18(%rbp)
jne    114b <str_to_voidp+0x3b>
movq   $0x0,-0x8(%rbp)
jmp    1164 <str_to_voidp+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <to_str@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_voidp>:
test   %rdi,%rdi
je     111f <str_to_voidp+0xf>
test   %rsi,%rsi
je     111f <str_to_voidp+0xf>
jmp    1030 <to_str@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @str_to_voidp(i8* %0, i64* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i64* %1, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i8* @to_str(i8* %0, i64* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ null, %2 ]
ret i8* %9
}
void handle_PWR(sig) int sig;
{}


x86 assembly (clang, -O0):
<handle_PWR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @handle_PWR(i32 %0) {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR99_get(void) { return U_WMRCORENONE_get("U_WMR99"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR99\00"
define i32 @U_WMR99_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void set_bit(unsigned long *x, int n) {
  int r = n >> 5;
  unsigned long m = 1UL << (n & 31);
  x[r] |= m;
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    %esi,%eax
sar    $0x5,%eax
and    $0x1f,%cl
mov    $0x1,%edx
shl    %cl,%rdx
cltq
or     %rdx,(%rdi,%rax,8)
ret

LLVM IR (-O0):
define void @set_bit(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i64* %0, i64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 5
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 31
%11 = zext i32 %10 to i64
%12 = shl i64 1, %11
store i64 %12, i64* %6
%13 = load i64, i64* %6
%14 = load i64*, i64** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i64, i64* %14, i64 %16
%18 = load i64, i64* %17
%19 = or i64 %18, %13
store i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @set_bit(i64* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = and i32 %1, 31
%5 = zext i32 %4 to i64
%6 = shl nuw nsw i64 1, %5
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 %7
%9 = load i64, i64* %8
%10 = or i64 %9, %6
store i64 %10, i64* %8
ret void
}
/* Variables and functions */
scalar_t__ G();
void Y() {
  while (G() < 0)
    ;
}


x86 assembly (clang, -O0):
<Y>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <Y+0x9>
mov    $0x0,%al
call   1030 <G@plt>
cmp    $0x0,%rax
jge    112f <Y+0x1f>
jmp    1119 <Y+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Y>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <G@plt>
test   %rax,%rax
js     1120 <Y+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @Y() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @G()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @Y() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @G()
%3 = icmp slt i64 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_sec;
};

/* Variables and functions */
int _compare_time_if_less(struct timespec *a, struct timespec *b) {
  return a->tv_sec < b->tv_sec;
}


x86 assembly (clang, -O0):
<_compare_time_if_less>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_compare_time_if_less>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
setl   %al
ret

LLVM IR (-O0):
%struct.timespec = type { i64 }
define i32 @_compare_time_if_less(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = load %struct.timespec*, %struct.timespec** %4
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = icmp slt i64 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.timespec = type { i64 }
define i32 @_compare_time_if_less(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp slt i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void swap(unsigned int *a, unsigned int x, unsigned int y) {
  unsigned int t = a[x];
  a[x] = a[y];
  a[y] = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%ecx
mov    %edx,%edx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = zext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
int int_compare(void *vlocation1, void *vlocation2) {
  int *location1;
  int *location2;
  location1 = (int *)vlocation1;
  location2 = (int *)vlocation2;
  if (*location1 < *location2) {
    return -1;
  } else if (*location1 > *location2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<int_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    113a <int_compare+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <int_compare+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    1158 <int_compare+0x58>
movl   $0x1,-0x4(%rbp)
jmp    115f <int_compare+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_compare>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @int_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp sgt i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
struct msgu_buffer {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ep_buffer_peek(struct msgu_buffer *, char *,
                                  int /*<<< orphan*/, size_t);
int /*<<< orphan*/ ep_buffer_release(struct msgu_buffer *, int /*<<< orphan*/);
ssize_t msgu_buffer_read(struct msgu_buffer *b, char *outbuf, size_t count) {
  ssize_t s = ep_buffer_peek(b, outbuf, 0, count);
  ep_buffer_release(b, s);
  return s;
}


x86 assembly (clang, -O0):
<msgu_buffer_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
xor    %edx,%edx
call   1040 <ep_buffer_peek@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <ep_buffer_release@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgu_buffer_read>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rcx
mov    %rdi,%rbx
xor    %edx,%edx
call   1040 <ep_buffer_peek@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <ep_buffer_release@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.msgu_buffer = type { i32 }
define i32 @msgu_buffer_read(%struct.msgu_buffer* %0, i8* %1, i64 %2) {
%4 = alloca %struct.msgu_buffer*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store %struct.msgu_buffer* %0, %struct.msgu_buffer** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.msgu_buffer*, %struct.msgu_buffer** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @ep_buffer_peek(%struct.msgu_buffer* %8, i8* %9, i32 0, i64 %10)
store i32 %11, i32* %7
%12 = load %struct.msgu_buffer*, %struct.msgu_buffer** %4
%13 = load i32, i32* %7
%14 = call i32 @ep_buffer_release(%struct.msgu_buffer* %12, i32 %13)
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
%struct.msgu_buffer = type { i32 }
define i32 @msgu_buffer_read(%struct.msgu_buffer* %0, i8* %1, i64 %2) {
%4 = tail call i32 @ep_buffer_peek(%struct.msgu_buffer* %0, i8* %1, i32 0, i64 %2)
%5 = tail call i32 @ep_buffer_release(%struct.msgu_buffer* %0, i32 %4)
ret i32 %4
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *, ...);
void getter() {
  printf("Gimme letta: ");
  int c = getchar();
  printf("\n[%d] KTHBYE", c);
}


x86 assembly (clang, -O0):
<getter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getter>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Gimme letta: \00"
@.str.1 = [13 x i8] c"\0A[%d] KTHBYE\00"
define void @getter() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0) {
    x = x + y - 5;
    y = -2 * y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x8(%rbp)
imul   $0xfffffffe,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void Write_PWM(int output_servo, int value) {
  printf("Servo to write to: %d, Servo movement value %d", output_servo, value);
}


x86 assembly (clang, -O0):
<Write_PWM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write_PWM>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Servo to write to: %d, Servo movement value %d\00"
define void @Write_PWM(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 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Servo to write to: %d, Servo movement value %d\00"
define void @Write_PWM(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *DES_CreateKeySchedule(char *ks, const char *key) {
  memset(ks, 0, 0x80);
  return ks;
}


x86 assembly (clang, -O0):
<DES_CreateKeySchedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DES_CreateKeySchedule>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @DES_CreateKeySchedule(i8* returned %0, i8* nocapture readnone %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 128)
ret i8* %0
}
/* Variables and functions */
double _hypot(double, double);
double hypot(double x, double y) { return _hypot(x, y); }


x86 assembly (clang, -O0):
<hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <_hypot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypot>:
jmp    1030 <_hypot@plt>

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

LLVM IR (-O2):
define double @hypot(double %0, double %1) {
%3 = tail call double @_hypot(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, float);
void printTemp(const char *name, float value) {
  if (value == 0xFF)
    return;
  printf("T%s: %02.1f ", name, value);
}


x86 assembly (clang, -O0):
<printTemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xed2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1142 <printTemp+0x32>
jp     1142 <printTemp+0x32>
jmp    1157 <printTemp+0x47>
mov    -0x8(%rbp),%rsi
movss  -0xc(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTemp>:
ucomiss 0xee9(%rip),%xmm0
jne    111c <printTemp+0xc>
jp     111c <printTemp+0xc>
ret
mov    %rdi,%rsi
lea    0xede(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"T%s: %02.1f \00"
define void @printTemp(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = fcmp oeq float %5, 2.550000e+02
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9, float %10)
br label %12
12: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"T%s: %02.1f \00"
define void @printTemp(i8* %0, float %1) {
%3 = fcmp oeq float %1, 2.550000e+02
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, float %1)
br label %6
6: ; preds = %2, %4
ret void
}
/* Variables and functions */
char const *level_author();
const char *f_level_author() { return level_author(); }


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

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

LLVM IR (-O0):
define i8* @f_level_author() {
%1 = call i8* (...) @level_author()
ret i8* %1
}

LLVM IR (-O2):
define i8* @f_level_author() {
%1 = tail call i8* (...) @level_author()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ check(char const *, int, int);
void check_priv(const char *str) { check(str, false, true); }


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

x86 assembly (clang, -O2):
<check_priv>:
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <check@plt>

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

LLVM IR (-O2):
define void @check_priv(i8* %0) {
%2 = tail call i32 @check(i8* %0, i32 0, i32 1)
ret void
}
/* Variables and functions */
long double log(long double);
long double logl(long double a1) { return log(a1); }


x86 assembly (clang, -O0):
<logl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logl>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define x86_fp80 @logl(x86_fp80 %0) {
%2 = tail call x86_fp80 @log(x86_fp80 %0)
ret x86_fp80 %2
}
int main() {
  int a;
  a = 5;
  int b;
  b = 5;
  return a == b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 5, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
scalar_t__ arc4_seed_proc_sys_kernel_random_uuid();
scalar_t__ arc4_seed_urandom();
int arc4_seed(void) {
  int ok = 0;
  if (0 == arc4_seed_urandom())
    ok = 1;
  if (0 == arc4_seed_proc_sys_kernel_random_uuid())
    ok = 1;
  return ok ? 0 : -1;
}


x86 assembly (clang, -O0):
<arc4_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <arc4_seed_urandom@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    114b <arc4_seed+0x2b>
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1040 <arc4_seed_proc_sys_kernel_random_uuid@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1167 <arc4_seed+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc4_seed>:
push   %rbx
xor    %eax,%eax
call   1030 <arc4_seed_urandom@plt>
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1040 <arc4_seed_proc_sys_kernel_random_uuid@plt>
test   %rax,%rax
setne  %al
and    %bl,%al
movzbl %al,%eax
neg    %eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @arc4_seed() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @arc4_seed_urandom()
%3 = icmp eq i64 0, %2
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %5
5: ; preds = %4, %0
%6 = call i64 (...) @arc4_seed_proc_sys_kernel_random_uuid()
%7 = icmp eq i64 0, %6
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %9
9: ; preds = %8, %5
%10 = load i32, i32* %1
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 -1
ret i32 %13
}

LLVM IR (-O2):
define i32 @arc4_seed() {
%1 = tail call i64 (...) @arc4_seed_urandom()
%2 = icmp ne i64 %1, 0
%3 = tail call i64 (...) @arc4_seed_proc_sys_kernel_random_uuid()
%4 = icmp ne i64 %3, 0
%5 = select i1 %4, i1 %2, i1 false
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *p1, char *p2) { printf("%s %s\n", p1, p2); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
define void @g_error(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int auth_userdb_pre_common(char const *, char const *, int /*<<< orphan*/,
                           int (*)(struct authinfo *, void *), void *);
int auth_cram_pre(const char *userid, const char *service,
                  int (*callback)(struct authinfo *, void *), void *arg) {
  return (auth_userdb_pre_common(userid, service, 0, callback, arg));
}


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

x86 assembly (clang, -O2):
<auth_cram_pre>:
mov    %rcx,%r8
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <auth_userdb_pre_common@plt>

LLVM IR (-O0):
%struct.authinfo = type opaque
%struct.authinfo.0 = type opaque
define i32 @auth_cram_pre(i8* %0, i8* %1, i32 (%struct.authinfo*, i8*)* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32 (%struct.authinfo*, i8*)*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 (%struct.authinfo*, i8*)* %2, i32 (%struct.authinfo*, i8*)** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32 (%struct.authinfo*, i8*)*, i32 (%struct.authinfo*, i8*)** %7
%12 = bitcast i32 (%struct.authinfo*, i8*)* %11 to i32 (%struct.authinfo.0*, i8*)*
%13 = load i8*, i8** %8
%14 = call i32 @auth_userdb_pre_common(i8* %9, i8* %10, i32 0, i32 (%struct.authinfo.0*, i8*)* %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.authinfo = type opaque
%struct.authinfo.0 = type opaque
define i32 @auth_cram_pre(i8* %0, i8* %1, i32 (%struct.authinfo*, i8*)* %2, i8* %3) {
%5 = bitcast i32 (%struct.authinfo*, i8*)* %2 to i32 (%struct.authinfo.0*, i8*)*
%6 = tail call i32 @auth_userdb_pre_common(i8* %0, i8* %1, i32 0, i32 (%struct.authinfo.0*, i8*)* %5, i8* %3)
ret i32 %6
}