#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;
char eyetest(double);
int /*<<< orphan*/ printf(char *, int, int);
scalar_t__ scanf(char *, double *, double *);
int main(void) {
  int rc[4] = {0}, lc[4] = {0}, i;
  double right, left;
  while (scanf("%lf %lf", &right, &left) != EOF) {
    rc[eyetest(right) - 'A']++;
    lc[eyetest(left) - 'A']++;
  }
  for (i = 0; i < 4; i++)
    printf("%d %d\n", rc[i], lc[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    0xe8a(%rip),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1060 <scanf@plt>
mov    0x2e5e(%rip),%rcx
cmp    (%rcx),%rax
je     11d2 <main+0x92>
movsd  -0x40(%rbp),%xmm0
call   1050 <eyetest@plt>
movsbl %al,%eax
sub    $0x41,%eax
cltq
mov    -0x20(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x20(%rbp,%rax,4)
movsd  -0x48(%rbp),%xmm0
call   1050 <eyetest@plt>
movsbl %al,%eax
sub    $0x41,%eax
cltq
mov    -0x30(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    116f <main+0x2f>
movl   $0x0,-0x34(%rbp)
cmpl   $0x4,-0x34(%rbp)
jge    120d <main+0xcd>
movslq -0x34(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d9 <main+0x99>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0xeae(%rip),%rdi
lea    0x40(%rsp),%rsi
lea    0x38(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x2e80(%rip),%r15
xor    %ebx,%ebx
mov    $0x0,%ebp
mov    $0x0,%ecx
mov    $0x0,%r12d
mov    $0x0,%r13d
mov    $0x0,%edi
mov    $0x0,%edx
mov    $0x0,%esi
cmp    (%r15),%rax
je     1213 <main+0xe3>
lea    0xe65(%rip),%r14
lea    0x40(%rsp),%rbp
lea    0x38(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x40(%rsp),%xmm0
call   1040 <eyetest@plt>
movsbq %al,%rax
addl   $0x1,-0xe4(%rsp,%rax,4)
01
movsd  0x38(%rsp),%xmm0
call   1040 <eyetest@plt>
movsbq %al,%rax
addl   $0x1,-0xf4(%rsp,%rax,4)
01
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    (%r15),%rax
jne    11b0 <main+0x80>
mov    0x20(%rsp),%esi
mov    0x24(%rsp),%edi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%r13d
mov    0x28(%rsp),%r12d
mov    0x18(%rsp),%ecx
mov    0x2c(%rsp),%ebp
mov    0x1c(%rsp),%ebx
mov    %ebx,0xc(%rsp)
lea    0xdea(%rip),%r14
mov    %edi,%r15d
mov    %r14,%rdi
mov    %ecx,%ebx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r13d,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    0xc(%rsp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = bitcast [4 x i32]* %2 to i8*
%8 = bitcast [4 x i32]* %3 to i8*
br label %9
9: ; preds = %13, %0
%10 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %5, double* %6)
%11 = load i64, i64* @EOF
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = load double, double* %5
%15 = call signext i8 @eyetest(double %14)
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 65
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
store i32 %21, i32* %19
%22 = load double, double* %6
%23 = call signext i8 @eyetest(double %22)
%24 = sext i8 %23 to i32
%25 = sub nsw i32 %24, 65
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = add nsw i32 %28, 1
store i32 %29, i32* %27
br label %9
30: ; preds = %9
store i32 0, i32* %4
br label %31
31: ; preds = %44, %30
%32 = load i32, i32* %4
%33 = icmp slt i32 %32, 4
br i1 %33, label %34, label %47
34: ; preds = %31
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %38, i32 %42)
br label %44
44: ; preds = %34
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %31
47: ; preds = %31
ret i32 0
}

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