xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print_board();
int /*<<< orphan*/ printf(char *, char);
void winning_message(char player) {
  print_board();
  printf("%c has won this game! Congratulations!\n", player);
}


x86 assembly (clang, -O0):
<winning_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <print_board@plt>
lea    0xec4(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<winning_message>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <print_board@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"%c has won this game! Congratulations!\0A\00"
define void @winning_message(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @print_board()
%4 = load i8, i8* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"%c has won this game! Congratulations!\0A\00"
define void @winning_message(i8 signext %0) {
%2 = tail call i32 (...) @print_board()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
void foo647() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ASN1_OBJECT_free() {
ret void
}
int fun1069() { return 1069; }


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

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

LLVM IR (-O0):
define i32 @fun1069() {
ret i32 1069
}

LLVM IR (-O2):
define i32 @fun1069() {
ret i32 1069
}
/* Variables and functions */
unsigned int GET32(int);
void usleep(unsigned int ms) {
  unsigned int t0 = GET32(0x20003004);
  while (GET32(0x20003004) < (t0 + 1000 * ms)) {
  }
}


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x20003004,%edi
call   1030 <GET32@plt>
mov    %eax,-0x8(%rbp)
mov    $0x20003004,%edi
call   1030 <GET32@plt>
mov    -0x8(%rbp),%ecx
imul   $0x3e8,-0x4(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jae    114b <usleep+0x3b>
jmp    1128 <usleep+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
push   %rbx
mov    %edi,%ebx
mov    $0x20003004,%edi
call   1030 <GET32@plt>
imul   $0x3e8,%ebx,%ebx
add    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20003004,%edi
call   1030 <GET32@plt>
cmp    %ebx,%eax
jb     1130 <usleep+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @usleep(i32 %0) {
%2 = tail call i32 @GET32(i32 536883204)
%3 = mul i32 %0, 1000
%4 = add i32 %2, %3
br label %5
5: ; preds = %5, %1
%6 = tail call i32 @GET32(i32 536883204)
%7 = icmp ult i32 %6, %4
br i1 %7, label %5, label %8
8: ; preds = %5
ret void
}
int plat_cpu_clock_get(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @plat_cpu_clock_get() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @plat_cpu_clock_get() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test3(int a, int b, int c, long long value, int after) {
  if (a != 1 || b != 2 || c != 3 || value != 0x123456789abcdefLL ||
      after != 0x55)
    abort();
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1165 <test3+0x55>
cmpl   $0x2,-0x8(%rbp)
jne    1165 <test3+0x55>
cmpl   $0x3,-0xc(%rbp)
jne    1165 <test3+0x55>
movabs $0x123456789abcdef,%rax
45 23 01
cmp    %rax,-0x18(%rbp)
jne    1165 <test3+0x55>
cmpl   $0x55,-0x1c(%rbp)
je     116c <test3+0x5c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
cmp    $0x1,%edi
jne    1135 <test3+0x25>
cmp    $0x2,%esi
jne    1135 <test3+0x25>
cmp    $0x3,%edx
jne    1135 <test3+0x25>
movabs $0x123456789abcdef,%rax
45 23 01
cmp    %rax,%rcx
jne    1135 <test3+0x25>
cmp    $0x55,%r8d
jne    1135 <test3+0x25>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @test3(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4) {
%6 = icmp ne i32 %0, 1
%7 = icmp ne i32 %1, 2
%8 = or i1 %6, %7
%9 = icmp ne i32 %2, 3
%10 = or i1 %8, %9
%11 = icmp ne i64 %3, 81985529216486895
%12 = or i1 %10, %11
%13 = icmp ne i32 %4, 85
%14 = or i1 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %5
%16 = tail call i32 (...) @abort()
unreachable
17: ; preds = %5
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int crc32c_sb8_64_bit(int, unsigned char const *, unsigned int, int);
uint32_t multitable_crc32c(uint32_t crc32c, const unsigned char *buffer,
                           unsigned int length) {
  uint32_t to_even_word;
  if (length == 0) {
    return (crc32c);
  }
  to_even_word = (4 - (((uintptr_t)buffer) & 0x3));
  return (crc32c_sb8_64_bit(crc32c, buffer, length, to_even_word));
}


x86 assembly (clang, -O0):
<multitable_crc32c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1137 <multitable_crc32c+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <multitable_crc32c+0x4f>
mov    -0x10(%rbp),%rcx
and    $0x3,%rcx
mov    $0x4,%eax
sub    %rcx,%rax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <crc32c_sb8_64_bit@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multitable_crc32c>:
test   %edx,%edx
je     1125 <multitable_crc32c+0x15>
mov    %esi,%eax
and    $0x3,%eax
mov    $0x4,%ecx
sub    %eax,%ecx
jmp    1030 <crc32c_sb8_64_bit@plt>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @multitable_crc32c(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = trunc i64 %6 to i32
%8 = and i32 %7, 3
%9 = sub nuw nsw i32 4, %8
%10 = tail call i32 @crc32c_sb8_64_bit(i32 %0, i8* %1, i32 %2, i32 %9)
br label %11
11: ; preds = %3, %5
%12 = phi i32 [ %10, %5 ], [ %0, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glScalef(double, double, int);
int /*<<< orphan*/ glTranslatef(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void reshape(int w, int h) {
  glViewport(0, 0, w, h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glTranslatef(-1, 1, 0);
  glScalef(2.0 / 64, -2.0 / 64, 1);
}


x86 assembly (clang, -O0):
<reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1070 <glViewport@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1060 <glTranslatef@plt>
movsd  0xe65(%rip),%xmm0
movsd  0xe65(%rip),%xmm1
mov    $0x1,%edi
call   1050 <glScalef@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reshape>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1070 <glViewport@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1060 <glTranslatef@plt>
movsd  0xe74(%rip),%xmm0
movsd  0xe74(%rip),%xmm1
mov    $0x1,%edi
pop    %rax
jmp    1050 <glScalef@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = call i32 @glTranslatef(i32 -1, i32 1, i32 0)
%12 = call i32 @glScalef(double 3.125000e-02, double -3.125000e-02, i32 1)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @glTranslatef(i32 -1, i32 1, i32 0)
%8 = tail call i32 @glScalef(double 3.125000e-02, double -3.125000e-02, i32 1)
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
extern int CompareStringsNonCase(const char *s1, const char *s2) {
  if (s1 && s2)
    return strcasecmp(s1, s2);
  else
    return -1;
}


x86 assembly (clang, -O0):
<CompareStringsNonCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114b <CompareStringsNonCase+0x3b>
cmpq   $0x0,-0x18(%rbp)
je     114b <CompareStringsNonCase+0x3b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x4(%rbp)
jmp    1152 <CompareStringsNonCase+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompareStringsNonCase>:
test   %rdi,%rdi
je     111f <CompareStringsNonCase+0xf>
test   %rsi,%rsi
je     111f <CompareStringsNonCase+0xf>
jmp    1030 <strcasecmp@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @CompareStringsNonCase(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcasecmp(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
int do_689() { return 689; }


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

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

LLVM IR (-O0):
define i32 @do_689() {
ret i32 689
}

LLVM IR (-O2):
define i32 @do_689() {
ret i32 689
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int override_redirect;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcreatewindow_override_redirect(void *_p, int _v) {
  ((XEvent *)_p)->xcreatewindow.override_redirect = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcreatewindow_override_redirect>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcreatewindow_override_redirect(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcreatewindow_override_redirect(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void sti() { asm("sti"); }


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

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

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

LLVM IR (-O2):
define void @sti() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
void *cpu_hog(void *arg) {
  for (;;) {
    (void)getpid();
  }
}


x86 assembly (clang, -O0):
<cpu_hog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
jmp    111c <cpu_hog+0xc>

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

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

LLVM IR (-O2):
define noalias i8* @cpu_hog(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 (...) @getpid()
br label %2
}
double ceil(x)
double x;
{
  double i;
  i = _frndint(x);
  if (i < x)
    return i + 1.0;
  return i;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <_frndint@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    115d <ceil+0x4d>
movsd  0xeb2(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1167 <ceil+0x57>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x1,%al
call   1030 <_frndint@plt>
cvtsi2sd %eax,%xmm1
movsd  0xed7(%rip),%xmm2
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
cmpltsd (%rsp),%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call i32 (double, ...) bitcast (i32 (...)* @_frndint to i32 (double, ...)*)(double %5)
%7 = sitofp i32 %6 to double
store double %7, double* %4
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load double, double* %4
%13 = fadd double %12, 1.000000e+00
store double %13, double* %2
br label %16
14: ; preds = %1
%15 = load double, double* %4
store double %15, double* %2
br label %16
16: ; preds = %14, %11
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @_frndint to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = fcmp olt double %3, %0
%5 = fadd double %3, 1.000000e+00
%6 = select i1 %4, double %5, double %3
ret double %6
}
void elv_completed_request(struct request_queue *x, struct request *y) {
  return;
}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.request = type opaque
define void @elv_completed_request(%struct.request_queue* %0, %struct.request* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.request*
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.request* %1, %struct.request** %4
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.request = type opaque
define void @elv_completed_request(%struct.request_queue* nocapture %0, %struct.request* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *);
void *kmalloc(size_t size, int flags) {
  void *p;
  if ((p = malloc(size)) == NULL) {
    printf("kmalloc failing!\n");
    fflush(0);
    exit(-1);
  }
  return p;
}


x86 assembly (clang, -O0):
<kmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1183 <kmalloc+0x43>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     114d <kmalloc+0xd>
pop    %rcx
ret
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"kmalloc failing!\0A\00"
define i8* @kmalloc(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i8*
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @fflush(i32 0)
%12 = call i32 @exit(i32 -1)
unreachable
13: ; preds = %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@str = [17 x i8] c"kmalloc failing!\00"
define noalias i8* @kmalloc(i64 %0, i32 %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @fflush(i32 0)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 0b101;
  int i2 = 0b1011111;
  printf("%i\n", i);
  printf("%i\n", i2);
  int octalI = 0637;
  printf("%i\n", octalI);
  printf("%o\n", octalI);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5f,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x19f,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [4 x i8] c"%o\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 95, i32* %3
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 415, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
@.str.1 = [4 x i8] c"%o\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 95)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 415)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 415)
ret i32 0
}
/* Type definitions */
typedef int u_int;
typedef int u_char;

/* Variables and functions */
void set_channelmap(u_int nr, u_char *map) { map[nr >> 3] |= (1 << (nr & 7)); }


x86 assembly (clang, -O0):
<set_channelmap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_channelmap>:
mov    %edi,%ecx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x3,%edi
movslq %edi,%rcx
or     %eax,(%rsi,%rcx,4)
ret

LLVM IR (-O0):
define void @set_channelmap(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 = and i32 %5, 7
%7 = shl i32 1, %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %3
%10 = ashr i32 %9, 3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @set_channelmap(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 7
%4 = shl nuw nsw i32 1, %3
%5 = ashr i32 %0, 3
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
/* Variables and functions */
double drand48();
void mat_init(double *mat, int rows, int cols) {
  int i;
  for (i = 0; i < rows * cols; i++)
    *mat++ = 2.0 * drand48() - 1.0;
}


x86 assembly (clang, -O0):
<mat_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1173 <mat_init+0x63>
mov    $0x0,%al
call   1030 <drand48@plt>
addsd  %xmm0,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  %xmm0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <mat_init+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat_init>:
push   %r15
push   %r14
push   %rbx
imul   %edx,%esi
test   %esi,%esi
jle    1152 <mat_init+0x42>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <drand48@plt>
addsd  %xmm0,%xmm0
addsd  0xebd(%rip),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <mat_init+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @mat_init(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %19, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = mul nsw i32 %10, %11
%13 = icmp slt i32 %9, %12
br i1 %13, label %14, label %22
14: ; preds = %8
%15 = call double (...) @drand48()
%16 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %15, double -1.000000e+00)
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i32 1
store double* %18, double** %4
store double %16, double* %17
br label %19
19: ; preds = %14
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
store i32 %21, i32* %7
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @mat_init(double* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3, %6
%7 = phi i32 [ %12, %6 ], [ 0, %3 ]
%8 = phi double* [ %11, %6 ], [ %0, %3 ]
%9 = tail call double (...) @drand48()
%10 = tail call double @llvm.fmuladd.f64(double %9, double 2.000000e+00, double -1.000000e+00)
%11 = getelementptr inbounds double, double* %8, i64 1
store double %10, double* %8
%12 = add nuw nsw i32 %7, 1
%13 = icmp eq i32 %12, %4
br i1 %13, label %14, label %6
14: ; preds = %6, %3
ret void
}
int slapi_isbitset_int(unsigned int f, unsigned int bitnum) {
  return (f & ((unsigned int)1 << bitnum));
}


x86 assembly (clang, -O0):
<slapi_isbitset_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slapi_isbitset_int>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @slapi_isbitset_int(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 = shl i32 1, %6
%8 = and i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @slapi_isbitset_int(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = and i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct mesh_var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quad_border_cond(struct mesh_var *, int const, int const,
                                    int, int, int, int);
int /*<<< orphan*/ quad_mesh(struct mesh_var *, int const, int const);
void Sod_mesh(struct mesh_var *mv) {
  const int n_x_a = 0, n_y_a = 0;
  quad_mesh(mv, n_x_a, n_y_a);
  quad_border_cond(mv, n_x_a, n_y_a, -2, -3, -2, -3);
}


x86 assembly (clang, -O0):
<Sod_mesh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <quad_mesh@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    $0xfffffffe,%r9d
mov    $0xfffffffd,%r8d
mov    %edx,%esi
mov    %r9d,%ecx
movl   $0xfffffffd,(%rsp)
call   1040 <quad_border_cond@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sod_mesh>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <quad_mesh@plt>
movl   $0xfffffffd,(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0xfffffffe,%ecx
mov    $0xfffffffd,%r8d
mov    $0xfffffffe,%r9d
call   1040 <quad_border_cond@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.mesh_var = type { i32 }
define void @Sod_mesh(%struct.mesh_var* %0) {
%2 = alloca %struct.mesh_var*
%3 = alloca i32
%4 = alloca i32
store %struct.mesh_var* %0, %struct.mesh_var** %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load %struct.mesh_var*, %struct.mesh_var** %2
%6 = call i32 @quad_mesh(%struct.mesh_var* %5, i32 0, i32 0)
%7 = load %struct.mesh_var*, %struct.mesh_var** %2
%8 = call i32 @quad_border_cond(%struct.mesh_var* %7, i32 0, i32 0, i32 -2, i32 -3, i32 -2, i32 -3)
ret void
}

LLVM IR (-O2):
%struct.mesh_var = type { i32 }
define void @Sod_mesh(%struct.mesh_var* %0) {
%2 = tail call i32 @quad_mesh(%struct.mesh_var* %0, i32 0, i32 0)
%3 = tail call i32 @quad_border_cond(%struct.mesh_var* %0, i32 0, i32 0, i32 -2, i32 -3, i32 -2, i32 -3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_hex(int);
void main(int i) {
  int t;
  t = 2;
  t = t + 3;
  print_hex(t);
  t = t * 4;
  print_hex(t);
  t = t - 1;
  print_hex(t);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <print_hex@plt>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <print_hex@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <print_hex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <print_hex@plt>
mov    $0x14,%edi
call   1030 <print_hex@plt>
mov    $0x13,%edi
pop    %rax
jmp    1030 <print_hex@plt>

LLVM IR (-O0):
define void @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 3
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @print_hex(i32 %6)
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 4
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @print_hex(i32 %10)
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = call i32 @print_hex(i32 %14)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0) {
%2 = tail call i32 @print_hex(i32 5)
%3 = tail call i32 @print_hex(i32 20)
%4 = tail call i32 @print_hex(i32 19)
ret void
}
char *massage_fname(char *fname, int local) { return fname; }


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

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

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

LLVM IR (-O2):
define i8* @massage_fname(i8* readnone returned %0, i32 %1) {
ret i8* %0
}
int fz_screen_byte(int bd, int s) { return bd + s - (((bd) * ((s) + 1)) >> 8); }


x86 assembly (clang, -O0):
<fz_screen_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
sar    $0x8,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_screen_byte>:
lea    (%rsi,%rdi,1),%eax
add    $0x1,%esi
imul   %edi,%esi
sar    $0x8,%esi
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fz_screen_byte(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 = add nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = mul nsw i32 %8, %10
%12 = ashr i32 %11, 8
%13 = sub nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @fz_screen_byte(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = add nsw i32 %1, 1
%5 = mul nsw i32 %4, %0
%6 = ashr i32 %5, 8
%7 = sub i32 %3, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int do_i2b_bio(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk) { return do_i2b_bio(out, pk, 1); }


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

x86 assembly (clang, -O2):
<i2b_PublicKey_bio>:
mov    $0x1,%edx
jmp    1030 <do_i2b_bio@plt>

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

LLVM IR (-O2):
define i32 @i2b_PublicKey_bio(i32* %0, i32* %1) {
%3 = tail call i32 @do_i2b_bio(i32* %0, i32* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fun(int);
int main(int argc, const char *argv[]) {
  int i = 1, j = 0;
  while (++i) {
    fun(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1153 <main+0x43>
mov    -0x14(%rbp),%edi
call   1030 <fun@plt>
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <fun@plt>
add    $0x1,%ebx
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 1, %2 ], [ %5, %3 ]
%5 = add nuw nsw i32 %4, 1
%6 = tail call i32 @fun(i32 %5)
br label %3
}
void ptrace_sandbox_permit_rmdir(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_rmdir(%struct.pt_sandbox* nocapture %0) {
ret void
}
int test_imm_77uint8_reg(unsigned char val) {
  return ((val) & (-0x77 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_77uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff89,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_77uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -119
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ k(int);
int /*<<< orphan*/ proc1();
void j(int param1) {
  proc1();
  if (param1 > 1) {
    k(param1);
  }
  return;
}


x86 assembly (clang, -O0):
<j>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <proc1@plt>
cmpl   $0x1,-0x4(%rbp)
jle    1144 <j+0x24>
mov    -0x4(%rbp),%edi
call   1040 <k@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <proc1@plt>
cmp    $0x2,%ebx
jl     1137 <j+0x17>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <k@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @j(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @proc1()
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @k(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @j(i32 %0) {
%2 = tail call i32 (...) @proc1()
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @k(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
long str_find(char const *, char const *);
char *str_pfind(const char *in, const char *what) {
  long index = str_find(in, what);
  if (index != -1)
    return (char *)in + index;
  return NULL;
}


x86 assembly (clang, -O0):
<str_pfind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <str_find@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0xffffffffffffffff,-0x20(%rbp)
je     114d <str_pfind+0x3d>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <str_pfind+0x45>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_pfind>:
push   %rbx
mov    %rdi,%rbx
call   1030 <str_find@plt>
add    %rax,%rbx
xor    %ecx,%ecx
cmp    $0xffffffffffffffff,%rax
cmovne %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @str_pfind(i8* %0, i8* %1) {
%3 = tail call i64 @str_find(i8* %0, i8* %1)
%4 = icmp eq i64 %3, -1
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = select i1 %4, i8* null, i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main() {
  int i;
  for (i = 0; i < 1000000; i++)
    ;
  __VERIFIER_assert(i == 1000000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf4240,-0x8(%rbp)
jge    1146 <main+0x36>
jmp    1138 <main+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
cmpl   $0xf4240,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1000000
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1000000
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
unsigned char inb(unsigned short _port) {
  unsigned char rv;
  __asm__ __volatile__("inb %1, %0" : "=a"(rv) : "dN"(_port));
  return rv;
}


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

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

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

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
double array_max(double *, int);
double array_min(double *, int);
int /*<<< orphan*/ array_scale(double *, int, double, double);
void array_center(double *a, int n) {
  double min, max, delta;
  min = array_min(a, n);
  max = array_max(a, n);
  delta = (min + (1 - max)) / 2. - min;
  array_scale(a, n, 1.0, delta);
}


x86 assembly (clang, -O0):
<array_center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <array_min@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <array_max@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe89(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x28(%rbp),%xmm1
movsd  0xe5f(%rip),%xmm0
call   1050 <array_scale@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_center>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <array_min@plt>
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <array_max@plt>
movsd  0xeac(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm1
mulsd  0xe9b(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <array_scale@plt>

LLVM IR (-O0):
define void @array_center(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double* %0, double** %3
store i32 %1, i32* %4
%8 = load double*, double** %3
%9 = load i32, i32* %4
%10 = call double @array_min(double* %8, i32 %9)
store double %10, double* %5
%11 = load double*, double** %3
%12 = load i32, i32* %4
%13 = call double @array_max(double* %11, i32 %12)
store double %13, double* %6
%14 = load double, double* %5
%15 = load double, double* %6
%16 = fsub double 1.000000e+00, %15
%17 = fadd double %14, %16
%18 = fdiv double %17, 2.000000e+00
%19 = load double, double* %5
%20 = fsub double %18, %19
store double %20, double* %7
%21 = load double*, double** %3
%22 = load i32, i32* %4
%23 = load double, double* %7
%24 = call i32 @array_scale(double* %21, i32 %22, double 1.000000e+00, double %23)
ret void
}

LLVM IR (-O2):
define void @array_center(double* %0, i32 %1) {
%3 = tail call double @array_min(double* %0, i32 %1)
%4 = tail call double @array_max(double* %0, i32 %1)
%5 = fsub double 1.000000e+00, %4
%6 = fadd double %3, %5
%7 = fmul double %6, 5.000000e-01
%8 = fsub double %7, %3
%9 = tail call i32 @array_scale(double* %0, i32 %1, double 1.000000e+00, double %8)
ret void
}
float fabsmod(float v, int d) {
  if (v < 0) {
    v += d * ((((int)(v / d)) * (-1)) + 1);
    return (v);
  } else {
    v -= d * (((int)(v / d)) + 1);
    return (v);
  }
}


x86 assembly (clang, -O0):
<fabsmod>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1154 <fabsmod+0x54>
mov    -0xc(%rbp),%eax
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
imul   $0xffffffff,%ecx,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cvtsi2ss %eax,%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118b <fabsmod+0x8b>
mov    -0xc(%rbp),%eax
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cvtsi2ss %eax,%xmm1
movss  -0x8(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsmod>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
xorps  %xmm1,%xmm1
cvtsi2ss %edi,%xmm1
movaps %xmm0,%xmm2
divss  %xmm1,%xmm2
cvttss2si %xmm2,%eax
jbe    1133 <fabsmod+0x33>
mov    $0x1,%ecx
sub    %eax,%ecx
imul   %edi,%ecx
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
addss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret
add    $0x1,%eax
imul   %edi,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fabsmod(float %0, i32 %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
%6 = load float, float* %4
%7 = fcmp olt float %6, 0.000000e+00
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i32, i32* %5
%10 = load float, float* %4
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
%14 = fptosi float %13 to i32
%15 = mul nsw i32 %14, -1
%16 = add nsw i32 %15, 1
%17 = mul nsw i32 %9, %16
%18 = sitofp i32 %17 to float
%19 = load float, float* %4
%20 = fadd float %19, %18
store float %20, float* %4
%21 = load float, float* %4
store float %21, float* %3
br label %35
22: ; preds = %2
%23 = load i32, i32* %5
%24 = load float, float* %4
%25 = load i32, i32* %5
%26 = sitofp i32 %25 to float
%27 = fdiv float %24, %26
%28 = fptosi float %27 to i32
%29 = add nsw i32 %28, 1
%30 = mul nsw i32 %23, %29
%31 = sitofp i32 %30 to float
%32 = load float, float* %4
%33 = fsub float %32, %31
store float %33, float* %4
%34 = load float, float* %4
store float %34, float* %3
br label %35
35: ; preds = %22, %8
%36 = load float, float* %3
ret float %36
}

LLVM IR (-O2):
define float @fabsmod(float %0, i32 %1) {
%3 = fcmp olt float %0, 0.000000e+00
%4 = sitofp i32 %1 to float
%5 = fdiv float %0, %4
%6 = fptosi float %5 to i32
br i1 %3, label %7, label %12
7: ; preds = %2
%8 = sub i32 1, %6
%9 = mul nsw i32 %8, %1
%10 = sitofp i32 %9 to float
%11 = fadd float %10, %0
br label %17
12: ; preds = %2
%13 = add nsw i32 %6, 1
%14 = mul nsw i32 %13, %1
%15 = sitofp i32 %14 to float
%16 = fsub float %0, %15
br label %17
17: ; preds = %12, %7
%18 = phi float [ %11, %7 ], [ %16, %12 ]
ret float %18
}