int main() {
  int v, i, n;
  double a, s = 0;
  for (scanf("%d", &n), i = 0; i < n; i++)
    s += (scanf("%d", &v), v);
  return 0 *
         (a = s / n, printf("평균 : %.1lf\n%s합격\n", a, a < 80 ? "불" : ""));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    118b <main+0x6b>
lea    0xea5(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <main+0x30>
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe50(%rip),%xmm1
lea    0xe6c(%rip),%rsi
lea    0xe66(%rip),%rax
ucomisd %xmm2,%xmm1
cmova  %rax,%rsi
lea    0xe3e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    (%rsp),%eax
xorpd  %xmm0,%xmm0
test   %eax,%eax
jle    1190 <main+0x70>
lea    0xebd(%rip),%r14
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm0,0x8(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x4(%rsp),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%ebp
mov    (%rsp),%eax
cmp    %eax,%ebp
jl     1160 <main+0x40>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe5d(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    0xe76(%rip),%rax
lea    0xe6e(%rip),%rsi
cmova  %rax,%rsi
lea    0xe4b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"\ED\8F\89\EA\B7\A0 : %.1lf\0A%s\ED\95\A9\EA\B2\A9\0A\00"
@.str.2 = [4 x i8] c"\EB\B6\88\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %6
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 0, i32* %3
br label %8
8: ; preds = %18, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to double
%16 = load double, double* %6
%17 = fadd double %16, %15
store double %17, double* %6
br label %18
18: ; preds = %12
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %8
21: ; preds = %8
%22 = load double, double* %6
%23 = load i32, i32* %4
%24 = sitofp i32 %23 to double
%25 = fdiv double %22, %24
store double %25, double* %5
%26 = load double, double* %5
%27 = load double, double* %5
%28 = fcmp olt double %27, 8.000000e+01
%29 = zext i1 %28 to i64
%30 = select i1 %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double %26, i8* %30)
%32 = mul nsw i32 0, %31
ret i32 %32
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"\ED\8F\89\EA\B7\A0 : %.1lf\0A%s\ED\95\A9\EA\B2\A9\0A\00"
@.str.2 = [4 x i8] c"\EB\B6\88\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %0, %8
%9 = phi double [ %14, %8 ], [ 0.000000e+00, %0 ]
%10 = phi i32 [ %15, %8 ], [ 0, %0 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
%13 = sitofp i32 %12 to double
%14 = fadd double %9, %13
%15 = add nuw nsw i32 %10, 1
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %0
%19 = phi double [ 0.000000e+00, %0 ], [ %14, %8 ]
%20 = phi i32 [ %6, %0 ], [ %16, %8 ]
%21 = sitofp i32 %20 to double
%22 = fdiv double %19, %21
%23 = fcmp olt double %22, 8.000000e+01
%24 = select i1 %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double %22, i8* %24)
ret i32 0
}