#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*/ putchar(char);
main() {
  char ch = 'A';
  while (ch <= 'F') {
    printf("Entering while \n");
    switch (ch) {
    case 'A':
    case 'B':
    case 'C':
    case 'D':
      ch++;
      continue;
    case 'E':
    case 'F':
      ch++;
    }
    putchar(ch);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     119b <main+0x7b>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffbf,%eax
sub    $0x4,%eax
jb     1178 <main+0x58>
jmp    1164 <main+0x44>
mov    -0xc(%rbp),%eax
add    $0xffffffbb,%eax
sub    $0x2,%eax
jb     1185 <main+0x65>
jmp    118d <main+0x6d>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1133 <main+0x13>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    1133 <main+0x13>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x41,%bpl
lea    0xed2(%rip),%r14
jmp    113a <main+0x1a>
add    $0x1,%bpl
cmp    $0x47,%bpl
jge    1169 <main+0x49>
movsbl %bpl,%ebx
mov    %r14,%rdi
call   1040 <puts@plt>
lea    -0x41(%rbx),%eax
cmp    $0x4,%eax
jb     1130 <main+0x10>
add    $0xffffffbb,%ebx
cmp    $0x2,%ebx
jae    115a <main+0x3a>
add    $0x1,%bpl
movsbl %bpl,%edi
call   1030 <putchar@plt>
cmp    $0x47,%bpl
jl     113a <main+0x1a>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Entering while \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
br label %3
3: ; preds = %17, %11, %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 70
br i1 %6, label %7, label %20
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
switch i32 %10, label %17 [
i32 65, label %11
i32 66, label %11
i32 67, label %11
i32 68, label %11
i32 69, label %14
i32 70, label %14
]
11: ; preds = %7, %7, %7, %7
%12 = load i8, i8* %2
%13 = add i8 %12, 1
store i8 %13, i8* %2
br label %3
14: ; preds = %7, %7
%15 = load i8, i8* %2
%16 = add i8 %15, 1
store i8 %16, i8* %2
br label %17
17: ; preds = %14, %7
%18 = load i8, i8* %2
%19 = call i32 @putchar(i8 signext %18)
br label %3
20: ; preds = %3
%21 = call i32 @putchar(i8 signext 10)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@str = [16 x i8] c"Entering while \00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i8 [ 65, %0 ], [ %8, %7 ]
%3 = sext i8 %2 to i32
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
switch i32 %3, label %12 [
i32 65, label %5
i32 66, label %5
i32 67, label %5
i32 68, label %5
i32 69, label %10
i32 70, label %10
]
5: ; preds = %1, %1, %1, %1
%6 = add nsw i8 %2, 1
br label %7
7: ; preds = %5, %12
%8 = phi i8 [ %13, %12 ], [ %6, %5 ]
%9 = icmp slt i8 %8, 71
br i1 %9, label %1, label %15
10: ; preds = %1, %1
%11 = add nsw i8 %2, 1
br label %12
12: ; preds = %10, %1
%13 = phi i8 [ %2, %1 ], [ %11, %10 ]
%14 = tail call i32 @putchar(i8 signext %13)
br label %7
15: ; preds = %7
%16 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}