#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 */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  const int QUANTITY = 5;
  float lowest = 11.0, higher = -1.0;
  float total = 0;
  float current;
  int i;
  for (i = 0; i < QUANTITY; i++) {
    scanf("%f", &current);
    total += current;
    if (current < lowest)
      lowest = current;
    if (current > higher)
      higher = current;
  }
  total = total - lowest - higher;
  printf("%.1f\n", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
jge    11d1 <main+0xb1>
lea    0xe98(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x18(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a5 <main+0x85>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x18(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11be <main+0x9e>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11c3 <main+0xa3>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115f <main+0x3f>
movss  -0x14(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xeda(%rip),%rbx
lea    0x14(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
xorps  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
minss  0xea4(%rip),%xmm0
movss  %xmm0,0x8(%rsp)
maxss  0xe9a(%rip),%xmm1
movss  %xmm1,0xc(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
movss  0x10(%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
movaps %xmm1,%xmm0
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm2
addss  %xmm0,%xmm2
movaps %xmm0,%xmm1
minss  0x8(%rsp),%xmm1
subss  %xmm1,%xmm2
maxss  0xc(%rsp),%xmm0
subss  %xmm0,%xmm2
movaps %xmm2,%xmm0
lea    0xdab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store float 1.100000e+01, float* %3
store float -1.000000e+00, float* %4
store float 0.000000e+00, float* %5
store i32 0, i32* %7
br label %8
8: ; preds = %28, %0
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %31
11: ; preds = %8
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%13 = load float, float* %6
%14 = load float, float* %5
%15 = fadd float %14, %13
store float %15, float* %5
%16 = load float, float* %6
%17 = load float, float* %3
%18 = fcmp olt float %16, %17
br i1 %18, label %19, label %21
19: ; preds = %11
%20 = load float, float* %6
store float %20, float* %3
br label %21
21: ; preds = %19, %11
%22 = load float, float* %6
%23 = load float, float* %4
%24 = fcmp ogt float %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load float, float* %6
store float %26, float* %4
br label %27
27: ; preds = %25, %21
br label %28
28: ; preds = %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
br label %8
31: ; preds = %8
%32 = load float, float* %5
%33 = load float, float* %3
%34 = fsub float %32, %33
%35 = load float, float* %4
%36 = fsub float %34, %35
store float %36, float* %5
%37 = load float, float* %5
%38 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.1f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fadd float %4, 0.000000e+00
%6 = fcmp olt float %4, 1.100000e+01
%7 = select i1 %6, float %4, float 1.100000e+01
%8 = fcmp ogt float %4, -1.000000e+00
%9 = select i1 %8, float %4, float -1.000000e+00
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%11 = load float, float* %1
%12 = fadd float %5, %11
%13 = fcmp olt float %11, %7
%14 = select i1 %13, float %11, float %7
%15 = fcmp ogt float %11, %9
%16 = select i1 %15, float %11, float %9
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%18 = load float, float* %1
%19 = fadd float %12, %18
%20 = fcmp olt float %18, %14
%21 = select i1 %20, float %18, float %14
%22 = fcmp ogt float %18, %16
%23 = select i1 %22, float %18, float %16
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%25 = load float, float* %1
%26 = fadd float %19, %25
%27 = fcmp olt float %25, %21
%28 = select i1 %27, float %25, float %21
%29 = fcmp ogt float %25, %23
%30 = select i1 %29, float %25, float %23
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%32 = load float, float* %1
%33 = fadd float %26, %32
%34 = fcmp olt float %32, %28
%35 = select i1 %34, float %32, float %28
%36 = fcmp ogt float %32, %30
%37 = select i1 %36, float %32, float %30
%38 = fsub float %33, %35
%39 = fsub float %38, %37
%40 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %39)
ret i32 0
}