xunge/DecIR huggingface dataset:
void chip16_init(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ clear_compression_mode_pg(struct list_head *);
uint8_t clear_t10k_comp(struct list_head *m) {
  ;
  return clear_compression_mode_pg(m);
}


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

x86 assembly (clang, -O2):
<clear_t10k_comp>:
jmp    1030 <clear_compression_mode_pg@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @clear_t10k_comp(%struct.list_head* %0) {
%2 = tail call i32 @clear_compression_mode_pg(%struct.list_head* %0)
ret i32 %2
}
void f_empty_goto_loop_multiple() {
f_empty_goto_loop_multiple_label_1:
  goto f_empty_goto_loop_multiple_label_2;
f_empty_goto_loop_multiple_label_2:
  goto f_empty_goto_loop_multiple_label_1;
}


x86 assembly (clang, -O0):
<f_empty_goto_loop_multiple>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f_empty_goto_loop_multiple+0x9>
jmp    110e <f_empty_goto_loop_multiple+0xe>
jmp    1109 <f_empty_goto_loop_multiple+0x9>

x86 assembly (clang, -O2):
<f_empty_goto_loop_multiple>:
jmp    1100 <f_empty_goto_loop_multiple>

LLVM IR (-O0):
define void @f_empty_goto_loop_multiple() {
br label %1
1: ; preds = %2, %0
br label %2
2: ; preds = %1
br label %1
}

LLVM IR (-O2):
define void @f_empty_goto_loop_multiple() {
br label %1
1: ; preds = %1, %0
br label %1
}
void pathdos(char *path) {
  int i;
  for (i = 0; path[i]; ++i)
    if (path[i] == '/')
      path[i] = '\\';
}


x86 assembly (clang, -O0):
<pathdos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <pathdos+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1142 <pathdos+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x5c,(%rax,%rcx,1)
jmp    1147 <pathdos+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <pathdos+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathdos>:
jmp    1117 <pathdos+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x5c,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1110 <pathdos+0x10>
test   %al,%al
jne    1113 <pathdos+0x13>
ret

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

LLVM IR (-O2):
define void @pathdos(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 47, label %6
]
6: ; preds = %2
store i8 92, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint8_t read_reg8(volatile uint8_t *reg) {
  return ((*((volatile uint32_t *)(reg))));
}


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

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

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

LLVM IR (-O2):
define i32 @read_reg8(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bgnpoint();
void bgnpoi_() { bgnpoint(); }


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

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

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

LLVM IR (-O2):
define void @bgnpoi_() {
%1 = tail call i32 (...) @bgnpoint()
ret void
}
/* Variables and functions */
int max_steps(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int rows, cols;
  scanf("%d %d", &rows, &cols);
  printf("%d\n", max_steps(rows, cols));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <max_steps@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <max_steps@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @max_steps(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
size_t read_FD_BE(int, int /*<<< orphan*/ *, int);
size_t int64ReadFromFD(int fd, int64_t *data) {
  return read_FD_BE(fd, data, sizeof(int64_t));
}


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

x86 assembly (clang, -O2):
<int64ReadFromFD>:
mov    $0x4,%edx
jmp    1030 <read_FD_BE@plt>

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

LLVM IR (-O2):
define i64 @int64ReadFromFD(i32 %0, i32* %1) {
%3 = tail call i64 @read_FD_BE(i32 %0, i32* %1, i32 4)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x38() {
  Assert_real((isspace(56) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              285, ("isspace should be 0 for 8"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for 8\00"
define void @t_isspace_0x38() {
%1 = tail call i64 @isspace(i32 56)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct smack_accesses {
  int dummy;
};

/* Variables and functions */
int accesses_add(struct smack_accesses *, char const *, char const *,
                 char const *, int /*<<< orphan*/ *);
int smack_accesses_add(struct smack_accesses *handle, const char *subject,
                       const char *object, const char *access_type) {
  return accesses_add(handle, subject, object, access_type, NULL);
}


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

x86 assembly (clang, -O2):
<smack_accesses_add>:
xor    %r8d,%r8d
jmp    1030 <accesses_add@plt>

LLVM IR (-O0):
%struct.smack_accesses = type { i32 }
define i32 @smack_accesses_add(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.smack_accesses*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.smack_accesses* %0, %struct.smack_accesses** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.smack_accesses*, %struct.smack_accesses** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @accesses_add(%struct.smack_accesses* %9, i8* %10, i8* %11, i8* %12, i32* null)
ret i32 %13
}

LLVM IR (-O2):
%struct.smack_accesses = type { i32 }
define i32 @smack_accesses_add(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @accesses_add(%struct.smack_accesses* %0, i8* %1, i8* %2, i8* %3, i32* null)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ memcpy(size_t *, void const *, int);
size_t MEM_read_ARCH(const void *p) {
  size_t r;
  memcpy(&r, p, sizeof(r));
  return r;
}


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

x86 assembly (clang, -O2):
<MEM_read_ARCH>:
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @MEM_read_ARCH(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i64* %3, i8* %4, i32 8)
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @MEM_read_ARCH(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @memcpy(i64* %2, i8* %0, i32 8)
%5 = load i64, i64* %2
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void mus_ldouble_to_char(unsigned char *j, double x) {
  unsigned char *ox = (unsigned char *)&x;
  memcpy((void *)j, (void *)ox, 8);
}


x86 assembly (clang, -O0):
<mus_ldouble_to_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_ldouble_to_char>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @mus_ldouble_to_char(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca i8*
store i8* %0, i8** %3
store double %1, double* %4
%6 = bitcast double* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %5
%9 = call i32 @memcpy(i8* %7, i8* %8, i32 8)
ret void
}

LLVM IR (-O2):
define void @mus_ldouble_to_char(i8* %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = bitcast double* %3 to i8*
%5 = call i32 @memcpy(i8* %0, i8* %4, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x85() {
  Assert_real((isalpha(133) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              670, ("isalpha should be 0 for 0x85"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x85\00"
define void @t_isalpha_0x85() {
%1 = tail call i64 @isalpha(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void main(void) {
  static union {
    struct {
      int x, y;
    } coord;
    unsigned long l;
  } u;
  u.coord.x = 10;
  u.coord.y = 20;
  u.l = 0x70000;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0xa,0x2f1a(%rip)
movl   $0x14,0x2f14(%rip)
movq   $0x70000,0x2f05(%rip)
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
%struct.anon = type { i32, i32 }
@main.u = internal global %union.anon zeroinitializer
define void @main() {
store i32 10, i32* getelementptr inbounds (%struct.anon, %struct.anon* bitcast (%union.anon* @main.u to %struct.anon*), i32 0, i32 0)
store i32 20, i32* getelementptr inbounds (%struct.anon, %struct.anon* bitcast (%union.anon* @main.u to %struct.anon*), i32 0, i32 1)
store i64 458752, i64* getelementptr inbounds (%union.anon, %union.anon* @main.u, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
void xSysTickIntDisable(void) {
  (*((volatile unsigned long *)(0xE000E010))) &= ~(0x00000002);
}


x86 assembly (clang, -O0):
<xSysTickIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    $0xe000e010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xSysTickIntDisable>:
mov    $0xe000e010,%eax
andq   $0xfffffffffffffffd,(%rax)
ret

LLVM IR (-O0):
define void @xSysTickIntDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
ret void
}

LLVM IR (-O2):
define void @xSysTickIntDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758153744 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 3758153744 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int);
int main() {
  int a = 12345;
  itoa(a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3039,%edi
call   1030 <itoa@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @itoa(i32 12345)
ret i32 0
}
void w3(void *x, double y) { *(double *)(x + 32765) = y; }


x86 assembly (clang, -O0):
<w3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ffd(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w3>:
movsd  %xmm0,0x7ffd(%rdi)
ret

LLVM IR (-O0):
define void @w3(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32765
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w3(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32765
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
long __syscall1(long __n, long __a1) {
  unsigned long __ret;
  __asm__ __volatile__("syscall"
                       : "=a"(__ret)
                       : "a"(__n), "D"(__a1)
                       : "rcx", "r11", "memory");
  return __ret;
}


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

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

LLVM IR (-O0):
define i64 @__syscall1(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @__syscall1(i64 %0, i64 %1) {
%3 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int equal_string(void *s1, void *s2) {
  if (strcmp((char *)s1, (char *)s2) == 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1143 <equal_string+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <equal_string+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gpio_write_bit(int, char);
void led_write_2(char value) { gpio_write_bit(6, value); }


x86 assembly (clang, -O0):
<led_write_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x6,%edi
movsbl -0x1(%rbp),%esi
call   1030 <gpio_write_bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_write_2>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <gpio_write_bit@plt>

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

LLVM IR (-O2):
define void @led_write_2(i8 signext %0) {
%2 = tail call i32 @gpio_write_bit(i32 6, i8 signext %0)
ret void
}
void gdk_screen_list_visuals() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ getpgrp();
pid_t c_getpgrp_() { return getpgrp(); }


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

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

LLVM IR (-O0):
define i32 @c_getpgrp_() {
%1 = call i32 (...) @getpgrp()
ret i32 %1
}

LLVM IR (-O2):
define i32 @c_getpgrp_() {
%1 = tail call i32 (...) @getpgrp()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main(void) {
  FILE *fp = fopen("hehe.txt", "w");
  if (fp == NULL)
    exit(EXIT_FAILURE);
  fprintf(fp, "how are your!");
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeac(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <main+0x3f>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1181 <main+0x41>
mov    %rax,%rbx
lea    0xea8(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"hehe.txt\00"
@.str.1 = [2 x i8] c"w\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [14 x i8] c"how are your!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i32*, i32** %2
%11 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32*, i32** %2
%13 = call i32 @fclose(i32* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"hehe.txt\00"
@.str.1 = [2 x i8] c"w\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [14 x i8] c"how are your!\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %1)
%8 = tail call i32 @fclose(i32* %1)
ret i32 0
}
void Dummy_Handler(void) {
  while (1) {
    ;
  }
}


x86 assembly (clang, -O0):
<Dummy_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Dummy_Handler+0x9>
jmp    1109 <Dummy_Handler+0x9>

x86 assembly (clang, -O2):
<Dummy_Handler>:
jmp    1100 <Dummy_Handler>

LLVM IR (-O0):
define void @Dummy_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Dummy_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned long long ruc_rdtsc(void) {
  unsigned hi, lo;
  __asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi));
  return ((unsigned long long)lo) | (((unsigned long long)hi) << 32);
}


x86 assembly (clang, -O0):
<ruc_rdtsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0x8(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ruc_rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @ruc_rdtsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %2
store i32 %5, i32* %1
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @ruc_rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
double LinearInterpolation(double p) { return p; }


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

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

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

LLVM IR (-O2):
define double @LinearInterpolation(double returned %0) {
ret double %0
}
/* Variables and functions */
int isOperator(char);
int precedence(char operator1, char operator2) {
  int o1 = isOperator(operator1);
  int o2 = isOperator(operator2);
  return o1 - o2;
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isOperator@plt>
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <isOperator@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <isOperator@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <isOperator@plt>
sub    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = call i32 @isOperator(i8 signext %7)
store i32 %8, i32* %5
%9 = load i8, i8* %4
%10 = call i32 @isOperator(i8 signext %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @precedence(i8 signext %0, i8 signext %1) {
%3 = tail call i32 @isOperator(i8 signext %0)
%4 = tail call i32 @isOperator(i8 signext %1)
%5 = sub nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void movsx_reg32_16preg64pimm32(int reg1, int reg2, unsigned int imm32) {
  put8(0x0F);
  put8(0xBF);
  put8((reg1 << 3) | reg2 | 0x80);
  put32(imm32);
}


x86 assembly (clang, -O0):
<movsx_reg32_16preg64pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0xbf,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     -0x8(%rbp),%edi
or     $0x80,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<movsx_reg32_16preg64pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0xbf,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @movsx_reg32_16preg64pimm32(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 = call i32 @put8(i32 15)
%8 = call i32 @put8(i32 191)
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = load i32, i32* %5
%12 = or i32 %10, %11
%13 = or i32 %12, 128
%14 = call i32 @put8(i32 %13)
%15 = load i32, i32* %6
%16 = call i32 @put32(i32 %15)
ret void
}

LLVM IR (-O2):
define void @movsx_reg32_16preg64pimm32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 15)
%5 = tail call i32 @put8(i32 191)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 128
%9 = tail call i32 @put8(i32 %8)
%10 = tail call i32 @put32(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int retval) {
  printf("Usage: dataserver [ARGS]\n\n");
  printf("  --tables DIR     Specify the tables folder. Default: working "
         "directory\n");
  exit(retval);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: dataserver [ARGS]\0A\0A\00"
@.str.1 = [74 x i8] c" --tables DIR Specify the tables folder. Default: working directory\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@str = [26 x i8] c"Usage: dataserver [ARGS]\0A\00"
@str.2 = [73 x i8] c" --tables DIR Specify the tables folder. Default: working directory\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
void x86_write_cr0(unsigned long val) {
  __asm__ __volatile__("mov %0, %%cr0" ::"r"(val));
}


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

x86 assembly (clang, -O2):
<x86_write_cr0>:
mov    %rdi,%cr0
ret

LLVM IR (-O0):
define void @x86_write_cr0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @x86_write_cr0(i64 %0) {
tail call void asm sideeffect "mov $0, %cr0", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_cvttss_si32(int /*<<< orphan*/);
int test_mm_cvttss_si32(__m128 A) { return _mm_cvttss_si32(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvttss_si32>:
jmp    1030 <_mm_cvttss_si32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvttss_si32(i32 %0) {
%2 = tail call i32 @_mm_cvttss_si32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ square(double *, double *);
int main(int argc, char *argv[]) {
  double a[1];
  double b[1];
  a[0] = 5.0;
  b[0] = 0.0;
  square(a, b);
  printf("%f squared is %f\n", a[0], b[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <square@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x4014000000000000,%rax
mov    %rax,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <square@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%f squared is %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1 x double]
%7 = alloca [1 x double]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [1 x double], [1 x double]* %6, i64 0, i64 0
store double 5.000000e+00, double* %8
%9 = getelementptr inbounds [1 x double], [1 x double]* %7, i64 0, i64 0
store double 0.000000e+00, double* %9
%10 = getelementptr inbounds [1 x double], [1 x double]* %6, i64 0, i64 0
%11 = getelementptr inbounds [1 x double], [1 x double]* %7, i64 0, i64 0
%12 = call i32 @square(double* %10, double* %11)
%13 = getelementptr inbounds [1 x double], [1 x double]* %6, i64 0, i64 0
%14 = load double, double* %13
%15 = getelementptr inbounds [1 x double], [1 x double]* %7, i64 0, i64 0
%16 = load double, double* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %14, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"%f squared is %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1 x double]
%4 = alloca [1 x double]
%5 = bitcast [1 x double]* %3 to i8*
%6 = bitcast [1 x double]* %4 to i8*
%7 = getelementptr inbounds [1 x double], [1 x double]* %3, i64 0, i64 0
store double 5.000000e+00, double* %7
%8 = getelementptr inbounds [1 x double], [1 x double]* %4, i64 0, i64 0
store double 0.000000e+00, double* %8
%9 = call i32 @square(double* %7, double* %8)
%10 = load double, double* %7
%11 = load double, double* %8
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %10, double %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double get_time_interval(void) {
  double time_interval = 0.0;
  printf(
      "Enter the amount of time (min.) it took to reach the final velocity\n");
  printf("given the initial velocity you entered: ");
  scanf("%lf", &time_interval);
  return time_interval;
}


x86 assembly (clang, -O0):
<get_time_interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_interval>:
push   %rax
movq   $0x0,(%rsp)
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [69 x i8] c"Enter the amount of time (min.) it took to reach the final velocity\0A\00"
@.str.1 = [41 x i8] c"given the initial velocity you entered: \00"
@.str.2 = [4 x i8] c"%lf\00"
define double @get_time_interval() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%5 = load double, double* %1
ret double %5
}

LLVM IR (-O2):
@.str.1 = [41 x i8] c"given the initial velocity you entered: \00"
@.str.2 = [4 x i8] c"%lf\00"
@str = [68 x i8] c"Enter the amount of time (min.) it took to reach the final velocity\00"
define double @get_time_interval() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%6 = load double, double* %1
ret double %6
}
void gtk_widget_get_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_name() {
ret void
}
_Bool h() { return 23; }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @h() {
ret i1 true
}

LLVM IR (-O2):
define zeroext i1 @h() {
ret i1 true
}
/* Variables and functions */
int init();
int main() { return init(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init()
ret i32 %1
}
/* Variables and functions */
scalar_t__ pollen_parts_Led0_isOn__E();
int /*<<< orphan*/ pollen_parts_Led0_off__E();
int /*<<< orphan*/ pollen_parts_Led0_on__E();
void pollen_parts_Led0_toggle__E() {
  if (pollen_parts_Led0_isOn__E()) {
    pollen_parts_Led0_off__E();
  } else {
    pollen_parts_Led0_on__E();
  }
}


x86 assembly (clang, -O0):
<pollen_parts_Led0_toggle__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <pollen_parts_Led0_isOn__E@plt>
cmp    $0x0,%rax
je     1151 <pollen_parts_Led0_toggle__E+0x21>
mov    $0x0,%al
call   1030 <pollen_parts_Led0_off__E@plt>
jmp    1158 <pollen_parts_Led0_toggle__E+0x28>
mov    $0x0,%al
call   1050 <pollen_parts_Led0_on__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pollen_parts_Led0_toggle__E>:
push   %rax
xor    %eax,%eax
call   1040 <pollen_parts_Led0_isOn__E@plt>
test   %rax,%rax
je     1145 <pollen_parts_Led0_toggle__E+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pollen_parts_Led0_off__E@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <pollen_parts_Led0_on__E@plt>

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

LLVM IR (-O2):
define void @pollen_parts_Led0_toggle__E() {
%1 = tail call i64 (...) @pollen_parts_Led0_isOn__E()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pollen_parts_Led0_off__E()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @pollen_parts_Led0_on__E()
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deviceIf_getFrameBuffer(void **, int *, unsigned int *);
void pgeif_getf(void **start, unsigned int *used) {
  int length;
  deviceIf_getFrameBuffer(start, &length, used);
}


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

x86 assembly (clang, -O2):
<pgeif_getf>:
push   %rax
mov    %rsi,%rdx
lea    0x4(%rsp),%rsi
call   1030 <deviceIf_getFrameBuffer@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @pgeif_getf(i8** %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @deviceIf_getFrameBuffer(i8** %0, i32* %3, i32* %1)
ret void
}
/* Variables and functions */
int munmap(void *, int);
int msvd_unmap_registers(void *regs) { return munmap(regs, 0x20000); }


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

x86 assembly (clang, -O2):
<msvd_unmap_registers>:
mov    $0x20000,%esi
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define i32 @msvd_unmap_registers(i8* %0) {
%2 = tail call i32 @munmap(i8* %0, i32 131072)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ TR_getUsableSize(void *);
void *TR_malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int /*<<< orphan*/);
void *TR_calloc(size_t nmemb, size_t size) {
  size_t _size = nmemb * size;
  void *mem = TR_malloc(_size);
  memset(mem, 0, TR_getUsableSize(mem));
  return mem;
}


x86 assembly (clang, -O0):
<TR_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <TR_malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <TR_getUsableSize@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TR_calloc>:
push   %rbx
imul   %rsi,%rdi
call   1050 <TR_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <TR_getUsableSize@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @TR_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = call i8* @TR_malloc(i64 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = load i8*, i8** %6
%14 = call i32 @TR_getUsableSize(i8* %13)
%15 = call i32 @memset(i8* %12, i32 0, i32 %14)
%16 = load i8*, i8** %6
ret i8* %16
}

LLVM IR (-O2):
define i8* @TR_calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @TR_malloc(i64 %3)
%5 = tail call i32 @TR_getUsableSize(i8* %4)
%6 = tail call i32 @memset(i8* %4, i32 0, i32 %5)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void _print(char *msg) { (void)write(2, msg, strlen(msg)); }


x86 assembly (clang, -O0):
<_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_print>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @_print(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}