xunge/DecIR huggingface dataset:
/* Type definitions */
struct type {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
size_t bits_to_bytes(int /*<<< orphan*/);
int /*<<< orphan*/ size_of(struct compile_state *, struct type *);
size_t size_of_in_bytes(struct compile_state *state, struct type *type) {
  return bits_to_bytes(size_of(state, type));
}


x86 assembly (clang, -O0):
<size_of_in_bytes>:
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   1040 <size_of@plt>
mov    %eax,%edi
call   1030 <bits_to_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.type = type { i32 }
define i64 @size_of_in_bytes(%struct.compile_state* %0, %struct.type* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.type*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.type* %1, %struct.type** %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = load %struct.type*, %struct.type** %4
%7 = call i32 @size_of(%struct.compile_state* %5, %struct.type* %6)
%8 = call i64 @bits_to_bytes(i32 %7)
ret i64 %8
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.type = type { i32 }
define i64 @size_of_in_bytes(%struct.compile_state* %0, %struct.type* %1) {
%3 = tail call i32 @size_of(%struct.compile_state* %0, %struct.type* %1)
%4 = tail call i64 @bits_to_bytes(i32 %3)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
scalar_t__ getpgrp();
scalar_t__ getpid();
scalar_t__ getppid();
int /*<<< orphan*/ printf(char *, char const *, long, long, long, long);
scalar_t__ tcgetpgrp(int /*<<< orphan*/);
void print_ids(const char *process) {
  printf("%s: pid = %ld, ppid = %ld, pgrp = %ld, tpgrp = %ld\n", process,
         (long)getpid(), (long)getppid(), (long)getpgrp(),
         (long)tcgetpgrp(STDIN_FILENO));
}


x86 assembly (clang, -O0):
<print_ids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1070 <getppid@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <getpgrp@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1050 <tcgetpgrp@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    %rax,%r9
lea    0xe53(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ids>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1070 <getppid@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1060 <getpgrp@plt>
mov    %rax,%rbx
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <tcgetpgrp@plt>
lea    0xe72(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %rbx,%r8
mov    %rax,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"%s: pid = %ld, ppid = %ld, pgrp = %ld, tpgrp = %ld\0A\00"
@STDIN_FILENO = global i32 0
define void @print_ids(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 (...) @getpid()
%5 = call i64 (...) @getppid()
%6 = call i64 (...) @getpgrp()
%7 = load i32, i32* @STDIN_FILENO
%8 = call i64 @tcgetpgrp(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %3, i64 %4, i64 %5, i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"%s: pid = %ld, ppid = %ld, pgrp = %ld, tpgrp = %ld\0A\00"
@STDIN_FILENO = global i32 0
define void @print_ids(i8* %0) {
%2 = tail call i64 (...) @getpid()
%3 = tail call i64 (...) @getppid()
%4 = tail call i64 (...) @getpgrp()
%5 = load i32, i32* @STDIN_FILENO
%6 = tail call i64 @tcgetpgrp(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %2, i64 %3, i64 %4, i64 %6)
ret void
}
void ft_striter(char *s, void (*f)(char *)) {
  while (*s)
    f(s++);
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1137 <ft_striter+0x37>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    %rdi,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
call   *%rax
jmp    1110 <ft_striter+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1123 <ft_striter+0x23>
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x1(%rbx),%r15
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
mov    %r15,%rbx
jne    1110 <ft_striter+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
tail call void %1(i8* %6)
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itc_net_listen_n_after_socket_close();
int /*<<< orphan*/ itc_net_listen_p_different_socket();
int /*<<< orphan*/ itc_net_listen_p_multiple_time();
int itc_net_listen_main(void) {
  itc_net_listen_p_multiple_time();
  itc_net_listen_p_different_socket();
  itc_net_listen_n_after_socket_close();
  return 0;
}


x86 assembly (clang, -O0):
<itc_net_listen_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <itc_net_listen_p_multiple_time@plt>
mov    $0x0,%al
call   1050 <itc_net_listen_p_different_socket@plt>
mov    $0x0,%al
call   1040 <itc_net_listen_n_after_socket_close@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itc_net_listen_main>:
push   %rax
xor    %eax,%eax
call   1030 <itc_net_listen_p_multiple_time@plt>
xor    %eax,%eax
call   1050 <itc_net_listen_p_different_socket@plt>
xor    %eax,%eax
call   1040 <itc_net_listen_n_after_socket_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @itc_net_listen_main() {
%1 = call i32 (...) @itc_net_listen_p_multiple_time()
%2 = call i32 (...) @itc_net_listen_p_different_socket()
%3 = call i32 (...) @itc_net_listen_n_after_socket_close()
ret i32 0
}

LLVM IR (-O2):
define i32 @itc_net_listen_main() {
%1 = tail call i32 (...) @itc_net_listen_p_multiple_time()
%2 = tail call i32 (...) @itc_net_listen_p_different_socket()
%3 = tail call i32 (...) @itc_net_listen_n_after_socket_close()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int pickNextGuess_least(int **, char *);
int pickNextGuess_linear(int **, char *);
int pickNextGuess_most(int **, char *);
int pickNextGuess_random(int **, char *);
int pickNextGuess_weird(int **, char *, int *);
int /*<<< orphan*/ printf(char *);
int pickNextGuess(int x[9][9], char *ignore_guess_mask, int *guesses) {
  int spot;
  switch ((1)) {
  case (1):
    spot = pickNextGuess_linear(x, ignore_guess_mask);
    break;
  case (3):
    spot = pickNextGuess_most(x, ignore_guess_mask);
    break;
  case (2):
    spot = pickNextGuess_least(x, ignore_guess_mask);
    break;
  case (5):
    spot = pickNextGuess_random(x, ignore_guess_mask);
    break;
  case (4):
    spot = pickNextGuess_weird(x, ignore_guess_mask, guesses);
    break;
  default:
    printf("Guess type not set?\n");
    exit(0);
  }
  if (spot >= 0)
    ignore_guess_mask[spot] = 1;
  return spot;
}


x86 assembly (clang, -O0):
<pickNextGuess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <pickNextGuess_linear@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     114a <pickNextGuess+0x3a>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pickNextGuess>:
push   %rbx
mov    %rsi,%rbx
call   1030 <pickNextGuess_linear@plt>
test   %eax,%eax
js     1123 <pickNextGuess+0x13>
mov    %eax,%ecx
movb   $0x1,(%rbx,%rcx,1)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pickNextGuess([9 x i32]* %0, i8* %1, i32* %2) {
%4 = alloca [9 x i32]*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store [9 x i32]* %0, [9 x i32]** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = load [9 x i32]*, [9 x i32]** %4
%9 = bitcast [9 x i32]* %8 to i32**
%10 = load i8*, i8** %5
%11 = call i32 @pickNextGuess_linear(i32** %9, i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 1, i8* %18
br label %19
19: ; preds = %14, %3
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @pickNextGuess([9 x i32]* %0, i8* %1, i32* nocapture readnone %2) {
%4 = bitcast [9 x i32]* %0 to i32**
%5 = tail call i32 @pickNextGuess_linear(i32** %4, i8* %1)
%6 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = zext i32 %5 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 1, i8* %9
br label %10
10: ; preds = %7, %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ shairport_shutdown(int /*<<< orphan*/);
void sig_shutdown(int foo, siginfo_t *bar, void *baz) { shairport_shutdown(0); }


x86 assembly (clang, -O0):
<sig_shutdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %edi,%edi
call   1030 <shairport_shutdown@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @sig_shutdown(i32 %0, i32* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = call i32 @shairport_shutdown(i32 0)
ret void
}

LLVM IR (-O2):
define void @sig_shutdown(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @shairport_shutdown(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
char *crypt(const char *key, const char *salt) {
  printf("crypt=====\n");
  return NULL;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"crypt=====\00"
define noalias i8* @crypt(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i8* null
}
int fun417() { return 417; }


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

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

LLVM IR (-O0):
define i32 @fun417() {
ret i32 417
}

LLVM IR (-O2):
define i32 @fun417() {
ret i32 417
}
/* Type definitions */
struct sched_param {
  int sched_priority;
};

/* Variables and functions */
int sched_setscheduler(int /*<<< orphan*/, int, struct sched_param *);
int set_self_policy_priority(int policy, int priority) {
  struct sched_param params;
  params.sched_priority = priority;
  return sched_setscheduler(0, policy, &params);
}


x86 assembly (clang, -O0):
<set_self_policy_priority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
xor    %edi,%edi
lea    -0x10(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_self_policy_priority>:
push   %rax
mov    %edi,%eax
mov    %esi,(%rsp)
mov    %rsp,%rdx
xor    %edi,%edi
mov    %eax,%esi
call   1030 <sched_setscheduler@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
define i32 @set_self_policy_priority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sched_param
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %3
%9 = call i32 @sched_setscheduler(i32 0, i32 %8, %struct.sched_param* %5)
ret i32 %9
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
define i32 @set_self_policy_priority(i32 %0, i32 %1) {
%3 = alloca %struct.sched_param
%4 = bitcast %struct.sched_param* %3 to i8*
%5 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = call i32 @sched_setscheduler(i32 0, i32 %0, %struct.sched_param* %3)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ nchars;
};
typedef TYPE_1__ XTextItem16;

/* Variables and functions */
int get_XTextItem16_nchars(void *_p) {
  return (int)((XTextItem16 *)_p)->nchars;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XTextItem16_nchars(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int u_int;

/* Variables and functions */
u_int hash_size(u_int s) {
  u_int i = 1;
  while (i < s)
    i <<= 1;
  return i;
}


x86 assembly (clang, -O0):
<hash_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1128 <hash_size+0x28>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <hash_size+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_size>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <hash_size+0x10>
ret

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

LLVM IR (-O2):
define i32 @hash_size(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ draw();
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glutSwapBuffers();
void drawScene() {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glLoadIdentity();
  glColor3f(0.0, 1.0, 0.0);
  draw();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<drawScene>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
or     (%rax),%edi
call   1040 <glClear@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
xorps  %xmm2,%xmm2
movsd  0xe83(%rip),%xmm1
movaps %xmm2,%xmm0
call   1070 <glColor3f@plt>
mov    $0x0,%al
call   1030 <draw@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawScene>:
push   %rax
mov    0x2e80(%rip),%rax
mov    0x2e89(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glClear@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xe89(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1070 <glColor3f@plt>
xor    %eax,%eax
call   1030 <draw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @drawScene() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 (...) @glLoadIdentity()
%6 = call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%7 = call i32 (...) @draw()
%8 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @drawScene() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 (...) @glLoadIdentity()
%6 = tail call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%7 = tail call i32 (...) @draw()
%8 = tail call i32 (...) @glutSwapBuffers()
ret void
}
int purge_packet(struct fifo_buffer_t *bufaddr, char packet_header[25]) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.fifo_buffer_t = type opaque
define i32 @purge_packet(%struct.fifo_buffer_t* %0, i8* %1) {
%3 = alloca %struct.fifo_buffer_t*
%4 = alloca i8*
store %struct.fifo_buffer_t* %0, %struct.fifo_buffer_t** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.fifo_buffer_t = type opaque
define i32 @purge_packet(%struct.fifo_buffer_t* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char **);
int main(int argc, char **argv) {
  for (int i = 0; i < argc; i++) {
    printf("The argument is %s and its address is %p\n", argv[i], &(argv[i]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116e <main+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1148 <main+0x38>
mov    %rsi,%rbx
mov    %edi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [42 x i8] c"The argument is %s and its address is %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %22, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %25
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %16, i8** %20)
br label %22
22: ; preds = %11
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %7
25: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"The argument is %s and its address is %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %10, i8** %9)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void main() {
  for (;;) {
    FILE *f = fopen("/dev/null", "r");
    fclose(f);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1128 <main+0x8>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0xed8(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
call   1030 <fclose@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"r\00"
define void @main() {
%1 = alloca i32*
br label %2
2: ; preds = %2, %0
%3 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @fclose(i32* %4)
br label %2
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"r\00"
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fclose(i32* %2)
br label %1
}
int sfd_ispunct(const char c) {
  return (((c >= 33) && (c <= 47)) || ((c >= 58) && (c <= 64)) ||
          ((c >= 91) && (c <= 96)) || ((c >= 123) && (c <= 126)));
}


x86 assembly (clang, -O0):
<sfd_ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x21,%eax
jl     1129 <sfd_ispunct+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
jle    118c <sfd_ispunct+0x8c>
movsbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
jl     1148 <sfd_ispunct+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x40,%ecx
mov    %al,-0x2(%rbp)
jle    118c <sfd_ispunct+0x8c>
movsbl -0x1(%rbp),%eax
cmp    $0x5b,%eax
jl     1167 <sfd_ispunct+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x60,%ecx
mov    %al,-0x2(%rbp)
jle    118c <sfd_ispunct+0x8c>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7b,%ecx
mov    %al,-0x3(%rbp)
jl     1186 <sfd_ispunct+0x86>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfd_ispunct>:
movd   %edi,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
paddb  0xeeb(%rip),%xmm0
movdqa 0xef3(%rip),%xmm1
pmaxub %xmm0,%xmm1
pcmpeqb %xmm0,%xmm1
pcmpeqd %xmm0,%xmm0
pxor   %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movmskps %xmm0,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @sfd_ispunct(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 33
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 47
br i1 %9, label %36, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 58
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 64
br i1 %17, label %36, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 91
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 96
br i1 %25, label %36, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp sge i32 %28, 123
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp sle i32 %32, 126
br label %34
34: ; preds = %30, %26
%35 = phi i1 [ false, %26 ], [ %33, %30 ]
br label %36
36: ; preds = %34, %22, %14, %6
%37 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %35, %34 ]
%38 = zext i1 %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @sfd_ispunct(i8 signext %0) {
%2 = insertelement <4 x i8> poison, i8 %0, i64 0
%3 = shufflevector <4 x i8> %2, <4 x i8> poison, <4 x i32> zeroinitializer
%4 = add <4 x i8> %3, <i8 -123, i8 -91, i8 -33, i8 -58>
%5 = icmp ult <4 x i8> %4, <i8 4, i8 6, i8 15, i8 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ ConsoleAddText(int /*<<< orphan*/ *);
int /*<<< orphan*/ vswprintf(int /*<<< orphan*/ *, int,
                             int /*<<< orphan*/ const *, int /*<<< orphan*/);
void vprint(const wchar_t *format, va_list va) {
  wchar_t str[256];
  vswprintf(str, sizeof(str) / sizeof(str[0]), format, va);
  ConsoleAddText(str);
}


x86 assembly (clang, -O0):
<vprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x100,%esi
call   1040 <vswprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <ConsoleAddText@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprint>:
push   %rbx
sub    $0x400,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <vswprintf@plt>
mov    %rbx,%rdi
call   1030 <ConsoleAddText@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @vprint(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [256 x i32]
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 0
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @vswprintf(i32* %6, i32 256, i32* %7, i32 %8)
%10 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 0
%11 = call i32 @ConsoleAddText(i32* %10)
ret void
}

LLVM IR (-O2):
define void @vprint(i32* %0, i32 %1) {
%3 = alloca [256 x i32]
%4 = bitcast [256 x i32]* %3 to i8*
%5 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 0
%6 = call i32 @vswprintf(i32* %5, i32 256, i32* %0, i32 %1)
%7 = call i32 @ConsoleAddText(i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ console_update();
void update() { console_update(); }


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

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

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

LLVM IR (-O2):
define void @update() {
%1 = tail call i32 (...) @console_update()
ret void
}
char sqchat_rfc1459_tolower(const char c) {
  return c >= 'A' && c <= '^' ? c + 32 : c;
}


x86 assembly (clang, -O0):
<sqchat_rfc1459_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <sqchat_rfc1459_tolower+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x5e,%eax
jg     1133 <sqchat_rfc1459_tolower+0x33>
movsbl -0x1(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <sqchat_rfc1459_tolower+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqchat_rfc1459_tolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1e,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @sqchat_rfc1459_tolower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 94
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, 32
br label %17
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %17
17: ; preds = %14, %10
%18 = phi i32 [ %13, %10 ], [ %16, %14 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @sqchat_rfc1459_tolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 30
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int iDoubleCompare(double dA, double dB) {
  if ((dA - 0.001 < dB) && (dA + 0.001 > dB))
    return (0);
  if (dA < dB)
    return (-1);
  return (1);
}


x86 assembly (clang, -O0):
<iDoubleCompare>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xee5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1152 <iDoubleCompare+0x52>
movsd  0xeca(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1152 <iDoubleCompare+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1179 <iDoubleCompare+0x79>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1172 <iDoubleCompare+0x72>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <iDoubleCompare+0x79>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iDoubleCompare>:
movsd  0xf00(%rip),%xmm2
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
setbe  %cl
addsd  %xmm0,%xmm2
xor    %eax,%eax
ucomisd %xmm1,%xmm2
lea    -0x1(%rcx,%rcx,1),%ecx
cmovbe %ecx,%eax
movsd  0xed6(%rip),%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm2,%xmm1
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @iDoubleCompare(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = fsub double %6, 1.000000e-03
%8 = load double, double* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load double, double* %4
%12 = fadd double %11, 1.000000e-03
%13 = load double, double* %5
%14 = fcmp ogt double %12, %13
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %3
br label %22
16: ; preds = %10, %2
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fcmp olt double %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 -1, i32* %3
br label %22
21: ; preds = %16
store i32 1, i32* %3
br label %22
22: ; preds = %21, %20, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @iDoubleCompare(double %0, double %1) {
%3 = fadd double %0, -1.000000e-03
%4 = fcmp olt double %3, %1
%5 = fadd double %0, 1.000000e-03
%6 = fcmp ogt double %5, %1
%7 = and i1 %4, %6
%8 = fcmp olt double %0, %1
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ mount(char *, char *, char *, int /*<<< orphan*/,
                 int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int mount_proc() {
  if (mount("proc", "/proc", "proc", 0, NULL) != 0) {
    perror("mount proc");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<mount_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xedd(%rip),%rdx
lea    0xeca(%rip),%rsi
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1030 <mount@plt>
cmp    $0x0,%rax
je     1167 <mount_proc+0x47>
lea    0xeb0(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116e <mount_proc+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mount_proc>:
push   %rbx
lea    0xed8(%rip),%rsi
lea    0xedd(%rip),%rdi
xor    %ebx,%ebx
mov    %rdi,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mount@plt>
test   %rax,%rax
jne    1147 <mount_proc+0x27>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%ebx
jmp    1143 <mount_proc+0x23>

LLVM IR (-O0):
@.str = [5 x i8] c"proc\00"
@.str.1 = [6 x i8] c"/proc\00"
@.str.2 = [11 x i8] c"mount proc\00"
define i32 @mount_proc() {
%1 = alloca i32
%2 = call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32* null)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"proc\00"
@.str.1 = [6 x i8] c"/proc\00"
@.str.2 = [11 x i8] c"mount proc\00"
define i32 @mount_proc() {
%1 = tail call i64 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32* null)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 1, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, struct timeval *);
void delay(int us) {
  struct timeval tv;
  tv.tv_sec = 0;
  tv.tv_usec = us;
  (void)select(1, NULL, NULL, NULL, &tv);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x18(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%r8
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define void @delay(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = call i32 @select(i32 1, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret void
}
/* Variables and functions */
void *__va(unsigned long);
void *phys_to_virt(unsigned long address) { return __va(address); }


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

x86 assembly (clang, -O2):
<phys_to_virt>:
jmp    1030 <__va@plt>

LLVM IR (-O0):
define i8* @phys_to_virt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @__va(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @phys_to_virt(i64 %0) {
%2 = tail call i8* @__va(i64 %0)
ret i8* %2
}
OP(ed, d5) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void label_file_clear(void) {}


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

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

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

LLVM IR (-O2):
define void @label_file_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc18(int status, void *arg) {
  printf("Executing exitfunc"
         "18"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc18>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Executing exitfunc18 (status=%d, arg=%lu)\0A\00"
define void @exitfunc18(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 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"Executing exitfunc18 (status=%d, arg=%lu)\0A\00"
define void @exitfunc18(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
/* Variables and functions */
void __builtin_wasm_rethrow_in_catch();
void rethrow_in_catch(void) { return __builtin_wasm_rethrow_in_catch(); }


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

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

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

LLVM IR (-O2):
define void @rethrow_in_catch() {
tail call void (...) @__builtin_wasm_rethrow_in_catch()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t G(uint32_t x, uint32_t y, uint32_t z) { return (x & z) | (y & ~z); }


x86 assembly (clang, -O0):
<G>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<G>:
mov    %edi,%eax
xor    %esi,%eax
and    %edx,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @G(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @G(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = xor i32 %2, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ trap_CIN_StopCinematic(int);
void CG_StopCinematic(int handle) { trap_CIN_StopCinematic(handle); }


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

x86 assembly (clang, -O2):
<CG_StopCinematic>:
jmp    1030 <trap_CIN_StopCinematic@plt>

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

LLVM IR (-O2):
define void @CG_StopCinematic(i32 %0) {
%2 = tail call i32 @trap_CIN_StopCinematic(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pocketdb_operations();
int main() {
  pocketdb_operations();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @pocketdb_operations()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pocketdb_operations()
ret i32 0
}
void pinconf_generic_dump_pin(struct pinctrl_dev *pctldev, struct seq_file *s,
                              unsigned pin) {
  return;
}


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

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

LLVM IR (-O0):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_pin(%struct.pinctrl_dev* %0, %struct.seq_file* %1, i32 %2) {
%4 = alloca %struct.pinctrl_dev*
%5 = alloca %struct.seq_file*
%6 = alloca i32
store %struct.pinctrl_dev* %0, %struct.pinctrl_dev** %4
store %struct.seq_file* %1, %struct.seq_file** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.pinctrl_dev = type opaque
%struct.seq_file = type opaque
define void @pinconf_generic_dump_pin(%struct.pinctrl_dev* nocapture %0, %struct.seq_file* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll18(struct __test_metadata *);
void wrapper_epoll18(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll18(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll18>:
jmp    1030 <epoll18@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll18(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll18(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll18(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll18(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
double *dvector(size_t const);
int /*<<< orphan*/ memcpy(double *, double const *, size_t const);
double *clone_dvector(const double *v, const size_t n) {
  double *clone = dvector(n);
  memcpy(clone, v, n * sizeof(double));
  return clone;
}


x86 assembly (clang, -O0):
<clone_dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <dvector@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shl    $0x3,%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clone_dvector>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <dvector@plt>
mov    %rax,%r15
shl    $0x3,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define double* @clone_dvector(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double*
store double* %0, double** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call double* @dvector(i64 %6)
store double* %7, double** %5
%8 = load double*, double** %5
%9 = load double*, double** %3
%10 = load i64, i64* %4
%11 = mul i64 %10, 8
%12 = call i32 @memcpy(double* %8, double* %9, i64 %11)
%13 = load double*, double** %5
ret double* %13
}

LLVM IR (-O2):
define double* @clone_dvector(double* %0, i64 %1) {
%3 = tail call double* @dvector(i64 %1)
%4 = shl i64 %1, 3
%5 = tail call i32 @memcpy(double* %3, double* %0, i64 %4)
ret double* %3
}