xunge/DecIR huggingface dataset:
void cancel(unsigned long *p, unsigned long *q) {
  if (0 == *q % *p) {
    *q /= *p;
    *p = 1;
  }
}


x86 assembly (clang, -O0):
<cancel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
xor    %edx,%edx
divq   (%rcx)
xor    %eax,%eax
cmp    %rdx,%rax
jne    1153 <cancel+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cancel>:
mov    (%rsi),%rax
mov    (%rdi),%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111d <cancel+0x1d>
xor    %edx,%edx
div    %rcx
test   %rdx,%rdx
je     1126 <cancel+0x26>
ret
xor    %edx,%edx
div    %ecx
test   %rdx,%rdx
jne    111c <cancel+0x1c>
mov    %rax,(%rsi)
movq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @cancel(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %5
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
%9 = urem i64 %6, %8
%10 = icmp eq i64 0, %9
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i64*, i64** %3
%13 = load i64, i64* %12
%14 = load i64*, i64** %4
%15 = load i64, i64* %14
%16 = udiv i64 %15, %13
store i64 %16, i64* %14
%17 = load i64*, i64** %3
store i64 1, i64* %17
br label %18
18: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
define void @cancel(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = load i64, i64* %0
%5 = urem i64 %3, %4
%6 = udiv i64 %3, %4
%7 = icmp eq i64 %5, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 %6, i64* %1
store i64 1, i64* %0
br label %9
9: ; preds = %8, %2
ret void
}
void __hv_add_i(int bIn0, int bIn1, int *bOut) { *bOut = bIn0 + bIn1; }


x86 assembly (clang, -O0):
<__hv_add_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_add_i>:
add    %esi,%edi
mov    %edi,(%rdx)
ret

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

LLVM IR (-O2):
define void @__hv_add_i(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = add nsw i32 %1, %0
store i32 %4, i32* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct cpack_state {
  int dummy;
};
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int cpack_uint16(struct cpack_state *, int /*<<< orphan*/ *);
int cpack_int16(struct cpack_state *s, int16_t *p) {
  return cpack_uint16(s, (uint16_t *)p);
}


x86 assembly (clang, -O0):
<cpack_int16>:
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 <cpack_uint16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpack_int16>:
jmp    1030 <cpack_uint16@plt>

LLVM IR (-O0):
%struct.cpack_state = type { i32 }
define i32 @cpack_int16(%struct.cpack_state* %0, i32* %1) {
%3 = alloca %struct.cpack_state*
%4 = alloca i32*
store %struct.cpack_state* %0, %struct.cpack_state** %3
store i32* %1, i32** %4
%5 = load %struct.cpack_state*, %struct.cpack_state** %3
%6 = load i32*, i32** %4
%7 = call i32 @cpack_uint16(%struct.cpack_state* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.cpack_state = type { i32 }
define i32 @cpack_int16(%struct.cpack_state* %0, i32* %1) {
%3 = tail call i32 @cpack_uint16(%struct.cpack_state* %0, i32* %1)
ret i32 %3
}
unsigned long wimaxll_cpu_to_le32(unsigned long x) {
  unsigned long le32;
  le32 = x;
  return le32;
}


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

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

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

LLVM IR (-O2):
define i64 @wimaxll_cpu_to_le32(i64 returned %0) {
ret i64 %0
}
void print_DP_table() {}


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

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

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

LLVM IR (-O2):
define void @print_DP_table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World 2!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello World 2!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello World 2!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t calc_1(void) {
  int32_t sum = 0;
  int32_t i, j;
  for (i = 0; i < 800000000; i++) {
    j = i * i;
    sum += j;
  }
  return sum;
}


x86 assembly (clang, -O0):
<calc_1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2faf0800,-0x8(%rbp)
jge    1140 <calc_1+0x40>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <calc_1+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @calc_1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 800000000
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = mul nsw i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %1
%13 = add nsw i32 %12, %11
store i32 %13, i32* %1
br label %14
14: ; preds = %7
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @calc_1() {
ret i32 -1166201856
}
/* Variables and functions */
int tuner_i2c_write(void *, unsigned char, int, unsigned char *, int);
int fc8151_write(void *hDevice, unsigned char addr, unsigned char data) {
  int res;
  unsigned char tmp;
  tmp = data;
  res = tuner_i2c_write(hDevice, addr, 1, &tmp, 1);
  return res;
}


x86 assembly (clang, -O0):
<fc8151_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%r8d
lea    -0x11(%rbp),%rcx
movzbl -0x9(%rbp),%esi
mov    %r8d,%edx
call   1030 <tuner_i2c_write@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8151_write>:
push   %rax
mov    %dl,0x7(%rsp)
lea    0x7(%rsp),%rcx
mov    $0x1,%edx
mov    $0x1,%r8d
call   1030 <tuner_i2c_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fc8151_write(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
store i8 %9, i8* %8
%10 = load i8*, i8** %4
%11 = load i8, i8* %5
%12 = call i32 @tuner_i2c_write(i8* %10, i8 zeroext %11, i32 1, i8* %8, i32 1)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @fc8151_write(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
store i8 %2, i8* %4
%5 = call i32 @tuner_i2c_write(i8* %0, i8 zeroext %1, i32 1, i8* %4, i32 1)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int __fdiscard(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int fdiscard(int fd, off_t off, off_t len) {
  return __fdiscard(fd, 0, off, len);
}


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

x86 assembly (clang, -O2):
<fdiscard>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <__fdiscard@plt>

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

LLVM IR (-O2):
define i32 @fdiscard(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__fdiscard(i32 %0, i32 0, i32 %1, i32 %2)
ret i32 %4
}
int foo() {
  int i = 0;
  while (i < 10)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1123 <foo+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ debug_msg(char *);
int /*<<< orphan*/ printf(char *, char *);
void echo(char *message) {
  debug_msg("Exexuting echo (builtin).");
  printf("%s\n", message);
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <debug_msg@plt>
mov    -0x8(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <debug_msg@plt>
lea    0xee3(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Exexuting echo (builtin).\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @echo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @debug_msg(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Exexuting echo (builtin).\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @echo(i8* %0) {
%2 = tail call i32 @debug_msg(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, size_t);
void release_memory(void *memory_block, size_t memory_size) {
  if (memory_block != NULL) {
    munmap(memory_block, memory_size);
  }
}


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

x86 assembly (clang, -O2):
<release_memory>:
test   %rdi,%rdi
je     111a <release_memory+0xa>
jmp    1030 <munmap@plt>
ret

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

LLVM IR (-O2):
define void @release_memory(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @munmap(i8* %0, i64 %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void printStr(const char *str) { fputs(str, stdout); }


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

x86 assembly (clang, -O2):
<printStr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @printStr(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
/* Type definitions */
typedef int volatile uint64_t;

/* Variables and functions */
uint64_t volatile_fetch_or_u64(volatile uint64_t *dest, uint64_t val) {
  uint64_t result = *dest;
  *dest = result | val;
  return result;
}


x86 assembly (clang, -O0):
<volatile_fetch_or_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<volatile_fetch_or_u64>:
mov    %esi,-0x4(%rsp)
mov    (%rdi),%eax
mov    %eax,-0x8(%rsp)
mov    -0x8(%rsp),%eax
or     -0x4(%rsp),%eax
mov    %eax,(%rdi)
mov    -0x8(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @volatile_fetch_or_u64(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
%6 = load volatile i32, i32* %0
store volatile i32 %6, i32* %4
%7 = load volatile i32, i32* %4
%8 = load volatile i32, i32* %3
%9 = or i32 %8, %7
store volatile i32 %9, i32* %0
%10 = load volatile i32, i32* %4
ret i32 %10
}
void _exit(int rc) {
  interpose_fini();
  typeof(_exit) *orig__exit = osym("_exit");
  (*orig__exit)(rc);
  abort();
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <interpose_fini@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <osym@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
call   *%rax

x86 assembly (clang, -O2):
<_exit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <interpose_fini@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <osym@plt>
cltq
mov    %ebx,%edi
call   *%rax

LLVM IR (-O0):
@.str = [6 x i8] c"_exit\00"
define void @_exit(i32 %0) {
%2 = alloca i32
%3 = alloca void (i32)*
store i32 %0, i32* %2
%4 = call i32 (...) @interpose_fini()
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @osym to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to void (i32)*
store void (i32)* %7, void (i32)** %3
%8 = load void (i32)*, void (i32)** %3
%9 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"_exit\00"
define void @_exit(i32 %0) {
%2 = tail call i32 (...) @interpose_fini()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @osym to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to void (i32)*
tail call void %5(i32 %0)
unreachable
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t rdtsc(void) {
  uint64_t tsc;
  asm volatile("rdtsc" : "=A"(tsc));
  return tsc;
}


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

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

LLVM IR (-O0):
define i8* @rdtsc() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @rdtsc() {
%1 = tail call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
int checkendian() {
  char xyz[] = "\x01\x02\x03\x04";
  unsigned long *lp;
  unsigned long result;
  lp = (unsigned long *)xyz;
  result = *lp;
  if (result == 67305985)
    return 0x1;
  return 0x0;
}


x86 assembly (clang, -O0):
<checkendian>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xef1(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x4030201,-0x20(%rbp)
04
jne    1143 <checkendian+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <checkendian+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.checkendian.xyz = [5 x i8] c"\01\02\03\04\00"
define i32 @checkendian() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i64*
%4 = alloca i64
%5 = bitcast [5 x i8]* %2 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %3
%8 = load i64*, i64** %3
%9 = load i64, i64* %8
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = icmp eq i64 %10, 67305985
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 1, i32* %1
br label %14
13: ; preds = %0
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @checkendian() {
ret i32 1
}
float flmin(float a, float b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<flmin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <flmin+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <flmin+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<flmin>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @flmin(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void INT_Excep_ICU_GROUP12(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_GROUP12() {
ret void
}
int VW(int w, int iWX, int EKRG, int Wxhv) {
  int Z;
  int HRTZ;
  int LF;
  int Ab1;
  int Nku;
  int ti;
  int s;
  int Xcu;
  int pF;
}


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

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

LLVM IR (-O0):
define i32 @VW(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @VW(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 undef
}
/* Variables and functions */
int strlen(char s[]) {
  int i;
  while (s[i] != '\0')
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     112b <strlen+0x2b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1108 <strlen+0x8>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
br label %4
4: ; preds = %12, %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 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int ffi_test_53(int x, float y, int z, int w) {
  return (int)(x + y + z + w + 1);
}


x86 assembly (clang, -O0):
<ffi_test_53>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
addss  %xmm1,%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  0xeca(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffi_test_53>:
cvtsi2ss %edi,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %esi,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %edx,%xmm1
addss  %xmm0,%xmm1
addss  0xeda(%rip),%xmm1
cvttss2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @ffi_test_53(i32 %0, float %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store float %1, float* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to float
%11 = load float, float* %6
%12 = fadd float %10, %11
%13 = load i32, i32* %7
%14 = sitofp i32 %13 to float
%15 = fadd float %12, %14
%16 = load i32, i32* %8
%17 = sitofp i32 %16 to float
%18 = fadd float %15, %17
%19 = fadd float %18, 1.000000e+00
%20 = fptosi float %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @ffi_test_53(i32 %0, float %1, i32 %2, i32 %3) {
%5 = sitofp i32 %0 to float
%6 = fadd float %5, %1
%7 = sitofp i32 %2 to float
%8 = fadd float %6, %7
%9 = sitofp i32 %3 to float
%10 = fadd float %8, %9
%11 = fadd float %10, 1.000000e+00
%12 = fptosi float %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ read_ptr();
void do_release() { free(read_ptr()); }


x86 assembly (clang, -O0):
<do_release>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <read_ptr@plt>
mov    %eax,%edi
call   1030 <free@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_release>:
push   %rax
xor    %eax,%eax
call   1040 <read_ptr@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @do_release() {
%1 = call i32 (...) @read_ptr()
%2 = call i32 @free(i32 %1)
ret void
}

LLVM IR (-O2):
define void @do_release() {
%1 = tail call i32 (...) @read_ptr()
%2 = tail call i32 @free(i32 %1)
ret void
}
int getHostname(char *hostname) { return 0; }


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

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

LLVM IR (-O0):
define i32 @getHostname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @getHostname(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _arc_v2_irq_unit_irq_enable_set(int, int);
void _arc_v2_irq_unit_int_enable(int irq) {
  _arc_v2_irq_unit_irq_enable_set(irq, 1);
}


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

x86 assembly (clang, -O2):
<_arc_v2_irq_unit_int_enable>:
mov    $0x1,%esi
jmp    1030 <_arc_v2_irq_unit_irq_enable_set@plt>

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

LLVM IR (-O2):
define void @_arc_v2_irq_unit_int_enable(i32 %0) {
%2 = tail call i32 @_arc_v2_irq_unit_irq_enable_set(i32 %0, i32 1)
ret void
}
f(char *x) { return *(2 + x); }


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

x86 assembly (clang, -O2):
<f>:
movsbl 0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fd_update(int *, int);
void fd_clear(int *fd) { fd_update(fd, -1); }


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

x86 assembly (clang, -O2):
<fd_clear>:
mov    $0xffffffff,%esi
jmp    1030 <fd_update@plt>

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

LLVM IR (-O2):
define void @fd_clear(i32* %0) {
%2 = tail call i32 @fd_update(i32* %0, i32 -1)
ret void
}
/* Variables and functions */
size_t base64_size_string(size_t blob_sz) {
  return 4 * ((blob_sz + 2) / 3) + 1;
}


x86 assembly (clang, -O0):
<base64_size_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x2,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_size_string>:
lea    0x2(%rdi),%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,1),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @base64_size_string(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 2
%5 = udiv i64 %4, 3
%6 = mul i64 4, %5
%7 = add i64 %6, 1
ret i64 %7
}

LLVM IR (-O2):
define i64 @base64_size_string(i64 %0) {
%2 = add i64 %0, 2
%3 = udiv i64 %2, 3
%4 = shl i64 %3, 2
%5 = or i64 %4, 1
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ delay_init();
void t1_init() { delay_init(); }


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

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

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

LLVM IR (-O2):
define void @t1_init() {
%1 = tail call i32 (...) @delay_init()
ret void
}
int is_longopt(const char *arg) {
  return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] != '\0';
}


x86 assembly (clang, -O0):
<is_longopt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1154 <is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <is_longopt+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_longopt>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <is_longopt+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <is_longopt+0x1b>
cmpb   $0x2d,0x1(%rdi)
jne    111b <is_longopt+0x1b>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @is_longopt(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %6, %3, %1
%16 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %14, %10 ]
ret i32 %16
}
void av_frame_set_colorspace() {}


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

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

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

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

/* Variables and functions */
uint getRandom() {}


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

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

LLVM IR (-O0):
define i32 @getRandom() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @getRandom() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void printUsage(void) {
  puts("Options:");
  puts(" -e n  Set event queue size.");
  puts(" -h    Displays this help text.");
  puts(" -p n  Set port number.");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Options:\00"
@.str.1 = [29 x i8] c" -e n Set event queue size.\00"
@.str.2 = [32 x i8] c" -h Displays this help text.\00"
@.str.3 = [24 x i8] c" -p n Set port number.\00"
define void @printUsage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Options:\00"
@.str.1 = [29 x i8] c" -e n Set event queue size.\00"
@.str.2 = [32 x i8] c" -h Displays this help text.\00"
@.str.3 = [24 x i8] c" -p n Set port number.\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int init_kdtree() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @init_kdtree() {
ret i32 0
}
/* Variables and functions */
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int result;
  result = fib(5);
  printf("result fib(5) = %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1040 <fib@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <fib@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"result fib(5) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @fib(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ rand();
unsigned int randInUI(unsigned int min, unsigned int max) {
  return min + ((unsigned int)rand() % (max - min));
}


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

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

LLVM IR (-O0):
define i32 @randInUI(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 = call i64 (...) @rand()
%7 = trunc i64 %6 to i32
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = sub i32 %8, %9
%11 = urem i32 %7, %10
%12 = add i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @randInUI(i32 %0, i32 %1) {
%3 = tail call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = sub i32 %1, %0
%6 = urem i32 %4, %5
%7 = add i32 %6, %0
ret i32 %7
}
float CG_GetValue(int ownerDraw, int type) {
  switch (ownerDraw) {
  default:
    break;
  }
  return -1;
}


x86 assembly (clang, -O0):
<CG_GetValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
jmp    110f <CG_GetValue+0xf>
movss  0xee9(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_GetValue>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @CG_GetValue(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
switch i32 %5, label %6 [
]
6: ; preds = %2
br label %7
7: ; preds = %6
ret float -1.000000e+00
}

LLVM IR (-O2):
define float @CG_GetValue(i32 %0, i32 %1) {
ret float -1.000000e+00
}
/* Type definitions */
struct mdoc_node {
  int dummy;
};
struct mdoc_meta {
  int dummy;
};
struct html {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_text(struct html *, char *);
int mdoc_ud_pre(const struct mdoc_meta *meta, const struct mdoc_node *n,
                struct html *h) {
  print_text(h, "currently under development.");
  return (0);
}


x86 assembly (clang, -O0):
<mdoc_ud_pre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <print_text@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdoc_ud_pre>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <print_text@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
%struct.html = type { i32 }
@.str = [29 x i8] c"currently under development.\00"
define i32 @mdoc_ud_pre(%struct.mdoc_meta* %0, %struct.mdoc_node* %1, %struct.html* %2) {
%4 = alloca %struct.mdoc_meta*
%5 = alloca %struct.mdoc_node*
%6 = alloca %struct.html*
store %struct.mdoc_meta* %0, %struct.mdoc_meta** %4
store %struct.mdoc_node* %1, %struct.mdoc_node** %5
store %struct.html* %2, %struct.html** %6
%7 = load %struct.html*, %struct.html** %6
%8 = call i32 @print_text(%struct.html* %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
%struct.html = type { i32 }
@.str = [29 x i8] c"currently under development.\00"
define i32 @mdoc_ud_pre(%struct.mdoc_meta* nocapture readnone %0, %struct.mdoc_node* nocapture readnone %1, %struct.html* %2) {
%4 = tail call i32 @print_text(%struct.html* %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sigalrm(int signo) { exit(0); }


x86 assembly (clang, -O0):
<sigalrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigalrm>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @sigalrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sigalrm(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_set_env() {
  printf("NOT IMPLEMENTED:"
         "pa_set_env"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"NOT IMPLEMENTED:pa_set_env\0A\00"
define i32 @pa_set_env() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [27 x i8] c"NOT IMPLEMENTED:pa_set_env\00"
define i32 @pa_set_env() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_devlist(FILE *devs) { fclose(devs); }


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

x86 assembly (clang, -O2):
<close_devlist>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @close_devlist(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ __raw_readl(int);
int /*<<< orphan*/ __raw_writel(int, int);
void udelay(int us) {
  __raw_writel(us * 150, 0xfe40009c);
  while (__raw_readl(0xfe40009c))
    ;
}


x86 assembly (clang, -O0):
<udelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x96,-0x4(%rbp),%edi
mov    $0xfe40009c,%esi
call   1030 <__raw_writel@plt>
mov    $0xfe40009c,%edi
call   1040 <__raw_readl@plt>
cmp    $0x0,%rax
je     1155 <udelay+0x35>
jmp    113c <udelay+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udelay>:
push   %rax
imul   $0x96,%edi,%edi
mov    $0xfe40009c,%esi
call   1030 <__raw_writel@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xfe40009c,%edi
call   1040 <__raw_readl@plt>
test   %rax,%rax
jne    1140 <udelay+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @udelay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 150
%5 = call i32 @__raw_writel(i32 %4, i32 -29359972)
br label %6
6: ; preds = %9, %1
%7 = call i64 @__raw_readl(i32 -29359972)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @udelay(i32 %0) {
%2 = mul nsw i32 %0, 150
%3 = tail call i32 @__raw_writel(i32 %2, i32 -29359972)
br label %4
4: ; preds = %4, %1
%5 = tail call i64 @__raw_readl(i32 -29359972)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
ret void
}
testjump(label) int label;
{
  ol("testl %eax, %eax");
  ot("je");
  tab();
  printlabel(label);
  nl();
}


x86 assembly (clang, -O0):
<testjump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <ol@plt>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1040 <ot@plt>
mov    $0x0,%al
call   1060 <tab@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1070 <printlabel@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testjump>:
push   %rbx
mov    %edi,%ebx
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1050 <ol@plt>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <ot@plt>
xor    %eax,%eax
call   1060 <tab@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1070 <printlabel@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"testl %eax, %eax\00"
@.str.1 = [3 x i8] c"je\00"
define i32 @testjump(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @tab()
%7 = load i32, i32* %3
%8 = call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %7)
%9 = call i32 (...) @nl()
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"testl %eax, %eax\00"
@.str.1 = [3 x i8] c"je\00"
define i32 @testjump(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @tab()
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %0)
%6 = tail call i32 (...) @nl()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
scalar_t__ crypto_random_init();
int crypto_init(void) {
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  if (crypto_random_init() < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<crypto_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1030 <crypto_random_init@plt>
cmp    $0x0,%rax
jge    1163 <crypto_init+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <crypto_init+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_init>:
push   %rax
xor    %eax,%eax
call   1050 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   1040 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1030 <crypto_random_init@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @crypto_init() {
%1 = alloca i32
%2 = call i32 (...) @ERR_load_crypto_strings()
%3 = call i32 (...) @OpenSSL_add_all_algorithms()
%4 = call i64 (...) @crypto_random_init()
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @crypto_init() {
%1 = tail call i32 (...) @ERR_load_crypto_strings()
%2 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%3 = tail call i64 (...) @crypto_random_init()
%4 = ashr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int readock(int, int);
int readline(int n) { return (readock(n, 1)); }


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

x86 assembly (clang, -O2):
<readline>:
mov    $0x1,%esi
jmp    1030 <readock@plt>

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

LLVM IR (-O2):
define i32 @readline(i32 %0) {
%2 = tail call i32 @readock(i32 %0, i32 1)
ret i32 %2
}