#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 *, char *);
int main() {
  int a = ('A' || 'a');
  char grade;
  scanf("%c", &grade);
  if (grade == 'A' || 'a') {
    printf("Always execute here as it right part is TRUE!\n");
  }
  switch (grade) {
  case 'A':
    printf("Excellent Job!");
    break;
  case 'B' || 'b':
    printf("Good job!");
    break;
  default:
    break;
  }
  printf("%d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x9(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
je     1162 <main+0x42>
mov    $0x1,%al
test   $0x1,%al
jne    1162 <main+0x42>
jmp    1170 <main+0x50>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     11a9 <main+0x89>
jmp    1185 <main+0x65>
mov    -0x10(%rbp),%eax
sub    $0x41,%eax
jne    11bc <main+0x9c>
jmp    1196 <main+0x76>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
jmp    11c1 <main+0xa1>
mov    -0x8(%rbp),%esi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
movsbl 0x7(%rsp),%eax
cmp    $0x41,%eax
je     1166 <main+0x36>
cmp    $0x1,%eax
jne    1174 <main+0x44>
lea    0xeae(%rip),%rdi
jmp    116d <main+0x3d>
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [47 x i8] c"Always execute here as it right part is TRUE!\0A\00"
@.str.2 = [15 x i8] c"Excellent Job!\00"
@.str.3 = [10 x i8] c"Good job!\00"
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 65
br i1 %7, label %9, label %8
8: ; preds = %0
br i1 true, label %9, label %11
9: ; preds = %8, %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %8
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
switch i32 %13, label %18 [
i32 65, label %14
i32 1, label %16
]
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %19
16: ; preds = %11
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %19
18: ; preds = %11
br label %19
19: ; preds = %18, %16, %14
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.2 = [15 x i8] c"Excellent Job!\00"
@.str.3 = [10 x i8] c"Good job!\00"
@.str.4 = [4 x i8] c"%d\0A\00"
@str = [46 x i8] c"Always execute here as it right part is TRUE!\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 65, label %7
i32 1, label %6
]
6: ; preds = %0
br label %7
7: ; preds = %0, %6
%8 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %0 ]
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 1)
ret i32 0
}