xunge/DecIR huggingface dataset:
int main(void) {
  int k;
  asm("" : "=r"(k) : "0"(7));
  f1(k);
  f2(k);
  f3(k);
  f4(k);
  f5(k);
  f6(k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1060 <f1@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <f2@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1050 <f3@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1080 <f4@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1070 <f5@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <f6@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x7,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1060 <f1@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <f2@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <f3@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1080 <f4@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1070 <f5@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <f6@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 7)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @f2 to i32 (i32, ...)*)(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 (i32, ...) bitcast (i32 (...)* @f3 to i32 (i32, ...)*)(i32 %8)
%10 = load i32, i32* %2
%11 = call i32 (i32, ...) bitcast (i32 (...)* @f4 to i32 (i32, ...)*)(i32 %10)
%12 = load i32, i32* %2
%13 = call i32 (i32, ...) bitcast (i32 (...)* @f5 to i32 (i32, ...)*)(i32 %12)
%14 = load i32, i32* %2
%15 = call i32 (i32, ...) bitcast (i32 (...)* @f6 to i32 (i32, ...)*)(i32 %14)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 7)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @f2 to i32 (i32, ...)*)(i32 %1)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @f3 to i32 (i32, ...)*)(i32 %1)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @f4 to i32 (i32, ...)*)(i32 %1)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @f5 to i32 (i32, ...)*)(i32 %1)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @f6 to i32 (i32, ...)*)(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void print_item_info_header(void) {
  print("Block Number, Block Address, Next Block, Item Address\n");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"Block Number, Block Address, Next Block, Item Address\0A\00"
define void @print_item_info_header() {
%1 = call i32 @print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"Block Number, Block Address, Next Block, Item Address\0A\00"
define void @print_item_info_header() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void err(char *where) {
  fprintf(stderr, "error in %s: %d\n", where, errno);
  exit(1);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    0x2e98(%rip),%rax
mov    (%rax),%ecx
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%ecx
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"error in %s: %d\0A\00"
@errno = global i32 0
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"error in %s: %d\0A\00"
@errno = global i32 0
define void @err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x61() {
  Assert_real((isspace(97) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              490, ("isspace should be 0 for a"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for a\00"
define void @t_isspace_0x61() {
%1 = tail call i64 @isspace(i32 97)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_config_parse_int() {
  printf("NOT IMPLEMENTED:"
         "pa_config_parse_int"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_config_parse_int\00"
define i32 @pa_config_parse_int() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ AT_EACCESS;
int /*<<< orphan*/ AT_FDCWD;
int faccessat(int /*<<< orphan*/, char const *, int, int /*<<< orphan*/);
int euidaccess(const char *filename, int amode) {
  return faccessat(AT_FDCWD, filename, amode, AT_EACCESS);
}


x86 assembly (clang, -O0):
<euidaccess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
call   1030 <faccessat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euidaccess>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <faccessat@plt>

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@AT_EACCESS = global i32 0
define i32 @euidaccess(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = load i32, i32* @AT_EACCESS
%9 = call i32 @faccessat(i32 %5, i8* %6, i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@AT_EACCESS = global i32 0
define i32 @euidaccess(i8* %0, i32 %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = load i32, i32* @AT_EACCESS
%5 = tail call i32 @faccessat(i32 %3, i8* %0, i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *realloc(char *, unsigned int);
void *ec_realloc(char *str, unsigned int size) {
  void *ptr;
  ptr = realloc(str, size);
  if (ptr == NULL)
    fatal("in ec_realloc() on memory re-allocation");
  return ptr;
}


x86 assembly (clang, -O0):
<ec_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1156 <ec_realloc+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ec_realloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <ec_realloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [40 x i8] c"in ec_realloc() on memory re-allocation\00"
define i8* @ec_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ heapSort(int *, int);
int /*<<< orphan*/ printArray(int *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  int arr[] = {12, 11, 13, 5, 6, 7};
  int n = sizeof(arr) / sizeof(arr[0]);
  heapSort(arr, n);
  printf("Sorted array is \n");
  printArray(arr, n);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xeb1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <heapSort@plt>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1060 <printArray@plt>
mov    $0x0,%al
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xec4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <heapSort@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1060 <printArray@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [6 x i32] [i32 12, i32 11, i32 13, i32 5, i32 6, i32 7]
@.str = [18 x i8] c"Sorted array is \0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = alloca i32
%3 = bitcast [6 x i32]* %1 to i8*
store i32 6, i32* %2
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @heapSort(i32* %4, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%9 = load i32, i32* %2
%10 = call i32 @printArray(i32* %8, i32 %9)
%11 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [6 x i32] [i32 12, i32 11, i32 13, i32 5, i32 6, i32 7]
@str = [17 x i8] c"Sorted array is \00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @heapSort(i32* %3, i32 6)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = call i32 @printArray(i32* %3, i32 6)
%7 = call i32 (...) @getch()
ret i32 0
}
void rop3_153_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D ^ S;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_153_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_153_1_0>:
xor    (%rdi),%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_153_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = xor i32 %22, -1
%24 = and i32 %20, %23
%25 = load i8*, i8** %4
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = and i32 %27, %29
%31 = or i32 %24, %30
%32 = trunc i32 %31 to i8
%33 = load i8*, i8** %4
store i8 %32, i8* %33
ret void
}

LLVM IR (-O2):
define void @rop3_153_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %5, -1
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NibbleSwap(unsigned char *, int);
int /*<<< orphan*/ des_decrypt(unsigned char *, int);
char *decode_filename(unsigned char *buf, int len) {
  int lop;
  for (lop = 0; lop < len; lop += 8) {
    NibbleSwap(&buf[lop], 8);
    des_decrypt(&buf[lop], 8);
  }
  return (char *)buf;
}


x86 assembly (clang, -O0):
<decode_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117a <decode_filename+0x5a>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
add    %rax,%rdi
mov    $0x8,%esi
call   1030 <NibbleSwap@plt>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
add    %rax,%rdi
mov    $0x8,%esi
call   1040 <des_decrypt@plt>
mov    -0x10(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <decode_filename+0x16>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_filename>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %esi,%esi
jle    1167 <decode_filename+0x47>
mov    %esi,%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%r14,%rbp,1),%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <NibbleSwap@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <des_decrypt@plt>
add    $0x8,%rbp
cmp    %r15d,%ebp
jl     1140 <decode_filename+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @decode_filename(i8* returned %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @NibbleSwap(i8* %6, i32 8)
%8 = tail call i32 @des_decrypt(i8* %6, i32 8)
%9 = add nuw i64 %5, 8
%10 = trunc i64 %9 to i32
%11 = icmp slt i32 %10, %1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret i8* %0
}
/* Variables and functions */
double sin(double);
double function_sine(long long time, double ampiezza, double freq) {
  double res = ampiezza * sin(freq * time * 0.0004);
  return res;
}


x86 assembly (clang, -O0):
<function_sine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_sine>:
push   %rax
cvtsi2sd %rdi,%xmm2
movsd  %xmm0,(%rsp)
mulsd  %xmm1,%xmm2
mulsd  0xed9(%rip),%xmm2
movapd %xmm2,%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @function_sine(i64 %0, double %1, double %2) {
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i64 %0, i64* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %5
%9 = load double, double* %6
%10 = load i64, i64* %4
%11 = sitofp i64 %10 to double
%12 = fmul double %9, %11
%13 = fmul double %12, 4.000000e-04
%14 = call double @sin(double %13)
%15 = fmul double %8, %14
store double %15, double* %7
%16 = load double, double* %7
ret double %16
}

LLVM IR (-O2):
define double @function_sine(i64 %0, double %1, double %2) {
%4 = sitofp i64 %0 to double
%5 = fmul double %4, %2
%6 = fmul double %5, 4.000000e-04
%7 = tail call double @sin(double %6)
%8 = fmul double %7, %1
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ psw_write_bit(int, int);
void psw_set_cy(void) { psw_write_bit(7, 1); }


x86 assembly (clang, -O0):
<psw_set_cy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
mov    $0x1,%esi
call   1030 <psw_write_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<psw_set_cy>:
mov    $0x7,%edi
mov    $0x1,%esi
jmp    1030 <psw_write_bit@plt>

LLVM IR (-O0):
define void @psw_set_cy() {
%1 = call i32 @psw_write_bit(i32 7, i32 1)
ret void
}

LLVM IR (-O2):
define void @psw_set_cy() {
%1 = tail call i32 @psw_write_bit(i32 7, i32 1)
ret void
}
const char *tmd_to_str(int mode) {
  switch (mode) {
  case 0:
    return "Local";
  case 1:
    return "ETR";
  case 2:
    return "STP";
  case 15:
    return "Uninitialized";
  default:
    return "unknown";
  }
}


x86 assembly (clang, -O0):
<tmd_to_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0xf,%rax
ja     116c <tmd_to_str+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf0d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <tmd_to_str+0x77>
lea    0xf03(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <tmd_to_str+0x77>
lea    0xef7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <tmd_to_str+0x77>
lea    0xeeb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <tmd_to_str+0x77>
lea    0xee9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmd_to_str>:
cmp    $0xf,%edi
ja     112e <tmd_to_str+0x2e>
lea    0xf34(%rip),%rax
mov    %edi,%ecx
lea    0xeeb(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf21(%rip),%rax
ret
lea    0xf1d(%rip),%rax
ret
lea    0xf27(%rip),%rax
ret
lea    0xf11(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Local\00"
@.str.1 = [4 x i8] c"ETR\00"
@.str.2 = [4 x i8] c"STP\00"
@.str.3 = [14 x i8] c"Uninitialized\00"
@.str.4 = [8 x i8] c"unknown\00"
define i8* @tmd_to_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 15, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"Local\00"
@.str.1 = [4 x i8] c"ETR\00"
@.str.2 = [4 x i8] c"STP\00"
@.str.3 = [14 x i8] c"Uninitialized\00"
@.str.4 = [8 x i8] c"unknown\00"
define i8* @tmd_to_str(i32 %0) {
switch i32 %0, label %5 [
i32 0, label %6
i32 1, label %2
i32 2, label %3
i32 15, label %4
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3, %2
%7 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}
unsigned long crb_ioctl(long channel) { return 0x8000000000000000ul; }


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

x86 assembly (clang, -O2):
<crb_ioctl>:
movabs $0x8000000000000000,%rax
ret

LLVM IR (-O0):
define i64 @crb_ioctl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i64 -9223372036854775808
}

LLVM IR (-O2):
define i64 @crb_ioctl(i64 %0) {
ret i64 -9223372036854775808
}
int main(void) {
  int i, n = 0;
  for (i = 0;; i += 1) {
    if (i >= 10)
      break;
    n = n + i;
  }
  return n;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jl     1128 <main+0x28>
jmp    113f <main+0x3f>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 45
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int ex_hashcmp_str(const char *s1, const char *s2) {
  return (0 == strcmp(s1, s2));
}


x86 assembly (clang, -O0):
<ex_hashcmp_str>:
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>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ex_hashcmp_str(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 0, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ex_hashcmp_str(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int xtensa_msalp32(v)
int v;
{
  switch (v) {
  case 32:
  case 31:
  case 30:
  case 29:
  case 28:
  case 27:
  case 26:
  case 25:
  case 24:
  case 23:
  case 22:
  case 21:
  case 20:
  case 19:
  case 18:
  case 17:
  case 16:
  case 15:
  case 14:
  case 13:
  case 12:
  case 11:
  case 10:
  case 9:
  case 8:
  case 7:
  case 6:
  case 5:
  case 4:
  case 3:
  case 2:
  case 1: {
    return 1;
  } break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<xtensa_msalp32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x1f,%eax
ja     1127 <xtensa_msalp32+0x27>
jmp    111b <xtensa_msalp32+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <xtensa_msalp32+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtensa_msalp32>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x20,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xtensa_msalp32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 32, label %5
i32 31, label %5
i32 30, label %5
i32 29, label %5
i32 28, label %5
i32 27, label %5
i32 26, label %5
i32 25, label %5
i32 24, label %5
i32 23, label %5
i32 22, label %5
i32 21, label %5
i32 20, label %5
i32 19, label %5
i32 18, label %5
i32 17, label %5
i32 16, label %5
i32 15, label %5
i32 14, label %5
i32 13, label %5
i32 12, label %5
i32 11, label %5
i32 10, label %5
i32 9, label %5
i32 8, label %5
i32 7, label %5
i32 6, label %5
i32 5, label %5
i32 4, label %5
i32 3, label %5
i32 2, label %5
i32 1, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @xtensa_msalp32(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 32
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void showusage() {
  fprintf(stderr, "usage: brm output column-index input1 input2 input3...\n");
  fprintf(stderr, "       can specify '-' for output, to write to stdout\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"usage: brm output column-index input1 input2 input3...\0A\00"
@.str.1 = [55 x i8] c" can specify '-' for output, to write to stdout\0A\00"
define void @showusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"usage: brm output column-index input1 input2 input3...\0A\00"
@.str.1 = [55 x i8] c" can specify '-' for output, to write to stdout\0A\00"
define void @showusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_version(void) {
  char version[] = "BT downloader\n"
                   "Version 1.0\n"
                   "Author by Songchenglin\n";
  fprintf(stderr, "%s", version);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x32,%edx
call   1040 <memcpy@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
lea    -0x40(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
sub    $0x38,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0xa,0x30(%rsp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    %rsp,%rdx
call   1030 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__const.print_version.version = [50 x i8] c"BT downloader\0AVersion 1.0\0AAuthor by Songchenglin\0A\00"
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = alloca [50 x i8]
%2 = bitcast [50 x i8]* %1 to i8*
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@__const.print_version.version = [50 x i8] c"BT downloader\0AVersion 1.0\0AAuthor by Songchenglin\0A\00"
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define void @print_version() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LeftHeavyTree1();
int /*<<< orphan*/ SampleTree1();
int /*<<< orphan*/ Test(int /*<<< orphan*/);
int main() {
  Test(LeftHeavyTree1());
  Test(SampleTree1());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <LeftHeavyTree1@plt>
mov    %eax,%edi
call   1040 <Test@plt>
xor    %eax,%eax
call   1050 <SampleTree1@plt>
mov    %eax,%edi
call   1040 <Test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @LeftHeavyTree1()
%3 = call i32 @Test(i32 %2)
%4 = call i32 (...) @SampleTree1()
%5 = call i32 @Test(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @LeftHeavyTree1()
%2 = tail call i32 @Test(i32 %1)
%3 = tail call i32 (...) @SampleTree1()
%4 = tail call i32 @Test(i32 %3)
ret i32 0
}
int emac1_etherstatspkts65to127octets_set(
    unsigned int dev_id, union emac1_etherstatspkts65to127octets_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac1_etherstatspkts65to127octets_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac1_etherstatspkts65to127octets_u = type opaque
define i32 @emac1_etherstatspkts65to127octets_set(i32 %0, %union.emac1_etherstatspkts65to127octets_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_etherstatspkts65to127octets_u*
store i32 %0, i32* %3
store %union.emac1_etherstatspkts65to127octets_u* %1, %union.emac1_etherstatspkts65to127octets_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_etherstatspkts65to127octets_u = type opaque
define i32 @emac1_etherstatspkts65to127octets_set(i32 %0, %union.emac1_etherstatspkts65to127octets_u* nocapture readnone %1) {
ret i32 1
}
Vsub(a, b, c) double a[3], b[3], c[3];
{
  a[0] = b[0] - c[0];
  a[1] = b[1] - c[1];
  a[2] = b[2] - c[2];
}


x86 assembly (clang, -O0):
<Vsub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vsub>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
subsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define i32 @Vsub(double* %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
%8 = load double*, double** %6
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %7
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = fsub double %10, %13
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = load double*, double** %7
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = fsub double %19, %22
%24 = load double*, double** %5
%25 = getelementptr inbounds double, double* %24, i64 1
store double %23, double* %25
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 2
%28 = load double, double* %27
%29 = load double*, double** %7
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
%32 = fsub double %28, %31
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 2
store double %32, double* %34
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @Vsub(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret i32 undef
}
/* Variables and functions */
void *fcitx_utils_malloc0(size_t);
int /*<<< orphan*/ memcpy(char *, void const *, size_t);
void *fcitx_utils_malloc_with_data(size_t base_size, const void *extra_data,
                                   size_t extra_size) {
  void *res = fcitx_utils_malloc0(base_size + extra_size);
  memcpy(((char *)res) + base_size, extra_data, extra_size);
  return res;
}


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

x86 assembly (clang, -O2):
<fcitx_utils_malloc_with_data>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
add    %rdx,%rdi
call   1030 <fcitx_utils_malloc0@plt>
mov    %rax,%r12
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @fcitx_utils_malloc_with_data(i64 %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i64 %0, i64* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %6
%10 = add i64 %8, %9
%11 = call i8* @fcitx_utils_malloc0(i64 %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = load i64, i64* %4
%14 = getelementptr inbounds i8, i8* %12, i64 %13
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %7
ret i8* %18
}

LLVM IR (-O2):
define i8* @fcitx_utils_malloc_with_data(i64 %0, i8* %1, i64 %2) {
%4 = add i64 %2, %0
%5 = tail call i8* @fcitx_utils_malloc0(i64 %4)
%6 = getelementptr inbounds i8, i8* %5, i64 %0
%7 = tail call i32 @memcpy(i8* %6, i8* %1, i64 %2)
ret i8* %5
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll15(struct __test_metadata *);
void wrapper_epoll15(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll15(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll15>:
jmp    1030 <epoll15@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll15(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll15(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll15(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll15(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
char *_get_filename(char *, int);
char *get_filename_nod(char *spec) { return _get_filename(spec, 1); }


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

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

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

LLVM IR (-O2):
define i8* @get_filename_nod(i8* %0) {
%2 = tail call i8* @_get_filename(i8* %0, i32 1)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ XConfigureEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XConfigureEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XConfigureEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XConfigureEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XConfigureEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XConfigureEvent>:
test   %rdi,%rdi
je     112a <free_XConfigureEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define void @free_XConfigureEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int fun_stub_in_release_so(int, int);
int fun_call_in_release_so(int x, int y) {
  return fun_stub_in_release_so(x, y);
}


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

x86 assembly (clang, -O2):
<fun_call_in_release_so>:
jmp    1030 <fun_stub_in_release_so@plt>

LLVM IR (-O0):
define i32 @fun_call_in_release_so(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 @fun_stub_in_release_so(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @fun_call_in_release_so(i32 %0, i32 %1) {
%3 = tail call i32 @fun_stub_in_release_so(i32 %0, i32 %1)
ret i32 %3
}
char *info_WAPIRS() {
  return "WAPIRS - Wide Angle PIR Sensor\n180˚ detection angle for widespread "
         "motion detection\nTypically detects people up to 30 ft away\n4-pin "
         "SIP package perfect for breadboard-friendly projects\n";
}


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

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

LLVM IR (-O0):
@.str = [187 x i8] c"WAPIRS - Wide Angle PIR Sensor\0A180\CB\9A detection angle for widespread motion detection\0ATypically detects people up to 30 ft away\0A4-pin SIP package perfect for breadboard-friendly projects\0A\00"
define i8* @info_WAPIRS() {
ret i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [187 x i8] c"WAPIRS - Wide Angle PIR Sensor\0A180\CB\9A detection angle for widespread motion detection\0ATypically detects people up to 30 ft away\0A4-pin SIP package perfect for breadboard-friendly projects\0A\00"
define i8* @info_WAPIRS() {
ret i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str, i64 0, i64 0)
}
int IMIN(int a, int b) { return a < b ? a : b; }


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

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

LLVM IR (-O0):
define i32 @IMIN(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 slt 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 @IMIN(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
extern void writel(unsigned int b, unsigned long addr) {
  *(volatile unsigned int *)((addr << 7) +
                             ((0xfffffc0000000000UL) + 0x200000000UL) + 0x60) =
      b;
}


x86 assembly (clang, -O0):
<writel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0200000000,%rdx
fc ff ff
add    %rdx,%rax
mov    %ecx,0x60(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writel>:
shl    $0x7,%rsi
movabs $0xfffffc0200000060,%rax
fc ff ff
mov    %edi,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @writel(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = shl i64 %6, 7
%8 = add i64 %7, -4389456576512
%9 = add i64 %8, 96
%10 = inttoptr i64 %9 to i32*
store volatile i32 %5, i32* %10
ret void
}

LLVM IR (-O2):
define void @writel(i32 %0, i64 %1) {
%3 = shl i64 %1, 7
%4 = add i64 %3, -4389456576416
%5 = inttoptr i64 %4 to i32*
store volatile i32 %0, i32* %5
ret void
}