xunge/DecIR huggingface dataset:
/* Variables and functions */
int get_mtrand_int32();
double get_mtrand_double(void) {
  unsigned a = get_mtrand_int32() >> 5;
  unsigned b = get_mtrand_int32() >> 6;
  return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<get_mtrand_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %al,-0x9(%rbp)
call   1030 <get_mtrand_int32@plt>
mov    %eax,%ecx
mov    -0x9(%rbp),%al
sar    $0x5,%ecx
mov    %ecx,-0x4(%rbp)
call   1030 <get_mtrand_int32@plt>
sar    $0x6,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm1
movsd  0xeb8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mtrand_double>:
push   %rbx
xor    %eax,%eax
call   1030 <get_mtrand_int32@plt>
mov    %eax,%ebx
sar    $0x5,%ebx
xor    %eax,%eax
call   1030 <get_mtrand_int32@plt>
sar    $0x6,%eax
cvtsi2sd %rbx,%xmm0
cvtsi2sd %rax,%xmm1
mulsd  0xec7(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xec3(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @get_mtrand_double() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @get_mtrand_int32()
%4 = ashr i32 %3, 5
store i32 %4, i32* %1
%5 = call i32 (...) @get_mtrand_int32()
%6 = ashr i32 %5, 6
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = uitofp i32 %7 to double
%9 = load i32, i32* %2
%10 = uitofp i32 %9 to double
%11 = call double @llvm.fmuladd.f64(double %8, double 0x4190000000000000, double %10)
%12 = fmul double %11, 0x3CA0000000000000
ret double %12
}

LLVM IR (-O2):
define double @get_mtrand_double() {
%1 = tail call i32 (...) @get_mtrand_int32()
%2 = ashr i32 %1, 5
%3 = tail call i32 (...) @get_mtrand_int32()
%4 = ashr i32 %3, 6
%5 = uitofp i32 %2 to double
%6 = uitofp i32 %4 to double
%7 = tail call double @llvm.fmuladd.f64(double %5, double 0x4190000000000000, double %6)
%8 = fmul double %7, 0x3CA0000000000000
ret double %8
}
char *bad_cast(char const *s) { return (char *)s; }


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

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

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

LLVM IR (-O2):
define i8* @bad_cast(i8* readnone returned %0) {
ret i8* %0
}
double diff(double start, double end) {
  if ((end - start) < 0) {
    return 1000000000 + end - start;
  } else {
    return end - start;
  }
  return 0;
}


x86 assembly (clang, -O0):
<diff>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1141 <diff+0x41>
movsd  0xed3(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1150 <diff+0x50>
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff>:
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
addsd  0xef0(%rip),%xmm1
subsd  %xmm0,%xmm1
xorpd  %xmm3,%xmm3
movapd %xmm2,%xmm0
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @diff(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = load double, double* %4
%8 = fsub double %6, %7
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load double, double* %5
%12 = fadd double 1.000000e+09, %11
%13 = load double, double* %4
%14 = fsub double %12, %13
store double %14, double* %3
br label %19
15: ; preds = %2
%16 = load double, double* %5
%17 = load double, double* %4
%18 = fsub double %16, %17
store double %18, double* %3
br label %19
19: ; preds = %15, %10
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @diff(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fcmp olt double %3, 0.000000e+00
%5 = fadd double %1, 1.000000e+09
%6 = fsub double %5, %0
%7 = select i1 %4, double %6, double %3
ret double %7
}
void foo704() {}


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

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

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

LLVM IR (-O2):
define void @foo704() {
ret void
}
/* Variables and functions */
void *pwp_msghandler_new2(void *, int /*<<< orphan*/ *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void *pwp_msghandler_new(void *pc) {
  return pwp_msghandler_new2(pc, NULL, 0, 0);
}


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

x86 assembly (clang, -O2):
<pwp_msghandler_new>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <pwp_msghandler_new2@plt>

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

LLVM IR (-O2):
define i8* @pwp_msghandler_new(i8* %0) {
%2 = tail call i8* @pwp_msghandler_new2(i8* %0, i32* null, i32 0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *);
scalar_t__ help_shortcmdline(int, char const *, char *);
void help_getcaps(const char *program, int brief, int argc, char **argv) {
  if (!brief)
    dprintf(2, "\n getting capabilities ('get-caps')"
               "\n =================================");
  if (help_shortcmdline(brief, program, "get-caps <device>"))
    return;
}


x86 assembly (clang, -O0):
<help_getcaps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1151 <help_getcaps+0x31>
mov    $0x2,%edi
lea    0xeb4(%rip),%rsi
call   1030 <dprintf@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
lea    0xee8(%rip),%rdx
call   1040 <help_shortcmdline@plt>
cmp    $0x0,%rax
je     1173 <help_getcaps+0x53>
jmp    1173 <help_getcaps+0x53>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_getcaps>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
test   %esi,%esi
jne    113d <help_getcaps+0x1d>
lea    0xecd(%rip),%rsi
mov    $0x2,%edi
call   1030 <dprintf@plt>
lea    0xf03(%rip),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <help_shortcmdline@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"\0A getting capabilities ('get-caps')\0A =================================\00"
@.str.1 = [18 x i8] c"get-caps <device>\00"
define void @help_getcaps(i8* %0, i32 %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %4
%12 = call i32 @dprintf(i32 2, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %4
%14 = load i32, i32* %6
%15 = load i8*, i8** %5
%16 = call i64 @help_shortcmdline(i32 %14, i8* %15, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
br label %19
19: ; preds = %18, %13
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"\0A getting capabilities ('get-caps')\0A =================================\00"
@.str.1 = [18 x i8] c"get-caps <device>\00"
define void @help_getcaps(i8* %0, i32 %1, i32 %2, i8** nocapture readnone %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @dprintf(i32 2, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = tail call i64 @help_shortcmdline(i32 %1, i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_print_int(char *, unsigned long);
int /*<<< orphan*/ early_puts(char *);
unsigned long virtio_is_zero_block(unsigned long rec_list1,
                                   unsigned long rec_list2) {
  early_puts("_is_zero_block\n");
  debug_print_int("rec_list1", rec_list1);
  debug_print_int("rec_list2", rec_list2);
  return rec_list1;
}


x86 assembly (clang, -O0):
<virtio_is_zero_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <early_puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <debug_print_int@plt>
mov    -0x10(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1040 <debug_print_int@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<virtio_is_zero_block>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <early_puts@plt>
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <debug_print_int@plt>
lea    0xece(%rip),%rdi
mov    %r14,%rsi
call   1040 <debug_print_int@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"_is_zero_block\0A\00"
@.str.1 = [10 x i8] c"rec_list1\00"
@.str.2 = [10 x i8] c"rec_list2\00"
define i64 @virtio_is_zero_block(i64 returned %0, i64 %1) {
%3 = tail call i32 @early_puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @debug_print_int(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %0)
%5 = tail call i32 @debug_print_int(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i64 %1)
ret i64 %0
}
/* Variables and functions */
int skip_spaces(char *str) {
  char *p = str;
  while (*p == ' ')
    p++;
  return p - str;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1131 <skip_spaces+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_spaces+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x20,(%rdi)
lea    0x1(%rdi),%rdi
je     1110 <skip_spaces+0x10>
ret

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

LLVM IR (-O2):
define i32 @skip_spaces(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t zig_addw_u16(uint16_t lhs, uint16_t rhs, uint16_t max) {
  uint16_t thresh = max - rhs;
  if (lhs > thresh) {
    return lhs - thresh - 1;
  } else {
    return lhs + rhs;
  }
}


x86 assembly (clang, -O0):
<zig_addw_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    113f <zig_addw_u16+0x3f>
mov    -0x10(%rbp),%rax
sub    -0x28(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    114b <zig_addw_u16+0x4b>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zig_addw_u16>:
sub    %rsi,%rdx
cmp    %rdi,%rdx
not    %rdx
cmovge %rsi,%rdx
lea    (%rdx,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @zig_addw_u16(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = sub nsw i64 %9, %10
store i64 %11, i64* %8
%12 = load i64, i64* %5
%13 = load i64, i64* %8
%14 = icmp sgt i64 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i64, i64* %5
%17 = load i64, i64* %8
%18 = sub nsw i64 %16, %17
%19 = sub nsw i64 %18, 1
store i64 %19, i64* %4
br label %24
20: ; preds = %3
%21 = load i64, i64* %5
%22 = load i64, i64* %6
%23 = add nsw i64 %21, %22
store i64 %23, i64* %4
br label %24
24: ; preds = %20, %15
%25 = load i64, i64* %4
ret i64 %25
}

LLVM IR (-O2):
define i64 @zig_addw_u16(i64 %0, i64 %1, i64 %2) {
%4 = sub nsw i64 %2, %1
%5 = icmp slt i64 %4, %0
%6 = xor i64 %4, -1
%7 = select i1 %5, i64 %6, i64 %1
%8 = add i64 %7, %0
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ oerror_fatal(char *, size_t const);
void *realloc(void *, size_t const);
void *oerror_realloc(void *ptr, const size_t size) {
  void *p = realloc(ptr, size);
  if (p == 0)
    oerror_fatal("realloc to size %u bytes failed:", size);
  return p;
}


x86 assembly (clang, -O0):
<oerror_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115c <oerror_realloc+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <oerror_fatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oerror_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <oerror_realloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <oerror_fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"realloc to size %u bytes failed:\00"
define i8* @oerror_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @oerror_fatal(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [33 x i8] c"realloc to size %u bytes failed:\00"
define noalias i8* @oerror_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @oerror_fatal(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
scalar_t__ get_collision_button2();
int /*<<< orphan*/ reverse_ramming_speed();
int /*<<< orphan*/ stop_moving();
int /*<<< orphan*/ wait1Msec(int);
void handle_collision_button2() {
  while (get_collision_button2()) {
    reverse_ramming_speed();
    wait1Msec(1000);
  }
  stop_moving();
}


x86 assembly (clang, -O0):
<handle_collision_button2>:
push   %rbp
mov    %rsp,%rbp
jmp    1149 <handle_collision_button2+0x9>
mov    $0x0,%al
call   1030 <get_collision_button2@plt>
cmp    $0x0,%rax
je     1170 <handle_collision_button2+0x30>
mov    $0x0,%al
call   1050 <reverse_ramming_speed@plt>
mov    $0x3e8,%edi
call   1040 <wait1Msec@plt>
jmp    1149 <handle_collision_button2+0x9>
mov    $0x0,%al
call   1060 <stop_moving@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_collision_button2>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <get_collision_button2@plt>
test   %rax,%rax
je     116f <handle_collision_button2+0x2f>
xor    %eax,%eax
call   1050 <reverse_ramming_speed@plt>
mov    $0x3e8,%edi
call   1040 <wait1Msec@plt>
jmp    1150 <handle_collision_button2+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1060 <stop_moving@plt>

LLVM IR (-O0):
define void @handle_collision_button2() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @get_collision_button2()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = call i32 (...) @reverse_ramming_speed()
%6 = call i32 @wait1Msec(i32 1000)
br label %1
7: ; preds = %1
%8 = call i32 (...) @stop_moving()
ret void
}

LLVM IR (-O2):
define void @handle_collision_button2() {
%1 = tail call i64 (...) @get_collision_button2()
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @reverse_ramming_speed()
%5 = tail call i32 @wait1Msec(i32 1000)
%6 = tail call i64 (...) @get_collision_button2()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %0
%9 = tail call i32 (...) @stop_moving()
ret void
}
float floorf_(float x) {
  float roundtrip = (float)((int)x);
  return roundtrip > x ? roundtrip - 1 : roundtrip;
}


x86 assembly (clang, -O0):
<floorf_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1141 <floorf_+0x41>
movss  -0x8(%rbp),%xmm0
movss  0xecd(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    114b <floorf_+0x4b>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf_>:
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
movss  0xef1(%rip),%xmm2
addss  %xmm1,%xmm2
cmpltss %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @floorf_(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
%6 = sitofp i32 %5 to float
store float %6, float* %3
%7 = load float, float* %3
%8 = load float, float* %2
%9 = fcmp ogt float %7, %8
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load float, float* %3
%12 = fsub float %11, 1.000000e+00
br label %15
13: ; preds = %1
%14 = load float, float* %3
br label %15
15: ; preds = %13, %10
%16 = phi float [ %12, %10 ], [ %14, %13 ]
ret float %16
}

LLVM IR (-O2):
define float @floorf_(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fcmp ogt float %3, %0
%5 = fadd float %3, -1.000000e+00
%6 = select i1 %4, float %5, float %3
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ integrator_ias15_step();
void integrator_ias15_part2(void) {
  while (!integrator_ias15_step())
    ;
}


x86 assembly (clang, -O0):
<integrator_ias15_part2>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <integrator_ias15_part2+0x9>
mov    $0x0,%al
call   1030 <integrator_ias15_step@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1135 <integrator_ias15_part2+0x25>
jmp    113a <integrator_ias15_part2+0x2a>
jmp    1119 <integrator_ias15_part2+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrator_ias15_part2>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <integrator_ias15_step@plt>
test   %eax,%eax
je     1120 <integrator_ias15_part2+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @integrator_ias15_part2() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @integrator_ias15_step()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @integrator_ias15_part2() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @integrator_ias15_step()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int write_pid(const char *pidfile, int pid) {
  FILE *fp;
  if (!(fp = fopen(pidfile, "w")))
    return 0;
  fprintf(fp, "%d\n", pid);
  fclose(fp);
  return pid;
}


x86 assembly (clang, -O0):
<write_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1169 <write_pid+0x39>
movl   $0x0,-0x4(%rbp)
jmp    118b <write_pid+0x5b>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe8b(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pid>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1164 <write_pid+0x34>
mov    %rax,%rbx
lea    0xeb2(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
jmp    1166 <write_pid+0x36>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @write_pid(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %8, i32** %6
%9 = icmp ne i32* %8, null
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 0, i32* %3
br label %18
11: ; preds = %2
%12 = load i32*, i32** %6
%13 = load i32, i32* %5
%14 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32*, i32** %6
%16 = call i32 @fclose(i32* %15)
%17 = load i32, i32* %5
store i32 %17, i32* %3
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @write_pid(i8* nocapture %0, i32 %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%7 = tail call i32 @fclose(i32* %3)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %1, %5 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int CSLCount(char **papszStrList) {
  int nItems = 0;
  if (papszStrList) {
    while (*papszStrList != NULL) {
      nItems++;
      papszStrList++;
    }
  }
  return nItems;
}


x86 assembly (clang, -O0):
<CSLCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <CSLCount+0x4c>
jmp    111f <CSLCount+0x1f>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1147 <CSLCount+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    111f <CSLCount+0x1f>
jmp    114c <CSLCount+0x4c>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSLCount>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <CSLCount+0x1c>
cmpq   $0x0,(%rdi)
je     111c <CSLCount+0x1c>
xor    %eax,%eax
nop
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <CSLCount+0x10>
ret

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

LLVM IR (-O2):
define i32 @CSLCount(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8** [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %14
}
void gdk_window_set_functions() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_functions() {
ret void
}
/* Type definitions */
struct mdea_node {
  int dummy;
};
struct mdea_emitter {
  int dummy;
};

/* Variables and functions */
int mdea_serialize(struct mdea_node *, struct mdea_emitter *,
                   int /*<<< orphan*/, char **);
int mdea_write(struct mdea_emitter *f, struct mdea_node *node, char **error) {
  return mdea_serialize(node, f, 0, error);
}


x86 assembly (clang, -O0):
<mdea_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rcx
xor    %edx,%edx
call   1030 <mdea_serialize@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_write>:
mov    %rdx,%rcx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
xor    %edx,%edx
jmp    1030 <mdea_serialize@plt>

LLVM IR (-O0):
%struct.mdea_emitter = type { i32 }
%struct.mdea_node = type { i32 }
define i32 @mdea_write(%struct.mdea_emitter* %0, %struct.mdea_node* %1, i8** %2) {
%4 = alloca %struct.mdea_emitter*
%5 = alloca %struct.mdea_node*
%6 = alloca i8**
store %struct.mdea_emitter* %0, %struct.mdea_emitter** %4
store %struct.mdea_node* %1, %struct.mdea_node** %5
store i8** %2, i8*** %6
%7 = load %struct.mdea_node*, %struct.mdea_node** %5
%8 = load %struct.mdea_emitter*, %struct.mdea_emitter** %4
%9 = load i8**, i8*** %6
%10 = call i32 @mdea_serialize(%struct.mdea_node* %7, %struct.mdea_emitter* %8, i32 0, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.mdea_emitter = type { i32 }
%struct.mdea_node = type { i32 }
define i32 @mdea_write(%struct.mdea_emitter* %0, %struct.mdea_node* %1, i8** %2) {
%4 = tail call i32 @mdea_serialize(%struct.mdea_node* %1, %struct.mdea_emitter* %0, i32 0, i8** %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ n2;
typedef int /*<<< orphan*/ n1;

/* Variables and functions */
int /*<<< orphan*/ memcpy(scalar_t__ *, void const *, int);
int compare(const void *a, const void *b) {
  int rc = -1;
  uint32_t n1, n2;
  memcpy(&n1, a, sizeof(n1));
  memcpy(&n2, b, sizeof(n2));
  if (n1 < n2)
    rc = -1;
  if (n1 == n2)
    rc = 0;
  if (n2 > n2)
    rc = 1;
  return rc;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rsi
lea    -0x28(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1160 <compare+0x50>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    1175 <compare+0x65>
movl   $0x0,-0x14(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    118a <compare+0x7a>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    0x8(%rsp),%rcx
xor    %eax,%eax
cmp    (%rsp),%rcx
setne  %al
neg    %eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 -1, i32* %5
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i64* %6, i8* %8, i32 8)
%10 = load i8*, i8** %4
%11 = call i32 @memcpy(i64* %7, i8* %10, i32 8)
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = icmp slt i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %5
br label %16
16: ; preds = %15, %2
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 0, i32* %5
br label %21
21: ; preds = %20, %16
%22 = load i64, i64* %7
%23 = load i64, i64* %7
%24 = icmp sgt i64 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %5
br label %26
26: ; preds = %25, %21
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @memcpy(i64* %3, i8* %0, i32 8)
%8 = call i32 @memcpy(i64* %4, i8* %1, i32 8)
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = icmp ne i64 %9, %10
%12 = sext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glutWireIcosahedron();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glColor3f(1.0, 1.0, 1.0);
  glutWireIcosahedron();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    0x2e94(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
movsd  0xe9d(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1040 <glColor3f@plt>
mov    $0x0,%al
call   1060 <glutWireIcosahedron@plt>
mov    $0x0,%al
call   1050 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e90(%rip),%rax
mov    0x2e99(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
movsd  0xea0(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1040 <glColor3f@plt>
xor    %eax,%eax
call   1060 <glutWireIcosahedron@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = call i32 (...) @glutWireIcosahedron()
%7 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = tail call i32 (...) @glutWireIcosahedron()
%7 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_rx_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::rx (rtpp_stream_rx) is invoked after "
          "destruction\x0a",
          pub);
  abort();
}


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

x86 assembly (clang, -O2):
<rtpp_stream_rx_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [73 x i8] c"Method rtpp_stream@%p::rx (rtpp_stream_rx) is invoked after destruction\0A\00"
define void @rtpp_stream_rx_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [73 x i8] c"Method rtpp_stream@%p::rx (rtpp_stream_rx) is invoked after destruction\0A\00"
define void @rtpp_stream_rx_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct labeller_i {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct labeller_i *);
void _free_li(struct labeller_i *li) { free(li); }


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

x86 assembly (clang, -O2):
<_free_li>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.labeller_i = type { i32 }
define void @_free_li(%struct.labeller_i* %0) {
%2 = alloca %struct.labeller_i*
store %struct.labeller_i* %0, %struct.labeller_i** %2
%3 = load %struct.labeller_i*, %struct.labeller_i** %2
%4 = call i32 @free(%struct.labeller_i* %3)
ret void
}

LLVM IR (-O2):
%struct.labeller_i = type { i32 }
define void @_free_li(%struct.labeller_i* nocapture %0) {
%2 = tail call i32 @free(%struct.labeller_i* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtpi32_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cvtpi32_ps(__m128 a, __m64 b) { return _mm_cvtpi32_ps(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_cvtpi32_ps>:
jmp    1030 <_mm_cvtpi32_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_cvtpi32_ps(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_cvtpi32_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cvtpi32_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cvtpi32_ps(i32 %0, i32 %1)
ret i32 %3
}
int pdiff2(int *p1, int *p2) { return p1 - p2; }


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

x86 assembly (clang, -O2):
<pdiff2>:
mov    %rdi,%rax
sub    %rsi,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @pdiff2(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 = ptrtoint i32* %5 to i64
%8 = ptrtoint i32* %6 to i64
%9 = sub i64 %7, %8
%10 = sdiv exact i64 %9, 4
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @pdiff2(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = sub i64 %3, %4
%6 = lshr exact i64 %5, 2
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
char *malloc(int);
int main() {
  int result;
  char *a = malloc(10);
  a[0] = 0;
  result = a[0];
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @malloc(i32 10)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 0, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
store i32 %10, i32* %2
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void bar() {
  int i;
  char j;
  for (i = 0; i < 256; i++) {
    j = get();
    printf(j);
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1160 <bar+0x40>
mov    $0x0,%al
call   1040 <get@plt>
mov    %al,-0x5(%rbp)
movsbq -0x5(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <bar+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
mov    $0x100,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <get@plt>
movsbq %al,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <bar+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @bar() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = tail call i32 (...) @get()
%4 = zext i32 %3 to i64
%5 = shl i64 %4, 56
%6 = ashr exact i64 %5, 56
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %7)
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 256
br i1 %10, label %11, label %1
11: ; preds = %1
ret void
}
/* Variables and functions */
void *malloc(unsigned int);
void *kmalloc(unsigned int size, unsigned int flags) { return malloc(size); }


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

x86 assembly (clang, -O2):
<kmalloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @kmalloc(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 = call i8* @malloc(i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @kmalloc(i32 %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %0)
ret i8* %3
}
/* Type definitions */
struct vec4i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec4i_abs(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) struct vec4i *psvec4i_abs(struct vec4i *result,
                                                   struct vec4i *a) {
  vec4i_abs((int32_t *)result, (int32_t *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec4i_abs>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4i_abs@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_abs(%struct.vec4i* %0, %struct.vec4i* %1) {
%3 = alloca %struct.vec4i*
%4 = alloca %struct.vec4i*
store %struct.vec4i* %0, %struct.vec4i** %3
store %struct.vec4i* %1, %struct.vec4i** %4
%5 = load %struct.vec4i*, %struct.vec4i** %3
%6 = bitcast %struct.vec4i* %5 to i32*
%7 = load %struct.vec4i*, %struct.vec4i** %4
%8 = bitcast %struct.vec4i* %7 to i32*
%9 = call i32 @vec4i_abs(i32* %6, i32* %8)
%10 = load %struct.vec4i*, %struct.vec4i** %3
ret %struct.vec4i* %10
}

LLVM IR (-O2):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_abs(%struct.vec4i* returned %0, %struct.vec4i* %1) {
%3 = getelementptr %struct.vec4i, %struct.vec4i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec4i, %struct.vec4i* %1, i64 0, i32 0
%5 = tail call i32 @vec4i_abs(i32* %3, i32* %4)
ret %struct.vec4i* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void jsr_crout() { printf("\n"); }


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

x86 assembly (clang, -O2):
<jsr_crout>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @jsr_crout() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
int compare_floats(const void *a, const void *b) {
  const float *da = (const float *)a;
  const float *db = (const float *)b;
  return (*da > *db) - (*da < *db);
}


x86 assembly (clang, -O0):
<compare_floats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
movss  (%rcx),%xmm1
mov    -0x20(%rbp),%rcx
movss  (%rcx),%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_floats>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_floats(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float*
%6 = alloca float*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to float*
store float* %8, float** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to float*
store float* %10, float** %6
%11 = load float*, float** %5
%12 = load float, float* %11
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fcmp ogt float %12, %14
%16 = zext i1 %15 to i32
%17 = load float*, float** %5
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = load float, float* %19
%21 = fcmp olt float %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @compare_floats(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = bitcast i8* %1 to float*
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
%8 = zext i1 %7 to i32
%9 = fcmp olt float %5, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
void gtk_event_box_get_visible_window() {}


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

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

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

LLVM IR (-O2):
define void @gtk_event_box_get_visible_window() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int f(int arg) {
  int ret = 5 + arg;
  for (int i = 0; i < 3; i++) {
    printf("%d\n", i);
  }
  return ret;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1152 <f+0x42>
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <f+0x1b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee3(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
add    $0x5,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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

/* Variables and functions */
int SQLITE_OK;
int wrap_Randomness(sqlite3_vfs *pVfs, int nByte, char *zByte) {
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<wrap_Randomness>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_Randomness>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @wrap_Randomness(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @SQLITE_OK
ret i32 %7
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @wrap_Randomness(i32* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @SQLITE_OK
ret i32 %4
}