#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 EOF;
int getchar();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int grade;
  int aCount = 0;
  int bCount = 0;
  int cCount = 0;
  int dCount = 0;
  int fCount = 0;
  float total, media;
  printf("Enter the letter grades.\n");
  printf("Enter the EOF character to end input.\n");
  while ((grade = getchar()) != EOF) {
    switch (grade) {
    case 'A':
    case 'a':
      ++aCount;
      break;
    case 'B':
    case 'b':
      ++bCount;
      break;
    case 'C':
    case 'c':
      ++cCount;
      break;
    case 'D':
    case 'd':
      ++dCount;
      break;
    case 'F':
    case 'f':
      ++fCount;
      break;
    case '\n':
    case '\t':
    case ' ':
      break;
    default:
      printf("Incorrect letter grade entered.");
      printf(" Enter a new grade.\n");
      break;
    }
  }
  printf("\nTotals for each letter grade are:\n");
  printf("A: %d\n", aCount);
  printf("B: %d\n", bCount);
  printf("C: %d\n", cCount);
  printf("D: %d\n", dCount);
  printf("F: %d\n", fCount);
  total = aCount * 5 + bCount * 4 + cCount * 3 + dCount * 2 + fCount * 1;
  media = total / (aCount + bCount + cCount + dCount + fCount);
  printf("Media da turma: ");
  if (media > 4.5)
    printf("A");
  if (media > 3.5 && media <= 4.5)
    printf("B");
  if (media > 2.5 && media <= 3.5)
    printf("C");
  if (media > 1.5 && media <= 2.5)
    printf("D");
  if (media <= 1.5)
    printf("F");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0x103f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e69(%rip),%rcx
cmp    (%rcx),%eax
je     121c <main+0xfc>
mov    -0x8(%rbp),%eax
add    $0xfffffff7,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x5d,%eax
ja     11fb <main+0xdb>
mov    -0x30(%rbp),%rax
lea    0xe79(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1217 <main+0xf7>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1217 <main+0xf7>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1217 <main+0xf7>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1217 <main+0xf7>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1217 <main+0xf7>
jmp    1217 <main+0xf7>
lea    0xfd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116e <main+0x4e>
lea    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xffe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xfea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xfe0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xfd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x5,-0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
imul   $0x3,-0x14(%rbp),%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
lea    0xf83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1302 <main+0x1e2>
lea    0xf6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcf5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1346 <main+0x226>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcd2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1346 <main+0x226>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    138a <main+0x26a>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc96(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     138a <main+0x26a>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc7d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13ce <main+0x2ae>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc5a(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     13ce <main+0x2ae>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc39(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     13f7 <main+0x2d7>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0x108a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1097(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
mov    %rax,(%rsp)
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x2e71(%rip),%r13
mov    $0x0,%ebx
mov    $0x0,%r15d
mov    $0x0,%ebp
mov    $0x0,%r12d
cmp    0x0(%r13),%eax
jne    12fc <main+0x1bc>
lea    0x107d(%rip),%rdi
call   1040 <puts@plt>
lea    0xffe(%rip),%rdi
mov    %r12,%r14
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xff1(%rip),%rdi
mov    %rbp,%r12
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfe4(%rip),%rdi
mov    (%rsp),%rbp
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfd7(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfce(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%r14,%r14,4),%eax
lea    0x0(%rbp,%rbp,2),%ecx
lea    (%rcx,%rbx,2),%ecx
add    %r15d,%ecx
lea    (%rcx,%r12,4),%ecx
add    %eax,%ecx
cvtsi2ss %ecx,%xmm1
add    %ebp,%ebx
add    %r15d,%ebx
add    %r12d,%ebx
add    %r14d,%ebx
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
lea    0xf94(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movss  (%rsp),%xmm1
ucomiss 0xdb6(%rip),%xmm1
jbe    125b <main+0x11b>
mov    $0x41,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm1
ucomiss 0xda2(%rip),%xmm1
jbe    1280 <main+0x140>
movss  0xd94(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     1280 <main+0x140>
mov    $0x42,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm1
ucomiss 0xd81(%rip),%xmm1
jbe    12a5 <main+0x165>
movss  0xd73(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     12a5 <main+0x165>
mov    $0x43,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm1
ucomiss 0xd60(%rip),%xmm1
jbe    12ca <main+0x18a>
movss  0xd52(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     12ca <main+0x18a>
mov    $0x44,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm1
movss  0xd3a(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     12e1 <main+0x1a1>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd0d(%rip),%r14
xor    %r12d,%r12d
xor    %ebp,%ebp
xor    %r15d,%r15d
xor    %ebx,%ebx
xor    %ecx,%ecx
mov    %rcx,(%rsp)
jmp    1331 <main+0x1f1>
add    $0x1,%r15d
nopl   0x0(%rax)
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    0x0(%r13),%eax
je     1197 <main+0x57>
add    $0xfffffff7,%eax
cmp    $0x5d,%eax
ja     135f <main+0x21f>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
add    $0x1,%r12d
jmp    1320 <main+0x1e0>
add    $0x1,%ebp
jmp    1320 <main+0x1e0>
mov    (%rsp),%rax
add    $0x1,%eax
mov    %rax,(%rsp)
jmp    1320 <main+0x1e0>
add    $0x1,%ebx
jmp    1320 <main+0x1e0>
lea    0xe22(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
jmp    1320 <main+0x1e0>

LLVM IR (-O0):
@.str = [26 x i8] c"Enter the letter grades.\0A\00"
@.str.1 = [39 x i8] c"Enter the EOF character to end input.\0A\00"
@EOF = global i32 0
@.str.2 = [32 x i8] c"Incorrect letter grade entered.\00"
@.str.3 = [21 x i8] c" Enter a new grade.\0A\00"
@.str.4 = [36 x i8] c"\0ATotals for each letter grade are:\0A\00"
@.str.5 = [7 x i8] c"A: %d\0A\00"
@.str.6 = [7 x i8] c"B: %d\0A\00"
@.str.7 = [7 x i8] c"C: %d\0A\00"
@.str.8 = [7 x i8] c"D: %d\0A\00"
@.str.9 = [7 x i8] c"F: %d\0A\00"
@.str.10 = [17 x i8] c"Media da turma: \00"
@.str.11 = [2 x i8] c"A\00"
@.str.12 = [2 x i8] c"B\00"
@.str.13 = [2 x i8] c"C\00"
@.str.14 = [2 x i8] c"D\00"
@.str.15 = [2 x i8] c"F\00"
@.str.16 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca float
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %37, %0
%13 = call i32 (...) @getchar()
store i32 %13, i32* %2
%14 = load i32, i32* @EOF
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %38
16: ; preds = %12
%17 = load i32, i32* %2
switch i32 %17, label %34 [
i32 65, label %18
i32 97, label %18
i32 66, label %21
i32 98, label %21
i32 67, label %24
i32 99, label %24
i32 68, label %27
i32 100, label %27
i32 70, label %30
i32 102, label %30
i32 10, label %33
i32 9, label %33
i32 32, label %33
]
18: ; preds = %16, %16
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %37
21: ; preds = %16, %16
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %37
24: ; preds = %16, %16
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %37
27: ; preds = %16, %16
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %37
30: ; preds = %16, %16
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %37
33: ; preds = %16, %16, %16
br label %37
34: ; preds = %16
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %34, %33, %30, %27, %24, %21, %18
br label %12
38: ; preds = %12
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%40 = load i32, i32* %3
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %4
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %5
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %6
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %7
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %3
%51 = mul nsw i32 %50, 5
%52 = load i32, i32* %4
%53 = mul nsw i32 %52, 4
%54 = add nsw i32 %51, %53
%55 = load i32, i32* %5
%56 = mul nsw i32 %55, 3
%57 = add nsw i32 %54, %56
%58 = load i32, i32* %6
%59 = mul nsw i32 %58, 2
%60 = add nsw i32 %57, %59
%61 = load i32, i32* %7
%62 = mul nsw i32 %61, 1
%63 = add nsw i32 %60, %62
%64 = sitofp i32 %63 to float
store float %64, float* %8
%65 = load float, float* %8
%66 = load i32, i32* %3
%67 = load i32, i32* %4
%68 = add nsw i32 %66, %67
%69 = load i32, i32* %5
%70 = add nsw i32 %68, %69
%71 = load i32, i32* %6
%72 = add nsw i32 %70, %71
%73 = load i32, i32* %7
%74 = add nsw i32 %72, %73
%75 = sitofp i32 %74 to float
%76 = fdiv float %65, %75
store float %76, float* %9
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%78 = load float, float* %9
%79 = fpext float %78 to double
%80 = fcmp ogt double %79, 4.500000e+00
br i1 %80, label %81, label %83
81: ; preds = %38
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %83
83: ; preds = %81, %38
%84 = load float, float* %9
%85 = fpext float %84 to double
%86 = fcmp ogt double %85, 3.500000e+00
br i1 %86, label %87, label %93
87: ; preds = %83
%88 = load float, float* %9
%89 = fpext float %88 to double
%90 = fcmp ole double %89, 4.500000e+00
br i1 %90, label %91, label %93
91: ; preds = %87
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %93
93: ; preds = %91, %87, %83
%94 = load float, float* %9
%95 = fpext float %94 to double
%96 = fcmp ogt double %95, 2.500000e+00
br i1 %96, label %97, label %103
97: ; preds = %93
%98 = load float, float* %9
%99 = fpext float %98 to double
%100 = fcmp ole double %99, 3.500000e+00
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %103
103: ; preds = %101, %97, %93
%104 = load float, float* %9
%105 = fpext float %104 to double
%106 = fcmp ogt double %105, 1.500000e+00
br i1 %106, label %107, label %113
107: ; preds = %103
%108 = load float, float* %9
%109 = fpext float %108 to double
%110 = fcmp ole double %109, 2.500000e+00
br i1 %110, label %111, label %113
111: ; preds = %107
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %113
113: ; preds = %111, %107, %103
%114 = load float, float* %9
%115 = fpext float %114 to double
%116 = fcmp ole double %115, 1.500000e+00
br i1 %116, label %117, label %119
117: ; preds = %113
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %119
119: ; preds = %117, %113
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str.2 = [32 x i8] c"Incorrect letter grade entered.\00"
@.str.5 = [7 x i8] c"A: %d\0A\00"
@.str.6 = [7 x i8] c"B: %d\0A\00"
@.str.7 = [7 x i8] c"C: %d\0A\00"
@.str.8 = [7 x i8] c"D: %d\0A\00"
@.str.9 = [7 x i8] c"F: %d\0A\00"
@.str.10 = [17 x i8] c"Media da turma: \00"
@str = [25 x i8] c"Enter the letter grades.\00"
@str.17 = [38 x i8] c"Enter the EOF character to end input.\00"
@str.18 = [35 x i8] c"\0ATotals for each letter grade are:\00"
@str.19 = [20 x i8] c" Enter a new grade.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.17, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %35, label %6
6: ; preds = %0, %26
%7 = phi i32 [ %32, %26 ], [ %3, %0 ]
%8 = phi i32 [ %31, %26 ], [ 0, %0 ]
%9 = phi i32 [ %30, %26 ], [ 0, %0 ]
%10 = phi i32 [ %29, %26 ], [ 0, %0 ]
%11 = phi i32 [ %28, %26 ], [ 0, %0 ]
%12 = phi i32 [ %27, %26 ], [ 0, %0 ]
switch i32 %7, label %23 [
i32 65, label %13
i32 97, label %13
i32 66, label %15
i32 98, label %15
i32 67, label %17
i32 99, label %17
i32 68, label %19
i32 100, label %19
i32 70, label %21
i32 102, label %21
i32 10, label %26
i32 9, label %26
i32 32, label %26
]
13: ; preds = %6, %6
%14 = add nsw i32 %8, 1
br label %26
15: ; preds = %6, %6
%16 = add nsw i32 %9, 1
br label %26
17: ; preds = %6, %6
%18 = add nsw i32 %12, 1
br label %26
19: ; preds = %6, %6
%20 = add nsw i32 %11, 1
br label %26
21: ; preds = %6, %6
%22 = add nsw i32 %10, 1
br label %26
23: ; preds = %6
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.19, i64 0, i64 0))
br label %26
26: ; preds = %6, %6, %6, %23, %21, %19, %17, %15, %13
%27 = phi i32 [ %12, %23 ], [ %12, %6 ], [ %12, %6 ], [ %12, %6 ], [ %12, %21 ], [ %12, %19 ], [ %18, %17 ], [ %12, %15 ], [ %12, %13 ]
%28 = phi i32 [ %11, %23 ], [ %11, %6 ], [ %11, %6 ], [ %11, %6 ], [ %11, %21 ], [ %20, %19 ], [ %11, %17 ], [ %11, %15 ], [ %11, %13 ]
%29 = phi i32 [ %10, %23 ], [ %10, %6 ], [ %10, %6 ], [ %10, %6 ], [ %22, %21 ], [ %10, %19 ], [ %10, %17 ], [ %10, %15 ], [ %10, %13 ]
%30 = phi i32 [ %9, %23 ], [ %9, %6 ], [ %9, %6 ], [ %9, %6 ], [ %9, %21 ], [ %9, %19 ], [ %9, %17 ], [ %16, %15 ], [ %9, %13 ]
%31 = phi i32 [ %8, %23 ], [ %8, %6 ], [ %8, %6 ], [ %8, %6 ], [ %8, %21 ], [ %8, %19 ], [ %8, %17 ], [ %8, %15 ], [ %14, %13 ]
%32 = tail call i32 (...) @getchar()
%33 = load i32, i32* @EOF
%34 = icmp eq i32 %32, %33
br i1 %34, label %35, label %6
35: ; preds = %26, %0
%36 = phi i32 [ 0, %0 ], [ %27, %26 ]
%37 = phi i32 [ 0, %0 ], [ %28, %26 ]
%38 = phi i32 [ 0, %0 ], [ %29, %26 ]
%39 = phi i32 [ 0, %0 ], [ %30, %26 ]
%40 = phi i32 [ 0, %0 ], [ %31, %26 ]
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.18, i64 0, i64 0))
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %39)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %36)
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %37)
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %38)
%47 = mul nsw i32 %40, 5
%48 = shl nsw i32 %39, 2
%49 = mul nsw i32 %36, 3
%50 = shl nsw i32 %37, 1
%51 = add i32 %50, %49
%52 = add i32 %51, %38
%53 = add i32 %52, %48
%54 = add i32 %53, %47
%55 = sitofp i32 %54 to float
%56 = add i32 %37, %36
%57 = add i32 %56, %38
%58 = add i32 %57, %39
%59 = add i32 %58, %40
%60 = sitofp i32 %59 to float
%61 = fdiv float %55, %60
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%63 = fcmp ogt float %61, 4.500000e+00
br i1 %63, label %64, label %66
64: ; preds = %35
%65 = tail call i32 @putchar(i32 65)
br label %66
66: ; preds = %64, %35
%67 = fcmp ule float %61, 3.500000e+00
%68 = fcmp ugt float %61, 4.500000e+00
%69 = or i1 %67, %68
br i1 %69, label %72, label %70
70: ; preds = %66
%71 = tail call i32 @putchar(i32 66)
br label %72
72: ; preds = %70, %66
%73 = fcmp ule float %61, 2.500000e+00
%74 = fcmp ugt float %61, 3.500000e+00
%75 = or i1 %73, %74
br i1 %75, label %78, label %76
76: ; preds = %72
%77 = tail call i32 @putchar(i32 67)
br label %78
78: ; preds = %76, %72
%79 = fcmp ule float %61, 1.500000e+00
%80 = fcmp ugt float %61, 2.500000e+00
%81 = or i1 %79, %80
br i1 %81, label %84, label %82
82: ; preds = %78
%83 = tail call i32 @putchar(i32 68)
br label %84
84: ; preds = %82, %78
%85 = fcmp ugt float %61, 1.500000e+00
br i1 %85, label %88, label %86
86: ; preds = %84
%87 = tail call i32 @putchar(i32 70)
br label %88
88: ; preds = %86, %84
%89 = tail call i32 @putchar(i32 10)
ret i32 0
}