#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double calculate_mean(double, int);
double pow(double, double);
double calculate_variance(double deviation1, double deviation2,
                          double deviation3, double deviation4,
                          double deviation5, int number) {
  double value = pow(deviation1, 2.0) + pow(deviation2, 2.0) +
                 pow(deviation3, 2.0) + pow(deviation4, 2.0) +
                 pow(deviation5, 2.0);
  value = calculate_mean(value, number);
  return value;
}


x86 assembly (clang, -O0):
<calculate_variance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %edi,-0x2c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe75(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe52(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe2f(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x2c(%rbp),%edi
call   1030 <calculate_mean@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_variance>:
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm4
addsd  %xmm4,%xmm0
jmp    1030 <calculate_mean@plt>

LLVM IR (-O0):
define double @calculate_variance(double %0, double %1, double %2, double %3, double %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store i32 %5, i32* %12
%14 = load double, double* %7
%15 = call double @pow(double %14, double 2.000000e+00)
%16 = load double, double* %8
%17 = call double @pow(double %16, double 2.000000e+00)
%18 = fadd double %15, %17
%19 = load double, double* %9
%20 = call double @pow(double %19, double 2.000000e+00)
%21 = fadd double %18, %20
%22 = load double, double* %10
%23 = call double @pow(double %22, double 2.000000e+00)
%24 = fadd double %21, %23
%25 = load double, double* %11
%26 = call double @pow(double %25, double 2.000000e+00)
%27 = fadd double %24, %26
store double %27, double* %13
%28 = load double, double* %13
%29 = load i32, i32* %12
%30 = call double @calculate_mean(double %28, i32 %29)
store double %30, double* %13
%31 = load double, double* %13
ret double %31
}

LLVM IR (-O2):
define double @calculate_variance(double %0, double %1, double %2, double %3, double %4, i32 %5) {
%7 = fmul double %0, %0
%8 = fmul double %1, %1
%9 = fadd double %7, %8
%10 = fmul double %2, %2
%11 = fadd double %9, %10
%12 = fmul double %3, %3
%13 = fadd double %11, %12
%14 = fmul double %4, %4
%15 = fadd double %13, %14
%16 = tail call double @calculate_mean(double %15, i32 %5)
ret double %16
}