xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char *);
bool delimcheck(char const *cur, void *_delim) {
  char *delim;
  delim = _delim;
  return !!strcmp(cur, delim);
}


x86 assembly (clang, -O0):
<delimcheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @delimcheck(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %5
%9 = call i32 @strcmp(i8* %7, i8* %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @delimcheck(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char **backtrace_symbols(void **, int);
char **get_backtrace_symbols(void **addr, int len) {
  return backtrace_symbols(addr, len);
}


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

x86 assembly (clang, -O2):
<get_backtrace_symbols>:
jmp    1030 <backtrace_symbols@plt>

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

LLVM IR (-O2):
define i8** @get_backtrace_symbols(i8** %0, i32 %1) {
%3 = tail call i8** @backtrace_symbols(i8** %0, i32 %1)
ret i8** %3
}
/* Type definitions */
typedef int uint64_t;
typedef unsigned long uint32_t;

/* Variables and functions */
uint64_t TimerValueGet64(uint32_t ui32Base) {
  uint32_t ui32High1, ui32High2, ui32Low;
  ;
  do {
    ui32High1 = (*((volatile unsigned long *)(ui32Base + 0x0000004C)));
    ui32Low = (*((volatile unsigned long *)(ui32Base + 0x00000048)));
    ui32High2 = (*((volatile unsigned long *)(ui32Base + 0x0000004C)));
  } while (ui32High1 != ui32High2);
  return (((uint64_t)ui32High1 << 32) | (uint64_t)ui32Low);
}


x86 assembly (clang, -O0):
<TimerValueGet64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1108 <TimerValueGet64+0x8>
mov    -0x10(%rbp),%rax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x20(%rbp),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerValueGet64>:
mov    0x4c(%rdi),%rax
mov    0x48(%rdi),%rcx
cmp    0x4c(%rdi),%rax
jne    1100 <TimerValueGet64>
ret

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

LLVM IR (-O2):
define i32 @TimerValueGet64(i64 %0) {
%2 = add i64 %0, 76
%3 = inttoptr i64 %2 to i64*
%4 = add i64 %0, 72
%5 = inttoptr i64 %4 to i64*
br label %6
6: ; preds = %6, %1
%7 = load volatile i64, i64* %3
%8 = load volatile i64, i64* %5
%9 = load volatile i64, i64* %3
%10 = icmp eq i64 %7, %9
br i1 %10, label %11, label %6
11: ; preds = %6
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ _start();
int /*<<< orphan*/ kernel_init();
void Reset(void) {
  kernel_init();
  _start();
}


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

x86 assembly (clang, -O2):
<Reset>:
push   %rax
xor    %eax,%eax
call   1030 <kernel_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <_start@plt>

LLVM IR (-O0):
define void @Reset() {
%1 = call i32 (...) @kernel_init()
%2 = call i32 (...) @_start()
ret void
}

LLVM IR (-O2):
define void @Reset() {
%1 = tail call i32 (...) @kernel_init()
%2 = tail call i32 (...) @_start()
ret void
}
void null_pruning_symbols(unsigned int a, unsigned int b) {
  unsigned int c = a + b;
  if (c > 0) {
    char result[c];
    result[c - 1] = 0;
  }
}


x86 assembly (clang, -O0):
<null_pruning_symbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1158 <null_pruning_symbols+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x18(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @null_pruning_symbols(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp ugt i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %2
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %6
%17 = alloca i8, i64 %15
store i64 %15, i64* %7
%18 = load i32, i32* %5
%19 = sub i32 %18, 1
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
store i8 0, i8* %21
%22 = load i8*, i8** %6
br label %23
23: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
define void @null_pruning_symbols(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
int sub(int, int);
int main() {
  int a = 20, b = 10;
  printf(" %d + %d = %d \n %d - %d = %d \n", a, b, add(a, b), a, b, sub(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <sub@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0xe6a(%rip),%rdi
mov    %eax,(%rsp)
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x14,%edi
mov    $0xa,%esi
call   1030 <add@plt>
mov    %eax,%ebx
mov    $0x14,%edi
mov    $0xa,%esi
call   1050 <sub@plt>
mov    %eax,(%rsp)
lea    0xea1(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
mov    %ebx,%ecx
mov    $0x14,%r8d
mov    $0xa,%r9d
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c" %d + %d = %d \0A %d - %d = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
store i32 10, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @add(i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i32 @sub(i32 %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %8, i32 %9, i32 %10, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c" %d + %d = %d \0A %d - %d = %d \0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 20, i32 10)
%2 = tail call i32 @sub(i32 20, i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 20, i32 10, i32 %1, i32 20, i32 10, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ FD_CLOEXEC;
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char const *, int, int /*<<< orphan*/);
int open_cloexec(const char *path, int flags, mode_t mode) {
  int fd = open(path, flags, mode);
  if (fd >= 0)
    fcntl(fd, F_SETFD, FD_CLOEXEC);
  return fd;
}


x86 assembly (clang, -O0):
<open_cloexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1168 <open_cloexec+0x48>
mov    -0x14(%rbp),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
mov    0x2e77(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_cloexec>:
push   %rbx
call   1040 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1145 <open_cloexec+0x25>
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
call   1030 <fcntl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @open_cloexec(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @open(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i32, i32* %7
%16 = load i32, i32* @F_SETFD
%17 = load i32, i32* @FD_CLOEXEC
%18 = call i32 @fcntl(i32 %15, i32 %16, i32 %17)
br label %19
19: ; preds = %14, %3
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @open_cloexec(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @F_SETFD
%8 = load i32, i32* @FD_CLOEXEC
%9 = tail call i32 @fcntl(i32 %4, i32 %7, i32 %8)
br label %10
10: ; preds = %6, %3
ret i32 %4
}
void EVP_PKEY_add1_attr_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_add1_attr_by_OBJ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = 20;
  int *y;
  y = &x;
  printf("value of x: %d\n", x);
  printf("value of y: %d\n", *y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"value of x: %d\0A\00"
@.str.1 = [16 x i8] c"value of y: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 20, i32* %2
store i32* %2, i32** %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"value of x: %d\0A\00"
@.str.1 = [16 x i8] c"value of y: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 20)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 20)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ warn(char *, char *);
int bamFileExists(char *bamFileName) {
  warn("%s: in order to use this functionality you must "
       "install the samtools library (<A "
       "HREF=\"http://samtools.sourceforge.net\" "
       "TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile "
       "kent/src with "
       "USE_BAM=1 in your environment "
       "(see <A "
       "HREF=\"http://genomewiki.ucsc.edu/index.php/"
       "Build_Environment_Variables\" "
       "TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/"
       "Build_Environment_Variables</A>).",
       "bamFileExists");
  return 0;
}


x86 assembly (clang, -O0):
<bamFileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0x1060(%rip),%rsi
call   1030 <warn@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bamFileExists>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x106b(%rip),%rsi
call   1030 <warn@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [394 x i8] c"%s: in order to use this functionality you must install the samtools library (<A HREF=\22http://samtools.sourceforge.net\22 TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile kent/src with USE_BAM=1 in your environment (see <A HREF=\22http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables\22 TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables</A>).\00"
@.str.1 = [14 x i8] c"bamFileExists\00"
define i32 @bamFileExists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @warn(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [394 x i8] c"%s: in order to use this functionality you must install the samtools library (<A HREF=\22http://samtools.sourceforge.net\22 TARGET=_BLANK>http://samtools.sourceforge.net</A>) and recompile kent/src with USE_BAM=1 in your environment (see <A HREF=\22http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables\22 TARGET=_BLANK>http://genomewiki.ucsc.edu/index.php/Build_Environment_Variables</A>).\00"
@.str.1 = [14 x i8] c"bamFileExists\00"
define i32 @bamFileExists(i8* nocapture readnone %0) {
%2 = tail call i32 @warn(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int div_round(int dividend, int divisor) {
  if (dividend > 0)
    return (dividend + (divisor >> 1)) / divisor;
  else
    return -((-dividend + (divisor >> 1)) / divisor);
}


x86 assembly (clang, -O0):
<div_round>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112b <div_round+0x2b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1145 <div_round+0x45>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_round>:
mov    %esi,%eax
sar    %eax
test   %edi,%edi
jle    110e <div_round+0xe>
add    %edi,%eax
cltd
idiv   %esi
ret
sub    %edi,%eax
cltd
idiv   %esi
neg    %eax
ret

LLVM IR (-O0):
define i32 @div_round(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 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = ashr i32 %10, 1
%12 = add nsw i32 %9, %11
%13 = load i32, i32* %5
%14 = sdiv i32 %12, %13
store i32 %14, i32* %3
br label %24
15: ; preds = %2
%16 = load i32, i32* %4
%17 = sub nsw i32 0, %16
%18 = load i32, i32* %5
%19 = ashr i32 %18, 1
%20 = add nsw i32 %17, %19
%21 = load i32, i32* %5
%22 = sdiv i32 %20, %21
%23 = sub nsw i32 0, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %15, %8
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @div_round(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
%4 = ashr i32 %1, 1
br i1 %3, label %5, label %8
5: ; preds = %2
%6 = add nsw i32 %4, %0
%7 = sdiv i32 %6, %1
br label %12
8: ; preds = %2
%9 = sub i32 %4, %0
%10 = sdiv i32 %9, %1
%11 = sub nsw i32 0, %10
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
struct shl_htable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ shl_htable_visit(struct shl_htable *,
                                    void (*)(void *, void *), void *);
void shl_htable_visit_str(struct shl_htable *htable,
                          void (*cb)(char **elem, void *ctx), void *ctx) {
  shl_htable_visit(htable, (void (*)(void *, void *))cb, ctx);
}


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

x86 assembly (clang, -O2):
<shl_htable_visit_str>:
jmp    1030 <shl_htable_visit@plt>

LLVM IR (-O0):
%struct.shl_htable = type { i32 }
define void @shl_htable_visit_str(%struct.shl_htable* %0, void (i8**, i8*)* %1, i8* %2) {
%4 = alloca %struct.shl_htable*
%5 = alloca void (i8**, i8*)*
%6 = alloca i8*
store %struct.shl_htable* %0, %struct.shl_htable** %4
store void (i8**, i8*)* %1, void (i8**, i8*)** %5
store i8* %2, i8** %6
%7 = load %struct.shl_htable*, %struct.shl_htable** %4
%8 = load void (i8**, i8*)*, void (i8**, i8*)** %5
%9 = bitcast void (i8**, i8*)* %8 to void (i8*, i8*)*
%10 = load i8*, i8** %6
%11 = call i32 @shl_htable_visit(%struct.shl_htable* %7, void (i8*, i8*)* %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.shl_htable = type { i32 }
define void @shl_htable_visit_str(%struct.shl_htable* %0, void (i8**, i8*)* %1, i8* %2) {
%4 = bitcast void (i8**, i8*)* %1 to void (i8*, i8*)*
%5 = tail call i32 @shl_htable_visit(%struct.shl_htable* %0, void (i8*, i8*)* %4, i8* %2)
ret void
}
/* Variables and functions */
int color_eqn(int, int, int /*<<< orphan*/, int, int, int);
int r_cyg_yeg_yemg(int entrycyg, int entrycymg, int entryyeg, int entryyemg) {
  return color_eqn(87, entryyemg, 0, entryyeg, -62, entrycyg);
}


x86 assembly (clang, -O0):
<r_cyg_yeg_yemg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%r9d
mov    $0x57,%edi
xor    %edx,%edx
mov    $0xffffffc2,%r8d
call   1030 <color_eqn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_cyg_yeg_yemg>:
mov    %edx,%eax
mov    %edi,%r9d
mov    $0x57,%edi
mov    %ecx,%esi
xor    %edx,%edx
mov    %eax,%ecx
mov    $0xffffffc2,%r8d
jmp    1030 <color_eqn@plt>

LLVM IR (-O0):
define i32 @r_cyg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %7
%11 = load i32, i32* %5
%12 = call i32 @color_eqn(i32 87, i32 %9, i32 0, i32 %10, i32 -62, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @r_cyg_yeg_yemg(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @color_eqn(i32 87, i32 %3, i32 0, i32 %2, i32 -62, i32 %0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ readnext(int /*<<< orphan*/);
void op_rdnxpos() { readnext(0); }


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

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

LLVM IR (-O0):
define void @op_rdnxpos() {
%1 = call i32 @readnext(i32 0)
ret void
}

LLVM IR (-O2):
define void @op_rdnxpos() {
%1 = tail call i32 @readnext(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setZeroACC(char *, unsigned char);
int testACC(unsigned char acc, char *STAT) {
  unsigned char bit;
  if (acc == 0)
    bit = 1;
  else
    bit = 0;
  setZeroACC(STAT, bit);
}


x86 assembly (clang, -O0):
<testACC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    1138 <testACC+0x28>
movb   $0x1,-0x11(%rbp)
jmp    113c <testACC+0x2c>
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movzbl -0x11(%rbp),%esi
call   1030 <setZeroACC@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testACC>:
mov    %rsi,%rax
xor    %esi,%esi
test   %edi,%edi
sete   %sil
mov    %rax,%rdi
jmp    1030 <setZeroACC@plt>

LLVM IR (-O0):
define i32 @testACC(i8 zeroext %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8
store i8 %0, i8* %4
store i8* %1, i8** %5
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i8 1, i8* %6
br label %12
11: ; preds = %2
store i8 0, i8* %6
br label %12
12: ; preds = %11, %10
%13 = load i8*, i8** %5
%14 = load i8, i8* %6
%15 = call i32 @setZeroACC(i8* %13, i8 zeroext %14)
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @testACC(i8 zeroext %0, i8* %1) {
%3 = icmp eq i8 %0, 0
%4 = zext i1 %3 to i8
%5 = tail call i32 @setZeroACC(i8* %1, i8 zeroext %4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ port_unlock_from_isr();
void chSysUnlockFromISR(void) {
  ;
  ;
  port_unlock_from_isr();
}


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

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

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

LLVM IR (-O2):
define void @chSysUnlockFromISR() {
%1 = tail call i32 (...) @port_unlock_from_isr()
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;
typedef float int32_t;

/* Variables and functions */
float ldexpf(float, int);
float UnflattenFloat(float *number, int32_t mantissa, int8_t exponent) {
  const int32_t MAXVAL = 0x7FFFFFFF;
  float fractional_mant = ((float)mantissa) / MAXVAL;
  float result = ldexpf(fractional_mant, (int)exponent);
  if (number) {
    *number = result;
  }
  return result;
}


x86 assembly (clang, -O0):
<UnflattenFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xec1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    %eax,%edi
call   1030 <ldexpf@plt>
movss  %xmm0,-0x24(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <UnflattenFloat+0x65>
movss  -0x24(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x24(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnflattenFloat>:
push   %rbx
mov    %rdi,%rbx
mulss  0xee4(%rip),%xmm0
mov    %esi,%edi
call   1030 <ldexpf@plt>
test   %rbx,%rbx
je     112c <UnflattenFloat+0x1c>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define float @UnflattenFloat(float* %0, float %1, i64 %2) {
%4 = alloca float*
%5 = alloca float
%6 = alloca i64
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float* %0, float** %4
store float %1, float* %5
store i64 %2, i64* %6
store float 0x41E0000000000000, float* %7
%10 = load float, float* %5
%11 = fdiv float %10, 0x41E0000000000000
store float %11, float* %8
%12 = load float, float* %8
%13 = load i64, i64* %6
%14 = trunc i64 %13 to i32
%15 = call float @ldexpf(float %12, i32 %14)
store float %15, float* %9
%16 = load float*, float** %4
%17 = icmp ne float* %16, null
br i1 %17, label %18, label %21
18: ; preds = %3
%19 = load float, float* %9
%20 = load float*, float** %4
store float %19, float* %20
br label %21
21: ; preds = %18, %3
%22 = load float, float* %9
ret float %22
}

LLVM IR (-O2):
define float @UnflattenFloat(float* writeonly %0, float %1, i64 %2) {
%4 = fmul float %1, 0x3E00000000000000
%5 = trunc i64 %2 to i32
%6 = tail call float @ldexpf(float %4, i32 %5)
%7 = icmp eq float* %0, null
br i1 %7, label %9, label %8
8: ; preds = %3
store float %6, float* %0
br label %9
9: ; preds = %8, %3
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int has_prefix(const char *str, const char *prefix) {
  return (strncmp(str, prefix, strlen(prefix)) == 0);
}


x86 assembly (clang, -O0):
<has_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_prefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @has_prefix(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @has_prefix(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_square_set_current(int);
int roadmap_square_first_shape(int square) {
  roadmap_square_set_current(square);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @roadmap_square_first_shape(i32 %0) {
%2 = tail call i32 @roadmap_square_set_current(i32 %0)
ret i32 0
}
/* Variables and functions */
int pow(int, int);
int sin(int);
double ElasticEaseOut(double p) {
  return sin(-13 * 3.14159265358979323846264338327 / 2 * (p + 1)) *
             pow(2, -10 * p) +
         1;
}


x86 assembly (clang, -O0):
<ElasticEaseOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    %eax,-0xc(%rbp)
movsd  0xea6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ElasticEaseOut>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  0xecd(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xec9(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sin@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mulsd  0xeb8(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    $0x2,%edi
call   1040 <pow@plt>
imul   %ebx,%eax
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @ElasticEaseOut(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 1.000000e+00
%5 = fmul double 0xC0346B9C347764A4, %4
%6 = fptosi double %5 to i32
%7 = call i32 @sin(i32 %6)
%8 = load double, double* %2
%9 = fmul double -1.000000e+01, %8
%10 = fptosi double %9 to i32
%11 = call i32 @pow(i32 2, i32 %10)
%12 = mul nsw i32 %7, %11
%13 = add nsw i32 %12, 1
%14 = sitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @ElasticEaseOut(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fmul double %2, 0xC0346B9C347764A4
%4 = fptosi double %3 to i32
%5 = tail call i32 @sin(i32 %4)
%6 = fmul double %0, -1.000000e+01
%7 = fptosi double %6 to i32
%8 = tail call i32 @pow(i32 2, i32 %7)
%9 = mul nsw i32 %8, %5
%10 = add nsw i32 %9, 1
%11 = sitofp i32 %10 to double
ret double %11
}
int pwm_cfg_src_is_tclk(unsigned long tcfg) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pwm_cfg_src_is_tclk(i64 %0) {
ret i32 0
}
void gtk_ui_manager_item_type_get_type() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @unwind_setup() {
ret void
}
/* Variables and functions */
int convert_3d_indices_to_linear_index_inline(int, int, int, int, int, int);
int convert_3d_indices_to_linear_index(int index_x, int index_y, int index_z,
                                       int *nx_ny_nz) {
  return convert_3d_indices_to_linear_index_inline(
      index_x, index_y, index_z, nx_ny_nz[0], nx_ny_nz[1], nx_ny_nz[2]);
}


x86 assembly (clang, -O0):
<convert_3d_indices_to_linear_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%r9d
call   1030 <convert_3d_indices_to_linear_index_inline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_3d_indices_to_linear_index>:
mov    (%rcx),%eax
mov    0x4(%rcx),%r8d
mov    0x8(%rcx),%r9d
mov    %eax,%ecx
jmp    1030 <convert_3d_indices_to_linear_index_inline@plt>

LLVM IR (-O0):
define i32 @convert_3d_indices_to_linear_index(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = load i32*, i32** %8
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = load i32*, i32** %8
%19 = getelementptr inbounds i32, i32* %18, i64 2
%20 = load i32, i32* %19
%21 = call i32 @convert_3d_indices_to_linear_index_inline(i32 %9, i32 %10, i32 %11, i32 %14, i32 %17, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @convert_3d_indices_to_linear_index(i32 %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = getelementptr inbounds i32, i32* %3, i64 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %3, i64 2
%9 = load i32, i32* %8
%10 = tail call i32 @convert_3d_indices_to_linear_index_inline(i32 %0, i32 %1, i32 %2, i32 %5, i32 %7, i32 %9)
ret i32 %10
}
int teststack() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @teststack() {
ret i32 0
}
int get_aac_bitreservoir_maxsize(int bit_rate, int sample_rate) {
  return (6144 - (int)((float)bit_rate / (float)sample_rate * 1024));
}


x86 assembly (clang, -O0):
<get_aac_bitreservoir_maxsize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  0xee0(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
mov    $0x1800,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_aac_bitreservoir_maxsize>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
mulss  0xeec(%rip),%xmm0
cvttss2si %xmm0,%ecx
mov    $0x1800,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @get_aac_bitreservoir_maxsize(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 = sitofp i32 %5 to float
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = fdiv float %6, %8
%10 = fmul float %9, 1.024000e+03
%11 = fptosi float %10 to i32
%12 = sub nsw i32 6144, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_aac_bitreservoir_maxsize(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = sitofp i32 %1 to float
%5 = fdiv float %3, %4
%6 = fmul float %5, 1.024000e+03
%7 = fptosi float %6 to i32
%8 = sub nsw i32 6144, %7
ret i32 %8
}
/* Variables and functions */
char *getlogin();
char *MFprocUserName() { return (getlogin()); }


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

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

LLVM IR (-O0):
define i8* @MFprocUserName() {
%1 = call i8* (...) @getlogin()
ret i8* %1
}

LLVM IR (-O2):
define i8* @MFprocUserName() {
%1 = tail call i8* (...) @getlogin()
ret i8* %1
}
double feetToYards(double feet) { return feet / 3.0; }


x86 assembly (clang, -O0):
<feetToYards>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @feetToYards(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 3.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @feetToYards(double %0) {
%2 = fdiv double %0, 3.000000e+00
ret double %2
}
const char *str_expr_funcall() { return "function-call"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"function-call\00"
define i8* @str_expr_funcall() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"function-call\00"
define i8* @str_expr_funcall() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
long long m(long long);
long long f(int n) {
  if (n == 0) {
    return 1;
  }
  return n - m(f(n - 1));
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1142 <f+0x22>
movq   $0x1,-0x8(%rbp)
jmp    116b <f+0x4b>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %rax,%rdi
call   1040 <m@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
test   %edi,%edi
je     113d <f+0x1d>
movslq %edi,%rbx
add    $0xffffffff,%edi
call   1030 <f@plt>
mov    %rax,%rdi
call   1040 <m@plt>
sub    %rax,%rbx
jmp    1142 <f+0x22>
mov    $0x1,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @f(i32 %0) {
%2 = alloca i64
%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 i64 1, i64* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
%12 = call i64 @f(i32 %11)
%13 = call i64 @m(i64 %12)
%14 = sub nsw i64 %9, %13
store i64 %14, i64* %2
br label %15
15: ; preds = %7, %6
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
define i64 @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i64 [ %10, %5 ], [ 1, %1 ]
ret i64 %4
5: ; preds = %1
%6 = sext i32 %0 to i64
%7 = add nsw i32 %0, -1
%8 = tail call i64 @f(i32 %7)
%9 = tail call i64 @m(i64 %8)
%10 = sub nsw i64 %6, %9
br label %3
}
int debug_never(int level, char *name, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @debug_never(i32 %0, i8* nocapture readnone %1, ...) {
ret i32 0
}
void SSMR3GetSInt(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetSInt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s {alpha p} {numer p} {alpha c} {numer c}\n", argv0);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s {alpha p} {numer p} {alpha c} {numer c}\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s {alpha p} {numer p} {alpha c} {numer c}\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int wmf_open(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wmf_open() {
ret i32 0
}
int fun650() { return 650; }


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

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

LLVM IR (-O0):
define i32 @fun650() {
ret i32 650
}

LLVM IR (-O2):
define i32 @fun650() {
ret i32 650
}
void gdk_setting_action_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_setting_action_get_type() {
ret void
}
/* Variables and functions */
double factorial(int);
double powi(double, int);
double exp(double x) {
  double sigma = 0;
  int i;
  for (i = 0; i < 150; i++)
    sigma += powi(x, i) / factorial(i);
  return sigma;
}


x86 assembly (clang, -O0):
<exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x96,-0x14(%rbp)
jge    1187 <exp+0x67>
movsd  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%edi
call   1040 <powi@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <factorial@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113c <exp+0x1c>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
mov    %ebx,%edi
call   1040 <powi@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebx,%edi
call   1030 <factorial@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%ebx
cmp    $0x96,%ebx
jne    1140 <exp+0x20>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @exp(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %2
store double 0.000000e+00, double* %3
store i32 0, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 150
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load double, double* %2
%10 = load i32, i32* %4
%11 = call double @powi(double %9, i32 %10)
%12 = load i32, i32* %4
%13 = call double @factorial(i32 %12)
%14 = fdiv double %11, %13
%15 = load double, double* %3
%16 = fadd double %15, %14
store double %16, double* %3
br label %17
17: ; preds = %8
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @exp(double %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %9, %2 ]
%4 = phi double [ 0.000000e+00, %1 ], [ %8, %2 ]
%5 = tail call double @powi(double %0, i32 %3)
%6 = tail call double @factorial(i32 %3)
%7 = fdiv double %5, %6
%8 = fadd double %4, %7
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 150
br i1 %10, label %11, label %2
11: ; preds = %2
ret double %8
}
long kernel___Int_lsh___impl(long self, long i) { return self << i; }


x86 assembly (clang, -O0):
<kernel___Int_lsh___impl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel___Int_lsh___impl>:
mov    %rsi,%rcx
mov    %rdi,%rax
shl    %cl,%rax
ret

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

LLVM IR (-O2):
define i64 @kernel___Int_lsh___impl(i64 %0, i64 %1) {
%3 = shl i64 %0, %1
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
void loggingVoid(const char *file, const char *func, int line,
                 unsigned int level, const char *msg, va_list vargs) {}


x86 assembly (clang, -O0):
<loggingVoid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @loggingVoid(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3, i8* nocapture %4, i32 %5) {
ret void
}