#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 */
scalar_t__ EOF;
float FLT_MAX;
float FLT_MIN;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float, float, float, float, float);
scalar_t__ scanf(char *, float *);
float sqrt(float);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  int n = 0;
  float sum = 0, val = 0, max = FLT_MIN, min = FLT_MAX;
  float mean = 0, diff = 0, sd = 0;
  while (scanf("%f ", &val) != EOF) {
    n += 1;
    sum += val;
    if (val > max)
      max = val;
    if (val < min)
      min = val;
  }
  mean = sum / n;
  fseek(stdin, 0, SEEK_SET);
  while (scanf("%f ", &val) != EOF) {
    diff += (mean - val) * (mean - val);
  }
  diff /= n;
  sd = sqrt(diff);
  printf("%f %f %f %f %f\n", sum, max, min, mean, sd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    0x2e74(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    0x2e4c(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
lea    0xe54(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e1c(%rip),%rcx
cmp    (%rcx),%rax
je     1218 <main+0xd8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jbe    11f6 <main+0xb6>
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm1
movss  -0x24(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1213 <main+0xd3>
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    11a5 <main+0x65>
movss  -0x18(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
mov    0x2d85(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
lea    0xdb5(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2d7d(%rip),%rcx
cmp    (%rcx),%rax
je     128f <main+0x14f>
movss  -0x28(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  -0x28(%rbp),%xmm2
subss  -0x1c(%rbp),%xmm2
movss  -0x2c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    1244 <main+0x104>
cvtsi2ssl -0x14(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
call   1060 <sqrt@plt>
movss  %xmm0,-0x30(%rbp)
movss  -0x18(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
movss  -0x28(%rbp),%xmm3
movss  -0x30(%rbp),%xmm4
lea    0xd33(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
movl   $0x0,0xc(%rsp)
mov    0x2e8f(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,0x10(%rsp)
mov    0x2e66(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,0x14(%rsp)
lea    0xe85(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e4c(%rip),%r15
cmp    (%r15),%rax
jne    1199 <main+0x59>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
jmp    1213 <main+0xd3>
xor    %ebp,%ebp
xorps  %xmm2,%xmm2
lea    0xe5b(%rip),%r14
lea    0xc(%rsp),%rbx
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
movss  0xc(%rsp),%xmm3
addss  %xmm3,%xmm2
movss  %xmm2,0x1c(%rsp)
movaps %xmm3,%xmm2
maxss  %xmm0,%xmm2
movss  %xmm2,0x10(%rsp)
minss  %xmm1,%xmm3
movss  %xmm3,0x14(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x1c(%rsp),%xmm2
cmp    (%r15),%rax
jne    11c0 <main+0x80>
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  %xmm2,0x1c(%rsp)
movss  %xmm0,0x20(%rsp)
divss  %xmm0,%xmm2
movss  %xmm2,0x18(%rsp)
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
mov    0x2d87(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
lea    0xdb7(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmp    (%r15),%rax
xorps  %xmm0,%xmm0
je     12a0 <main+0x160>
xorps  %xmm0,%xmm0
lea    0xd9b(%rip),%r14
lea    0xc(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movss  0x18(%rsp),%xmm1
subss  0xc(%rsp),%xmm1
mulss  %xmm1,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,0x24(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  0x24(%rsp),%xmm0
cmp    (%r15),%rax
jne    1270 <main+0x130>
divss  0x20(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     12b4 <main+0x174>
sqrtss %xmm0,%xmm4
jmp    12bc <main+0x17c>
call   1060 <sqrt@plt>
movaps %xmm0,%xmm4
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm1
movss  0x18(%rsp),%xmm3
lea    0xd2f(%rip),%rdi
movss  0x1c(%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@FLT_MIN = global float 0.000000e+00
@FLT_MAX = global float 0.000000e+00
@.str = [4 x i8] c"%f \00"
@EOF = global i64 0
@stdin = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [16 x i8] c"%f %f %f %f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
%14 = load float, float* @FLT_MIN
store float %14, float* %9
%15 = load float, float* @FLT_MAX
store float %15, float* %10
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
br label %16
16: ; preds = %37, %2
%17 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %8)
%18 = load i64, i64* @EOF
%19 = icmp ne i64 %17, %18
br i1 %19, label %20, label %38
20: ; preds = %16
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
%23 = load float, float* %8
%24 = load float, float* %7
%25 = fadd float %24, %23
store float %25, float* %7
%26 = load float, float* %8
%27 = load float, float* %9
%28 = fcmp ogt float %26, %27
br i1 %28, label %29, label %31
29: ; preds = %20
%30 = load float, float* %8
store float %30, float* %9
br label %31
31: ; preds = %29, %20
%32 = load float, float* %8
%33 = load float, float* %10
%34 = fcmp olt float %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = load float, float* %8
store float %36, float* %10
br label %37
37: ; preds = %35, %31
br label %16
38: ; preds = %16
%39 = load float, float* %7
%40 = load i32, i32* %6
%41 = sitofp i32 %40 to float
%42 = fdiv float %39, %41
store float %42, float* %11
%43 = load i32, i32* @stdin
%44 = load i32, i32* @SEEK_SET
%45 = call i32 @fseek(i32 %43, i32 0, i32 %44)
br label %46
46: ; preds = %50, %38
%47 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %8)
%48 = load i64, i64* @EOF
%49 = icmp ne i64 %47, %48
br i1 %49, label %50, label %59
50: ; preds = %46
%51 = load float, float* %11
%52 = load float, float* %8
%53 = fsub float %51, %52
%54 = load float, float* %11
%55 = load float, float* %8
%56 = fsub float %54, %55
%57 = load float, float* %12
%58 = call float @llvm.fmuladd.f32(float %53, float %56, float %57)
store float %58, float* %12
br label %46
59: ; preds = %46
%60 = load i32, i32* %6
%61 = sitofp i32 %60 to float
%62 = load float, float* %12
%63 = fdiv float %62, %61
store float %63, float* %12
%64 = load float, float* %12
%65 = call float @sqrt(float %64)
store float %65, float* %13
%66 = load float, float* %7
%67 = load float, float* %9
%68 = load float, float* %10
%69 = load float, float* %11
%70 = load float, float* %13
%71 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %66, float %67, float %68, float %69, float %70)
%72 = load i32, i32* %3
ret i32 %72
}

LLVM IR (-O2):
@FLT_MIN = global float 0.000000e+00
@FLT_MAX = global float 0.000000e+00
@.str = [4 x i8] c"%f \00"
@EOF = global i64 0
@stdin = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [16 x i8] c"%f %f %f %f %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%5 = load float, float* @FLT_MIN
%6 = load float, float* @FLT_MAX
%7 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %27, label %10
10: ; preds = %2, %10
%11 = phi float [ %21, %10 ], [ %6, %2 ]
%12 = phi float [ %19, %10 ], [ %5, %2 ]
%13 = phi float [ %17, %10 ], [ 0.000000e+00, %2 ]
%14 = phi i32 [ %15, %10 ], [ 0, %2 ]
%15 = add nuw nsw i32 %14, 1
%16 = load float, float* %3
%17 = fadd float %13, %16
%18 = fcmp ogt float %16, %12
%19 = select i1 %18, float %16, float %12
%20 = fcmp olt float %16, %11
%21 = select i1 %20, float %16, float %11
%22 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%23 = load i64, i64* @EOF
%24 = icmp eq i64 %22, %23
br i1 %24, label %25, label %10
25: ; preds = %10
%26 = sitofp i32 %15 to float
br label %27
27: ; preds = %25, %2
%28 = phi float [ 0.000000e+00, %2 ], [ %26, %25 ]
%29 = phi float [ 0.000000e+00, %2 ], [ %17, %25 ]
%30 = phi float [ %5, %2 ], [ %19, %25 ]
%31 = phi float [ %6, %2 ], [ %21, %25 ]
%32 = fdiv float %29, %28
%33 = load i32, i32* @stdin
%34 = load i32, i32* @SEEK_SET
%35 = call i32 @fseek(i32 %33, i32 0, i32 %34)
%36 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%37 = load i64, i64* @EOF
%38 = icmp eq i64 %36, %37
br i1 %38, label %47, label %39
39: ; preds = %27, %39
%40 = phi float [ %43, %39 ], [ 0.000000e+00, %27 ]
%41 = load float, float* %3
%42 = fsub float %32, %41
%43 = call float @llvm.fmuladd.f32(float %42, float %42, float %40)
%44 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%45 = load i64, i64* @EOF
%46 = icmp eq i64 %44, %45
br i1 %46, label %47, label %39
47: ; preds = %39, %27
%48 = phi float [ 0.000000e+00, %27 ], [ %43, %39 ]
%49 = fdiv float %48, %28
%50 = call float @sqrt(float %49)
%51 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %29, float %30, float %31, float %32, float %50)
ret i32 0
}