#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, int);
int scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int a, b, c, now;
  a = b = c = 0;
  while (scanf("%d", &now), now > 0) {
    if (now >= 85)
      a++;
    else if (now >= 60)
      b++;
    else
      c++;
  }
  printf(">=85:%d\n60-84:%d\n<60:%d\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xeae(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x20(%rbp)
jle    11a8 <main+0x88>
cmpl   $0x55,-0x20(%rbp)
jl     117d <main+0x5d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a3 <main+0x83>
cmpl   $0x3c,-0x20(%rbp)
jl     1195 <main+0x75>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119e <main+0x7e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a3 <main+0x83>
jmp    114b <main+0x2b>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1196 <main+0x76>
xor    %r14d,%r14d
lea    0xeb1(%rip),%r15
lea    0xc(%rsp),%r12
xor    %ebp,%ebp
xor    %ebx,%ebx
jmp    1176 <main+0x56>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    119d <main+0x7d>
cmp    $0x55,%eax
jae    1160 <main+0x40>
cmp    $0x3c,%eax
jb     1190 <main+0x70>
add    $0x1,%ebp
jmp    1163 <main+0x43>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r14d
jmp    1163 <main+0x43>
xor    %ebx,%ebx
xor    %ebp,%ebp
xor    %r14d,%r14d
lea    0xe5f(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c">=85:%d\0A60-84:%d\0A<60:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i32 0, i32* %7
store i32 0, i32* %6
br label %10
10: ; preds = %30, %2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%12 = load i32, i32* %9
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %31
14: ; preds = %10
%15 = load i32, i32* %9
%16 = icmp sge i32 %15, 85
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %30
20: ; preds = %14
%21 = load i32, i32* %9
%22 = icmp sge i32 %21, 60
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
br label %29
26: ; preds = %20
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %29
29: ; preds = %26, %23
br label %30
30: ; preds = %29, %17
br label %10
31: ; preds = %10
%32 = load i32, i32* %6
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32 %33, i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c">=85:%d\0A60-84:%d\0A<60:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %29
8: ; preds = %2, %22
%9 = phi i32 [ %27, %22 ], [ %6, %2 ]
%10 = phi i32 [ %25, %22 ], [ 0, %2 ]
%11 = phi i32 [ %24, %22 ], [ 0, %2 ]
%12 = phi i32 [ %23, %22 ], [ 0, %2 ]
%13 = icmp ugt i32 %9, 84
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = add nsw i32 %12, 1
br label %22
16: ; preds = %8
%17 = icmp ugt i32 %9, 59
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = add nsw i32 %11, 1
br label %22
20: ; preds = %16
%21 = add nsw i32 %10, 1
br label %22
22: ; preds = %18, %20, %14
%23 = phi i32 [ %15, %14 ], [ %12, %18 ], [ %12, %20 ]
%24 = phi i32 [ %11, %14 ], [ %19, %18 ], [ %11, %20 ]
%25 = phi i32 [ %10, %14 ], [ %10, %18 ], [ %21, %20 ]
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%27 = load i32, i32* %3
%28 = icmp sgt i32 %27, 0
br i1 %28, label %8, label %29
29: ; preds = %22, %2
%30 = phi i32 [ 0, %2 ], [ %23, %22 ]
%31 = phi i32 [ 0, %2 ], [ %24, %22 ]
%32 = phi i32 [ 0, %2 ], [ %25, %22 ]
%33 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
ret i32 0
}