xunge/DecIR huggingface dataset:
void mjd2doy(dj, year, doy) double dj;
int *year;
double *doy;
{
  jd2doy(dj + 2400000.5, year, doy);
  return;
}


x86 assembly (clang, -O0):
<mjd2doy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xed3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1030 <jd2doy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mjd2doy>:
addsd  0xee8(%rip),%xmm0
mov    $0x1,%al
jmp    1030 <jd2doy@plt>

LLVM IR (-O0):
define void @mjd2doy(double %0, i32* %1, double* %2) {
%4 = alloca double
%5 = alloca i32*
%6 = alloca double*
store double %0, double* %4
store i32* %1, i32** %5
store double* %2, double** %6
%7 = load double, double* %4
%8 = fadd double %7, 0x41424F8040000000
%9 = load i32*, i32** %5
%10 = load double*, double** %6
%11 = call i32 (double, i32*, double*, ...) bitcast (i32 (...)* @jd2doy to i32 (double, i32*, double*, ...)*)(double %8, i32* %9, double* %10)
ret void
}

LLVM IR (-O2):
define void @mjd2doy(double %0, i32* %1, double* %2) {
%4 = fadd double %0, 0x41424F8040000000
%5 = tail call i32 (double, i32*, double*, ...) bitcast (i32 (...)* @jd2doy to i32 (double, i32*, double*, ...)*)(double %4, i32* %1, double* %2)
ret void
}
int fio_swab_32(int val) {
  int x;
  val &= 0xffffffff;
  x = (val & 0xff) << 24;
  x |= ((val >> 8) & 0xff) << 16;
  x |= ((val >> 16) & 0xff) << 8;
  x |= ((val >> 24) & 0xff);
  return x;
}


x86 assembly (clang, -O0):
<fio_swab_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
shl    $0x10,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
shl    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fio_swab_32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -1
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 24
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = shl i32 %11, 16
%13 = load i32, i32* %3
%14 = or i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = ashr i32 %15, 16
%17 = and i32 %16, 255
%18 = shl i32 %17, 8
%19 = load i32, i32* %3
%20 = or i32 %19, %18
store i32 %20, i32* %3
%21 = load i32, i32* %2
%22 = ashr i32 %21, 24
%23 = and i32 %22, 255
%24 = load i32, i32* %3
%25 = or i32 %24, %23
store i32 %25, i32* %3
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @fio_swab_32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
char *get_idstring(void) {
  return "SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6";
}


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

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

LLVM IR (-O0):
@.str = [61 x i8] c"SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [61 x i8] c"SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6\00"
define i8* @get_idstring() {
ret i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *open_dcd_write(char *dcdname) { return fopen(dcdname, "w+b"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"w+b\00"
define noalias i32* @open_dcd_write(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
int ignore_exit(int rc, char *stdoutbuf, char *stderrbuf) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @ignore_exit(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ display_update(char, int);
void lcd_write(char *s) {
  while (*s) {
    display_update(*s, 1);
    s++;
  }
  return;
}


x86 assembly (clang, -O0):
<lcd_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <lcd_write+0x3b>
mov    -0x8(%rbp),%rax
mov    $0x1,%esi
movsbl (%rax),%edi
call   1030 <display_update@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <lcd_write+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_write>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <lcd_write+0x28>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
mov    $0x1,%esi
call   1030 <display_update@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <lcd_write+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @lcd_write(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @display_update(i8 signext %5, i32 1)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void error_msg(char *msg) {
  printf("\n\033[1;31mError! %s.\033[0m\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<error_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_msg>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0A\1B[1;31mError! %s.\1B[0m\0A\00"
define void @error_msg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0A\1B[1;31mError! %s.\1B[0m\0A\00"
define void @error_msg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void gtk_drag_get_source_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drag_get_source_widget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M128_f(char *s) {
  debug("M128_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M128_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M128_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M128_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M128_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M128_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M128_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sieve(int, int);
void main() { printf("%d", sieve(1, 10001)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2711,%esi
call   1040 <sieve@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2711,%esi
call   1040 <sieve@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @sieve(i32 1, i32 10001)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs(
      "Usage: "
      "renice"
      " -n increment [-g | -p | -u] ID...\n  -n	Priority to set\n  -g	"
      "Process group IDs\n  -p	Integer process IDs\n  -u	User IDs\n",
      stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [132 x i8] c"Usage: renice -n increment [-g | -p | -u] ID...\0A -n\09Priority to set\0A -g\09Process group IDs\0A -p\09Integer process IDs\0A -u\09User IDs\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [132 x i8] c"Usage: renice -n increment [-g | -p | -u] ID...\0A -n\09Priority to set\0A -g\09Process group IDs\0A -p\09Integer process IDs\0A -u\09User IDs\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([132 x i8], [132 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
int __VERIFIER_nondet_int_val();
int main() {
  unsigned int j, k;
  int array[1], menor;
  menor = __VERIFIER_nondet_int_val();
  for (j = 0; j < 1; j++) {
    array[j] = __VERIFIER_nondet_int_val();
    if (array[j] <= menor)
      menor = array[j];
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int_val@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jae    1177 <main+0x67>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int_val@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    %ecx,-0x10(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp,%rax,4),%eax
cmp    -0x14(%rbp),%eax
jg     1164 <main+0x54>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp,%rax,4),%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <main+0x59>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int_val()
store i32 %6, i32* %5
store i32 0, i32* %2
br label %7
7: ; preds = %27, %0
%8 = load i32, i32* %2
%9 = icmp ult i32 %8, 1
br i1 %9, label %10, label %30
10: ; preds = %7
%11 = call i32 (...) @__VERIFIER_nondet_int_val()
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 %13
store i32 %11, i32* %14
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = load i32, i32* %5
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %26
21: ; preds = %10
%22 = load i32, i32* %2
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 %23
%25 = load i32, i32* %24
store i32 %25, i32* %5
br label %26
26: ; preds = %21, %10
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add i32 %28, 1
store i32 %29, i32* %2
br label %7
30: ; preds = %7
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int_val()
%2 = tail call i32 (...) @__VERIFIER_nondet_int_val()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ranged_random_mult64(scalar_t__);
void loop_mult64_linear(size_t count, uint32_t range, uint32_t *output) {
  for (size_t i = 0; i < count; i++) {
    *output++ = ranged_random_mult64(range + i);
  }
}


x86 assembly (clang, -O0):
<loop_mult64_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116d <loop_mult64_linear+0x5d>
mov    -0x10(%rbp),%rdi
add    -0x20(%rbp),%rdi
call   1030 <ranged_random_mult64@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <loop_mult64_linear+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_mult64_linear>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1148 <loop_mult64_linear+0x38>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <ranged_random_mult64@plt>
cltq
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <loop_mult64_linear+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @loop_mult64_linear(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i64 [ %13, %6 ], [ 0, %3 ]
%8 = phi i64* [ %12, %6 ], [ %2, %3 ]
%9 = add i64 %7, %1
%10 = tail call i32 @ranged_random_mult64(i64 %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %8, i64 1
store i64 %11, i64* %8
%13 = add nuw i64 %7, 1
%14 = icmp eq i64 %13, %0
br i1 %14, label %5, label %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strrchr(char *, char);
char *xstrdup(char const *);
char *get_path(const char *full_path) {
  char *new_path;
  char *last;
  new_path = xstrdup(full_path);
  last = strrchr(new_path, '/');
  if (last == NULL) {
    free(new_path);
    return NULL;
  }
  last[1] = '\0';
  return new_path;
}


x86 assembly (clang, -O0):
<get_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <xstrdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    117c <get_path+0x4c>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    118c <get_path+0x5c>
mov    -0x20(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_path>:
push   %rbx
call   1050 <xstrdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1151 <get_path+0x21>
movb   $0x0,0x1(%rax)
jmp    115b <get_path+0x2b>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @xstrdup(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i8* @strrchr(i8* %8, i8 signext 47)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = call i32 @free(i8* %13)
store i8* null, i8** %2
br label %19
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 0, i8* %17
%18 = load i8*, i8** %4
store i8* %18, i8** %2
br label %19
19: ; preds = %15, %12
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @get_path(i8* %0) {
%2 = tail call i8* @xstrdup(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 47)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @free(i8* %2)
br label %9
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %3, i64 1
store i8 0, i8* %8
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ null, %5 ], [ %2, %7 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pdispatch_ref() {
  printf("NOT IMPLEMENTED:"
         "pa_pdispatch_ref"
         "\n");
}


x86 assembly (clang, -O0):
<pa_pdispatch_ref>:
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_pdispatch_ref>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_pdispatch_ref\00"
define i32 @pa_pdispatch_ref() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void synclink_remove_one(struct pci_dev *dev) {
  { return; }
}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @synclink_remove_one(%struct.pci_dev* nocapture %0) {
ret void
}
long __ocl_convert_long_long(long src) { return (long)src; }


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

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

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

LLVM IR (-O2):
define i64 @__ocl_convert_long_long(i64 returned %0) {
ret i64 %0
}
void trace(char *message, ...) {}


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

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

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

LLVM IR (-O2):
define void @trace(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int number;
  number = 5;
  int result1 = number++;
  number = 5;
  int result2 = ++number;
  printf("Value of number++ is %d\n", result1);
  printf("Value of ++number is %d\n", result2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"Value of number++ is %d\0A\00"
@.str.1 = [25 x i8] c"Value of ++number is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 5, i32* %1
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
store i32 %4, i32* %2
store i32 5, i32* %1
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Value of number++ is %d\0A\00"
@.str.1 = [25 x i8] c"Value of ++number is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 6)
ret i32 0
}
void(ata_dump_id)(struct ata_device *dev) {
  { return; }
}


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

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

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

LLVM IR (-O2):
%struct.ata_device = type opaque
define void @ata_dump_id(%struct.ata_device* nocapture %0) {
ret void
}
int execute_sched_get_priority_max() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_get_priority_max() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_hl(int);
void opcb_ee() { set_hl(5); }


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

x86 assembly (clang, -O2):
<opcb_ee>:
mov    $0x5,%edi
jmp    1030 <set_hl@plt>

LLVM IR (-O0):
define void @opcb_ee() {
%1 = call i32 @set_hl(i32 5)
ret void
}

LLVM IR (-O2):
define void @opcb_ee() {
%1 = tail call i32 @set_hl(i32 5)
ret void
}
void func(struct timer_list *timer, void *data, unsigned long call_time) {}


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

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

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

LLVM IR (-O2):
%struct.timer_list = type opaque
define void @func(%struct.timer_list* nocapture %0, i8* nocapture %1, i64 %2) {
ret void
}
void extract_rsrc_file(struct rsrc_file_t *file) { (void)file; }


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

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

LLVM IR (-O0):
%struct.rsrc_file_t = type opaque
define void @extract_rsrc_file(%struct.rsrc_file_t* %0) {
%2 = alloca %struct.rsrc_file_t*
store %struct.rsrc_file_t* %0, %struct.rsrc_file_t** %2
%3 = load %struct.rsrc_file_t*, %struct.rsrc_file_t** %2
ret void
}

LLVM IR (-O2):
%struct.rsrc_file_t = type opaque
define void @extract_rsrc_file(%struct.rsrc_file_t* nocapture %0) {
ret void
}
int isascii(int c) { return (c >= 0 && c <= 127); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isascii+0x20>
cmpl   $0x7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char *frob();
int /*<<< orphan*/ oof();
test(int code) {
  char *temp = frob();
  int rotate = (code == 22);
  if (temp == 0 && !rotate)
    oof();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <frob@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x16,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1161 <test+0x41>
cmpl   $0x0,-0x14(%rbp)
jne    1161 <test+0x41>
mov    $0x0,%al
call   1030 <oof@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <frob@plt>
cmp    $0x16,%ebx
je     113b <test+0x1b>
test   %rax,%rax
jne    113b <test+0x1b>
xor    %eax,%eax
call   1030 <oof@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
%6 = call i8* (...) @frob()
store i8* %6, i8** %4
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 22
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %1
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = call i32 (...) @oof()
br label %17
17: ; preds = %15, %12, %1
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @test(i32 %0) {
%2 = tail call i8* (...) @frob()
%3 = icmp eq i32 %0, 22
%4 = icmp ne i8* %2, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %6, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ ult_exit(int /*<<< orphan*/);
void threadB() {
  printf("blub\n");
  ult_exit(0);
}


x86 assembly (clang, -O0):
<threadB>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <ult_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<threadB>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <ult_exit@plt>

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

LLVM IR (-O2):
@str = [5 x i8] c"blub\00"
define void @threadB() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @ult_exit(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __mriCore_PrepareStringResponse(char *);
int getExceptionCode();
void handleBreakpointWatchpointException(void) {
  switch (getExceptionCode()) {
  case 4:
    __mriCore_PrepareStringResponse("E01");
    break;
  case 8:
  default:
    __mriCore_PrepareStringResponse("E05");
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<handleBreakpointWatchpointException>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <getExceptionCode@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
sub    $0x4,%eax
je     1153 <handleBreakpointWatchpointException+0x33>
jmp    1142 <handleBreakpointWatchpointException+0x22>
mov    -0x4(%rbp),%eax
sub    $0x8,%eax
je     1164 <handleBreakpointWatchpointException+0x44>
jmp    1169 <handleBreakpointWatchpointException+0x49>
lea    0xea6(%rip),%rdi
call   1040 <__mriCore_PrepareStringResponse@plt>
jmp    1175 <handleBreakpointWatchpointException+0x55>
jmp    1169 <handleBreakpointWatchpointException+0x49>
lea    0xe94(%rip),%rdi
call   1040 <__mriCore_PrepareStringResponse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleBreakpointWatchpointException>:
push   %rax
xor    %eax,%eax
call   1030 <getExceptionCode@plt>
cmp    $0x4,%eax
lea    0xece(%rip),%rax
lea    0xecb(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1040 <__mriCore_PrepareStringResponse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"E01\00"
@.str.1 = [4 x i8] c"E05\00"
define void @handleBreakpointWatchpointException() {
%1 = call i32 (...) @getExceptionCode()
switch i32 %1, label %5 [
i32 4, label %2
i32 8, label %4
]
2: ; preds = %0
%3 = call i32 @__mriCore_PrepareStringResponse(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
4: ; preds = %0
br label %5
5: ; preds = %0, %4
%6 = call i32 @__mriCore_PrepareStringResponse(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"E01\00"
@.str.1 = [4 x i8] c"E05\00"
define void @handleBreakpointWatchpointException() {
%1 = tail call i32 (...) @getExceptionCode()
%2 = icmp eq i32 %1, 4
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%4 = tail call i32 @__mriCore_PrepareStringResponse(i8* %3)
ret void
}
int check_prime(int num) {
  int N, x;
  N = num;
  x = 2;
  for (x = 2; x < N;) {
    if ((N % x) != 0) {
      x = x + 1;
    } else {
      N = N + 1;
      x = 2;
    }
  }
  return x;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115a <check_prime+0x5a>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
je     1145 <check_prime+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <check_prime+0x55>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
jmp    111b <check_prime+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
mov    $0x2,%ecx
cmp    $0x3,%edi
jl     1138 <check_prime+0x38>
mov    $0x2,%esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %ecx
add    $0x1,%ecx
xor    %eax,%eax
test   %edx,%edx
sete   %al
cmove  %esi,%ecx
add    %eax,%edi
cmp    %edi,%ecx
jl     1120 <check_prime+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %13
3: ; preds = %1, %3
%4 = phi i32 [ %11, %3 ], [ 2, %1 ]
%5 = phi i32 [ %10, %3 ], [ %0, %1 ]
%6 = srem i32 %5, %4
%7 = icmp eq i32 %6, 0
%8 = add nsw i32 %4, 1
%9 = zext i1 %7 to i32
%10 = add nsw i32 %5, %9
%11 = select i1 %7, i32 2, i32 %8
%12 = icmp slt i32 %11, %10
br i1 %12, label %3, label %13
13: ; preds = %3, %1
%14 = phi i32 [ 2, %1 ], [ %11, %3 ]
ret i32 %14
}
int CountBits(unsigned int x) {
  static unsigned int mask[] = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF,
                                0x0000FFFF};
  int i;
  int shift;
  for (i = 0, shift = 1; i < 5; i++, shift *= 2)
    x = (x & mask[i]) + ((x >> shift) & mask[i]);
  return x;
}


x86 assembly (clang, -O0):
<CountBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1164 <CountBits+0x64>
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rdx
lea    0x2f03(%rip),%rcx
and    (%rcx,%rdx,4),%eax
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
movslq -0x8(%rbp),%rsi
lea    0x2eeb(%rip),%rdx
and    (%rdx,%rsi,4),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <CountBits+0x15>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountBits>:
mov    %edi,%eax
and    $0x55555555,%eax
shr    %edi
and    $0x55555555,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33333333,%ecx
shr    $0x2,%eax
and    $0x33333333,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7070707,%ecx
shr    $0x4,%eax
and    $0x7070707,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0xf000f,%ecx
shr    $0x8,%eax
and    $0xf000f,%eax
add    %ecx,%eax
movzwl %ax,%ecx
shr    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
@CountBits.mask = internal global [5 x i32] [i32 1431655765, i32 858993459, i32 252645135, i32 16711935, i32 65535]
define i32 @CountBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %29
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x i32], [5 x i32]* @CountBits.mask, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = and i32 %9, %13
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = lshr i32 %15, %16
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* @CountBits.mask, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = and i32 %17, %21
%23 = add i32 %14, %22
store i32 %23, i32* %2
br label %24
24: ; preds = %8
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
%27 = load i32, i32* %4
%28 = mul nsw i32 %27, 2
store i32 %28, i32* %4
br label %5
29: ; preds = %5
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @CountBits(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1431655765
%5 = add nuw i32 %2, %4
%6 = and i32 %5, 858993459
%7 = lshr i32 %5, 2
%8 = and i32 %7, 858993459
%9 = add nuw nsw i32 %6, %8
%10 = and i32 %9, 117901063
%11 = lshr i32 %9, 4
%12 = and i32 %11, 117901063
%13 = add nuw nsw i32 %10, %12
%14 = and i32 %13, 983055
%15 = lshr i32 %13, 8
%16 = and i32 %15, 983055
%17 = add nuw nsw i32 %14, %16
%18 = and i32 %17, 31
%19 = lshr i32 %17, 16
%20 = add nuw nsw i32 %18, %19
ret i32 %20
}
float UI_ProportionalSizeScale(int style) {
  if (style & 0x00000010) {
    return 1;
  }
  return 1.00;
}


x86 assembly (clang, -O0):
<UI_ProportionalSizeScale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1128 <UI_ProportionalSizeScale+0x28>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1135 <UI_ProportionalSizeScale+0x35>
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @UI_ProportionalSizeScale(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store float 1.000000e+00, float* %2
br label %9
8: ; preds = %1
store float 1.000000e+00, float* %2
br label %9
9: ; preds = %8, %7
%10 = load float, float* %2
ret float %10
}

LLVM IR (-O2):
define float @UI_ProportionalSizeScale(i32 %0) {
ret float 1.000000e+00
}
int fun1373() { return 1373; }


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

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

LLVM IR (-O0):
define i32 @fun1373() {
ret i32 1373
}

LLVM IR (-O2):
define i32 @fun1373() {
ret i32 1373
}
__attribute__((always_)) void trace_kmem_cache_free(unsigned long call_site,
                                                    const void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @trace_kmem_cache_free(i64 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bfd_DOWN() {
  printf("BFD in DOWN state");
  return 0;
}


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

x86 assembly (clang, -O2):
<bfd_DOWN>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"BFD in DOWN state\00"
define i32 @bfd_DOWN() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"BFD in DOWN state\00"
define i32 @bfd_DOWN() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void rop3_99_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_99_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_99_1_0>:
not    %dl
mov    (%rdi),%al
or     %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_99_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8*, i8** %4
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = and i32 %35, %37
%39 = or i32 %32, %38
%40 = trunc i32 %39 to i8
%41 = load i8*, i8** %4
store i8 %40, i8* %41
ret void
}

LLVM IR (-O2):
define void @rop3_99_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %5, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char const *);
void erroargc(const char *s, char *arg) {
  printf("%s%s", arg, s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<erroargc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<erroargc>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@EXIT_FAILURE = global i32 0
define void @erroargc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@EXIT_FAILURE = global i32 0
define void @erroargc(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *memalign(int, size_t);
__attribute__((no)) void *memalign16(size_t szB) {
  void *x;
  x = memalign(16, szB);
  assert(x);
  assert(0 == ((16 - 1) & (unsigned long)x));
  return x;
}


x86 assembly (clang, -O0):
<memalign16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x10,%edi
call   1040 <memalign@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rcx
and    $0xf,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memalign16>:
push   %rbx
mov    %rdi,%rsi
mov    $0x10,%edi
call   1040 <memalign@plt>
mov    %rax,%rbx
mov    %ebx,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memalign16(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @memalign(i32 16, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %9 to i64
%11 = and i64 15, %10
%12 = icmp eq i64 0, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @memalign16(i64 %0) {
%2 = tail call align 16 i8* @memalign(i32 16, i64 %0)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @assert(i32 1)
ret i8* %2
}