xunge/DecIR huggingface dataset:
int __attribute__((no, used)) foo(long double ld) {
  return ld == __builtin_infl();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (x86_fp80)* @foo to i8*)], section "llvm.metadata"
define i32 @foo(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp oeq x86_fp80 %3, 0xK7FFF8000000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (x86_fp80)* @foo to i8*)], section "llvm.metadata"
define i32 @foo(x86_fp80 %0) {
%2 = fcmp oeq x86_fp80 %0, 0xK7FFF8000000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
int fun1017() { return 1017; }


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

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

LLVM IR (-O0):
define i32 @fun1017() {
ret i32 1017
}

LLVM IR (-O2):
define i32 @fun1017() {
ret i32 1017
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int fwrite(void *, int, unsigned int, int /*<<< orphan*/ *);
int /*<<< orphan*/ myexit();
int /*<<< orphan*/ printf(char *);
void myfw(FILE *fd, void *data, unsigned size) {
  if (fwrite(data, 1, size, fd) == size)
    return;
  printf("\nError: problems during the writing of the output file\n");
  myexit();
}


x86 assembly (clang, -O0):
<myfw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
call   1050 <fwrite@plt>
cmp    -0x14(%rbp),%eax
jne    1166 <myfw+0x36>
jmp    1179 <myfw+0x49>
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <myexit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfw>:
push   %rbx
mov    %edx,%ebx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
call   1050 <fwrite@plt>
cmp    %ebx,%eax
jne    1149 <myfw+0x19>
pop    %rbx
ret
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <myexit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"\0AError: problems during the writing of the output file\0A\00"
define void @myfw(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32*, i32** %4
%10 = call i32 @fwrite(i8* %7, i32 1, i32 %8, i32* %9)
%11 = load i32, i32* %6
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %3
br label %17
14: ; preds = %3
%15 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (...) @myexit()
br label %17
17: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"\0AError: problems during the writing of the output file\00"
define void @myfw(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i32* %0)
%5 = icmp eq i32 %4, %2
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (...) @myexit()
br label %9
9: ; preds = %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ugl_AddBytecode(int);
int ugl_GetLabel(char const *);
int /*<<< orphan*/ ugl_plog(char *, char const *, int);
void ugl_bytecode_branch(const char *s) {
  int idx;
  idx = ugl_GetLabel(s);
  ugl_plog("BC branch, label %s, idx=%d", s, idx);
  ugl_AddBytecode((0x03) | ((idx & 0x0f00) >> 4));
  ugl_AddBytecode(idx & 0xff);
}


x86 assembly (clang, -O0):
<ugl_bytecode_branch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <ugl_GetLabel@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xeaa(%rip),%rdi
call   1040 <ugl_plog@plt>
mov    -0xc(%rbp),%edi
and    $0xf00,%edi
sar    $0x4,%edi
or     $0x3,%edi
call   1030 <ugl_AddBytecode@plt>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
call   1030 <ugl_AddBytecode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ugl_bytecode_branch>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <ugl_GetLabel@plt>
mov    %eax,%ebp
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <ugl_plog@plt>
mov    %ebp,%edi
shr    $0x4,%edi
and    $0xf0,%edi
or     $0x3,%edi
call   1030 <ugl_AddBytecode@plt>
movzbl %bpl,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ugl_AddBytecode@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"BC branch, label %s, idx=%d\00"
define void @ugl_bytecode_branch(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @ugl_GetLabel(i8* %4)
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = call i32 @ugl_plog(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = load i32, i32* %3
%10 = and i32 %9, 3840
%11 = ashr i32 %10, 4
%12 = or i32 3, %11
%13 = call i32 @ugl_AddBytecode(i32 %12)
%14 = load i32, i32* %3
%15 = and i32 %14, 255
%16 = call i32 @ugl_AddBytecode(i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"BC branch, label %s, idx=%d\00"
define void @ugl_bytecode_branch(i8* %0) {
%2 = tail call i32 @ugl_GetLabel(i8* %0)
%3 = tail call i32 @ugl_plog(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2)
%4 = lshr i32 %2, 4
%5 = and i32 %4, 240
%6 = or i32 %5, 3
%7 = tail call i32 @ugl_AddBytecode(i32 %6)
%8 = and i32 %2, 255
%9 = tail call i32 @ugl_AddBytecode(i32 %8)
ret void
}
void gdk_region_get_clipbox() {}


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

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

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

LLVM IR (-O2):
define void @gdk_region_get_clipbox() {
ret void
}
int rec(int n) {
  if (n < 2)
    return n;
  else
    return ((rec(n - 1) + rec(n - 2)) % 100);
}


x86 assembly (clang, -O0):
<rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <rec+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <rec+0x4b>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <rec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x1,%edi
jle    114c <rec+0x3c>
lea    -0x1(%rbx),%edi
call   1030 <rec@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <rec@plt>
add    %ebp,%eax
movslq %eax,%rbx
imul   $0x51eb851f,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @rec(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %11, %5 ], [ %0, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @rec(i32 %6)
%8 = add nsw i32 %0, -2
%9 = tail call i32 @rec(i32 %8)
%10 = add nsw i32 %9, %7
%11 = srem i32 %10, 100
br label %3
}
/* Variables and functions */
char toupper(char);
void StrToUpper(char *str) {
  for (unsigned int i = 0; str[i] != '\0'; ++i)
    str[i] = toupper(str[i]);
}


x86 assembly (clang, -O0):
<StrToUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1161 <StrToUpper+0x51>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <StrToUpper+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrToUpper>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     114c <StrToUpper+0x3c>
mov    %rdi,%r14
mov    $0x1,%ebp
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
mov    %ebp,%eax
lea    (%r14,%rax,1),%rbx
movzbl (%r14,%rax,1),%eax
add    $0x1,%ebp
test   %al,%al
jne    1130 <StrToUpper+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @StrToUpper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i8 [ %13, %5 ], [ %2, %1 ]
%7 = phi i8* [ %12, %5 ], [ %0, %1 ]
%8 = phi i32 [ %10, %5 ], [ 0, %1 ]
%9 = tail call signext i8 @toupper(i8 signext %6)
store i8 %9, i8* %7
%10 = add i32 %8, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %4, label %5
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ write(int, char *, int);
void handler(int sig) {
  write(1, "handler called\n", 15);
  _exit(1);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
mov    $0xf,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0xf,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"handler called\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%4 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"handler called\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%3 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void testsection(char name[]) {
  printf("\n\n"
         "TESTING %s\n"
         "====================================================================="
         "=========="
         "\n\n",
         name);
}


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

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

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

LLVM IR (-O2):
@.str = [95 x i8] c"\0A\0ATESTING %s\0A===============================================================================\0A\0A\00"
define void @testsection(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned char inb(unsigned short int port) {
  unsigned char value;
  __asm__ volatile("inb %1, %0;" : "=a"(value) : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1, $0;", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0;", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
void x2(void) {}


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

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

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

LLVM IR (-O2):
define void @x2() {
ret void
}
/* Variables and functions */
int cfg_processor_get_int_attr(void *, char *);
int cfg_timer_a_get_reg_id(void *reg) {
  return cfg_processor_get_int_attr(reg, "id");
}


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

x86 assembly (clang, -O2):
<cfg_timer_a_get_reg_id>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_int_attr@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"id\00"
define i32 @cfg_timer_a_get_reg_id(i8* %0) {
%2 = tail call i32 @cfg_processor_get_int_attr(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int whichSetTest() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @whichSetTest() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ u_int32_t;

/* Variables and functions */
int chash_sort32(const void *element1, const void *element2) {
  return (*(u_int32_t *)element1 > *(u_int32_t *)element2) ? 1 : -1;
}


x86 assembly (clang, -O0):
<chash_sort32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0xffffffff,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chash_sort32>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @chash_sort32(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp sgt i64 %7, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 -1
ret i32 %13
}

LLVM IR (-O2):
define i32 @chash_sort32(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = select i1 %7, i32 1, i32 -1
ret i32 %8
}
void outb(unsigned char value, unsigned short port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0,%"
                       "w"
                       "1"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
void glBindTexture(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glBindTexture() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_bool();
float __VERIFIER_nondet_float();
int __VERIFIER_nondet_int();
int __VERIFIER_nondet_int8_t();
long __VERIFIER_nondet_long();
void *__VERIFIER_nondet_pointer();
int nondet_int();
int main() {
  int a = __VERIFIER_nondet_int();
  bool b = __VERIFIER_nondet_bool();
  void *pointer = __VERIFIER_nondet_pointer();
  int c = __VERIFIER_nondet_int8_t();
  long d = __VERIFIER_nondet_long();
  float e = __VERIFIER_nondet_float();
  int f = nondet_int();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x0,%al
call   1070 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <__VERIFIER_nondet_bool@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <__VERIFIER_nondet_pointer@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int8_t@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_long@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1090 <__VERIFIER_nondet_float@plt>
movss  %xmm0,-0x24(%rbp)
mov    $0x0,%al
call   1040 <nondet_int@plt>
mov    %eax,-0x28(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1060 <__VERIFIER_nondet_bool@plt>
xor    %eax,%eax
call   1080 <__VERIFIER_nondet_pointer@plt>
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int8_t@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_long@plt>
xor    %eax,%eax
call   1090 <__VERIFIER_nondet_float@plt>
xor    %eax,%eax
call   1040 <nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca i32
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %1
%9 = call i32 (...) @__VERIFIER_nondet_bool()
store i32 %9, i32* %2
%10 = call i8* (...) @__VERIFIER_nondet_pointer()
store i8* %10, i8** %3
%11 = call i32 (...) @__VERIFIER_nondet_int8_t()
store i32 %11, i32* %4
%12 = call i64 (...) @__VERIFIER_nondet_long()
store i64 %12, i64* %5
%13 = call float (...) @__VERIFIER_nondet_float()
store float %13, float* %6
%14 = call i32 (...) @nondet_int()
store i32 %14, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_bool()
%3 = tail call i8* (...) @__VERIFIER_nondet_pointer()
%4 = tail call i32 (...) @__VERIFIER_nondet_int8_t()
%5 = tail call i64 (...) @__VERIFIER_nondet_long()
%6 = tail call float (...) @__VERIFIER_nondet_float()
%7 = tail call i32 (...) @nondet_int()
ret i32 0
}
/* Variables and functions */
char *ipregex(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char ip[16];
  strcpy(ip, "255.2XX.XX.X1X");
  printf("%s\n", ipregex(ip));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
call   1050 <ipregex@plt>
mov    %rax,%rsi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <ipregex@plt>
lea    0xeb9(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"255.2XX.XX.X1X\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [16 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%10 = call i8* @ipregex(i8* %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"255.2XX.XX.X1X\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i8* @ipregex(i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}
long long power(long long a, long long b) {
  long long i;
  long long r = 1;
  for (i = 0; i < b; ++i) {
    r = r * a;
  }
  return r;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1148 <power+0x48>
mov    -0x20(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111c <power+0x1c>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %rsi,%rsi
jle    111b <power+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <power+0x21>
mov    $0x1,%eax
jmp    1156 <power+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <power+0x30>
test   %rcx,%rcx
je     116a <power+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <power+0x60>
ret

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

LLVM IR (-O2):
define i64 @power(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 1, %8 ], [ %20, %10 ]
%12 = phi i64 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i64 %11, %0
%14 = mul nsw i64 %13, %0
%15 = mul nsw i64 %14, %0
%16 = mul nsw i64 %15, %0
%17 = mul nsw i64 %16, %0
%18 = mul nsw i64 %17, %0
%19 = mul nsw i64 %18, %0
%20 = mul nsw i64 %19, %0
%21 = add i64 %12, 8
%22 = icmp eq i64 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i64 [ undef, %4 ], [ %20, %10 ]
%25 = phi i64 [ 1, %4 ], [ %20, %10 ]
%26 = icmp eq i64 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i64 [ %30, %27 ], [ %25, %23 ]
%29 = phi i64 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i64 %28, %0
%31 = add i64 %29, 1
%32 = icmp eq i64 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i64 [ 1, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i64 %34
}
double opTimes(double lhs, double rhs) { return lhs * rhs; }


x86 assembly (clang, -O0):
<opTimes>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<opTimes>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @opTimes(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @opTimes(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
void *realloc(void *, size_t);
void *recalloc(void *ptr, size_t nmemb, size_t size) {
  return realloc(ptr, nmemb * size);
}


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

x86 assembly (clang, -O2):
<recalloc>:
imul   %rdx,%rsi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @recalloc(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = mul i64 %8, %9
%11 = call i8* @realloc(i8* %7, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @recalloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = mul i64 %2, %1
%5 = tail call i8* @realloc(i8* %0, i64 %4)
ret i8* %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_copy_to_dobldobl_container(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(314, &k, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<syspool_copy_to_dobldobl_container>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x13a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @syspool_copy_to_dobldobl_container(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 314, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int ppp_stat();
int /*<<< orphan*/ sleep(int);
main() {
  while ((ppp_stat() & 1) != 1)
    sleep(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ppp_stat@plt>
and    $0x1,%eax
cmp    $0x1,%eax
je     1151 <main+0x31>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <ppp_stat@plt>
test   $0x1,%al
jne    1147 <main+0x27>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @ppp_stat()
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = call i32 @sleep(i32 1)
br label %2
8: ; preds = %2
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ppp_stat()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 (...) @ppp_stat()
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret i32 0
}
unsigned int r2h_bits(int cmd) {
  unsigned int mask = (((cmd) > 0) ? (1 << ((cmd)-1)) : 0);
  if (cmd == 13)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0) |
             (((16) > 0) ? (1 << ((16) - 1)) : 0));
  else if (cmd == 4)
    mask |= ((((14) > 0) ? (1 << ((14) - 1)) : 0) |
             (((15) > 0) ? (1 << ((15) - 1)) : 0) |
             (((13) > 0) ? (1 << ((13) - 1)) : 0));
  return (mask |= (((32) > 0) ? (1 << ((32) - 1)) : 0));
}


x86 assembly (clang, -O0):
<r2h_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1126 <r2h_bits+0x26>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <r2h_bits+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xd,-0x4(%rbp)
jne    1150 <r2h_bits+0x50>
mov    -0x8(%rbp),%eax
or     $0xe000,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
cmpl   $0x4,-0x4(%rbp)
jne    1165 <r2h_bits+0x65>
mov    -0x8(%rbp),%eax
or     $0x7000,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <r2h_bits+0x6a>
mov    -0x8(%rbp),%eax
or     $0x80000000,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<r2h_bits>:
lea    -0x1(%rdi),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
test   %edi,%edi
cmovg  %edx,%eax
cmp    $0x4,%edi
je     1126 <r2h_bits+0x26>
cmp    $0xd,%edi
jne    112b <r2h_bits+0x2b>
or     $0xe000,%eax
or     $0x80000000,%eax
ret
or     $0x7000,%eax
or     $0x80000000,%eax
ret

LLVM IR (-O0):
define i32 @r2h_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = shl i32 1, %8
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %6
%12 = phi i32 [ %9, %6 ], [ 0, %10 ]
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %3
%17 = or i32 %16, 57344
store i32 %17, i32* %3
br label %25
18: ; preds = %11
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 4
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %3
%23 = or i32 %22, 28672
store i32 %23, i32* %3
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %15
%26 = load i32, i32* %3
%27 = or i32 %26, -2147483648
store i32 %27, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @r2h_bits(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = add nsw i32 %0, -1
%4 = shl nuw i32 1, %3
%5 = select i1 %2, i32 %4, i32 0
switch i32 %0, label %10 [
i32 13, label %6
i32 4, label %8
]
6: ; preds = %1
%7 = or i32 %5, 57344
br label %10
8: ; preds = %1
%9 = or i32 %5, 28672
br label %10
10: ; preds = %1, %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ], [ %5, %1 ]
%12 = or i32 %11, -2147483648
ret i32 %12
}
int fun1325() { return 1325; }


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

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

LLVM IR (-O0):
define i32 @fun1325() {
ret i32 1325
}

LLVM IR (-O2):
define i32 @fun1325() {
ret i32 1325
}
void Fgrend() {}


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

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

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

LLVM IR (-O2):
define void @Fgrend() {
ret void
}
int UpdatePredictedSample(int PredictedSample, int EncodedSample,
                          int Difference) {
  if (EncodedSample & 0x40) {
    PredictedSample -= Difference;
    if (PredictedSample <= -32768)
      PredictedSample = -32768;
  } else {
    PredictedSample += Difference;
    if (PredictedSample >= 32767)
      PredictedSample = 32767;
  }
  return PredictedSample;
}


x86 assembly (clang, -O0):
<UpdatePredictedSample>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1140 <UpdatePredictedSample+0x40>
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xffff8000,-0x4(%rbp)
jg     113b <UpdatePredictedSample+0x3b>
movl   $0xffff8000,-0x4(%rbp)
jmp    1162 <UpdatePredictedSample+0x62>
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x7fff,-0x4(%rbp)
jl     115d <UpdatePredictedSample+0x5d>
movl   $0x7fff,-0x4(%rbp)
jmp    1162 <UpdatePredictedSample+0x62>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpdatePredictedSample>:
test   $0x40,%sil
jne    1117 <UpdatePredictedSample+0x17>
add    %edi,%edx
cmp    $0x7fff,%edx
mov    $0x7fff,%eax
cmovl  %edx,%eax
ret
sub    %edx,%edi
cmp    $0xffff8001,%edi
mov    $0xffff8000,%eax
cmovge %edi,%eax
ret

LLVM IR (-O0):
define i32 @UpdatePredictedSample(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 64
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, %11
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, -32768
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 -32768, i32* %4
br label %17
17: ; preds = %16, %10
br label %26
18: ; preds = %3
%19 = load i32, i32* %6
%20 = load i32, i32* %4
%21 = add nsw i32 %20, %19
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = icmp sge i32 %22, 32767
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 32767, i32* %4
br label %25
25: ; preds = %24, %18
br label %26
26: ; preds = %25, %17
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @UpdatePredictedSample(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = sub nsw i32 %0, %2
%8 = icmp sgt i32 %7, -32768
%9 = select i1 %8, i32 %7, i32 -32768
br label %14
10: ; preds = %3
%11 = add nsw i32 %2, %0
%12 = icmp slt i32 %11, 32767
%13 = select i1 %12, i32 %11, i32 32767
br label %14
14: ; preds = %10, %6
%15 = phi i32 [ %9, %6 ], [ %13, %10 ]
ret i32 %15
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_bus_slot_set_userdata(void *slot, void *userdata) {
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @sd_bus_slot_set_userdata(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @sd_bus_slot_set_userdata(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    _throw_badalloc();
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1154 <_check_times+0x44>
mov    $0x0,%al
call   1030 <_throw_badalloc@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1128 <_check_times+0x18>
xor    %eax,%eax
call   1030 <_throw_badalloc@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (...) @_throw_badalloc()
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (...) @_throw_badalloc()
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ *sysfs__mountpoint();
bool sysfs__configured(void) { return sysfs__mountpoint() != NULL; }


x86 assembly (clang, -O0):
<sysfs__configured>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <sysfs__mountpoint@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs__configured>:
push   %rax
xor    %eax,%eax
call   1030 <sysfs__mountpoint@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sysfs__configured() {
%1 = call i32* (...) @sysfs__mountpoint()
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @sysfs__configured() {
%1 = tail call i32* (...) @sysfs__mountpoint()
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
const char *null_arg(void *arg) {
  if (arg == NULL) {
    return "null";
  } else {
    return "non-null";
  }
}


x86 assembly (clang, -O0):
<null_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <null_arg+0x23>
lea    0xeea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <null_arg+0x2e>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_arg>:
test   %rdi,%rdi
lea    0xefa(%rip),%rcx
lea    0xeef(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"null\00"
@.str.1 = [9 x i8] c"non-null\00"
define i8* @null_arg(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"null\00"
@.str.1 = [9 x i8] c"non-null\00"
define i8* @null_arg(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _date_error(char const *message, int ret) {
  fputs("date"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_date_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_date_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"date: \00"
@stderr = global i32 0
define i32 @_date_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"date: \00"
@stderr = global i32 0
define i32 @_date_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
int tsplit() {}


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

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

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

LLVM IR (-O2):
define i32 @tsplit() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ utest_control();
void utest_adts_graph(void) {
  utest_control();
  return;
}


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

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

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

LLVM IR (-O2):
define void @utest_adts_graph() {
%1 = tail call i32 (...) @utest_control()
ret void
}
/* Type definitions */
typedef long double int32_t;

/* Variables and functions */
__attribute__((noipa)) long double long_double_from_i32(int32_t x) { return x; }


x86 assembly (clang, -O0):
<long_double_from_i32>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_double_from_i32>:
fldt   0x8(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @long_double_from_i32(x86_fp80 returned %0) {
ret x86_fp80 %0
}
int diffE(char letter) {
  int i = 0;
  int count = 0;
  for (i = letter; i != 101; i++) {
    if (i == 122) {
      i = 97;
      count++;
    }
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<diffE>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
je     115a <diffE+0x5a>
cmpl   $0x7a,-0x8(%rbp)
jne    1143 <diffE+0x43>
movl   $0x61,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <diffE+0x1f>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diffE>:
xor    %eax,%eax
jmp    111e <diffE+0x1e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
mov    $0x61,%edi
add    $0x1,%eax
add    $0x1,%edi
cmp    $0x7a,%edi
je     1110 <diffE+0x10>
cmp    $0x65,%edi
jne    1118 <diffE+0x18>
ret

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

LLVM IR (-O2):
define i32 @diffE(i8 signext %0) {
%2 = sext i8 %0 to i32
br label %3
3: ; preds = %8, %1
%4 = phi i32 [ %2, %1 ], [ %12, %8 ]
%5 = phi i32 [ 0, %1 ], [ %11, %8 ]
switch i32 %4, label %8 [
i32 101, label %13
i32 122, label %6
]
6: ; preds = %3
%7 = add nsw i32 %5, 1
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ 97, %6 ], [ %4, %3 ]
%10 = phi i32 [ %7, %6 ], [ %5, %3 ]
%11 = add nsw i32 %10, 1
%12 = add nsw i32 %9, 1
br label %3
13: ; preds = %3
ret i32 %5
}
int test_indexed(int index_5) { return index_5; }


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

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

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

LLVM IR (-O2):
define i32 @test_indexed(i32 returned %0) {
ret i32 %0
}