xunge/DecIR huggingface dataset:
char const *pubnub_uname(void) {
  return "FreeRTOS"
         "%2F"
         "8.2.1";
}


x86 assembly (clang, -O0):
<pubnub_uname>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pubnub_uname>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"FreeRTOS%2F8.2.1\00"
define i8* @pubnub_uname() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"FreeRTOS%2F8.2.1\00"
define i8* @pubnub_uname() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
int minimum(int a, int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <minimum+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <minimum+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @minimum(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @minimum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
char *dlerror() { return (char *)0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @dlerror() {
ret i8* null
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

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

/* Variables and functions */
unsigned long get_XEvent_xkey_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xkey.serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xkey_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void ff_hevc_put_hevc_uni_w_epel_v12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  extern int times();
  printf("%d", times());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <times@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @times()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
bool is_path_separator(int c) { return c == '/'; }


x86 assembly (clang, -O0):
<is_path_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2f,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_separator>:
xor    %eax,%eax
cmp    $0x2f,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_path_separator(i32 %0) {
%2 = icmp eq i32 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct queue *);
void queue_delete(struct queue *q) { free(q); }


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

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

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

LLVM IR (-O2):
%struct.queue = type { i32 }
define void @queue_delete(%struct.queue* nocapture %0) {
%2 = tail call i32 @free(%struct.queue* %0)
ret void
}
int array_cmp_int_asc(const void *a, const void *b) {
  return (*(int *)a - *(int *)b);
}


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

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

LLVM IR (-O0):
define i32 @array_cmp_int_asc(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @array_cmp_int_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprint_float(float, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_float(float f) { fprint_float(f, stdout); }


x86 assembly (clang, -O0):
<print_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <fprint_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_float>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprint_float@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load i32, i32* @stdout
%5 = call i32 @fprint_float(float %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_float(float %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprint_float(float %0, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ clken2();
int /*<<< orphan*/ printf(char *);
int main() {
  while (clken2())
    ;
  printf("stop\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clken2@plt>
cmp    $0x0,%rax
je     1145 <main+0x25>
jmp    112f <main+0xf>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <clken2@plt>
test   %rax,%rax
jne    1130 <main+0x10>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"stop\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %5, %0
%3 = call i64 (...) @clken2()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"stop\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @clken2()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int timespec_bigger(struct timespec const *, struct timespec const *);
int timespec_after(const struct timespec *a, const struct timespec *b) {
  return timespec_bigger(a, b);
}


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

x86 assembly (clang, -O2):
<timespec_after>:
jmp    1030 <timespec_bigger@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @timespec_after(%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 = load %struct.timespec*, %struct.timespec** %4
%7 = call i32 @timespec_bigger(%struct.timespec* %5, %struct.timespec* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @timespec_after(%struct.timespec* %0, %struct.timespec* %1) {
%3 = tail call i32 @timespec_bigger(%struct.timespec* %0, %struct.timespec* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _card_led_off();
void info_led_off() { _card_led_off(); }


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

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

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

LLVM IR (-O2):
define void @info_led_off() {
%1 = tail call i32 (...) @_card_led_off()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned int mfd_assert_get_seals(int);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, int);
void mfd_assert_has_seals(int fd, unsigned int seals) {
  unsigned int s;
  s = mfd_assert_get_seals(fd);
  if (s != seals) {
    printf("%u != %u = GET_SEALS(%d)\n", seals, s, fd);
    abort();
  }
}


x86 assembly (clang, -O0):
<mfd_assert_has_seals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <mfd_assert_get_seals@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1171 <mfd_assert_has_seals+0x41>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mfd_assert_has_seals>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <mfd_assert_get_seals@plt>
cmp    %ebp,%eax
jne    1147 <mfd_assert_has_seals+0x17>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xeb2(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
mov    %ebx,%ecx
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"%u != %u = GET_SEALS(%d)\0A\00"
define void @mfd_assert_has_seals(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @mfd_assert_get_seals(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%u != %u = GET_SEALS(%d)\0A\00"
define void @mfd_assert_has_seals(i32 %0, i32 %1) {
%3 = tail call i32 @mfd_assert_get_seals(i32 %0)
%4 = icmp eq i32 %3, %1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %3, i32 %0)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
scalar_t__ EWOULDBLOCK;
scalar_t__ errno;
scalar_t__ sw_nb_ex_flock(int);
int /*<<< orphan*/ sw_un_flock(int);
int is_locked(int fd) {
  if (sw_nb_ex_flock(fd) == 0) {
    sw_un_flock(fd);
    return 0;
  } else if (errno == EWOULDBLOCK) {
    return 1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<is_locked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sw_nb_ex_flock@plt>
cmp    $0x0,%rax
jne    1151 <is_locked+0x31>
mov    -0x8(%rbp),%edi
call   1040 <sw_un_flock@plt>
movl   $0x0,-0x4(%rbp)
jmp    117e <is_locked+0x5e>
mov    0x2e88(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    1177 <is_locked+0x57>
movl   $0x1,-0x4(%rbp)
jmp    117e <is_locked+0x5e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_locked>:
push   %rbx
mov    %edi,%ebx
call   1030 <sw_nb_ex_flock@plt>
test   %rax,%rax
je     114e <is_locked+0x2e>
mov    0x2eac(%rip),%rax
mov    (%rax),%rax
mov    0x2e9a(%rip),%rcx
xor    %edx,%edx
cmp    (%rcx),%rax
sete   %dl
lea    (%rdx,%rdx,1),%eax
add    $0xffffffff,%eax
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <sw_un_flock@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@EWOULDBLOCK = global i64 0
define i32 @is_locked(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @sw_nb_ex_flock(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @sw_un_flock(i32 %8)
store i32 0, i32* %2
br label %16
10: ; preds = %1
%11 = load i64, i64* @errno
%12 = load i64, i64* @EWOULDBLOCK
%13 = icmp eq i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 1, i32* %2
br label %16
15: ; preds = %10
store i32 -1, i32* %2
br label %16
16: ; preds = %15, %14, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@EWOULDBLOCK = global i64 0
define i32 @is_locked(i32 %0) {
%2 = tail call i64 @sw_nb_ex_flock(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @sw_un_flock(i32 %0)
br label %11
6: ; preds = %1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EWOULDBLOCK
%9 = icmp eq i64 %7, %8
%10 = select i1 %9, i32 1, i32 -1
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ 0, %4 ], [ %10, %6 ]
ret i32 %12
}
void platform_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @platform_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CallBack1(int, void *);
void ShowHideContextualHelp(int code) { CallBack1(184, (void *)code); }


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

x86 assembly (clang, -O2):
<ShowHideContextualHelp>:
movslq %edi,%rsi
mov    $0xb8,%edi
jmp    1030 <CallBack1@plt>

LLVM IR (-O0):
define void @ShowHideContextualHelp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = call i32 @CallBack1(i32 184, i8* %5)
ret void
}

LLVM IR (-O2):
define void @ShowHideContextualHelp(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @CallBack1(i32 184, i8* %3)
ret void
}
int abs(a)
int a;
{ return (a < 0 ? -a : a); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ in_current_set(unsigned char);
int /*<<< orphan*/ set_up_table(unsigned char const *, int);
size_t xstrcspn(const char *src, const char *set) {
  size_t i;
  set_up_table((const unsigned char *)set, true);
  for (i = 0; !in_current_set((unsigned char)src[i]); i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<xstrcspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <set_up_table@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1040 <in_current_set@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    116c <xstrcspn+0x4c>
jmp    1182 <xstrcspn+0x62>
jmp    1171 <xstrcspn+0x51>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1146 <xstrcspn+0x26>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcspn>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
mov    $0x1,%esi
call   1030 <set_up_table@plt>
mov    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%r14,%rbx,1),%edi
call   1040 <in_current_set@plt>
add    $0x1,%rbx
test   %eax,%eax
je     1140 <xstrcspn+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @xstrcspn(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @set_up_table(i8* %1, i32 1)
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ 0, %2 ], [ %10, %4 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @in_current_set(i8 zeroext %7)
%9 = icmp eq i32 %8, 0
%10 = add i64 %5, 1
br i1 %9, label %4, label %11
11: ; preds = %4
ret i64 %5
}
/* Variables and functions */
int sck_sendf(int, char *, char const *);
int irc_nick(int s, const char *data) {
  return sck_sendf(s, "NICK %s\r\n", data);
}


x86 assembly (clang, -O0):
<irc_nick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <sck_sendf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_nick>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <sck_sendf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"NICK %s\0D\0A\00"
define i32 @irc_nick(i32 %0, i8* %1) {
%3 = tail call i32 @sck_sendf(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float *, int);
void luft_matrix_dup(float in[16], float out[16]) {
  memcpy(out, in, 16 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<luft_matrix_dup>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @luft_matrix_dup(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %1, float* %0, i32 64)
ret void
}
void Write32(unsigned char *pByte, unsigned long value) {
  pByte[0] = (unsigned char)(value >> 24);
  pByte[1] = (unsigned char)(value >> 16);
  pByte[2] = (unsigned char)(value >> 8);
  pByte[3] = (unsigned char)(value);
}


x86 assembly (clang, -O0):
<Write32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write32>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @Write32(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = lshr i64 %1, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %1, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SMBUS_BYTE;
int /*<<< orphan*/ I2C_SMBUS_WRITE;
long i2c_smbus_access(int, int /*<<< orphan*/, unsigned char,
                      int /*<<< orphan*/, int /*<<< orphan*/);
long i2c_smbus_write_byte(int file, unsigned char value) {
  return i2c_smbus_access(file, I2C_SMBUS_WRITE, value, I2C_SMBUS_BYTE, 0);
}


x86 assembly (clang, -O0):
<i2c_smbus_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x5(%rbp),%al
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%ecx
xor    %r8d,%r8d
movzbl %al,%edx
call   1030 <i2c_smbus_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_write_byte>:
mov    %esi,%edx
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    0x2ec6(%rip),%rax
mov    (%rax),%ecx
xor    %r8d,%r8d
jmp    1030 <i2c_smbus_access@plt>

LLVM IR (-O0):
@I2C_SMBUS_WRITE = global i32 0
@I2C_SMBUS_BYTE = global i32 0
define i64 @i2c_smbus_write_byte(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @I2C_SMBUS_WRITE
%7 = load i8, i8* %4
%8 = load i32, i32* @I2C_SMBUS_BYTE
%9 = call i64 @i2c_smbus_access(i32 %5, i32 %6, i8 zeroext %7, i32 %8, i32 0)
ret i64 %9
}

LLVM IR (-O2):
@I2C_SMBUS_WRITE = global i32 0
@I2C_SMBUS_BYTE = global i32 0
define i64 @i2c_smbus_write_byte(i32 %0, i8 zeroext %1) {
%3 = load i32, i32* @I2C_SMBUS_WRITE
%4 = load i32, i32* @I2C_SMBUS_BYTE
%5 = tail call i64 @i2c_smbus_access(i32 %0, i32 %3, i8 zeroext %1, i32 %4, i32 0)
ret i64 %5
}
/* Variables and functions */
int strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int);
bool stringStartsWith(const char *string, const char *prefix) {
  int stringLength = strlen(string);
  int prefixLength = strlen(prefix);
  if (stringLength < prefixLength) {
    return false;
  }
  return strncmp(string, prefix, prefixLength) == 0;
}


x86 assembly (clang, -O0):
<stringStartsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1160 <stringStartsWith+0x40>
movl   $0x0,-0x4(%rbp)
jmp    117f <stringStartsWith+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringStartsWith>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
xor    %eax,%eax
cmp    %edx,%ebp
jl     1157 <stringStartsWith+0x37>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @stringStartsWith(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 = call i32 @strlen(i8* %8)
store i32 %9, i32* %6
%10 = load i8*, i8** %5
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %23
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = load i32, i32* %7
%20 = call i64 @strncmp(i8* %17, i8* %18, i32 %19)
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %16, %15
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @stringStartsWith(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp slt i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void video_test(void) { printf("\nVideo-Test\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"\0AVideo-Test\0A\00"
define void @video_test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"\0AVideo-Test\00"
define void @video_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatserror(char *);
void Ieof() { fatserror("unexpected end of file"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"unexpected end of file\00"
define void @Ieof() {
%1 = call i32 @fatserror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"unexpected end of file\00"
define void @Ieof() {
%1 = tail call i32 @fatserror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
void i2d_PKCS7_ENC_CONTENT(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_ENC_CONTENT() {
ret void
}
/* Type definitions */
struct qnode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printer(struct qnode *);
struct qnode *push(struct qnode *, int);
int main(void) {
  struct qnode *head = NULL;
  head = push(head, 5);
  head = push(head, 6);
  head = push(head, 7);
  head = push(head, 8);
  printer(head);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   1030 <push@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <push@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
call   1030 <push@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <push@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <printer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <push@plt>
mov    %rax,%rdi
mov    $0x6,%esi
call   1030 <push@plt>
mov    %rax,%rdi
mov    $0x7,%esi
call   1030 <push@plt>
mov    %rax,%rdi
mov    $0x8,%esi
call   1030 <push@plt>
mov    %rax,%rdi
call   1040 <printer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.qnode = type { i32 }
define i32 @main() {
%1 = alloca %struct.qnode*
store %struct.qnode* null, %struct.qnode** %1
%2 = load %struct.qnode*, %struct.qnode** %1
%3 = call %struct.qnode* @push(%struct.qnode* %2, i32 5)
store %struct.qnode* %3, %struct.qnode** %1
%4 = load %struct.qnode*, %struct.qnode** %1
%5 = call %struct.qnode* @push(%struct.qnode* %4, i32 6)
store %struct.qnode* %5, %struct.qnode** %1
%6 = load %struct.qnode*, %struct.qnode** %1
%7 = call %struct.qnode* @push(%struct.qnode* %6, i32 7)
store %struct.qnode* %7, %struct.qnode** %1
%8 = load %struct.qnode*, %struct.qnode** %1
%9 = call %struct.qnode* @push(%struct.qnode* %8, i32 8)
store %struct.qnode* %9, %struct.qnode** %1
%10 = load %struct.qnode*, %struct.qnode** %1
%11 = call i32 @printer(%struct.qnode* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.qnode = type { i32 }
define i32 @main() {
%1 = tail call %struct.qnode* @push(%struct.qnode* null, i32 5)
%2 = tail call %struct.qnode* @push(%struct.qnode* %1, i32 6)
%3 = tail call %struct.qnode* @push(%struct.qnode* %2, i32 7)
%4 = tail call %struct.qnode* @push(%struct.qnode* %3, i32 8)
%5 = tail call i32 @printer(%struct.qnode* %4)
ret i32 0
}
void food() {
  int y = 0;
  _Bool c1 = nondet_bool(), c2 = nondet_bool();
  if (c1)
    y++;
  if (c2)
    y--;
  else
    y += 10;
}


x86 assembly (clang, -O0):
<food>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_bool@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x5(%rbp)
mov    $0x0,%al
call   1030 <nondet_bool@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x6(%rbp)
testb  $0x1,-0x5(%rbp)
je     1156 <food+0x46>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
testb  $0x1,-0x6(%rbp)
je     116e <food+0x5e>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <food+0x67>
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<food>:
push   %rax
xor    %eax,%eax
call   1030 <nondet_bool@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <nondet_bool@plt>

LLVM IR (-O0):
define void @food() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 (...) @nondet_bool()
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i8
store i8 %6, i8* %2
%7 = call i32 (...) @nondet_bool()
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %2
%11 = trunc i8 %10 to i1
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %15
15: ; preds = %12, %0
%16 = load i8, i8* %3
%17 = trunc i8 %16 to i1
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %1
%20 = add nsw i32 %19, -1
store i32 %20, i32* %1
br label %24
21: ; preds = %15
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 10
store i32 %23, i32* %1
br label %24
24: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
define void @food() {
%1 = tail call i32 (...) @nondet_bool()
%2 = tail call i32 (...) @nondet_bool()
ret void
}
int funb(int a, int b) { return a - b; }


x86 assembly (clang, -O0):
<funb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funb>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @funb(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @funb(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d factorial: %d\n", n, factorial(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <factorial@plt>
lea    0xeab(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [18 x i8] c"%d factorial: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @factorial(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
void f5(void) {
  char buf[4096 + 512];
  foo(buf);
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1200,%rsp
lea    -0x1200(%rbp),%rdi
call   1030 <foo@plt>
add    $0x1200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
sub    $0x1208,%rsp
mov    %rsp,%rdi
call   1030 <foo@plt>
add    $0x1208,%rsp
ret

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

LLVM IR (-O2):
define void @f5() {
%1 = alloca [4608 x i8]
%2 = getelementptr inbounds [4608 x i8], [4608 x i8]* %1, i64 0, i64 0
%3 = call i32 @foo(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ seq_ctrl_get_song_mode();
int /*<<< orphan*/ seq_ctrl_set_song_mode(int);
void seq_ctrl_toggle_song_mode(void) {
  if (seq_ctrl_get_song_mode()) {
    seq_ctrl_set_song_mode(0);
  } else {
    seq_ctrl_set_song_mode(1);
  }
}


x86 assembly (clang, -O0):
<seq_ctrl_toggle_song_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <seq_ctrl_get_song_mode@plt>
cmp    $0x0,%rax
je     1141 <seq_ctrl_toggle_song_mode+0x21>
xor    %edi,%edi
call   1030 <seq_ctrl_set_song_mode@plt>
jmp    114b <seq_ctrl_toggle_song_mode+0x2b>
mov    $0x1,%edi
call   1030 <seq_ctrl_set_song_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_toggle_song_mode>:
push   %rax
xor    %eax,%eax
call   1040 <seq_ctrl_get_song_mode@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1030 <seq_ctrl_set_song_mode@plt>

LLVM IR (-O0):
define void @seq_ctrl_toggle_song_mode() {
%1 = call i64 (...) @seq_ctrl_get_song_mode()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @seq_ctrl_set_song_mode(i32 0)
br label %7
5: ; preds = %0
%6 = call i32 @seq_ctrl_set_song_mode(i32 1)
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_toggle_song_mode() {
%1 = tail call i64 (...) @seq_ctrl_get_song_mode()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @seq_ctrl_set_song_mode(i32 %3)
ret void
}
/* Variables and functions */
void *fasttask(void *p) {
  int i = 0;
  ++i;
  i -= 3;
  return NULL;
}


x86 assembly (clang, -O0):
<fasttask>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @fasttask(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 3
store i32 %7, i32* %3
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fasttask(i8* nocapture readnone %0) {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void init_printer(FILE *fd) {
  fputc('\033', fd);
  fputc('E', fd);
}


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

x86 assembly (clang, -O2):
<init_printer>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1b,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    $0x45,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @init_printer(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputc(i8 signext 27, i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fputc(i8 signext 69, i32* %5)
ret void
}

LLVM IR (-O2):
define void @init_printer(i32* nocapture %0) {
%2 = tail call i32 @fputc(i8 signext 27, i32* %0)
%3 = tail call i32 @fputc(i8 signext 69, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCGPGRP;
scalar_t__ __ioctl(int, int /*<<< orphan*/, int *);
pid_t tcgetpgrp(int fd) {
  int pgrp;
  if (__ioctl(fd, TIOCGPGRP, &pgrp) < 0)
    return (pid_t)-1;
  return (pid_t)pgrp;
}


x86 assembly (clang, -O0):
<tcgetpgrp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <__ioctl@plt>
cmp    $0x0,%rax
jge    1146 <tcgetpgrp+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    114c <tcgetpgrp+0x3c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetpgrp>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <__ioctl@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1135 <tcgetpgrp+0x25>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCGPGRP = global i32 0
define i32 @tcgetpgrp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @TIOCGPGRP
%7 = call i64 @__ioctl(i32 %5, i32 %6, i32* %4)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@TIOCGPGRP = global i32 0
define i32 @tcgetpgrp(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCGPGRP
%5 = call i64 @__ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp slt i64 %5, 0
%7 = load i32, i32* %2
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
void exynos4_default_sdhci0(void) {}


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

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

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

LLVM IR (-O2):
define void @exynos4_default_sdhci0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vfork();
void boom(void) {
  char buf[65536];
  vfork();
}


x86 assembly (clang, -O0):
<boom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10000,%rsp
call   1030 <vfork@plt>
add    $0x10000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boom>:
push   %rax
call   1030 <vfork@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @boom() {
%1 = alloca [65536 x i8]
%2 = call i32 @vfork()
ret void
}

LLVM IR (-O2):
define void @boom() {
%1 = call i32 @vfork()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xfd() {
  Assert_real((isalpha(253) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              1270, ("isalpha should be 0 for 0xfd"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xfd\00"
define void @t_isalpha_0xfd() {
%1 = tail call i64 @isalpha(i32 253)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1270, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int RTco_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @RTco_init() {
ret i32 0
}