xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _dtype_normalize(char *, char const *);
int big_file_dtype_kind(const char *dtype) {
  char ndtype[8];
  _dtype_normalize(ndtype, dtype);
  return ndtype[1];
}


x86 assembly (clang, -O0):
<big_file_dtype_kind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <_dtype_normalize@plt>
movsbl -0xf(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big_file_dtype_kind>:
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <_dtype_normalize@plt>
movsbl 0x1(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @big_file_dtype_kind(i8* %0) {
%2 = alloca i8*
%3 = alloca [8 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @_dtype_normalize(i8* %4, i8* %5)
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 1
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @big_file_dtype_kind(i8* %0) {
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%4 = call i32 @_dtype_normalize(i8* %3, i8* %0)
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
ret i32 %7
}
/* Type definitions */
struct triangle_set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct triangle_set *);
void triangle_set_free(struct triangle_set *set) { free(set); }


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

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

LLVM IR (-O2):
%struct.triangle_set = type { i32 }
define void @triangle_set_free(%struct.triangle_set* nocapture %0) {
%2 = tail call i32 @free(%struct.triangle_set* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_func(int);
void caller() { my_func(0xdede); }


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

x86 assembly (clang, -O2):
<caller>:
mov    $0xdede,%edi
jmp    1030 <my_func@plt>

LLVM IR (-O0):
define void @caller() {
%1 = call i32 @my_func(i32 57054)
ret void
}

LLVM IR (-O2):
define void @caller() {
%1 = tail call i32 @my_func(i32 57054)
ret void
}
void __libvpi_c_dummy_function(void) {}


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

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

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

LLVM IR (-O2):
define void @__libvpi_c_dummy_function() {
ret void
}
int compare_long(long a, long b) {
  if (a < b) {
    return -1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<compare_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1126 <compare_long+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    112d <compare_long+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_long>:
xor    %eax,%eax
cmp    %rsi,%rdi
setge  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_long(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i32 -1, i32 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ indirectly();
int /*<<< orphan*/ readmem65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc8(int /*<<< orphan*/);
void sbcIndirectLongy8(void) { sbc8(readmem65816(indirectly())); }


x86 assembly (clang, -O0):
<sbcIndirectLongy8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <indirectly@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
call   1030 <sbc8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbcIndirectLongy8>:
push   %rax
xor    %eax,%eax
call   1040 <indirectly@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sbc8@plt>

LLVM IR (-O0):
define void @sbcIndirectLongy8() {
%1 = call i32 (...) @indirectly()
%2 = call i32 @readmem65816(i32 %1)
%3 = call i32 @sbc8(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sbcIndirectLongy8() {
%1 = tail call i32 (...) @indirectly()
%2 = tail call i32 @readmem65816(i32 %1)
%3 = tail call i32 @sbc8(i32 %2)
ret void
}
int ti_acos_start(double const *options) {
  (void)options;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @ti_acos_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @ti_acos_start(double* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct perf_fd {
  int dummy;
};
struct perf_event_attr {
  int dummy;
};

/* Variables and functions */
int perf_fd_open_other(struct perf_fd *, struct perf_event_attr *, int,
                       int /*<<< orphan*/, int);
int perf_fd_open(struct perf_fd *p, struct perf_event_attr *attr,
                 int buf_size_shift) {
  return perf_fd_open_other(p, attr, buf_size_shift, 0, -1);
}


x86 assembly (clang, -O0):
<perf_fd_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
call   1030 <perf_fd_open_other@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perf_fd_open>:
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
jmp    1030 <perf_fd_open_other@plt>

LLVM IR (-O0):
%struct.perf_fd = type { i32 }
%struct.perf_event_attr = type { i32 }
define i32 @perf_fd_open(%struct.perf_fd* %0, %struct.perf_event_attr* %1, i32 %2) {
%4 = alloca %struct.perf_fd*
%5 = alloca %struct.perf_event_attr*
%6 = alloca i32
store %struct.perf_fd* %0, %struct.perf_fd** %4
store %struct.perf_event_attr* %1, %struct.perf_event_attr** %5
store i32 %2, i32* %6
%7 = load %struct.perf_fd*, %struct.perf_fd** %4
%8 = load %struct.perf_event_attr*, %struct.perf_event_attr** %5
%9 = load i32, i32* %6
%10 = call i32 @perf_fd_open_other(%struct.perf_fd* %7, %struct.perf_event_attr* %8, i32 %9, i32 0, i32 -1)
ret i32 %10
}

LLVM IR (-O2):
%struct.perf_fd = type { i32 }
%struct.perf_event_attr = type { i32 }
define i32 @perf_fd_open(%struct.perf_fd* %0, %struct.perf_event_attr* %1, i32 %2) {
%4 = tail call i32 @perf_fd_open_other(%struct.perf_fd* %0, %struct.perf_event_attr* %1, i32 %2, i32 0, i32 -1)
ret i32 %4
}
void rop3_132_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_132_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_132_0_0>:
xor    (%rdi),%dl
not    %dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_132_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_132_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = xor i8 %5, -1
%7 = and i8 %6, %1
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void fMeld(char meldung[], bool leaveProg) {
  printf("\n\n  FEHLER: %s\n\n", meldung);
  if (leaveProg)
    exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fMeld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1157 <fMeld+0x37>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fMeld>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
test   %ebx,%ebx
jne    1138 <fMeld+0x18>
pop    %rbx
ret
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"\0A\0A FEHLER: %s\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @fMeld(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
scalar_t__ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
off_t getFileLength(int fd) {
  off_t length = lseek(fd, 0, SEEK_END);
  lseek(fd, 0, SEEK_SET);
  if (length < 0) {
    return 0;
  }
  return length;
}


x86 assembly (clang, -O0):
<getFileLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
cmpq   $0x0,-0x18(%rbp)
jge    115d <getFileLength+0x4d>
movq   $0x0,-0x8(%rbp)
jmp    1165 <getFileLength+0x55>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileLength>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    0x2eca(%rip),%rax
mov    (%rax),%edx
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %rax,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    %r14d,%edi
xor    %esi,%esi
call   1030 <lseek@plt>
test   %rbp,%rbp
cmovns %rbp,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @getFileLength(i32 %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i64 @lseek(i32 %0, i32 0, i32 %2)
%4 = load i32, i32* @SEEK_SET
%5 = tail call i64 @lseek(i32 %0, i32 0, i32 %4)
%6 = icmp sgt i64 %3, 0
%7 = select i1 %6, i64 %3, i64 0
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void print_error_continue(const char *msg) {
  perror(msg);
  fprintf(stderr, "Trying to proceed anyway...\n");
}


x86 assembly (clang, -O0):
<print_error_continue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error_continue>:
push   %rax
call   1040 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Trying to proceed anyway...\0A\00"
define void @print_error_continue(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Trying to proceed anyway...\0A\00"
define void @print_error_continue(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int load_shader_file(void const *, size_t, char *, void *, void *, int);
int load_fshader(void const *key, size_t size, void *data, void *link) {
  if (size == 0) {
    return -1;
  }
  return load_shader_file(key, size - 1, ".frag", data, link, 0x8B30);
}


x86 assembly (clang, -O0):
<load_fshader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    113f <load_fshader+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <load_fshader+0x58>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xea6(%rip),%rdx
mov    $0x8b30,%r9d
call   1030 <load_shader_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_fshader>:
test   %rsi,%rsi
je     1131 <load_fshader+0x21>
mov    %rcx,%r8
mov    %rdx,%rcx
add    $0xffffffffffffffff,%rsi
lea    0xeda(%rip),%rdx
mov    $0x8b30,%r9d
jmp    1030 <load_shader_file@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c".frag\00"
define i32 @load_fshader(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = icmp eq i64 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = add i64 %1, -1
%8 = tail call i32 @load_shader_file(i8* %0, i64 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i32 35632)
br label %9
9: ; preds = %4, %6
%10 = phi i32 [ %8, %6 ], [ -1, %4 ]
ret i32 %10
}
void args_noop_trigger_v(void *user_data, const char *used,
                         const char *standard, char *value) {
  (void)user_data;
  (void)used;
  (void)standard;
  (void)value;
}


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

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

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

LLVM IR (-O2):
define void @args_noop_trigger_v(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          1579);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000044))) = ulIntFlags;
}


x86 assembly (clang, -O0):
<UARTIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    1153 <UARTIntClear+0x33>
lea    0xeb7(%rip),%rdi
mov    $0x62b,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x44(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    1144 <UARTIntClear+0x24>
lea    0xec6(%rip),%rdi
mov    $0x62b,%esi
call   1030 <AssertFailure@plt>
mov    %r14,0x44(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTIntClear(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 = call i32 @UARTBaseValid(i64 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1579)
br label %10
10: ; preds = %8, %2
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = add i64 %12, 68
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = tail call i32 @UARTBaseValid(i64 %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1579)
br label %7
7: ; preds = %5, %2
%8 = add i64 %0, 68
%9 = inttoptr i64 %8 to i64*
store volatile i64 %1, i64* %9
ret void
}
three3(a, b, c) { nop(); }


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

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

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

LLVM IR (-O2):
define i32 @three3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @nop()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ begin_server();
int /*<<< orphan*/ client_run();
int /*<<< orphan*/ parse_options(int, char **);
int /*<<< orphan*/ start_connect();
int main(int argc, char **argv) {
  parse_options(argc, argv);
  start_connect();
  begin_server();
  client_run();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <parse_options@plt>
mov    $0x0,%al
call   1050 <start_connect@plt>
mov    $0x0,%al
call   1060 <begin_server@plt>
mov    $0x0,%al
call   1030 <client_run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <parse_options@plt>
xor    %eax,%eax
call   1050 <start_connect@plt>
xor    %eax,%eax
call   1060 <begin_server@plt>
xor    %eax,%eax
call   1030 <client_run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @parse_options(i32 %5, i8** %6)
%8 = call i32 (...) @start_connect()
%9 = call i32 (...) @begin_server()
%10 = call i32 (...) @client_run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_options(i32 %0, i8** %1)
%4 = tail call i32 (...) @start_connect()
%5 = tail call i32 (...) @begin_server()
%6 = tail call i32 (...) @client_run()
ret i32 0
}
void RC4_options(void) {}


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

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

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

LLVM IR (-O2):
define void @RC4_options() {
ret void
}
/* Variables and functions */
scalar_t__ EOF;
int F();
scalar_t__ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int t1();
int t2();
int main(int argc, char *argv[]) {
  int result = 0;
  result |= t1();
  result |= t2();
  result |= F();
  result |= fflush(stdout) == EOF;
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <t1@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <t2@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <F@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e4f(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <t1@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <t2@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1030 <F@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e71(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
or     %ebx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@EOF = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 (...) @t1()
%8 = load i32, i32* %6
%9 = or i32 %8, %7
store i32 %9, i32* %6
%10 = call i32 (...) @t2()
%11 = load i32, i32* %6
%12 = or i32 %11, %10
store i32 %12, i32* %6
%13 = call i32 (...) @F()
%14 = load i32, i32* %6
%15 = or i32 %14, %13
store i32 %15, i32* %6
%16 = load i32, i32* @stdout
%17 = call i64 @fflush(i32 %16)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
%20 = zext i1 %19 to i32
%21 = load i32, i32* %6
%22 = or i32 %21, %20
store i32 %22, i32* %6
%23 = load i32, i32* %6
ret i32 %23
}

LLVM IR (-O2):
@stdout = global i32 0
@EOF = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @t1()
%4 = tail call i32 (...) @t2()
%5 = or i32 %4, %3
%6 = tail call i32 (...) @F()
%7 = or i32 %5, %6
%8 = load i32, i32* @stdout
%9 = tail call i64 @fflush(i32 %8)
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %9, %10
%12 = zext i1 %11 to i32
%13 = or i32 %7, %12
ret i32 %13
}
void MotePlatformP$SerialIdPin$clr(void) { HplAtm128GeneralIOPinP$4$IO$clr(); }


x86 assembly (clang, -O0):
<MotePlatformP$SerialIdPin$clr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplAtm128GeneralIOPinP$4$IO$clr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MotePlatformP$SerialIdPin$clr>:
xor    %eax,%eax
jmp    1030 <HplAtm128GeneralIOPinP$4$IO$clr@plt>

LLVM IR (-O0):
define void @"MotePlatformP$SerialIdPin$clr"() {
%1 = call i32 (...) @"HplAtm128GeneralIOPinP$4$IO$clr"()
ret void
}

LLVM IR (-O2):
define void @"MotePlatformP$SerialIdPin$clr"() {
%1 = tail call i32 (...) @"HplAtm128GeneralIOPinP$4$IO$clr"()
ret void
}
double dand(x, y)
double x, y;
{ return ((double)(x && y)); }


x86 assembly (clang, -O0):
<dand>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jne    1130 <dand+0x30>
jp     1130 <dand+0x30>
jmp    1147 <dand+0x47>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dand>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
setp   %al
setne  %cl
or     %al,%cl
ucomisd %xmm2,%xmm1
setp   %al
setne  %dl
or     %al,%dl
and    %cl,%dl
movzbl %dl,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @dand(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %4
%9 = fcmp une double %8, 0.000000e+00
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @dand(double %0, double %1) {
%3 = fcmp une double %0, 0.000000e+00
%4 = fcmp une double %1, 0.000000e+00
%5 = and i1 %3, %4
%6 = uitofp i1 %5 to double
ret double %6
}
char index_to_label(int i) {
  if (i < 24)
    return (((i) + 'a'));
  return (((i - 24) + 'a'));
}


x86 assembly (clang, -O0):
<index_to_label>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x18,-0x8(%rbp)
jge    111f <index_to_label+0x1f>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    112b <index_to_label+0x2b>
mov    -0x8(%rbp),%eax
sub    $0x18,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_to_label>:
cmp    $0x18,%edi
mov    $0x61,%ecx
mov    $0x49,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @index_to_label(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 24
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 97
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
br label %15
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 24
%13 = add nsw i32 %12, 97
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %10, %6
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @index_to_label(i32 %0) {
%2 = icmp slt i32 %0, 24
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 97, i8 73
%5 = add i8 %4, %3
ret i8 %5
}
/* Variables and functions */
long hash(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *input_word = malloc(201 * sizeof(char));
  long word_hash;
  scanf("%s", input_word);
  word_hash = hash(input_word);
  printf("%ld\n", word_hash);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc9,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1060 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <hash@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xc9,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rdi
mov    %rax,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(201) i8* @malloc(i32 201)
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i64 @hash(i8* %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}
void XrmInitialize() {}


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

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

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

LLVM IR (-O2):
define void @XrmInitialize() {
ret void
}
float convert_dist_m2ft(float m) { return (m / 0.3048); }


x86 assembly (clang, -O0):
<convert_dist_m2ft>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_dist_m2ft>:
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @convert_dist_m2ft(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 3.048000e-01
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @convert_dist_m2ft(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double %2, 3.048000e-01
%4 = fptrunc double %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ testNameToNumber();
int /*<<< orphan*/ testNumberToName();
int main(void) {
  testNumberToName();
  testNameToNumber();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testNumberToName()
%2 = tail call i32 (...) @testNameToNumber()
ret i32 0
}
int incrementPointby(int *point, int delta) {
  point[0] = ((point[0]) + delta);
  point[1] = ((point[1]) + delta);
}


x86 assembly (clang, -O0):
<incrementPointby>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
add    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<incrementPointby>:
add    %esi,(%rdi)
add    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
define i32 @incrementPointby(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32, i32* %5
%10 = add nsw i32 %8, %9
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 1
store i32 %17, i32* %19
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @incrementPointby(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
store i32 %4, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %1
store i32 %7, i32* %5
ret i32 undef
}
void be_uint8_write(void *ptr, unsigned v) {
  unsigned char *ptr8 = (unsigned char *)ptr;
  ptr8[0] = (unsigned char)v;
}


x86 assembly (clang, -O0):
<be_uint8_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_uint8_write>:
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @be_uint8_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %5
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
ret void
}

LLVM IR (-O2):
define void @be_uint8_write(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
ret void
}
/* Type definitions */
typedef scalar_t__ Window;

/* Variables and functions */
int abs(scalar_t__);
int window_ids_difference(Window win_one, Window win_two) {
  return (abs(win_one - win_two));
}


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

x86 assembly (clang, -O2):
<window_ids_difference>:
sub    %rsi,%rdi
jmp    1030 <abs@plt>

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

LLVM IR (-O2):
define i32 @window_ids_difference(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = tail call i32 @abs(i64 %3)
ret i32 %4
}
/* Variables and functions */
void *malloc(unsigned int);
void *orderly_internal_malloc(void *ctx, unsigned int sz) { return malloc(sz); }


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

x86 assembly (clang, -O2):
<orderly_internal_malloc>:
mov    %esi,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @orderly_internal_malloc(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %1)
ret i8* %3
}
void mfence(void) { __asm__ __volatile__("mfence" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @mfence() {
tail call void asm sideeffect "mfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
double sqrt(double);
double magn(double real, double imag) {
  return sqrt(real * real + imag * imag);
}


x86 assembly (clang, -O0):
<magn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magn>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <magn+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @magn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @magn(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
long evalfields();
int /*<<< orphan*/ test(char *);
long evalselect() {
  long val;
  val = evalfields();
  if (!test("select"))
    return (val);
}


x86 assembly (clang, -O0):
<evalselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <evalfields@plt>
mov    %rax,-0x10(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <test@plt>
cmp    $0x0,%eax
jne    1150 <evalselect+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalselect>:
push   %rbx
xor    %eax,%eax
call   1030 <evalfields@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
call   1040 <test@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"select\00"
define i64 @evalselect() {
%1 = tail call i64 (...) @evalfields()
%2 = tail call i32 @test(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i64 %1
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ machine;
  int /*<<< orphan*/ version;
  int /*<<< orphan*/ release;
  int /*<<< orphan*/ nodename;
  int /*<<< orphan*/ sysname;
};

/* Variables and functions */
int /*<<< orphan*/ uname(struct utsname *);
int main(void) {
  struct utsname buf;
  uname(&buf);
  (void)buf.sysname;
  (void)buf.nodename;
  (void)buf.release;
  (void)buf.version;
  (void)buf.machine;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <uname@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.utsname = type { i32, i32, i32, i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.utsname
store i32 0, i32* %1
%3 = call i32 @uname(%struct.utsname* %2)
%4 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 4
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 3
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 2
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 0
%13 = load i32, i32* %12
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i32, i32, i32, i32, i32 }
define i32 @main() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i32 @uname(%struct.utsname* %1)
ret i32 0
}
/* Variables and functions */
int odd(unsigned int);
int even(unsigned int n) {
  if (n == 0)
    return 1;
  if (n == 1)
    return 0;
  return odd(n - 1);
}


x86 assembly (clang, -O0):
<even>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <even+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1155 <even+0x45>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <even+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1155 <even+0x45>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <odd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<even>:
test   %edi,%edi
je     111c <even+0xc>
cmp    $0x1,%edi
jne    1122 <even+0x12>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret
add    $0xffffffff,%edi
jmp    1030 <odd@plt>

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

LLVM IR (-O2):
define i32 @even(i32 %0) {
switch i32 %0, label %3 [
i32 0, label %6
i32 1, label %2
]
2: ; preds = %1
br label %6
3: ; preds = %1
%4 = add i32 %0, -1
%5 = tail call i32 @odd(i32 %4)
br label %6
6: ; preds = %1, %3, %2
%7 = phi i32 [ 0, %2 ], [ %5, %3 ], [ 1, %1 ]
ret i32 %7
}
int check_any(const unsigned long long value,
              const unsigned long long check_value_data) {
  (void)value;
  (void)check_value_data;
  return 1;
}


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

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

LLVM IR (-O0):
define i32 @check_any(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
ret i32 1
}

LLVM IR (-O2):
define i32 @check_any(i64 %0, i64 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ FPULazyStackingEnable();
int /*<<< orphan*/ IrqInterruptEnable();
int /*<<< orphan*/ LedInit();
int /*<<< orphan*/ SysCtlClockSet(int);
int /*<<< orphan*/ TimeInit();
void Init(void) {
  FPULazyStackingEnable();
  SysCtlClockSet(0x01C00000 | 0x00000000 | 0x00000540 | 0x00000000);
  LedInit();
  TimeInit();
  IrqInterruptEnable();
}


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <FPULazyStackingEnable@plt>
mov    $0x1c00540,%edi
call   1030 <SysCtlClockSet@plt>
mov    $0x0,%al
call   1050 <LedInit@plt>
mov    $0x0,%al
call   1040 <TimeInit@plt>
mov    $0x0,%al
call   1070 <IrqInterruptEnable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
push   %rax
xor    %eax,%eax
call   1060 <FPULazyStackingEnable@plt>
mov    $0x1c00540,%edi
call   1030 <SysCtlClockSet@plt>
xor    %eax,%eax
call   1050 <LedInit@plt>
xor    %eax,%eax
call   1040 <TimeInit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <IrqInterruptEnable@plt>

LLVM IR (-O0):
define void @Init() {
%1 = call i32 (...) @FPULazyStackingEnable()
%2 = call i32 @SysCtlClockSet(i32 29361472)
%3 = call i32 (...) @LedInit()
%4 = call i32 (...) @TimeInit()
%5 = call i32 (...) @IrqInterruptEnable()
ret void
}

LLVM IR (-O2):
define void @Init() {
%1 = tail call i32 (...) @FPULazyStackingEnable()
%2 = tail call i32 @SysCtlClockSet(i32 29361472)
%3 = tail call i32 (...) @LedInit()
%4 = tail call i32 (...) @TimeInit()
%5 = tail call i32 (...) @IrqInterruptEnable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cvar_Set(char const *, char const *);
void SetCvar(const char *var_name, const char *var_value) {
  Cvar_Set(var_name, var_value);
}


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

x86 assembly (clang, -O2):
<SetCvar>:
jmp    1030 <Cvar_Set@plt>

LLVM IR (-O0):
define void @SetCvar(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 = load i8*, i8** %4
%7 = call i32 @Cvar_Set(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @SetCvar(i8* %0, i8* %1) {
%3 = tail call i32 @Cvar_Set(i8* %0, i8* %1)
ret void
}