xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int inbyte(void) {
  char ch = 0;
  read(0, &ch, 1);
  return ch;
}


x86 assembly (clang, -O0):
<inbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inbyte>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @inbyte() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int rand();
int main(int argc, char **argv) {
  int x;
  int r = rand();
  if (!(r <= 0)) {
    x = 42;
  } else {
    x = 7;
  }
  return x;
}


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    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    1146 <main+0x36>
movl   $0x2a,-0x14(%rbp)
jmp    114d <main+0x3d>
movl   $0x7,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
test   %eax,%eax
mov    $0x7,%ecx
mov    $0x2a,%eax
cmovle %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @rand()
%4 = icmp slt i32 %3, 1
%5 = select i1 %4, i32 7, i32 42
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) { printf("kill [-s SIGNUM] pid\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"kill [-s SIGNUM] pid\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
int fz_absi(int i) { return (i < 0 ? -i : i); }


x86 assembly (clang, -O0):
<fz_absi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <fz_absi+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <fz_absi+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_absi>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fz_absi(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void smClearCallRecords() {}


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

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

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

LLVM IR (-O2):
define void @smClearCallRecords() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_data(int);
int /*<<< orphan*/ init_data(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sort(int);
int main(void) {
  init_data(550);
  printf("\nUnsorted:\n");
  display_data(550);
  printf("\nSorting:\n");
  sort(550);
  printf("\nSorted:\n");
  display_data(550);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x226,%edi
call   1030 <init_data@plt>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x226,%edi
call   1050 <display_data@plt>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    $0x226,%edi
call   1060 <sort@plt>
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x226,%edi
call   1050 <display_data@plt>
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x226,%edi
call   1050 <init_data@plt>
lea    0xe9e(%rip),%rdi
call   1040 <puts@plt>
mov    $0x226,%edi
call   1060 <display_data@plt>
lea    0xe93(%rip),%rdi
call   1040 <puts@plt>
mov    $0x226,%edi
call   1070 <sort@plt>
lea    0xe87(%rip),%rdi
call   1040 <puts@plt>
mov    $0x226,%edi
call   1060 <display_data@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [11 x i8] c"\0AUnsorted:\00"
@str.4 = [10 x i8] c"\0ASorting:\00"
@str.5 = [9 x i8] c"\0ASorted:\00"
define i32 @main() {
%1 = tail call i32 @init_data(i32 550)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @display_data(i32 550)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @sort(i32 550)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
%7 = tail call i32 @display_data(i32 550)
%8 = tail call i32 @putchar(i32 10)
ret i32 0
}
int __attribute__((format(printf, 1, 2)))
__idebugprintf(const char *format, ...) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @__idebugprintf(i8* nocapture readnone %0, ...) {
ret i32 0
}
void f28(void) {
a:
  ({
    ({
      goto a;
      0;
    });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f28>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <f28+0x4>

x86 assembly (clang, -O2):
<f28>:
jmp    1100 <f28>

LLVM IR (-O0):
define void @f28() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %3, %0
br label %3
}

LLVM IR (-O2):
define void @f28() {
br label %1
1: ; preds = %1, %0
br label %1
}
int topie(int m) {
  int pie;
  pie = m / 12;
  return pie;
}


x86 assembly (clang, -O0):
<topie>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<topie>:
movslq %edi,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @topie(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 12
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @topie(i32 %0) {
%2 = sdiv i32 %0, 12
ret i32 %2
}
/* Type definitions */
struct timespec {
  float tv_sec;
  float tv_nsec;
};

/* Variables and functions */
float usTime(struct timespec start, struct timespec end) {
  return (end.tv_sec - start.tv_sec) * 1000000.0f +
         (end.tv_nsec - start.tv_nsec) / 1000.0f;
}


x86 assembly (clang, -O0):
<usTime>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
movlpd %xmm1,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
movss  0xeda(%rip),%xmm2
divss  %xmm2,%xmm1
movss  0xeca(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<usTime>:
subps  %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
divss  0xeee(%rip),%xmm0
mulss  0xeea(%rip),%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { float, float }
define float @usTime(<2 x float> %0, <2 x float> %1) {
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
%5 = bitcast %struct.timespec* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %5
%6 = bitcast %struct.timespec* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%13 = load float, float* %12
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%15 = load float, float* %14
%16 = fsub float %13, %15
%17 = fdiv float %16, 1.000000e+03
%18 = call float @llvm.fmuladd.f32(float %11, float 1.000000e+06, float %17)
ret float %18
}

LLVM IR (-O2):
define float @usTime(<2 x float> %0, <2 x float> %1) {
%3 = fsub <2 x float> %1, %0
%4 = extractelement <2 x float> %3, i64 0
%5 = fsub <2 x float> %1, %0
%6 = extractelement <2 x float> %5, i64 1
%7 = fdiv float %6, 1.000000e+03
%8 = tail call float @llvm.fmuladd.f32(float %4, float 1.000000e+06, float %7)
ret float %8
}
/* Variables and functions */
int dup2(int, int);
int errno;
int __sulong_posix_dup2(int oldfd, int newfd) {
  {
    int native_errno = errno;
    int result = dup2(oldfd, newfd);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  }
}


x86 assembly (clang, -O0):
<__sulong_posix_dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1152 <__sulong_posix_dup2+0x42>
xor    %eax,%eax
mov    0x2e95(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    0x2e84(%rip),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_dup2>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <dup2@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__sulong_posix_dup2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* @errno
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @dup2(i32 %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = sub nsw i32 0, %14
%16 = sext i32 %15 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %13, %2
%19 = load i32, i32* %5
store i32 %19, i32* @errno
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__sulong_posix_dup2(i32 %0, i32 %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @dup2(i32 %0, i32 %1)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 %4
store i32 %3, i32* @errno
ret i32 %8
}
void print_internal_debug_message(fmt, a1, a2, a3, a4, a5) char *fmt, *a1, *a2,
    *a3, *a4, *a5;
{
  ldisplay("DEBUG: INTERNAL: ");
  ldisplay(fmt, a1, a2, a3, a4, a5);
  ldisplay("\n");
}


x86 assembly (clang, -O0):
<print_internal_debug_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    $0x0,%al
call   1030 <ldisplay@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_internal_debug_message>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <ldisplay@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
xor    %eax,%eax
call   1030 <ldisplay@plt>
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ldisplay@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"DEBUG: INTERNAL: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_internal_debug_message(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i8*, i8** %12
%20 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %14, i8* %15, i8* %16, i8* %17, i8* %18, i8* %19)
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"DEBUG: INTERNAL: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_internal_debug_message(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
main() {
  int x, y;
  x = 0;
  y = 1;
  if (x == 1)
    printf(y);
  else
    printf(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1147 <main+0x37>
movslq -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1152 <main+0x42>
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err(char *msg) {
  fprintf(stderr, "Error: %s.\n", msg);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s.\0A\00"
define void @err(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 ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

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


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

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

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

LLVM IR (-O2):
define i32 @pthread_cond_timedwait() {
ret i32 0
}
int foo(int i) {
  volatile int v[4];
  int *p;
  v[i] = 6;
  p = (int *)&v[i];
  return *p;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movl   $0x6,-0x20(%rbp,%rax,4)
movslq -0x4(%rbp),%rcx
lea    -0x20(%rbp),%rax
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movslq %edi,%rax
movl   $0x6,-0x18(%rsp,%rax,4)
mov    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i32]
%4 = alloca i32*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %6
store volatile i32 6, i32* %7
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %9
store i32* %10, i32** %4
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = alloca [4 x i32]
%3 = bitcast [4 x i32]* %2 to i8*
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %4
store volatile i32 6, i32* %5
ret i32 6
}
_cleanup() {}


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

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

LLVM IR (-O0):
define i32 @_cleanup() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @_cleanup() {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t uint40_decode(const uint8_t *p_encoded_data) {
  return ((((uint64_t)((uint8_t *)p_encoded_data)[0]) << 0) |
          (((uint64_t)((uint8_t *)p_encoded_data)[1]) << 8) |
          (((uint64_t)((uint8_t *)p_encoded_data)[2]) << 16) |
          (((uint64_t)((uint8_t *)p_encoded_data)[3]) << 24) |
          (((uint64_t)((uint8_t *)p_encoded_data)[4]) << 32));
}


x86 assembly (clang, -O0):
<uint40_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @uint40_decode(i64* nocapture readnone %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_length(int int_array[]) {
  int length = sizeof int_array / sizeof int_array[0];
  printf("Length of array = %d\n", length);
}


x86 assembly (clang, -O0):
<print_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_length>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Length of array = %d\0A\00"
define void @print_length(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Length of array = %d\0A\00"
define void @print_length(i32* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
float soft_cap(float a, float b) { return ((a * b) / (a + b)); }


x86 assembly (clang, -O0):
<soft_cap>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<soft_cap>:
movaps %xmm0,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm1,%xmm0
divss  %xmm0,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @soft_cap(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fadd float %8, %9
%11 = fdiv float %7, %10
ret float %11
}

LLVM IR (-O2):
define float @soft_cap(float %0, float %1) {
%3 = fmul float %0, %1
%4 = fadd float %0, %1
%5 = fdiv float %3, %4
ret float %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void EPIFIFOConfig(uint32_t ui32Base, uint32_t ui32Config) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000200))) = ui32Config;
}


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

x86 assembly (clang, -O2):
<EPIFIFOConfig>:
mov    %rsi,0x200(%rdi)
ret

LLVM IR (-O0):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 512
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 512
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
long jDivRound(long a, long b) { return (a + b - 1L) / b; }


x86 assembly (clang, -O0):
<jDivRound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jDivRound>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111a <jDivRound+0x1a>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @jDivRound(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 = add nsw i64 %5, %6
%8 = sub nsw i64 %7, 1
%9 = load i64, i64* %4
%10 = sdiv i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @jDivRound(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sdiv i64 %4, %1
ret i64 %5
}
/* Variables and functions */
long GetMousePosY291();
long getmouseposy() { return GetMousePosY291(); }


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

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

LLVM IR (-O0):
define i64 @getmouseposy() {
%1 = call i64 (...) @GetMousePosY291()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getmouseposy() {
%1 = tail call i64 (...) @GetMousePosY291()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void uiByeBye() { printf("\n\n\n"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\0A\0A\0A\00"
define void @uiByeBye() {
%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"\0A\0A\00"
define void @uiByeBye() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double ft_invsqrt(double);
double ft_sqrt(double x) { return (1.0 / ft_invsqrt(x)); }


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ft_invsqrt@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
push   %rax
call   1030 <ft_invsqrt@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @ft_sqrt(double %0) {
%2 = tail call double @ft_invsqrt(double %0)
%3 = fdiv double 1.000000e+00, %2
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ XID;
typedef int /*<<< orphan*/ Status;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
Status XScreenSaverGetRegistered(Display *dpy, int screen, XID *xid,
                                 Atom *type) {}


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

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

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

LLVM IR (-O2):
define i32 @XScreenSaverGetRegistered(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
void cx_LongLongInt_print(long long int *const value) {
  printf("%lldLL", *value);
}


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

x86 assembly (clang, -O2):
<cx_LongLongInt_print>:
mov    (%rdi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%lldLL\00"
define void @cx_LongLongInt_print(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lldLL\00"
define void @cx_LongLongInt_print(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
char *stack_check(char str[]) { return str; }


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

x86 assembly (clang, -O2):
<stack_check>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @stack_check(i8* readnone returned %0) {
ret i8* %0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XDR;
struct TYPE_3__ {
  scalar_t__ xp_p2;
};
typedef TYPE_1__ SVCXPRT;

/* Variables and functions */
int xdr_getpos(int /*<<< orphan*/ *);
int svcbyz_reply_bytes(SVCXPRT *xpt) {
  return xdr_getpos(((XDR *)((xpt)->xp_p2)));
}


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

x86 assembly (clang, -O2):
<svcbyz_reply_bytes>:
mov    (%rdi),%rdi
jmp    1030 <xdr_getpos@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
define i32 @svcbyz_reply_bytes(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to i32*
%7 = call i32 @xdr_getpos(i32* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
define i32 @svcbyz_reply_bytes(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @xdr_getpos(i32* %4)
ret i32 %5
}
/* Type definitions */
struct XStatusOptions {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ next_option(int, char **);
int /*<<< orphan*/ parse_command_line_r(int, char **, struct XStatusOptions *,
                                        int /*<<< orphan*/);
void parse_command_line(int argc, char **argv,
                        struct XStatusOptions *restrict o) {
  parse_command_line_r(argc, argv, o, next_option(argc, argv));
}


x86 assembly (clang, -O0):
<parse_command_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <next_option@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <parse_command_line_r@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_command_line>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <next_option@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <parse_command_line_r@plt>

LLVM IR (-O0):
%struct.XStatusOptions = type { i32 }
define void @parse_command_line(i32 %0, i8** %1, %struct.XStatusOptions* noalias %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.XStatusOptions*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.XStatusOptions* %2, %struct.XStatusOptions** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.XStatusOptions*, %struct.XStatusOptions** %6
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @next_option(i32 %10, i8** %11)
%13 = call i32 @parse_command_line_r(i32 %7, i8** %8, %struct.XStatusOptions* %9, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.XStatusOptions = type { i32 }
define void @parse_command_line(i32 %0, i8** %1, %struct.XStatusOptions* noalias %2) {
%4 = tail call i32 @next_option(i32 %0, i8** %1)
%5 = tail call i32 @parse_command_line_r(i32 %0, i8** %1, %struct.XStatusOptions* %2, i32 %4)
ret void
}
int f3(void) {
  static int x = 0;
  x = !x;
  return x;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,0x2f09(%rip)
mov    0x2f03(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
xor    %eax,%eax
cmpl   $0x0,0x2f1b(%rip)
sete   %al
mov    %eax,0x2f12(%rip)
ret

LLVM IR (-O0):
@f3.x = internal global i32 0
define i32 @f3() {
%1 = load i32, i32* @f3.x
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
store i32 %4, i32* @f3.x
%5 = load i32, i32* @f3.x
ret i32 %5
}

LLVM IR (-O2):
@f3.x = internal unnamed_addr global i32 0
define i32 @f3() {
%1 = load i32, i32* @f3.x
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
store i32 %3, i32* @f3.x
ret i32 %3
}
void check_password_char(int i, int *c) {
  const int lookup[15] = {4846, 4832, 4796, 4849, 4846, 4843, 4850, 4824,
                          4852, 4847, 4818, 4852, 4844, 4822, 4794};
  *c = (lookup[i] + *c) % 0x1337;
}


x86 assembly (clang, -O0):
<check_password_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xed6(%rip),%rsi
mov    $0x3c,%edx
call   1030 <memcpy@plt>
movslq -0x4(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
mov    $0x1337,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_password_char>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mov    (%rsi),%edx
add    (%rcx,%rax,4),%edx
movslq %edx,%rax
imul   $0x354ac933,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2a,%rcx
add    %edx,%ecx
imul   $0x1337,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
@__const.check_password_char.lookup = [15 x i32] [i32 4846, i32 4832, i32 4796, i32 4849, i32 4846, i32 4843, i32 4850, i32 4824, i32 4852, i32 4847, i32 4818, i32 4852, i32 4844, i32 4822, i32 4794]
define void @check_password_char(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [15 x i32]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = bitcast [15 x i32]* %5 to i8*
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [15 x i32], [15 x i32]* %5, i64 0, i64 %8
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = add nsw i32 %10, %12
%14 = srem i32 %13, 4919
%15 = load i32*, i32** %4
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
@__const.check_password_char.lookup = [15 x i32] [i32 4846, i32 4832, i32 4796, i32 4849, i32 4846, i32 4843, i32 4850, i32 4824, i32 4852, i32 4847, i32 4818, i32 4852, i32 4844, i32 4822, i32 4794]
define void @check_password_char(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds [15 x i32], [15 x i32]* @__const.check_password_char.lookup, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = load i32, i32* %1
%7 = add nsw i32 %6, %5
%8 = srem i32 %7, 4919
store i32 %8, i32* %1
ret void
}
unsigned long osd_rgba(unsigned char r, unsigned char g, unsigned char b,
                       unsigned char a) {
  return (a << 24) | (r << 16) | (g << 8) | b;
}


x86 assembly (clang, -O0):
<osd_rgba>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movzbl -0x4(%rbp),%eax
shl    $0x18,%eax
movzbl -0x1(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x3(%rbp),%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<osd_rgba>:
shl    $0x18,%ecx
shl    $0x10,%edi
or     %ecx,%edi
shl    $0x8,%esi
or     %edi,%esi
or     %edx,%esi
movslq %esi,%rax
ret

LLVM IR (-O0):
define i64 @osd_rgba(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 24
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = or i32 %11, %14
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %15, %18
%20 = load i8, i8* %7
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
%23 = sext i32 %22 to i64
ret i64 %23
}

LLVM IR (-O2):
define i64 @osd_rgba(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %3 to i32
%6 = shl nuw i32 %5, 24
%7 = zext i8 %0 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %6, %8
%10 = zext i8 %1 to i32
%11 = shl nuw nsw i32 %10, 8
%12 = or i32 %9, %11
%13 = zext i8 %2 to i32
%14 = or i32 %12, %13
%15 = sext i32 %14 to i64
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *getenv(char *);
void defaultAbort() {
  if ((getenv("ERRASSERT") != NULL) || (getenv("ERRABORT") != NULL))
    abort();
  else
    exit(-1);
}


x86 assembly (clang, -O0):
<defaultAbort>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
jne    1160 <defaultAbort+0x30>
lea    0xeb9(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
je     1167 <defaultAbort+0x37>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<defaultAbort>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    115d <defaultAbort+0x2d>
lea    0xec1(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
jne    115d <defaultAbort+0x2d>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ERRASSERT\00"
@.str.1 = [9 x i8] c"ERRABORT\00"
define void @defaultAbort() {
%1 = call i32* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32* @getenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3, %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %3
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"ERRASSERT\00"
@.str.1 = [9 x i8] c"ERRABORT\00"
define void @defaultAbort() {
%1 = tail call i32* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32* @getenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
%9 = tail call i32 @exit(i32 -1)
unreachable
}
void gk20a_sync_timeline_destroy(struct sync_timeline *obj) {}


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

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

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

LLVM IR (-O2):
%struct.sync_timeline = type opaque
define void @gk20a_sync_timeline_destroy(%struct.sync_timeline* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
void set_XKeyPressedEvent_window(void *_p, unsigned long _v) {
  ((XKeyPressedEvent *)_p)->window = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyPressedEvent_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XKeyPressedEvent_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyPressedEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void l4x_virtual_mem_register(unsigned long address, unsigned long page) {}


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

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

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

LLVM IR (-O2):
define void @l4x_virtual_mem_register(i64 %0, i64 %1) {
ret void
}
QM_ISR_DECLARE(dummy_isr) {}


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

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

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

LLVM IR (-O2):
define i32 @QM_ISR_DECLARE(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ GPIOPinTypeGPIOOutput(int, int);
int /*<<< orphan*/ GPIOPinWrite(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ SysCtlPeripheralEnable(int);
void LedInit(void) {
  SysCtlPeripheralEnable(0x20000040);
  GPIOPinTypeGPIOOutput(0x40026000, 0x00000004);
  GPIOPinWrite(0x40026000, 0x00000004, 0);
}


x86 assembly (clang, -O0):
<LedInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20000040,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40026000,%edi
mov    $0x4,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40026000,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1050 <GPIOPinWrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedInit>:
push   %rax
mov    $0x20000040,%edi
call   1030 <SysCtlPeripheralEnable@plt>
mov    $0x40026000,%edi
mov    $0x4,%esi
call   1040 <GPIOPinTypeGPIOOutput@plt>
mov    $0x40026000,%edi
mov    $0x4,%esi
xor    %edx,%edx
pop    %rax
jmp    1050 <GPIOPinWrite@plt>

LLVM IR (-O0):
define void @LedInit() {
%1 = call i32 @SysCtlPeripheralEnable(i32 536870976)
%2 = call i32 @GPIOPinTypeGPIOOutput(i32 1073897472, i32 4)
%3 = call i32 @GPIOPinWrite(i32 1073897472, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
define void @LedInit() {
%1 = tail call i32 @SysCtlPeripheralEnable(i32 536870976)
%2 = tail call i32 @GPIOPinTypeGPIOOutput(i32 1073897472, i32 4)
%3 = tail call i32 @GPIOPinWrite(i32 1073897472, i32 4, i32 0)
ret void
}
/* Variables and functions */
int anetSetTcpNoDelay(char *, int, int /*<<< orphan*/);
int catAnetDisableTcpNoDelay(char *err, int fd) {
  return anetSetTcpNoDelay(err, fd, 0);
}


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

x86 assembly (clang, -O2):
<catAnetDisableTcpNoDelay>:
xor    %edx,%edx
jmp    1030 <anetSetTcpNoDelay@plt>

LLVM IR (-O0):
define i32 @catAnetDisableTcpNoDelay(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 i32 @anetSetTcpNoDelay(i8* %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @catAnetDisableTcpNoDelay(i8* %0, i32 %1) {
%3 = tail call i32 @anetSetTcpNoDelay(i8* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert(0xdEadBeEF == 3735928559);
  assert(072616 == 30094);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}