xunge/DecIR huggingface dataset:
void g(int *x, int *y, int z) {
  if (z > 2) {
    g(x, y, z - 2);
    *y = *y * 2;
  } else
    *y = *x + 1;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jle    1154 <g+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x2,%edx
call   1030 <g@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1163 <g+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edx
jl     112a <g+0x1a>
add    $0xfffffffe,%edx
mov    %rbx,%rsi
call   1030 <g@plt>
mov    (%rbx),%eax
add    %eax,%eax
jmp    112f <g+0x1f>
mov    (%rdi),%eax
add    $0x1,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @g(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* %6
%8 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %18
9: ; preds = %3
%10 = load i32*, i32** %4
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 2
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = mul nsw i32 %15, 2
%17 = load i32*, i32** %5
store i32 %16, i32* %17
br label %23
18: ; preds = %3
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
%22 = load i32*, i32** %5
store i32 %21, i32* %22
br label %23
23: ; preds = %18, %9
ret void
}

LLVM IR (-O2):
define void @g(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 2
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = add nsw i32 %2, -2
tail call void @g(i32* %0, i32* %1, i32 %6)
%7 = load i32, i32* %1
%8 = shl nsw i32 %7, 1
br label %12
9: ; preds = %3
%10 = load i32, i32* %0
%11 = add nsw i32 %10, 1
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %11, %9 ], [ %8, %5 ]
store i32 %13, i32* %1
ret void
}
/* Type definitions */
struct ps_process_event {
  int dummy;
};

/* Variables and functions */
int obus_event_is_empty(int /*<<< orphan*/);
int /*<<< orphan*/ ps_process_const_obus_event(struct ps_process_event const *);
int ps_process_event_is_empty(const struct ps_process_event *event) {
  return obus_event_is_empty(ps_process_const_obus_event(event));
}


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

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

LLVM IR (-O0):
%struct.ps_process_event = type { i32 }
define i32 @ps_process_event_is_empty(%struct.ps_process_event* %0) {
%2 = alloca %struct.ps_process_event*
store %struct.ps_process_event* %0, %struct.ps_process_event** %2
%3 = load %struct.ps_process_event*, %struct.ps_process_event** %2
%4 = call i32 @ps_process_const_obus_event(%struct.ps_process_event* %3)
%5 = call i32 @obus_event_is_empty(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.ps_process_event = type { i32 }
define i32 @ps_process_event_is_empty(%struct.ps_process_event* %0) {
%2 = tail call i32 @ps_process_const_obus_event(%struct.ps_process_event* %0)
%3 = tail call i32 @obus_event_is_empty(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
unsigned long strtoul(char const *, char **, int);
unsigned long strtoul_l(const char *restrict s, char **restrict p, int base,
                        locale_t loc) {
  return strtoul(s, p, base);
}


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

x86 assembly (clang, -O2):
<strtoul_l>:
jmp    1030 <strtoul@plt>

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

LLVM IR (-O2):
define i64 @strtoul_l(i8* noalias %0, i8** noalias nocapture %1, i32 %2, i32 %3) {
%5 = tail call i64 @strtoul(i8* %0, i8** %1, i32 %2)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
int __puts(const char *str) {
  int count = 0;
  while (*str) {
    putchar(*str);
    str++;
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<__puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <__puts+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <__puts+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__puts>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <__puts+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <__puts+0x10>
jmp    113a <__puts+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @__puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = tail call i32 @putchar(i8 signext %5)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = add nuw nsw i32 %6, 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %14
}
unsigned long osip_hash(const char *str) {
  unsigned long hash = 5381;
  int c;
  while (c = *str++)
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<osip_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <osip_hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <osip_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<osip_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <osip_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <osip_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @osip_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ sdio_write_byte(int, int);
void adns2080_powerdown(void) { sdio_write_byte((0x0DU), (0x02U)); }


x86 assembly (clang, -O0):
<adns2080_powerdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
mov    $0x2,%esi
call   1030 <sdio_write_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adns2080_powerdown>:
mov    $0xd,%edi
mov    $0x2,%esi
jmp    1030 <sdio_write_byte@plt>

LLVM IR (-O0):
define void @adns2080_powerdown() {
%1 = call i32 @sdio_write_byte(i32 13, i32 2)
ret void
}

LLVM IR (-O2):
define void @adns2080_powerdown() {
%1 = tail call i32 @sdio_write_byte(i32 13, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void pipe_close(int handle) {
  if (handle)
    close(handle);
}


x86 assembly (clang, -O0):
<pipe_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112d <pipe_close+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe_close>:
test   %edi,%edi
je     1119 <pipe_close+0x9>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @pipe_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @pipe_close(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clog_set_buffer_len(int *);
void CLOG_SET_BUFFER_LEN__(int *w) { clog_set_buffer_len(w); }


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

x86 assembly (clang, -O2):
<CLOG_SET_BUFFER_LEN__>:
jmp    1030 <clog_set_buffer_len@plt>

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

LLVM IR (-O2):
define void @CLOG_SET_BUFFER_LEN__(i32* %0) {
%2 = tail call i32 @clog_set_buffer_len(i32* %0)
ret void
}
/* Type definitions */
struct vect {
  int dummy;
};

/* Variables and functions */
int vect_reserve(struct vect *, scalar_t__);
scalar_t__ vect_size(struct vect *);
int vect_reserve_additional(struct vect *vec, size_t count) {
  return vect_reserve(vec, vect_size(vec) + count);
}


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

x86 assembly (clang, -O2):
<vect_reserve_additional>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <vect_size@plt>
add    %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <vect_reserve@plt>

LLVM IR (-O0):
%struct.vect = type { i32 }
define i32 @vect_reserve_additional(%struct.vect* %0, i64 %1) {
%3 = alloca %struct.vect*
%4 = alloca i64
store %struct.vect* %0, %struct.vect** %3
store i64 %1, i64* %4
%5 = load %struct.vect*, %struct.vect** %3
%6 = load %struct.vect*, %struct.vect** %3
%7 = call i64 @vect_size(%struct.vect* %6)
%8 = load i64, i64* %4
%9 = add i64 %7, %8
%10 = call i32 @vect_reserve(%struct.vect* %5, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.vect = type { i32 }
define i32 @vect_reserve_additional(%struct.vect* %0, i64 %1) {
%3 = tail call i64 @vect_size(%struct.vect* %0)
%4 = add i64 %3, %1
%5 = tail call i32 @vect_reserve(%struct.vect* %0, i64 %4)
ret i32 %5
}
/* Variables and functions */
unsigned int UINT_MAX;
unsigned hash_sdbm(const char *p) {
  unsigned hash_val = 0;
  while (*p) {
    hash_val = *p + (hash_val << 6) + (hash_val << 16) - hash_val;
    hash_val %= UINT_MAX;
    p++;
  }
  return hash_val;
}


x86 assembly (clang, -O0):
<hash_sdbm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115d <hash_sdbm+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2ea8(%rip),%rax
mov    (%rax),%ecx
mov    -0xc(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash_sdbm+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_sdbm>:
mov    (%rdi),%al
test   %al,%al
je     113d <hash_sdbm+0x3d>
mov    0x2edb(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%esi
imul   $0x1003f,%edx,%eax
add    %esi,%eax
xor    %edx,%edx
div    %ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1120 <hash_sdbm+0x20>
mov    %edx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@UINT_MAX = global i32 0
define i32 @hash_sdbm(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1
%5 = load i32, i32* @UINT_MAX
br label %6
6: ; preds = %4, %6
%7 = phi i8 [ %2, %4 ], [ %15, %6 ]
%8 = phi i32 [ 0, %4 ], [ %13, %6 ]
%9 = phi i8* [ %0, %4 ], [ %14, %6 ]
%10 = sext i8 %7 to i32
%11 = mul i32 %8, 65599
%12 = add i32 %11, %10
%13 = urem i32 %12, %5
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %6, %1
%18 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %18
}
/* Variables and functions */
char *strtok(char *, char const *);
char *wsh_strtok(char *str, const char *delim) { return strtok(str, delim); }


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

x86 assembly (clang, -O2):
<wsh_strtok>:
jmp    1030 <strtok@plt>

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

LLVM IR (-O2):
define i8* @wsh_strtok(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ flush_records();
int /*<<< orphan*/ scan();
void buhbuy(void) {
  scan();
  flush_records();
}


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

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

LLVM IR (-O0):
define void @buhbuy() {
%1 = call i32 (...) @scan()
%2 = call i32 (...) @flush_records()
ret void
}

LLVM IR (-O2):
define void @buhbuy() {
%1 = tail call i32 (...) @scan()
%2 = tail call i32 (...) @flush_records()
ret void
}
/* Variables and functions */
float __ocml_pow_f32(float, float);
float __powf(float x, float y) { return __ocml_pow_f32(x, y); }


x86 assembly (clang, -O0):
<__powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__ocml_pow_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__powf>:
jmp    1030 <__ocml_pow_f32@plt>

LLVM IR (-O0):
define float @__powf(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 = call float @__ocml_pow_f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__powf(float %0, float %1) {
%3 = tail call float @__ocml_pow_f32(float %0, float %1)
ret float %3
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
uint32_t c_hash_int32(const void *key) {
  int32_t integer;
  unsigned char *bytes;
  uint32_t hash;
  integer = ((int32_t)(intptr_t)(key));
  bytes = (unsigned char *)&integer;
  hash = 5381;
  for (int i = 0; i < 4; i++)
    hash = ((hash << 5) + hash) ^ bytes[i];
  return hash;
}


x86 assembly (clang, -O0):
<c_hash_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1505,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    1158 <c_hash_int32+0x58>
mov    -0x1c(%rbp),%eax
shl    $0x5,%eax
add    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1126 <c_hash_int32+0x26>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_hash_int32>:
mov    %rdi,%rax
mov    %eax,%ecx
movzbl %al,%edx
movzbl %ah,%esi
shr    $0x10,%eax
shr    $0x18,%ecx
xor    $0x2b5a5,%edx
mov    %edx,%edi
shl    $0x5,%edi
add    %edx,%edi
xor    %edi,%esi
mov    %esi,%edx
shl    $0x5,%edx
add    %esi,%edx
movzbl %al,%esi
xor    %edx,%esi
mov    %esi,%eax
shl    $0x5,%eax
add    %esi,%eax
xor    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @c_hash_int32(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = trunc i64 %2 to i32
%5 = lshr i32 %4, 8
%6 = trunc i64 %2 to i32
%7 = lshr i32 %6, 16
%8 = trunc i64 %2 to i32
%9 = lshr i32 %8, 24
%10 = and i32 %3, 255
%11 = xor i32 %10, 177573
%12 = mul nuw nsw i32 %11, 33
%13 = and i32 %5, 255
%14 = xor i32 %12, %13
%15 = mul nuw nsw i32 %14, 33
%16 = and i32 %7, 255
%17 = xor i32 %15, %16
%18 = mul i32 %17, 33
%19 = xor i32 %18, %9
ret i32 %19
}
/* Variables and functions */
double log(int /*<<< orphan*/);
int /*<<< orphan*/ myrandom(int);
scalar_t__ rint(double);
int random_exp_int(int sn, double m) {
  return ((int)rint((double)-m * log(myrandom(sn))));
}


x86 assembly (clang, -O0):
<random_exp_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <myrandom@plt>
mov    %eax,%edi
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <rint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_exp_int>:
sub    $0x18,%rsp
xorpd  0xec4(%rip),%xmm0
movapd %xmm0,(%rsp)
call   1040 <myrandom@plt>
mov    %eax,%edi
call   1050 <log@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
jmp    1030 <rint@plt>

LLVM IR (-O0):
define i32 @random_exp_int(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
%7 = load i32, i32* %3
%8 = call i32 @myrandom(i32 %7)
%9 = call double @log(i32 %8)
%10 = fmul double %6, %9
%11 = call i64 @rint(double %10)
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @random_exp_int(i32 %0, double %1) {
%3 = fneg double %1
%4 = tail call i32 @myrandom(i32 %0)
%5 = tail call double @log(i32 %4)
%6 = fmul double %5, %3
%7 = tail call i64 @rint(double %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}
int FDecSorter(const void *a, const void *b) {
  return *((float *)a) < *((float *)b);
}


x86 assembly (clang, -O0):
<FDecSorter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDecSorter>:
movss  (%rsi),%xmm0
xor    %eax,%eax
ucomiss (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @FDecSorter(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fcmp olt float %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @FDecSorter(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void RTMpGetMaxFrequency(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMpGetMaxFrequency() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
void *thread_routine(void *arg) {
  int j;
  printf("New thread started\n");
  for (j = 1;; j++) {
    printf("Loop %d\n", j);
    sleep(1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<thread_routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <thread_routine+0x21>

x86 assembly (clang, -O2):
<thread_routine>:
push   %r14
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
lea    0xeb4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x1,%ebx
jmp    1150 <thread_routine+0x20>

LLVM IR (-O0):
@.str = [20 x i8] c"New thread started\0A\00"
@.str.1 = [9 x i8] c"Loop %d\0A\00"
define i8* @thread_routine(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @sleep(i32 1)
br label %9
9: ; preds = %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %5
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"Loop %d\0A\00"
@str = [19 x i8] c"New thread started\00"
define noalias i8* @thread_routine(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ 1, %1 ], [ %7, %3 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @sleep(i32 1)
%7 = add nuw nsw i32 %4, 1
br label %3
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
int line_len(char *a) {
  int n = strlen(a);
  while (isspace(a[n - 1]))
    n--;
  return n;
}


x86 assembly (clang, -O0):
<line_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1166 <line_len+0x46>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <line_len+0x18>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_len>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
lea    0x1(%rax),%ebp
lea    (%rax,%r14,1),%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax)
movsbl (%rbx),%edi
call   1040 <isspace@plt>
add    $0xffffffff,%ebp
add    $0xffffffffffffffff,%rbx
test   %rax,%rax
jne    1140 <line_len+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @line_len(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ %6, %4 ], [ %3, %1 ]
%6 = add i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i64 @isspace(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = trunc i64 %5 to i32
ret i32 %12
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
void set_XExposeEvent_type(void *_p, int _v) {
  ((XExposeEvent *)_p)->type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XExposeEvent_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XExposeEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void SigAlarmProc() {}


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

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

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

LLVM IR (-O2):
define void @SigAlarmProc() {
ret void
}
void pci_remove_legacy_files(struct pci_bus *bus) { return; }


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

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

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

LLVM IR (-O2):
%struct.pci_bus = type opaque
define void @pci_remove_legacy_files(%struct.pci_bus* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ dbg_set_chain(int /*<<< orphan*/);
int /*<<< orphan*/ get_response_from_vpi();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ send_address_to_vpi(int);
int /*<<< orphan*/ send_command_to_vpi(int);
int /*<<< orphan*/ send_data_to_vpi(int);
int dbg_wb_write16(uint32_t adr, uint16_t data) {
  if (0)
    printf("dbg_wb_write16: adr 0x%.8x data 0x%.4x\n", adr, data);
  dbg_set_chain(0);
  send_command_to_vpi(0x7);
  send_address_to_vpi(adr);
  send_data_to_vpi(sizeof(data));
  send_data_to_vpi(data);
  get_response_from_vpi();
  return 0;
}


x86 assembly (clang, -O0):
<dbg_wb_write16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %edi,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x7,%edi
call   1030 <send_command_to_vpi@plt>
mov    -0x4(%rbp),%edi
call   1040 <send_address_to_vpi@plt>
mov    $0x4,%edi
call   1070 <send_data_to_vpi@plt>
mov    -0x8(%rbp),%edi
call   1070 <send_data_to_vpi@plt>
mov    $0x0,%al
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_wb_write16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x7,%edi
call   1030 <send_command_to_vpi@plt>
mov    %ebp,%edi
call   1040 <send_address_to_vpi@plt>
mov    $0x4,%edi
call   1070 <send_data_to_vpi@plt>
mov    %ebx,%edi
call   1070 <send_data_to_vpi@plt>
xor    %eax,%eax
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dbg_wb_write16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @dbg_set_chain(i32 0)
%6 = call i32 @send_command_to_vpi(i32 7)
%7 = load i32, i32* %3
%8 = call i32 @send_address_to_vpi(i32 %7)
%9 = call i32 @send_data_to_vpi(i32 4)
%10 = load i32, i32* %4
%11 = call i32 @send_data_to_vpi(i32 %10)
%12 = call i32 (...) @get_response_from_vpi()
ret i32 0
}

LLVM IR (-O2):
define i32 @dbg_wb_write16(i32 %0, i32 %1) {
%3 = tail call i32 @dbg_set_chain(i32 0)
%4 = tail call i32 @send_command_to_vpi(i32 7)
%5 = tail call i32 @send_address_to_vpi(i32 %0)
%6 = tail call i32 @send_data_to_vpi(i32 4)
%7 = tail call i32 @send_data_to_vpi(i32 %1)
%8 = tail call i32 (...) @get_response_from_vpi()
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long blue_max;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_blue_max(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->blue_max = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XStandardColormap_blue_max(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
unsigned int fwrite(char const *, int, unsigned int, int /*<<< orphan*/ *);
unsigned int strlen(char const *);
int fputs(const char *s, FILE *stream) {
  unsigned int l = strlen(s);
  if (fwrite(s, 1, l, stream) == l)
    return 0;
  return EOF;
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
cmp    -0x1c(%rbp),%eax
jne    1166 <fputs+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1172 <fputs+0x52>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebp,%ecx
je     1154 <fputs+0x34>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fputs(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %6
%9 = load i8*, i8** %4
%10 = load i32, i32* %6
%11 = load i32*, i32** %5
%12 = call i32 @fwrite(i8* %9, i32 1, i32 %10, i32* %11)
%13 = load i32, i32* %6
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %18
16: ; preds = %2
%17 = load i32, i32* @EOF
store i32 %17, i32* %3
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fputs(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @fwrite(i8* %0, i32 1, i32 %3, i32* %1)
%5 = icmp eq i32 %4, %3
%6 = load i32, i32* @EOF
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
unsigned int cfs_power2_roundup(unsigned int val) {
  if (val != LOWEST_BIT_SET(val)) {
    do {
      val &= ~LOWEST_BIT_SET(val);
    } while (val != LOWEST_BIT_SET(val));
    val <<= 1;
  }
  return val;
}


x86 assembly (clang, -O0):
<cfs_power2_roundup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <LOWEST_BIT_SET@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
je     1176 <cfs_power2_roundup+0x66>
jmp    113d <cfs_power2_roundup+0x2d>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <LOWEST_BIT_SET@plt>
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <LOWEST_BIT_SET@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jne    113d <cfs_power2_roundup+0x2d>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_power2_roundup>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <LOWEST_BIT_SET@plt>
cmp    %ebx,%eax
je     1140 <cfs_power2_roundup+0x30>
mov    %ebx,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <LOWEST_BIT_SET@plt>
mov    %eax,%ebx
not    %ebx
and    %ebp,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <LOWEST_BIT_SET@plt>
cmp    %eax,%ebx
jne    1120 <cfs_power2_roundup+0x10>
add    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cfs_power2_roundup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %4)
%6 = icmp ne i32 %3, %5
br i1 %6, label %7, label %22
7: ; preds = %1
br label %8
8: ; preds = %14, %7
%9 = load i32, i32* %2
%10 = call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %9)
%11 = xor i32 %10, -1
%12 = load i32, i32* %2
%13 = and i32 %12, %11
store i32 %13, i32* %2
br label %14
14: ; preds = %8
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %16)
%18 = icmp ne i32 %15, %17
br i1 %18, label %8, label %19
19: ; preds = %14
%20 = load i32, i32* %2
%21 = shl i32 %20, 1
store i32 %21, i32* %2
br label %22
22: ; preds = %19, %1
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @cfs_power2_roundup(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %0)
%3 = icmp eq i32 %2, %0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ %0, %1 ]
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %5)
%7 = xor i32 %6, -1
%8 = and i32 %5, %7
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @LOWEST_BIT_SET to i32 (i32, ...)*)(i32 %8)
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = shl i32 %8, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ %12, %11 ], [ %0, %1 ]
ret i32 %14
}
struct dns_packet *dns_cache_query(struct dns_packet *query
                                   __attribute__((unused)),
                                   struct dns_cache *cache
                                   __attribute__((unused)),
                                   int *error __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.dns_packet = type opaque
%struct.dns_cache = type opaque
define %struct.dns_packet* @dns_cache_query(%struct.dns_packet* %0, %struct.dns_cache* %1, i32* %2) {
%4 = alloca %struct.dns_packet*
%5 = alloca %struct.dns_cache*
%6 = alloca i32*
store %struct.dns_packet* %0, %struct.dns_packet** %4
store %struct.dns_cache* %1, %struct.dns_cache** %5
store i32* %2, i32** %6
ret %struct.dns_packet* null
}

LLVM IR (-O2):
%struct.dns_packet = type opaque
%struct.dns_cache = type opaque
define noalias %struct.dns_packet* @dns_cache_query(%struct.dns_packet* nocapture readnone %0, %struct.dns_cache* nocapture readnone %1, i32* nocapture readnone %2) {
ret %struct.dns_packet* null
}
/* Variables and functions */
int /*<<< orphan*/ new (char **);
int /*<<< orphan*/ printing(char **);
int main(int argc, char *argv[]) {
  char new_chessboard[8][8];
  new (new_chessboard);
  printing(new_chessboard);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <new@plt>
lea    -0x50(%rbp),%rdi
call   1040 <printing@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <new@plt>
mov    %rbx,%rdi
call   1040 <printing@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x [8 x i8]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [8 x [8 x i8]], [8 x [8 x i8]]* %6, i64 0, i64 0
%8 = bitcast [8 x i8]* %7 to i8**
%9 = call i32 @new(i8** %8)
%10 = getelementptr inbounds [8 x [8 x i8]], [8 x [8 x i8]]* %6, i64 0, i64 0
%11 = bitcast [8 x i8]* %10 to i8**
%12 = call i32 @printing(i8** %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x [8 x i8]]
%4 = getelementptr inbounds [8 x [8 x i8]], [8 x [8 x i8]]* %3, i64 0, i64 0, i64 0
%5 = bitcast [8 x [8 x i8]]* %3 to i8**
%6 = call i32 @new(i8** %5)
%7 = call i32 @printing(i8** %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           unsigned long);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *_tc_malloc(const char *file, int line, size_t size) {
  void *p = malloc(size);
  if (p == NULL) {
    fprintf(stderr, "[%s:%d] tc_malloc(): can't allocate %lu bytes\n", file,
            line, (unsigned long)size);
  }
  return p;
}


x86 assembly (clang, -O0):
<_tc_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116b <_tc_malloc+0x4b>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tc_malloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    115e <_tc_malloc+0x3e>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %rbx,%r8
call   1030 <fprintf@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"[%s:%d] tc_malloc(): can't allocate %lu bytes\0A\00"
define i8* @_tc_malloc(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = load i64, i64* %6
%17 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %14, i32 %15, i64 %16)
br label %18
18: ; preds = %12, %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"[%s:%d] tc_malloc(): can't allocate %lu bytes\0A\00"
define noalias i8* @_tc_malloc(i8* %0, i32 %1, i64 %2) {
%4 = tail call i8* @malloc(i64 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i64 %2)
br label %9
9: ; preds = %6, %3
ret i8* %4
}
imm0adrreg1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0adrreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    $0x16,%eax
cmp    0x10f444(%rcx),%eax
jg     1139 <imm0adrreg1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <imm0adrreg1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0adrreg1>:
xor    %eax,%eax
cmpl   $0x16,0x10f444(%r9)
16
setge  %al
ret

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

LLVM IR (-O2):
define i32 @imm0adrreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 277777
%8 = load i32, i32* %7
%9 = icmp sgt i32 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}