#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 */
float multiMin(int, float, float, float, float);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *, float *, float *);
int main(void) {
  float a, b, c, d;
  scanf("%f\n%f\n%f\n%f\n", &a, &b, &c, &d);
  printf("%f", (a + b + c + d - multiMin(4, a, b, c, d)) / 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
mov    $0x4,%edi
call   1050 <multiMin@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xe61(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movaps %xmm0,%xmm4
addss  %xmm1,%xmm4
movss  0xc(%rsp),%xmm2
addss  %xmm2,%xmm4
movss  0x8(%rsp),%xmm3
addss  %xmm3,%xmm4
movss  %xmm4,0x4(%rsp)
mov    $0x4,%edi
call   1050 <multiMin@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
divss  0xe63(%rip),%xmm1
movaps %xmm1,%xmm0
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fadd float %6, %7
%9 = load float, float* %3
%10 = fadd float %8, %9
%11 = load float, float* %4
%12 = fadd float %10, %11
%13 = load float, float* %1
%14 = load float, float* %2
%15 = load float, float* %3
%16 = load float, float* %4
%17 = call float @multiMin(i32 4, float %13, float %14, float %15, float %16)
%18 = fsub float %12, %17
%19 = fdiv float %18, 3.000000e+00
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3, float* %4)
%10 = load float, float* %1
%11 = load float, float* %2
%12 = fadd float %10, %11
%13 = load float, float* %3
%14 = fadd float %12, %13
%15 = load float, float* %4
%16 = fadd float %14, %15
%17 = call float @multiMin(i32 4, float %10, float %11, float %13, float %15)
%18 = fsub float %16, %17
%19 = fdiv float %18, 3.000000e+00
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %19)
ret i32 0
}