xunge/DecIR huggingface dataset:
double umath_double_normalize_in_2pi(double x) {
  while (x >= ((3.14159265) * 2)) {
    x -= ((3.14159265) * 2);
  }
  while (x < 0.0) {
    x += ((3.14159265) * 2);
  }
  return x;
}


x86 assembly (clang, -O0):
<umath_double_normalize_in_2pi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     113b <umath_double_normalize_in_2pi+0x3b>
movsd  -0x8(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <umath_double_normalize_in_2pi+0x9>
jmp    1140 <umath_double_normalize_in_2pi+0x40>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1165 <umath_double_normalize_in_2pi+0x65>
movsd  0xeaa(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1140 <umath_double_normalize_in_2pi+0x40>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<umath_double_normalize_in_2pi>:
ucomisd 0xef8(%rip),%xmm0
jb     112a <umath_double_normalize_in_2pi+0x2a>
movsd  0xef6(%rip),%xmm1
movsd  0xee6(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jae    1120 <umath_double_normalize_in_2pi+0x20>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    114a <umath_double_normalize_in_2pi+0x4a>
movsd  0xec4(%rip),%xmm2
nopl   0x0(%rax)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1140 <umath_double_normalize_in_2pi+0x40>
ret

LLVM IR (-O0):
define double @umath_double_normalize_in_2pi(double %0) {
%2 = alloca double
store double %0, double* %2
br label %3
3: ; preds = %6, %1
%4 = load double, double* %2
%5 = fcmp oge double %4, 0x401921FB53C8D4F1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load double, double* %2
%8 = fsub double %7, 0x401921FB53C8D4F1
store double %8, double* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load double, double* %2
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load double, double* %2
%15 = fadd double %14, 0x401921FB53C8D4F1
store double %15, double* %2
br label %10
16: ; preds = %10
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @umath_double_normalize_in_2pi(double %0) {
%2 = fcmp ult double %0, 0x401921FB53C8D4F1
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, 0xC01921FB53C8D4F1
%9 = fcmp ult double %8, 0x401921FB53C8D4F1
br i1 %9, label %3, label %6
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, 0x401921FB53C8D4F1
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
void EXTI9_5_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @EXTI9_5_IRQHandler() {
ret void
}
double berechne_annuitaet(double zinssatz, double tilgungsrate) {
  double annuitaet = zinssatz + tilgungsrate;
  return annuitaet;
}


x86 assembly (clang, -O0):
<berechne_annuitaet>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<berechne_annuitaet>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @berechne_annuitaet(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @berechne_annuitaet(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
int _start() {
  asm("mov $127,%ebx\n"
      "mov $1,%eax\n"
      "int $0x80\n");
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f,%ebx
mov    $0x1,%eax
int    $0x80
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
mov    $0x7f,%ebx
mov    $0x1,%eax
int    $0x80
ret

LLVM IR (-O0):
define i32 @_start() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @_start() {
tail call void asm sideeffect "mov $$127,%ebx\0Amov $$1,%eax\0Aint $$0x80\0A", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void priv_net_close_socket(int sock) { close(sock); }


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

x86 assembly (clang, -O2):
<priv_net_close_socket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @priv_net_close_socket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void normalize_path(char *path) {}


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

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

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

LLVM IR (-O2):
define void @normalize_path(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct vector {
  int dummy;
};

/* Variables and functions */
int vector_insert_at(struct vector *, int /*<<< orphan*/, void *);
int vector_insert_front(struct vector *__restrict vec, void *data) {
  return vector_insert_at(vec, 0, data);
}


x86 assembly (clang, -O0):
<vector_insert_front>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <vector_insert_at@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_insert_front>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <vector_insert_at@plt>

LLVM IR (-O0):
%struct.vector = type { i32 }
define i32 @vector_insert_front(%struct.vector* noalias %0, i8* %1) {
%3 = alloca %struct.vector*
%4 = alloca i8*
store %struct.vector* %0, %struct.vector** %3
store i8* %1, i8** %4
%5 = load %struct.vector*, %struct.vector** %3
%6 = load i8*, i8** %4
%7 = call i32 @vector_insert_at(%struct.vector* %5, i32 0, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.vector = type { i32 }
define i32 @vector_insert_front(%struct.vector* noalias %0, i8* %1) {
%3 = tail call i32 @vector_insert_at(%struct.vector* %0, i32 0, i8* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ is_uppercase(char);
char to_lowercase(char c) {
  if (is_uppercase(c)) {
    c += ' ';
  }
  return c;
}


x86 assembly (clang, -O0):
<to_lowercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <is_uppercase@plt>
cmp    $0x0,%rax
je     113b <to_lowercase+0x2b>
movsbl -0x1(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lowercase>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_uppercase@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @to_lowercase(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_uppercase(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = add nsw i32 %8, 32
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %6, %1
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @to_lowercase(i8 signext %0) {
%2 = tail call i64 @is_uppercase(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
void *bmalloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *bzalloc(size_t size) {
  void *mem = bmalloc(size);
  if (mem)
    memset(mem, 0, size);
  return mem;
}


x86 assembly (clang, -O0):
<bzalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bmalloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <bzalloc+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <bmalloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <bzalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @bzalloc(i64 %0) {
%2 = tail call i8* @bmalloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void avio_read() {}


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

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

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

LLVM IR (-O2):
define void @avio_read() {
ret void
}
/* Variables and functions */
float cos(float);
float FastCos(float x) { return cos(x); }


x86 assembly (clang, -O0):
<FastCos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastCos>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define float @FastCos(float %0) {
%2 = tail call float @cos(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World, C!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello World, C!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello World, C!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(int argc, char **argv) {
  if (argc != 3) {
    printf("Usage: %s <SRC> <DST>\n", argv[0]);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
je     1153 <usage+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
cmp    $0x3,%edi
jne    1126 <usage+0x6>
ret
push   %rax
mov    (%rsi),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: %s <SRC> <DST>\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 3
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: %s <SRC> <DST>\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
int ilog2(int n) {
  int i = 0, m = n;
  while (m > 1)
    ++i, m = (m + 1) >> 1;
  return i;
}


x86 assembly (clang, -O0):
<ilog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1138 <ilog2+0x38>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <ilog2+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog2>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111f <ilog2+0x1f>
xor    %eax,%eax
nopl   0x0(%rax)
add    $0x1,%eax
lea    0x1(%rdi),%ecx
shr    %ecx
cmp    $0x2,%edi
mov    %ecx,%edi
ja     1110 <ilog2+0x10>
ret

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

LLVM IR (-O2):
define i32 @ilog2(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = lshr i32 %7, 1
%9 = icmp ugt i32 %4, 2
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
int WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int getWaitExitCode(int *statp) {
  if (WIFEXITED(*statp))
    return WEXITSTATUS(*statp);
  else
    return -1;
}


x86 assembly (clang, -O0):
<getWaitExitCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <WIFEXITED@plt>
cmp    $0x0,%rax
je     1154 <getWaitExitCode+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <WEXITSTATUS@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <getWaitExitCode+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWaitExitCode>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <WIFEXITED@plt>
test   %rax,%rax
je     1138 <getWaitExitCode+0x18>
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <WEXITSTATUS@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getWaitExitCode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i64 @WIFEXITED(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %0
%7 = tail call i32 @WEXITSTATUS(i32 %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  puts("\n*** Unit tests disabled in this build\n*** Use ./configure "
       "--enable-check to enable them\n");
  return 77;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4d,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4d,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [90 x i8] c"\0A*** Unit tests disabled in this build\0A*** Use ./configure --enable-check to enable them\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @puts(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0))
ret i32 77
}

LLVM IR (-O2):
@.str = [90 x i8] c"\0A*** Unit tests disabled in this build\0A*** Use ./configure --enable-check to enable them\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0))
ret i32 77
}
void X509_get_ext(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
scalar_t__ ftell(int /*<<< orphan*/ *);
int filelength(const char *filename) {
  FILE *ifp;
  int length = 0;
  ifp = fopen(filename, "r");
  fseek(ifp, 0, SEEK_END);
  length = (int)ftell(ifp);
  fclose(ifp);
  return length;
}


x86 assembly (clang, -O0):
<filelength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e76(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1040 <ftell@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filelength>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
define i32 @filelength(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %3
%11 = call i64 @ftell(i32* %10)
%12 = trunc i64 %11 to i32
store i32 %12, i32* %4
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
define i32 @filelength(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %2, i32 0, i32 %3)
%5 = tail call i64 @ftell(i32* %2)
%6 = trunc i64 %5 to i32
%7 = tail call i32 @fclose(i32* %2)
ret i32 %6
}
void ringreset() {
  int iput = 0;
  int iget = 0;
  int n = 0;
}


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

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

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

LLVM IR (-O2):
define void @ringreset() {
ret void
}
/* Type definitions */
struct spdif_encoder {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ spdif_init_bytes(struct spdif_encoder *);
void spdif_init(struct spdif_encoder *spdif) { spdif_init_bytes(spdif); }


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

x86 assembly (clang, -O2):
<spdif_init>:
jmp    1030 <spdif_init_bytes@plt>

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

LLVM IR (-O2):
%struct.spdif_encoder = type { i32 }
define void @spdif_init(%struct.spdif_encoder* %0) {
%2 = tail call i32 @spdif_init_bytes(%struct.spdif_encoder* %0)
ret void
}
int filter_any(const char *name, const struct stat *s) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @filter_any(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ AboutDlgProc();
void GPU_about(void) {
  AboutDlgProc();
  return;
}


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

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

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

LLVM IR (-O2):
define void @GPU_about() {
%1 = tail call i32 (...) @AboutDlgProc()
ret void
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_n_sep_by_space(struct _Locale_monetary *lmon) { return CHAR_MAX; }


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

x86 assembly (clang, -O2):
<_Locale_n_sep_by_space>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_n_sep_by_space(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_n_sep_by_space(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
int HelpItem117(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem117() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
char *emalloc(int n) {
  char *tmp;
  if (!(tmp = (char *)malloc(n)))
    fatal("not enough memory", (char *)0);
  memset(tmp, 0, n);
  return tmp;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1161 <emalloc+0x31>
lea    0xea8(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <fatal@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <emalloc+0x20>
lea    0xeb7(%rip),%rdi
xor    %esi,%esi
call   1050 <fatal@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"not enough memory\00"
define i8* @emalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* null)
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = load i32, i32* %2
%13 = call i32 @memset(i8* %11, i32 0, i32 %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [18 x i8] c"not enough memory\00"
define i8* @emalloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* null)
br label %7
7: ; preds = %5, %1
%8 = tail call i32 @memset(i8* %3, i32 0, i32 %0)
ret i8* %3
}
/* Variables and functions */
int sci_get_chip_id();
int soc_id_is_sc9630v0(void) {
  return ((sci_get_chip_id() & (0xFFFFF000)) == ((0x96300000) & (0xFFFFF000)));
}


x86 assembly (clang, -O0):
<soc_id_is_sc9630v0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <sci_get_chip_id@plt>
and    $0xfffff000,%eax
cmp    $0x96300000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<soc_id_is_sc9630v0>:
push   %rax
xor    %eax,%eax
call   1030 <sci_get_chip_id@plt>
and    $0xfffff000,%eax
xor    %ecx,%ecx
cmp    $0x96300000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @soc_id_is_sc9630v0() {
%1 = call i32 (...) @sci_get_chip_id()
%2 = and i32 %1, -4096
%3 = icmp eq i32 %2, -1775239168
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @soc_id_is_sc9630v0() {
%1 = tail call i32 (...) @sci_get_chip_id()
%2 = and i32 %1, -4096
%3 = icmp eq i32 %2, -1775239168
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc3(void) {
  printf("Executing exitfunc"
         "3"
         ".\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Executing exitfunc3.\0A\00"
define void @exitfunc3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"Executing exitfunc3.\00"
define void @exitfunc3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int destroyNLSocket(int sock) {
  if (sock <= 0) {
    printf("ERROR - %s:%d :: Invalid input netlink socket %d\n", __func__, 207,
           sock);
    return -1;
  }
  close(sock);
  return 0;
}


x86 assembly (clang, -O0):
<destroyNLSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     115e <destroyNLSocket+0x3e>
mov    -0x8(%rbp),%ecx
lea    0xec1(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0xcf,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <destroyNLSocket+0x4f>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroyNLSocket>:
push   %rbx
mov    %edi,%ecx
test   %edi,%edi
jle    1134 <destroyNLSocket+0x14>
xor    %ebx,%ebx
mov    %ecx,%edi
xor    %eax,%eax
call   1040 <close@plt>
jmp    1153 <destroyNLSocket+0x33>
lea    0xec5(%rip),%rdi
lea    0xef0(%rip),%rsi
mov    $0xcf,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"ERROR - %s:%d :: Invalid input netlink socket %d\0A\00"
@__func__.destroyNLSocket = [16 x i8] c"destroyNLSocket\00"
define i32 @destroyNLSocket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.destroyNLSocket, i64 0, i64 0), i32 207, i32 %7)
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %10)
store i32 0, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [50 x i8] c"ERROR - %s:%d :: Invalid input netlink socket %d\0A\00"
@__func__.destroyNLSocket = [16 x i8] c"destroyNLSocket\00"
define i32 @destroyNLSocket(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.destroyNLSocket, i64 0, i64 0), i32 207, i32 %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ -1, %3 ], [ 0, %5 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
bool absolute_chaos() {
  if ((double)rand() / (double)RAND_MAX < 0.15)
    return true;
  return false;
}


x86 assembly (clang, -O0):
<absolute_chaos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm1
mov    0x2ebd(%rip),%rax
cvtsi2sdq (%rax),%xmm0
divsd  %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1152 <absolute_chaos+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1159 <absolute_chaos+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute_chaos>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xecb(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @absolute_chaos() {
%1 = alloca i32
%2 = call i64 (...) @rand()
%3 = sitofp i64 %2 to double
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
%7 = fcmp olt double %6, 1.500000e-01
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @absolute_chaos() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = fcmp olt double %5, 1.500000e-01
%7 = zext i1 %6 to i32
ret i32 %7
}
double mjd2jd(double mjd) { return mjd + 2400000.5; }


x86 assembly (clang, -O0):
<mjd2jd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @mjd2jd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 0x41424F8040000000
ret double %4
}

LLVM IR (-O2):
define double @mjd2jd(double %0) {
%2 = fadd double %0, 0x41424F8040000000
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadByte(int /*<<< orphan*/, int);
uint8_t wiznetGetSocketStatus(uint8_t socket) {
  return wiznetRegReadByte(socket, (0x0000 + 0x0003));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketStatus>:
mov    $0x3,%esi
jmp    1030 <wiznetRegReadByte@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketStatus(i32 %0) {
%2 = tail call i32 @wiznetRegReadByte(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
main() { yyparse(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @yyparse()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ forward_aux_longdata(int, int, unsigned char, unsigned char,
                                        int, unsigned char *);
int forward_digimax(unsigned char *buff) {
  int j;
  for (j = 0; j < 3; j++) {
    forward_aux_longdata(10, j + 1, buff[0], buff[1], 6, buff);
  }
  return 0;
}


x86 assembly (clang, -O0):
<forward_digimax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1168 <forward_digimax+0x58>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    -0x8(%rbp),%r9
mov    $0xa,%edi
mov    $0x6,%r8d
movzbl %cl,%edx
movzbl %al,%ecx
call   1030 <forward_aux_longdata@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <forward_digimax+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forward_digimax>:
push   %rbx
mov    %rdi,%rbx
movzbl (%rdi),%edx
movzbl 0x1(%rdi),%ecx
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x6,%r8d
mov    %rbx,%r9
call   1030 <forward_aux_longdata@plt>
movzbl (%rbx),%edx
movzbl 0x1(%rbx),%ecx
mov    $0xa,%edi
mov    $0x2,%esi
mov    $0x6,%r8d
mov    %rbx,%r9
call   1030 <forward_aux_longdata@plt>
movzbl (%rbx),%edx
movzbl 0x1(%rbx),%ecx
mov    $0xa,%edi
mov    $0x3,%esi
mov    $0x6,%r8d
mov    %rbx,%r9
call   1030 <forward_aux_longdata@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @forward_digimax(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = load i8, i8* %2
%5 = tail call i32 @forward_aux_longdata(i32 10, i32 1, i8 zeroext %3, i8 zeroext %4, i32 6, i8* %0)
%6 = load i8, i8* %0
%7 = load i8, i8* %2
%8 = tail call i32 @forward_aux_longdata(i32 10, i32 2, i8 zeroext %6, i8 zeroext %7, i32 6, i8* %0)
%9 = load i8, i8* %0
%10 = load i8, i8* %2
%11 = tail call i32 @forward_aux_longdata(i32 10, i32 3, i8 zeroext %9, i8 zeroext %10, i32 6, i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void StringTools_destroyString(char *string) { free(string); }


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

x86 assembly (clang, -O2):
<StringTools_destroyString>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @StringTools_destroyString(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ print(char *);
void main() {
  clear_screen();
  print("Kernel bootstrappted successfully!");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clear_screen@plt>
lea    0xece(%rip),%rdi
call   1030 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <clear_screen@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Kernel bootstrappted successfully!\00"
define void @main() {
%1 = call i32 (...) @clear_screen()
%2 = call i32 @print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Kernel bootstrappted successfully!\00"
define void @main() {
%1 = tail call i32 (...) @clear_screen()
%2 = tail call i32 @print(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
void mt_trace_sft_start(void *func) {}


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

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

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

LLVM IR (-O2):
define void @mt_trace_sft_start(i8* nocapture %0) {
ret void
}
void event_tempo(n, a, b, rel, pre, post) int n;
int a, b, rel;
char *pre;
char *post;
{}


x86 assembly (clang, -O0):
<event_tempo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @event_tempo(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
ret void
}
int s5p_ddc_resume(struct i2c_client *cl) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.i2c_client = type opaque
define i32 @s5p_ddc_resume(%struct.i2c_client* nocapture readnone %0) {
ret i32 0
}
void prefetchw(const void *ptr) { __builtin_prefetch(ptr, 1, 3); }


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

x86 assembly (clang, -O2):
<prefetchw>:
prefetcht0 (%rdi)
ret

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

LLVM IR (-O2):
define void @prefetchw(i8* nocapture %0) {
tail call void @llvm.prefetch.p0i8(i8* %0, i32 1, i32 3, i32 1)
ret void
}
/* Type definitions */
struct cec_msg {
  int *msg;
};
typedef int __u8;
typedef int __u16;

/* Variables and functions */
void cec_ops_report_physical_addr(const struct cec_msg *msg, __u16 *phys_addr,
                                  __u8 *prim_devtype) {
  *phys_addr = (msg->msg[2] << 8) | msg->msg[3];
  *prim_devtype = msg->msg[4];
}


x86 assembly (clang, -O0):
<cec_ops_report_physical_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     0xc(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_ops_report_physical_addr>:
mov    (%rdi),%rax
mov    0x8(%rax),%ecx
shl    $0x8,%ecx
or     0xc(%rax),%ecx
mov    %ecx,(%rsi)
mov    0x10(%rax),%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32* }
define void @cec_ops_report_physical_addr(%struct.cec_msg* %0, i32* %1, i32* %2) {
%4 = alloca %struct.cec_msg*
%5 = alloca i32*
%6 = alloca i32*
store %struct.cec_msg* %0, %struct.cec_msg** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.cec_msg*, %struct.cec_msg** %4
%8 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %7, i32 0, i32 0
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = shl i32 %11, 8
%13 = load %struct.cec_msg*, %struct.cec_msg** %4
%14 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %13, i32 0, i32 0
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 3
%17 = load i32, i32* %16
%18 = or i32 %12, %17
%19 = load i32*, i32** %5
store i32 %18, i32* %19
%20 = load %struct.cec_msg*, %struct.cec_msg** %4
%21 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %20, i32 0, i32 0
%22 = load i32*, i32** %21
%23 = getelementptr inbounds i32, i32* %22, i64 4
%24 = load i32, i32* %23
%25 = load i32*, i32** %6
store i32 %24, i32* %25
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32* }
define void @cec_ops_report_physical_addr(%struct.cec_msg* nocapture %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = getelementptr inbounds i32, i32* %5, i64 3
%10 = load i32, i32* %9
%11 = or i32 %8, %10
store i32 %11, i32* %1
%12 = getelementptr inbounds i32, i32* %5, i64 4
%13 = load i32, i32* %12
store i32 %13, i32* %2
ret void
}
int ol_backend_kelvin_tanner_init(struct ol_backend_kelvin_s *self) {
  (void)(self);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.ol_backend_kelvin_s = type opaque
define i32 @ol_backend_kelvin_tanner_init(%struct.ol_backend_kelvin_s* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
char *fgets_or_exit(char *buffer, int size, FILE *stream) {
  if (fgets(buffer, size, stream) == NULL) {
    printf("<Serveur> Un client a quitté le serveur.\n");
    exit(0);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<fgets_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1170 <fgets_or_exit+0x40>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets_or_exit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fgets@plt>
test   %rax,%rax
je     1143 <fgets_or_exit+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"<Serveur> Un client a quitt\C3\A9 le serveur.\0A\00"
define i8* @fgets_or_exit(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32* @fgets(i8* %7, i32 %8, i32* %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %3
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
@str = [42 x i8] c"<Serveur> Un client a quitt\C3\A9 le serveur.\00"
define i8* @fgets_or_exit(i8* returned %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %3
ret i8* %0
}