xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
int f4(int x, int y, int z, int w) {
  printf("f4 received: %d %d %d %d\n", x, y, z, w);
  return (x * y) + (z * w);
}


x86 assembly (clang, -O0):
<f4>:
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    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%r15d
lea    0xed8(%rip),%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
mov    %ebx,%r8d
call   1030 <printf@plt>
imul   %r15d,%ebp
imul   %r14d,%ebx
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"f4 received: %d %d %d %d\0A\00"
define i32 @f4(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 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = mul nsw i32 %17, %18
%20 = add nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
@.str = [26 x i8] c"f4 received: %d %d %d %d\0A\00"
define i32 @f4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
%6 = mul nsw i32 %1, %0
%7 = mul nsw i32 %3, %2
%8 = add nsw i32 %7, %6
ret i32 %8
}
int mbuffer_system_destroy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mbuffer_system_destroy() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mk_file_persistent(char const *);
int f_persistent(int mode, unsigned char **sec, float *data, unsigned int ndata,
                 char *inv_out, void **local, const char *arg1) {
  if (mode == -1) {
    mk_file_persistent(arg1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<f_persistent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1145 <f_persistent+0x35>
mov    0x10(%rbp),%rdi
call   1030 <mk_file_persistent@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_persistent>:
cmp    $0xffffffff,%edi
je     1118 <f_persistent+0x8>
xor    %eax,%eax
ret
push   %rax
mov    0x10(%rsp),%rdi
call   1030 <mk_file_persistent@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f_persistent(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* %6) {
%8 = icmp eq i32 %0, -1
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @mk_file_persistent(i8* %6)
br label %11
11: ; preds = %9, %7
ret i32 0
}
void iommu_domain_free(struct iommu_domain *domain) {}


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

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

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

LLVM IR (-O2):
%struct.iommu_domain = type opaque
define void @iommu_domain_free(%struct.iommu_domain* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void x5(void) { printf(" x5"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c" x5\00"
define void @x5() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main() {
  f();
  f();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @f()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
ret i32 0
}
/* Variables and functions */
int FibonacciAsm(int);
int /*<<< orphan*/ abort();
int main(int argc, char *argv[]) {
  int x;
  x = FibonacciAsm(12);
  if (x != 144)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xc,%edi
call   1040 <FibonacciAsm@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x90,-0x14(%rbp)
je     1157 <main+0x37>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
call   1040 <FibonacciAsm@plt>
cmp    $0x90,%eax
jne    1136 <main+0x16>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @FibonacciAsm(i32 12)
%4 = icmp eq i32 %3, 144
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int nsvg__isnum(char c) { return strchr("0123456789+-.eE", c) != 0; }


x86 assembly (clang, -O0):
<nsvg__isnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsvg__isnum>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"0123456789+-.eE\00"
define i32 @nsvg__isnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @strchr(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [16 x i8] c"0123456789+-.eE\00"
define i32 @nsvg__isnum(i8 signext %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int min_element(int *array, int array_size) {}


x86 assembly (clang, -O0):
<min_element>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @min_element(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @min_element(i32* nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
char *malloc(int);
int strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *clone_str(const char *s) {
  int size = strlen(s) + 1;
  char *dest = malloc(size);
  strncpy(dest, s, size);
  return dest;
}


x86 assembly (clang, -O0):
<clone_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clone_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @clone_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = load i32, i32* %3
%13 = call i32 @strncpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @clone_str(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hi() { printf("Hi\n"); }


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"Hi\00"
define void @hi() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
int multiplication(int x, int y) { return x * y; }


x86 assembly (clang, -O0):
<multiplication>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplication>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @multiplication(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @multiplication(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
long __pathconf_common(int);
long pathconf(const char *path, int name) { return __pathconf_common(name); }


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

x86 assembly (clang, -O2):
<pathconf>:
mov    %esi,%edi
jmp    1030 <__pathconf_common@plt>

LLVM IR (-O0):
define i64 @pathconf(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 = call i64 @__pathconf_common(i32 %5)
ret i64 %6
}

LLVM IR (-O2):
define i64 @pathconf(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i64 @__pathconf_common(i32 %1)
ret i64 %3
}
/* Variables and functions */
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int getpid() { return syscall(0, 0, 0); }


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

x86 assembly (clang, -O2):
<getpid>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @getpid() {
%1 = call i32 @syscall(i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpid() {
%1 = tail call i32 @syscall(i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int STDERR_FILENO;
int STDIN_FILENO;
int STDOUT_FILENO;
int sys_isatty(int fd) {
  if (fd == STDOUT_FILENO || fd == STDERR_FILENO || fd == STDIN_FILENO) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sys_isatty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2edf(%rip),%rcx
cmp    (%rcx),%eax
je     113d <sys_isatty+0x3d>
mov    -0x8(%rbp),%eax
mov    0x2eb5(%rip),%rcx
cmp    (%rcx),%eax
je     113d <sys_isatty+0x3d>
mov    -0x8(%rbp),%eax
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%eax
jne    1149 <sys_isatty+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <sys_isatty+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_isatty>:
mov    0x2ee9(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2ec5(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2eaf(%rip),%rax
cmp    %edi,(%rax)
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
@STDIN_FILENO = global i32 0
define i32 @sys_isatty(i32 %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @STDERR_FILENO
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @STDIN_FILENO
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int listen(int, int /*<<< orphan*/);
int ipc_listen(int fd) { return listen(fd, 0); }


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

x86 assembly (clang, -O2):
<ipc_listen>:
xor    %esi,%esi
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @ipc_listen(i32 %0) {
%2 = tail call i32 @listen(i32 %0, i32 0)
ret i32 %2
}
int foo(int x) {
  int y = ((1UL << 12) / (6 * 64) * 64 * 8 > 1024 * 1024
               ? 1024 * 1024
               : (1UL << 12) / (6 * 64) * 64 * 8) /
          (8 * sizeof(unsigned long int));
  if (5 > 7 ? 1 + sizeof(char) : 5 << 2) {
    x++;
  } else {
    x--;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x50,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int builtin_failure(int line, int argc, char **argv, time_t stoptime) {
  return 0;
}


x86 assembly (clang, -O0):
<builtin_failure>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @builtin_failure(i32 %0, i32 %1, i8** nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nocall(char *);
void extendblock(void) { nocall("extendblock"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"extendblock\00"
define void @extendblock() {
%1 = tail call i32 @nocall(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void CompilerReadFence() { __asm__ volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @CompilerReadFence() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
int odsnan_(double *din1, double *din2) {
  int ret_val;
  ret_val = *din1 != *din2;
  return ret_val;
}


x86 assembly (clang, -O0):
<odsnan_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odsnan_>:
movsd  (%rsi),%xmm0
cmpneqsd (%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @odsnan_(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = fcmp une double %7, %9
%11 = zext i1 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @odsnan_(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp une double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ GLdouble;

/* Variables and functions */
void matrixZero(GLdouble *matrix, int areaSize) {
  int i;
  for (i = 0; i < areaSize; i++)
    matrix[i] = 0;
}


x86 assembly (clang, -O0):
<matrixZero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <matrixZero+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <matrixZero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrixZero>:
test   %esi,%esi
jle    1126 <matrixZero+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @matrixZero(i64* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i64* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
void jakobiarra(int dim, double *x, double *jx) {}


x86 assembly (clang, -O0):
<jakobiarra>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @jakobiarra(i32 %0, double* nocapture %1, double* nocapture %2) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
scalar_t__ lseek(int, size_t, int /*<<< orphan*/);
uint8_t bool_seek(int fd, size_t n) { return lseek(fd, n, SEEK_CUR) >= 0; }


x86 assembly (clang, -O0):
<bool_seek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bool_seek>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define i32 @bool_seek(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 = load i32, i32* @SEEK_CUR
%8 = call i64 @lseek(i32 %5, i64 %6, i32 %7)
%9 = icmp sge i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @bool_seek(i32 %0, i64 %1) {
%3 = load i32, i32* @SEEK_CUR
%4 = tail call i64 @lseek(i32 %0, i64 %1, i32 %3)
%5 = lshr i64 %4, 63
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
DIR *__opendirat(int dfd, const char *name) {
  __set_errno(ENOSYS);
  return NULL;
}


x86 assembly (clang, -O0):
<__opendirat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__opendirat>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32* @__opendirat(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define noalias i32* @__opendirat(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ tio_display_string(char *, int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void tio_write(char *s) { tio_display_string(s, strlen(s), 1, 0); }


x86 assembly (clang, -O0):
<tio_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1040 <tio_display_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tio_write>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1040 <tio_display_string@plt>

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

LLVM IR (-O2):
define void @tio_write(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @tio_display_string(i8* %0, i32 %2, i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
int /*<<< orphan*/ util_remove_trailing_chars(char *, char);
char *set_value(char **s, const char *v) {
  free(*s);
  *s = strdup(v);
  util_remove_trailing_chars(*s, '/');
  return *s;
}


x86 assembly (clang, -O0):
<set_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1040 <util_remove_trailing_chars@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_value>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1050 <strdup@plt>
mov    %rax,(%rbx)
mov    %rax,%rdi
mov    $0x2f,%esi
call   1040 <util_remove_trailing_chars@plt>
mov    (%rbx),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @set_value(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** %5
%7 = call i32 @free(i8* %6)
%8 = load i8*, i8** %4
%9 = call i8* @strdup(i8* %8)
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = call i32 @util_remove_trailing_chars(i8* %12, i8 signext 47)
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @set_value(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @free(i8* %3)
%5 = tail call i8* @strdup(i8* %1)
store i8* %5, i8** %0
%6 = tail call i32 @util_remove_trailing_chars(i8* %5, i8 signext 47)
%7 = load i8*, i8** %0
ret i8* %7
}
void TOSH_sleep() {}


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

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

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

LLVM IR (-O2):
define void @TOSH_sleep() {
ret void
}
/* Variables and functions */
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *C_mkEmptyComments() {
  size_t length = strlen("    ") + 10;
  char *text = UTIL_mallocStr(length);
  strcpy(text, "    ");
  strcat(text, "// empty\n");
  return text;
}


x86 assembly (clang, -O0):
<C_mkEmptyComments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <strlen@plt>
add    $0xa,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_mkEmptyComments>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
add    $0xa,%eax
movslq %eax,%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c" \00"
@.str.1 = [10 x i8] c"// empty\0A\00"
define i8* @C_mkEmptyComments() {
%1 = alloca i64
%2 = alloca i8*
%3 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %3, 10
%5 = sext i32 %4 to i64
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = call i8* @UTIL_mallocStr(i64 %6)
store i8* %7, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %2
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [5 x i8] c" \00"
@.str.1 = [10 x i8] c"// empty\0A\00"
define i8* @C_mkEmptyComments() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = add nsw i32 %1, 10
%3 = sext i32 %2 to i64
%4 = tail call i8* @UTIL_mallocStr(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal8array_(void *x, unsigned int *n) {
  popNarray((char *)x, (*n * 8));
}


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

x86 assembly (clang, -O2):
<popreal8array_>:
mov    (%rsi),%esi
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popreal8array_(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 = load i32, i32* %6
%8 = mul i32 %7, 8
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popreal8array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 3
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int usage() {
  printf("Usage:\n"
         "yaw [filename | flag]\n\n"
         "Flags:\n"
         "-a    --about     Display the about dialog\n"
         "-v    --version   Display version information\n"
         "-h    --help      Display this help dialog\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [170 x i8] c"Usage:\0Ayaw [filename | flag]\0A\0AFlags:\0A-a --about Display the about dialog\0A-v --version Display version information\0A-h --help Display this help dialog\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [169 x i8] c"Usage:\0Ayaw [filename | flag]\0A\0AFlags:\0A-a --about Display the about dialog\0A-v --version Display version information\0A-h --help Display this help dialog\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([169 x i8], [169 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int r1(int i) { return (2 - i) * (1 + (3 * i)) / 2; }


x86 assembly (clang, -O0):
<r1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x2,%eax
sub    -0x4(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<r1>:
mov    $0x2,%eax
sub    %edi,%eax
lea    (%rdi,%rdi,2),%ecx
add    $0x1,%ecx
imul   %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @r1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 2, %3
%5 = load i32, i32* %2
%6 = mul nsw i32 3, %5
%7 = add nsw i32 1, %6
%8 = mul nsw i32 %4, %7
%9 = sdiv i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @r1(i32 %0) {
%2 = sub nsw i32 2, %0
%3 = mul nsw i32 %0, 3
%4 = add nsw i32 %3, 1
%5 = mul nsw i32 %4, %2
%6 = sdiv i32 %5, 2
ret i32 %6
}
void test_32_1(short *mem) { __atomic_fetch_or(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_32_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
or     %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test_32_1+0x5d>
jmp    1125 <test_32_1+0x25>
mov    -0x1a(%rbp),%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_32_1>:
lock orw $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_32_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw or i16* %5, i16 %6 acq_rel
store i16 %7, i16* %4
%8 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test_32_1(i16* nocapture %0) {
%2 = atomicrmw or i16* %0, i16 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NedAccelHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void NedAccelLogging() { UAVObjLogging(NedAccelHandle()); }


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

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

LLVM IR (-O0):
define void @NedAccelLogging() {
%1 = call i32 (...) @NedAccelHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @NedAccelLogging() {
%1 = tail call i32 (...) @NedAccelHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *runner3(void *args) {
  int *a = (int *)args;
  int i, sum = 0;
  for (i = 0; i < *a; i++) {
    sum += i;
  }
  printf("Total Sum: %d\n", sum);
}


x86 assembly (clang, -O0):
<runner3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1158 <runner3+0x48>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1132 <runner3+0x22>
mov    -0x20(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runner3>:
mov    (%rdi),%eax
test   %eax,%eax
jle    1135 <runner3+0x25>
lea    -0x1(%rax),%ecx
lea    -0x2(%rax),%edx
imul   %rcx,%rdx
shr    %rdx
lea    (%rax,%rdx,1),%esi
add    $0xffffffff,%esi
lea    0xed0(%rip),%rdi
jmp    1030 <printf@plt>
xor    %esi,%esi
lea    0xec2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Total Sum: %d\0A\00"
define i8* @runner3(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %4
store i32 0, i32* %6
store i32 0, i32* %5
br label %9
9: ; preds = %18, %1
%10 = load i32, i32* %5
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = icmp slt i32 %10, %12
br i1 %13, label %14, label %21
14: ; preds = %9
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = add nsw i32 %16, %15
store i32 %17, i32* %6
br label %18
18: ; preds = %14
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %9
21: ; preds = %9
%22 = load i32, i32* %6
%23 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
@.str = [15 x i8] c"Total Sum: %d\0A\00"
define noalias i8* @runner3(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = add nsw i32 %3, -1
%7 = zext i32 %6 to i33
%8 = add nsw i32 %3, -2
%9 = zext i32 %8 to i33
%10 = mul i33 %7, %9
%11 = lshr i33 %10, 1
%12 = trunc i33 %11 to i32
%13 = add i32 %3, %12
%14 = add i32 %13, -1
br label %15
15: ; preds = %5, %1
%16 = phi i32 [ 0, %1 ], [ %14, %5 ]
%17 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i8* undef
}
/* Type definitions */
struct evbuffer {
  int dummy;
};

/* Variables and functions */
size_t evbuffer_get_length(const struct evbuffer *buf) {
  (void)buf;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.evbuffer = type { i32 }
define i64 @evbuffer_get_length(%struct.evbuffer* %0) {
%2 = alloca %struct.evbuffer*
store %struct.evbuffer* %0, %struct.evbuffer** %2
%3 = load %struct.evbuffer*, %struct.evbuffer** %2
ret i64 0
}

LLVM IR (-O2):
%struct.evbuffer = type { i32 }
define i64 @evbuffer_get_length(%struct.evbuffer* nocapture readnone %0) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtepi32_ps(int /*<<< orphan*/);
__m128 test_mm_cvtepi32_ps(__m128i A) { return _mm_cvtepi32_ps(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtepi32_ps>:
jmp    1030 <_mm_cvtepi32_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtepi32_ps(i32 %0) {
%2 = tail call i32 @_mm_cvtepi32_ps(i32 %0)
ret i32 %2
}
/* Variables and functions */
double funcAngCor_alpha0_2plus_0plus_15097_L2(double *, double *);
double sin(double);
double fitAngDist_alpha0_2plus_0plus_15097_L2(double *x, double *par) {
  double result;
  result = funcAngCor_alpha0_2plus_0plus_15097_L2(x, &par[0]) *
           sin(x[0] * 0.0174533);
  return result;
}


x86 assembly (clang, -O0):
<fitAngDist_alpha0_2plus_0plus_15097_L2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <funcAngCor_alpha0_2plus_0plus_15097_L2@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeb2(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitAngDist_alpha0_2plus_0plus_15097_L2>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <funcAngCor_alpha0_2plus_0plus_15097_L2@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xec1(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fitAngDist_alpha0_2plus_0plus_15097_L2(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = call double @funcAngCor_alpha0_2plus_0plus_15097_L2(double* %6, double* %8)
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fmul double %12, 1.745330e-02
%14 = call double @sin(double %13)
%15 = fmul double %9, %14
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @fitAngDist_alpha0_2plus_0plus_15097_L2(double* %0, double* %1) {
%3 = tail call double @funcAngCor_alpha0_2plus_0plus_15097_L2(double* %0, double* %1)
%4 = load double, double* %0
%5 = fmul double %4, 1.745330e-02
%6 = tail call double @sin(double %5)
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
char read_serial();
char *read_all_serial(void) {
  char *buffer;
  int buffer_count = 0;
  buffer[buffer_count++] = read_serial();
  buffer[buffer_count] = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<read_all_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <read_serial@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_all_serial>:
push   %rax
xor    %eax,%eax
call   1030 <read_serial@plt>

LLVM IR (-O0):
define i8* @read_all_serial() {
%1 = alloca i8*
%2 = alloca i32
store i32 0, i32* %2
%3 = call signext i8 (...) @read_serial()
%4 = load i8*, i8** %1
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 %3, i8* %8
%9 = load i8*, i8** %1
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @read_all_serial() {
%1 = tail call signext i8 (...) @read_serial()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int main() {
  int i = 10;
  int i2 = 11;
  const int *p = &i;
  printf("%d\n", *p);
  i = 9;
  p = &i2;
  printf("%d\n", *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
movl   $0x9,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}
void foo373() {}


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

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

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

LLVM IR (-O2):
define void @foo373() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clrscr() { system("clear"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clrscr() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_uint16_t(uint16_t const k1, uint16_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_uint16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_uint16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint16_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("usage: tdump <statefile>\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 = [26 x i8] c"usage: tdump <statefile>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"usage: tdump <statefile>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}