xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ mtrace();
int /*<<< orphan*/ muntrace();
int main() {
  mtrace();
  muntrace();
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mtrace()
%2 = tail call i32 (...) @muntrace()
ret i32 0
}
void buf_set_uint32_be(void *buf, unsigned long addr, unsigned long val) {
  unsigned char *tmp = (unsigned char *)buf + addr;
  tmp[0] = (val >> 24) & 0xff;
  tmp[1] = (val >> 16) & 0xff;
  tmp[2] = (val >> 8) & 0xff;
  tmp[3] = val & 0xff;
}


x86 assembly (clang, -O0):
<buf_set_uint32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x18(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_set_uint32_be>:
bswap  %edx
mov    %edx,(%rdi,%rsi,1)
ret

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

LLVM IR (-O2):
define void @buf_set_uint32_be(i8* nocapture writeonly %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %1
%5 = lshr i64 %2, 24
%6 = trunc i64 %5 to i8
store i8 %6, i8* %4
%7 = lshr i64 %2, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %8, i8* %9
%10 = lshr i64 %2, 8
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %4, i64 2
store i8 %11, i8* %12
%13 = trunc i64 %2 to i8
%14 = getelementptr inbounds i8, i8* %4, i64 3
store i8 %13, i8* %14
ret void
}
main() {
  int i, chunk;
  float c[50];
  chunk = 5;
#pragma omp parallel for shared(c, chunk) schedule(dynamic, chunk)
  for (i = 0; i < 50; i++)
    c[i] = i;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    1147 <main+0x47>
cvtsi2ssl -0x8(%rbp),%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0xe0(%rbp,%rax,4)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111d <main+0x1d>
xor    %eax,%eax
add    $0x60,%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 i32
%4 = alloca [50 x float]
store i32 0, i32* %1
store i32 5, i32* %3
store i32 0, i32* %2
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 50
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [50 x float], [50 x float]* %4, i64 0, i64 %12
store float %10, float* %13
br label %14
14: ; preds = %8
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %5
17: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void tthfreem(void) {}


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

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

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

LLVM IR (-O2):
define void @tthfreem() {
ret void
}
unsigned long long unsignedlonglong_ignoring_unsignedlong(unsigned long long x,
                                                          unsigned long y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @unsignedlonglong_ignoring_unsignedlong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ M_TRIM_THRESHOLD;
int /*<<< orphan*/ mallopt(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int main() {
  mallopt(M_TRIM_THRESHOLD, 8192);
  printf("#define HAVE_MALLOPT_H\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    $0x2000,%esi
call   1030 <mallopt@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    $0x2000,%esi
call   1040 <mallopt@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@M_TRIM_THRESHOLD = global i32 0
@.str = [24 x i8] c"#define HAVE_MALLOPT_H\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @M_TRIM_THRESHOLD
%3 = call i32 @mallopt(i32 %2, i32 8192)
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@M_TRIM_THRESHOLD = global i32 0
@str = [23 x i8] c"#define HAVE_MALLOPT_H\00"
define i32 @main() {
%1 = load i32, i32* @M_TRIM_THRESHOLD
%2 = tail call i32 @mallopt(i32 %1, i32 8192)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int rand();
int flip(void) { return rand() % 2; }


x86 assembly (clang, -O0):
<flip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @flip() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @flip() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ExtractFileExtension(char *, char *);
int QuakeFileExtensionType(char *);
int QuakeFileType(char *filename) {
  char ext[1024] = ".";
  ExtractFileExtension(filename, ext + 1);
  return QuakeFileExtensionType(ext);
}


x86 assembly (clang, -O0):
<QuakeFileType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1030 <memset@plt>
movb   $0x2e,-0x410(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
add    $0x1,%rsi
call   1040 <ExtractFileExtension@plt>
lea    -0x410(%rbp),%rdi
call   1050 <QuakeFileExtensionType@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuakeFileType>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    $0x400,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
movb   $0x2e,(%rsp)
lea    0x1(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <ExtractFileExtension@plt>
mov    %r14,%rdi
call   1050 <QuakeFileExtensionType@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @QuakeFileType(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = bitcast [1024 x i8]* %3 to i8*
%5 = bitcast i8* %4 to [1024 x i8]*
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i32 0, i32 0
store i8 46, i8* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = call i32 @ExtractFileExtension(i8* %7, i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%12 = call i32 @QuakeFileExtensionType(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @QuakeFileType(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
store i8 46, i8* %3
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 1
%5 = call i32 @ExtractFileExtension(i8* %0, i8* %4)
%6 = call i32 @QuakeFileExtensionType(i8* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ hal_iic_init();
void rtc_init(void) { hal_iic_init(); }


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

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

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

LLVM IR (-O2):
define void @rtc_init() {
%1 = tail call i32 (...) @hal_iic_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gl_destroy();
int /*<<< orphan*/ gl_read();
int /*<<< orphan*/ gl_sort();
int main() {
  gl_read();
  gl_sort();
  gl_destroy();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gl_read()
%2 = tail call i32 (...) @gl_sort()
%3 = tail call i32 (...) @gl_destroy()
ret i32 0
}
void cs_high() {}


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

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

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

LLVM IR (-O2):
define void @cs_high() {
ret void
}
void g_datalist_id_set_data_full() {}


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

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

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

LLVM IR (-O2):
define void @g_datalist_id_set_data_full() {
ret void
}
/* Variables and functions */
int rand();
int Random(int _iMin, int _iMax) { return (rand() % (_iMax - _iMin) + _iMin); }


x86 assembly (clang, -O0):
<Random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Random(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = srem i32 %5, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @Random(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
int mylibA(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mylibA() {
ret i32 0
}
int main() {
  int j = 0;
  int i = 0;
  for (int b = 3; (b = 10); i++) {
    j += j;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0xa,-0x10(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1136 <main+0x36>
jmp    114d <main+0x4d>
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <main+0x20>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 3, i32* %4
br label %5
5: ; preds = %10, %0
store i32 10, i32* %4
br i1 true, label %6, label %13
6: ; preds = %5
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
store i32 %9, i32* %2
br label %10
10: ; preds = %6
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %5
13: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void idt_picInit() {
  outb(0x20, 0x11);
  outb(0x21, 0x20);
  outb(0x21, 0x04);
  outb(0x21, 0x01);
  outb(0xa0, 0x11);
  outb(0xa1, 0x28);
  outb(0xa1, 0x02);
  outb(0xa1, 0x01);
  outb(0x20, 0x0);
  outb(0xa0, 0x0);
}


x86 assembly (clang, -O0):
<idt_picInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<idt_picInit>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x20,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa0,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @idt_picInit() {
%1 = call i32 @outb(i32 32, i32 17)
%2 = call i32 @outb(i32 33, i32 32)
%3 = call i32 @outb(i32 33, i32 4)
%4 = call i32 @outb(i32 33, i32 1)
%5 = call i32 @outb(i32 160, i32 17)
%6 = call i32 @outb(i32 161, i32 40)
%7 = call i32 @outb(i32 161, i32 2)
%8 = call i32 @outb(i32 161, i32 1)
%9 = call i32 @outb(i32 32, i32 0)
%10 = call i32 @outb(i32 160, i32 0)
ret void
}

LLVM IR (-O2):
define void @idt_picInit() {
%1 = tail call i32 @outb(i32 32, i32 17)
%2 = tail call i32 @outb(i32 33, i32 32)
%3 = tail call i32 @outb(i32 33, i32 4)
%4 = tail call i32 @outb(i32 33, i32 1)
%5 = tail call i32 @outb(i32 160, i32 17)
%6 = tail call i32 @outb(i32 161, i32 40)
%7 = tail call i32 @outb(i32 161, i32 2)
%8 = tail call i32 @outb(i32 161, i32 1)
%9 = tail call i32 @outb(i32 32, i32 0)
%10 = tail call i32 @outb(i32 160, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_trip_new();
void roadmap_start_create_trip(void) { roadmap_trip_new(); }


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

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

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

LLVM IR (-O2):
define void @roadmap_start_create_trip() {
%1 = tail call i32 (...) @roadmap_trip_new()
ret void
}
/* Variables and functions */
int createSemAux(int);
int createSem() { return createSemAux(1); }


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

x86 assembly (clang, -O2):
<createSem>:
mov    $0x1,%edi
jmp    1030 <createSemAux@plt>

LLVM IR (-O0):
define i32 @createSem() {
%1 = call i32 @createSemAux(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @createSem() {
%1 = tail call i32 @createSemAux(i32 1)
ret i32 %1
}
void glClearStencil(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glClearStencil() {
ret void
}
int roi_set_query_list_response(char buff, unsigned char numb,
                                unsigned char packet_id_list[]) {
  return 2 + numb;
}


x86 assembly (clang, -O0):
<roi_set_query_list_response>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x2(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_set_query_list_response>:
lea    0x2(%rsi),%eax
ret

LLVM IR (-O0):
define i32 @roi_set_query_list_response(i8 signext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
%9 = add nsw i32 2, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @roi_set_query_list_response(i8 signext %0, i8 zeroext %1, i8* nocapture readnone %2) {
%4 = zext i8 %1 to i32
%5 = add nuw nsw i32 %4, 2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void nlThreadYield(void) { (void)sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @nlThreadYield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ __NR_lseek;
long syscall_3(int /*<<< orphan*/, long, int /*<<< orphan*/,
               int /*<<< orphan*/);
long ftell(FILE *fp) {
  long int ret = syscall_3(__NR_lseek, (long int)fp, 0, SEEK_CUR);
  return ret;
}


x86 assembly (clang, -O0):
<ftell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2eb8(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
call   1030 <syscall_3@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftell>:
mov    %rdi,%rsi
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
jmp    1030 <syscall_3@plt>

LLVM IR (-O0):
@__NR_lseek = global i32 0
@SEEK_CUR = global i32 0
define i64 @ftell(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32, i32* @__NR_lseek
%5 = load i32*, i32** %2
%6 = ptrtoint i32* %5 to i64
%7 = load i32, i32* @SEEK_CUR
%8 = call i64 @syscall_3(i32 %4, i64 %6, i32 0, i32 %7)
store i64 %8, i64* %3
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
@__NR_lseek = global i32 0
@SEEK_CUR = global i32 0
define i64 @ftell(i32* %0) {
%2 = load i32, i32* @__NR_lseek
%3 = ptrtoint i32* %0 to i64
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i64 @syscall_3(i32 %2, i64 %3, i32 0, i32 %4)
ret i64 %5
}
int test_imm_75uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x75 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_75uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x75,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_75uint64_lowword_reg>:
test   $0x75,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_75uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 117
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_75uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 117
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void rvyyfree(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<rvyyfree>:
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):
<rvyyfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @rvyyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addstr(char const *const);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ refresh();
int strlen(char const *const);
void DrawMessage(const char *const Message) {
  move(24 / 2, (80 - strlen(Message)) / 2);
  addstr(Message);
  refresh();
}


x86 assembly (clang, -O0):
<DrawMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0x50,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0xc,%edi
call   1060 <move@plt>
mov    -0x8(%rbp),%rdi
call   1050 <addstr@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawMessage>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    $0x50,%ecx
sub    %eax,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
mov    $0xc,%edi
call   1060 <move@plt>
mov    %rbx,%rdi
call   1050 <addstr@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
define void @DrawMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = sub nsw i32 80, %4
%6 = sdiv i32 %5, 2
%7 = call i32 @move(i32 12, i32 %6)
%8 = load i8*, i8** %2
%9 = call i32 @addstr(i8* %8)
%10 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @DrawMessage(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sub nsw i32 80, %2
%4 = sdiv i32 %3, 2
%5 = tail call i32 @move(i32 12, i32 %4)
%6 = tail call i32 @addstr(i8* %0)
%7 = tail call i32 (...) @refresh()
ret void
}
int main(int argc, const char *argv[]) {
  double a[10];
  int b = a[0];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvttsd2si -0x60(%rbp),%eax
mov    %eax,-0x64(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x double]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 0
%9 = load double, double* %8
%10 = fptosi double %9 to i32
store i32 %10, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ss;
typedef int socklen_t;

/* Variables and functions */
int sane_accept(int, struct sockaddr *, int *);
int zinet_accept(int fd) {
  struct sockaddr_storage ss;
  socklen_t ss_len = sizeof(ss);
  return (sane_accept(fd, (struct sockaddr *)&ss, &ss_len));
}


x86 assembly (clang, -O0):
<zinet_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sane_accept@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zinet_accept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <sane_accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @zinet_accept(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_storage
%4 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %4
%5 = load i32, i32* %2
%6 = bitcast %struct.sockaddr_storage* %3 to %struct.sockaddr*
%7 = call i32 @sane_accept(i32 %5, %struct.sockaddr* %6, i32* %4)
ret i32 %7
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @zinet_accept(i32 %0) {
%2 = alloca %struct.sockaddr_storage
%3 = alloca i32
%4 = bitcast %struct.sockaddr_storage* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_storage* %2 to %struct.sockaddr*
%7 = call i32 @sane_accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ flags_rebuild();
void cpu_386_flags_rebuild() { flags_rebuild(); }


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

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

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

LLVM IR (-O2):
define void @cpu_386_flags_rebuild() {
%1 = tail call i32 (...) @flags_rebuild()
ret void
}
double MtoMM(double M) { return M * 1000; }


x86 assembly (clang, -O0):
<MtoMM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MtoMM>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MtoMM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+03
ret double %4
}

LLVM IR (-O2):
define double @MtoMM(double %0) {
%2 = fmul double %0, 1.000000e+03
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL_RES;
typedef int /*<<< orphan*/ MYSQL_FIELD;

/* Variables and functions */
int /*<<< orphan*/ *mysql_fetch_fields(int /*<<< orphan*/ *);
MYSQL_FIELD *MysqlGetFields(MYSQL_RES *sqlResult) {
  if (sqlResult == NULL)
    return 0;
  return mysql_fetch_fields(sqlResult);
}


x86 assembly (clang, -O0):
<MysqlGetFields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <MysqlGetFields+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <MysqlGetFields+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <mysql_fetch_fields@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MysqlGetFields>:
test   %rdi,%rdi
je     111a <MysqlGetFields+0xa>
jmp    1030 <mysql_fetch_fields@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32* @MysqlGetFields(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32* null, i32** %2
br label %10
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = call i32* @mysql_fetch_fields(i32* %8)
store i32* %9, i32** %2
br label %10
10: ; preds = %7, %6
%11 = load i32*, i32** %2
ret i32* %11
}

LLVM IR (-O2):
define i32* @MysqlGetFields(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32* @mysql_fetch_fields(i32* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32* [ %4, %3 ], [ null, %1 ]
ret i32* %6
}
void bitmap_translate(unsigned bitno, unsigned *ix, unsigned *mask) {
  unsigned offset;
  *ix = bitno / 32;
  offset = bitno % 32;
  *mask = ((unsigned)1) << offset;
}


x86 assembly (clang, -O0):
<bitmap_translate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x5,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_translate>:
mov    %edi,%ecx
mov    %edi,%eax
shr    $0x5,%eax
mov    %eax,(%rsi)
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @bitmap_translate(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = udiv i32 %8, 32
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = urem i32 %11, 32
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = shl i32 1, %13
%15 = load i32*, i32** %6
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @bitmap_translate(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = lshr i32 %0, 5
store i32 %4, i32* %1
%5 = and i32 %0, 31
%6 = shl nuw i32 1, %5
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int syscall(int, int, int);
int dup2(int old, int new) { return syscall(63, old, new); }


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

x86 assembly (clang, -O2):
<dup2>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x3f,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @dup2(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 63, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ isnan(float);
int __ocl_islessgreater_float(float src1, float src2) {
  return isnan(src1) || isnan(src2) ? 0 : (src1 < src2) || (src1 > src2);
}


x86 assembly (clang, -O0):
<__ocl_islessgreater_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    114a <__ocl_islessgreater_float+0x3a>
movss  -0x8(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     1154 <__ocl_islessgreater_float+0x44>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1186 <__ocl_islessgreater_float+0x76>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
mov    $0x1,%al
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
ja     117b <__ocl_islessgreater_float+0x6b>
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_islessgreater_float>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    114d <__ocl_islessgreater_float+0x3d>
movss  0x8(%rsp),%xmm0
call   1030 <isnan@plt>
test   %rax,%rax
jne    114d <__ocl_islessgreater_float+0x3d>
xor    %ebx,%ebx
movss  0xc(%rsp),%xmm0
ucomiss 0x8(%rsp),%xmm0
setne  %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__ocl_islessgreater_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load float, float* %4
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8, %2
br label %24
13: ; preds = %8
%14 = load float, float* %3
%15 = load float, float* %4
%16 = fcmp olt float %14, %15
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load float, float* %3
%19 = load float, float* %4
%20 = fcmp ogt float %18, %19
br label %21
21: ; preds = %17, %13
%22 = phi i1 [ true, %13 ], [ %20, %17 ]
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %21, %12
%25 = phi i32 [ 0, %12 ], [ %23, %21 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @__ocl_islessgreater_float(float %0, float %1) {
%3 = tail call i64 @isnan(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @isnan(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp one float %0, %1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %5, %8
%12 = phi i32 [ %10, %8 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %12
}
void _ipa_write_dbg_cnt_v2_0(int option) {}


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

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

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

LLVM IR (-O2):
define void @_ipa_write_dbg_cnt_v2_0(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(const char *cmd) {
  printf("Usage: %s device TABLE { COMMAND | help }\n", cmd);
  printf("where  TABLE := { ftable | slaves | remote| paths }\n");
  printf("       COMMAND := { list }\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: %s device TABLE { COMMAND | help }\0A\00"
@.str.1 = [53 x i8] c"where TABLE := { ftable | slaves | remote| paths }\0A\00"
@.str.2 = [28 x i8] c" COMMAND := { list }\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Usage: %s device TABLE { COMMAND | help }\0A\00"
@str = [52 x i8] c"where TABLE := { ftable | slaves | remote| paths }\00"
@str.3 = [27 x i8] c" COMMAND := { list }\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
ret void
}
int _braille_unregister_console(struct console *console) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.console = type opaque
define i32 @_braille_unregister_console(%struct.console* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *lambda_create_identifier(char *str) {
  char *id = (char *)malloc((sizeof(char) * strlen(str)) + 1);
  strcpy(id, str);
  return (id);
}


x86 assembly (clang, -O0):
<lambda_create_identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lambda_create_identifier>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @lambda_create_identifier(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = add i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @lambda_create_identifier(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int socket(int, int, int);
int Socket(int family, int type, int flags) {
  int sockfd;
  if ((sockfd = socket(family, type, flags)) < 0) {
    perror("socket");
    exit(1);
  } else
    return sockfd;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1171 <Socket+0x41>
lea    0xe9e(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rax
call   1050 <socket@plt>
test   %eax,%eax
js     113c <Socket+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"socket\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
void cprop_result4(int *data) {
  if (data[0])
    data[1] = 11112;
  else
    data[2] = -12212;
}


x86 assembly (clang, -O0):
<cprop_result4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1125 <cprop_result4+0x25>
mov    -0x8(%rbp),%rax
movl   $0x2b68,0x4(%rax)
jmp    1130 <cprop_result4+0x30>
mov    -0x8(%rbp),%rax
movl   $0xffffd04c,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result4>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
mov    $0xffffd04c,%ecx
mov    $0x2b68,%edx
cmove  %ecx,%edx
mov    %edx,0x4(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @cprop_result4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 11112, i32* %9
br label %13
10: ; preds = %1
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 2
store i32 -12212, i32* %12
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @cprop_result4(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 -12212, i32 11112
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int main() {
  while (1)
    pause();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pause@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pause@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @pause()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @pause()
br label %1
}
int sm_request(const char *title, const char *text, const char *gadgets, ...) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sm_request(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, ...) {
ret i32 0
}
/* Variables and functions */
int __ctype_iscntrl(int);
int iscntrl(int c) { return __ctype_iscntrl(c); }


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

x86 assembly (clang, -O2):
<iscntrl>:
jmp    1030 <__ctype_iscntrl@plt>

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = tail call i32 @__ctype_iscntrl(i32 %0)
ret i32 %2
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int fclose(int /*<<< orphan*/);
int my_fclose(struct aFILE *fp) { return fclose(_get_actual_fp(fp)); }


x86 assembly (clang, -O0):
<my_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fclose>:
push   %rax
call   1040 <_get_actual_fp@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <fclose@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_fclose(%struct.aFILE* %0) {
%2 = alloca %struct.aFILE*
store %struct.aFILE* %0, %struct.aFILE** %2
%3 = load %struct.aFILE*, %struct.aFILE** %2
%4 = call i32 @_get_actual_fp(%struct.aFILE* %3)
%5 = call i32 @fclose(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_fclose(%struct.aFILE* %0) {
%2 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%3 = tail call i32 @fclose(i32 %2)
ret i32 %3
}
int do_742() { return 742; }


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

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

LLVM IR (-O0):
define i32 @do_742() {
ret i32 742
}

LLVM IR (-O2):
define i32 @do_742() {
ret i32 742
}
/* Type definitions */
typedef int gid_t;

/* Variables and functions */
int getgid();
int test(void) {
  gid_t gid;
  gid = getgid();
  return gid;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getgid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = call i32 (...) @getgid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @getgid()
ret i32 %1
}