xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void expression(char *buffer) {
  if (buffer[0] == '_')
    printf("[_dat%s]", buffer);
  else
    fputs(buffer, stdout);
}


x86 assembly (clang, -O0):
<expression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
jne    1151 <expression+0x31>
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1163 <expression+0x43>
mov    -0x8(%rbp),%rdi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression>:
mov    %rdi,%rax
cmpb   $0x5f,(%rdi)
jne    1137 <expression+0x17>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>
mov    0x2ea2(%rip),%rcx
mov    (%rcx),%esi
mov    %rax,%rdi
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"[_dat%s]\00"
@stdout = global i32 0
define void @expression(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 95
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %15
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = load i32, i32* @stdout
%14 = call i32 @fputs(i8* %12, i32 %13)
br label %15
15: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"[_dat%s]\00"
@stdout = global i32 0
define void @expression(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 95
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
6: ; preds = %1
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputs(i8* %0, i32 %7)
br label %9
9: ; preds = %6, %4
ret void
}
int main(void) {
  int foo = 4;
  return 1 + 1 + foo;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 2, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 6
}
/* Variables and functions */
int brk(void *);
scalar_t__ ucc_brk(void *);
void *sbrk(int inc) {
  void *new = (char *)ucc_brk((void *)0) + inc;
  if (brk(new) == -1) {
    return (void *)-1;
  }
  return new;
}


x86 assembly (clang, -O0):
<sbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <ucc_brk@plt>
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <brk@plt>
cmp    $0xffffffff,%eax
jne    1161 <sbrk+0x41>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1169 <sbrk+0x49>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbrk>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %edi,%edi
call   1040 <ucc_brk@plt>
mov    %rax,%rbx
movslq %ebp,%rax
add    %rax,%rbx
mov    %rbx,%rdi
call   1030 <brk@plt>
cmp    $0xffffffff,%eax
mov    $0xffffffffffffffff,%rax
cmovne %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @sbrk(i32 %0) {
%2 = tail call i64 @ucc_brk(i8* null)
%3 = inttoptr i64 %2 to i8*
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = tail call i32 @brk(i8* %5)
%7 = icmp eq i32 %6, -1
%8 = select i1 %7, i8* inttoptr (i64 -1 to i8*), i8* %5
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ flush(void *);
int /*<<< orphan*/ maccess(void *);
size_t rdtsc();
size_t flushandreload(void *addr) {
  size_t time = rdtsc();
  maccess(addr);
  size_t delta = rdtsc() - time;
  flush(addr);
  return delta;
}


x86 assembly (clang, -O0):
<flushandreload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rdtsc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <maccess@plt>
mov    $0x0,%al
call   1040 <rdtsc@plt>
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <flush@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushandreload>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %eax,%eax
call   1040 <rdtsc@plt>
mov    %rax,%r14
mov    %r15,%rdi
call   1050 <maccess@plt>
xor    %eax,%eax
call   1040 <rdtsc@plt>
mov    %rax,%rbx
sub    %r14,%rbx
mov    %r15,%rdi
call   1030 <flush@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @flushandreload(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = call i64 (...) @rdtsc()
store i64 %5, i64* %3
%6 = load i8*, i8** %2
%7 = call i32 @maccess(i8* %6)
%8 = call i64 (...) @rdtsc()
%9 = load i64, i64* %3
%10 = sub i64 %8, %9
store i64 %10, i64* %4
%11 = load i8*, i8** %2
%12 = call i32 @flush(i8* %11)
%13 = load i64, i64* %4
ret i64 %13
}

LLVM IR (-O2):
define i64 @flushandreload(i8* %0) {
%2 = tail call i64 (...) @rdtsc()
%3 = tail call i32 @maccess(i8* %0)
%4 = tail call i64 (...) @rdtsc()
%5 = sub i64 %4, %2
%6 = tail call i32 @flush(i8* %0)
ret i64 %5
}
int main(void) {
  int onehundredandfortytwo = 142;
  return onehundredandfortytwo % 100;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x8e,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 142, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 100
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void addon_event(int event) {}


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

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

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

LLVM IR (-O2):
define void @addon_event(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  while (1) {
    printf("bees ");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <main+0x9>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
jmp    1119 <main+0x9>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [6 x i8] c"bees \00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [6 x i8] c"bees \00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Variables and functions */
int strcasecmp(void *, void *);
int hashmap_utf8_compare_(void *in_context, void *in_left, void *in_right) {
  return strcasecmp(in_left, in_right);
}


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

x86 assembly (clang, -O2):
<hashmap_utf8_compare_>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @hashmap_utf8_compare_(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32 @strcasecmp(i8* %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @hashmap_utf8_compare_(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i32 @strcasecmp(i8* %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/, int *);
void btktermio_clear_input(void) {
  int i;
  ioctl(STDIN_FILENO, FIONREAD, &i);
  while (i-- > 0) {
    getchar();
  }
}


x86 assembly (clang, -O0):
<btktermio_clear_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1163 <btktermio_clear_input+0x43>
mov    $0x0,%al
call   1040 <getchar@plt>
jmp    1143 <btktermio_clear_input+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btktermio_clear_input>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
nopl   (%rax)
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jle    1158 <btktermio_clear_input+0x38>
xor    %eax,%eax
call   1040 <getchar@plt>
jmp    1140 <btktermio_clear_input+0x20>
pop    %rax
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@FIONREAD = global i32 0
define void @btktermio_clear_input() {
%1 = alloca i32
%2 = load i32, i32* @STDIN_FILENO
%3 = load i32, i32* @FIONREAD
%4 = call i32 @ioctl(i32 %2, i32 %3, i32* %1)
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 (...) @getchar()
br label %5
11: ; preds = %5
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@FIONREAD = global i32 0
define void @btktermio_clear_input() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @STDIN_FILENO
%4 = load i32, i32* @FIONREAD
%5 = call i32 @ioctl(i32 %3, i32 %4, i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %14
9: ; preds = %0, %9
%10 = call i32 (...) @getchar()
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
store i32 %12, i32* %1
%13 = icmp sgt i32 %11, 0
br i1 %13, label %9, label %14
14: ; preds = %9, %0
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
char *qfits_get_base_name(const char *filename) {
  char *p;
  p = strrchr(filename, '/');
  return p ? p + 1 : (char *)filename;
}


x86 assembly (clang, -O0):
<qfits_get_base_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <qfits_get_base_name+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <qfits_get_base_name+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qfits_get_base_name>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @qfits_get_base_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @qfits_get_base_name(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void OPENSSL_add_all_algorithms_noconf(void) {}


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

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

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

LLVM IR (-O2):
define void @OPENSSL_add_all_algorithms_noconf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mock_register_call(void (*)(char const *));
void perror(const char *s) { mock_register_call(perror); }


x86 assembly (clang, -O0):
<perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rdi
call   1030 <mock_register_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perror>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <mock_register_call@plt>

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

LLVM IR (-O2):
define void @perror(i8* nocapture readnone %0) {
%2 = tail call i32 @mock_register_call(void (i8*)* @perror)
ret void
}
int KlelGetReleaseMinor(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @KlelGetReleaseMinor() {
ret i32 1
}
/* Variables and functions */
float __infer_nondet_float();
float nexttowardf(float x, long double y) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<nexttowardf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
movss  %xmm0,-0x4(%rbp)
fstpt  -0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @nexttowardf(float %0, x86_fp80 %1) {
%3 = alloca float
%4 = alloca x86_fp80
store float %0, float* %3
store x86_fp80 %1, x86_fp80* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @nexttowardf(float %0, x86_fp80 %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
/* Type definitions */
typedef int uint8_t;
struct pcg_state_16 {
  int dummy;
};

/* Variables and functions */
int pcg_oneseq_16_xsh_rs_8_random_r(struct pcg_state_16 *);
uint8_t pcg_oneseq_16_xsh_rs_8_boundedrand_r(struct pcg_state_16 *rng,
                                             uint8_t bound) {
  uint8_t threshold = ((uint8_t)(-bound)) % bound;
  for (;;) {
    uint8_t r = pcg_oneseq_16_xsh_rs_8_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_oneseq_16_xsh_rs_8_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_oneseq_16_xsh_rs_8_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_oneseq_16_xsh_rs_8_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_oneseq_16_xsh_rs_8_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_oneseq_16_xsh_rs_8_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_oneseq_16_xsh_rs_8_random_r@plt>
test   %eax,%eax
js     1120 <pcg_oneseq_16_xsh_rs_8_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_16 = type { i32 }
define i32 @pcg_oneseq_16_xsh_rs_8_boundedrand_r(%struct.pcg_state_16* %0, i32 %1) {
%3 = alloca %struct.pcg_state_16*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_16* %0, %struct.pcg_state_16** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_16*, %struct.pcg_state_16** %3
%13 = call i32 @pcg_oneseq_16_xsh_rs_8_random_r(%struct.pcg_state_16* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_16 = type { i32 }
define i32 @pcg_oneseq_16_xsh_rs_8_boundedrand_r(%struct.pcg_state_16* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_oneseq_16_xsh_rs_8_random_r(%struct.pcg_state_16* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void rtp2435r_set_count(uint8_t *header, uint16_t count) {
  count = count << 2;
  header[2] |= count >> 8;
  header[3] = count & 0xFF;
}


x86 assembly (clang, -O0):
<rtp2435r_set_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
or     0x8(%rax),%ecx
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp2435r_set_count>:
shl    $0x2,%esi
movzbl %sil,%eax
sar    $0x8,%esi
or     %esi,0x8(%rdi)
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @rtp2435r_set_count(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 2
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = ashr i32 %7, 8
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = or i32 %11, %8
store i32 %12, i32* %10
%13 = load i32, i32* %4
%14 = and i32 %13, 255
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 3
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @rtp2435r_set_count(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = ashr i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = or i32 %6, %4
store i32 %7, i32* %5
%8 = and i32 %3, 252
%9 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initial_values_weight_metric();
int /*<<< orphan*/ printf(char *);
void weight_to_metric() {
  printf("\nTo metric system. (Weight)\n");
  initial_values_weight_metric();
}


x86 assembly (clang, -O0):
<weight_to_metric>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <initial_values_weight_metric@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"\0ATo metric system. (Weight)\0A\00"
define void @weight_to_metric() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @initial_values_weight_metric()
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"\0ATo metric system. (Weight)\00"
define void @weight_to_metric() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @initial_values_weight_metric()
ret void
}
int applyGravity(int js) { return js + -1; }


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

x86 assembly (clang, -O2):
<applyGravity>:
lea    -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @applyGravity(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
ret i32 %4
}

LLVM IR (-O2):
define i32 @applyGravity(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
unsigned short digitlen(long n) {
  short len = 1;
  if (n < 0) {
    n = -n;
    len++;
  }
  while ((n /= 10) > 0)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<digitlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x1,-0xa(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    112f <digitlen+0x2f>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    1134 <digitlen+0x34>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jle    1161 <digitlen+0x61>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    1134 <digitlen+0x34>
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitlen>:
mov    %rdi,%rcx
neg    %rcx
cmovs  %rdi,%rcx
shr    $0x3f,%rdi
add    $0x1,%edi
cmp    $0xa,%rcx
jb     1146 <digitlen+0x46>
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%edi
cmp    $0x63,%rcx
mov    %rdx,%rcx
ja     1130 <digitlen+0x30>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @digitlen(i64 %0) {
%2 = icmp slt i64 %0, 0
%3 = sub nsw i64 0, %0
%4 = select i1 %2, i64 %3, i64 %0
%5 = select i1 %2, i16 2, i16 1
%6 = icmp ugt i64 %4, 9
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i16 [ %11, %7 ], [ %5, %1 ]
%9 = phi i64 [ %10, %7 ], [ %4, %1 ]
%10 = udiv i64 %9, 10
%11 = add i16 %8, 1
%12 = icmp ugt i64 %9, 99
br i1 %12, label %7, label %13
13: ; preds = %7, %1
%14 = phi i16 [ %5, %1 ], [ %11, %7 ]
ret i16 %14
}
/* Variables and functions */
char *parseChars(char const *, int /*<<< orphan*/, int);
char *parseCommand(const char *request) { return parseChars(request, 0, 7); }


x86 assembly (clang, -O0):
<parseCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <parseChars@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseCommand>:
xor    %esi,%esi
mov    $0x7,%edx
jmp    1030 <parseChars@plt>

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

LLVM IR (-O2):
define i8* @parseCommand(i8* %0) {
%2 = tail call i8* @parseChars(i8* %0, i32 0, i32 7)
ret i8* %2
}
/* Variables and functions */
int random();
float rf() { return ((random() % 2048) / 1024.0f) - 1.0f; }


x86 assembly (clang, -O0):
<rf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
mov    $0x800,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  0xed5(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xec5(%rip),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rf>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
lea    0x7ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffff800,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
mulss  0xec9(%rip),%xmm0
addss  0xec5(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rf() {
%1 = call i32 (...) @random()
%2 = srem i32 %1, 2048
%3 = sitofp i32 %2 to float
%4 = fdiv float %3, 1.024000e+03
%5 = fsub float %4, 1.000000e+00
ret float %5
}

LLVM IR (-O2):
define float @rf() {
%1 = tail call i32 (...) @random()
%2 = srem i32 %1, 2048
%3 = sitofp i32 %2 to float
%4 = fmul float %3, 0x3F50000000000000
%5 = fadd float %4, -1.000000e+00
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ glutMainLoopEvent();
void gui_handle_events(void) { glutMainLoopEvent(); }


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

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

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

LLVM IR (-O2):
define void @gui_handle_events() {
%1 = tail call i32 (...) @glutMainLoopEvent()
ret void
}
void pars_o_dirt(long index) {}


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

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

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

LLVM IR (-O2):
define void @pars_o_dirt(i64 %0) {
ret void
}
void eglCopyBuffers(void) { return; }


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

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

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

LLVM IR (-O2):
define void @eglCopyBuffers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GlobalsDeinit();
int /*<<< orphan*/ LOG_DEBUG;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int /*<<< orphan*/ save_state();
int /*<<< orphan*/ set_signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
void handle_sigquit(void) {
  syslog(LOG_DEBUG, "Quit signal");
  save_state();
  GlobalsDeinit();
  set_signal(SIGQUIT, SIG_DFL);
  raise(SIGQUIT);
}


x86 assembly (clang, -O0):
<handle_sigquit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1070 <syslog@plt>
mov    $0x0,%al
call   1060 <save_state@plt>
mov    $0x0,%al
call   1040 <GlobalsDeinit@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
mov    0x2e51(%rip),%rax
mov    (%rax),%esi
call   1050 <set_signal@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigquit>:
push   %rbx
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
call   1070 <syslog@plt>
xor    %eax,%eax
call   1060 <save_state@plt>
xor    %eax,%eax
call   1040 <GlobalsDeinit@plt>
mov    0x2e6d(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e54(%rip),%rax
mov    (%rax),%esi
call   1050 <set_signal@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@LOG_DEBUG = global i32 0
@.str = [12 x i8] c"Quit signal\00"
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
define void @handle_sigquit() {
%1 = load i32, i32* @LOG_DEBUG
%2 = call i32 @syslog(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @save_state()
%4 = call i32 (...) @GlobalsDeinit()
%5 = load i32, i32* @SIGQUIT
%6 = load i32, i32* @SIG_DFL
%7 = call i32 @set_signal(i32 %5, i32 %6)
%8 = load i32, i32* @SIGQUIT
%9 = call i32 @raise(i32 %8)
ret void
}

LLVM IR (-O2):
@LOG_DEBUG = global i32 0
@.str = [12 x i8] c"Quit signal\00"
@SIGQUIT = global i32 0
@SIG_DFL = global i32 0
define void @handle_sigquit() {
%1 = load i32, i32* @LOG_DEBUG
%2 = tail call i32 @syslog(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @save_state()
%4 = tail call i32 (...) @GlobalsDeinit()
%5 = load i32, i32* @SIGQUIT
%6 = load i32, i32* @SIG_DFL
%7 = tail call i32 @set_signal(i32 %5, i32 %6)
%8 = load i32, i32* @SIGQUIT
%9 = tail call i32 @raise(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disable_interrupts();
int /*<<< orphan*/ term_printf(char *, char const *, char const *, int,
                               char const *);
void panic(const char *message, const char *filename, const char *func,
           int line) {
  term_printf("Kernel panic!\n%s, %s:%d: %s", filename, func, line, message);
  disable_interrupts();
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xeb3(%rip),%rdi
call   1030 <term_printf@plt>
mov    $0x0,%al
call   1040 <disable_interrupts@plt>
jmp    1159 <panic+0x39>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%r8
lea    0xed5(%rip),%rdi
call   1030 <term_printf@plt>
xor    %eax,%eax
call   1040 <disable_interrupts@plt>
nopw   0x0(%rax,%rax,1)
jmp    1140 <panic+0x20>

LLVM IR (-O0):
@.str = [28 x i8] c"Kernel panic!\0A%s, %s:%d: %s\00"
define void @panic(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = load i8*, i8** %5
%13 = call i32 @term_printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i8* %12)
%14 = call i32 (...) @disable_interrupts()
br label %15
15: ; preds = %15, %4
br label %15
}

LLVM IR (-O2):
@.str = [28 x i8] c"Kernel panic!\0A%s, %s:%d: %s\00"
define void @panic(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @term_printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3, i8* %0)
%6 = tail call i32 (...) @disable_interrupts()
br label %7
7: ; preds = %7, %4
br label %7
}
void admhc_dump(struct admhcd *ahcd, int verbose) {}


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

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

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

LLVM IR (-O2):
%struct.admhcd = type opaque
define void @admhc_dump(%struct.admhcd* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ failure();
int main() {
  int a = 1;
  return a && failure();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1146 <main+0x36>
mov    $0x0,%al
call   1030 <failure@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @failure()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gluOrtho2D(double, double, double, double);
void Init() {
  glClearColor(0, 0, 0, 0);
  gluOrtho2D(0.0, 600.0, 0.0, 480.0);
}


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <glClearColor@plt>
xorps  %xmm2,%xmm2
movsd  0xec4(%rip),%xmm1
movsd  0xec4(%rip),%xmm3
movaps %xmm2,%xmm0
call   1040 <gluOrtho2D@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <glClearColor@plt>
movsd  0xeca(%rip),%xmm1
movsd  0xeca(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
pop    %rax
jmp    1040 <gluOrtho2D@plt>

LLVM IR (-O0):
define void @Init() {
%1 = call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
%2 = call i32 @gluOrtho2D(double 0.000000e+00, double 6.000000e+02, double 0.000000e+00, double 4.800000e+02)
ret void
}

LLVM IR (-O2):
define void @Init() {
%1 = tail call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @gluOrtho2D(double 0.000000e+00, double 6.000000e+02, double 0.000000e+00, double 4.800000e+02)
ret void
}
/* Type definitions */
struct hdr_histogram {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
scalar_t__ lowest_equivalent_value(struct hdr_histogram *, int /*<<< orphan*/);
bool hdr_values_are_equivalent(struct hdr_histogram *h, int64_t a, int64_t b) {
  return lowest_equivalent_value(h, a) == lowest_equivalent_value(h, b);
}


x86 assembly (clang, -O0):
<hdr_values_are_equivalent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <lowest_equivalent_value@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <lowest_equivalent_value@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdr_values_are_equivalent>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <lowest_equivalent_value@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <lowest_equivalent_value@plt>
xor    %ecx,%ecx
cmp    %rax,%rbp
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.hdr_histogram = type { i32 }
define i32 @hdr_values_are_equivalent(%struct.hdr_histogram* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hdr_histogram*
%5 = alloca i32
%6 = alloca i32
store %struct.hdr_histogram* %0, %struct.hdr_histogram** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.hdr_histogram*, %struct.hdr_histogram** %4
%8 = load i32, i32* %5
%9 = call i64 @lowest_equivalent_value(%struct.hdr_histogram* %7, i32 %8)
%10 = load %struct.hdr_histogram*, %struct.hdr_histogram** %4
%11 = load i32, i32* %6
%12 = call i64 @lowest_equivalent_value(%struct.hdr_histogram* %10, i32 %11)
%13 = icmp eq i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.hdr_histogram = type { i32 }
define i32 @hdr_values_are_equivalent(%struct.hdr_histogram* %0, i32 %1, i32 %2) {
%4 = tail call i64 @lowest_equivalent_value(%struct.hdr_histogram* %0, i32 %1)
%5 = tail call i64 @lowest_equivalent_value(%struct.hdr_histogram* %0, i32 %2)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void mcfioC_CloseSequentialFile(int jstr) {
  fprintf(stderr,
          "mcfioC_CloseSequentialFile: Not available in this library. \n");
  return;
}


x86 assembly (clang, -O0):
<mcfioC_CloseSequentialFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcfioC_CloseSequentialFile>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"mcfioC_CloseSequentialFile: Not available in this library. \0A\00"
define void @mcfioC_CloseSequentialFile(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"mcfioC_CloseSequentialFile: Not available in this library. \0A\00"
define void @mcfioC_CloseSequentialFile(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VDP_fillTileMapRect(unsigned short, int /*<<< orphan*/,
                                       int /*<<< orphan*/, unsigned short,
                                       int /*<<< orphan*/, int);
int /*<<< orphan*/ VDP_getPlanWidth();
void VDP_clearTextLineBG(unsigned short plan, unsigned short y) {
  VDP_fillTileMapRect(plan, 0, 0, y, VDP_getPlanWidth(), 1);
}


x86 assembly (clang, -O0):
<VDP_clearTextLineBG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x8(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1040 <VDP_getPlanWidth@plt>
mov    -0x8(%rbp),%cx
mov    %eax,%r8d
mov    -0x6(%rbp),%ax
xor    %edx,%edx
mov    $0x1,%r9d
movzwl %cx,%edi
mov    %edx,%esi
movzwl %ax,%ecx
call   1030 <VDP_fillTileMapRect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VDP_clearTextLineBG>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <VDP_getPlanWidth@plt>
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <VDP_fillTileMapRect@plt>

LLVM IR (-O0):
define void @VDP_clearTextLineBG(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = call i32 (...) @VDP_getPlanWidth()
%8 = call i32 @VDP_fillTileMapRect(i16 zeroext %5, i32 0, i32 0, i16 zeroext %6, i32 %7, i32 1)
ret void
}

LLVM IR (-O2):
define void @VDP_clearTextLineBG(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 (...) @VDP_getPlanWidth()
%4 = tail call i32 @VDP_fillTileMapRect(i16 zeroext %0, i32 0, i32 0, i16 zeroext %1, i32 %3, i32 1)
ret void
}
/* Variables and functions */
long double naEnergyFullWithSym(char *, int *, int, int, long double, int,
                                long double, long double, int);
long double naEnergyFull(char prefix[], int inputSeq[], int naType, int dangles,
                         long double temperature, long double sodiumconc,
                         long double magnesiumconc, int uselongsalt) {
  return naEnergyFullWithSym(prefix, inputSeq, naType, dangles, temperature, 1,
                             sodiumconc, magnesiumconc, uselongsalt);
}


x86 assembly (clang, -O0):
<naEnergyFull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fstpt  -0x50(%rbp)
mov    %r8d,-0x54(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fldt   -0x50(%rbp)
mov    -0x54(%rbp),%r9d
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x1,%r8d
call   1030 <naEnergyFullWithSym@plt>
fld    %st(0)
fstp   %st(0)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<naEnergyFull>:
mov    %r8d,%r9d
mov    $0x1,%r8d
jmp    1030 <naEnergyFullWithSym@plt>

LLVM IR (-O0):
define x86_fp80 @naEnergyFull(i8* %0, i32* %1, i32 %2, i32 %3, x86_fp80 %4, x86_fp80 %5, x86_fp80 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca x86_fp80
%14 = alloca x86_fp80
%15 = alloca x86_fp80
%16 = alloca i32
store i8* %0, i8** %9
store i32* %1, i32** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store x86_fp80 %4, x86_fp80* %13
store x86_fp80 %5, x86_fp80* %14
store x86_fp80 %6, x86_fp80* %15
store i32 %7, i32* %16
%17 = load i8*, i8** %9
%18 = load i32*, i32** %10
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load x86_fp80, x86_fp80* %13
%22 = load x86_fp80, x86_fp80* %14
%23 = load x86_fp80, x86_fp80* %15
%24 = load i32, i32* %16
%25 = call x86_fp80 @naEnergyFullWithSym(i8* %17, i32* %18, i32 %19, i32 %20, x86_fp80 %21, i32 1, x86_fp80 %22, x86_fp80 %23, i32 %24)
ret x86_fp80 %25
}

LLVM IR (-O2):
define x86_fp80 @naEnergyFull(i8* %0, i32* %1, i32 %2, i32 %3, x86_fp80 %4, x86_fp80 %5, x86_fp80 %6, i32 %7) {
%9 = tail call x86_fp80 @naEnergyFullWithSym(i8* %0, i32* %1, i32 %2, i32 %3, x86_fp80 %4, i32 1, x86_fp80 %5, x86_fp80 %6, i32 %7)
ret x86_fp80 %9
}
int sqlite3IsNaN(double x) {
  volatile double y = x;
  return x != y;
}


x86 assembly (clang, -O0):
<sqlite3IsNaN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlite3IsNaN>:
movsd  %xmm0,-0x8(%rsp)
cmpneqsd -0x8(%rsp),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @sqlite3IsNaN(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store volatile double %4, double* %3
%5 = load double, double* %2
%6 = load volatile double, double* %3
%7 = fcmp une double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @sqlite3IsNaN(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%4 = load volatile double, double* %2
%5 = fcmp une double %4, %0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int f315(int *);
int f316(int *p) { return f315(p); }


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

x86 assembly (clang, -O2):
<f316>:
jmp    1030 <f315@plt>

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

LLVM IR (-O2):
define i32 @f316(i32* %0) {
%2 = tail call i32 @f315(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void INThandler(int sig) {
  printf("Interupted!\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Interupted!\0A\00"
define void @INThandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [12 x i8] c"Interupted!\00"
define void @INThandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ MS_SYNC;
int msync(void *, int, int /*<<< orphan*/);
int sync_data(void *addr) { return msync(addr, (1 << 26), MS_SYNC); }


x86 assembly (clang, -O0):
<sync_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
mov    $0x4000000,%esi
call   1030 <msync@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_data>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
mov    $0x4000000,%esi
jmp    1030 <msync@plt>

LLVM IR (-O0):
@MS_SYNC = global i32 0
define i32 @sync_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @MS_SYNC
%5 = call i32 @msync(i8* %3, i32 67108864, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@MS_SYNC = global i32 0
define i32 @sync_data(i8* %0) {
%2 = load i32, i32* @MS_SYNC
%3 = tail call i32 @msync(i8* %0, i32 67108864, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_addSub() { CALC_appendString("-"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
define void @CALC_addSub() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int sys_memset(char *src, char ch, int size) {
  int i = 0;
  for (i = 0; i < size; i++) {
    *(src + i) = ch;
  }
  return i;
}


x86 assembly (clang, -O0):
<sys_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1147 <sys_memset+0x47>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <sys_memset+0x1f>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_memset>:
push   %rbx
test   %edx,%edx
jle    1124 <sys_memset+0x14>
mov    %edx,%ebx
mov    %edx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
jmp    1126 <sys_memset+0x16>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sys_memset(i8* nocapture writeonly %0, i8 signext %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ 0, %3 ], [ %2, %5 ]
ret i32 %8
}