xunge/DecIR huggingface dataset:
/* Variables and functions */
int rsp_socket_internal(int, int, int, int);
int rsp_socket(int domain, int type, int protocol) {
  return (rsp_socket_internal(domain, type, protocol, -1));
}


x86 assembly (clang, -O0):
<rsp_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%ecx
call   1030 <rsp_socket_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsp_socket>:
mov    $0xffffffff,%ecx
jmp    1030 <rsp_socket_internal@plt>

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

LLVM IR (-O2):
define i32 @rsp_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @rsp_socket_internal(i32 %0, i32 %1, i32 %2, i32 -1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_greater_or_equal(void) {
  gen_pop();
  gen_call("ccge");
}


x86 assembly (clang, -O0):
<gen_greater_or_equal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_greater_or_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ccge\00"
define void @gen_greater_or_equal() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccge\00"
define void @gen_greater_or_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/cubicdaiya/h2o/refs/heads/"
               "master/include/h2o/h2o/memory.h"
               ":"
               "330"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cubicdaiya/h2o/refs/heads/master/include/h2o/h2o/memory.h:330:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cubicdaiya/h2o/refs/heads/master/include/h2o/h2o/memory.h:330:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ width;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcreatewindow_width(void *_p) {
  return (int)((XEvent *)_p)->xcreatewindow.width;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xcreatewindow_width(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 /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ tolower(int /*<<< orphan*/);
wint_t towlower(wint_t wc) { return tolower(wc); }


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

x86 assembly (clang, -O2):
<towlower>:
jmp    1030 <tolower@plt>

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

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
ret i32 %2
}
OP(dd, a1) {
  illegal_1();
  op_a1();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_a1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_a1@plt>

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 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_a1()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_a1()
ret i32 undef
}
void warn_err_obj_line(const char *obj, int line) {
  do {
    char *msg;
    if ((msg = errmsg_err_obj_line(obj, line)) != ((void *)0)) {
      do_dispatch_message(msg);
      free(msg);
    } else {
      fallback_warn();
    }
  } while (0);
}


x86 assembly (clang, -O0):
<warn_err_obj_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1050 <errmsg_err_obj_line@plt>
cltq
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1186 <warn_err_obj_line+0x46>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1060 <do_dispatch_message@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    118d <warn_err_obj_line+0x4d>
mov    $0x0,%al
call   1040 <fallback_warn@plt>
jmp    1192 <warn_err_obj_line+0x52>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn_err_obj_line>:
push   %rbx
xor    %eax,%eax
call   1050 <errmsg_err_obj_line@plt>
test   %eax,%eax
je     1162 <warn_err_obj_line+0x22>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <do_dispatch_message@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <fallback_warn@plt>

LLVM IR (-O0):
define void @warn_err_obj_line(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @errmsg_err_obj_line to i32 (i8*, i32, ...)*)(i8* %7, i32 %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %6
%14 = load i8*, i8** %5
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @do_dispatch_message to i32 (i8*, ...)*)(i8* %14)
%16 = load i8*, i8** %5
br label %19
17: ; preds = %6
%18 = call i32 (...) @fallback_warn()
br label %19
19: ; preds = %17, %13
br label %20
20: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @warn_err_obj_line(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @errmsg_err_obj_line to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @do_dispatch_message to i32 (i8*, ...)*)(i8* %5)
tail call void @free(i8* %5)
br label %11
9: ; preds = %2
%10 = tail call i32 (...) @fallback_warn()
br label %11
11: ; preds = %9, %7
ret void
}
int octave_wuntraced_wrapper(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @octave_wuntraced_wrapper() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SII9234_HW_Reset();
int /*<<< orphan*/ printk(char *);
void MHD_HW_Reset(void) {
  printk("[SIMG]MHD_HW_Reset == Start == \n");
  SII9234_HW_Reset();
  printk("[SIMG] MHD_HW_Reset == End == \n");
}


x86 assembly (clang, -O0):
<MHD_HW_Reset>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printk@plt>
mov    $0x0,%al
call   1040 <SII9234_HW_Reset@plt>
lea    0xee3(%rip),%rdi
call   1030 <printk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MHD_HW_Reset>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
call   1040 <SII9234_HW_Reset@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <printk@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"[SIMG]MHD_HW_Reset == Start == \0A\00"
@.str.1 = [32 x i8] c"[SIMG] MHD_HW_Reset == End == \0A\00"
define void @MHD_HW_Reset() {
%1 = call i32 @printk(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @SII9234_HW_Reset()
%3 = call i32 @printk(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"[SIMG]MHD_HW_Reset == Start == \0A\00"
@.str.1 = [32 x i8] c"[SIMG] MHD_HW_Reset == End == \0A\00"
define void @MHD_HW_Reset() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @SII9234_HW_Reset()
%3 = tail call i32 @printk(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float a;
  a = (3.31e-8 * 2.01e-7) / (7.16e-6 * 2.01e-8);
  printf("The answer is %g\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The answer is %g\0A\00"
define i32 @main() {
%1 = alloca float
store float 0x3FA7AB5580000000, float* %1
%2 = load float, float* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The answer is %g\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), float 0x3FA7AB5580000000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int kill_connection(uint8_t *payload, int size) { return -1; }


x86 assembly (clang, -O0):
<kill_connection>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @kill_connection(i32* nocapture readnone %0, i32 %1) {
ret i32 -1
}
long double acceleration_forceMass(long double F, long double M) {
  return F / M;
}


x86 assembly (clang, -O0):
<acceleration_forceMass>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fdivrp %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<acceleration_forceMass>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fdivp  %st,%st(1)
ret

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

LLVM IR (-O2):
define x86_fp80 @acceleration_forceMass(x86_fp80 %0, x86_fp80 %1) {
%3 = fdiv x86_fp80 %0, %1
ret x86_fp80 %3
}
void init_ubjson(struct v7 *v7) { (void)v7; }


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

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

LLVM IR (-O0):
%struct.v7 = type opaque
define void @init_ubjson(%struct.v7* %0) {
%2 = alloca %struct.v7*
store %struct.v7* %0, %struct.v7** %2
%3 = load %struct.v7*, %struct.v7** %2
ret void
}

LLVM IR (-O2):
%struct.v7 = type opaque
define void @init_ubjson(%struct.v7* nocapture %0) {
ret void
}
/* Variables and functions */
int get_rn_int(int *);
int fget_rn_int(int **genptr) { return get_rn_int(*genptr); }


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

x86 assembly (clang, -O2):
<fget_rn_int>:
mov    (%rdi),%rdi
jmp    1030 <get_rn_int@plt>

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

LLVM IR (-O2):
define i32 @fget_rn_int(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @get_rn_int(i32* %2)
ret i32 %3
}
/* Variables and functions */
scalar_t__ loadelf(int, unsigned int *);
int main(int argc, char *argv[]) {
  void (*app_vector)(void);
  unsigned int entry_point = 0;
  if (loadelf(0x6000, &entry_point)) {
    (*(volatile unsigned int *)(0x80000000)) = -1;
  } else {
    void (*app_vector)(void) = (void (*)(void))entry_point;
    app_vector();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x6000,%edi
lea    -0x1c(%rbp),%rsi
call   1030 <loadelf@plt>
cmp    $0x0,%rax
je     1155 <main+0x45>
mov    $0x80000000,%eax
movl   $0xffffffff,(%rax)
jmp    115f <main+0x4f>
mov    -0x1c(%rbp),%eax
mov    %rax,-0x28(%rbp)
call   *-0x28(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x6000,%edi
call   1030 <loadelf@plt>
test   %rax,%rax
je     113a <main+0x2a>
mov    $0x80000000,%eax
movl   $0xffffffff,(%rax)
jmp    1140 <main+0x30>
mov    0x4(%rsp),%eax
call   *%rax
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca void ()*
%7 = alloca i32
%8 = alloca void ()*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%9 = call i64 @loadelf(i32 24576, i32* %7)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store volatile i32 -1, i32* inttoptr (i64 2147483648 to i32*)
br label %17
12: ; preds = %2
%13 = load i32, i32* %7
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to void ()*
store void ()* %15, void ()** %8
%16 = load void ()*, void ()** %8
br label %17
17: ; preds = %12, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i64 @loadelf(i32 24576, i32* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %2
store volatile i32 -1, i32* inttoptr (i64 2147483648 to i32*)
br label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to void ()*
br label %12
12: ; preds = %8, %7
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void debug_print_int(int i) {
  FILE *f = fopen("debug", "a+");
  fprintf(f, "%d\n", i);
  fclose(f);
}


x86 assembly (clang, -O0):
<debug_print_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_print_int>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"debug\00"
@.str.1 = [3 x i8] c"a+\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define void @debug_print_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i32, i32* %2
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"debug\00"
@.str.1 = [3 x i8] c"a+\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define void @debug_print_int(i32 %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void save_free(char *name, char *file, int line, void *ptr) {
  if (ptr != NULL)
    free(ptr);
}


x86 assembly (clang, -O0):
<save_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     113b <save_free+0x2b>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_free>:
test   %rcx,%rcx
je     111d <save_free+0xd>
mov    %rcx,%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @save_free(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @free(i8* %3)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int four_bytes(int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int rotate(int, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", rotate(0x1, -1));
  printf("%x\n", four_bytes(0xff, 0xaa, 0xbb, 0xcc));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1050 <rotate@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    $0xff,%edi
mov    $0xaa,%esi
mov    $0xbb,%edx
mov    $0xcc,%ecx
call   1030 <four_bytes@plt>
mov    %eax,%esi
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1050 <rotate@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xff,%edi
mov    $0xaa,%esi
mov    $0xbb,%edx
mov    $0xcc,%ecx
call   1030 <four_bytes@plt>
lea    0xe96(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @rotate(i32 1, i32 -1)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @four_bytes(i32 255, i32 170, i32 187, i32 204)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @rotate(i32 1, i32 -1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @four_bytes(i32 255, i32 170, i32 187, i32 204)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int c066(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c066() {
ret i32 0
}
void initString(char opfer[]) {
  for (int i = 0; i <= sizeof(opfer); i++)
    opfer[i] = '\0';
}


x86 assembly (clang, -O0):
<initString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x8,%rax
ja     1137 <initString+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <initString+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initString>:
movb   $0x0,0x8(%rdi)
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @initString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = icmp ule i64 %6, 8
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @initString(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int opt_incr(char *arg, void *data) {
  assert(!arg && data);
  ++*(int *)data;
  return 0;
}


x86 assembly (clang, -O0):
<opt_incr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    113b <opt_incr+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_incr>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
sete   %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
addl   $0x1,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @opt_incr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %4
%15 = bitcast i8* %14 to i32*
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %15
ret i32 0
}

LLVM IR (-O2):
define i32 @opt_incr(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = bitcast i8* %1 to i32*
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
ret i32 0
}
float decimalday(int h, int m, int s) {
  return (h + m / (double)60) / (double)24;
}


x86 assembly (clang, -O0):
<decimalday>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xee9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimalday>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  0xef0(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  0xeec(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @decimalday(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 = sitofp i32 %7 to double
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 6.000000e+01
%12 = fadd double %8, %11
%13 = fdiv double %12, 2.400000e+01
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @decimalday(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %0 to double
%5 = sitofp i32 %1 to double
%6 = fdiv double %5, 6.000000e+01
%7 = fadd double %6, %4
%8 = fdiv double %7, 2.400000e+01
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void val_destructor(void *privdata, void *val) {
  if (val != NULL)
    free(val);
}


x86 assembly (clang, -O0):
<val_destructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1134 <val_destructor+0x24>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_destructor>:
test   %rsi,%rsi
je     111d <val_destructor+0xd>
mov    %rsi,%rdi
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @val_destructor(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @val_destructor(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
__typeof__(strcpy(1, 1)) test_strcpy_150(void) { return strcpy(1, 1); }


x86 assembly (clang, -O0):
<test_strcpy_150>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %rsi,%rdi
call   1030 <strcpy@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @test_strcpy_150() {
%1 = call i8* @strcpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*))
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_strcpy_150() {
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ la_fhexdump(int /*<<< orphan*/, char const *, size_t);
int /*<<< orphan*/ stdout;
void la_hexdump(const char *buf, size_t len) { la_fhexdump(stdout, buf, len); }


x86 assembly (clang, -O0):
<la_hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <la_fhexdump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<la_hexdump>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <la_fhexdump@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @la_hexdump(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @la_fhexdump(i32 %5, i8* %6, i64 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @la_hexdump(i8* %0, i64 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @la_fhexdump(i32 %3, i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
scalar_t__ xmalloc(scalar_t__);
char *xstrdup(const char *s) {
  char *p;
  p = (char *)xmalloc(strlen(s) + 1);
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @xmalloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @xmalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
struct wl_seat_listener {
  int dummy;
};
struct wl_seat {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int wl_proxy_add_listener(struct wl_proxy *, void (*)(), void *);
int wl_seat_add_listener(struct wl_seat *wl_seat,
                         const struct wl_seat_listener *listener, void *data) {
  return wl_proxy_add_listener((struct wl_proxy *)wl_seat,
                               (void (**)(void))listener, data);
}


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

x86 assembly (clang, -O2):
<wl_seat_add_listener>:
jmp    1030 <wl_proxy_add_listener@plt>

LLVM IR (-O0):
%struct.wl_seat = type { i32 }
%struct.wl_seat_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_seat_add_listener(%struct.wl_seat* %0, %struct.wl_seat_listener* %1, i8* %2) {
%4 = alloca %struct.wl_seat*
%5 = alloca %struct.wl_seat_listener*
%6 = alloca i8*
store %struct.wl_seat* %0, %struct.wl_seat** %4
store %struct.wl_seat_listener* %1, %struct.wl_seat_listener** %5
store i8* %2, i8** %6
%7 = load %struct.wl_seat*, %struct.wl_seat** %4
%8 = bitcast %struct.wl_seat* %7 to %struct.wl_proxy*
%9 = load %struct.wl_seat_listener*, %struct.wl_seat_listener** %5
%10 = bitcast %struct.wl_seat_listener* %9 to void ()**
%11 = bitcast void ()** %10 to void (...)*
%12 = load i8*, i8** %6
%13 = call i32 @wl_proxy_add_listener(%struct.wl_proxy* %8, void (...)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.wl_seat = type { i32 }
%struct.wl_seat_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_seat_add_listener(%struct.wl_seat* %0, %struct.wl_seat_listener* %1, i8* %2) {
%4 = bitcast %struct.wl_seat* %0 to %struct.wl_proxy*
%5 = bitcast %struct.wl_seat_listener* %1 to void (...)*
%6 = tail call i32 @wl_proxy_add_listener(%struct.wl_proxy* %4, void (...)* %5, i8* %2)
ret i32 %6
}
unsigned long dwReverse(unsigned int data) {
  unsigned char *dataElems = (unsigned char *)&data;
  return (unsigned long)((dataElems[0] << 24) | (dataElems[1] << 16) |
                         (dataElems[2] << 8) | dataElems[3]);
}


x86 assembly (clang, -O0):
<dwReverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<dwReverse>:
bswap  %edi
movslq %edi,%rax
ret

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

LLVM IR (-O2):
define i64 @dwReverse(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
%3 = sext i32 %2 to i64
ret i64 %3
}
void foo736() {}


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

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

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

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

/* Variables and functions */
int16_t unpack_int16(const char *target, int swap_endian) {
  if (swap_endian) {
    char buffer[2] = {target[1], target[0]};
    return *(int16_t *)(buffer);
  } else {
    return *(int16_t *)(target);
  }
}


x86 assembly (clang, -O0):
<unpack_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1133 <unpack_int16+0x33>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x16(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x15(%rbp)
mov    -0x16(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <unpack_int16+0x3c>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_int16>:
test   %esi,%esi
je     110d <unpack_int16+0xd>
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @unpack_int16(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = load i8, i8* %0
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 8
%10 = zext i8 %6 to i32
%11 = or i32 %9, %10
br label %15
12: ; preds = %2
%13 = bitcast i8* %0 to i32*
%14 = load i32, i32* %13
br label %15
15: ; preds = %12, %4
%16 = phi i32 [ %11, %4 ], [ %14, %12 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ pkey_write_deny(int /*<<< orphan*/);
int read_ptr(int *);
int /*<<< orphan*/ sigsafe_printf(char *, ...);
void test_read_of_write_disabled_region(int *ptr, uint16_t pkey) {
  int ptr_contents;
  do {
    if (1 <= 0)
      sigsafe_printf("disabling write access to PKEY[1], doing read\n");
    fflush(NULL);
  } while (0);
  pkey_write_deny(pkey);
  ptr_contents = read_ptr(ptr);
  do {
    if (1 <= 0)
      sigsafe_printf("*ptr: %d\n", ptr_contents);
    fflush(NULL);
  } while (0);
  do {
    if (1 <= 0)
      sigsafe_printf("\n");
    fflush(NULL);
  } while (0);
}


x86 assembly (clang, -O0):
<test_read_of_write_disabled_region>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
mov    -0xc(%rbp),%edi
call   1030 <pkey_write_deny@plt>
mov    -0x8(%rbp),%rdi
call   1040 <read_ptr@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
jmp    116a <test_read_of_write_disabled_region+0x3a>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_read_of_write_disabled_region>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
call   1050 <fflush@plt>
mov    %ebx,%edi
call   1030 <pkey_write_deny@plt>
mov    %r14,%rdi
call   1040 <read_ptr@plt>
xor    %edi,%edi
call   1050 <fflush@plt>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fflush@plt>

LLVM IR (-O0):
define void @test_read_of_write_disabled_region(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %2
%7 = call i32 @fflush(i32* null)
br label %8
8: ; preds = %6
%9 = load i32, i32* %4
%10 = call i32 @pkey_write_deny(i32 %9)
%11 = load i32*, i32** %3
%12 = call i32 @read_ptr(i32* %11)
store i32 %12, i32* %5
br label %13
13: ; preds = %8
%14 = call i32 @fflush(i32* null)
br label %15
15: ; preds = %13
br label %16
16: ; preds = %15
%17 = call i32 @fflush(i32* null)
br label %18
18: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @test_read_of_write_disabled_region(i32* %0, i32 %1) {
%3 = tail call i32 @fflush(i32* null)
%4 = tail call i32 @pkey_write_deny(i32 %1)
%5 = tail call i32 @read_ptr(i32* %0)
%6 = tail call i32 @fflush(i32* null)
%7 = tail call i32 @fflush(i32* null)
ret void
}
void pointer_arith3(char *p, int x) {
  int len = 5;
  (p + x)[10 - x] = 0;
}


x86 assembly (clang, -O0):
<pointer_arith3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    $0xa,%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_arith3>:
movb   $0x0,0xa(%rdi)
ret

LLVM IR (-O0):
define void @pointer_arith3(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 5, i32* %5
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i32, i32* %4
%11 = sub nsw i32 10, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
define void @pointer_arith3(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = sub nsw i32 10, %1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
ret void
}
int execute_keyctl() { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_THREADID_set_numeric(int /*<<< orphan*/ *,
                                               unsigned long);
scalar_t__ pthread_self();
void SSL_pthreads_thread_id(CRYPTO_THREADID *id) {
  CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<SSL_pthreads_thread_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
call   1030 <CRYPTO_THREADID_set_numeric@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_pthreads_thread_id>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <CRYPTO_THREADID_set_numeric@plt>

LLVM IR (-O0):
define void @SSL_pthreads_thread_id(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 (...) @pthread_self()
%5 = call i32 @CRYPTO_THREADID_set_numeric(i32* %3, i64 %4)
ret void
}

LLVM IR (-O2):
define void @SSL_pthreads_thread_id(i32* %0) {
%2 = tail call i64 (...) @pthread_self()
%3 = tail call i32 @CRYPTO_THREADID_set_numeric(i32* %0, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void WatchdogStallDisable(unsigned long ulBase) {
  DEBUG_ASSERT((ulBase == 0x40000000) || (ulBase == 0x40001000));
  (*((volatile unsigned long *)(ulBase + 0x00000418))) &= ~(0x00000100);
}


x86 assembly (clang, -O0):
<WatchdogStallDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x40000000,-0x8(%rbp)
40
mov    %al,-0x9(%rbp)
je     113d <WatchdogStallDisable+0x2d>
cmpq   $0x40001000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x418(%rax),%rcx
and    $0xfffffffffffffeff,%rcx
mov    %rcx,0x418(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogStallDisable>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40000000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
andq   $0xfffffffffffffeff,0x418(%rbx)
ff fe ff ff
pop    %rbx
ret

LLVM IR (-O0):
define void @WatchdogStallDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1073741824
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 1073745920
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @DEBUG_ASSERT(i32 %10)
%12 = load i64, i64* %2
%13 = add i64 %12, 1048
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = and i64 %15, -257
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @WatchdogStallDisable(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073741824
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = add i64 %0, 1048
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -257
store volatile i64 %9, i64* %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void WriteElementEndExpression(int currentIdx, int length, FILE *out) {
  if (currentIdx != length) {
    fputs("  ,\n", out);
  } else {
    fputc('\n', out);
  }
  return;
}


x86 assembly (clang, -O0):
<WriteElementEndExpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1153 <WriteElementEndExpression+0x33>
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <fputs@plt>
jmp    1161 <WriteElementEndExpression+0x41>
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteElementEndExpression>:
mov    %rdx,%rcx
cmp    %esi,%edi
jne    1134 <WriteElementEndExpression+0x14>
mov    $0xa,%edi
mov    %rcx,%rsi
jmp    1030 <fputc@plt>
lea    0xec5(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1040 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c" ,\0A\00"
define void @WriteElementEndExpression(i32 %0, i32 %1, i32* nocapture %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 4, i64 1, i32* %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @fputc(i8 signext 10, i32* %2)
br label %9
9: ; preds = %7, %5
ret void
}