xunge/DecIR huggingface dataset:
/* Variables and functions */
double RAND_MAX;
double cos(double);
scalar_t__ rand();
double sin(double);
void random_complex(double *re, double *im) {
  double angle = ((double)rand()) / RAND_MAX;
  *re = cos(angle);
  *im = sin(angle);
}


x86 assembly (clang, -O0):
<random_complex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2e95(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_complex>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2e9b(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define void @random_complex(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
store double %9, double* %5
%10 = load double, double* %5
%11 = call double @cos(double %10)
%12 = load double*, double** %3
store double %11, double* %12
%13 = load double, double* %5
%14 = call double @sin(double %13)
%15 = load double*, double** %4
store double %14, double* %15
ret void
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define void @random_complex(double* nocapture writeonly %0, double* nocapture writeonly %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = tail call double @cos(double %6)
store double %7, double* %0
%8 = tail call double @sin(double %6)
store double %8, double* %1
ret void
}
void intShutdown() {}


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

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

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

LLVM IR (-O2):
define void @intShutdown() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bin_append_posn(int const, int const, char *, size_t);
size_t strlen(char *);
__attribute__((visibility("hidden"))) void
bin_append(const int arg, const int length, char *binary) {
  size_t posn = strlen(binary);
  bin_append_posn(arg, length, binary, posn);
  binary[posn + length] = '\0';
}


x86 assembly (clang, -O0):
<bin_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <bin_append_posn@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x8(%rbp),%rdx
add    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin_append>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %edi,%r14d
mov    %rdx,%rdi
call   1040 <strlen@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %r15d,%esi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <bin_append_posn@plt>
movslq %r15d,%rax
add    %rbp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define hidden void @bin_append(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %7
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i64, i64* %7
%14 = call i32 @bin_append_posn(i32 %10, i32 %11, i8* %12, i64 %13)
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = add i64 %16, %18
%20 = getelementptr inbounds i8, i8* %15, i64 %19
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
define hidden void @bin_append(i32 %0, i32 %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%5 = tail call i32 @bin_append_posn(i32 %0, i32 %1, i8* %2, i64 %4)
%6 = sext i32 %1 to i64
%7 = add i64 %4, %6
%8 = getelementptr inbounds i8, i8* %2, i64 %7
store i8 0, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_subdirname(void) { printf("mips64"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"mips64\00"
define void @get_subdirname() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
__attribute__((weak)) uint16_t HonggfuzzNetDriverPort(int argc
                                                      __attribute__((unused)),
                                                      char **argv
                                                      __attribute__((unused))) {
  return 8080;
}


x86 assembly (clang, -O0):
<HonggfuzzNetDriverPort>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1f90,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define weak i32 @HonggfuzzNetDriverPort(i32 %0, i8** %1) {
ret i32 8080
}
/* Variables and functions */
int /*<<< orphan*/ Fork();
int main() {
  Fork();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Fork()
ret i32 0
}
int test_tagged_typedef_bitmask4(int val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @test_tagged_typedef_bitmask4(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *, ...);
void doubles_print(const double *a, int len, const char *fmt) {
  for (int i = 0; i < len; i++)
    printf(fmt, a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<doubles_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115c <doubles_print+0x4c>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <doubles_print+0x1a>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubles_print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1159 <doubles_print+0x39>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <doubles_print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @doubles_print(double* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9, %3
%8 = tail call i32 @putchar(i32 10)
ret void
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %14, %9 ]
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %2, double %12)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %7, label %9
}
/* Variables and functions */
int putc(int, int);
int fputs(int dev, char *s) {
  int r = 0, c;
  while ((c = (*s++))) {
    r = putc(dev, c);
  }
  return r;
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1157 <fputs+0x47>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <putc@plt>
mov    %eax,-0x14(%rbp)
jmp    1126 <fputs+0x16>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%cl
test   %cl,%cl
je     1147 <fputs+0x37>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%esi
mov    %ebp,%edi
call   1030 <putc@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <fputs+0x20>
jmp    1149 <fputs+0x39>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fputs(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = sext i8 %6 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i32 @putc(i32 %0, i32 %8)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32 [ 0, %2 ], [ %10, %5 ]
ret i32 %14
}
void swap(int x, int y) {
  int temp;
  temp = x;
  x = y;
  y = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @swap(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ROM_WatchdogIntClear(int);
void ControllerWatchdog(unsigned long ulType) {
  ROM_WatchdogIntClear(0x40000000);
}


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

x86 assembly (clang, -O2):
<ControllerWatchdog>:
mov    $0x40000000,%edi
jmp    1030 <ROM_WatchdogIntClear@plt>

LLVM IR (-O0):
define void @ControllerWatchdog(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @ROM_WatchdogIntClear(i32 1073741824)
ret void
}

LLVM IR (-O2):
define void @ControllerWatchdog(i64 %0) {
%2 = tail call i32 @ROM_WatchdogIntClear(i32 1073741824)
ret void
}
void gtk_notebook_set_current_page() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_set_current_page() {
ret void
}
int main(int argc, char *arg[]) { return 0; }


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

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

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int ypit_year(int);
int __attribute__((no)) ypit_nleaps(int j1a, int j1b) {
  int m = j1b - j1a;
  int n = 365 * (ypit_year(j1b) - ypit_year(j1a));
  return m > n ? m - n : n - m;
}


x86 assembly (clang, -O0):
<ypit_nleaps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ypit_year@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ypit_year@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
imul   $0x16d,%eax,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1164 <ypit_nleaps+0x54>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    116d <ypit_nleaps+0x5d>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ypit_nleaps>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    %esi,%ebp
sub    %edi,%ebp
mov    %esi,%edi
call   1030 <ypit_year@plt>
mov    %eax,%ebx
mov    %r14d,%edi
call   1030 <ypit_year@plt>
sub    %eax,%ebx
imul   $0x16d,%ebx,%eax
mov    %ebp,%ecx
sub    %eax,%ecx
neg    %ecx
sub    %eax,%ebp
cmovle %ecx,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ypit_nleaps(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @ypit_year(i32 %10)
%12 = load i32, i32* %3
%13 = call i32 @ypit_year(i32 %12)
%14 = sub nsw i32 %11, %13
%15 = mul nsw i32 365, %14
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %23
19: ; preds = %2
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = sub nsw i32 %20, %21
br label %27
23: ; preds = %2
%24 = load i32, i32* %6
%25 = load i32, i32* %5
%26 = sub nsw i32 %24, %25
br label %27
27: ; preds = %23, %19
%28 = phi i32 [ %22, %19 ], [ %26, %23 ]
ret i32 %28
}

LLVM IR (-O2):
define i32 @ypit_nleaps(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = tail call i32 @ypit_year(i32 %1)
%5 = tail call i32 @ypit_year(i32 %0)
%6 = sub nsw i32 %4, %5
%7 = mul nsw i32 %6, 365
%8 = icmp sgt i32 %3, %7
%9 = sub nsw i32 %3, %7
%10 = sub nsw i32 %7, %3
%11 = select i1 %8, i32 %9, i32 %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _soxr_simd32_aligned_free(void *p1) {
  if (p1)
    free(*((void **)p1 - 1));
}


x86 assembly (clang, -O0):
<_soxr_simd32_aligned_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <_soxr_simd32_aligned_free+0x24>
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_soxr_simd32_aligned_free>:
test   %rdi,%rdi
je     111e <_soxr_simd32_aligned_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @_soxr_simd32_aligned_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int create_quaddobl_homotopy_with_given_gamma(double gamma_re,
                                              double gamma_im) {
  int *a, *b, fail;
  double c[2];
  c[0] = gamma_re;
  c[1] = gamma_im;
  fail = _ada_use_c2phc(183, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<create_quaddobl_homotopy_with_given_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0xb7,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_quaddobl_homotopy_with_given_gamma>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %rsp,%rcx
mov    $0xb7,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @create_quaddobl_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [2 x double]
store double %0, double* %3
store double %1, double* %4
%9 = load double, double* %3
%10 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
store double %9, double* %10
%11 = load double, double* %4
%12 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
store double %11, double* %12
%13 = load i32*, i32** %5
%14 = load i32*, i32** %6
%15 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%16 = call i32 @_ada_use_c2phc(i32 183, i32* %13, i32* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @create_quaddobl_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca [2 x double]
%4 = bitcast [2 x double]* %3 to i8*
%5 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
store double %0, double* %5
%6 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
store double %1, double* %6
%7 = call i32 @_ada_use_c2phc(i32 183, i32* undef, i32* undef, double* %5)
ret i32 %7
}
/* Variables and functions */
scalar_t__ LeoGeo_size_of_lba(int, int);
int LeoGeo_lba_to_offset(int type, int lba) {
  int offset = 0;
  int i;
  for (i = 0; i < lba; i++)
    offset += LeoGeo_size_of_lba(type, i);
  return offset;
}


x86 assembly (clang, -O0):
<LeoGeo_lba_to_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <LeoGeo_lba_to_offset+0x4e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <LeoGeo_size_of_lba@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112c <LeoGeo_lba_to_offset+0x1c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LeoGeo_lba_to_offset>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <LeoGeo_lba_to_offset+0x36>
mov    %esi,%r15d
mov    %edi,%r14d
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <LeoGeo_size_of_lba@plt>
add    %eax,%ebp
add    $0x1,%ebx
cmp    %ebx,%r15d
jne    1130 <LeoGeo_lba_to_offset+0x20>
jmp    1148 <LeoGeo_lba_to_offset+0x38>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @LeoGeo_lba_to_offset(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32 [ %9, %4 ], [ 0, %2 ]
%7 = tail call i64 @LeoGeo_size_of_lba(i32 %0, i32 %5)
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi i32 [ 0, %2 ], [ %9, %4 ]
ret i32 %13
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) float FusionFastInverseSqrt(const float x) {
  float halfx = 0.5f * x;
  float y = x;
  int32_t i = *(int32_t *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  y = y * (1.5f - (halfx * y * y));
  return y;
}


x86 assembly (clang, -O0):
<FusionFastInverseSqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x5f3759df,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe8e(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FusionFastInverseSqrt>:
movd   %xmm0,%eax
sar    %eax
mov    $0x5f3759df,%ecx
sub    %eax,%ecx
movd   %ecx,%xmm1
mulss  0xee7(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
addss  0xedb(%rip),%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @FusionFastInverseSqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %2
%6 = load float, float* %2
%7 = fmul float 5.000000e-01, %6
store float %7, float* %3
%8 = load float, float* %2
store float %8, float* %4
%9 = bitcast float* %4 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = ashr i32 %11, 1
%13 = sub nsw i32 1597463007, %12
store i32 %13, i32* %5
%14 = bitcast i32* %5 to float*
%15 = load float, float* %14
store float %15, float* %4
%16 = load float, float* %4
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fmul float %17, %18
%20 = load float, float* %4
%21 = fneg float %19
%22 = call float @llvm.fmuladd.f32(float %21, float %20, float 1.500000e+00)
%23 = fmul float %16, %22
store float %23, float* %4
%24 = load float, float* %4
ret float %24
}

LLVM IR (-O2):
define float @FusionFastInverseSqrt(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = sub nsw i32 1597463007, %3
%5 = bitcast i32 %4 to float
%6 = fmul float %0, -5.000000e-01
%7 = fmul float %6, %5
%8 = tail call float @llvm.fmuladd.f32(float %7, float %5, float 1.500000e+00)
%9 = fmul float %8, %5
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
int printf(const char *restrict string, ...) {
  putchar(string[0]);
  return 0;
}


x86 assembly (clang, -O0):
<printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf>:
push   %rax
movsbl (%rdi),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @printf(i8* noalias %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i32 @putchar(i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @printf(i8* noalias nocapture %0, ...) {
%2 = load i8, i8* %0
%3 = tail call i32 @putchar(i8 signext %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
extern unsigned int hashlib_index(char *key) {
  unsigned int index;
  assert(key);
  index = 0;
  while (*key) {
    index = 5 * index + *key;
    key++;
  }
  return index;
}


x86 assembly (clang, -O0):
<hashlib_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <hashlib_index+0x4a>
imul   $0x5,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <hashlib_index+0x1c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashlib_index>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%cl
test   %cl,%cl
je     1145 <hashlib_index+0x35>
add    $0x1,%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rax,%rax,4),%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <hashlib_index+0x20>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @hashlib_index(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %13, %5 ], [ %3, %1 ]
%7 = phi i32 [ %11, %5 ], [ 0, %1 ]
%8 = phi i8* [ %12, %5 ], [ %0, %1 ]
%9 = mul i32 %7, 5
%10 = sext i8 %6 to i32
%11 = add i32 %9, %10
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %1
%16 = phi i32 [ 0, %1 ], [ %11, %5 ]
ret i32 %16
}
void lm_free() {}


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

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

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

LLVM IR (-O2):
define void @lm_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ k_free(void *);
void khttp_request_clear(void *key, void *val) {
  k_free(key);
  k_free(val);
}


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

x86 assembly (clang, -O2):
<khttp_request_clear>:
push   %rbx
mov    %rsi,%rbx
call   1030 <k_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <k_free@plt>

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

LLVM IR (-O2):
define void @khttp_request_clear(i8* %0, i8* %1) {
%3 = tail call i32 @k_free(i8* %0)
%4 = tail call i32 @k_free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ glutReshapeWindow(int, int);
void myResize(int x, int y) {
  glViewport(0, 0, x, y);
  glutReshapeWindow(x, y);
}


x86 assembly (clang, -O0):
<myResize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1040 <glViewport@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <glutReshapeWindow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myResize>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1040 <glViewport@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <glutReshapeWindow@plt>

LLVM IR (-O0):
define void @myResize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @glutReshapeWindow(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @myResize(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = tail call i32 @glutReshapeWindow(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sigsegv(int sig) {
  printf("Killed\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"Killed\00"
define void @sigsegv(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void monkey(void) {
  int q;
  int a[4];
  int b;
  int c;
  b = b / 2;
  while (b == 3) {
    int x;
    x = q + 2;
  }
  if (c == b) {
    a[2 + 1] = 3;
  }
}


x86 assembly (clang, -O0):
<monkey>:
push   %rbp
mov    %rsp,%rbp
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jne    112a <monkey+0x2a>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x2c(%rbp)
jmp    1112 <monkey+0x12>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    113d <monkey+0x3d>
movl   $0x3,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @monkey() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 2
store i32 %7, i32* %3
br label %8
8: ; preds = %11, %0
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 3
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 2
store i32 %13, i32* %5
br label %8
14: ; preds = %8
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 3
store i32 3, i32* %19
br label %20
20: ; preds = %18, %14
ret void
}

LLVM IR (-O2):
define void @monkey() {
ret void
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qfunord(long double a, long double b) {
  return (_U_Qfcmp(a, b, 1 | 2) != 0);
}


x86 assembly (clang, -O0):
<_U_Qfunord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x3,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfunord>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x3,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @_U_Qfunord(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @_U_Qfcmp(x86_fp80 %5, x86_fp80 %6, i32 3)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_U_Qfunord(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 3)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int yesDialog_wrapper(const char *msg, void *usrptr) {
  int (*xyesDialog)(char *msg) = usrptr;
  return xyesDialog((char *)msg);
}


x86 assembly (clang, -O0):
<yesDialog_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yesDialog_wrapper>:
jmp    *%rsi

LLVM IR (-O0):
define i32 @yesDialog_wrapper(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32 (i8*)*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32 (i8*)*
store i32 (i8*)* %7, i32 (i8*)** %5
%8 = load i32 (i8*)*, i32 (i8*)** %5
%9 = load i8*, i8** %3
%10 = call i32 %8(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yesDialog_wrapper(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32 (i8*)*
%4 = tail call i32 %3(i8* %0)
ret i32 %4
}
void default_free(void *p) { return; }


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

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

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

LLVM IR (-O2):
define void @default_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xc8() {
  Assert_real((isupper(200) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1005, ("isupper should be 0 for 0xc8"));
}


x86 assembly (clang, -O0):
<t_isupper_0xc8>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc8,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3ed,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xc8>:
push   %rax
mov    $0xc8,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3ed,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc8\00"
define void @t_isupper_0xc8() {
%1 = call i64 @isupper(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xc8\00"
define void @t_isupper_0xc8() {
%1 = tail call i64 @isupper(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned FormatWordCountToBitCount(unsigned wordCount) {
  return wordCount * (sizeof(unsigned) * 8);
}


x86 assembly (clang, -O0):
<FormatWordCountToBitCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @FormatWordCountToBitCount(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = mul i64 %4, 32
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @FormatWordCountToBitCount(i32 %0) {
%2 = shl i32 %0, 5
ret i32 %2
}
/* Variables and functions */
char *tokenParser(char *, char *, int, char *);
char *rodIDParser(char *header) {
  return tokenParser(header, " \t", 1, "rodIDParser");
}


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

x86 assembly (clang, -O2):
<rodIDParser>:
lea    0xee9(%rip),%rsi
lea    0xee5(%rip),%rcx
mov    $0x1,%edx
jmp    1030 <tokenParser@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
@.str.1 = [12 x i8] c"rodIDParser\00"
define i8* @rodIDParser(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @tokenParser(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
@.str.1 = [12 x i8] c"rodIDParser\00"
define i8* @rodIDParser(i8* %0) {
%2 = tail call i8* @tokenParser(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i8* %2
}
int test_imm_9Dint32_mem(int *val) {
  return ((*val) & (0x9D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Dint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x9d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Dint32_mem>:
testb  $0x9d,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Dint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 157
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void StorepNoWB(void *ptr, void *val) {
  __atomic_store_n((void **)ptr, val, 5);
}


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

x86 assembly (clang, -O2):
<StorepNoWB>:
xchg   %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @StorepNoWB(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %4
store i8* %8, i8** %5
%9 = bitcast i8** %7 to i64*
%10 = bitcast i8** %5 to i64*
%11 = load i64, i64* %10
store atomic i64 %11, i64* %9 seq_cst
ret void
}

LLVM IR (-O2):
define void @StorepNoWB(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i64*
%4 = ptrtoint i8* %1 to i64
store atomic i64 %4, i64* %3 seq_cst
ret void
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, int *);
int main() {
  int number, is_int;
  is_int = scanf("%d", &number);
  if (is_int != 1) {
    printf("%d \n", -1);
  } else {
    printf("%d \n", is_prime(number));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1172 <main+0x42>
lea    0xea0(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
jmp    1188 <main+0x58>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0xffffffff,%esi
cmp    $0x1,%eax
jne    1157 <main+0x27>
mov    0x4(%rsp),%edi
call   1040 <is_prime@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 -1)
br label %13
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 @is_prime(i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @is_prime(i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ %7, %5 ], [ -1, %0 ]
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void test_non_identifiers() {
  int i, x;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd firstprivate(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

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

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