#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*/ getchar();
int /*<<< orphan*/ printf(char *);
main() {
  char c = '8';
  switch (c) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    printf("c is digit\n");
    break;
  case ' ':
  case '\n':
  case '\t':
    printf("c is white space\n");
    break;
  default:
    printf("c is default\n");
    break;
  }
  c = '\t';
  if (c >= '0' && c <= '9')
    printf("c is digit\n");
  else if (c == ' ' || c == '\n' || c == '\t')
    printf("c is white space\n");
  else
    printf("c is default\n");
  printf("\nPress any key to end...");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x38,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1181 <main+0x61>
jmp    114b <main+0x2b>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     1181 <main+0x61>
jmp    115c <main+0x3c>
mov    -0xc(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x9,%eax
ja     1192 <main+0x72>
jmp    1170 <main+0x50>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
movb   $0x9,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     11cd <main+0xad>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     11cd <main+0xad>
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     11f4 <main+0xd4>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     11f4 <main+0xd4>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    1205 <main+0xe5>
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
jmp    1211 <main+0xf1>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"c is digit\0A\00"
@.str.1 = [18 x i8] c"c is white space\0A\00"
@.str.2 = [14 x i8] c"c is default\0A\00"
@.str.3 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 56, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %9 [
i32 48, label %5
i32 49, label %5
i32 50, label %5
i32 51, label %5
i32 52, label %5
i32 53, label %5
i32 54, label %5
i32 55, label %5
i32 56, label %5
i32 57, label %5
i32 32, label %7
i32 10, label %7
i32 9, label %7
]
5: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %0, %0, %0
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7, %5
store i8 9, i8* %2
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 48
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 57
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %38
21: ; preds = %15, %11
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 32
br i1 %24, label %33, label %25
25: ; preds = %21
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 10
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 9
br i1 %32, label %33, label %35
33: ; preds = %29, %25, %21
%34 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %37
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37, %19
%39 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%40 = call i32 (...) @getchar()
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
@.str.3 = [25 x i8] c"\0APress any key to end...\00"
@str = [11 x i8] c"c is digit\00"
@str.4 = [17 x i8] c"c is white space\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret i32 0
}