xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void dump_printf(const char *str) { printf("%s\n", str); }


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

x86 assembly (clang, -O2):
<dump_printf>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @dump_printf(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _response(char const *);
int /*<<< orphan*/ do_quit();
void _stat_error_421(void) {
  const char msg[] =
      "421 Service not available, closing control connection.\r\n";
  _response(msg);
  do_quit();
}


x86 assembly (clang, -O0):
<_stat_error_421>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x39,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1040 <_response@plt>
mov    $0x0,%al
call   1030 <do_quit@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat_error_421>:
sub    $0x48,%rsp
movups 0xefe(%rip),%xmm0
movups %xmm0,0x29(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1040 <_response@plt>
xor    %eax,%eax
call   1030 <do_quit@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const._stat_error_421.msg = [57 x i8] c"421 Service not available, closing control connection.\0D\0A\00"
define void @_stat_error_421() {
%1 = alloca [57 x i8]
%2 = bitcast [57 x i8]* %1 to i8*
%3 = getelementptr inbounds [57 x i8], [57 x i8]* %1, i64 0, i64 0
%4 = call i32 @_response(i8* %3)
%5 = call i32 (...) @do_quit()
ret void
}

LLVM IR (-O2):
@__const._stat_error_421.msg = [57 x i8] c"421 Service not available, closing control connection.\0D\0A\00"
define void @_stat_error_421() {
%1 = alloca [57 x i8]
%2 = getelementptr inbounds [57 x i8], [57 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
%4 = call i32 (...) @do_quit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_init(void) { printf("hello, "); }


x86 assembly (clang, -O0):
<my_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"hello, \00"
define void @my_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"hello, \00"
define void @my_init() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (!p) {
    fprintf(stderr, "Out of memory\n");
    exit(1);
  }
  memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1183 <xmalloc+0x43>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <malloc@plt>
test   %rax,%rax
je     116c <xmalloc+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = load i64, i64* %2
%15 = call i32 @memset(i8* %13, i32 0, i64 %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Type definitions */
struct map_item {
  int dummy;
};
struct map {
  int dummy;
};

/* Variables and functions */
int map_reput(struct map *, unsigned int, struct map_item *,
              int /*<<< orphan*/ *);
int map_put(struct map *map, unsigned int key, struct map_item *value) {
  return map_reput(map, key, value, NULL);
}


x86 assembly (clang, -O0):
<map_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <map_reput@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_put>:
xor    %ecx,%ecx
jmp    1030 <map_reput@plt>

LLVM IR (-O0):
%struct.map = type { i32 }
%struct.map_item = type { i32 }
define i32 @map_put(%struct.map* %0, i32 %1, %struct.map_item* %2) {
%4 = alloca %struct.map*
%5 = alloca i32
%6 = alloca %struct.map_item*
store %struct.map* %0, %struct.map** %4
store i32 %1, i32* %5
store %struct.map_item* %2, %struct.map_item** %6
%7 = load %struct.map*, %struct.map** %4
%8 = load i32, i32* %5
%9 = load %struct.map_item*, %struct.map_item** %6
%10 = call i32 @map_reput(%struct.map* %7, i32 %8, %struct.map_item* %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
%struct.map = type { i32 }
%struct.map_item = type { i32 }
define i32 @map_put(%struct.map* %0, i32 %1, %struct.map_item* %2) {
%4 = tail call i32 @map_reput(%struct.map* %0, i32 %1, %struct.map_item* %2, i32* null)
ret i32 %4
}
int hash_char_count(char *s, char c) {
  return ((*s == '\0') ? 0 : hash_char_count(s + 1, c) + (*s == c));
}


x86 assembly (clang, -O0):
<hash_char_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <hash_char_count+0x2c>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <hash_char_count+0x58>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
movsbl -0x9(%rbp),%esi
call   1030 <hash_char_count@plt>
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
movsbl -0x9(%rbp),%edx
cmp    %edx,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_char_count>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <hash_char_count+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_char_count+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash_char_count(i8* %0, i8 signext %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* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
br label %23
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %4
%14 = call i32 @hash_char_count(i8* %12, i8 signext %13)
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8, i8* %4
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %17, %19
%21 = zext i1 %20 to i32
%22 = add nsw i32 %14, %21
br label %23
23: ; preds = %10, %9
%24 = phi i32 [ 0, %9 ], [ %22, %10 ]
ret i32 %24
}

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

/* Variables and functions */
uint8_t table_fetch(uint8_t inputValue) {
  static uint8_t const table[] = {0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
                                  0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
                                  0x01, 0x01, 0x00, 0x00};
  return table[inputValue & 0x0F];
}


x86 assembly (clang, -O0):
<table_fetch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xee9(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_fetch>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rax,%rdi,4),%eax
ret

LLVM IR (-O0):
@table_fetch.table = internal constant [16 x i32] [i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0]
define i32 @table_fetch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [16 x i32], [16 x i32]* @table_fetch.table, i64 0, i64 %5
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@table_fetch.table = internal unnamed_addr constant [16 x i32] [i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0]
define i32 @table_fetch(i32 %0) {
%2 = and i32 %0, 15
%3 = zext i32 %2 to i64
%4 = getelementptr inbounds [16 x i32], [16 x i32]* @table_fetch.table, i64 0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
int send_tui_msg_config(int type, int val, void *data) { return 0; }


x86 assembly (clang, -O0):
<send_tui_msg_config>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @send_tui_msg_config(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @send_tui_msg_config(i32 %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
int isOperator(char c) {
  if ((c == '+') || (c == '-') || (c == '*') || (c == '/') || (c == '%'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     114b <isOperator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     114b <isOperator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     114b <isOperator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
je     114b <isOperator+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x25,%eax
jne    1157 <isOperator+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <isOperator+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
add    $0xdb,%dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111a <isOperator+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isOperator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 42
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 37
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@switch.table.isOperator = [11 x i32] [i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @isOperator(i8 signext %0) {
%2 = add i8 %0, -37
%3 = icmp ult i8 %2, 11
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.isOperator, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int plugin_deinit(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @plugin_deinit() {
ret i32 1
}

LLVM IR (-O2):
define i32 @plugin_deinit() {
ret i32 1
}
/* Type definitions */
struct bgp_node {
  int dummy;
};

/* Variables and functions */
struct bgp_node *bgp_node_from_rnode(int /*<<< orphan*/);
int /*<<< orphan*/ bgp_node_to_rnode(struct bgp_node *);
int /*<<< orphan*/ route_lock_node(int /*<<< orphan*/);
struct bgp_node *bgp_lock_node(struct bgp_node *node) {
  return bgp_node_from_rnode(route_lock_node(bgp_node_to_rnode(node)));
}


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

x86 assembly (clang, -O2):
<bgp_lock_node>:
push   %rax
call   1040 <bgp_node_to_rnode@plt>
mov    %eax,%edi
call   1030 <route_lock_node@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <bgp_node_from_rnode@plt>

LLVM IR (-O0):
%struct.bgp_node = type { i32 }
define %struct.bgp_node* @bgp_lock_node(%struct.bgp_node* %0) {
%2 = alloca %struct.bgp_node*
store %struct.bgp_node* %0, %struct.bgp_node** %2
%3 = load %struct.bgp_node*, %struct.bgp_node** %2
%4 = call i32 @bgp_node_to_rnode(%struct.bgp_node* %3)
%5 = call i32 @route_lock_node(i32 %4)
%6 = call %struct.bgp_node* @bgp_node_from_rnode(i32 %5)
ret %struct.bgp_node* %6
}

LLVM IR (-O2):
%struct.bgp_node = type { i32 }
define %struct.bgp_node* @bgp_lock_node(%struct.bgp_node* %0) {
%2 = tail call i32 @bgp_node_to_rnode(%struct.bgp_node* %0)
%3 = tail call i32 @route_lock_node(i32 %2)
%4 = tail call %struct.bgp_node* @bgp_node_from_rnode(i32 %3)
ret %struct.bgp_node* %4
}
void plat_smp_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @plat_smp_setup() {
ret void
}
int isnan(double x) { return x != x; }


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnan>:
xor    %eax,%eax
ucomisd %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @isnan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fcmp une double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = fcmp uno double %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int max1(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<max1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max1+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max1+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max1>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max1(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int func5(int x, int y) { return x ?: y; }


x86 assembly (clang, -O0):
<func5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1124 <func5+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112a <func5+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func5>:
mov    %esi,%eax
test   %edi,%edi
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @func5(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %10
10: ; preds = %8, %7
%11 = phi i32 [ %5, %7 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @func5(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void glFogf(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glFogf() {
ret void
}
void RTTimeImplode(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeImplode() {
ret void
}
/* Variables and functions */
char *strdup(char const *);
int /*<<< orphan*/ warnxl(char *, char const *);
char *xstrdup(const char *str) {
  char *ret = NULL;
  if (str == NULL || (ret = strdup(str)) == NULL)
    warnxl("strdup(%s)", str);
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1156 <xstrdup+0x36>
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1166 <xstrdup+0x46>
mov    -0x8(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <warnxl@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1138 <xstrdup+0x18>
mov    %rbx,%rdi
call   1040 <strdup@plt>
test   %rax,%rax
je     1138 <xstrdup+0x18>
pop    %rbx
ret
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <warnxl@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"strdup(%s)\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @strdup(i8* %7)
store i8* %8, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %6, %1
%11 = load i8*, i8** %2
%12 = call i32 @warnxl(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %6
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [11 x i8] c"strdup(%s)\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3, %1
%7 = tail call i32 @warnxl(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %3
%9 = phi i8* [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printNoBooksWithHigherRating(int rating) {
  printf("\nNo book(s) in the bookstore inventory is rated higher than or "
         "equal to <%d>.\n",
         rating);
}


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

x86 assembly (clang, -O2):
<printNoBooksWithHigherRating>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"\0ANo book(s) in the bookstore inventory is rated higher than or equal to <%d>.\0A\00"
define void @printNoBooksWithHigherRating(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"\0ANo book(s) in the bookstore inventory is rated higher than or equal to <%d>.\0A\00"
define void @printNoBooksWithHigherRating(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_filename_escaping();
int main(void) {
  test_filename_escaping();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_filename_escaping()
ret i32 0
}
/* Variables and functions */
char *dln_find_1(char const *, char const *, char *, size_t,
                 int /*<<< orphan*/);
char *dln_find_file_r(const char *fname, const char *path, char *buf,
                      size_t size) {
  if (!path)
    path = ".";
  return dln_find_1(fname, path, buf, size, 0);
}


x86 assembly (clang, -O0):
<dln_find_file_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113e <dln_find_file_r+0x2e>
lea    0xec6(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <dln_find_1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dln_find_file_r>:
test   %rsi,%rsi
lea    0xee6(%rip),%rax
cmove  %rax,%rsi
xor    %r8d,%r8d
jmp    1030 <dln_find_1@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i8* @dln_find_file_r(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = icmp eq i8* %1, null
%6 = select i1 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %1
%7 = tail call i8* @dln_find_1(i8* %0, i8* %6, i8* %2, i64 %3, i32 0)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ MagicSquare(int);
int main() {
  int n = 7;
  MagicSquare(n);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @MagicSquare(i32 7)
ret i32 0
}
const char *des_options(void) {
  return "des("
         "idx"
         ","
         "cisc"
         ","
         "4"
         ","
         "long"
         ")";
}


x86 assembly (clang, -O0):
<des_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<des_options>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"des(idx,cisc,4,long)\00"
define i8* @des_options() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"des(idx,cisc,4,long)\00"
define i8* @des_options() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cspec_strcmp(const char *str1, const char *str2) {
  return strcmp(str1, str2);
}


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

x86 assembly (clang, -O2):
<cspec_strcmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @cspec_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *mem = malloc(size);
  if (mem == NULL) {
    fprintf(stderr, "xMalloc: Out Of memory [req: %ld]\n", (long)size);
    exit(1);
  }
  return mem;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <xmalloc+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <xmalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"xMalloc: Out Of memory [req: %ld]\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"xMalloc: Out Of memory [req: %ld]\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char *, int);
uint64_t decode_native_64_unsigned(char *buf) {
  uint64_t rv;
  memcpy(&rv, buf, 8);
  return rv;
}


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

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

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

LLVM IR (-O2):
define i32 @decode_native_64_unsigned(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 8)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
void *coprthr_dmmap(int dd, void *dptr, size_t sizeb, int flags, void *ptr) {}


x86 assembly (clang, -O0):
<coprthr_dmmap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @coprthr_dmmap(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3, i8* nocapture readnone %4) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeDbl1D(double *s) {
  if (s)
    free((void *)s);
  return;
}


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

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

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

LLVM IR (-O2):
define void @FreeDbl1D(double* %0) {
%2 = icmp eq double* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast double* %0 to i8*
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_i2c_end();
void ope_i2c_end(void) { bcm2835_i2c_end(); }


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

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

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

LLVM IR (-O2):
define void @ope_i2c_end() {
%1 = tail call i32 (...) @bcm2835_i2c_end()
ret void
}
/* Variables and functions */
char *_create_filename(char const *, char *, char);
char *sparkey_create_index_filename(const char *log_filename) {
  return _create_filename(log_filename, ".spl", 'i');
}


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

x86 assembly (clang, -O2):
<sparkey_create_index_filename>:
lea    0xee9(%rip),%rsi
mov    $0x69,%edx
jmp    1030 <_create_filename@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".spl\00"
define i8* @sparkey_create_index_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @_create_filename(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 105)
ret i8* %4
}

LLVM IR (-O2):
@.str = [5 x i8] c".spl\00"
define i8* @sparkey_create_index_filename(i8* %0) {
%2 = tail call i8* @_create_filename(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 105)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Ola internet\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 = [14 x i8] c"Ola internet\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Ola internet\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double pow(double x, double n) { return 0.0; }


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

x86 assembly (clang, -O2):
<pow>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
ret double 0.000000e+00
}
int __raise(s)
int s;
{ return (kill(getpid(), s)); }


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

x86 assembly (clang, -O2):
<__raise>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <kill@plt>

LLVM IR (-O0):
define i32 @__raise(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = load i32, i32* %2
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @__raise(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %2, i32 %0)
ret i32 %3
}
/* Variables and functions */
int bar(int /*<<< orphan*/);
int foo(void) { return bar(0); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %edi,%edi
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 @bar(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @bar(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printStaticLib(void) { printf("Static Library!\n"); }


x86 assembly (clang, -O0):
<printStaticLib>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Static Library!\0A\00"
define void @printStaticLib() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Static Library!\00"
define void @printStaticLib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getpid();
unsigned long snprintf(char *, unsigned long, char *, int);
unsigned long log_fd_write_pname_and_pid(char *buf, unsigned long free_bytes) {
  return snprintf(buf, free_bytes, ";pipexec;%d;", getpid());
}


x86 assembly (clang, -O0):
<log_fd_write_pname_and_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%ecx
lea    0xea8(%rip),%rdx
call   1040 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_fd_write_pname_and_pid>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec8(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <snprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c";pipexec;%d;\00"
define i64 @log_fd_write_pname_and_pid(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 = load i64, i64* %4
%7 = call i32 (...) @getpid()
%8 = call i64 @snprintf(i8* %5, i64 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i64 %8
}

LLVM IR (-O2):
@.str = [13 x i8] c";pipexec;%d;\00"
define i64 @log_fd_write_pname_and_pid(i8* %0, i64 %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i64 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ readmem65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc8(int /*<<< orphan*/);
int /*<<< orphan*/ stack();
void sbcSp8(void) { sbc8(readmem65816(stack())); }


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

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

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

LLVM IR (-O2):
define void @sbcSp8() {
%1 = tail call i32 (...) @stack()
%2 = tail call i32 @readmem65816(i32 %1)
%3 = tail call i32 @sbc8(i32 %2)
ret void
}
int cloudvpn_run() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cloudvpn_run() {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  printf("Passed all tests!\n");
  return EXIT_SUCCESS;
}


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>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Passed all tests!\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [18 x i8] c"Passed all tests!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
void ceph_fscache_unregister_fs(struct ceph_fs_client *fsc) {}


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

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

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

LLVM IR (-O2):
%struct.ceph_fs_client = type opaque
define void @ceph_fscache_unregister_fs(%struct.ceph_fs_client* nocapture %0) {
ret void
}
/* Type definitions */
struct hashtable_string {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cjet_free(struct hashtable_string *);
void hashtable_delete_route_table(struct hashtable_string *table) {
  cjet_free(table);
  return;
}


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

x86 assembly (clang, -O2):
<hashtable_delete_route_table>:
jmp    1030 <cjet_free@plt>

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

LLVM IR (-O2):
%struct.hashtable_string = type { i32 }
define void @hashtable_delete_route_table(%struct.hashtable_string* %0) {
%2 = tail call i32 @cjet_free(%struct.hashtable_string* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t RROT(uint32_t x, uint32_t m) {
  return ((x >> m) | (x << (32 - m))) & 0xFFFFFFFF;
}


x86 assembly (clang, -O0):
<RROT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
and    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RROT>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @RROT(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
%13 = and i32 %12, -1
ret i32 %13
}

LLVM IR (-O2):
define i32 @RROT(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ disp_int(int /*<<< orphan*/);
int /*<<< orphan*/ disp_str(char *);
void test_c() {
  int i = 512;
  while (1) {
    disp_str("l");
    disp_int(i++);
    disp_str("$");
    delay(1);
  }
}


x86 assembly (clang, -O0):
<test_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x200,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <disp_str@plt>
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
call   1050 <disp_int@plt>
lea    0xe9d(%rip),%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
jmp    113f <test_c+0xf>

x86 assembly (clang, -O2):
<test_c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x200,%ebx
lea    0xebd(%rip),%r14
lea    0xeb8(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <disp_str@plt>
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1050 <disp_int@plt>
mov    %r15,%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
mov    %ebp,%ebx
jmp    1150 <test_c+0x20>

LLVM IR (-O0):
@.str = [2 x i8] c"l\00"
@.str.1 = [2 x i8] c"$\00"
define void @test_c() {
%1 = alloca i32
store i32 512, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = call i32 @disp_int(i32 %4)
%7 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @delay(i32 1)
br label %2
}

LLVM IR (-O2):
@.str = [2 x i8] c"l\00"
@.str.1 = [2 x i8] c"$\00"
define void @test_c() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 512, %0 ], [ %4, %1 ]
%3 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = add nuw nsw i32 %2, 1
%5 = tail call i32 @disp_int(i32 %2)
%6 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @delay(i32 1)
br label %1
}
void e8_utf_to_7bit() {}


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

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

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

LLVM IR (-O2):
define void @e8_utf_to_7bit() {
ret void
}