#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 fmod(float, int);
int /*<<< orphan*/ printf(char *, int, float);
scalar_t__ scanf(char *, float *);
int main() {
  float a[64], sm, n;
  int j, i = 0;
  while ((scanf("%f", &n)) != EOF) {
    j = 0;
    for (int ix = 0; ix < i; ix++)
      if (a[ix] == n) {
        j = 1;
        break;
      }
    if (!j) {
      a[i] = n;
      i++;
    }
  }
  for (int ix = 0; ix < i; ix++) {
    sm = sm + fmod(a[ix], 5);
  }
  printf("%d\n%.3f\n", i, sm);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x120(%rbp)
lea    0xead(%rip),%rdi
lea    -0x118(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
je     1219 <main+0xe9>
movl   $0x0,-0x11c(%rbp)
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x120(%rbp),%eax
jge    11e0 <main+0xb0>
movslq -0x124(%rbp),%rax
movss  -0x110(%rbp,%rax,4),%xmm0
ff ff
ucomiss -0x118(%rbp),%xmm0
jne    11c7 <main+0x97>
jp     11c7 <main+0x97>
movl   $0x1,-0x11c(%rbp)
jmp    11e0 <main+0xb0>
jmp    11cc <main+0x9c>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    1183 <main+0x53>
cmpl   $0x0,-0x11c(%rbp)
jne    1214 <main+0xe4>
movss  -0x118(%rbp),%xmm0
ff
movslq -0x120(%rbp),%rax
movss  %xmm0,-0x110(%rbp,%rax,4)
ff ff
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    114c <main+0x1c>
movl   $0x0,-0x128(%rbp)
mov    -0x128(%rbp),%eax
cmp    -0x120(%rbp),%eax
jge    128a <main+0x15a>
movss  -0x114(%rbp),%xmm0
ff
movss  %xmm0,-0x12c(%rbp)
ff
movslq -0x128(%rbp),%rax
movss  -0x110(%rbp,%rax,4),%xmm0
ff ff
mov    $0x5,%edi
call   1040 <fmod@plt>
movaps %xmm0,%xmm1
movss  -0x12c(%rbp),%xmm0
ff
addss  %xmm1,%xmm0
movss  %xmm0,-0x114(%rbp)
ff
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1223 <main+0xf3>
mov    -0x120(%rbp),%esi
movss  -0x114(%rbp),%xmm0
ff
lea    0xd64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x118,%rsp
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e92(%rip),%r15
xor    %ebx,%ebx
cmp    (%r15),%rax
jne    11c5 <main+0x95>
mov    %ebx,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  %xmm0,0x8(%rsp)
movss  0x10(%rsp,%rbx,4),%xmm0
mov    $0x5,%edi
call   1040 <fmod@plt>
movss  0x8(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movss  0x8(%rsp),%xmm0
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1170 <main+0x40>
lea    0xe57(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
xor    %ebx,%ebx
lea    0xe32(%rip),%r14
lea    0xc(%rsp),%r12
jmp    1200 <main+0xd0>
cs nopw 0x0(%rax,%rax,1)
nop
movslq %ebx,%rax
movss  %xmm0,0x10(%rsp,%rax,4)
add    $0x1,%ebx
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
cmp    (%r15),%rax
je     115d <main+0x2d>
movss  0xc(%rsp),%xmm0
test   %ebx,%ebx
jle    11e0 <main+0xb0>
mov    %ebx,%eax
xor    %ecx,%ecx
xchg   %ax,%ax
movss  0x10(%rsp,%rcx,4),%xmm1
ucomiss %xmm0,%xmm1
jne    121d <main+0xed>
jnp    11ec <main+0xbc>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1210 <main+0xe0>
jmp    11e0 <main+0xb0>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
@.str.1 = [9 x i8] c"%d\0A%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x float]
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
br label %9
9: ; preds = %40, %0
%10 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%11 = load i64, i64* @EOF
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %41
13: ; preds = %9
store i32 0, i32* %5
store i32 0, i32* %7
br label %14
14: ; preds = %27, %13
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [64 x float], [64 x float]* %2, i64 0, i64 %20
%22 = load float, float* %21
%23 = load float, float* %4
%24 = fcmp oeq float %22, %23
br i1 %24, label %25, label %26
25: ; preds = %18
store i32 1, i32* %5
br label %30
26: ; preds = %18
br label %27
27: ; preds = %26
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %14
30: ; preds = %25, %14
%31 = load i32, i32* %5
%32 = icmp ne i32 %31, 0
br i1 %32, label %40, label %33
33: ; preds = %30
%34 = load float, float* %4
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [64 x float], [64 x float]* %2, i64 0, i64 %36
store float %34, float* %37
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %40
40: ; preds = %33, %30
br label %9
41: ; preds = %9
store i32 0, i32* %8
br label %42
42: ; preds = %54, %41
%43 = load i32, i32* %8
%44 = load i32, i32* %6
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %57
46: ; preds = %42
%47 = load float, float* %3
%48 = load i32, i32* %8
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [64 x float], [64 x float]* %2, i64 0, i64 %49
%51 = load float, float* %50
%52 = call float @fmod(float %51, i32 5)
%53 = fadd float %47, %52
store float %53, float* %3
br label %54
54: ; preds = %46
%55 = load i32, i32* %8
%56 = add nsw i32 %55, 1
store i32 %56, i32* %8
br label %42
57: ; preds = %42
%58 = load i32, i32* %6
%59 = load float, float* %3
%60 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %58, float %59)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
@.str.1 = [9 x i8] c"%d\0A%.3f\0A\00"
define i32 @main() {
%1 = alloca [64 x float]
%2 = alloca float
%3 = bitcast [64 x float]* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %14, label %8
8: ; preds = %0, %30
%9 = phi i32 [ %31, %30 ], [ 0, %0 ]
%10 = icmp sgt i32 %9, 0
%11 = load float, float* %2
br i1 %10, label %12, label %26
12: ; preds = %8
%13 = zext i32 %9 to i64
br label %20
14: ; preds = %30, %0
%15 = phi i32 [ 0, %0 ], [ %31, %30 ]
%16 = icmp sgt i32 %15, 0
%17 = zext i32 %15 to i64
br label %37
18: ; preds = %20
%19 = icmp eq i64 %25, %13
br i1 %19, label %26, label %20
20: ; preds = %12, %18
%21 = phi i64 [ 0, %12 ], [ %25, %18 ]
%22 = getelementptr inbounds [64 x float], [64 x float]* %1, i64 0, i64 %21
%23 = load float, float* %22
%24 = fcmp oeq float %23, %11
%25 = add nuw nsw i64 %21, 1
br i1 %24, label %30, label %18
26: ; preds = %18, %8
%27 = sext i32 %9 to i64
%28 = getelementptr inbounds [64 x float], [64 x float]* %1, i64 0, i64 %27
store float %11, float* %28
%29 = add nsw i32 %9, 1
br label %30
30: ; preds = %20, %26
%31 = phi i32 [ %29, %26 ], [ %9, %20 ]
%32 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%33 = load i64, i64* @EOF
%34 = icmp eq i64 %32, %33
br i1 %34, label %14, label %8
35: ; preds = %37
%36 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %15, float %43)
ret i32 0
37: ; preds = %14, %37
%38 = phi i64 [ 0, %14 ], [ %44, %37 ]
%39 = phi float [ undef, %14 ], [ %43, %37 ]
%40 = getelementptr inbounds [64 x float], [64 x float]* %1, i64 0, i64 %38
%41 = load float, float* %40
%42 = call float @fmod(float %41, i32 5)
%43 = fadd float %39, %42
%44 = add nuw nsw i64 %38, 1
%45 = icmp eq i64 %44, %17
br i1 %45, label %35, label %37
}