xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ShowAscii();
int main(int argc, char **argv) {
  ShowAscii();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ShowAscii()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int parseUntilColon(FILE *fp) {
  int c;
  do {
    c = getc(fp);
  } while (c != ':' && c != EOF);
  return c;
}


x86 assembly (clang, -O0):
<parseUntilColon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x3a,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1149 <parseUntilColon+0x39>
mov    -0xc(%rbp),%eax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111c <parseUntilColon+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseUntilColon>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <getc@plt>
cmp    $0x3a,%eax
je     1132 <parseUntilColon+0x22>
cmp    (%r14),%eax
jne    1120 <parseUntilColon+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @parseUntilColon(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %14, %1
%5 = load i32*, i32** %2
%6 = call i32 @getc(i32* %5)
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 58
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* @EOF
%13 = icmp ne i32 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %4, label %16
16: ; preds = %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @parseUntilColon(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @getc(i32* %0)
%4 = icmp ne i32 %3, 58
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %3, %5
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %2, label %8
8: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void cutils_cout_bool_print(bool boolean) {
  fprintf(stdout, "%s\n", boolean ? "true" : "false");
}


x86 assembly (clang, -O0):
<cutils_cout_bool_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xedb(%rip),%rdx
lea    0xecf(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cout_bool_print>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
test   %edi,%edi
lea    0xee7(%rip),%rcx
lea    0xedb(%rip),%rdx
cmove  %rcx,%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define void @cutils_cout_bool_print(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define void @cutils_cout_bool_print(i32 %0) {
%2 = load i32, i32* @stdout
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
struct exmem {
  int dummy;
};

/* Variables and functions */
scalar_t__ memory_rw(struct exmem *);
void *memory_rw_void(void *exmem_void) {
  return (void *)memory_rw((struct exmem *)exmem_void);
}


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

x86 assembly (clang, -O2):
<memory_rw_void>:
jmp    1030 <memory_rw@plt>

LLVM IR (-O0):
%struct.exmem = type { i32 }
define i8* @memory_rw_void(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.exmem*
%5 = call i64 @memory_rw(%struct.exmem* %4)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
%struct.exmem = type { i32 }
define i8* @memory_rw_void(i8* %0) {
%2 = bitcast i8* %0 to %struct.exmem*
%3 = tail call i64 @memory_rw(%struct.exmem* %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ lower(int);
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(lower(c));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116c <main+0x3c>
mov    -0x8(%rbp),%edi
call   1050 <lower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2ea9(%rip),%rbx
cmp    (%rbx),%eax
je     1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1050 <lower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @lower(i32 %5)
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ asm_write(int, void const *, size_t);
ssize_t __attribute__((section("libgloss_epiphany")))
_write(int file, const void *ptr, size_t len) {
  return asm_write(file, ptr, len);
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <asm_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
jmp    1030 <asm_write@plt>

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* %1, i64 %2) section "libgloss_epiphany" {
%4 = tail call i32 @asm_write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
char *strdup(char const *);
const char *case2str(const char *str) {
  char *newstr;
  if (str[0] != '-') {
    return str;
  }
  newstr = strdup(str);
  newstr[0] = 'm';
  return newstr;
}


x86 assembly (clang, -O0):
<case2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1139 <case2str+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <case2str+0x45>
mov    -0x10(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x6d,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<case2str>:
push   %rax
mov    %rdi,%rax
cmpb   $0x2d,(%rdi)
jne    1124 <case2str+0x14>
mov    %rax,%rdi
call   1030 <strdup@plt>
movb   $0x6d,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @case2str(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @strdup(i8* %0)
store i8 109, i8* %5
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %0, %1 ]
ret i8* %7
}
/* Type definitions */
struct IODriver {
  int dummy;
};

/* Variables and functions */
int read(int, void *, unsigned int);
int FileIo_Read(struct IODriver *driver, int fd, void *buffer,
                unsigned int length) {
  return read(fd, buffer, length);
}


x86 assembly (clang, -O0):
<FileIo_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileIo_Read>:
mov    %esi,%edi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <read@plt>

LLVM IR (-O0):
%struct.IODriver = type { i32 }
define i32 @FileIo_Read(%struct.IODriver* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.IODriver*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.IODriver* %0, %struct.IODriver** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = call i32 @read(i32 %9, i8* %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.IODriver = type { i32 }
define i32 @FileIo_Read(%struct.IODriver* nocapture readnone %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 @read(i32 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_add_data();
int /*<<< orphan*/ test_delete_data();
int /*<<< orphan*/ test_exchange_data();
int /*<<< orphan*/ test_update_data_symbol();
int main() {
  test_add_data();
  test_delete_data();
  test_exchange_data();
  test_update_data_symbol();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_add_data@plt>
xor    %eax,%eax
call   1060 <test_delete_data@plt>
xor    %eax,%eax
call   1040 <test_exchange_data@plt>
xor    %eax,%eax
call   1030 <test_update_data_symbol@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_add_data()
%2 = tail call i32 (...) @test_delete_data()
%3 = tail call i32 (...) @test_exchange_data()
%4 = tail call i32 (...) @test_update_data_symbol()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void titulo(void) {
  printf("\t\t Bombardi. C-edition 0.3.2  por Julio Enciso, "
         "2013\n\t\t\tVersion sin prueba completa de errores\n\n\n");
}


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

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

LLVM IR (-O0):
@.str = [98 x i8] c"\09\09 Bombardi. C-edition 0.3.2 por Julio Enciso, 2013\0A\09\09\09Version sin prueba completa de errores\0A\0A\0A\00"
define void @titulo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [97 x i8] c"\09\09 Bombardi. C-edition 0.3.2 por Julio Enciso, 2013\0A\09\09\09Version sin prueba completa de errores\0A\0A\00"
define void @titulo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_k(int /*<<< orphan*/);
int32_t __stdfix_sneg_k(int32_t x) { return (__stdfix_sat_k((int64_t)-x)); }


x86 assembly (clang, -O0):
<__stdfix_sneg_k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <__stdfix_sat_k@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__stdfix_sneg_k>:
neg    %edi
jmp    1030 <__stdfix_sat_k@plt>

LLVM IR (-O0):
define i64 @__stdfix_sneg_k(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
%5 = trunc i64 %4 to i32
%6 = call i64 @__stdfix_sat_k(i32 %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @__stdfix_sneg_k(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = sub i32 0, %2
%4 = tail call i64 @__stdfix_sat_k(i32 %3)
ret i64 %4
}
int __attribute__((weak)) _kill() { return -1; }


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

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

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

LLVM IR (-O2):
define weak i32 @_kill() {
ret i32 -1
}
void swr_next_pts() {}


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

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

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

LLVM IR (-O2):
define void @swr_next_pts() {
ret void
}
int test_imm_48int8_mem(signed char *val) {
  return ((*val) & (-0x48 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_48int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffb8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_48int8_mem>:
testb  $0xb8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_48int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -72
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_48int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -72
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int analogRead(int);
int sortColor(int sensor) {
  int voltRead = analogRead(sensor);
  if (voltRead > 675) {
    return 1;
  } else if (voltRead < 308) {
    return 0;
  } else {
    return 15;
  }
}


x86 assembly (clang, -O0):
<sortColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <analogRead@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x2a3,-0xc(%rbp)
jle    113f <sortColor+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    115f <sortColor+0x4f>
cmpl   $0x134,-0xc(%rbp)
jge    1158 <sortColor+0x48>
movl   $0x0,-0x4(%rbp)
jmp    115f <sortColor+0x4f>
movl   $0xf,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sortColor>:
push   %rax
call   1030 <analogRead@plt>
xor    %ecx,%ecx
cmp    $0x134,%eax
mov    $0xf,%edx
cmovl  %ecx,%edx
cmp    $0x2a4,%eax
mov    $0x1,%eax
cmovl  %edx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @sortColor(i32 %0) {
%2 = tail call i32 @analogRead(i32 %0)
%3 = icmp sgt i32 %2, 675
%4 = icmp slt i32 %2, 308
%5 = select i1 %4, i32 0, i32 15
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}
char uuchar(unsigned int val) {
  val &= 0x3F;
  val += 0x20;
  if (val == 0x20)
    val = 0x60;
  return val;
}


x86 assembly (clang, -O0):
<uuchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jne    112a <uuchar+0x2a>
movl   $0x60,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuchar>:
and    $0x3f,%edi
lea    0x20(%rdi),%eax
test   %edi,%edi
movzbl %al,%ecx
mov    $0x60,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @uuchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 63
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = add i32 %5, 32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 32
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 96, i32* %2
br label %10
10: ; preds = %9, %1
%11 = load i32, i32* %2
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @uuchar(i32 %0) {
%2 = and i32 %0, 63
%3 = icmp eq i32 %2, 0
%4 = trunc i32 %2 to i8
%5 = add nuw nsw i8 %4, 32
%6 = select i1 %3, i8 96, i8 %5
ret i8 %6
}
/* Variables and functions */
int ELFHash(char *, int);
int func_is_main(int funcname) {
  if (funcname == ELFHash("main", 4))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<func_is_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <ELFHash@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jne    114b <func_is_main+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <func_is_main+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_is_main>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    $0x4,%esi
call   1030 <ELFHash@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"main\00"
define i32 @func_is_main(i32 %0) {
%2 = tail call i32 @ELFHash(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
int can_request_irq(unsigned int irq, unsigned long irqflags) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @can_request_irq(i32 %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
bool have_north_neighbor(unsigned int ypos) {
  if (ypos == 0)
    return false;
  else
    return true;
}


x86 assembly (clang, -O0):
<have_north_neighbor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <have_north_neighbor+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <have_north_neighbor+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<have_north_neighbor>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @have_north_neighbor(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int IndexOfChar_internal(char *, char, char, char);
int IndexOfChar(char *input, char target) {
  return IndexOfChar_internal(input, target, '\0', '\0');
}


x86 assembly (clang, -O0):
<IndexOfChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
movsbl -0x9(%rbp),%esi
mov    %ecx,%edx
call   1030 <IndexOfChar_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IndexOfChar>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <IndexOfChar_internal@plt>

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

LLVM IR (-O2):
define i32 @IndexOfChar(i8* %0, i8 signext %1) {
%3 = tail call i32 @IndexOfChar_internal(i8* %0, i8 signext %1, i8 signext 0, i8 signext 0)
ret i32 %3
}
/* Variables and functions */
scalar_t__ test_set_get_raw_keys_int(int, int);
int test_set_get_raw_keys(int tst) {
  return test_set_get_raw_keys_int(tst, 0) && test_set_get_raw_keys_int(tst, 1);
}


x86 assembly (clang, -O0):
<test_set_get_raw_keys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <test_set_get_raw_keys_int@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     114e <test_set_get_raw_keys+0x3e>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <test_set_get_raw_keys_int@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_set_get_raw_keys>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <test_set_get_raw_keys_int@plt>
test   %rax,%rax
je     1137 <test_set_get_raw_keys+0x27>
mov    %ebp,%edi
mov    $0x1,%esi
call   1030 <test_set_get_raw_keys_int@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @test_set_get_raw_keys(i32 %0) {
%2 = tail call i64 @test_set_get_raw_keys_int(i32 %0, i32 0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @test_set_get_raw_keys_int(i32 %0, i32 1)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct stat {
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
uid_t get_file_owner(const char *path) {
  struct stat stats;
  return stat(path, &stats) == 0 ? stats.st_uid : (uid_t)-1;
}


x86 assembly (clang, -O0):
<get_file_owner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113e <get_file_owner+0x2e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114b <get_file_owner+0x3b>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <get_file_owner+0x3b>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_owner>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_file_owner(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
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void msort(int a[], int start, int end) {
  int middle;
  if (start < end) {
    middle = (start + end) / 2;
    msort(a, start, middle);
    msort(a, middle + 1, end);
    merge(a, start, middle, end);
  }
}


x86 assembly (clang, -O0):
<msort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <msort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <msort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <msort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msort>:
cmp    %edx,%esi
jge    1172 <msort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <msort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <msort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

LLVM IR (-O0):
define void @msort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %28
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
%15 = sdiv i32 %14, 2
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = load i32*, i32** %4
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %6
%23 = load i32*, i32** %4
%24 = load i32, i32* %5
%25 = load i32, i32* %7
%26 = load i32, i32* %6
%27 = call i32 @merge(i32* %23, i32 %24, i32 %25, i32 %26)
br label %28
28: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @msort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @msort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @msort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void blank_line(void) {
  printf("\n");
  return;
}


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

x86 assembly (clang, -O2):
<blank_line>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @blank_line() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char *);
int /*<<< orphan*/ stdout;
int minitest_pass(const char *msg) {
  if (msg != NULL) {
    fprintf(stdout, "%s[PASS] %s%s\n", "\033[01;32m", msg, "\033[0m");
  }
  return 0;
}


x86 assembly (clang, -O0):
<minitest_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114e <minitest_pass+0x3e>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xec5(%rip),%rsi
lea    0xecd(%rip),%rdx
lea    0xecf(%rip),%r8
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minitest_pass>:
test   %rdi,%rdi
je     1140 <minitest_pass+0x30>
push   %rax
mov    %rdi,%rcx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
lea    0xedf(%rip),%rdx
lea    0xee1(%rip),%r8
call   1030 <fprintf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [15 x i8] c"%s[PASS] %s%s\0A\00"
@.str.1 = [9 x i8] c"\1B[01;32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define i32 @minitest_pass(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stdout
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [15 x i8] c"%s[PASS] %s%s\0A\00"
@.str.1 = [9 x i8] c"\1B[01;32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define i32 @minitest_pass(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
double atan2(double, double);
double c_atan2(double arg0, double arg1) { return atan2(arg0, arg1); }


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

x86 assembly (clang, -O2):
<c_atan2>:
jmp    1030 <atan2@plt>

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

LLVM IR (-O2):
define double @c_atan2(double %0, double %1) {
%3 = tail call double @atan2(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage:  vcpustat [ options ] [ <interval> [ count ] ]\n\n"
         "options:\n"
         "\t-e, --enable          Enable gathering statistics.\n"
         "\t-d, --disable         Disable gathering statistics.\n"
         "\t-n, --numeric         Display the statistics in numbers, rather "
         "than percentage.\n"
         "\t-r, --raw             Display the raw counts, rather than the "
         "difference in an interval.\n"
         "\t-h, --help            Show this message and exit.\n"
         "\t-V, --version         Display vcpustat version information.\n"
         "\tinterval              The interval parameter specifies the amount "
         "of time between each report.\n"
         "\tcount                 The count parameter specifies how many "
         "reports will be displayed.\n");
}


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

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

LLVM IR (-O0):
@.str = [639 x i8] c"Usage: vcpustat [ options ] [ <interval> [ count ] ]\0A\0Aoptions:\0A\09-e, --enable Enable gathering statistics.\0A\09-d, --disable Disable gathering statistics.\0A\09-n, --numeric Display the statistics in numbers, rather than percentage.\0A\09-r, --raw Display the raw counts, rather than the difference in an interval.\0A\09-h, --help Show this message and exit.\0A\09-V, --version Display vcpustat version information.\0A\09interval The interval parameter specifies the amount of time between each report.\0A\09count The count parameter specifies how many reports will be displayed.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([639 x i8], [639 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [638 x i8] c"Usage: vcpustat [ options ] [ <interval> [ count ] ]\0A\0Aoptions:\0A\09-e, --enable Enable gathering statistics.\0A\09-d, --disable Disable gathering statistics.\0A\09-n, --numeric Display the statistics in numbers, rather than percentage.\0A\09-r, --raw Display the raw counts, rather than the difference in an interval.\0A\09-h, --help Show this message and exit.\0A\09-V, --version Display vcpustat version information.\0A\09interval The interval parameter specifies the amount of time between each report.\0A\09count The count parameter specifies how many reports will be displayed.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([638 x i8], [638 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ sorter_grail_common_sort(int /*<<< orphan*/ *, size_t,
                                            int /*<<< orphan*/ *,
                                            int /*<<< orphan*/);
void sorter_grail_sort(int64_t *arr, size_t Len) {
  sorter_grail_common_sort(arr, Len, NULL, 0);
}


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

x86 assembly (clang, -O2):
<sorter_grail_sort>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <sorter_grail_common_sort@plt>

LLVM IR (-O0):
define void @sorter_grail_sort(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 = call i32 @sorter_grail_common_sort(i32* %5, i64 %6, i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @sorter_grail_sort(i32* %0, i64 %1) {
%3 = tail call i32 @sorter_grail_common_sort(i32* %0, i64 %1, i32* null, i32 0)
ret void
}
extern unsigned char __inbc(unsigned short port) {
  unsigned char _v;
  __asm__ __volatile__("in"
                       "b"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  return _v;
}


x86 assembly (clang, -O0):
<__inbc>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inbc>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @__inbc(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @__inbc(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
int char_eq(int c1, int c2) { return c1 == c2; }


x86 assembly (clang, -O0):
<char_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_eq>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @char_eq(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 eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @char_eq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void unsigned_char_rem_signed_char_signed_int(unsigned char *LHS,
                                              signed int RHS) {
  (*LHS) %= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_rem_signed_char_signed_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzbl (%rax),%eax
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %dl,%cl
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_rem_signed_char_signed_int>:
movzbl (%rdi),%eax
xor    %edx,%edx
idiv   %esi
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_rem_signed_char_signed_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = srem i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @unsigned_char_rem_signed_char_signed_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = srem i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0On();
void WaterPumpC__Leds__led0On(void) { LedsP__Leds__led0On(); }


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

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

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

LLVM IR (-O2):
define void @WaterPumpC__Leds__led0On() {
%1 = tail call i32 (...) @LedsP__Leds__led0On()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(size_t);
void *realloc(void *, size_t);
void *mrealloc(void *ptr, size_t size) {
  if (size) {
    ptr = ptr ? realloc(ptr, size) : malloc(size);
  } else if (ptr) {
    free(ptr);
    ptr = NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<mrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1186 <mrealloc+0x56>
cmpq   $0x0,-0x8(%rbp)
je     116c <mrealloc+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
jmp    1179 <mrealloc+0x49>
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a7 <mrealloc+0x77>
cmpq   $0x0,-0x8(%rbp)
je     11a2 <mrealloc+0x72>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    11a7 <mrealloc+0x77>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mrealloc>:
test   %rsi,%rsi
je     113f <mrealloc+0xf>
test   %rdi,%rdi
je     1151 <mrealloc+0x21>
jmp    1050 <realloc@plt>
test   %rdi,%rdi
je     114e <mrealloc+0x1e>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret
mov    %rsi,%rdi
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @mrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i8* @realloc(i8* %11, i64 %12)
br label %17
14: ; preds = %7
%15 = load i64, i64* %4
%16 = call i8* @malloc(i64 %15)
br label %17
17: ; preds = %14, %10
%18 = phi i8* [ %13, %10 ], [ %16, %14 ]
store i8* %18, i8** %3
br label %26
19: ; preds = %2
%20 = load i8*, i8** %3
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i8*, i8** %3
%24 = call i32 @free(i8* %23)
store i8* null, i8** %3
br label %25
25: ; preds = %22, %19
br label %26
26: ; preds = %25, %17
%27 = load i8*, i8** %3
ret i8* %27
}

LLVM IR (-O2):
define noalias i8* @mrealloc(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = icmp eq i8* %0, null
br i1 %3, label %10, label %5
5: ; preds = %2
br i1 %4, label %8, label %6
6: ; preds = %5
%7 = tail call i8* @realloc(i8* %0, i64 %1)
br label %13
8: ; preds = %5
%9 = tail call i8* @malloc(i64 %1)
br label %13
10: ; preds = %2
br i1 %4, label %13, label %11
11: ; preds = %10
%12 = tail call i32 @free(i8* %0)
br label %13
13: ; preds = %6, %8, %10, %11
%14 = phi i8* [ null, %11 ], [ null, %10 ], [ %7, %6 ], [ %9, %8 ]
ret i8* %14
}
void gf8mul_00001101(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm5\n"
                       "\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm7, %xmm0\n"
                       "\tpxor    %xmm6, %xmm7\n"
                       "\tpxor    %xmm6, %xmm5\n"
                       "\tpxor    %xmm6, %xmm1\n"
                       "\tpxor    %xmm5, %xmm6\n"
                       "\tpxor    %xmm5, %xmm4\n"
                       "\tpxor    %xmm5, %xmm0\n"
                       "\tpxor    %xmm4, %xmm7\n"
                       "\tpxor    %xmm4, %xmm6\n"
                       "\tpxor    %xmm3, %xmm6\n"
                       "\tpxor    %xmm3, %xmm5\n"
                       "\tpxor    %xmm2, %xmm5\n"
                       "\tpxor    %xmm2, %xmm4\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm1, %xmm3\n"
                       "\tpxor    %xmm0, %xmm3\n"
                       "\tpxor    %xmm0, %xmm2\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm5
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm3
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm7,%xmm0
pxor   %xmm6,%xmm7
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm1
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm4
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm5
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm3
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
ret

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

LLVM IR (-O2):
define void @gf8mul_00001101() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm5\0A\09pxor %xmm7, %xmm4\0A\09pxor %xmm7, %xmm2\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm7, %xmm0\0A\09pxor %xmm6, %xmm7\0A\09pxor %xmm6, %xmm5\0A\09pxor %xmm6, %xmm1\0A\09pxor %xmm5, %xmm6\0A\09pxor %xmm5, %xmm4\0A\09pxor %xmm5, %xmm0\0A\09pxor %xmm4, %xmm7\0A\09pxor %xmm4, %xmm6\0A\09pxor %xmm3, %xmm6\0A\09pxor %xmm3, %xmm5\0A\09pxor %xmm2, %xmm5\0A\09pxor %xmm2, %xmm4\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm1, %xmm3\0A\09pxor %xmm0, %xmm3\0A\09pxor %xmm0, %xmm2\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}