xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpgt_ss(__m128 __a, __m128 __b) {
  return _mm_cmpgt_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpgt_ss>:
jmp    1030 <_mm_cmpgt_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpgt_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_ss(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ findDupList(int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  int arr[] = {1, 2, 4, 5, 3, 9, 8, 3, 5, 6, 2};
  findDupList(NULL, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x2c,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <findDupList@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 1, i32 2, i32 4, i32 5, i32 3, i32 9, i32 8, i32 3, i32 5, i32 6, i32 2]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [11 x i32]* %6 to i8*
%8 = call i32 @findDupList(i32* null, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @findDupList(i32* null, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parseMX(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    return 1;
  }
  parseMX(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1150 <main+0x40>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <parseMX@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     112a <main+0x1a>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <parseMX@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @parseMX(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int inb(unsigned long);
int /*<<< orphan*/ outb(int, unsigned long);
int i8254_status(unsigned long base_address, unsigned int regshift,
                 unsigned int counter_number) {
  outb(0xE0 | (2 << counter_number), base_address + (3 << regshift));
  return inb(base_address + (counter_number << regshift));
}


x86 assembly (clang, -O0):
<i8254_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x2,%edi
shl    %cl,%edi
or     $0xe0,%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%ecx
mov    $0x3,%eax
shl    %cl,%eax
cltq
add    %rax,%rsi
call   1030 <outb@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%eax
add    %rax,%rdi
call   1040 <inb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i8254_status>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    $0x2,%eax
mov    %ebx,%ecx
shl    %cl,%eax
mov    $0x3,%edx
mov    %r14d,%ecx
shl    %cl,%edx
mov    %rdi,%rbp
or     $0xe0,%eax
movslq %edx,%rsi
add    %rdi,%rsi
mov    %eax,%edi
call   1030 <outb@plt>
mov    %r14d,%ecx
shl    %cl,%ebx
add    %rbp,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <inb@plt>

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

LLVM IR (-O2):
define i32 @i8254_status(i64 %0, i32 %1, i32 %2) {
%4 = shl i32 2, %2
%5 = or i32 %4, 224
%6 = shl i32 3, %1
%7 = sext i32 %6 to i64
%8 = add i64 %7, %0
%9 = tail call i32 @outb(i32 %5, i64 %8)
%10 = shl i32 %2, %1
%11 = zext i32 %10 to i64
%12 = add i64 %11, %0
%13 = tail call i32 @inb(i64 %12)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *strchr(char const *, int);
char *trio_index(const char *string, int character) {
  assert(string);
  return strchr(string, character);
}


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

x86 assembly (clang, -O2):
<trio_index>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @trio_index(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 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i8* @strchr(i8* %7, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @trio_index(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %4
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ keyboard_raw();
int read(int /*<<< orphan*/, unsigned char *, int);
int /*<<< orphan*/ stdout;
int key(void) {
  struct termios ostate;
  struct termios kstate;
  int c;
  unsigned char cchar;
  fflush(stdout);
  (void)keyboard_raw();
  if (read(0, &cchar, 1) == 1)
    return (unsigned int)cchar;
  exit(0);
  return (0);
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <keyboard_raw@plt>
xor    %edi,%edi
lea    -0x15(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
jne    1180 <key+0x40>
movzbl -0x15(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<key>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <keyboard_raw@plt>
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
jne    1173 <key+0x33>
movzbl 0x7(%rsp),%eax
pop    %rcx
ret
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@stdout = global i32 0
define i32 @key() {
%1 = alloca %struct.termios
%2 = alloca %struct.termios
%3 = alloca i32
%4 = alloca i8
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = call i32 (...) @keyboard_raw()
%8 = call i32 @read(i32 0, i8* %4, i32 1)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
ret i32 %12
13: ; preds = %0
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @key() {
%1 = alloca i8
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 (...) @keyboard_raw()
%5 = call i32 @read(i32 0, i8* %1, i32 1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
ret i32 %9
10: ; preds = %0
%11 = tail call i32 @exit(i32 0)
unreachable
}
int get_elem(int *array, int i) { return array[i]; }


x86 assembly (clang, -O0):
<get_elem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_elem>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_elem(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @get_elem(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
int main() {
  int i = 5;
  asm volatile("" : "=r"(i) : "0"(i));
  f1(i);
  f2(i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <f1@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <f2@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 (i32, ...) bitcast (i32 (...)* @f2 to i32 (i32, ...)*)(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 5)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @f1 to i32 (i32, ...)*)(i32 %1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @f2 to i32 (i32, ...)*)(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ circular_buffer_test();
int /*<<< orphan*/ threaded_queue_test();
int main() {
  circular_buffer_test();
  threaded_queue_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @circular_buffer_test()
%2 = tail call i32 (...) @threaded_queue_test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf(const char *fmt, va_list args) {
  return vfprintf(stdout, fmt, args);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
void To_Fahr(float *cels_to_fahr) {
  *cels_to_fahr = (((9.0 / 5.0) * (*cels_to_fahr)) + 32.0);
}


x86 assembly (clang, -O0):
<To_Fahr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee0(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<To_Fahr>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xef0(%rip),%xmm0
addsd  0xef0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @To_Fahr(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double 1.800000e+00, double %5, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = load float*, float** %2
store float %7, float* %8
ret void
}

LLVM IR (-O2):
define void @To_Fahr(float* nocapture %0) {
%2 = load float, float* %0
%3 = fpext float %2 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 1.800000e+00, double 3.200000e+01)
%5 = fptrunc double %4 to float
store float %5, float* %0
ret void
}
int execute_tgkill() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_tgkill() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                const unsigned char *in, unsigned int inl) {
  if (in != out)
    memcpy((char *)out, (const char *)in, (size_t)inl);
  return 1;
}


x86 assembly (clang, -O0):
<null_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1147 <null_cipher+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_cipher>:
cmp    %rsi,%rdx
je     112a <null_cipher+0x1a>
push   %rax
mov    %ecx,%eax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1030 <memcpy@plt>
add    $0x8,%rsp
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @null_cipher(i32* nocapture readnone %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i8* %2, %1
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = zext i32 %3 to i64
%8 = tail call i32 @memcpy(i8* %1, i8* %2, i64 %7)
br label %9
9: ; preds = %6, %4
ret i32 1
}
long labs(long n) {
  if (n < 0) {
    n *= -1;
  }
  return n;
}


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    111c <labs+0x1c>
imul   $0xffffffffffffffff,-0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
typedef char *uint16_t;

/* Variables and functions */
uint16_t get_es(void) {
  uint16_t result;
  asm volatile("movw %%"
               "es"
               ", %0"
               : "=m"(result));
  return result;
}


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

x86 assembly (clang, -O2):
<get_es>:
mov    %es,-0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i8* @get_es() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = load i8*, i8** %1
ret i8* %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ red;
};
typedef TYPE_1__ XColor;

/* Variables and functions */
unsigned short get_XColor_red(void *_p) {
  return (unsigned short)((XColor *)_p)->red;
}


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

x86 assembly (clang, -O2):
<get_XColor_red>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @get_XColor_red(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ isBlank(char);
char *NextBlank(char *pBuffer) {
  if (!pBuffer)
    return NULL;
  while (!isBlank(*pBuffer))
    ++pBuffer;
  return pBuffer;
}


x86 assembly (clang, -O0):
<NextBlank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <NextBlank+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1173 <NextBlank+0x63>
jmp    1139 <NextBlank+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isBlank@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <NextBlank+0x4a>
jmp    116b <NextBlank+0x5b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <NextBlank+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NextBlank>:
push   %rbx
test   %rdi,%rdi
je     1133 <NextBlank+0x23>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isBlank@plt>
test   %eax,%eax
je     1120 <NextBlank+0x10>
jmp    1135 <NextBlank+0x25>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @NextBlank(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %19
7: ; preds = %1
br label %8
8: ; preds = %14, %7
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = call i32 @isBlank(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %17
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %8
17: ; preds = %8
%18 = load i8*, i8** %3
store i8* %18, i8** %2
br label %19
19: ; preds = %17, %6
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @NextBlank(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i32 @isBlank(i8 signext %5)
%7 = icmp eq i32 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %3, label %9
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
char *strdup(char const *);
int /*<<< orphan*/ sys_errmsg_die(char *);
__attribute__((unused)) char *xstrdup(const char *s) {
  char *t;
  if (s == NULL)
    return NULL;
  t = strdup(s);
  if (t == NULL)
    sys_errmsg_die("out of memory");
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1170 <xstrdup+0x50>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1168 <xstrdup+0x48>
lea    0xe9d(%rip),%rdi
call   1030 <sys_errmsg_die@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
test   %rdi,%rdi
je     113e <xstrdup+0x1e>
call   1040 <strdup@plt>
test   %rax,%rax
je     1132 <xstrdup+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <sys_errmsg_die@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @sys_errmsg_die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %15, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @sys_errmsg_die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ null, %1 ], [ null, %6 ], [ %4, %3 ]
ret i8* %9
}
void test_five(int x, int y, int z) {
#pragma omp distribute collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() { printf("char: %f\n", 3.1231233252435); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"char: %f\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 0x4008FC2814FA5D65)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"char: %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 0x4008FC2814FA5D65)
ret i32 0
}
void *genhash_default_copy_func(const void *ptr) { return (void *)ptr; }


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

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

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

LLVM IR (-O2):
define i8* @genhash_default_copy_func(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_display_mode() { exit(1); }


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

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

LLVM IR (-O0):
define void @caml_gr_display_mode() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_display_mode() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int swap_dobldobl_slices(void) {
  double *c;
  int fail, *a, *b;
  fail = _ada_use_c2phc(636, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<swap_dobldobl_slices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x27c,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_dobldobl_slices>:
mov    $0x27c,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @swap_dobldobl_slices() {
%1 = alloca double*
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = load double*, double** %1
%8 = call i32 @_ada_use_c2phc(i32 636, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @swap_dobldobl_slices() {
%1 = tail call i32 @_ada_use_c2phc(i32 636, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int create_multprec_homotopy_with_given_gamma(double gamma_re,
                                              double gamma_im) {
  int *a, *b, fail;
  double c[2];
  c[0] = gamma_re;
  c[1] = gamma_im;
  fail = _ada_use_c2phc4c(523, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_multprec_homotopy_with_given_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x20b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_multprec_homotopy_with_given_gamma>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %rsp,%rcx
mov    $0x20b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @create_multprec_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [2 x double]
store double %0, double* %3
store double %1, double* %4
%9 = load double, double* %3
%10 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
store double %9, double* %10
%11 = load double, double* %4
%12 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
store double %11, double* %12
%13 = load i32*, i32** %5
%14 = load i32*, i32** %6
%15 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%16 = call i32 @_ada_use_c2phc4c(i32 523, i32* %13, i32* %14, double* %15, i32 0)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @create_multprec_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca [2 x double]
%4 = bitcast [2 x double]* %3 to i8*
%5 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
store double %0, double* %5
%6 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
store double %1, double* %6
%7 = call i32 @_ada_use_c2phc4c(i32 523, i32* undef, i32* undef, double* %5, i32 0)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t byteToInt(uint8_t in) { return (uint32_t)in; }


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

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

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

LLVM IR (-O2):
define i32 @byteToInt(i32 returned %0) {
ret i32 %0
}
void vec3_divide(float *dst, float *b) {
  dst[0] = dst[0] / b[0];
  dst[1] = dst[1] / b[1];
  dst[2] = dst[2] / b[2];
}


x86 assembly (clang, -O0):
<vec3_divide>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
divss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
divss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
divss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_divide>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
divss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
divss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
movss  0x8(%rdi),%xmm0
divss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @vec3_divide(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 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fdiv float %7, %10
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %3
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = fdiv float %16, %19
%21 = load float*, float** %3
%22 = getelementptr inbounds float, float* %21, i64 1
store float %20, float* %22
%23 = load float*, float** %3
%24 = getelementptr inbounds float, float* %23, i64 2
%25 = load float, float* %24
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 2
%28 = load float, float* %27
%29 = fdiv float %25, %28
%30 = load float*, float** %3
%31 = getelementptr inbounds float, float* %30, i64 2
store float %29, float* %31
ret void
}

LLVM IR (-O2):
define void @vec3_divide(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fdiv float %3, %4
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fdiv float %7, %9
store float %10, float* %6
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = fdiv float %12, %14
store float %15, float* %11
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XFocusChangeEvent;

/* Variables and functions */
unsigned long get_XFocusChangeEvent_serial(void *_p) {
  return (unsigned long)((XFocusChangeEvent *)_p)->serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XFocusChangeEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XCirculateRequestEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XCirculateRequestEvent_display(void *_p, void *_v) {
  ((XCirculateRequestEvent *)_p)->display = (Display *)_v;
}


x86 assembly (clang, -O0):
<set_XCirculateRequestEvent_display>:
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_XCirculateRequestEvent_display>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCirculateRequestEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
int countOnes(unsigned int n) {
  int ones = 0;
  while (n > 0) {
    ones += (n & 1);
    n >>= 1;
  }
  return ones;
}


x86 assembly (clang, -O0):
<countOnes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1132 <countOnes+0x32>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <countOnes+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countOnes>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <countOnes+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <countOnes+0x10>
ret

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

LLVM IR (-O2):
define i32 @countOnes(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
unsigned int __get_cpsr();
int /*<<< orphan*/ __set_cpsr(unsigned int);
unsigned IRQ_disable(void) {
  unsigned _cpsr_val;
  _cpsr_val = __get_cpsr();
  __set_cpsr(_cpsr_val | 0x00000080);
  return _cpsr_val;
}


x86 assembly (clang, -O0):
<IRQ_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__get_cpsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
or     $0x80,%edi
call   1030 <__set_cpsr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IRQ_disable>:
push   %rbx
xor    %eax,%eax
call   1040 <__get_cpsr@plt>
mov    %eax,%ebx
mov    %eax,%edi
or     $0x80,%edi
call   1030 <__set_cpsr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IRQ_disable() {
%1 = alloca i32
%2 = call i32 (...) @__get_cpsr()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 128
%5 = call i32 @__set_cpsr(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @IRQ_disable() {
%1 = tail call i32 (...) @__get_cpsr()
%2 = or i32 %1, 128
%3 = tail call i32 @__set_cpsr(i32 %2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ write_byte(char);
void write_word(const int w) {
  write_byte((char)(w & 0xff));
  write_byte((char)((w >> 8) & 0xff));
}


x86 assembly (clang, -O0):
<write_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
movsbl %al,%edi
call   1030 <write_byte@plt>
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movsbl %al,%edi
call   1030 <write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_word>:
push   %rbx
mov    %edi,%ebx
movsbl %bl,%edi
call   1030 <write_byte@plt>
shr    $0x8,%ebx
movsbl %bl,%edi
pop    %rbx
jmp    1030 <write_byte@plt>

LLVM IR (-O0):
define void @write_word(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = trunc i32 %4 to i8
%6 = call i32 @write_byte(i8 signext %5)
%7 = load i32, i32* %2
%8 = ashr i32 %7, 8
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = call i32 @write_byte(i8 signext %10)
ret void
}

LLVM IR (-O2):
define void @write_word(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @write_byte(i8 signext %2)
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = tail call i32 @write_byte(i8 signext %5)
ret void
}
unsigned hideme(unsigned x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @hideme(i32 returned %0) {
ret i32 %0
}
long next_hexagonal_num(void) {
  static long last_index = 0;
  static long last_num = 0;
  last_num += 4 * last_index + 1;
  last_index++;
  return last_num;
}


x86 assembly (clang, -O0):
<next_hexagonal_num>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1d(%rip),%rax
shl    $0x2,%rax
add    $0x1,%rax
add    0x2f16(%rip),%rax
mov    %rax,0x2f0f(%rip)
mov    0x2f00(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2ef5(%rip)
mov    0x2ef6(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_hexagonal_num>:
mov    0x2f21(%rip),%rcx
mov    0x2f22(%rip),%rax
lea    (%rax,%rcx,4),%rax
add    $0x1,%rax
mov    %rax,0x2f13(%rip)
add    $0x1,%rcx
mov    %rcx,0x2f00(%rip)
ret

LLVM IR (-O0):
@next_hexagonal_num.last_index = internal global i64 0
@next_hexagonal_num.last_num = internal global i64 0
define i64 @next_hexagonal_num() {
%1 = load i64, i64* @next_hexagonal_num.last_index
%2 = mul nsw i64 4, %1
%3 = add nsw i64 %2, 1
%4 = load i64, i64* @next_hexagonal_num.last_num
%5 = add nsw i64 %4, %3
store i64 %5, i64* @next_hexagonal_num.last_num
%6 = load i64, i64* @next_hexagonal_num.last_index
%7 = add nsw i64 %6, 1
store i64 %7, i64* @next_hexagonal_num.last_index
%8 = load i64, i64* @next_hexagonal_num.last_num
ret i64 %8
}

LLVM IR (-O2):
@next_hexagonal_num.last_index = internal unnamed_addr global i64 0
@next_hexagonal_num.last_num = internal unnamed_addr global i64 0
define i64 @next_hexagonal_num() {
%1 = load i64, i64* @next_hexagonal_num.last_index
%2 = shl nsw i64 %1, 2
%3 = or i64 %2, 1
%4 = load i64, i64* @next_hexagonal_num.last_num
%5 = add nsw i64 %3, %4
store i64 %5, i64* @next_hexagonal_num.last_num
%6 = add nsw i64 %1, 1
store i64 %6, i64* @next_hexagonal_num.last_index
ret i64 %5
}
/* Variables and functions */
double ___yn(int, double *);
double yn(int n, double x) { return ___yn(n, &x); }


x86 assembly (clang, -O0):
<yn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <___yn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yn>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <___yn@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define double @yn(i32 %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = call double @___yn(i32 %0, double* %3)
ret double %4
}
int subus(int a, int b) {
  const int d = a - b;
  if (d < 0) {
    return 0;
  } else {
    return d;
  }
}


x86 assembly (clang, -O0):
<subus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1129 <subus+0x29>
movl   $0x0,-0x4(%rbp)
jmp    112f <subus+0x2f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<subus>:
xor    %eax,%eax
sub    %esi,%edi
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @subus(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
/* Variables and functions */
uintptr_t syscall1(int /*<<< orphan*/, uintptr_t);
uintptr_t recv0(uintptr_t src) { return syscall1(0, src); }


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

x86 assembly (clang, -O2):
<recv0>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <syscall1@plt>

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

LLVM IR (-O2):
define i64 @recv0(i64 %0) {
%2 = tail call i64 @syscall1(i32 0, i64 %0)
ret i64 %2
}
void main() { char a; }


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
void _libSC_info_fork_parent(void) {}


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

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

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

LLVM IR (-O2):
define void @_libSC_info_fork_parent() {
ret void
}
/* Variables and functions */
char *xstrdup(char *);
char *oauth_sign_rsa_sha1(const char *m, const char *k) {
  return xstrdup("---RSA/PK11-is-not-supported-by-this-version-of-liboauth---");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"---RSA/PK11-is-not-supported-by-this-version-of-liboauth---\00"
define i8* @oauth_sign_rsa_sha1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i8* @xstrdup(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i8* %5
}

LLVM IR (-O2):
@.str = [60 x i8] c"---RSA/PK11-is-not-supported-by-this-version-of-liboauth---\00"
define i8* @oauth_sign_rsa_sha1(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i8* @xstrdup(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}