xunge/DecIR huggingface dataset:
/* Variables and functions */
int memcmp(char const *, char const *, size_t);
int strncmp(const char *s1, const char *s2, size_t n) {
  return memcmp(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<strncmp>:
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @strncmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
long lcheck(long value, long len, long adr) {
  unsigned long *p = (unsigned long *)adr;
  while (len > 0) {
    if (*p != value)
      return (long)p;
    p++;
    len -= sizeof(long);
  }
  return -1;
}


x86 assembly (clang, -O0):
<lcheck>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    115e <lcheck+0x5e>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
je     1141 <lcheck+0x41>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <lcheck+0x66>
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <lcheck+0x18>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcheck>:
mov    $0xffffffffffffffff,%rax
test   %rsi,%rsi
jle    1137 <lcheck+0x37>
add    $0x8,%rsi
mov    %rdx,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %rdi,(%rcx)
jne    1138 <lcheck+0x38>
add    $0x8,%rcx
add    $0x8,%rdx
add    $0xfffffffffffffff8,%rsi
cmp    $0x8,%rsi
jg     1120 <lcheck+0x20>
ret
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @lcheck(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64*
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%9 = load i64, i64* %7
%10 = inttoptr i64 %9 to i64*
store i64* %10, i64** %8
br label %11
11: ; preds = %22, %3
%12 = load i64, i64* %6
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %11
%15 = load i64*, i64** %8
%16 = load i64, i64* %15
%17 = load i64, i64* %5
%18 = icmp ne i64 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load i64*, i64** %8
%21 = ptrtoint i64* %20 to i64
store i64 %21, i64* %4
br label %28
22: ; preds = %14
%23 = load i64*, i64** %8
%24 = getelementptr inbounds i64, i64* %23, i32 1
store i64* %24, i64** %8
%25 = load i64, i64* %6
%26 = sub i64 %25, 8
store i64 %26, i64* %6
br label %11
27: ; preds = %11
store i64 -1, i64* %4
br label %28
28: ; preds = %27, %19
%29 = load i64, i64* %4
ret i64 %29
}

LLVM IR (-O2):
define i64 @lcheck(i64 %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = inttoptr i64 %2 to i64*
br label %7
7: ; preds = %5, %14
%8 = phi i64* [ %15, %14 ], [ %6, %5 ]
%9 = phi i64 [ %16, %14 ], [ %1, %5 ]
%10 = load i64, i64* %8
%11 = icmp eq i64 %10, %0
br i1 %11, label %14, label %12
12: ; preds = %7
%13 = ptrtoint i64* %8 to i64
br label %18
14: ; preds = %7
%15 = getelementptr inbounds i64, i64* %8, i64 1
%16 = add nsw i64 %9, -8
%17 = icmp sgt i64 %9, 8
br i1 %17, label %7, label %18
18: ; preds = %14, %3, %12
%19 = phi i64 [ %13, %12 ], [ -1, %3 ], [ -1, %14 ]
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ doo();
int main() {
  doo();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doo()
ret i32 0
}
void alrm(int param) {}


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

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

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

LLVM IR (-O2):
define void @alrm(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __nand_wait();
int /*<<< orphan*/ nand_send_command(int, int /*<<< orphan*/, int,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ write32(int, int);
int nand_reset(void) {
  ;
  nand_send_command(0xff, 0, 0x8000, 0);
  __nand_wait();
  write32((0xd010000 + 0x004), 0x08000000);
  write32((0xd010000 + 0x004), 0x4b3e0e7f);
  return 0;
}


x86 assembly (clang, -O0):
<nand_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
xor    %ecx,%ecx
mov    $0x8000,%edx
mov    %ecx,%esi
call   1050 <nand_send_command@plt>
mov    $0x0,%al
call   1040 <__nand_wait@plt>
mov    $0xd010004,%edi
mov    $0x8000000,%esi
call   1030 <write32@plt>
mov    $0xd010004,%edi
mov    $0x4b3e0e7f,%esi
call   1030 <write32@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_reset>:
push   %rax
mov    $0xff,%edi
xor    %esi,%esi
mov    $0x8000,%edx
xor    %ecx,%ecx
call   1050 <nand_send_command@plt>
xor    %eax,%eax
call   1040 <__nand_wait@plt>
mov    $0xd010004,%edi
mov    $0x8000000,%esi
call   1030 <write32@plt>
mov    $0xd010004,%edi
mov    $0x4b3e0e7f,%esi
call   1030 <write32@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nand_reset() {
%1 = call i32 @nand_send_command(i32 255, i32 0, i32 32768, i32 0)
%2 = call i32 (...) @__nand_wait()
%3 = call i32 @write32(i32 218169348, i32 134217728)
%4 = call i32 @write32(i32 218169348, i32 1262358143)
ret i32 0
}

LLVM IR (-O2):
define i32 @nand_reset() {
%1 = tail call i32 @nand_send_command(i32 255, i32 0, i32 32768, i32 0)
%2 = tail call i32 (...) @__nand_wait()
%3 = tail call i32 @write32(i32 218169348, i32 134217728)
%4 = tail call i32 @write32(i32 218169348, i32 1262358143)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ str_len(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void write2(char *s) { write(2, s, str_len(s)); }


x86 assembly (clang, -O0):
<write2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <str_len@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <str_len@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @write2(i8* %0) {
%2 = tail call i32 @str_len(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
int err_syntax12_lex(void) { return -1; }


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

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

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

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

/* Variables and functions */
int check_register(struct sip_msg *, int);
int allow_register_1(struct sip_msg *msg, char *basename, char *s) {
  return check_register(msg, (int)(long)basename);
}


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

x86 assembly (clang, -O2):
<allow_register_1>:
jmp    1030 <check_register@plt>

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
define i32 @allow_register_1(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.sip_msg*, %struct.sip_msg** %4
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
%11 = call i32 @check_register(%struct.sip_msg* %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
define i32 @allow_register_1(%struct.sip_msg* %0, i8* %1, i8* nocapture readnone %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @check_register(%struct.sip_msg* %0, i32 %5)
ret i32 %6
}
int do_999() { return 999; }


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

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

LLVM IR (-O0):
define i32 @do_999() {
ret i32 999
}

LLVM IR (-O2):
define i32 @do_999() {
ret i32 999
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x39() {
  Assert_real((isalnum(57)),
              "/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_isalnum.c",
              290, ("isalnum should be 1 for 9"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x39>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x122,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x39>:
push   %rax
mov    $0x39,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x122,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 9\00"
define void @t_isalnum_0x39() {
%1 = call i32 @isalnum(i32 57)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 290, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 9\00"
define void @t_isalnum_0x39() {
%1 = tail call i32 @isalnum(i32 57)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 290, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *SDL_GetRevision(void) { return "hg-7890:c031abe0b287"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"hg-7890:c031abe0b287\00"
define i8* @SDL_GetRevision() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"hg-7890:c031abe0b287\00"
define i8* @SDL_GetRevision() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
int max_int(int a, int b) {
  if (a > b)
    return a;
  return b;
}


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

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

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

LLVM IR (-O2):
define i32 @max_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_dir(const char *path) {
  struct stat stat_struct;
  if (stat(path, &stat_struct) != 0)
    return 0;
  return S_ISDIR(stat_struct.st_mode);
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <is_dir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115a <is_dir+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <is_dir+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
prefix(small, big) char *small, *big;
{
  int c;
  while ((c = *small++) == *big++)
    if (c == 0)
      return (1);
  return (c == 0);
}


x86 assembly (clang, -O0):
<prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1156 <prefix+0x56>
cmpl   $0x0,-0x1c(%rbp)
jne    1151 <prefix+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1165 <prefix+0x65>
jmp    110c <prefix+0xc>
cmpl   $0x0,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1127 <prefix+0x27>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <prefix+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @prefix(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %16, label %3
13: ; preds = %3
%14 = icmp eq i8 %6, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %9, %13
%17 = phi i32 [ %15, %13 ], [ 1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void die(char *str) {
  perror(str);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int foo(void __attribute__((unused)) * arg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t interleave_bits(uint16_t value) {
  value = (value | (value << 4)) & 0x0f0f;
  value = (value | (value << 2)) & 0x3333;
  value = (value | (value << 1)) & 0x5555;
  return value;
}


x86 assembly (clang, -O0):
<interleave_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x4,%ecx
or     %ecx,%eax
and    $0xf0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
or     %ecx,%eax
and    $0x3333,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
or     %ecx,%eax
and    $0x5555,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interleave_bits>:
mov    %edi,%eax
shl    $0x4,%eax
or     %edi,%eax
and    $0xf0f,%eax
lea    0x0(,%rax,4),%ecx
or     %eax,%ecx
and    $0x3333,%ecx
lea    (%rcx,%rcx,1),%eax
or     %ecx,%eax
and    $0x5555,%eax
ret

LLVM IR (-O0):
define i32 @interleave_bits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 %4, 4
%6 = or i32 %3, %5
%7 = and i32 %6, 3855
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 %9, 2
%11 = or i32 %8, %10
%12 = and i32 %11, 13107
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
%16 = or i32 %13, %15
%17 = and i32 %16, 21845
store i32 %17, i32* %2
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @interleave_bits(i32 %0) {
%2 = shl i32 %0, 4
%3 = or i32 %2, %0
%4 = and i32 %3, 3855
%5 = shl nuw nsw i32 %4, 2
%6 = or i32 %5, %4
%7 = and i32 %6, 13107
%8 = shl nuw nsw i32 %7, 1
%9 = or i32 %8, %7
%10 = and i32 %9, 21845
ret i32 %10
}
long unsigned int mystrlen(char *strsrc) {
  char *sp = &strsrc[0];
  char *op = sp;
  while (*sp != '\0')
    sp++;
  return sp - op;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <mystrlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <mystrlen+0x18>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <mystrlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @mystrlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rotateRight(int, int);
uint32_t SmallSigma1(uint32_t x) {
  return rotateRight(x, 17) ^ rotateRight(x, 19) ^ (x >> 10);
}


x86 assembly (clang, -O0):
<SmallSigma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x11,%esi
call   1030 <rotateRight@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x13,%esi
call   1030 <rotateRight@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0xa,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SmallSigma1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x11,%esi
call   1030 <rotateRight@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x13,%esi
call   1030 <rotateRight@plt>
sar    $0xa,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SmallSigma1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotateRight(i32 %3, i32 17)
%5 = load i32, i32* %2
%6 = call i32 @rotateRight(i32 %5, i32 19)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 10
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @SmallSigma1(i32 %0) {
%2 = tail call i32 @rotateRight(i32 %0, i32 17)
%3 = tail call i32 @rotateRight(i32 %0, i32 19)
%4 = ashr i32 %0, 10
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
int jac_chain_nm2_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @jac_chain_nm2_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @jac_chain_nm2_n_in() {
ret i32 2
}
/* Variables and functions */
int board_ti_is(char *);
int board_is_pb(void) { return board_ti_is("A335PBGL"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"A335PBGL\00"
define i32 @board_is_pb() {
%1 = call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"A335PBGL\00"
define i32 @board_is_pb() {
%1 = tail call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void test_PTHREAD_BARRIER_SERIAL_THREAD(void) {
  int dummy = "PTHREAD_BARRIER_SERIAL_THREAD";
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"PTHREAD_BARRIER_SERIAL_THREAD\00"
define void @test_PTHREAD_BARRIER_SERIAL_THREAD() {
%1 = alloca i32
store i32 ptrtoint ([30 x i8]* @.str to i32), i32* %1
ret void
}

LLVM IR (-O2):
define void @test_PTHREAD_BARRIER_SERIAL_THREAD() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_cr3();
int /*<<< orphan*/ write_cr3(int /*<<< orphan*/);
void __flush_tlb(void) { write_cr3(read_cr3()); }


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

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

LLVM IR (-O0):
define void @__flush_tlb() {
%1 = call i32 (...) @read_cr3()
%2 = call i32 @write_cr3(i32 %1)
ret void
}

LLVM IR (-O2):
define void @__flush_tlb() {
%1 = tail call i32 (...) @read_cr3()
%2 = tail call i32 @write_cr3(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct matlab_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_buffer(struct matlab_buffer *, int /*<<< orphan*/ *,
                                int);
void write_buffer_uint32(struct matlab_buffer *buffer, uint32_t value) {
  write_buffer(buffer, &value, sizeof(uint32_t));
}


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

x86 assembly (clang, -O2):
<write_buffer_uint32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write_buffer@plt>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.matlab_buffer = type { i32 }
define void @write_buffer_uint32(%struct.matlab_buffer* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @write_buffer(%struct.matlab_buffer* %0, i32* %3, i32 4)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_blocks;
};

/* Variables and functions */
int dbtob(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int sizefile(const char *file) {
  struct stat sb;
  if (stat(file, &sb) < 0)
    return (-1);
  return ((((dbtob(sb.st_blocks)) + 1023) >> 10));
}


x86 assembly (clang, -O0):
<sizefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    114f <sizefile+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <sizefile+0x42>
mov    -0x18(%rbp),%edi
call   1040 <dbtob@plt>
add    $0x3ff,%eax
sar    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizefile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     1140 <sizefile+0x20>
mov    (%rsp),%edi
call   1040 <dbtob@plt>
add    $0x3ff,%eax
sar    $0xa,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @sizefile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %15
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @dbtob(i32 %11)
%13 = add nsw i32 %12, 1023
%14 = ashr i32 %13, 10
store i32 %14, i32* %2
br label %15
15: ; preds = %9, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @sizefile(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @dbtob(i32 %8)
%10 = add nsw i32 %9, 1023
%11 = ashr i32 %10, 10
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ -1, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void Delay(void) { usleep(100000); }


x86 assembly (clang, -O0):
<Delay>:
push   %rbp
mov    %rsp,%rbp
mov    $0x186a0,%edi
call   1030 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay>:
mov    $0x186a0,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @Delay() {
%1 = call i32 @usleep(i32 100000)
ret void
}

LLVM IR (-O2):
define void @Delay() {
%1 = tail call i32 @usleep(i32 100000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void remote_function() {
  printf("called remote_function\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<remote_function>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<remote_function>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"called remote_function\0A\00"
@stdout = global i32 0
define void @remote_function() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [23 x i8] c"called remote_function\00"
define void @remote_function() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
int fun790() { return 790; }


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

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

LLVM IR (-O0):
define i32 @fun790() {
ret i32 790
}

LLVM IR (-O2):
define i32 @fun790() {
ret i32 790
}
void kpp_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @kpp_iomux_config() {
ret void
}
int securestore_key_uninit() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @securestore_key_uninit() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ sqlfs_destroy();
int sqlfs_fuse_main(int, char **);
int /*<<< orphan*/ sqlfs_init(char const *);
int main(int argc, char **argv) {
  int rc;
  const char *db = "/tmp/fsdata";
  sqlfs_init(db);
  rc = sqlfs_fuse_main(argc, argv);
  sqlfs_destroy();
  return rc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <sqlfs_init@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <sqlfs_fuse_main@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <sqlfs_destroy@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1050 <sqlfs_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <sqlfs_fuse_main@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <sqlfs_destroy@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/tmp/fsdata\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8*, i8** %7
%9 = call i32 @sqlfs_init(i8* %8)
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @sqlfs_fuse_main(i32 %10, i8** %11)
store i32 %12, i32* %6
%13 = call i32 (...) @sqlfs_destroy()
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
@.str = [12 x i8] c"/tmp/fsdata\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @sqlfs_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sqlfs_fuse_main(i32 %0, i8** %1)
%5 = tail call i32 (...) @sqlfs_destroy()
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint64_t __SMLALD(uint32_t x, uint32_t y,
                                           uint64_t sum) {
  return ((uint64_t)(((((int32_t)x << 16) >> 16) * (((int32_t)y << 16) >> 16)) +
                     ((((int32_t)x) >> 16) * (((int32_t)y) >> 16)) +
                     (((uint64_t)sum))));
}


x86 assembly (clang, -O0):
<__SMLALD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x10,%eax
sar    $0x10,%eax
mov    -0x10(%rbp),%rcx
shl    $0x10,%ecx
sar    $0x10,%ecx
imul   %ecx,%eax
mov    -0x8(%rbp),%rcx
sar    $0x10,%ecx
mov    -0x10(%rbp),%rdx
sar    $0x10,%edx
imul   %edx,%ecx
add    %ecx,%eax
cltq
add    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SMLALD>:
movswl %di,%eax
movswl %si,%ecx
imul   %eax,%ecx
sar    $0x10,%edi
sar    $0x10,%esi
imul   %edi,%esi
add    %ecx,%esi
movslq %esi,%rax
add    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @__SMLALD(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = ashr i32 %9, 16
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = ashr i32 %13, 16
%15 = mul nsw i32 %10, %14
%16 = load i64, i64* %4
%17 = trunc i64 %16 to i32
%18 = ashr i32 %17, 16
%19 = load i64, i64* %5
%20 = trunc i64 %19 to i32
%21 = ashr i32 %20, 16
%22 = mul nsw i32 %18, %21
%23 = add nsw i32 %15, %22
%24 = sext i32 %23 to i64
%25 = load i64, i64* %6
%26 = add nsw i64 %24, %25
ret i64 %26
}

LLVM IR (-O2):
define i64 @__SMLALD(i64 %0, i64 %1, i64 %2) {
%4 = trunc i64 %0 to i32
%5 = shl i32 %4, 16
%6 = ashr exact i32 %5, 16
%7 = trunc i64 %1 to i32
%8 = shl i32 %7, 16
%9 = ashr exact i32 %8, 16
%10 = mul nsw i32 %9, %6
%11 = ashr i32 %4, 16
%12 = ashr i32 %7, 16
%13 = mul nsw i32 %12, %11
%14 = add nsw i32 %10, %13
%15 = sext i32 %14 to i64
%16 = add nsw i64 %15, %2
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ sigrelse(int /*<<< orphan*/);
int main(void) {
  if (sigrelse(SIGABRT) != 0) {
    perror("Sigrelse failed");
    return 2;
  }
  printf("Test PASSED\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1030 <sigrelse@plt>
cmp    $0x0,%rax
je     116f <main+0x3f>
lea    0xea2(%rip),%rdi
call   1050 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    1182 <main+0x52>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <sigrelse@plt>
test   %rax,%rax
jne    1154 <main+0x24>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xea5(%rip),%rdi
call   1050 <perror@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGABRT = global i32 0
@.str = [16 x i8] c"Sigrelse failed\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGABRT
%3 = call i64 @sigrelse(i32 %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %1
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@SIGABRT = global i32 0
@.str = [16 x i8] c"Sigrelse failed\00"
@str = [12 x i8] c"Test PASSED\00"
define i32 @main() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i64 @sigrelse(i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 2, %4 ], [ 0, %6 ]
ret i32 %9
}
void bar(int *a) { *a = *a + 1; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
addl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
void XAllocIconSize() {}


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

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

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

LLVM IR (-O2):
define void @XAllocIconSize() {
ret void
}
int main() {
  auto vw, renault, bmw;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char bar(char a, char b, char c, char d) { return 0; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
xor    %eax,%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @bar(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
ret i8 0
}

LLVM IR (-O2):
define signext i8 @bar(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
ret i8 0
}
int get_memcfg_numaq(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_memcfg_numaq() {
ret i32 0
}
int main(void) {
  int a = 0;
  for (; a != 0; a++) {
    continue;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <main+0x2f>
jmp    1121 <main+0x21>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
int qsort_string_compare(const void *a, const void *b) {
  return (strcmp(*(char **)a, *(char **)b));
}


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

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

LLVM IR (-O0):
define i32 @qsort_string_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_string_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_read() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_read"
         "\n");
}


x86 assembly (clang, -O0):
<pa_iochannel_read>:
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_iochannel_read>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_iochannel_read\00"
define i32 @pa_iochannel_read() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ file_exists(char const *);
int file_exists_wrapper(char **av) {
  const char *filename = av[2];
  if (file_exists(filename)) {
    return EXIT_SUCCESS;
  }
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<file_exists_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <file_exists@plt>
cmp    $0x0,%rax
je     114c <file_exists_wrapper+0x3c>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <file_exists_wrapper+0x48>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists_wrapper>:
push   %rax
mov    0x10(%rdi),%rdi
call   1030 <file_exists@plt>
test   %rax,%rax
jne    1128 <file_exists_wrapper+0x18>
mov    0x2eba(%rip),%rax
jmp    112f <file_exists_wrapper+0x1f>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @file_exists_wrapper(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 2
%3 = load i8*, i8** %2
%4 = tail call i64 @file_exists(i8* %3)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @EXIT_FAILURE
%7 = load i32, i32* @EXIT_SUCCESS
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ rtc_action(int);
void rtc_close(void) { rtc_action(1); }


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

x86 assembly (clang, -O2):
<rtc_close>:
mov    $0x1,%edi
jmp    1030 <rtc_action@plt>

LLVM IR (-O0):
define void @rtc_close() {
%1 = call i32 @rtc_action(i32 1)
ret void
}

LLVM IR (-O2):
define void @rtc_close() {
%1 = tail call i32 @rtc_action(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ KeySym;

/* Variables and functions */
int IsModifierKey(int /*<<< orphan*/);
int x11_extras_IsModifierKey(KeySym keysym) { return IsModifierKey(keysym); }


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

x86 assembly (clang, -O2):
<x11_extras_IsModifierKey>:
jmp    1030 <IsModifierKey@plt>

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

LLVM IR (-O2):
define i32 @x11_extras_IsModifierKey(i32 %0) {
%2 = tail call i32 @IsModifierKey(i32 %0)
ret i32 %2
}