#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*/ assert(int);
char nondet_char();
int main() {
  char ch = nondet_char();
  switch (ch) {
  case 'P':
  case 'p':
    assert(ch == 80 || ch == 112);
    break;
  default:
    assert(ch != 80 && ch != 112);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1040 <nondet_char@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
or     $0x20,%eax
sub    $0x70,%eax
je     114e <main+0x2e>
jmp    117f <main+0x5f>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x50,%ecx
mov    %al,-0x6(%rbp)
je     116d <main+0x4d>
movsbl -0x5(%rbp),%eax
cmp    $0x70,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    11ab <main+0x8b>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x50,%ecx
mov    %al,-0x7(%rbp)
je     119e <main+0x7e>
movsbl -0x5(%rbp),%eax
cmp    $0x70,%eax
setne  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nondet_char@plt>
movsbl %al,%ecx
or     $0x20,%ecx
and    $0xdf,%al
cmp    $0x70,%ecx
jne    113c <main+0x1c>
cmp    $0x50,%al
sete   %al
jmp    1141 <main+0x21>
cmp    $0x50,%al
setne  %al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @nondet_char()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %18 [
i32 80, label %6
i32 112, label %6
]
6: ; preds = %0, %0
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 80
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 112
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
br label %30
18: ; preds = %0
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 80
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 112
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
br label %30
30: ; preds = %26, %14
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @nondet_char()
%2 = sext i8 %1 to i32
switch i32 %2, label %6 [
i32 80, label %3
i32 112, label %3
]
3: ; preds = %0, %0
%4 = and i8 %1, -33
%5 = icmp eq i8 %4, 80
br label %9
6: ; preds = %0
%7 = and i8 %1, -33
%8 = icmp ne i8 %7, 80
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ %8, %6 ], [ %5, %3 ]
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
ret i32 0
}