xunge/DecIR huggingface dataset:
/* Variables and functions */
int special_add(int, int);
void fillit(int *tot) {
  int i;
  for (i = 0; i < 10000; ++i)
    tot[i] = special_add(i, 666);
}


x86 assembly (clang, -O0):
<fillit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    1158 <fillit+0x48>
mov    -0xc(%rbp),%edi
mov    $0x29a,%esi
call   1030 <special_add@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <fillit+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillit>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x29a,%esi
call   1030 <special_add@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x2710,%rbx
jne    1120 <fillit+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fillit(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10000
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call i32 @special_add(i32 %8, i32 666)
%10 = load i32*, i32** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 %9, i32* %13
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @fillit(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = trunc i64 %3 to i32
%5 = tail call i32 @special_add(i32 %4, i32 666)
%6 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 %5, i32* %6
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 10000
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XMapRequestEvent;

/* Variables and functions */
unsigned long get_XMapRequestEvent_window(void *_p) {
  return (unsigned long)((XMapRequestEvent *)_p)->window;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XMapRequestEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ porting_dbg(char *, int, int);
int fchmod(int fd, int mode) {
  porting_dbg("fchmod(%d,%x) not available.", fd, mode);
  return -1;
}


x86 assembly (clang, -O0):
<fchmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <porting_dbg@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fchmod>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
call   1030 <porting_dbg@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"fchmod(%d,%x) not available.\00"
define i32 @fchmod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @porting_dbg(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 -1
}

LLVM IR (-O2):
@.str = [29 x i8] c"fchmod(%d,%x) not available.\00"
define i32 @fchmod(i32 %0, i32 %1) {
%3 = tail call i32 @porting_dbg(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ md5(unsigned char *, int, unsigned char *);
int strlen(char const *);
unsigned long long word_hash(const char *str, int len) {
  union {
    unsigned char data[16];
    unsigned long long hash;
  } md5_h;
  if (len < 0) {
    len = strlen(str);
  }
  md5((unsigned char *)str, len, md5_h.data);
  return md5_h.hash;
}


x86 assembly (clang, -O0):
<word_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1145 <word_hash+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x20(%rbp),%rdx
call   1040 <md5@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_hash>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
test   %esi,%esi
jns    1136 <word_hash+0x16>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1040 <md5@plt>
mov    (%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { i64, [8 x i8] }
define i64 @word_hash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %union.anon
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %4
br label %11
11: ; preds = %8, %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = bitcast %union.anon* %5 to [16 x i8]*
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%16 = call i32 @md5(i8* %12, i32 %13, i8* %15)
%17 = bitcast %union.anon* %5 to i64*
%18 = load i64, i64* %17
ret i64 %18
}

LLVM IR (-O2):
%union.anon = type { i64, [8 x i8] }
define i64 @word_hash(i8* %0, i32 %1) {
%3 = alloca %union.anon
%4 = bitcast %union.anon* %3 to i8*
%5 = icmp slt i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strlen(i8* %0)
br label %8
8: ; preds = %6, %2
%9 = phi i32 [ %7, %6 ], [ %1, %2 ]
%10 = call i32 @md5(i8* %0, i32 %9, i8* %4)
%11 = getelementptr inbounds %union.anon, %union.anon* %3, i64 0, i32 0
%12 = load i64, i64* %11
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ create_null_object();
int /*<<< orphan*/ create_undefined_object();
int /*<<< orphan*/ init_object_pool();
int /*<<< orphan*/ init_opa_table();
int /*<<< orphan*/ init_string_table();
int object_module_init() {
  init_opa_table();
  init_string_table();
  init_object_pool();
  create_undefined_object();
  create_null_object();
  return 0;
}


x86 assembly (clang, -O0):
<object_module_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_opa_table@plt>
mov    $0x0,%al
call   1070 <init_string_table@plt>
mov    $0x0,%al
call   1030 <init_object_pool@plt>
mov    $0x0,%al
call   1050 <create_undefined_object@plt>
mov    $0x0,%al
call   1060 <create_null_object@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<object_module_init>:
push   %rax
xor    %eax,%eax
call   1040 <init_opa_table@plt>
xor    %eax,%eax
call   1070 <init_string_table@plt>
xor    %eax,%eax
call   1030 <init_object_pool@plt>
xor    %eax,%eax
call   1050 <create_undefined_object@plt>
xor    %eax,%eax
call   1060 <create_null_object@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @object_module_init() {
%1 = call i32 (...) @init_opa_table()
%2 = call i32 (...) @init_string_table()
%3 = call i32 (...) @init_object_pool()
%4 = call i32 (...) @create_undefined_object()
%5 = call i32 (...) @create_null_object()
ret i32 0
}

LLVM IR (-O2):
define i32 @object_module_init() {
%1 = tail call i32 (...) @init_opa_table()
%2 = tail call i32 (...) @init_string_table()
%3 = tail call i32 (...) @init_object_pool()
%4 = tail call i32 (...) @create_undefined_object()
%5 = tail call i32 (...) @create_null_object()
ret i32 0
}
/* Variables and functions */
int madvise(void *addr, size_t len, int adv) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @madvise(i8* nocapture readnone %0, i64 %1, i32 %2) {
ret i32 0
}
void g_async_queue_try_pop_unlocked() {}


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

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

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

LLVM IR (-O2):
define void @g_async_queue_try_pop_unlocked() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_buffer();
int /*<<< orphan*/ line(int, int, int /*<<< orphan*/, int, int, int, int);
void init(void) {
  clear_buffer();
  line(1, 2, 0, 4, 7, 6, ((1 << 12) - 1));
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clear_buffer@plt>
mov    $0x1,%edi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x4,%ecx
mov    $0x7,%r8d
mov    $0x6,%r9d
movl   $0xfff,(%rsp)
call   1040 <line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1030 <clear_buffer@plt>
movl   $0xfff,(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x4,%ecx
mov    $0x7,%r8d
mov    $0x6,%r9d
call   1040 <line@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @clear_buffer()
%2 = call i32 @line(i32 1, i32 2, i32 0, i32 4, i32 7, i32 6, i32 4095)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @clear_buffer()
%2 = tail call i32 @line(i32 1, i32 2, i32 0, i32 4, i32 7, i32 6, i32 4095)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_letter_distribution_diagram();
int main(void) {
  create_letter_distribution_diagram();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @create_letter_distribution_diagram()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: rmdir dirname...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"usage: rmdir dirname...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"usage: rmdir dirname...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
char *strcat(char *restrict dst, const char *restrict src) {
  char *ret = dst;
  while (*dst)
    ++dst;
  while (*dst++ = *src++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    1137 <strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <strcat+0x66>
jmp    1137 <strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* noalias returned %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void output_pi(s, len) char *s;
unsigned len;
{
  for (; len > 0; len--, s++)
    output_data_char(*s);
}


x86 assembly (clang, -O0):
<output_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1151 <output_pi+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <output_data_char@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111f <output_pi+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_pi>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1145 <output_pi+0x35>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
xor    %eax,%eax
call   1030 <output_data_char@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <output_pi+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @output_pi(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %13, %2
%6 = load i32, i32* %4
%7 = icmp ugt i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i32 (i32, ...) bitcast (i32 (...)* @output_data_char to i32 (i32, ...)*)(i32 %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %4
%15 = add i32 %14, -1
store i32 %15, i32* %4
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %5
18: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @output_pi(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ %1, %2 ]
%6 = phi i8* [ %11, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @output_data_char to i32 (i32, ...)*)(i32 %8)
%10 = add i32 %5, -1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = icmp eq i32 %10, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ add_sentence(int *, int /*<<< orphan*/ *, int *, int);
void gen_st_lat_lon_raw(uint8_t *b, uint32_t *buflen) {
  uint8_t sentence[] = {0x58, 0x25, 0x3c, 0x24, 0x32, 0x18, 0xd1, 0x19};
  add_sentence(b, buflen, sentence, 8);
}


x86 assembly (clang, -O0):
<gen_st_lat_lon_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x8,%ecx
call   1030 <add_sentence@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_st_lat_lon_raw>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x8,%ecx
call   1030 <add_sentence@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.gen_st_lat_lon_raw.sentence = [8 x i32] [i32 88, i32 37, i32 60, i32 36, i32 50, i32 24, i32 209, i32 25]
define void @gen_st_lat_lon_raw(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [8 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = bitcast [8 x i32]* %5 to i8*
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%10 = call i32 @add_sentence(i32* %7, i32* %8, i32* %9, i32 8)
ret void
}

LLVM IR (-O2):
@__const.gen_st_lat_lon_raw.sentence = [8 x i32] [i32 88, i32 37, i32 60, i32 36, i32 50, i32 24, i32 209, i32 25]
define void @gen_st_lat_lon_raw(i32* %0, i32* %1) {
%3 = alloca [8 x i32]
%4 = bitcast [8 x i32]* %3 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 @add_sentence(i32* %0, i32* %1, i32* %5, i32 8)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
double difftime(time_t time1, time_t time2) {
  return (double)time1 - (double)time2;
}


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
cvtsi2sd %rdi,%xmm0
cvtsi2sd %rsi,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @difftime(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to double
%9 = fsub double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @difftime(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = sitofp i64 %1 to double
%5 = fsub double %3, %4
ret double %5
}
/* Variables and functions */
long gethostid();
int /*<<< orphan*/ printf(char *, long);
int main() {
  long id = gethostid();
  printf("%ld\n", id);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <gethostid@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @gethostid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void popOr() {
  emitln("pop\t%%ebx");
  emitln("or\t%%ebx,%%eax");
}


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

x86 assembly (clang, -O2):
<popOr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emitln@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [15 x i8] c"or\09%%ebx,%%eax\00"
define void @popOr() {
%1 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emitln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [15 x i8] c"or\09%%ebx,%%eax\00"
define void @popOr() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emitln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int int_to_charc(unsigned int);
unsigned int get_chiavazione_length(unsigned int max_index,
                                    unsigned int pwd_length) {
  return int_to_charc(max_index) + pwd_length;
}


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

x86 assembly (clang, -O2):
<get_chiavazione_length>:
push   %rbx
mov    %esi,%ebx
call   1030 <int_to_charc@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_chiavazione_length(i32 %0, i32 %1) {
%3 = tail call i32 @int_to_charc(i32 %0)
%4 = add i32 %3, %1
ret i32 %4
}
void USBIntDisableEndpoint(unsigned long ulBase, unsigned long ulFlags) {
  ;
  (*((volatile unsigned short *)(ulBase + 0x00000006))) &=
      ~(ulFlags & (0x0000FFFE | 0x0000FFFE | 0x00000001));
  (*((volatile unsigned short *)(ulBase + 0x00000008))) &=
      ~((ulFlags & (0xFFFE0000 | 0xFFFE0000)) >> 16);
}


x86 assembly (clang, -O0):
<USBIntDisableEndpoint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
and    $0xffff,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x6(%rax),%cx
movzwl %cx,%ecx
and    %rdx,%rcx
mov    %cx,0x6(%rax)
movabs $0xfffe0000,%rdx
and    -0x10(%rbp),%rdx
shr    $0x10,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%cx
movzwl %cx,%ecx
and    %rdx,%rcx
mov    %cx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntDisableEndpoint>:
mov    %esi,%eax
not    %eax
and    %ax,0x6(%rdi)
shr    $0x10,%rsi
not    %esi
or     $0x1,%esi
and    %si,0x8(%rdi)
ret

LLVM IR (-O0):
define void @USBIntDisableEndpoint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 65535
%7 = xor i64 %6, -1
%8 = load i64, i64* %3
%9 = add i64 %8, 6
%10 = inttoptr i64 %9 to i16*
%11 = load volatile i16, i16* %10
%12 = zext i16 %11 to i64
%13 = and i64 %12, %7
%14 = trunc i64 %13 to i16
store volatile i16 %14, i16* %10
%15 = load i64, i64* %4
%16 = and i64 %15, 4294836224
%17 = lshr i64 %16, 16
%18 = xor i64 %17, -1
%19 = load i64, i64* %3
%20 = add i64 %19, 8
%21 = inttoptr i64 %20 to i16*
%22 = load volatile i16, i16* %21
%23 = zext i16 %22 to i64
%24 = and i64 %23, %18
%25 = trunc i64 %24 to i16
store volatile i16 %25, i16* %21
ret void
}

LLVM IR (-O2):
define void @USBIntDisableEndpoint(i64 %0, i64 %1) {
%3 = add i64 %0, 6
%4 = inttoptr i64 %3 to i16*
%5 = load volatile i16, i16* %4
%6 = trunc i64 %1 to i16
%7 = xor i16 %6, -1
%8 = and i16 %5, %7
store volatile i16 %8, i16* %4
%9 = lshr i64 %1, 16
%10 = add i64 %0, 8
%11 = inttoptr i64 %10 to i16*
%12 = load volatile i16, i16* %11
%13 = trunc i64 %9 to i16
%14 = and i16 %13, -2
%15 = xor i16 %14, -1
%16 = and i16 %12, %15
store volatile i16 %16, i16* %11
ret void
}
unsigned long USBFrameNumberGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned short *)(ulBase + 0x0000000C))));
}


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

x86 assembly (clang, -O2):
<USBFrameNumberGet>:
movzwl 0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i64 @USBFrameNumberGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 12
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
%7 = zext i16 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @USBFrameNumberGet(i64 %0) {
%2 = add i64 %0, 12
%3 = inttoptr i64 %2 to i16*
%4 = load volatile i16, i16* %3
%5 = zext i16 %4 to i64
ret i64 %5
}
/* Type definitions */
typedef scalar_t__ wmemcmp;
typedef int /*<<< orphan*/ const wchar_t;

/* Variables and functions */
wchar_t *(wmemstarts)(const wchar_t *string, const wchar_t *desired,
                      size_t size) {
  return (wmemcmp)(string, desired, size) ? NULL : string;
}


x86 assembly (clang, -O0):
<wmemstarts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1126 <wmemstarts+0x26>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    112e <wmemstarts+0x2e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmemstarts>:
xor    %eax,%eax
test   %rdx,%rdx
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i32* @wmemstarts(i32* readnone %0, i32* nocapture readnone %1, i64 %2) {
%4 = icmp eq i64 %2, 0
%5 = select i1 %4, i32* %0, i32* null
ret i32* %5
}
float f2() { return 1 + 2.0; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @f2() {
ret float 3.000000e+00
}

LLVM IR (-O2):
define float @f2() {
ret float 3.000000e+00
}
int rl_forced_update_display(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @rl_forced_update_display() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ calc_fcscf_parameters();
void change_fcscf_scaling(void) {
  ;
  calc_fcscf_parameters();
}


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

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

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

LLVM IR (-O2):
define void @change_fcscf_scaling() {
%1 = tail call i32 (...) @calc_fcscf_parameters()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cria_jogadores(int);
int ler_quantidade_de_jogadores();
void inicializa_jogo() {
  int quantidade_de_jogadores = ler_quantidade_de_jogadores();
  cria_jogadores(quantidade_de_jogadores);
}


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

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

LLVM IR (-O0):
define void @inicializa_jogo() {
%1 = alloca i32
%2 = call i32 (...) @ler_quantidade_de_jogadores()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @cria_jogadores(i32 %3)
ret void
}

LLVM IR (-O2):
define void @inicializa_jogo() {
%1 = tail call i32 (...) @ler_quantidade_de_jogadores()
%2 = tail call i32 @cria_jogadores(i32 %1)
ret void
}
void kbase_dma_fence_term(struct kbase_context *kctx) {}


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

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

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

LLVM IR (-O2):
%struct.kbase_context = type opaque
define void @kbase_dma_fence_term(%struct.kbase_context* nocapture %0) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *__test_mmalloc(void *user_data, size_t n) { return (malloc(n)); }


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

x86 assembly (clang, -O2):
<__test_mmalloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @__test_mmalloc(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 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @__test_mmalloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ lf_pop();
void load_file_error() {
  while (lf_pop())
    ;
}


x86 assembly (clang, -O0):
<load_file_error>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <load_file_error+0x9>
mov    $0x0,%al
call   1030 <lf_pop@plt>
cmp    $0x0,%rax
je     112f <load_file_error+0x1f>
jmp    1119 <load_file_error+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_file_error>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <lf_pop@plt>
test   %rax,%rax
jne    1120 <load_file_error+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @load_file_error() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @lf_pop()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %1
5: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @load_file_error() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @lf_pop()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
void test1(FILE *file, va_list args) {
  vfprintf(file, "%d %f %ld %c %s %% %x %X %i\n", args);
}


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

x86 assembly (clang, -O2):
<test1>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%d %f %ld %c %s %% %x %X %i\0A\00"
define void @test1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @vfprintf(i32* %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%d %f %ld %c %s %% %x %X %i\0A\00"
define void @test1(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @vfprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void int2le(unsigned int val, unsigned char *addr) {
  addr[0] = val & 0xFF;
  addr[1] = (val >> 8) & 0xff;
  addr[2] = (val >> 16) & 0xff;
  addr[3] = (val >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<int2le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2le>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @int2le(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* %1
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %0, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %0, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
__attribute__((no, noclone)) unsigned __int128 t175_5mul(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (unsigned __int128)(25), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t175_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rax
mov    $0x19,%ecx
mul    %rcx
mov    %rax,%rsi
mov    -0x50(%rbp),%rax
seto   %dl
mov    %dl,-0x41(%rbp)
mul    %rcx
mov    %rax,%rcx
mov    -0x41(%rbp),%al
add    %rsi,%rdx
setb   %sil
or     %sil,%al
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x38(%rbp)
test   $0x1,%al
jne    1179 <t175_5mul+0x69>
jmp    1180 <t175_5mul+0x70>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t175_5mul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rax
mov    $0x19,%esi
mul    %rsi
mov    %rax,%rcx
mov    %rdi,%rax
seto   %dil
mul    %rsi
mov    %rax,%r14
mov    %rdx,%rbx
add    %rcx,%rbx
setb   %al
or     %dil,%al
cmp    $0x1,%al
jne    1146 <t175_5mul+0x36>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t175_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %11, i128 25)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t175_5mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %6, i128 25)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
bool char_is_digit(char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<char_is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <char_is_digit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @char_is_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @char_is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void us_delay(unsigned int);
void ms_delay(unsigned int usecs) { return us_delay(usecs * 1000); }


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

x86 assembly (clang, -O2):
<ms_delay>:
imul   $0x3e8,%edi,%edi
jmp    1030 <us_delay@plt>

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

LLVM IR (-O2):
define void @ms_delay(i32 %0) {
%2 = mul i32 %0, 1000
tail call void @us_delay(i32 %2)
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t littleEndian16(unsigned char b[]) {
  return (int16_t)b[0] | ((int16_t)b[1] << 8);
}


x86 assembly (clang, -O0):
<littleEndian16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<littleEndian16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @littleEndian16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @littleEndian16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *);
bool cutils_cdar_DynamicArray_bool_format(const bool *i, char **b, size_t *s) {
  snprintf(*b, *s, "%s", *i ? "true" : "false");
  return true;
}


x86 assembly (clang, -O0):
<cutils_cdar_DynamicArray_bool_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xec9(%rip),%rcx
lea    0xebd(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rcx
lea    0xeac(%rip),%rdx
call   1030 <snprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cdar_DynamicArray_bool_format>:
push   %rax
mov    (%rsi),%rax
mov    (%rdx),%rsi
cmpl   $0x0,(%rdi)
lea    0xee7(%rip),%rdx
lea    0xedb(%rip),%rcx
cmove  %rdx,%rcx
lea    0xecd(%rip),%rdx
mov    %rax,%rdi
call   1030 <snprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @cutils_cdar_DynamicArray_bool_format(i32* %0, i8** %1, i64* %2) {
%4 = alloca i32*
%5 = alloca i8**
%6 = alloca i64*
store i32* %0, i32** %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%16 = call i32 @snprintf(i8* %8, i64 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @cutils_cdar_DynamicArray_bool_format(i32* nocapture %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i8*, i8** %1
%5 = load i64, i64* %2
%6 = load i32, i32* %0
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @snprintf(i8* %4, i64 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 1
}
int leap_checker(int year) {
  int flag = 0;
  if ((year) % 100 == 0) {
    if ((year) % 400 == 0) {
      flag = 1;
    }
  } else {
    if ((year) % 4 == 0) {
      flag = 1;
    }
  }
  return flag;
}


x86 assembly (clang, -O0):
<leap_checker>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1142 <leap_checker+0x42>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113d <leap_checker+0x3d>
movl   $0x1,-0x8(%rbp)
jmp    1162 <leap_checker+0x62>
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115d <leap_checker+0x5d>
movl   $0x1,-0x8(%rbp)
jmp    1162 <leap_checker+0x62>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leap_checker>:
imul   $0xc28f5c29,%edi,%eax
add    $0x51eb850,%eax
ror    $0x2,%eax
cmp    $0x28f5c28,%eax
jbe    111a <leap_checker+0x1a>
and    $0x3,%edi
jmp    1139 <leap_checker+0x39>
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x27,%rax
add    %ecx,%eax
imul   $0x190,%eax,%eax
sub    %eax,%edi
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @leap_checker(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = srem i32 %4, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = srem i32 %8, 400
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %3
br label %12
12: ; preds = %11, %7
br label %19
13: ; preds = %1
%14 = load i32, i32* %2
%15 = srem i32 %14, 4
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %3
br label %18
18: ; preds = %17, %13
br label %19
19: ; preds = %18, %12
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @leap_checker(i32 %0) {
%2 = srem i32 %0, 100
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = srem i32 %0, 400
br label %8
6: ; preds = %1
%7 = and i32 %0, 3
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
int main(int argc, char **argv) {
  (void)argc, (void)argv;
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int yas_bma250_read_reg_byte(int);
int /*<<< orphan*/ yas_bma250_write_reg_byte(int, int);
int yas_bma250_power_down(void) {
  yas_bma250_write_reg_byte(
      0x17, ((yas_bma250_read_reg_byte(0x17) & ~0x10) | ((0) << 4)));
  yas_bma250_write_reg_byte(
      0x11, ((yas_bma250_read_reg_byte(0x11) & ~0xc0) | ((2) << 6)));
  return (0);
}


x86 assembly (clang, -O0):
<yas_bma250_power_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffffef,%esi
or     $0x0,%esi
mov    $0x17,%edi
call   1030 <yas_bma250_write_reg_byte@plt>
mov    $0x11,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
mov    %eax,%esi
and    $0xffffff3f,%esi
or     $0x80,%esi
mov    $0x11,%edi
call   1030 <yas_bma250_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma250_power_down>:
push   %rax
mov    $0x17,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
and    $0xffffffef,%eax
mov    $0x17,%edi
mov    %eax,%esi
call   1030 <yas_bma250_write_reg_byte@plt>
mov    $0x11,%edi
call   1040 <yas_bma250_read_reg_byte@plt>
and    $0xffffff3f,%eax
lea    0x80(%rax),%esi
mov    $0x11,%edi
call   1030 <yas_bma250_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_bma250_power_down() {
%1 = call i32 @yas_bma250_read_reg_byte(i32 23)
%2 = and i32 %1, -17
%3 = or i32 %2, 0
%4 = call i32 @yas_bma250_write_reg_byte(i32 23, i32 %3)
%5 = call i32 @yas_bma250_read_reg_byte(i32 17)
%6 = and i32 %5, -193
%7 = or i32 %6, 128
%8 = call i32 @yas_bma250_write_reg_byte(i32 17, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_bma250_power_down() {
%1 = tail call i32 @yas_bma250_read_reg_byte(i32 23)
%2 = and i32 %1, -17
%3 = tail call i32 @yas_bma250_write_reg_byte(i32 23, i32 %2)
%4 = tail call i32 @yas_bma250_read_reg_byte(i32 17)
%5 = and i32 %4, -193
%6 = or i32 %5, 128
%7 = tail call i32 @yas_bma250_write_reg_byte(i32 17, i32 %6)
ret i32 0
}