#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 main(void) {
  char c = '1';
  int flag;
  printf("1 = Uppercase ASCII\n");
  printf("2 = Lowercase ASCII\n");
  printf("3 = Digit     ASCII\n");
  printf("4 = Special   ASCII\n");
  if ((c) >= 48 && (c) <= 57) {
    (flag) = 3;
  } else {
    (flag) = 0;
  }
  printf("%c is %i\n", c, flag);
  c = '|';
  if ((c) >= 65 && (c) <= 90) {
    (flag) = 1;
  } else {
    (flag) = 0;
  }
  if ((flag) == 0) {
    if ((c) >= 97 && (c) <= 122) {
      (flag) = 1;
    } else {
      (flag) = 0;
    }
  }
  if ((flag) == 0) {
    if ((c) >= 48 && (c) <= 57) {
      (flag) = 3;
    } else {
      (flag) = 0;
    }
  }
  if ((flag) == 0) {
    (flag) = 4;
  }
  printf("%c is %i\n", c, flag);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x31,-0x5(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1181 <main+0x71>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1181 <main+0x71>
movl   $0x3,-0xc(%rbp)
jmp    1188 <main+0x78>
movl   $0x0,-0xc(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x7c,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     11c7 <main+0xb7>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     11c7 <main+0xb7>
movl   $0x1,-0xc(%rbp)
jmp    11ce <main+0xbe>
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    120a <main+0xfa>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     11fe <main+0xee>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     11fe <main+0xee>
movl   $0x1,-0xc(%rbp)
jmp    1205 <main+0xf5>
movl   $0x0,-0xc(%rbp)
jmp    120a <main+0xfa>
cmpl   $0x0,-0xc(%rbp)
jne    1246 <main+0x136>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     123a <main+0x12a>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     123a <main+0x12a>
movl   $0x3,-0xc(%rbp)
jmp    1241 <main+0x131>
movl   $0x0,-0xc(%rbp)
jmp    1246 <main+0x136>
cmpl   $0x0,-0xc(%rbp)
jne    1257 <main+0x147>
movl   $0x4,-0xc(%rbp)
movsbl -0x5(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x31,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7c,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"1 = Uppercase ASCII\0A\00"
@.str.1 = [21 x i8] c"2 = Lowercase ASCII\0A\00"
@.str.2 = [21 x i8] c"3 = Digit ASCII\0A\00"
@.str.3 = [21 x i8] c"4 = Special ASCII\0A\00"
@.str.4 = [10 x i8] c"%c is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i8 49, i8* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 48
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sle i32 %13, 57
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 3, i32* %3
br label %17
16: ; preds = %11, %0
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = load i32, i32* %3
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %19, i32 %20)
store i8 124, i8* %2
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %30
25: ; preds = %17
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 90
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %3
br label %31
30: ; preds = %25, %17
store i32 0, i32* %3
br label %31
31: ; preds = %30, %29
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %45
34: ; preds = %31
%35 = load i8, i8* %2
%36 = sext i8 %35 to i32
%37 = icmp sge i32 %36, 97
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = load i8, i8* %2
%40 = sext i8 %39 to i32
%41 = icmp sle i32 %40, 122
br i1 %41, label %42, label %43
42: ; preds = %38
store i32 1, i32* %3
br label %44
43: ; preds = %38, %34
store i32 0, i32* %3
br label %44
44: ; preds = %43, %42
br label %45
45: ; preds = %44, %31
%46 = load i32, i32* %3
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %59
48: ; preds = %45
%49 = load i8, i8* %2
%50 = sext i8 %49 to i32
%51 = icmp sge i32 %50, 48
br i1 %51, label %52, label %57
52: ; preds = %48
%53 = load i8, i8* %2
%54 = sext i8 %53 to i32
%55 = icmp sle i32 %54, 57
br i1 %55, label %56, label %57
56: ; preds = %52
store i32 3, i32* %3
br label %58
57: ; preds = %52, %48
store i32 0, i32* %3
br label %58
58: ; preds = %57, %56
br label %59
59: ; preds = %58, %45
%60 = load i32, i32* %3
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %59
store i32 4, i32* %3
br label %63
63: ; preds = %62, %59
%64 = load i8, i8* %2
%65 = sext i8 %64 to i32
%66 = load i32, i32* %3
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %65, i32 %66)
ret i32 0
}

LLVM IR (-O2):
@.str.4 = [10 x i8] c"%c is %i\0A\00"
@str = [20 x i8] c"1 = Uppercase ASCII\00"
@str.5 = [20 x i8] c"2 = Lowercase ASCII\00"
@str.6 = [20 x i8] c"3 = Digit ASCII\00"
@str.7 = [20 x i8] c"4 = Special ASCII\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 49, i32 3)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 124, i32 4)
ret i32 0
}