#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int P, R;
  scanf("%d%d", &P, &R);
  if (P == 0 && R == 0)
    printf("C\n");
  if (P == 0 && R == 1)
    printf("C\n");
  if (P == 1 && R == 0)
    printf("B\n");
  if (P == 1 && R == 1)
    printf("A\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1163 <main+0x43>
cmpl   $0x0,-0xc(%rbp)
jne    1163 <main+0x43>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1183 <main+0x63>
cmpl   $0x1,-0xc(%rbp)
jne    1183 <main+0x63>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11a3 <main+0x83>
cmpl   $0x0,-0xc(%rbp)
jne    11a3 <main+0x83>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11c3 <main+0xa3>
cmpl   $0x1,-0xc(%rbp)
jne    11c3 <main+0xa3>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
mov    %ecx,%edx
or     %eax,%edx
jne    1155 <main+0x35>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
test   %ecx,%ecx
jne    1171 <main+0x51>
cmp    $0x1,%eax
jne    1171 <main+0x51>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
cmp    $0x1,%ecx
jne    118d <main+0x6d>
test   %eax,%eax
jne    118d <main+0x6d>
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
cmp    $0x1,%ecx
jne    11a3 <main+0x83>
cmp    $0x1,%eax
jne    11a3 <main+0x83>
lea    0xe67(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@str = [2 x i8] c"A\00"
@str.4 = [2 x i8] c"B\00"
@str.6 = [2 x i8] c"C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0))
%13 = load i32, i32* %1
%14 = load i32, i32* %2
br label %15
15: ; preds = %11, %0
%16 = phi i32 [ %14, %11 ], [ %8, %0 ]
%17 = phi i32 [ %13, %11 ], [ %6, %0 ]
%18 = icmp eq i32 %17, 0
%19 = icmp eq i32 %16, 1
%20 = select i1 %18, i1 %19, i1 false
br i1 %20, label %21, label %25
21: ; preds = %15
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0))
%23 = load i32, i32* %1
%24 = load i32, i32* %2
br label %25
25: ; preds = %21, %15
%26 = phi i32 [ %24, %21 ], [ %16, %15 ]
%27 = phi i32 [ %23, %21 ], [ %17, %15 ]
%28 = icmp eq i32 %27, 1
%29 = icmp eq i32 %26, 0
%30 = select i1 %28, i1 %29, i1 false
br i1 %30, label %31, label %35
31: ; preds = %25
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%33 = load i32, i32* %1
%34 = load i32, i32* %2
br label %35
35: ; preds = %31, %25
%36 = phi i32 [ %34, %31 ], [ %26, %25 ]
%37 = phi i32 [ %33, %31 ], [ %27, %25 ]
%38 = icmp eq i32 %37, 1
%39 = icmp eq i32 %36, 1
%40 = select i1 %38, i1 %39, i1 false
br i1 %40, label %41, label %43
41: ; preds = %35
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %43
43: ; preds = %41, %35
ret i32 0
}