xunge/DecIR huggingface dataset:
unsigned long hash_function(const char *s) {
  unsigned const char *us;
  unsigned long h;
  h = 0;
  for (us = (unsigned const char *)s; *us; us++)
    h = h * 97 + *us;
  return h;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <hash_function+0x49>
imul   $0x61,-0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <hash_function+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <hash_function+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x61,%rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_function+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_function(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i64 %6, 97
%9 = zext i8 %5 to i64
%10 = add i64 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %15
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XGravityEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XGravityEvent_display(void *_p, void *_v) {
  ((XGravityEvent *)_p)->display = (Display *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XGravityEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
char *sigar_getlinem(int /*<<< orphan*/, char *);
char *sigar_getline(char *prompt) { return sigar_getlinem(0, prompt); }


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

x86 assembly (clang, -O2):
<sigar_getline>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <sigar_getlinem@plt>

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

LLVM IR (-O2):
define i8* @sigar_getline(i8* %0) {
%2 = tail call i8* @sigar_getlinem(i32 0, i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putstr_fd(char const *s, int fd) {
  int counter;
  counter = 0;
  while (s[counter] != '\0') {
    ft_putchar_fd(s[counter], fd);
    counter++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115f <ft_putstr_fd+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <ft_putchar_fd@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_putstr_fd+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putstr_fd+0x35>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putstr_fd+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = tail call i32 @ft_putchar_fd(i8 signext %7, i32 %1)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef scalar_t__ float_t;

/* Variables and functions */
float_t IMax(float_t left, float_t right) {
  return (left < right) ? right : left;
}


x86 assembly (clang, -O0):
<IMax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <IMax+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <IMax+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IMax>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @IMax(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ crmode();
int /*<<< orphan*/ draw_field();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
void init_disp(void) {
  initscr();
  clear();
  crmode();
  noecho();
  nonl();
  draw_field();
}


x86 assembly (clang, -O0):
<init_disp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1080 <clear@plt>
mov    $0x0,%al
call   1070 <crmode@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
mov    $0x0,%al
call   1050 <nonl@plt>
mov    $0x0,%al
call   1040 <draw_field@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_disp>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1080 <clear@plt>
xor    %eax,%eax
call   1070 <crmode@plt>
xor    %eax,%eax
call   1060 <noecho@plt>
xor    %eax,%eax
call   1050 <nonl@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <draw_field@plt>

LLVM IR (-O0):
define void @init_disp() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @clear()
%3 = call i32 (...) @crmode()
%4 = call i32 (...) @noecho()
%5 = call i32 (...) @nonl()
%6 = call i32 (...) @draw_field()
ret void
}

LLVM IR (-O2):
define void @init_disp() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @clear()
%3 = tail call i32 (...) @crmode()
%4 = tail call i32 (...) @noecho()
%5 = tail call i32 (...) @nonl()
%6 = tail call i32 (...) @draw_field()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *srs_strerror(int);
int /*<<< orphan*/ stderr;
void die(int code) {
  fprintf(stderr, "Error %d: %s\n", code, srs_strerror(code));
  do {
    fprintf(stderr, "Exiting.\n");
    exit(255);
  } while (0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <srs_strerror@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    %rax,%rcx
lea    0xe9b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe92(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ea3(%rip),%r14
mov    (%r14),%ebp
call   1050 <srs_strerror@plt>
lea    0xeb4(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeaa(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Error %d: %s\0A\00"
@.str.1 = [10 x i8] c"Exiting.\0A\00"
define void @die(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @srs_strerror(i32 %5)
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %6)
br label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @exit(i32 255)
unreachable
12: ; No predecessors!
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Error %d: %s\0A\00"
@.str.1 = [10 x i8] c"Exiting.\0A\00"
define void @die(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @srs_strerror(i32 %0)
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 255)
unreachable
}
void gtk_tree_view_columns_autosize() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct rbnode *);
void rb_free(struct rbnode *x) { free(x); }


x86 assembly (clang, -O0):
<rb_free>:
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):
<rb_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.rbnode = type { i32 }
define void @rb_free(%struct.rbnode* nocapture %0) {
%2 = tail call i32 @free(%struct.rbnode* %0)
ret void
}
int pathcon_nm10_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathcon_nm10_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathcon_nm10_n_in() {
ret i32 2
}
int get_maxlen(const char *const base[], int num,
               int (*length)(const char *const *, int)) {
  int i, len, max;
  max = (*length)(base, 0);
  for (i = 0; i < num; i++) {
    if ((len = (*length)(base, i)) > max)
      max = len;
  }
  return (max);
}


x86 assembly (clang, -O0):
<get_maxlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   *%rax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <get_maxlen+0x67>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   *%rax
mov    %eax,-0x20(%rbp)
cmp    -0x24(%rbp),%eax
jle    1154 <get_maxlen+0x54>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1159 <get_maxlen+0x59>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1129 <get_maxlen+0x29>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_maxlen>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%r12
xor    %ebx,%ebx
xor    %esi,%esi
call   *%rdx
mov    %eax,%ebp
test   %r15d,%r15d
jle    1135 <get_maxlen+0x35>
xchg   %ax,%ax
mov    %r12,%rdi
mov    %ebx,%esi
call   *%r14
cmp    %ebp,%eax
cmovg  %eax,%ebp
add    $0x1,%ebx
cmp    %ebx,%r15d
jne    1120 <get_maxlen+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_maxlen(i8** %0, i32 %1, i32 (i8**, i32)* nocapture %2) {
%4 = tail call i32 %2(i8** %0, i32 0)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %6
%7 = phi i32 [ %11, %6 ], [ %4, %3 ]
%8 = phi i32 [ %12, %6 ], [ 0, %3 ]
%9 = tail call i32 %2(i8** %0, i32 %8)
%10 = icmp sgt i32 %9, %7
%11 = select i1 %10, i32 %9, i32 %7
%12 = add nuw nsw i32 %8, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = phi i32 [ %4, %3 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free_safe_mem_bucket(int);
void num_delete_temp(void) { free_safe_mem_bucket(3); }


x86 assembly (clang, -O0):
<num_delete_temp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <free_safe_mem_bucket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_delete_temp>:
mov    $0x3,%edi
jmp    1030 <free_safe_mem_bucket@plt>

LLVM IR (-O0):
define void @num_delete_temp() {
%1 = call i32 @free_safe_mem_bucket(i32 3)
ret void
}

LLVM IR (-O2):
define void @num_delete_temp() {
%1 = tail call i32 @free_safe_mem_bucket(i32 3)
ret void
}
void barrier_memory(void) { __asm__ volatile("mfence" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @barrier_memory() {
tail call void asm sideeffect "mfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
int security_module_delete(const struct module *mod) { return 0; }


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

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

LLVM IR (-O0):
%struct.module = type opaque
define i32 @security_module_delete(%struct.module* %0) {
%2 = alloca %struct.module*
store %struct.module* %0, %struct.module** %2
ret i32 0
}

LLVM IR (-O2):
%struct.module = type opaque
define i32 @security_module_delete(%struct.module* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("/nHello World\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"/nHello World\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void XSyncFreeSystemCounterList() {}


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

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

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

LLVM IR (-O2):
define void @XSyncFreeSystemCounterList() {
ret void
}
/* Variables and functions */
int is_composite(int const);
int check_force_gs1(const int symbology) {
  int result = is_composite(symbology);
  switch (symbology) {
  case 16:
  case 72:
  case 75:
  case 31:
  case 81:
    result = 1;
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<check_force_gs1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_composite@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x10,%eax
je     117e <check_force_gs1+0x6e>
jmp    113a <check_force_gs1+0x2a>
mov    -0xc(%rbp),%eax
sub    $0x1f,%eax
je     117e <check_force_gs1+0x6e>
jmp    114b <check_force_gs1+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x48,%eax
je     117e <check_force_gs1+0x6e>
jmp    115c <check_force_gs1+0x4c>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     117e <check_force_gs1+0x6e>
jmp    116d <check_force_gs1+0x5d>
mov    -0xc(%rbp),%eax
sub    $0x51,%eax
jne    1185 <check_force_gs1+0x75>
jmp    117e <check_force_gs1+0x6e>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_force_gs1>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_composite@plt>
lea    -0x1f(%rbx),%ecx
cmp    $0x32,%ecx
ja     1130 <check_force_gs1+0x20>
movabs $0x4120000000001,%rdx
bt     %rcx,%rdx
jb     1135 <check_force_gs1+0x25>
cmp    $0x10,%ebx
jne    113a <check_force_gs1+0x2a>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_force_gs1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @is_composite(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
switch i32 %6, label %8 [
i32 16, label %7
i32 72, label %7
i32 75, label %7
i32 31, label %7
i32 81, label %7
]
7: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %8
8: ; preds = %1, %7
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @check_force_gs1(i32 %0) {
%2 = tail call i32 @is_composite(i32 %0)
switch i32 %0, label %4 [
i32 16, label %3
i32 72, label %3
i32 75, label %3
i32 31, label %3
i32 81, label %3
]
3: ; preds = %1, %1, %1, %1, %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ %2, %1 ], [ 1, %3 ]
ret i32 %5
}
int poe_isstartbrace(char c) { return c == '(' || c == '[' || c == '{'; }


x86 assembly (clang, -O0):
<poe_isstartbrace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     113b <poe_isstartbrace+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     113b <poe_isstartbrace+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<poe_isstartbrace>:
mov    $0x1,%eax
cmp    $0x28,%dil
je     1111 <poe_isstartbrace+0x11>
cmp    $0x5b,%dil
jne    1112 <poe_isstartbrace+0x12>
ret
xor    %eax,%eax
cmp    $0x7b,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @poe_isstartbrace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 40
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 91
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 123
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @poe_isstartbrace(i8 signext %0) {
switch i8 %0, label %2 [
i8 91, label %5
i8 40, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 123
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
void symbol11_optional(void) {}


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

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

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

LLVM IR (-O2):
define void @symbol11_optional() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t rtp2435q_get_mbz(uint8_t *header) { return header[0]; }


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

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

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

LLVM IR (-O2):
define i32 @rtp2435q_get_mbz(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ writeidel(int, int /*<<< orphan*/);
void ide_write_ter_l(uint16_t addr, uint32_t val, void *priv) {
  writeidel(2, val);
}


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

x86 assembly (clang, -O2):
<ide_write_ter_l>:
mov    $0x2,%edi
jmp    1030 <writeidel@plt>

LLVM IR (-O0):
define void @ide_write_ter_l(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 = load i32, i32* %5
%8 = call i32 @writeidel(i32 2, i32 %7)
ret void
}

LLVM IR (-O2):
define void @ide_write_ter_l(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @writeidel(i32 2, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fatal7(char const *, char const *, char const *,
                          char const *, char const *, char *,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void fatal5x(const char *a, const char *b, const char *c, const char *d,
             const char *e) {
  fatal7(a, b, c, d, e, ": ", strerror(errno));
}


x86 assembly (clang, -O0):
<fatal5x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%r8
lea    0xe73(%rip),%r9
mov    %eax,(%rsp)
call   1030 <fatal7@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal5x>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %eax,(%rsp)
lea    0xeac(%rip),%r9
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <fatal7@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c": \00"
@errno = global i32 0
define void @fatal5x(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = load i32, i32* @errno
%17 = call i32 @strerror(i32 %16)
%18 = call i32 @fatal7(i8* %11, i8* %12, i8* %13, i8* %14, i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c": \00"
@errno = global i32 0
define void @fatal5x(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @fatal7(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
int arch_fixup(unsigned long address, void *sc_ptr) { return (0); }


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

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

LLVM IR (-O0):
define i32 @arch_fixup(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @arch_fixup(i64 %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_BROADCAST;
int __sapi_sock_reset_optint(int, int /*<<< orphan*/, int /*<<< orphan*/);
int sapi_sock_reset_broadcast(int sock) {
  return __sapi_sock_reset_optint(sock, SOL_SOCKET, SO_BROADCAST);
}


x86 assembly (clang, -O0):
<sapi_sock_reset_broadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
call   1030 <__sapi_sock_reset_optint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sapi_sock_reset_broadcast>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
jmp    1030 <__sapi_sock_reset_optint@plt>

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_BROADCAST = global i32 0
define i32 @sapi_sock_reset_broadcast(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_BROADCAST
%6 = call i32 @__sapi_sock_reset_optint(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_BROADCAST = global i32 0
define i32 @sapi_sock_reset_broadcast(i32 %0) {
%2 = load i32, i32* @SOL_SOCKET
%3 = load i32, i32* @SO_BROADCAST
%4 = tail call i32 @__sapi_sock_reset_optint(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
void swap(void **i, void **j) {
  void *temp;
  temp = *i;
  *i = *j;
  *j = temp;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Pl_Fatal_Error(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<Pl_Fatal_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Pl_Fatal_Error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @Pl_Fatal_Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @Pl_Fatal_Error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ bold(char *);
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
void cmBold(char *str) { printColor(bold(str)); }


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

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

LLVM IR (-O0):
define void @cmBold(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bold(i8* %3)
%5 = call i32 @printColor(i32 %4)
ret void
}

LLVM IR (-O2):
define void @cmBold(i8* %0) {
%2 = tail call i32 @bold(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
/* Variables and functions */
int cpuid_scan(char *);
bool bhyve_check(void) { return cpuid_scan("bhyve bhyve "); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"bhyve bhyve \00"
define i32 @bhyve_check() {
%1 = tail call i32 @cpuid_scan(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void __attribute__((dllimport, dllexport)) precedence1A() {}


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

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

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

LLVM IR (-O2):
define void @precedence1A() {
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
char toupper(char c) { return islower(c) ? c + 'A' - 'a' : c; }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1143 <toupper+0x33>
movsbl -0x1(%rbp),%eax
add    $0x41,%eax
sub    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <toupper+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @toupper(i8 signext %0) {
%2 = tail call i64 @islower(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
int func2(int);
int /*<<< orphan*/ printf(char *, int);
int func(int n) {
  int x;
  x = n;
  printf("%d ", x);
  if (x > 0)
    return func(n - 5);
  if (x <= 0)
    return func2(x + 5);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jle    116d <func+0x3d>
mov    -0x8(%rbp),%edi
sub    $0x5,%edi
call   1050 <func@plt>
mov    %eax,-0x4(%rbp)
jmp    1185 <func+0x55>
cmpl   $0x0,-0xc(%rbp)
jg     1185 <func+0x55>
mov    -0xc(%rbp),%edi
add    $0x5,%edi
call   1040 <func2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %edi,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    -0x5(%rbx),%edi
test   %ebx,%ebx
jg     1130 <func+0x10>
add    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <func2@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 5
%13 = call i32 @func(i32 %12)
store i32 %13, i32* %2
br label %21
14: ; preds = %1
%15 = load i32, i32* %4
%16 = icmp sle i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 5
%20 = call i32 @func2(i32 %19)
store i32 %20, i32* %2
br label %21
21: ; preds = %10, %17, %14
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @func(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp sgt i32 %3, 0
%6 = add nsw i32 %3, -5
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = add nsw i32 %3, 5
%9 = tail call i32 @func2(i32 %8)
ret i32 %9
}
/* Variables and functions */
double loglike_theta_fast(double *, int, void *);
double loglike_(double *x, int n, void *output, int *info) {
  return loglike_theta_fast(x, n, output);
}


x86 assembly (clang, -O0):
<loglike_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <loglike_theta_fast@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loglike_>:
jmp    1030 <loglike_theta_fast@plt>

LLVM IR (-O0):
define double @loglike_(double* %0, i32 %1, i8* %2, i32* %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
store double* %0, double** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load double*, double** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = call double @loglike_theta_fast(double* %9, i32 %10, i8* %11)
ret double %12
}

LLVM IR (-O2):
define double @loglike_(double* %0, i32 %1, i8* %2, i32* nocapture readnone %3) {
%5 = tail call double @loglike_theta_fast(double* %0, i32 %1, i8* %2)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void check(int line, char *file_name, int value) {
  if (!value)
    printf("error %d, %s", line, file_name);
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    113f <check+0x2f>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
test   %edx,%edx
je     1115 <check+0x5>
ret
mov    %rsi,%rax
mov    %edi,%esi
lea    0xedf(%rip),%rdi
mov    %rax,%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"error %d, %s\00"
define void @check(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11)
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"error %d, %s\00"
define void @check(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x4a() {
  Assert_real((isxdigit(74) == 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_isxdigit.c",
              375, ("isxdigit should be 0 for J"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x4a>:
push   %rax
mov    $0x4a,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x177,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for J\00"
define void @t_isxdigit_0x4a() {
%1 = call i64 @isxdigit(i32 74)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for J\00"
define void @t_isxdigit_0x4a() {
%1 = tail call i64 @isxdigit(i32 74)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_4Bint8_mem(signed char *val) {
  return ((*val) & (0x4B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_4Bint8_mem>:
testb  $0x4b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Bint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 75
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void closeOutput(FILE *fileout, char *previousLine) {
  if (previousLine[0] != '\0')
    fprintf(fileout, "\n");
  fclose(fileout);
  return;
}


x86 assembly (clang, -O0):
<closeOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <closeOutput+0x30>
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeOutput>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rsi)
je     1136 <closeOutput+0x16>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @closeOutput(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10, %2
%14 = load i32*, i32** %3
%15 = call i32 @fclose(i32* %14)
ret void
}

LLVM IR (-O2):
define void @closeOutput(i32* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @fputc(i32 10, i32* %0)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @fclose(i32* %0)
ret void
}
signed int Get_Long(void) {
  signed int i;
  i = Get_Word();
  signed int return_value_Get_Word$1;
  return_value_Get_Word$1 = Get_Word();
  return i << 16 | return_value_Get_Word$1;
}


x86 assembly (clang, -O0):
<Get_Long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Get_Word@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Get_Word@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
or     -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_Long>:
push   %rbx
xor    %eax,%eax
call   1030 <Get_Word@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Get_Word@plt>
shl    $0x10,%ebx
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Get_Long() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @Get_Word()
store i32 %3, i32* %1
%4 = call i32 (...) @Get_Word()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = shl i32 %5, 16
%7 = load i32, i32* %2
%8 = or i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @Get_Long() {
%1 = tail call i32 (...) @Get_Word()
%2 = tail call i32 (...) @Get_Word()
%3 = shl i32 %1, 16
%4 = or i32 %3, %2
ret i32 %4
}
/* Variables and functions */
char *ey_fileextension(char const *);
int /*<<< orphan*/ strcmp(char const *, char *);
int ey_file_is_signature(const char *filename) {
  const char *ext = ey_fileextension(filename);
  if (ext[0])
    ext++;
  return !strcmp(ext, "ey");
}


x86 assembly (clang, -O0):
<ey_file_is_signature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ey_fileextension@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <ey_file_is_signature+0x32>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ey_file_is_signature>:
push   %rax
call   1030 <ey_fileextension@plt>
cmpb   $0x1,(%rax)
sbb    $0xffffffffffffffff,%rax
lea    0xecc(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ey\00"
define i32 @ey_file_is_signature(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @ey_fileextension(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %1
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"ey\00"
define i32 @ey_file_is_signature(i8* %0) {
%2 = tail call i8* @ey_fileextension(i8* %0)
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
%5 = zext i1 %4 to i64
%6 = getelementptr i8, i8* %2, i64 %5
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}