xunge/DecIR huggingface dataset:
double below_wrapper(double *arg_list) { return (arg_list[0] < arg_list[1]); }


x86 assembly (clang, -O0):
<below_wrapper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<below_wrapper>:
movsd  (%rdi),%xmm1
cmpltsd 0x8(%rdi),%xmm1
movsd  0xeee(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @below_wrapper(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = fcmp olt double %5, %8
%10 = zext i1 %9 to i32
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @below_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp olt double %2, %4
%6 = uitofp i1 %5 to double
ret double %6
}
int Operand_label12_ator(unsigned int *valp, unsigned int pc) {
  *valp -= pc;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_label12_ator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_label12_ator>:
sub    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_label12_ator(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sub i32 %7, %5
store i32 %8, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_label12_ator(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = sub i32 %3, %1
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
size_t case_get_file_len(int);
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
size_t case_get_maps_len(void) {
  int f = open("/proc/self/maps", O_RDONLY);
  size_t result = case_get_file_len(f);
  close(f);
  return result;
}


x86 assembly (clang, -O0):
<case_get_maps_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <case_get_file_len@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<case_get_maps_len>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1040 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <case_get_file_len@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1030 <close@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"/proc/self/maps\00"
@O_RDONLY = global i32 0
define i64 @case_get_maps_len() {
%1 = alloca i32
%2 = alloca i64
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i64 @case_get_file_len(i32 %5)
store i64 %6, i64* %2
%7 = load i32, i32* %1
%8 = call i32 @close(i32 %7)
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
@.str = [16 x i8] c"/proc/self/maps\00"
@O_RDONLY = global i32 0
define i64 @case_get_maps_len() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i64 @case_get_file_len(i32 %2)
%4 = tail call i32 @close(i32 %2)
ret i64 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int intcelcon_clear_mixed_cell_configuration(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(755, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<intcelcon_clear_mixed_cell_configuration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2f3,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intcelcon_clear_mixed_cell_configuration>:
mov    $0x2f3,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @intcelcon_clear_mixed_cell_configuration() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 755, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void delayUs(unsigned int t) {
  while (--t)
    ;
}


x86 assembly (clang, -O0):
<delayUs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     111e <delayUs+0x1e>
jmp    1107 <delayUs+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delayUs(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_load1_pd(void *);
__m128d test_load1_pd(__m128 x, void *y) { return _mm_load1_pd(y); }


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

x86 assembly (clang, -O2):
<test_load1_pd>:
mov    %rsi,%rdi
jmp    1030 <_mm_load1_pd@plt>

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

LLVM IR (-O2):
define i32 @test_load1_pd(i32 %0, i8* %1) {
%3 = tail call i32 @_mm_load1_pd(i8* %1)
ret i32 %3
}
void gtk_cell_renderer_text_set_fixed_height_from_font() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_text_set_fixed_height_from_font() {
ret void
}
int comp(const void *p1, const void *p2) { return *(int *)p1 - *(int *)p2; }


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

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

LLVM IR (-O0):
define i32 @comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int add_it(int suc, int value) { return suc + value; }


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

x86 assembly (clang, -O2):
<add_it>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add_it(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
size_t INT_MAX;
int cap_size_t_to_int(size_t val) {
  if (val > INT_MAX) {
    return INT_MAX;
  } else {
    return (int)val;
  }
}


x86 assembly (clang, -O0):
<cap_size_t_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ed5(%rip),%rcx
cmp    (%rcx),%rax
jbe    112e <cap_size_t_to_int+0x2e>
mov    0x2ec5(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    1135 <cap_size_t_to_int+0x35>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cap_size_t_to_int>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
cmovae %edi,%eax
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define i32 @cap_size_t_to_int(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @INT_MAX
%6 = icmp ugt i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* @INT_MAX
%9 = trunc i64 %8 to i32
store i32 %9, i32* %2
br label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define i32 @cap_size_t_to_int(i64 %0) {
%2 = load i64, i64* @INT_MAX
%3 = icmp ult i64 %2, %0
%4 = select i1 %3, i64 %2, i64 %0
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
double cos(double);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, double *);
double sin(double);
int main() {
  double n;
  scanf("%lf", &n);
  double s = sin(n);
  double c = cos(n);
  printf("%lf %lf\n", s, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeb5(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
lea    0xe89(%rip),%rdi
movsd  0x10(%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call double @sin(double %4)
%6 = load double, double* %1
%7 = call double @cos(double %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %5, double %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ XClientMessageEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XClientMessageEvent(void) {
  XClientMessageEvent *_p =
      (XClientMessageEvent *)malloc(sizeof(XClientMessageEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XClientMessageEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XClientMessageEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XClientMessageEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XClientMessageEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XClientMessageEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XClientMessageEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
void gmp_dbg_msg_l(unsigned int level, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @gmp_dbg_msg_l(i32 %0, i8* nocapture %1, ...) {
ret void
}
/* Variables and functions */
int gdb_hexnibble2dec(char);
int gdb_hexbyte2dec(char *s) {
  return (gdb_hexnibble2dec(s[0]) << 4) + gdb_hexnibble2dec(s[1]);
}


x86 assembly (clang, -O0):
<gdb_hexbyte2dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <gdb_hexnibble2dec@plt>
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <gdb_hexnibble2dec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdb_hexbyte2dec>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <gdb_hexnibble2dec@plt>
mov    %eax,%ebp
shl    $0x4,%ebp
movsbl 0x1(%rbx),%edi
call   1030 <gdb_hexnibble2dec@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @gdb_hexbyte2dec(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @gdb_hexnibble2dec(i8 signext %2)
%4 = shl i32 %3, 4
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i32 @gdb_hexnibble2dec(i8 signext %6)
%8 = add nsw i32 %7, %4
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int cu_builtin_vprintf(char const *f, va_list args) {
  return vfprintf(stderr, f, args);
}


x86 assembly (clang, -O0):
<cu_builtin_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):
<cu_builtin_vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
define i32 @cu_builtin_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* @stderr
%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):
@stderr = global i32 0
define i32 @cu_builtin_vprintf(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __gnat_last_chance_handler(void) { abort(); }


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

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

LLVM IR (-O0):
define void @__gnat_last_chance_handler() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @__gnat_last_chance_handler() {
%1 = tail call i32 (...) @abort()
unreachable
}
void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start,
                        unsigned long end) {}


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
define void @flush_tlb_pgtables(%struct.mm_struct* %0, i64 %1, i64 %2) {
%4 = alloca %struct.mm_struct*
%5 = alloca i64
%6 = alloca i64
store %struct.mm_struct* %0, %struct.mm_struct** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @flush_tlb_pgtables(%struct.mm_struct* nocapture %0, i64 %1, i64 %2) {
ret void
}
int isdelimeter(char ch) {
  switch (ch) {
  case ' ':
  case '+':
  case '-':
  case '/':
  case '*':
  case '%':
  case '=':
  case '>':
  case '<':
  case '(':
  case ')':
  case '$':
  case '!':
  case '&':
  case '|':
  case '^':
    return 1;
    break;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isdelimeter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5c,%eax
ja     1140 <isdelimeter+0x40>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1147 <isdelimeter+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdelimeter>:
add    $0xffffffe0,%edi
cmp    $0x5c,%edi
ja     111e <isdelimeter+0x1e>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isdelimeter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 43, label %6
i32 45, label %6
i32 47, label %6
i32 42, label %6
i32 37, label %6
i32 61, label %6
i32 62, label %6
i32 60, label %6
i32 40, label %6
i32 41, label %6
i32 36, label %6
i32 33, label %6
i32 38, label %6
i32 124, label %6
i32 94, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isdelimeter(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 43, label %4
i32 45, label %4
i32 47, label %4
i32 42, label %4
i32 37, label %4
i32 61, label %4
i32 62, label %4
i32 60, label %4
i32 40, label %4
i32 41, label %4
i32 36, label %4
i32 33, label %4
i32 38, label %4
i32 124, label %4
i32 94, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assertTrue(char *, int);
void check_double(void *p) {
  double *pd = (double *)p;
  assertTrue("pd[3] == 0", pd[3] == 0);
  ;
}


x86 assembly (clang, -O0):
<check_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb8(%rip),%rdi
call   1030 <assertTrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_double>:
xorpd  %xmm0,%xmm0
cmpeqsd 0x18(%rdi),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xed7(%rip),%rdi
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"pd[3] == 0\00"
define void @check_double(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 3
%8 = load double, double* %7
%9 = fcmp oeq double %8, 0.000000e+00
%10 = zext i1 %9 to i32
%11 = call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"pd[3] == 0\00"
define void @check_double(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 24
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
%6 = zext i1 %5 to i32
%7 = tail call i32 @assertTrue(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int count = 0;
  printf("\nOutside the block, count = %d", count);
  {
    int count = 999;
    printf("\nWithin the block, count = %d", count);
  }
  printf("\nOutside the block again, count = %d", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x3e7,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"\0AOutside the block, count = %d\00"
@.str.1 = [30 x i8] c"\0AWithin the block, count = %d\00"
@.str.2 = [37 x i8] c"\0AOutside the block again, count = %d\00"
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
store i32 0, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 999, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0AOutside the block, count = %d\00"
@.str.1 = [30 x i8] c"\0AWithin the block, count = %d\00"
@.str.2 = [37 x i8] c"\0AOutside the block again, count = %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 999)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void test_error(const char *test) {
  perror(test);
  exit(-1);
}


x86 assembly (clang, -O0):
<test_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test_error>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @test_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @test_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Ret Code Fail\n");
  return EXIT_FAILURE;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Ret Code Fail\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
ret i32 %3
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [14 x i8] c"Ret Code Fail\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ odwroc(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  char c[10];
  printf("podaj napis: ");
  fgets(c, 10, stdin);
  odwroc(c);
  printf("%s\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xe(%rbp),%rdi
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1050 <fgets@plt>
lea    -0xe(%rbp),%rdi
call   1030 <odwroc@plt>
lea    -0xe(%rbp),%rsi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1040 <odwroc@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"podaj napis: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 10, i32 %4)
%6 = call i32 @odwroc(i8* %2)
%7 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
bool stdlib_base_is_nanf(const float x) { return (x != x); }


x86 assembly (clang, -O0):
<stdlib_base_is_nanf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_base_is_nanf>:
xor    %eax,%eax
ucomiss %xmm0,%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @stdlib_base_is_nanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp une float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @stdlib_base_is_nanf(float %0) {
%2 = fcmp uno float %0, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ CL_CloseAVI();
void CL_StopVideo_f(void) { CL_CloseAVI(); }


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

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

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

LLVM IR (-O2):
define void @CL_StopVideo_f() {
%1 = tail call i32 (...) @CL_CloseAVI()
ret void
}
void testClosureLLFLLrV(void (*closure)(long long, float, long long),
                        long long a1, float a2, long long a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureLLFLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
mov    -0x20(%rbp),%rsi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureLLFLLrV>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureLLFLLrV(void (i64, float, i64)* %0, i64 %1, float %2, i64 %3) {
%5 = alloca void (i64, float, i64)*
%6 = alloca i64
%7 = alloca float
%8 = alloca i64
store void (i64, float, i64)* %0, void (i64, float, i64)** %5
store i64 %1, i64* %6
store float %2, float* %7
store i64 %3, i64* %8
%9 = load void (i64, float, i64)*, void (i64, float, i64)** %5
%10 = load i64, i64* %6
%11 = load float, float* %7
%12 = load i64, i64* %8
ret void
}

LLVM IR (-O2):
define void @testClosureLLFLLrV(void (i64, float, i64)* nocapture %0, i64 %1, float %2, i64 %3) {
tail call void %0(i64 %1, float %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes_encrypt(unsigned char const *, int const,
                               unsigned char *, unsigned char const *,
                               unsigned char const *, int);
void aes_128_encrypt(const unsigned char *plaintext, const int plaintext_len,
                     unsigned char ciphertext[], void *iv,
                     const unsigned char *key) {
  aes_encrypt(plaintext, plaintext_len, ciphertext, (const unsigned char *)iv,
              key, 16);
}


x86 assembly (clang, -O0):
<aes_128_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x10,%r9d
call   1030 <aes_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_128_encrypt>:
mov    $0x10,%r9d
jmp    1030 <aes_encrypt@plt>

LLVM IR (-O0):
define void @aes_128_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @aes_encrypt(i8* %11, i32 %12, i8* %13, i8* %14, i8* %15, i32 16)
ret void
}

LLVM IR (-O2):
define void @aes_128_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @aes_encrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ieee_set_fp_control(unsigned long);
void __attribute__((constructor)) set_fast_math(void) {
  __ieee_set_fp_control((1UL << 12) | (1UL << 13));
}


x86 assembly (clang, -O0):
<set_fast_math>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3000,%edi
call   1030 <__ieee_set_fp_control@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_fast_math>:
mov    $0x3000,%edi
jmp    1030 <__ieee_set_fp_control@plt>

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @set_fast_math, i8* null }]
define void @set_fast_math() {
%1 = call i32 @__ieee_set_fp_control(i64 12288)
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @set_fast_math, i8* null }]
define void @set_fast_math() {
%1 = tail call i32 @__ieee_set_fp_control(i64 12288)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void handle_child(int signum) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, NULL, WNOHANG)) > 0)
    printf("Child %d terminated.\n", pid);
  return;
}


x86 assembly (clang, -O0):
<handle_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1162 <handle_child+0x42>
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <handle_child+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_child>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <waitpid@plt>
test   %eax,%eax
jle    116d <handle_child+0x4d>
lea    0xebb(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    (%r14),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1150 <handle_child+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [22 x i8] c"Child %d terminated.\0A\00"
define void @handle_child(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* null, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [22 x i8] c"Child %d terminated.\0A\00"
define void @handle_child(i32 %0) {
%2 = load i32, i32* @WNOHANG
%3 = tail call i32 @waitpid(i32 -1, i32* null, i32 %2)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ %3, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @WNOHANG
%9 = tail call i32 @waitpid(i32 -1, i32* null, i32 %8)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ print_description();
int /*<<< orphan*/ print_usage(int /*<<< orphan*/);
void print_help(void) {
  print_description();
  print_usage(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <print_description@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <print_usage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
xor    %eax,%eax
call   1030 <print_description@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <print_usage@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @print_help() {
%1 = call i32 (...) @print_description()
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @print_usage(i32 %2)
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @print_help() {
%1 = tail call i32 (...) @print_description()
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @print_usage(i32 %2)
ret void
}
unsigned long long rdtsc(void) {
  unsigned hi, lo;
  asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
  return lo + ((unsigned long long)hi << 32);
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0x8(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x20,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %2
store i32 %5, i32* %1
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = add i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
int hello(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @hello() {
ret i32 42
}

LLVM IR (-O2):
define i32 @hello() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "ok\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"ok\0A\00"
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* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"ok\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void zeckendorfRepresentation(int number) {}


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

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

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

LLVM IR (-O2):
define void @zeckendorfRepresentation(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long plane_mask;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_plane_mask(void *_p, unsigned long _v) {
  ((XGCValues *)_p)->plane_mask = (unsigned long)_v;
}


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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XGCValues_plane_mask(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_XGCValues_plane_mask(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_data();
int do_init(void) {
  clear_data();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @do_init() {
%1 = call i32 (...) @clear_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @do_init() {
%1 = tail call i32 (...) @clear_data()
ret i32 0
}
int snoopy_string_countChars(const char *stringToSearch,
                             char characterToCount) {
  const char *strPtr = stringToSearch;
  int charCount = 0;
  while ('\0' != *strPtr) {
    if (*strPtr == characterToCount) {
      charCount++;
    }
    strPtr++;
  }
  return charCount;
}


x86 assembly (clang, -O0):
<snoopy_string_countChars>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     115b <snoopy_string_countChars+0x5b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <snoopy_string_countChars+0x4a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111d <snoopy_string_countChars+0x1d>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<snoopy_string_countChars>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <snoopy_string_countChars+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <snoopy_string_countChars+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @snoopy_string_countChars(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %23, %2
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 0, %11
br i1 %12, label %13, label %26
13: ; preds = %8
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %16, %18
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %23
23: ; preds = %20, %13
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %5
br label %8
26: ; preds = %8
%27 = load i32, i32* %6
ret i32 %27
}

LLVM IR (-O2):
define i32 @snoopy_string_countChars(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = icmp eq i8 %6, %1
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %16
}
/* Type definitions */
struct Round {
  int dummy;
};

/* Variables and functions */
int findAllowedBid(struct Round *, int, int);
int round_findPreviousAllowedBid(struct Round *round, int currentBid) {
  return findAllowedBid(round, currentBid, -1);
}


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

x86 assembly (clang, -O2):
<round_findPreviousAllowedBid>:
mov    $0xffffffff,%edx
jmp    1030 <findAllowedBid@plt>

LLVM IR (-O0):
%struct.Round = type { i32 }
define i32 @round_findPreviousAllowedBid(%struct.Round* %0, i32 %1) {
%3 = alloca %struct.Round*
%4 = alloca i32
store %struct.Round* %0, %struct.Round** %3
store i32 %1, i32* %4
%5 = load %struct.Round*, %struct.Round** %3
%6 = load i32, i32* %4
%7 = call i32 @findAllowedBid(%struct.Round* %5, i32 %6, i32 -1)
ret i32 %7
}

LLVM IR (-O2):
%struct.Round = type { i32 }
define i32 @round_findPreviousAllowedBid(%struct.Round* %0, i32 %1) {
%3 = tail call i32 @findAllowedBid(%struct.Round* %0, i32 %1, i32 -1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int /*<<< orphan*/ t3();
int /*<<< orphan*/ test_sizeof();
void testmain() {
  print("union");
  t1();
  t2();
  t3();
  test_sizeof();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
call   1050 <print@plt>
mov    $0x0,%al
call   1030 <t1@plt>
mov    $0x0,%al
call   1070 <t2@plt>
mov    $0x0,%al
call   1040 <t3@plt>
mov    $0x0,%al
call   1060 <test_sizeof@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xea8(%rip),%rdi
call   1050 <print@plt>
xor    %eax,%eax
call   1030 <t1@plt>
xor    %eax,%eax
call   1070 <t2@plt>
xor    %eax,%eax
call   1040 <t3@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <test_sizeof@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"union\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @t1()
%3 = call i32 (...) @t2()
%4 = call i32 (...) @t3()
%5 = call i32 (...) @test_sizeof()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"union\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @t1()
%3 = tail call i32 (...) @t2()
%4 = tail call i32 (...) @t3()
%5 = tail call i32 (...) @test_sizeof()
ret void
}