#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float x, y, z, media = 0;
  int mt = 0;
  scanf(" %f", &x);
  scanf(" %f", &y);
  scanf(" %f", &z);
  media = (x + y + z) / 3.0;
  if (x > media)
    mt++;
  if (y > media)
    mt++;
  if (z > media)
    mt++;
  printf("%d\n", mt);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe77(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11ae <main+0x8e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11c6 <main+0xa6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11de <main+0xbe>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm3
addss  %xmm3,%xmm2
divss  0xe88(%rip),%xmm2
xor    %eax,%eax
ucomiss %xmm2,%xmm0
seta   %al
ucomiss %xmm2,%xmm1
lea    0x1(%rax),%ecx
cmovbe %eax,%ecx
xor    %esi,%esi
ucomiss %xmm2,%xmm3
seta   %sil
add    %ecx,%esi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c" %f\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%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 = fdiv float %14, 3.000000e+00
%16 = fcmp ogt float %10, %15
%17 = zext i1 %16 to i32
%18 = fcmp ogt float %11, %15
%19 = select i1 %16, i32 2, i32 1
%20 = select i1 %18, i32 %19, i32 %17
%21 = fcmp ogt float %13, %15
%22 = zext i1 %21 to i32
%23 = add nuw nsw i32 %20, %22
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}