#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 *, int);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double a, b, c;
  int sum, avg;
  scanf("%lf %lf %lf", &a, &b, &c);
  sum = (int)a + (int)b + (int)c;
  avg = (int)((a + b + c) / 3.0);
  printf("총점 %d점\n", sum);
  printf("평균 %d점\n", avg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
cvttsd2si -0x10(%rbp),%eax
cvttsd2si -0x18(%rbp),%ecx
add    %ecx,%eax
cvttsd2si -0x20(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xedc(%rip),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%eax
movsd  0x10(%rsp),%xmm1
cvttsd2si %xmm1,%ecx
movsd  0x8(%rsp),%xmm2
cvttsd2si %xmm2,%esi
add    %eax,%ecx
add    %ecx,%esi
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
divsd  0xe8e(%rip),%xmm0
cvttsd2si %xmm0,%ebx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [14 x i8] c"\EC\B4\9D\EC\A0\90 %d\EC\A0\90\0A\00"
@.str.2 = [14 x i8] c"\ED\8F\89\EA\B7\A0 %d\EC\A0\90\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%8 = load double, double* %2
%9 = fptosi double %8 to i32
%10 = load double, double* %3
%11 = fptosi double %10 to i32
%12 = add nsw i32 %9, %11
%13 = load double, double* %4
%14 = fptosi double %13 to i32
%15 = add nsw i32 %12, %14
store i32 %15, i32* %5
%16 = load double, double* %2
%17 = load double, double* %3
%18 = fadd double %16, %17
%19 = load double, double* %4
%20 = fadd double %18, %19
%21 = fdiv double %20, 3.000000e+00
%22 = fptosi double %21 to i32
store i32 %22, i32* %6
%23 = load i32, i32* %5
%24 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %6
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [14 x i8] c"\EC\B4\9D\EC\A0\90 %d\EC\A0\90\0A\00"
@.str.2 = [14 x i8] c"\ED\8F\89\EA\B7\A0 %d\EC\A0\90\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = fptosi double %8 to i32
%10 = load double, double* %2
%11 = fptosi double %10 to i32
%12 = add nsw i32 %11, %9
%13 = load double, double* %3
%14 = fptosi double %13 to i32
%15 = add nsw i32 %12, %14
%16 = fadd double %8, %10
%17 = fadd double %16, %13
%18 = fdiv double %17, 3.000000e+00
%19 = fptosi double %18 to i32
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%21 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %19)
ret i32 0
}