xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ non_det;

/* Variables and functions */
int /*<<< orphan*/ klee_make_symbolic(double *, int, char *);
double map2check_non_det_double() {
  double non_det;
  klee_make_symbolic(&non_det, sizeof(non_det), "non_det_#type");
  return non_det;
}


x86 assembly (clang, -O0):
<map2check_non_det_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
lea    0xed8(%rip),%rdx
call   1030 <klee_make_symbolic@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map2check_non_det_double>:
push   %rax
lea    0xee8(%rip),%rdx
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <klee_make_symbolic@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"non_det_#type\00"
define double @map2check_non_det_double() {
%1 = alloca double
%2 = call i32 @klee_make_symbolic(double* %1, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load double, double* %1
ret double %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"non_det_#type\00"
define double @map2check_non_det_double() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @klee_make_symbolic(double* %1, i32 8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load double, double* %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *array, int length) {
  for (int i = 0; i < length; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
int main() { int a = 1 * 2 + 3; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int comparefunc(const void *arg1, const void *arg2) {
  const int *ptr1 = (const int *)arg1;
  const int *ptr2 = (const int *)arg2;
  const int val1 = *ptr1;
  const int val2 = *ptr2;
  if (val1 < val2) {
    return -1;
  }
  if (val1 == val2) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<comparefunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1146 <comparefunc+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <comparefunc+0x65>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    115e <comparefunc+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1165 <comparefunc+0x65>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparefunc>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparefunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp ne i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int n(char c) {
  int s = 0;
  switch (c) {
  case 'I':
    s = 1;
    break;
  case 'V':
    s = 5;
    break;
  case 'X':
    s = 10;
    break;
  case 'L':
    s = 50;
    break;
  case 'C':
    s = 100;
    break;
  case 'B':
    s = 256;
    break;
  case '\0':
    s = 0;
    break;
  }
  return s;
}


x86 assembly (clang, -O0):
<n>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     11d3 <n+0xd3>
jmp    1125 <n+0x25>
mov    -0xc(%rbp),%eax
sub    $0x42,%eax
je     11c7 <n+0xc7>
jmp    1136 <n+0x36>
mov    -0xc(%rbp),%eax
sub    $0x43,%eax
je     11bb <n+0xbb>
jmp    1147 <n+0x47>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     118b <n+0x8b>
jmp    1158 <n+0x58>
mov    -0xc(%rbp),%eax
sub    $0x4c,%eax
je     11af <n+0xaf>
jmp    1169 <n+0x69>
mov    -0xc(%rbp),%eax
sub    $0x56,%eax
je     1197 <n+0x97>
jmp    117a <n+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x58,%eax
je     11a3 <n+0xa3>
jmp    11da <n+0xda>
movl   $0x1,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0x5,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0xa,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0x32,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0x64,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0x100,-0x8(%rbp)
jmp    11da <n+0xda>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<n>:
xor    %eax,%eax
add    $0xffffffbe,%edi
cmp    $0x16,%edi
ja     111f <n+0x1f>
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x100,%eax
ret
mov    $0x64,%eax
ret
mov    $0x1,%eax
ret
mov    $0x32,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @n(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 73, label %6
i32 86, label %7
i32 88, label %8
i32 76, label %9
i32 67, label %10
i32 66, label %11
i32 0, label %12
]
6: ; preds = %1
store i32 1, i32* %3
br label %13
7: ; preds = %1
store i32 5, i32* %3
br label %13
8: ; preds = %1
store i32 10, i32* %3
br label %13
9: ; preds = %1
store i32 50, i32* %3
br label %13
10: ; preds = %1
store i32 100, i32* %3
br label %13
11: ; preds = %1
store i32 256, i32* %3
br label %13
12: ; preds = %1
store i32 0, i32* %3
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @n(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 73, label %3
i32 86, label %4
i32 88, label %5
i32 76, label %6
i32 67, label %7
i32 66, label %8
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6, %5, %4, %3
%10 = phi i32 [ 256, %8 ], [ 100, %7 ], [ 50, %6 ], [ 10, %5 ], [ 5, %4 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: xgeometry [window-id]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: xgeometry [window-id]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: xgeometry [window-id]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ driver1();
int /*<<< orphan*/ driver2();
int /*<<< orphan*/ driver3();
int /*<<< orphan*/ driver4();
int /*<<< orphan*/ driver5();
int main() {
  driver1();
  driver2();
  driver3();
  driver4();
  driver5();
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <driver1@plt>
mov    $0x0,%al
call   1040 <driver2@plt>
mov    $0x0,%al
call   1060 <driver3@plt>
mov    $0x0,%al
call   1030 <driver4@plt>
mov    $0x0,%al
call   1070 <driver5@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <driver1@plt>
xor    %eax,%eax
call   1040 <driver2@plt>
xor    %eax,%eax
call   1060 <driver3@plt>
xor    %eax,%eax
call   1030 <driver4@plt>
xor    %eax,%eax
call   1070 <driver5@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @driver1()
%3 = call i32 (...) @driver2()
%4 = call i32 (...) @driver3()
%5 = call i32 (...) @driver4()
%6 = call i32 (...) @driver5()
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @driver1()
%2 = tail call i32 (...) @driver2()
%3 = tail call i32 (...) @driver3()
%4 = tail call i32 (...) @driver4()
%5 = tail call i32 (...) @driver5()
ret i32 1
}
void arm_dt_memblock_free() {}


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

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

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

LLVM IR (-O2):
define void @arm_dt_memblock_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void stop88g(void) { exit(1); }


x86 assembly (clang, -O0):
<stop88g>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<stop88g>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @stop88g() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @stop88g() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
putorg(loc) short int loc;
{
  puto(((loc >> 6) & 0077) | 0100);
  puto(loc & 0077);
}


x86 assembly (clang, -O0):
<putorg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%edi
sar    $0x6,%edi
and    $0x3f,%edi
or     $0x40,%edi
mov    $0x0,%al
call   1030 <puto@plt>
movswl -0x6(%rbp),%edi
and    $0x3f,%edi
mov    $0x0,%al
call   1030 <puto@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putorg>:
push   %rbx
mov    %edi,%ebx
shr    $0x6,%edi
and    $0x3f,%edi
or     $0x40,%edi
xor    %eax,%eax
call   1030 <puto@plt>
and    $0x3f,%ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <puto@plt>

LLVM IR (-O0):
define i32 @putorg(i32 %0) {
%2 = alloca i32
%3 = alloca i16
%4 = trunc i32 %0 to i16
store i16 %4, i16* %3
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = ashr i32 %6, 6
%8 = and i32 %7, 63
%9 = or i32 %8, 64
%10 = call i32 (i32, ...) bitcast (i32 (...)* @puto to i32 (i32, ...)*)(i32 %9)
%11 = load i16, i16* %3
%12 = sext i16 %11 to i32
%13 = and i32 %12, 63
%14 = call i32 (i32, ...) bitcast (i32 (...)* @puto to i32 (i32, ...)*)(i32 %13)
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @putorg(i32 %0) {
%2 = lshr i32 %0, 6
%3 = and i32 %2, 63
%4 = or i32 %3, 64
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @puto to i32 (i32, ...)*)(i32 %4)
%6 = and i32 %0, 63
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @puto to i32 (i32, ...)*)(i32 %6)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f_2(char *a) { printf("f_2\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"f_2\00"
define void @f_2(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntUnregister(scalar_t__);
void stub1(scalar_t__);
void uDMAIntUnregister(uint32_t ui32Base, uint32_t ui32IntChannel) {
  ;
  ;
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[5])(ui32IntChannel);
  NOROM_IntUnregister(ui32IntChannel);
}


x86 assembly (clang, -O0):
<uDMAIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    0x28(%rax),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    -0x10(%rbp),%rdi
call   1030 <NOROM_IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAIntUnregister>:
push   %rbx
mov    %rsi,%rbx
mov    0x100001e0,%rax
10
mov    %rsi,%rdi
call   *0x28(%rax)
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <NOROM_IntUnregister@plt>

LLVM IR (-O0):
define void @uDMAIntUnregister(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%6 = inttoptr i64 %5 to i64*
%7 = getelementptr inbounds i64, i64* %6, i64 5
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to void (i64)*
%10 = load i64, i64* %4
%11 = load i64, i64* %4
%12 = call i32 @NOROM_IntUnregister(i64 %11)
ret void
}

LLVM IR (-O2):
define void @uDMAIntUnregister(i64 %0, i64 %1) {
%3 = load i64, i64* inttoptr (i64 268435936 to i64*)
%4 = inttoptr i64 %3 to i64*
%5 = getelementptr inbounds i64, i64* %4, i64 5
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to void (i64)*
tail call void %7(i64 %1)
%8 = tail call i32 @NOROM_IntUnregister(i64 %1)
ret void
}
void test_no_clause() {
  int i;
#pragma omp parallel for
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for
  ++i;
}


x86 assembly (clang, -O0):
<test_no_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_no_clause+0x28>
jmp    111a <test_no_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_no_clause+0xb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_no_clause() {
ret void
}
float AngleDifference(float a, float b) {
  float angleDiff = a - b;
  while (angleDiff > 180.0f)
    angleDiff -= 360.0f;
  while (angleDiff < -180.0f)
    angleDiff += 360.0f;
  return angleDiff;
}


x86 assembly (clang, -O0):
<AngleDifference>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114e <AngleDifference+0x4e>
movss  -0xc(%rbp),%xmm0
movss  0xec8(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    111d <AngleDifference+0x1d>
jmp    1153 <AngleDifference+0x53>
movss  0xea9(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    117c <AngleDifference+0x7c>
movss  0xe9b(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1153 <AngleDifference+0x53>
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AngleDifference>:
subss  %xmm1,%xmm0
ucomiss 0xef5(%rip),%xmm0
jbe    1129 <AngleDifference+0x29>
movss  0xeef(%rip),%xmm1
movss  0xee3(%rip),%xmm2
nopl   (%rax)
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
ja     1120 <AngleDifference+0x20>
movss  0xed7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1149 <AngleDifference+0x49>
movss  0xece(%rip),%xmm2
xchg   %ax,%ax
addss  %xmm2,%xmm0
ucomiss %xmm0,%xmm1
ja     1140 <AngleDifference+0x40>
ret

LLVM IR (-O0):
define float @AngleDifference(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float %6, %7
store float %8, float* %5
br label %9
9: ; preds = %12, %2
%10 = load float, float* %5
%11 = fcmp ogt float %10, 1.800000e+02
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load float, float* %5
%14 = fsub float %13, 3.600000e+02
store float %14, float* %5
br label %9
15: ; preds = %9
br label %16
16: ; preds = %19, %15
%17 = load float, float* %5
%18 = fcmp olt float %17, -1.800000e+02
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load float, float* %5
%21 = fadd float %20, 3.600000e+02
store float %21, float* %5
br label %16
22: ; preds = %16
%23 = load float, float* %5
ret float %23
}

LLVM IR (-O2):
define float @AngleDifference(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fcmp ogt float %3, 1.800000e+02
br i1 %4, label %8, label %5
5: ; preds = %8, %2
%6 = phi float [ %3, %2 ], [ %10, %8 ]
%7 = fcmp olt float %6, -1.800000e+02
br i1 %7, label %12, label %16
8: ; preds = %2, %8
%9 = phi float [ %10, %8 ], [ %3, %2 ]
%10 = fadd float %9, -3.600000e+02
%11 = fcmp ogt float %10, 1.800000e+02
br i1 %11, label %8, label %5
12: ; preds = %5, %12
%13 = phi float [ %14, %12 ], [ %6, %5 ]
%14 = fadd float %13, 3.600000e+02
%15 = fcmp olt float %14, -1.800000e+02
br i1 %15, label %12, label %16
16: ; preds = %12, %5
%17 = phi float [ %6, %5 ], [ %14, %12 ]
ret float %17
}
int mainCRTStartup() { return 5; }


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

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

LLVM IR (-O0):
define i32 @mainCRTStartup() {
ret i32 5
}

LLVM IR (-O2):
define i32 @mainCRTStartup() {
ret i32 5
}
/* Variables and functions */
int update_crc(int, unsigned char *, int);
unsigned long crc(unsigned char *buf, int len) {
  return update_crc(0xffffffffL, buf, len) ^ 0xffffffffL;
}


x86 assembly (clang, -O0):
<crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%edi
call   1030 <update_crc@plt>
cltq
movabs $0xffffffff,%rcx
xor    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
call   1030 <update_crc@plt>
movslq %eax,%rcx
mov    $0xffffffff,%eax
xor    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @crc(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
%6 = load i32, i32* %4
%7 = call i32 @update_crc(i32 -1, i8* %5, i32 %6)
%8 = sext i32 %7 to i64
%9 = xor i64 %8, 4294967295
ret i64 %9
}

LLVM IR (-O2):
define i64 @crc(i8* %0, i32 %1) {
%3 = tail call i32 @update_crc(i32 -1, i8* %0, i32 %1)
%4 = sext i32 %3 to i64
%5 = xor i64 %4, 4294967295
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ luaI_auxsynterrbf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ luaI_buffer(int);
void luaI_syntaxerror(char *s) { luaI_auxsynterrbf(s, luaI_buffer(1)); }


x86 assembly (clang, -O0):
<luaI_syntaxerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <luaI_buffer@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <luaI_auxsynterrbf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_syntaxerror>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <luaI_buffer@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <luaI_auxsynterrbf@plt>

LLVM IR (-O0):
define void @luaI_syntaxerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @luaI_buffer(i32 1)
%5 = call i32 @luaI_auxsynterrbf(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @luaI_syntaxerror(i8* %0) {
%2 = tail call i32 @luaI_buffer(i32 1)
%3 = tail call i32 @luaI_auxsynterrbf(i8* %0, i32 %2)
ret void
}
void fb_hPostEvent_code_start(void) {}


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

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

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

LLVM IR (-O2):
define void @fb_hPostEvent_code_start() {
ret void
}
int isStartStopCharExpRex(char ch) { return (ch == '\''); }


x86 assembly (clang, -O0):
<isStartStopCharExpRex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x27,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isStartStopCharExpRex>:
xor    %eax,%eax
cmp    $0x27,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isStartStopCharExpRex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 39
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isStartStopCharExpRex(i8 signext %0) {
%2 = icmp eq i8 %0, 39
%3 = zext i1 %2 to i32
ret i32 %3
}
int regZeroBounds(double *xpos, double *ypos) {
  int retval = 1;
  xpos[0] = 0.0;
  xpos[1] = 0.0;
  ypos[0] = 0.0;
  ypos[1] = 0.0;
  return retval;
}


x86 assembly (clang, -O0):
<regZeroBounds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regZeroBounds>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
movups %xmm0,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @regZeroBounds(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store i32 1, i32* %5
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
store double 0.000000e+00, double* %7
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 1
store double 0.000000e+00, double* %9
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 0
store double 0.000000e+00, double* %11
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
store double 0.000000e+00, double* %13
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @regZeroBounds(double* nocapture writeonly %0, double* nocapture writeonly %1) {
%3 = bitcast double* %0 to i8*
%4 = bitcast double* %1 to i8*
ret i32 1
}
prefix(s1, s2) register char *s1, *s2;
{
  register char c;
  while ((c = *s1++) == *s2++)
    if (c == '\0')
      return 1;
  return c == '\0';
}


x86 assembly (clang, -O0):
<prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl %al,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    115b <prefix+0x5b>
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    1156 <prefix+0x56>
movl   $0x1,-0x4(%rbp)
jmp    116d <prefix+0x6d>
jmp    110c <prefix+0xc>
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
cmp    (%rsi,%rax,1),%cl
jne    1127 <prefix+0x27>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <prefix+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @prefix(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %16, label %3
13: ; preds = %3
%14 = icmp eq i8 %6, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %9, %13
%17 = phi i32 [ %15, %13 ], [ 1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ sig_catch(int /*<<< orphan*/, int /*<<< orphan*/);
void sig_alarmdefault() { sig_catch(SIGALRM, SIG_DFL); }


x86 assembly (clang, -O0):
<sig_alarmdefault>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <sig_catch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_alarmdefault>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sig_catch@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
@SIG_DFL = global i32 0
define void @sig_alarmdefault() {
%1 = load i32, i32* @SIGALRM
%2 = load i32, i32* @SIG_DFL
%3 = call i32 @sig_catch(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@SIG_DFL = global i32 0
define void @sig_alarmdefault() {
%1 = load i32, i32* @SIGALRM
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @sig_catch(i32 %1, i32 %2)
ret void
}
/* Type definitions */
struct b_reverb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setReverbMix(struct b_reverb *, float);
void setReverbMixFromMIDI(void *rev, unsigned char v) {
  struct b_reverb *r = (struct b_reverb *)rev;
  setReverbMix(r, (float)v / 127.0);
}


x86 assembly (clang, -O0):
<setReverbMixFromMIDI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
movzbl -0x9(%rbp),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <setReverbMix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setReverbMixFromMIDI>:
cvtsi2sd %esi,%xmm0
divsd  0xee4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
jmp    1030 <setReverbMix@plt>

LLVM IR (-O0):
%struct.b_reverb = type { i32 }
define void @setReverbMixFromMIDI(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca %struct.b_reverb*
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.b_reverb*
store %struct.b_reverb* %7, %struct.b_reverb** %5
%8 = load %struct.b_reverb*, %struct.b_reverb** %5
%9 = load i8, i8* %4
%10 = uitofp i8 %9 to float
%11 = fpext float %10 to double
%12 = fdiv double %11, 1.270000e+02
%13 = fptrunc double %12 to float
%14 = call i32 @setReverbMix(%struct.b_reverb* %8, float %13)
ret void
}

LLVM IR (-O2):
%struct.b_reverb = type { i32 }
define void @setReverbMixFromMIDI(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_reverb*
%4 = uitofp i8 %1 to double
%5 = fdiv double %4, 1.270000e+02
%6 = fptrunc double %5 to float
%7 = tail call i32 @setReverbMix(%struct.b_reverb* %3, float %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void signal_handler_func(int signal_num) {
  printf("[SERVER] "
         "catch signal: %d\n",
         signal_num);
  exit(0);
}


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

x86 assembly (clang, -O2):
<signal_handler_func>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"[SERVER] catch signal: %d\0A\00"
define void @signal_handler_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"[SERVER] catch signal: %d\0A\00"
define void @signal_handler_func(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
unsigned getuid(void) { return 0; }


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

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

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

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

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ destroy_image;
};
struct TYPE_4__ {
  TYPE_1__ f;
};
typedef TYPE_2__ XImage;

/* Variables and functions */
void *get_XImage_f_destroy_image(void *_p) {
  return (void *)((XImage *)_p)->f.destroy_image;
}


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

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

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

LLVM IR (-O2):
define i8* @get_XImage_f_destroy_image(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
unsigned long fls_long(unsigned long);
unsigned long roundup_pow_of_two(unsigned long x) {
  return 1UL << fls_long(x - 1);
}


x86 assembly (clang, -O0):
<roundup_pow_of_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fls_long@plt>
mov    %rax,%rcx
mov    $0x1,%eax
shl    %cl,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup_pow_of_two>:
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <fls_long@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%rdx
mov    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @roundup_pow_of_two(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = call i64 @fls_long(i64 %4)
%6 = shl i64 1, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @roundup_pow_of_two(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i64 @fls_long(i64 %2)
%4 = shl nuw i64 1, %3
ret i64 %4
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
scalar_t__ CLOCKS_PER_SEC;
int GetMilliSeconds(clock_t time) {
  double seconds = (double)time / (double)CLOCKS_PER_SEC;
  int rounded = (int)seconds;
  double ms = ((double)seconds - rounded) * 1000;
  return (int)ms;
}


x86 assembly (clang, -O0):
<GetMilliSeconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xebf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMilliSeconds>:
cvtsi2sd %rdi,%xmm0
mov    0x2edc(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  0xed7(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i64 0
define i32 @GetMilliSeconds(i64 %0) {
%2 = alloca i64
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = sitofp i64 %6 to double
%8 = load i64, i64* @CLOCKS_PER_SEC
%9 = sitofp i64 %8 to double
%10 = fdiv double %7, %9
store double %10, double* %3
%11 = load double, double* %3
%12 = fptosi double %11 to i32
store i32 %12, i32* %4
%13 = load double, double* %3
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = fsub double %13, %15
%17 = fmul double %16, 1.000000e+03
store double %17, double* %5
%18 = load double, double* %5
%19 = fptosi double %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i64 0
define i32 @GetMilliSeconds(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = load i64, i64* @CLOCKS_PER_SEC
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fsub double %5, %7
%9 = fmul double %8, 1.000000e+03
%10 = fptosi double %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ pmu_setting_temp_based(int /*<<< orphan*/);
void pmu_set_clk_init() { pmu_setting_temp_based(0); }


x86 assembly (clang, -O0):
<pmu_set_clk_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pmu_setting_temp_based@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_clk_init>:
xor    %edi,%edi
jmp    1030 <pmu_setting_temp_based@plt>

LLVM IR (-O0):
define void @pmu_set_clk_init() {
%1 = call i32 @pmu_setting_temp_based(i32 0)
ret void
}

LLVM IR (-O2):
define void @pmu_set_clk_init() {
%1 = tail call i32 @pmu_setting_temp_based(i32 0)
ret void
}
yyerror(msg) char msg[];
{}


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

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

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

LLVM IR (-O2):
define i32 @yyerror(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
float sinhf(float);
float r_sinh(float *x) { return (sinhf(*x)); }


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

x86 assembly (clang, -O2):
<r_sinh>:
movss  (%rdi),%xmm0
jmp    1030 <sinhf@plt>

LLVM IR (-O0):
define float @r_sinh(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call float @sinhf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @r_sinh(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @sinhf(float %2)
ret float %3
}
/* Variables and functions */
double pow(double, double);
double hill(double x, double n, double k) {
  return (pow(x, n) / (pow(x, n) + pow(k, n)));
}


x86 assembly (clang, -O0):
<hill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hill>:
sub    $0x28,%rsp
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
addsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @hill(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = call double @pow(double %7, double %8)
%10 = load double, double* %4
%11 = load double, double* %5
%12 = call double @pow(double %10, double %11)
%13 = load double, double* %6
%14 = load double, double* %5
%15 = call double @pow(double %13, double %14)
%16 = fadd double %12, %15
%17 = fdiv double %9, %16
ret double %17
}

LLVM IR (-O2):
define double @hill(double %0, double %1, double %2) {
%4 = tail call double @pow(double %0, double %1)
%5 = tail call double @pow(double %0, double %1)
%6 = tail call double @pow(double %2, double %1)
%7 = fadd double %5, %6
%8 = fdiv double %4, %7
ret double %8
}
/* Type definitions */
struct pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ h_from_xml_node(int, struct pool *, int, struct pool *);
char *pool_ptr(struct pool *, int /*<<< orphan*/);
char *str_from_xml_node(struct pool *pool, int node, struct pool *nodepool) {
  return pool_ptr(pool, h_from_xml_node((-1), pool, node, nodepool));
}


x86 assembly (clang, -O0):
<str_from_xml_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0xffffffff,%edi
call   1040 <h_from_xml_node@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <pool_ptr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_from_xml_node>:
push   %rbx
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rbx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <h_from_xml_node@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <pool_ptr@plt>

LLVM IR (-O0):
%struct.pool = type { i32 }
define i8* @str_from_xml_node(%struct.pool* %0, i32 %1, %struct.pool* %2) {
%4 = alloca %struct.pool*
%5 = alloca i32
%6 = alloca %struct.pool*
store %struct.pool* %0, %struct.pool** %4
store i32 %1, i32* %5
store %struct.pool* %2, %struct.pool** %6
%7 = load %struct.pool*, %struct.pool** %4
%8 = load %struct.pool*, %struct.pool** %4
%9 = load i32, i32* %5
%10 = load %struct.pool*, %struct.pool** %6
%11 = call i32 @h_from_xml_node(i32 -1, %struct.pool* %8, i32 %9, %struct.pool* %10)
%12 = call i8* @pool_ptr(%struct.pool* %7, i32 %11)
ret i8* %12
}

LLVM IR (-O2):
%struct.pool = type { i32 }
define i8* @str_from_xml_node(%struct.pool* %0, i32 %1, %struct.pool* %2) {
%4 = tail call i32 @h_from_xml_node(i32 -1, %struct.pool* %0, i32 %1, %struct.pool* %2)
%5 = tail call i8* @pool_ptr(%struct.pool* %0, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, char const);
int puts(const char *c) {
  int n = 0;
  while (c[n])
    outb(0x3f8, c[n++]);
  return n;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115a <puts+0x4a>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    $0x3f8,%edi
movsbl (%rax,%rcx,1),%esi
call   1030 <outb@plt>
jmp    1123 <puts+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1150 <puts+0x40>
mov    %rdi,%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rbx
add    $0x1,%r15
movsbl %al,%esi
mov    $0x3f8,%edi
call   1030 <outb@plt>
movzbl 0x1(%r14,%rbx,1),%eax
test   %al,%al
jne    1130 <puts+0x20>
jmp    1153 <puts+0x43>
xor    %r15d,%r15d
mov    %r15d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @outb(i32 1016, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4
%13 = trunc i64 %7 to i32
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ 0, %1 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ leds_OFF_all();
int /*<<< orphan*/ leds_binary(int);
int /*<<< orphan*/ leds_init();
int main() {
  int number = 0;
  leds_init();
  leds_OFF_all();
  leds_binary(10);
  leds_OFF_all();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <leds_init@plt>
mov    $0x0,%al
call   1050 <leds_OFF_all@plt>
mov    $0xa,%edi
call   1030 <leds_binary@plt>
mov    $0x0,%al
call   1050 <leds_OFF_all@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <leds_init@plt>
xor    %eax,%eax
call   1050 <leds_OFF_all@plt>
mov    $0xa,%edi
call   1030 <leds_binary@plt>
xor    %eax,%eax
call   1050 <leds_OFF_all@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
%3 = call i32 (...) @leds_init()
%4 = call i32 (...) @leds_OFF_all()
%5 = call i32 @leds_binary(i32 10)
%6 = call i32 (...) @leds_OFF_all()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @leds_init()
%2 = tail call i32 (...) @leds_OFF_all()
%3 = tail call i32 @leds_binary(i32 10)
%4 = tail call i32 (...) @leds_OFF_all()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int yyerror(const char *msg) {
  fprintf(stderr, "Error:%s\n", msg);
  return 0;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"Error:%s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"Error:%s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}