xunge/DecIR huggingface dataset:
void baz(void) {}


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

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

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

LLVM IR (-O2):
define void @baz() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_getpid;
int /*<<< orphan*/ __NR_kill;
int /*<<< orphan*/ syscall_0(int /*<<< orphan*/);
scalar_t__ syscall_2(int /*<<< orphan*/, int /*<<< orphan*/, int);
int __attribute__((used)) raise(int sig) {
  return (int)syscall_2(__NR_kill, syscall_0(__NR_getpid), sig);
}


x86 assembly (clang, -O0):
<raise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <syscall_0@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
mov    -0x4(%rbp),%edx
call   1030 <syscall_2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raise>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eac(%rip),%rax
mov    (%rax),%ebp
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <syscall_0@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <syscall_2@plt>

LLVM IR (-O0):
@__NR_kill = global i32 0
@__NR_getpid = global i32 0
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32)* @raise to i8*)], section "llvm.metadata"
define i32 @raise(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @__NR_kill
%4 = load i32, i32* @__NR_getpid
%5 = call i32 @syscall_0(i32 %4)
%6 = load i32, i32* %2
%7 = call i64 @syscall_2(i32 %3, i32 %5, i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@__NR_kill = global i32 0
@__NR_getpid = global i32 0
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32)* @raise to i8*)], section "llvm.metadata"
define i32 @raise(i32 %0) {
%2 = load i32, i32* @__NR_kill
%3 = load i32, i32* @__NR_getpid
%4 = tail call i32 @syscall_0(i32 %3)
%5 = tail call i64 @syscall_2(i32 %2, i32 %4, i32 %0)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ **calloc(int, int);
int /*<<< orphan*/ log_fatal(char *, char *);
uint8_t **pbm_init(void) {
  uint8_t **retv = calloc(0x10000, sizeof(void *));
  if (!retv) {
    log_fatal("pbm", "unable to allocate "
                     "memory for base page table");
  }
  return retv;
}


x86 assembly (clang, -O0):
<pbm_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10000,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1159 <pbm_init+0x39>
lea    0xeb3(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1040 <log_fatal@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbm_init>:
push   %rbx
mov    $0x10000,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <pbm_init+0x2b>
lea    0xec1(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1040 <log_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"pbm\00"
@.str.1 = [46 x i8] c"unable to allocate memory for base page table\00"
define i32** @pbm_init() {
%1 = alloca i32**
%2 = call i32** @calloc(i32 65536, i32 8)
store i32** %2, i32*** %1
%3 = load i32**, i32*** %1
%4 = icmp ne i32** %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @log_fatal(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32**, i32*** %1
ret i32** %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"pbm\00"
@.str.1 = [46 x i8] c"unable to allocate memory for base page table\00"
define noalias i32** @pbm_init() {
%1 = tail call i32** @calloc(i32 65536, i32 8)
%2 = icmp eq i32** %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @log_fatal(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32** %1
}
void gtk_style_render_icon() {}


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

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

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

LLVM IR (-O2):
define void @gtk_style_render_icon() {
ret void
}
int hex(int c) {
  return ((c >= 'a') && (c <= 'f'))   ? c - 'a' + 10
         : ((c >= '0') && (c <= '9')) ? c - '0'
         : ((c >= 'A') && (c <= 'F')) ? c - 'A' + 10
                                      : -1;
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     112c <hex+0x2c>
cmpl   $0x66,-0x4(%rbp)
jg     112c <hex+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    118c <hex+0x8c>
cmpl   $0x30,-0x4(%rbp)
jl     114e <hex+0x4e>
cmpl   $0x39,-0x4(%rbp)
jg     114e <hex+0x4e>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1186 <hex+0x86>
cmpl   $0x41,-0x4(%rbp)
jl     1173 <hex+0x73>
cmpl   $0x46,-0x4(%rbp)
jg     1173 <hex+0x73>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x10(%rbp)
jmp    1180 <hex+0x80>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1180 <hex+0x80>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     110e <hex+0xe>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <hex+0x27>
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 102
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 10
br label %36
12: ; preds = %5, %1
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 48
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 57
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 48
br label %34
21: ; preds = %15, %12
%22 = load i32, i32* %2
%23 = icmp sge i32 %22, 65
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp sle i32 %25, 70
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load i32, i32* %2
%29 = sub nsw i32 %28, 65
%30 = add nsw i32 %29, 10
br label %32
31: ; preds = %24, %21
br label %32
32: ; preds = %31, %27
%33 = phi i32 [ %30, %27 ], [ -1, %31 ]
br label %34
34: ; preds = %32, %18
%35 = phi i32 [ %20, %18 ], [ %33, %32 ]
br label %36
36: ; preds = %34, %8
%37 = phi i32 [ %11, %8 ], [ %35, %34 ]
ret i32 %37
}

LLVM IR (-O2):
define i32 @hex(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nsw i32 %0, -87
br label %14
6: ; preds = %1
%7 = add i32 %0, -48
%8 = icmp ult i32 %7, 10
br i1 %8, label %14, label %9
9: ; preds = %6
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %6, %9, %4
%15 = phi i32 [ %5, %4 ], [ %13, %9 ], [ %7, %6 ]
ret i32 %15
}
/* Type definitions */
struct ship {
  int dummy;
};

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


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

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

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

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_ta(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 27, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello world\n");
  return (EXIT_SUCCESS);
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ ottery_memset_volatile_(char *, int /*<<< orphan*/, int);
void ottery_wipe_stack_(void) {
  char buf[512];
  ottery_memset_volatile_(buf, 0, sizeof(buf));
}


x86 assembly (clang, -O0):
<ottery_wipe_stack_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1030 <ottery_memset_volatile_@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ottery_wipe_stack_>:
sub    $0x208,%rsp
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1030 <ottery_memset_volatile_@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
define void @ottery_wipe_stack_() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @ottery_memset_volatile_(i8* %2, i32 0, i32 512)
ret void
}

LLVM IR (-O2):
define void @ottery_wipe_stack_() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @ottery_memset_volatile_(i8* %2, i32 0, i32 512)
ret void
}
int __test_bit(int idx, unsigned long *bmap) {
  unsigned long mask = (1UL << ((idx) % 32));
  unsigned long *p = ((unsigned long *)bmap) + ((idx) / 32);
  return *p & mask;
}


x86 assembly (clang, -O0):
<__test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
and    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__test_bit>:
mov    %edi,%ecx
lea    0x1f(%rcx),%edx
test   %edi,%edi
cmovns %edi,%edx
mov    %edx,%eax
and    $0xffffffe0,%eax
sub    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sar    $0x5,%edx
movslq %edx,%rcx
and    (%rsi,%rcx,8),%eax
ret

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

LLVM IR (-O2):
define i32 @__test_bit(i32 %0, i64* nocapture %1) {
%3 = srem i32 %0, 32
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = sdiv i32 %0, 32
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %5
%11 = trunc i64 %10 to i32
ret i32 %11
}
void unsigned_char_rem_signed_char_signed_char(unsigned char *LHS,
                                               signed char RHS) {
  (*LHS) %= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_rem_signed_char_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzbl (%rax),%eax
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %dl,%cl
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_rem_signed_char_signed_char>:
movzbl (%rdi),%eax
xor    %edx,%edx
idiv   %si
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_rem_signed_char_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = srem i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_rem_signed_char_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i16
%5 = sext i8 %1 to i16
%6 = srem i16 %4, %5
%7 = trunc i16 %6 to i8
store i8 %7, i8* %0
ret void
}
void g_value_dup_param() {}


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

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

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

LLVM IR (-O2):
define void @g_value_dup_param() {
ret void
}
int lsv(unsigned int a, unsigned int b) { return (a >> b) != 0; }


x86 assembly (clang, -O0):
<lsv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsv>:
mov    %esi,%ecx
shr    %cl,%edi
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @lsv(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 = lshr i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @lsv(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct result {
  int dummy;
};

/* Variables and functions */
double errCompute(struct result *, int, int, int);
double fabs(double);
double errComputeDiff(struct result *r, int size, struct result *rx,
                      int sizex) {
  double score = errCompute(r, size, sizex, 2);
  double scorex = errCompute(rx, sizex, size, 0);
  return fabs(score - scorex);
}


x86 assembly (clang, -O0):
<errComputeDiff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    $0x2,%ecx
call   1030 <errCompute@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
call   1030 <errCompute@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movaps 0xe9a(%rip),%xmm1
pand   %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errComputeDiff>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%ebx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %ecx,%edx
mov    $0x2,%ecx
call   1030 <errCompute@plt>
movapd %xmm0,(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
call   1030 <errCompute@plt>
movapd (%rsp),%xmm1
subsd  %xmm0,%xmm1
andpd  0xeb1(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.result = type { i32 }
define double @errComputeDiff(%struct.result* %0, i32 %1, %struct.result* %2, i32 %3) {
%5 = alloca %struct.result*
%6 = alloca i32
%7 = alloca %struct.result*
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store %struct.result* %0, %struct.result** %5
store i32 %1, i32* %6
store %struct.result* %2, %struct.result** %7
store i32 %3, i32* %8
%11 = load %struct.result*, %struct.result** %5
%12 = load i32, i32* %6
%13 = load i32, i32* %8
%14 = call double @errCompute(%struct.result* %11, i32 %12, i32 %13, i32 2)
store double %14, double* %9
%15 = load %struct.result*, %struct.result** %7
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = call double @errCompute(%struct.result* %15, i32 %16, i32 %17, i32 0)
store double %18, double* %10
%19 = load double, double* %9
%20 = load double, double* %10
%21 = fsub double %19, %20
%22 = call double @llvm.fabs.f64(double %21)
ret double %22
}

LLVM IR (-O2):
%struct.result = type { i32 }
define double @errComputeDiff(%struct.result* %0, i32 %1, %struct.result* %2, i32 %3) {
%5 = tail call double @errCompute(%struct.result* %0, i32 %1, i32 %3, i32 2)
%6 = tail call double @errCompute(%struct.result* %2, i32 %3, i32 %1, i32 0)
%7 = fsub double %5, %6
%8 = tail call double @llvm.fabs.f64(double %7)
ret double %8
}
/* Variables and functions */
int scm_page_col(long long);
long long scm_page_index(int /*<<< orphan*/, scalar_t__, int, int);
scalar_t__ scm_page_level(long long);
int /*<<< orphan*/ scm_page_root(long long);
int scm_page_row(long long);
long long scm_page_parent(long long i) {
  return scm_page_index(scm_page_root(i), scm_page_level(i) - 1,
                        scm_page_row(i) / 2, scm_page_col(i) / 2);
}


x86 assembly (clang, -O0):
<scm_page_parent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <scm_page_root@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <scm_page_level@plt>
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <scm_page_row@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <scm_page_col@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
call   1040 <scm_page_index@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scm_page_parent>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <scm_page_root@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1050 <scm_page_level@plt>
lea    -0x1(%rax),%r15
mov    %rbx,%rdi
call   1060 <scm_page_row@plt>
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
mov    %rbx,%rdi
call   1070 <scm_page_col@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %r14d,%edi
mov    %r15,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <scm_page_index@plt>

LLVM IR (-O0):
define i64 @scm_page_parent(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @scm_page_root(i64 %3)
%5 = load i64, i64* %2
%6 = call i64 @scm_page_level(i64 %5)
%7 = sub nsw i64 %6, 1
%8 = load i64, i64* %2
%9 = call i32 @scm_page_row(i64 %8)
%10 = sdiv i32 %9, 2
%11 = load i64, i64* %2
%12 = call i32 @scm_page_col(i64 %11)
%13 = sdiv i32 %12, 2
%14 = call i64 @scm_page_index(i32 %4, i64 %7, i32 %10, i32 %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @scm_page_parent(i64 %0) {
%2 = tail call i32 @scm_page_root(i64 %0)
%3 = tail call i64 @scm_page_level(i64 %0)
%4 = add nsw i64 %3, -1
%5 = tail call i32 @scm_page_row(i64 %0)
%6 = sdiv i32 %5, 2
%7 = tail call i32 @scm_page_col(i64 %0)
%8 = sdiv i32 %7, 2
%9 = tail call i64 @scm_page_index(i32 %2, i64 %4, i32 %6, i32 %8)
ret i64 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glEnableClientState(int /*<<< orphan*/);
void EnableClientState(GLenum cap) { glEnableClientState(cap); }


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

x86 assembly (clang, -O2):
<EnableClientState>:
jmp    1030 <glEnableClientState@plt>

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

LLVM IR (-O2):
define void @EnableClientState(i32 %0) {
%2 = tail call i32 @glEnableClientState(i32 %0)
ret void
}
int pgdb_minor_version(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @pgdb_minor_version() {
ret i32 -1
}
void __attribute__((__warning__(
    "curl_easy_setopt expects a struct curl_slist* argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_curl_slist(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_curl_slist() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
submenu_reserva(void) {
  puts("\t\t\t\t\tRESERVAS\n");
  puts("1. ..........");
  puts("2. ..........");
  puts("3. ..........");
  printf("Opcion: ");
}


x86 assembly (clang, -O0):
<submenu_reserva>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submenu_reserva>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\09\09\09\09\09RESERVAS\0A\00"
@.str.1 = [14 x i8] c"1. ..........\00"
@.str.2 = [14 x i8] c"2. ..........\00"
@.str.3 = [14 x i8] c"3. ..........\00"
@.str.4 = [9 x i8] c"Opcion: \00"
define i32 @submenu_reserva() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"\09\09\09\09\09RESERVAS\0A\00"
@.str.1 = [14 x i8] c"1. ..........\00"
@.str.2 = [14 x i8] c"2. ..........\00"
@.str.3 = [14 x i8] c"3. ..........\00"
@.str.4 = [9 x i8] c"Opcion: \00"
define i32 @submenu_reserva() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret i32 undef
}
char *stpcpy(char *dst, const char *src) {
  char *q = dst;
  const char *p = src;
  char ch;
  for (;;) {
    *q = ch = *p++;
    if (!ch)
      break;
    q++;
  }
  return q;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%cl
mov    %cl,-0x21(%rbp)
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
cmpb   $0x0,-0x21(%rbp)
jne    1145 <stpcpy+0x45>
jmp    1156 <stpcpy+0x56>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111c <stpcpy+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     1122 <stpcpy+0x22>
add    $0x1,%rsi
nop
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %0, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %8
store i8 %10, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i8* [ %0, %2 ], [ %9, %5 ]
ret i8* %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ modem_db_get_info(char const *, char const *,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
int modem_is_supported(const char *vendor, const char *product,
                       uint16_t vendor_id, uint16_t product_id) {
  return (!!modem_db_get_info(vendor, product, vendor_id, product_id));
}


x86 assembly (clang, -O0):
<modem_is_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <modem_db_get_info@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modem_is_supported>:
push   %rax
call   1030 <modem_db_get_info@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @modem_is_supported(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @modem_db_get_info(i8* %9, i8* %10, i32 %11, i32 %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @modem_is_supported(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @modem_db_get_info(i8* %0, i8* %1, i32 %2, i32 %3)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void swap(long long *a, long long *b) {
  long long t = *a;
  *a = *b;
  *b = t;
}


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

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

LLVM IR (-O0):
define void @swap(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
store i64 %7, i64* %5
%8 = load i64*, i64** %4
%9 = load i64, i64* %8
%10 = load i64*, i64** %3
store i64 %9, i64* %10
%11 = load i64, i64* %5
%12 = load i64*, i64** %4
store i64 %11, i64* %12
ret void
}

LLVM IR (-O2):
define void @swap(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
store i64 %4, i64* %0
store i64 %3, i64* %1
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ srand(int);
int getrand(void) {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) != 0) {
    printf("Error getting time\n");
  }
  srand(tv.tv_sec * rand());
  return rand();
}


x86 assembly (clang, -O0):
<getrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
cmp    $0x0,%rax
je     116b <getrand+0x2b>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0xc(%rbp),%edi
imul   %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrand>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
test   %rax,%rax
je     1162 <getrand+0x22>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%ebx
xor    %eax,%eax
call   1060 <rand@plt>
imul   %eax,%ebx
mov    %ebx,%edi
call   1050 <srand@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1060 <rand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [20 x i8] c"Error getting time\0A\00"
define i32 @getrand() {
%1 = alloca %struct.timeval
%2 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 (...) @rand()
%10 = mul nsw i32 %8, %9
%11 = call i32 @srand(i32 %10)
%12 = call i32 (...) @rand()
ret i32 %12
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@str = [19 x i8] c"Error getting time\00"
define i32 @getrand() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i32 (...) @rand()
%11 = mul nsw i32 %10, %9
%12 = tail call i32 @srand(i32 %11)
%13 = tail call i32 (...) @rand()
ret i32 %13
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ selection(int *, int);
int main() {
  int *a;
  int N = __VERIFIER_nondet_int();
  selection(a, N);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%esi
call   1030 <selection@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* %3
%5 = load i32*, i32** %2
%6 = load i32, i32* %3
%7 = call i32 @selection(i32* %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @selection(i32* undef, i32 %1)
ret i32 0
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int);
extern struct SN_env *english_UTF_8_create_env(void) {
  return SN_create_env(0, 2, 1);
}


x86 assembly (clang, -O0):
<english_UTF_8_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<english_UTF_8_create_env>:
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @english_UTF_8_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 1)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @english_UTF_8_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 2, i32 1)
ret %struct.SN_env* %1
}
void XMDRIV(ifunc, rbuf, nbuf, chr, lchr, mode, w_ifunc, w_rbuf, w_nbuf, w_chr,
            w_lchr, w_mode) int *ifunc;
float *rbuf;
int *nbuf;
char *chr;
int *lchr;
int w_ifunc, w_rbuf, w_nbuf, w_chr, w_lchr, w_mode;
{
  xmdriv_(ifunc, rbuf, nbuf, chr, lchr, mode, w_chr);
  return;
}


x86 assembly (clang, -O0):
<XMDRIV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x28(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <xmdriv_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XMDRIV>:
push   %rax
mov    0x28(%rsp),%eax
mov    %eax,(%rsp)
xor    %eax,%eax
call   1030 <xmdriv_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @XMDRIV(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca i32*
%14 = alloca float*
%15 = alloca i32*
%16 = alloca i8*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32* %0, i32** %13
store float* %1, float** %14
store i32* %2, i32** %15
store i8* %3, i8** %16
store i32* %4, i32** %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
%25 = load i32*, i32** %13
%26 = load float*, float** %14
%27 = load i32*, i32** %15
%28 = load i8*, i8** %16
%29 = load i32*, i32** %17
%30 = load i32, i32* %18
%31 = load i32, i32* %22
%32 = call i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @xmdriv_ to i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...)*)(i32* %25, float* %26, i32* %27, i8* %28, i32* %29, i32 %30, i32 %31)
ret void
}

LLVM IR (-O2):
define void @XMDRIV(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = tail call i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @xmdriv_ to i32 (i32*, float*, i32*, i8*, i32*, i32, i32, ...)*)(i32* %0, float* %1, i32* %2, i8* %3, i32* %4, i32 %5, i32 %9)
ret void
}
double sqv(double x) { return (x * x); }


x86 assembly (clang, -O0):
<sqv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqv>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @sqv(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @sqv(double %0) {
%2 = fmul double %0, %0
ret double %2
}
int install_bt_handler(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @install_bt_handler() {
ret i32 0
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int b_magenta() { return fputs("[45m", stdout); }


x86 assembly (clang, -O0):
<b_magenta>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_magenta>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[45m\00"
@stdout = global i32 0
define i32 @b_magenta() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[45m\00"
@stdout = global i32 0
define i32 @b_magenta() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void msleep(int msecs) { usleep(msecs * 1000); }


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

x86 assembly (clang, -O2):
<msleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Type definitions */
struct session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ socket_printf(struct session *, int, char *, int, int, int);
int /*<<< orphan*/ telopt_debug(struct session *, char *);
int send_wont_status(struct session *ses, int cplen, unsigned char *cpsrc) {
  socket_printf(ses, 3, "%c%c%c", 255, 252, 5);
  telopt_debug(ses, "SENT IAC WONT STATUS");
  return 3;
}


x86 assembly (clang, -O0):
<send_wont_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
lea    0xebd(%rip),%rdx
mov    $0xff,%ecx
mov    $0xfc,%r8d
mov    $0x5,%r9d
call   1040 <socket_printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_wont_status>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdx
mov    $0x3,%esi
mov    $0xff,%ecx
mov    $0xfc,%r8d
mov    $0x5,%r9d
call   1040 <socket_printf@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <telopt_debug@plt>
mov    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [21 x i8] c"SENT IAC WONT STATUS\00"
define i32 @send_wont_status(%struct.session* %0, i32 %1, i8* %2) {
%4 = alloca %struct.session*
%5 = alloca i32
%6 = alloca i8*
store %struct.session* %0, %struct.session** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.session*, %struct.session** %4
%8 = call i32 @socket_printf(%struct.session* %7, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 252, i32 5)
%9 = load %struct.session*, %struct.session** %4
%10 = call i32 @telopt_debug(%struct.session* %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}

LLVM IR (-O2):
%struct.session = type { i32 }
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [21 x i8] c"SENT IAC WONT STATUS\00"
define i32 @send_wont_status(%struct.session* %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @socket_printf(%struct.session* %0, i32 3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 255, i32 252, i32 5)
%5 = tail call i32 @telopt_debug(%struct.session* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 3
}
long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem, struct zone *zone,
                                    int priority) {
  return 0;
}


x86 assembly (clang, -O0):
<mem_cgroup_calc_reclaim_active>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mem_cgroup = type opaque
%struct.zone = type opaque
define i64 @mem_cgroup_calc_reclaim_active(%struct.mem_cgroup* %0, %struct.zone* %1, i32 %2) {
%4 = alloca %struct.mem_cgroup*
%5 = alloca %struct.zone*
%6 = alloca i32
store %struct.mem_cgroup* %0, %struct.mem_cgroup** %4
store %struct.zone* %1, %struct.zone** %5
store i32 %2, i32* %6
ret i64 0
}

LLVM IR (-O2):
%struct.mem_cgroup = type opaque
%struct.zone = type opaque
define i64 @mem_cgroup_calc_reclaim_active(%struct.mem_cgroup* nocapture readnone %0, %struct.zone* nocapture readnone %1, i32 %2) {
ret i64 0
}
int test_imm_9Cint8_mem(signed char *val) {
  return ((*val) & (-0x9C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Cint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff64,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -156
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Type definitions */
struct _pthread_cleanup_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void _pthread_cleanup_pop(struct _pthread_cleanup_buffer *__buffer,
                          int __execute) {
  assert(0);
}


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

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

LLVM IR (-O0):
%struct._pthread_cleanup_buffer = type { i32 }
define void @_pthread_cleanup_pop(%struct._pthread_cleanup_buffer* %0, i32 %1) {
%3 = alloca %struct._pthread_cleanup_buffer*
%4 = alloca i32
store %struct._pthread_cleanup_buffer* %0, %struct._pthread_cleanup_buffer** %3
store i32 %1, i32* %4
%5 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
%struct._pthread_cleanup_buffer = type { i32 }
define void @_pthread_cleanup_pop(%struct._pthread_cleanup_buffer* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @assert(i32 0)
ret void
}
int TrustMe(int returnaddr1, const char *path, char *const argv[],
            char *const envp[]) {
  int immx = 0x0000340f;
  int codeaddr = (int)TrustMe + 14;
  asm("mov   $59, %eax");
  asm("add   $32, %esp");
  asm("mov   %esp, %ecx");
  asm("jmp   *-20(%ecx)");
}


x86 assembly (clang, -O0):
<TrustMe>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x340f,-0x24(%rbp)
mov    0x2ebf(%rip),%rax
add    $0xe,%eax
mov    %eax,-0x28(%rbp)
mov    $0x3b,%eax
add    $0x20,%esp
mov    %esp,%ecx
jmp    *-0x14(%ecx)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TrustMe>:
mov    $0x3b,%eax
add    $0x20,%esp
mov    %esp,%ecx
jmp    *-0x14(%ecx)
ret

LLVM IR (-O0):
define i32 @TrustMe(i32 %0, i8* %1, i8** %2, i8** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
store i32 13327, i32* %10
store i32 add nsw (i32 ptrtoint (i32 (i32, i8*, i8**, i8**)* @TrustMe to i32), i32 14), i32* %11
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @TrustMe(i32 %0, i8* nocapture readnone %1, i8** nocapture readnone %2, i8** nocapture readnone %3) {
tail call void asm sideeffect "mov $$59, %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "add $$32, %esp", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "mov %esp, %ecx", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "jmp *-20(%ecx)", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ OHM_INFO(char *, int);
void console_closed(int id) { OHM_INFO("console 0x%x closed", id); }


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

x86 assembly (clang, -O2):
<console_closed>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <OHM_INFO@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"console 0x%x closed\00"
define void @console_closed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @OHM_INFO(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"console 0x%x closed\00"
define void @console_closed(i32 %0) {
%2 = tail call i32 @OHM_INFO(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}