xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int processNumber(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number, ret = 0;
  scanf("%d", &number);
  ret = processNumber(number);
  if (ret == 0)
    printf("\nNumber is strong\n");
  else
    printf("\nNumber is not strong\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <processNumber@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    117c <main+0x4c>
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
jmp    1188 <main+0x58>
lea    0xe93(%rip),%rdi
call   1040 <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    0x4(%rsp),%edi
call   1030 <processNumber@plt>
test   %eax,%eax
lea    0xec5(%rip),%rax
lea    0xea8(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [22 x i8] c"\0ANumber is not strong\00"
@str.3 = [18 x i8] c"\0ANumber is strong\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 = load i32, i32* %1
%5 = call i32 @processNumber(i32 %4)
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
double fabs(double);
double div_fun(double lhs, double rhs) {
  if (fabs(rhs) < 0.00000001)
    return 0;
  return lhs / rhs;
}


x86 assembly (clang, -O0):
<div_fun>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movaps 0xef6(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    113d <div_fun+0x3d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114c <div_fun+0x4c>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_fun>:
movapd 0xef8(%rip),%xmm3
andpd  %xmm1,%xmm3
xorpd  %xmm2,%xmm2
movsd  0xef8(%rip),%xmm4
ucomisd %xmm3,%xmm4
ja     1126 <div_fun+0x26>
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @div_fun(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = call double @llvm.fabs.f64(double %6)
%8 = fcmp olt double %7, 1.000000e-08
br i1 %8, label %9, label %10
9: ; preds = %2
store double 0.000000e+00, double* %3
br label %14
10: ; preds = %2
%11 = load double, double* %4
%12 = load double, double* %5
%13 = fdiv double %11, %12
store double %13, double* %3
br label %14
14: ; preds = %10, %9
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @div_fun(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %1)
%4 = fcmp olt double %3, 1.000000e-08
%5 = fdiv double %0, %1
%6 = select i1 %4, double 0.000000e+00, double %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
char tolower(int /*<<< orphan*/);
char getYN() {
  char c;
  do {
    c = tolower(getchar());
  } while (c != 'y' && c != 'n');
  printf("\n");
  return c;
}


x86 assembly (clang, -O0):
<getYN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,%edi
call   1050 <tolower@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x79,%ecx
mov    %al,-0x2(%rbp)
je     1168 <getYN+0x38>
movsbl -0x1(%rbp),%eax
cmp    $0x6e,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1138 <getYN+0x8>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getYN>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%edi
call   1050 <tolower@plt>
mov    %eax,%ebx
cmp    $0x79,%al
je     1159 <getYN+0x29>
cmp    $0x6e,%bl
jne    1140 <getYN+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define signext i8 @getYN() {
%1 = alloca i8
br label %2
2: ; preds = %13, %0
%3 = call i32 (...) @getchar()
%4 = call signext i8 @tolower(i32 %3)
store i8 %4, i8* %1
br label %5
5: ; preds = %2
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 121
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8, i8* %1
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 110
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %2, label %15
15: ; preds = %13
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = load i8, i8* %1
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @getYN() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = tail call signext i8 @tolower(i32 %2)
switch i8 %3, label %1 [
i8 121, label %4
i8 110, label %4
]
4: ; preds = %1, %1
%5 = tail call i32 @putchar(i32 10)
ret i8 %3
}
/* Type definitions */
typedef size_t int64_t;
typedef size_t int32_t;

/* Variables and functions */
int64_t aeron_logbuffer_compute_position(int32_t active_term_id,
                                         int32_t term_offset,
                                         size_t position_bits_to_shift,
                                         int32_t initial_term_id) {
  int64_t term_count = active_term_id - initial_term_id;
  return (term_count << position_bits_to_shift) + term_offset;
}


x86 assembly (clang, -O0):
<aeron_logbuffer_compute_position>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    %cl,%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_logbuffer_compute_position>:
sub    %rcx,%rdi
mov    %edx,%ecx
shl    %cl,%rdi
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @aeron_logbuffer_compute_position(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %8
%12 = sub i64 %10, %11
store i64 %12, i64* %9
%13 = load i64, i64* %9
%14 = load i64, i64* %7
%15 = shl i64 %13, %14
%16 = load i64, i64* %6
%17 = add i64 %15, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @aeron_logbuffer_compute_position(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = sub i64 %0, %3
%6 = shl i64 %5, %2
%7 = add i64 %6, %1
ret i64 %7
}
int f(int t[]) { return t[0] + t[2]; }


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

x86 assembly (clang, -O2):
<f>:
mov    0x8(%rdi),%eax
add    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 2
%8 = load i32, i32* %7
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = load i32, i32* %3
%5 = add nsw i32 %4, %2
ret i32 %5
}
void RTRandS64Ex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandS64Ex() {
ret void
}
void LedsP$Led2$set(void) { ReverseGPIOP$1$Out$set(); }


x86 assembly (clang, -O0):
<LedsP$Led2$set>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ReverseGPIOP$1$Out$set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led2$set>:
xor    %eax,%eax
jmp    1030 <ReverseGPIOP$1$Out$set@plt>

LLVM IR (-O0):
define void @"LedsP$Led2$set"() {
%1 = call i32 (...) @"ReverseGPIOP$1$Out$set"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led2$set"() {
%1 = tail call i32 (...) @"ReverseGPIOP$1$Out$set"()
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ close(scalar_t__ const);
int32_t nrf24_spi_close(const int32_t handle) {
  if (handle >= 0) {
    close(handle);
    return 0;
  }
  return -101;
}


x86 assembly (clang, -O0):
<nrf24_spi_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jl     113d <nrf24_spi_close+0x2d>
mov    -0x10(%rbp),%rdi
call   1030 <close@plt>
movq   $0x0,-0x8(%rbp)
jmp    1145 <nrf24_spi_close+0x35>
movq   $0xffffffffffffff9b,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf24_spi_close>:
test   %rdi,%rdi
js     1122 <nrf24_spi_close+0x12>
push   %rax
call   1030 <close@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0xffffffffffffff9b,%rax
ret

LLVM IR (-O0):
define i64 @nrf24_spi_close(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sge i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = call i32 @close(i64 %7)
store i64 0, i64* %2
br label %10
9: ; preds = %1
store i64 -101, i64* %2
br label %10
10: ; preds = %9, %6
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
define i64 @nrf24_spi_close(i64 %0) {
%2 = icmp sgt i64 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ 0, %3 ], [ -101, %1 ]
ret i64 %6
}
void __attribute__((no, noclone)) invalid(int inv) {
  e(0, 0.0);
  asm("breakhere_invalid:");
}


x86 assembly (clang, -O0):
<invalid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <e@plt>

x86 assembly (clang, -O2):
<invalid>:
push   %rax
xorps  %xmm0,%xmm0
xor    %edi,%edi
mov    $0x1,%al
call   1030 <e@plt>

LLVM IR (-O0):
define void @invalid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, double, ...) bitcast (i32 (...)* @e to i32 (i32, double, ...)*)(i32 0, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @invalid(i32 %0) {
%2 = tail call i32 (i32, double, ...) bitcast (i32 (...)* @e to i32 (i32, double, ...)*)(i32 0, double 0.000000e+00)
tail call void asm sideeffect "breakhere_invalid:", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
double mypow(double n, double i) {
  int j;
  double m = 1;
  for (j = 0; j < i; j++) {
    m *= n;
  }
  return m;
}


x86 assembly (clang, -O0):
<mypow>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1153 <mypow+0x53>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1122 <mypow+0x22>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mypow>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    1139 <mypow+0x39>
movsd  0xeee(%rip),%xmm2
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  %xmm0,%xmm2
add    $0x1,%eax
ucomisd %xmm3,%xmm1
ja     1120 <mypow+0x20>
movapd %xmm2,%xmm0
ret
movsd  0xebf(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @mypow(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi double [ %7, %4 ], [ 1.000000e+00, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = fmul double %5, %0
%8 = add nuw nsw i32 %6, 1
%9 = sitofp i32 %8 to double
%10 = fcmp olt double %9, %1
br i1 %10, label %4, label %11
11: ; preds = %4, %2
%12 = phi double [ 1.000000e+00, %2 ], [ %7, %4 ]
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ syscall0(int);
void pause(void) { syscall0(0x2001); }


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2001,%edi
call   1030 <syscall0@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
mov    $0x2001,%edi
jmp    1030 <syscall0@plt>

LLVM IR (-O0):
define void @pause() {
%1 = call i32 @syscall0(i32 8193)
ret void
}

LLVM IR (-O2):
define void @pause() {
%1 = tail call i32 @syscall0(i32 8193)
ret void
}
void DynaClose(void) {}


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

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

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

LLVM IR (-O2):
define void @DynaClose() {
ret void
}
/* Variables and functions */
double rangk12(double *, long, long, long);
double median(double a[], long n) {
  double value = 0.0;
  long k = (n - 1) / 2;
  if (a && (n > 0)) {
    value = rangk12(a, n, k, k);
  }
  return (value);
}


x86 assembly (clang, -O0):
<median>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116e <median+0x5e>
cmpq   $0x0,-0x10(%rbp)
jle    116e <median+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <rangk12@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<median>:
test   %rdi,%rdi
je     1129 <median+0x19>
test   %rsi,%rsi
jle    1129 <median+0x19>
lea    -0x1(%rsi),%rcx
shr    %rcx
mov    %rcx,%rdx
jmp    1030 <rangk12@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @median(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
%6 = alloca i64
store double* %0, double** %3
store i64 %1, i64* %4
store double 0.000000e+00, double* %5
%7 = load i64, i64* %4
%8 = sub nsw i64 %7, 1
%9 = sdiv i64 %8, 2
store i64 %9, i64* %6
%10 = load double*, double** %3
%11 = icmp ne double* %10, null
br i1 %11, label %12, label %21
12: ; preds = %2
%13 = load i64, i64* %4
%14 = icmp sgt i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load double*, double** %3
%17 = load i64, i64* %4
%18 = load i64, i64* %6
%19 = load i64, i64* %6
%20 = call double @rangk12(double* %16, i64 %17, i64 %18, i64 %19)
store double %20, double* %5
br label %21
21: ; preds = %15, %12, %2
%22 = load double, double* %5
ret double %22
}

LLVM IR (-O2):
define double @median(double* %0, i64 %1) {
%3 = icmp ne double* %0, null
%4 = icmp sgt i64 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = add nsw i64 %1, -1
%8 = lshr i64 %7, 1
%9 = tail call double @rangk12(double* %0, i64 %1, i64 %8, i64 %8)
br label %10
10: ; preds = %6, %2
%11 = phi double [ %9, %6 ], [ 0.000000e+00, %2 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ sla_cr2tf_(int *, float *, char *, int *, int);
void slaCr2tf(int ndp, float angle, char *sign, int ihmsf[4]) {
  sla_cr2tf_(&ndp, &angle, sign, ihmsf, 1);
}


x86 assembly (clang, -O0):
<slaCr2tf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x1,%r8d
call   1030 <sla_cr2tf_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaCr2tf>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
movss  %xmm0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x1,%r8d
call   1030 <sla_cr2tf_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @slaCr2tf(i32 %0, float %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca i8*
%8 = alloca i32*
store i32 %0, i32* %5
store float %1, float* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %7
%10 = load i32*, i32** %8
%11 = call i32 @sla_cr2tf_(i32* %5, float* %6, i8* %9, i32* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @slaCr2tf(i32 %0, float %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
%7 = call i32 @sla_cr2tf_(i32* %5, float* %6, i8* %2, i32* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atol(char *);
int bench_write(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc == 1 + 1) {
    return -bench_write(atol(argv[1]));
  } else {
    printf("USAGE : bench_write count\n");
    return 7;
  }
}


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)
cmpl   $0x2,-0x8(%rbp)
jne    1172 <main+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
call   1050 <bench_write@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <main+0x55>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    114a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
call   1050 <bench_write@plt>
neg    %eax
pop    %rcx
ret
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"USAGE : bench_write count\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 = icmp eq i32 %6, 2
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atol(i8* %11)
%13 = call i32 @bench_write(i32 %12)
%14 = sub nsw i32 0, %13
store i32 %14, i32* %3
br label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 7, i32* %3
br label %17
17: ; preds = %15, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [26 x i8] c"USAGE : bench_write count\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = tail call i32 @bench_write(i32 %7)
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %12
12: ; preds = %10, %4
%13 = phi i32 [ %9, %4 ], [ 7, %10 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  do {
    fprintf(stderr, "usage: simdiff FILES...\n");
  } while (0);
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <usage+0x9>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"usage: simdiff FILES...\0A\00"
define void @usage() {
br label %1
1: ; preds = %0
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %1
%5 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"usage: simdiff FILES...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  foo(0, 0);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 0, i32 0)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ foo();
scalar_t__ jump();
int main(void) {
  if (jump())
    goto mid;
  foo();
  if (1) {
  mid:
    foo();
  }
  return 0;
  foo();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <jump@plt>
cmp    $0x0,%rax
je     1145 <main+0x25>
jmp    114c <main+0x2c>
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <jump@plt>
test   %rax,%rax
jne    1134 <main+0x14>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @jump()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %7
5: ; preds = %0
%6 = call i32 (...) @foo()
br label %7
7: ; preds = %5, %4
%8 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @jump()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %0, %3
%6 = tail call i32 (...) @foo()
ret i32 0
}
void RTMemPoolRefCount(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemPoolRefCount() {
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *block_realloc(void *vmem, size_t newsize) {
  return realloc(vmem, newsize);
}


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

x86 assembly (clang, -O2):
<block_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @block_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @block_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
reuseaddr_ports_exhausted_unreusable(struct __test_metadata *);
void wrapper_reuseaddr_ports_exhausted_unreusable(
    struct __test_metadata *_metadata,
    struct __fixture_variant_metadata *variant) {
  reuseaddr_ports_exhausted_unreusable(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_reuseaddr_ports_exhausted_unreusable>:
jmp    1030 <reuseaddr_ports_exhausted_unreusable@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_reuseaddr_ports_exhausted_unreusable(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @reuseaddr_ports_exhausted_unreusable(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_reuseaddr_ports_exhausted_unreusable(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @reuseaddr_ports_exhausted_unreusable(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
long GetBorderTitle64();
long getbordertitle() { return GetBorderTitle64(); }


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

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

LLVM IR (-O0):
define i64 @getbordertitle() {
%1 = call i64 (...) @GetBorderTitle64()
ret i64 %1
}

LLVM IR (-O2):
define i64 @getbordertitle() {
%1 = tail call i64 (...) @GetBorderTitle64()
ret i64 %1
}
void smp_callin_clear_local_apic(void) {}


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

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

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

LLVM IR (-O2):
define void @smp_callin_clear_local_apic() {
ret void
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  void *mem = malloc(400);
  printf("Yay\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x190,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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 = [5 x i8] c"Yay\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @malloc(i32 400)
store i8* %7, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [4 x i8] c"Yay\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ entrada();
int /*<<< orphan*/ saida();
int main() {
  entrada();
  saida();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @entrada()
%2 = tail call i32 (...) @saida()
ret i32 0
}
void VID_CheckChanges(void) {}


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

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

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

LLVM IR (-O2):
define void @VID_CheckChanges() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hi, how are you?\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 = [18 x i8] c"Hi, how are you?\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Hi, how are you?\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void finish(int sig) {
  (void)sig;
  endwin();
  exit(0);
}


x86 assembly (clang, -O0):
<finish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <endwin@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<finish>:
push   %rax
xor    %eax,%eax
call   1030 <endwin@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @finish(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @endwin()
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @finish(i32 %0) {
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @exit(i32 0)
unreachable
}
OP(fd, ec) { op_ec(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_ec@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_ec()
ret i32 undef
}
/* Variables and functions */
int size_file(int);
int sys_fsize(int fd) { return size_file(fd); }


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

x86 assembly (clang, -O2):
<sys_fsize>:
jmp    1030 <size_file@plt>

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

LLVM IR (-O2):
define i32 @sys_fsize(i32 %0) {
%2 = tail call i32 @size_file(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DoDefined();
int /*<<< orphan*/ DoNot();
void DoUndefined(void) {
  DoDefined();
  DoNot();
}


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

x86 assembly (clang, -O2):
<DoUndefined>:
push   %rax
xor    %eax,%eax
call   1040 <DoDefined@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <DoNot@plt>

LLVM IR (-O0):
define void @DoUndefined() {
%1 = call i32 (...) @DoDefined()
%2 = call i32 (...) @DoNot()
ret void
}

LLVM IR (-O2):
define void @DoUndefined() {
%1 = tail call i32 (...) @DoDefined()
%2 = tail call i32 (...) @DoNot()
ret void
}
long Long_bit_MINUS_not(long x) { return ~x; }


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

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

LLVM IR (-O0):
define i64 @Long_bit_MINUS_not(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
ret i64 %4
}

LLVM IR (-O2):
define i64 @Long_bit_MINUS_not(i64 %0) {
%2 = xor i64 %0, -1
ret i64 %2
}
/* Variables and functions */
char *strchr(char *, char);
char *file_type(char *f) {
  char *cp;
  if ((cp = strchr(f, '.')) != NULL)
    return cp + 1;
  return "";
}


x86 assembly (clang, -O0):
<file_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1149 <file_type+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <file_type+0x44>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_type>:
push   %rax
mov    $0x2e,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
lea    0xed7(%rip),%rax
cmovne %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @file_type(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
/* Variables and functions */
double const pow(double, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ system(char *);
main() {
  double area, raio;
  const double pi = 3.14159;
  scanf("%lf", &raio);
  area = pi * pow(raio, 2);
  printf("A=%.4lf\n", area);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xea5(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec0(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mulsd  0xe99(%rip),%xmm0
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"A=%.4lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 3.141590e+00, double* %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = call double @pow(double %6, i32 2)
%8 = fmul double 3.141590e+00, %7
store double %8, double* %2
%9 = load double, double* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [9 x i8] c"A=%.4lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call double @pow(double %4, i32 2)
%6 = fmul double %5, 3.141590e+00
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int open(char const *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int file_open(const char *path, int flags) {
  int fd = open(path, flags);
  if (fd < 0) {
    fprintf(stderr, "Unable to open \"%s\": ", path);
    perror("libsoc-file-debug");
    exit(-1);
  }
  return fd;
}


x86 assembly (clang, -O0):
<file_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1197 <file_open+0x57>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xe8e(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_open>:
push   %rbx
mov    %rdi,%rbx
call   1040 <open@plt>
test   %eax,%eax
js     114f <file_open+0xf>
pop    %rbx
ret
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
lea    0xea8(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Unable to open \22%s\22: \00"
@.str.1 = [18 x i8] c"libsoc-file-debug\00"
define i32 @file_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %2
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Unable to open \22%s\22: \00"
@.str.1 = [18 x i8] c"libsoc-file-debug\00"
define i32 @file_open(i8* %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ term();
void add() {
  match('+');
  term();
  emitln("pop\t%ebx");
  emitln("add\t%ebx,%eax");
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2b,%edi
call   1050 <match@plt>
mov    $0x0,%al
call   1040 <term@plt>
lea    0xeb4(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb1(%rip),%rdi
call   1030 <emitln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rax
mov    $0x2b,%edi
call   1050 <match@plt>
xor    %eax,%eax
call   1040 <term@plt>
lea    0xeb7(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb4(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"pop\09%ebx\00"
@.str.1 = [14 x i8] c"add\09%ebx,%eax\00"
define void @add() {
%1 = call i32 @match(i8 signext 43)
%2 = call i32 (...) @term()
%3 = call i32 @emitln(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @emitln(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"pop\09%ebx\00"
@.str.1 = [14 x i8] c"add\09%ebx,%eax\00"
define void @add() {
%1 = tail call i32 @match(i8 signext 43)
%2 = tail call i32 (...) @term()
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x7a() {
  Assert_real((isodigit(122) == 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_isodigit.c",
              615, ("isodigit should be 0 for z"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x7a>:
push   %rax
mov    $0x7a,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x267,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for z\00"
define void @t_isodigit_0x7a() {
%1 = call i64 @isodigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for z\00"
define void @t_isodigit_0x7a() {
%1 = tail call i64 @isodigit(i32 122)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ptrace_sandbox_permit_mkdir(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_mkdir(%struct.pt_sandbox* nocapture %0) {
ret void
}
void setID(int *context, int id) { *(context + 2) = id; }


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

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

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

LLVM IR (-O2):
define void @setID(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %1, i32* %3
ret void
}