#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 fmin(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 - fmin(a, fmin(b, fmin(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   1050 <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  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1040 <fmin@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
call   1040 <fmin@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
call   1040 <fmin@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xe42(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed9(%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),%xmm1
movss  0x10(%rsp),%xmm2
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  0xc(%rsp),%xmm3
addss  %xmm3,%xmm0
movss  0x8(%rsp),%xmm4
addss  %xmm4,%xmm0
movaps %xmm3,%xmm5
cmpunordss %xmm3,%xmm5
movaps %xmm5,%xmm6
andps  %xmm4,%xmm6
minss  %xmm3,%xmm4
andnps %xmm4,%xmm5
orps   %xmm6,%xmm5
movaps %xmm5,%xmm3
minss  %xmm2,%xmm3
cmpunordss %xmm2,%xmm2
movaps %xmm2,%xmm4
andps  %xmm5,%xmm4
andnps %xmm3,%xmm2
orps   %xmm4,%xmm2
movaps %xmm2,%xmm3
minss  %xmm1,%xmm3
cmpunordss %xmm1,%xmm1
movaps %xmm1,%xmm4
andps  %xmm2,%xmm4
andnps %xmm3,%xmm1
orps   %xmm4,%xmm1
subss  %xmm1,%xmm0
divss  0xe41(%rip),%xmm0
lea    0xe4b(%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 @fmin(float %15, float %16)
%18 = call float @fmin(float %14, float %17)
%19 = call float @fmin(float %13, float %18)
%20 = fsub float %12, %19
%21 = fdiv float %20, 3.000000e+00
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %21)
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 nsz float @llvm.minnum.f32(float %13, float %15)
%18 = call nsz float @llvm.minnum.f32(float %11, float %17)
%19 = call nsz float @llvm.minnum.f32(float %10, float %18)
%20 = fsub float %16, %19
%21 = fdiv float %20, 3.000000e+00
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float %21)
ret i32 0
}