xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isreach_king(int, int);
scalar_t__ isreach_rook(int, int);
int isreach_dragon(int dx, int dy) {
  return isreach_rook(dx, dy) || isreach_king(dx, dy);
}


x86 assembly (clang, -O0):
<isreach_dragon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <isreach_rook@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1160 <isreach_dragon+0x40>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <isreach_king@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isreach_dragon>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <isreach_rook@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    114d <isreach_dragon+0x2d>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <isreach_king@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isreach_dragon(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 i64 @isreach_rook(i32 %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i64 @isreach_king(i32 %10, i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isreach_dragon(i32 %0, i32 %1) {
%3 = tail call i64 @isreach_rook(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isreach_king(i32 %0, i32 %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 1, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int __builtin_arm_crc32d(int, long);
int crc32d(int a, long b) { return __builtin_arm_crc32d(a, b); }


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

x86 assembly (clang, -O2):
<crc32d>:
jmp    1030 <__builtin_arm_crc32d@plt>

LLVM IR (-O0):
define i32 @crc32d(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = call i32 @__builtin_arm_crc32d(i32 %5, i64 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @crc32d(i32 %0, i64 %1) {
%3 = tail call i32 @__builtin_arm_crc32d(i32 %0, i64 %1)
ret i32 %3
}
const char *get_shortmsg_from_status_code(int status_code) {
  if (status_code = 200) {
    return "OK";
  }
  if (status_code = 304) {
    return "Not Modified";
  }
  if (status_code = 404) {
    return "Not Found";
  }
  return "Unknown";
}


x86 assembly (clang, -O0):
<get_shortmsg_from_status_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
movl   $0xc8,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    111d <get_shortmsg_from_status_code+0x1d>
jmp    112d <get_shortmsg_from_status_code+0x2d>
lea    0xedc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <get_shortmsg_from_status_code+0x84>
movl   $0x130,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1143 <get_shortmsg_from_status_code+0x43>
jmp    1153 <get_shortmsg_from_status_code+0x53>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <get_shortmsg_from_status_code+0x84>
movl   $0x194,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1169 <get_shortmsg_from_status_code+0x69>
jmp    1179 <get_shortmsg_from_status_code+0x79>
lea    0xea0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <get_shortmsg_from_status_code+0x84>
lea    0xe9a(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shortmsg_from_status_code>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [13 x i8] c"Not Modified\00"
@.str.2 = [10 x i8] c"Not Found\00"
@.str.3 = [8 x i8] c"Unknown\00"
define i8* @get_shortmsg_from_status_code(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
store i32 200, i32* %3
br i1 true, label %4, label %5
4: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
5: ; preds = %1
store i32 304, i32* %3
br i1 true, label %6, label %7
6: ; preds = %5
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %5
store i32 404, i32* %3
br i1 true, label %8, label %9
8: ; preds = %7
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %7
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %6, %4
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
define i8* @get_shortmsg_from_status_code(i32 %0) {
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}
double rad_to_degree(double r) { return r * 180 / 3.14159265358979; }


x86 assembly (clang, -O0):
<rad_to_degree>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @rad_to_degree(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D11
ret double %5
}

LLVM IR (-O2):
define double @rad_to_degree(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB54442D11
ret double %3
}
char *tmp_name() { return "/tmp/mkc-onk.c"; }


x86 assembly (clang, -O0):
<tmp_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmp_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/tmp/mkc-onk.c\00"
define i8* @tmp_name() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"/tmp/mkc-onk.c\00"
define i8* @tmp_name() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
void *thread_routine1(void *arg) {
  fprintf(stdout, "Thread1: hello world!\n");
  sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_routine1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_routine1>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [23 x i8] c"Thread1: hello world!\0A\00"
define i8* @thread_routine1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @sleep(i32 1)
ret i8* null
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [23 x i8] c"Thread1: hello world!\0A\00"
define noalias i8* @thread_routine1(i8* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 1)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void delay_us(unsigned int tempo) {
  for (int cont = 0; cont < tempo; cont++)
    usleep(1);
}


x86 assembly (clang, -O0):
<delay_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1146 <delay_us+0x36>
mov    $0x1,%edi
call   1030 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <delay_us+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_us>:
push   %rbx
test   %edi,%edi
je     112f <delay_us+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
jne    1120 <delay_us+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay_us(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @usleep(i32 1)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @delay_us(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @usleep(i32 1)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ lflush();
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int ttgetch(void) {
  char byt;
  lflush();
  read(0, &byt, 1);
  return (byt);
}


x86 assembly (clang, -O0):
<ttgetch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <lflush@plt>
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttgetch>:
push   %rax
xor    %eax,%eax
call   1040 <lflush@plt>
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ttgetch() {
%1 = alloca i8
%2 = call i32 (...) @lflush()
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ttgetch() {
%1 = alloca i8
%2 = tail call i32 (...) @lflush()
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
ret i32 %5
}
float power(float x, int y) {
  int i;
  float tot = 1.0F;
  for (i = 0; i < y; i++)
    tot = tot * x;
  return (tot);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  0xeec(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1149 <power+0x49>
movss  -0x10(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <power+0x20>
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %edi,%edi
jle    111b <power+0x1b>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1124 <power+0x24>
movss  0xee7(%rip),%xmm1
jmp    1155 <power+0x55>
movss  0xedd(%rip),%xmm0
ret
and    $0xfffffff8,%edi
movss  0xed1(%rip),%xmm1
nop
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
add    $0xfffffff8,%edi
jne    1130 <power+0x30>
test   %eax,%eax
je     1169 <power+0x69>
nopl   0x0(%rax)
mulss  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1160 <power+0x60>
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @power(float %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi float [ 1.000000e+00, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = fmul float %11, %0
%14 = fmul float %13, %0
%15 = fmul float %14, %0
%16 = fmul float %15, %0
%17 = fmul float %16, %0
%18 = fmul float %17, %0
%19 = fmul float %18, %0
%20 = fmul float %19, %0
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi float [ undef, %4 ], [ %20, %10 ]
%25 = phi float [ 1.000000e+00, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi float [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = fmul float %28, %0
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi float [ 1.000000e+00, %2 ], [ %24, %23 ], [ %30, %27 ]
ret float %34
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int count_down(int userin1) {
  int loop;
  for (loop = userin1; loop >= 0; loop--) {
    printf("%d ", loop);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<count_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     114a <count_down+0x3a>
mov    -0xc(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <count_down+0x11>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_down>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
js     1151 <count_down+0x31>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jb     1140 <count_down+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @count_down(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %4, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @putchar(i32 10)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_ratelimit_test() {
  printf("NOT IMPLEMENTED:"
         "pa_ratelimit_test"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_ratelimit_test\00"
define i32 @pa_ratelimit_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR96_get(void) { return U_WMRCORENONE_get("U_WMR96"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR96\00"
define i32 @U_WMR96_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR96\00"
define i32 @U_WMR96_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ mutex_lock(int *);
int /*<<< orphan*/ mutex_unlock(int *);
void mutex_relock(int *lock) {
  mutex_unlock(lock);
  mutex_lock(lock);
}


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

x86 assembly (clang, -O2):
<mutex_relock>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mutex_unlock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <mutex_lock@plt>

LLVM IR (-O0):
define void @mutex_relock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mutex_unlock(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @mutex_lock(i32* %5)
ret void
}

LLVM IR (-O2):
define void @mutex_relock(i32* %0) {
%2 = tail call i32 @mutex_unlock(i32* %0)
%3 = tail call i32 @mutex_lock(i32* %0)
ret void
}
/* Type definitions */
struct cdaAli {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cdaCoalesceAll(struct cdaAli *, int);
void cdaCoalesceBlocks(struct cdaAli *ca) { cdaCoalesceAll(ca, 1); }


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

x86 assembly (clang, -O2):
<cdaCoalesceBlocks>:
mov    $0x1,%esi
jmp    1030 <cdaCoalesceAll@plt>

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

LLVM IR (-O2):
%struct.cdaAli = type { i32 }
define void @cdaCoalesceBlocks(%struct.cdaAli* %0) {
%2 = tail call i32 @cdaCoalesceAll(%struct.cdaAli* %0, i32 1)
ret void
}
/* Variables and functions */
int getch();
int get_hand(void) {
  switch (getch()) {
  case '1':
  case 'r':
  case 'R':
  case 'a':
  case 'A':
    return 0;
  case '2':
  case 'l':
  case 'L':
  case 'b':
  case 'B':
    return 1;
  case '0':
  case 'q':
  case 'Q':
  case ' ':
  case 27:
    return -1;
  default:
    return 99;
  }
}


x86 assembly (clang, -O0):
<get_hand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <getch@plt>
add    $0xffffffe5,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x57,%eax
ja     1169 <get_hand+0x59>
mov    -0x10(%rbp),%rax
lea    0xec4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1170 <get_hand+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1170 <get_hand+0x60>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <get_hand+0x60>
movl   $0x63,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hand>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getch@plt>
add    $0xffffffe5,%eax
cmp    $0x57,%eax
ja     1142 <get_hand+0x32>
lea    0xed7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xffffffff,%ebx
jmp    113e <get_hand+0x2e>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret
mov    $0x63,%ebx
jmp    113e <get_hand+0x2e>

LLVM IR (-O0):
define i32 @get_hand() {
%1 = alloca i32
%2 = call i32 (...) @getch()
switch i32 %2, label %6 [
i32 49, label %3
i32 114, label %3
i32 82, label %3
i32 97, label %3
i32 65, label %3
i32 50, label %4
i32 108, label %4
i32 76, label %4
i32 98, label %4
i32 66, label %4
i32 48, label %5
i32 113, label %5
i32 81, label %5
i32 32, label %5
i32 27, label %5
]
3: ; preds = %0, %0, %0, %0, %0
store i32 0, i32* %1
br label %7
4: ; preds = %0, %0, %0, %0, %0
store i32 1, i32* %1
br label %7
5: ; preds = %0, %0, %0, %0, %0
store i32 -1, i32* %1
br label %7
6: ; preds = %0
store i32 99, i32* %1
br label %7
7: ; preds = %6, %5, %4, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_hand() {
%1 = tail call i32 (...) @getch()
switch i32 %1, label %4 [
i32 49, label %5
i32 114, label %5
i32 82, label %5
i32 97, label %5
i32 65, label %5
i32 50, label %2
i32 108, label %2
i32 76, label %2
i32 98, label %2
i32 66, label %2
i32 48, label %3
i32 113, label %3
i32 81, label %3
i32 32, label %3
i32 27, label %3
]
2: ; preds = %0, %0, %0, %0, %0
br label %5
3: ; preds = %0, %0, %0, %0, %0
br label %5
4: ; preds = %0
br label %5
5: ; preds = %0, %0, %0, %0, %0, %4, %3, %2
%6 = phi i32 [ 99, %4 ], [ -1, %3 ], [ 1, %2 ], [ 0, %0 ], [ 0, %0 ], [ 0, %0 ], [ 0, %0 ], [ 0, %0 ]
ret i32 %6
}
int erdIsCap(char c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<erdIsCap>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <erdIsCap+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<erdIsCap>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @erdIsCap(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @erdIsCap(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read_numbers();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ search_list(struct node *, int);
int main(void) {
  struct node *first;
  first = NULL;
  read_numbers();
  printf("enter the value to be found: ");
  int value;
  scanf("%d", &value);
  printf("%p\n", search_list(first, 25));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <read_numbers@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x19,%esi
call   1050 <search_list@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <read_numbers@plt>
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
xor    %edi,%edi
mov    $0x19,%esi
call   1050 <search_list@plt>
lea    0xea7(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [30 x i8] c"enter the value to be found: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca i32
store i32 0, i32* %1
store %struct.node* null, %struct.node** %2
%4 = call i32 (...) @read_numbers()
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load %struct.node*, %struct.node** %2
%8 = call i32 @search_list(%struct.node* %7, i32 25)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
@.str = [30 x i8] c"enter the value to be found: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (...) @read_numbers()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 @search_list(%struct.node* null, i32 25)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
double foo(unsigned int x) { return (double)(float)(x & 0xffffff80); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffff80,%eax
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
and    $0xffffff80,%edi
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -128
%5 = uitofp i32 %4 to float
%6 = fpext float %5 to double
ret double %6
}

LLVM IR (-O2):
define double @foo(i32 %0) {
%2 = and i32 %0, -128
%3 = uitofp i32 %2 to float
%4 = fpext float %3 to double
ret double %4
}
void abort(void) {
  asm("cli");
  printf("Kernel panic! Aborting...\n");
  while (1) {
  }
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
cli
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1123 <abort+0x13>

x86 assembly (clang, -O2):
<abort>:
push   %rax
cli
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
xchg   %ax,%ax
jmp    1120 <abort+0x10>

LLVM IR (-O0):
@.str = [27 x i8] c"Kernel panic! Aborting...\0A\00"
define void @abort() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@str = [26 x i8] c"Kernel panic! Aborting...\00"
define void @abort() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ MON_6;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_mon_6() { return nl_langinfo(MON_6); }


x86 assembly (clang, -O0):
<langinfo_mon_6>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_mon_6>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@MON_6 = global i32 0
define i8* @langinfo_mon_6() {
%1 = load i32, i32* @MON_6
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@MON_6 = global i32 0
define i8* @langinfo_mon_6() {
%1 = load i32, i32* @MON_6
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
AR0I1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((p0[10000000]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0I1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0x21,0x2625a00(%rax)
ja     1135 <AR0I1+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113c <AR0I1+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0I1>:
xor    %eax,%eax
cmpl   $0x22,0x2625a00(%r8)
22
setb   %al
ret

LLVM IR (-O0):
define i32 @AR0I1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = getelementptr inbounds i32, i32* %14, i64 10000000
%16 = load i32, i32* %15
%17 = icmp ule i32 %16, 33
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @AR0I1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = icmp ult i32 %8, 34
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ics660_set_parameter(FILE *ics660, int parameter, void *value,
                         size_t nbytes) {
  int status, error;
  int ICS660_PARAMETER;
  return 0;
}


x86 assembly (clang, -O0):
<ics660_set_parameter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ics660_set_parameter(i32* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @ics660_set_parameter(i32* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
ret i32 0
}
/* Variables and functions */
void(Memento_stats)(void) {}


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

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

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

LLVM IR (-O2):
define void @Memento_stats() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_25519_add(uint64_t out1[5], const uint64_t arg1[5],
                    const uint64_t arg2[5]) {
  internal_fiat_25519_add((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


x86 assembly (clang, -O0):
<fiat_25519_add>:
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
mov    -0x18(%rbp),%rdx
call   1030 <internal_fiat_25519_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_25519_add>:
jmp    1030 <internal_fiat_25519_add@plt>

LLVM IR (-O0):
define void @fiat_25519_add(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** %4
%8 = ptrtoint i32* %7 to i64
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i32*, i32** %6
%12 = ptrtoint i32* %11 to i64
%13 = call i32 @internal_fiat_25519_add(i64 %8, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_25519_add(i64 %4, i64 %5, i64 %6)
ret void
}
int ceil2(int size) {
  int temp = 8;
  while (temp < 512 && temp < size) {
    temp = temp * 2;
  }
  return temp;
}


x86 assembly (clang, -O0):
<ceil2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x200,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    112c <ceil2+0x2c>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113c <ceil2+0x3c>
jmp    114a <ceil2+0x4a>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ceil2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil2>:
mov    $0x8,%eax
cmp    $0x9,%edi
jl     1148 <ceil2+0x48>
mov    $0x10,%eax
cmp    $0x11,%edi
jl     1148 <ceil2+0x48>
mov    $0x20,%eax
cmp    $0x21,%edi
jl     1148 <ceil2+0x48>
mov    $0x40,%eax
cmp    $0x41,%edi
jl     1148 <ceil2+0x48>
mov    $0x80,%eax
cmp    $0x81,%edi
jl     1148 <ceil2+0x48>
xor    %eax,%eax
cmp    $0x101,%edi
setge  %al
shl    $0x8,%eax
add    $0x100,%eax
ret

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

LLVM IR (-O2):
define i32 @ceil2(i32 %0) {
%2 = icmp sgt i32 %0, 8
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = icmp sgt i32 %0, 16
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = icmp sgt i32 %0, 32
br i1 %6, label %7, label %14
7: ; preds = %5
%8 = icmp sgt i32 %0, 64
br i1 %8, label %9, label %14
9: ; preds = %7
%10 = icmp sgt i32 %0, 128
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = icmp sgt i32 %0, 256
%13 = select i1 %12, i32 512, i32 256
br label %14
14: ; preds = %11, %9, %7, %5, %3, %1
%15 = phi i32 [ 8, %1 ], [ 16, %3 ], [ 32, %5 ], [ 64, %7 ], [ 128, %9 ], [ %13, %11 ]
ret i32 %15
}
void ff_hevc_put_hevc_bi_epel_hv24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv24_8_sse4() {
ret void
}
/* Variables and functions */
int PAPI_num_hwctrs();
void PAPIF_num_hwctrs(int *num) { *num = PAPI_num_hwctrs(); }


x86 assembly (clang, -O0):
<PAPIF_num_hwctrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_num_hwctrs@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_num_hwctrs>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_num_hwctrs@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_num_hwctrs(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @PAPI_num_hwctrs()
store i32 %2, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ err_quit(char *);
scalar_t__ inet_pton(int /*<<< orphan*/, char const *, void *);
void Inet_pton(const char *strptr, void *addrptr) {
  if (inet_pton(AF_INET, strptr, addrptr) <= 0)
    err_quit("inet_pton error");
}


x86 assembly (clang, -O0):
<Inet_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <inet_pton@plt>
cmp    $0x0,%rax
jg     115c <Inet_pton+0x3c>
lea    0xea9(%rip),%rdi
call   1030 <err_quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Inet_pton>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1040 <inet_pton@plt>
test   %rax,%rax
jle    113c <Inet_pton+0x1c>
pop    %rax
ret
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1030 <err_quit@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@.str = [16 x i8] c"inet_pton error\00"
define void @Inet_pton(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @AF_INET
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i64 @inet_pton(i32 %5, i8* %6, i8* %7)
%9 = icmp sle i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @err_quit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@AF_INET = global i32 0
@.str = [16 x i8] c"inet_pton error\00"
define void @Inet_pton(i8* %0, i8* %1) {
%3 = load i32, i32* @AF_INET
%4 = tail call i64 @inet_pton(i32 %3, i8* %0, i8* %1)
%5 = icmp slt i64 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @err_quit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
int ILibFragmentTextLength(char *text, int textLength, char *delimiter,
                           int delimiterLength, int tokenLength) {
  int RetVal =
      textLength +
      (((textLength / tokenLength) == 1 ? 0 : (textLength / tokenLength)) *
       delimiterLength);
  return (RetVal);
}


x86 assembly (clang, -O0):
<ILibFragmentTextLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x20(%rbp)
cmp    $0x1,%eax
jne    1136 <ILibFragmentTextLength+0x36>
xor    %eax,%eax
mov    %eax,-0x2c(%rbp)
jmp    1140 <ILibFragmentTextLength+0x40>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILibFragmentTextLength>:
mov    %esi,%eax
cltd
idiv   %r8d
xor    %edx,%edx
cmp    $0x1,%eax
cmove  %edx,%eax
imul   %ecx,%eax
add    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @ILibFragmentTextLength(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3, i32 %4) {
%6 = sdiv i32 %1, %4
%7 = icmp eq i32 %6, 1
%8 = select i1 %7, i32 0, i32 %6
%9 = mul nsw i32 %8, %3
%10 = add nsw i32 %9, %1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void reset_bus() {
  outb(0x3F6, 0x02);
  int i;
  for (i = 0; i < 10000; i++)
    ;
  outb(0x3F6, 0x0);
}


x86 assembly (clang, -O0):
<reset_bus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3f6,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    114e <reset_bus+0x3e>
jmp    1140 <reset_bus+0x30>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112e <reset_bus+0x1e>
mov    $0x3f6,%edi
xor    %esi,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_bus>:
push   %rax
mov    $0x3f6,%edi
mov    $0x2,%esi
call   1030 <outb@plt>
mov    $0x3f6,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @reset_bus() {
%1 = alloca i32
%2 = call i32 @outb(i32 1014, i32 2)
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 10000
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
%11 = call i32 @outb(i32 1014, i32 0)
ret void
}

LLVM IR (-O2):
define void @reset_bus() {
%1 = tail call i32 @outb(i32 1014, i32 2)
%2 = tail call i32 @outb(i32 1014, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_cond_destroy(int /*<<< orphan*/ *);
void std_pthread_cond_destroy(pthread_cond_t *cond) {
  if (pthread_cond_destroy(cond) != 0) {
    perror("pthread_cond_destroy");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pthread_cond_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_cond_destroy@plt>
cmp    $0x0,%rax
je     1165 <std_pthread_cond_destroy+0x35>
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pthread_cond_destroy>:
push   %rax
call   1030 <pthread_cond_destroy@plt>
test   %rax,%rax
jne    113d <std_pthread_cond_destroy+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"pthread_cond_destroy\00"
define void @std_pthread_cond_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pthread_cond_destroy(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"pthread_cond_destroy\00"
define void @std_pthread_cond_destroy(i32* %0) {
%2 = tail call i64 @pthread_cond_destroy(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
int fun_base_fun_1(int a) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fun_base_fun_1(i32 %0) {
ret i32 0
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
long delay_ms(const struct timeval *t1, const struct timeval *t2) {
  return (t2->tv_sec - t1->tv_sec) * 1000 + (t2->tv_usec - t1->tv_usec) / 1000;
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
sub    0x4(%rcx),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
mov    (%rsi),%eax
mov    0x4(%rsi),%ecx
sub    (%rdi),%eax
sub    0x4(%rdi),%ecx
imul   $0x3e8,%eax,%eax
movslq %ecx,%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
add    %eax,%ecx
movslq %ecx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @delay_ms(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
%12 = mul nsw i32 %11, 1000
%13 = load %struct.timeval*, %struct.timeval** %4
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load %struct.timeval*, %struct.timeval** %3
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = sub nsw i32 %15, %18
%20 = sdiv i32 %19, 1000
%21 = add nsw i32 %12, %20
%22 = sext i32 %21 to i64
ret i64 %22
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @delay_ms(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%12 = load i32, i32* %11
%13 = sub nsw i32 %10, %12
%14 = sdiv i32 %13, 1000
%15 = add nsw i32 %14, %8
%16 = sext i32 %15 to i64
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ write_test(char *, char *, char *);
void write_message(char *msg) { write_test("shell", "echo -e $'%s';", msg); }


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

x86 assembly (clang, -O2):
<write_message>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <write_test@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"shell\00"
@.str.1 = [15 x i8] c"echo -e $'%s';\00"
define void @write_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write_test(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"shell\00"
@.str.1 = [15 x i8] c"echo -e $'%s';\00"
define void @write_message(i8* %0) {
%2 = tail call i32 @write_test(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void badCharHeuristic() {}


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

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

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

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