#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 */
scalar_t__ isalnum(char);
scalar_t__ isalpha(char);
scalar_t__ iscntrl(char);
scalar_t__ isdigit(char);
scalar_t__ isgraph(char);
scalar_t__ islower(char);
scalar_t__ isprint(char);
scalar_t__ ispunct(char);
scalar_t__ isspace(char);
scalar_t__ isupper(char);
scalar_t__ isxdigit(char);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char *p;
  printf("     alnum     cntrl     graph     print"
         "     space    xdigit\n"
         "          alpha     digit     lower     punct"
         "     upper\n");
  for (p = "azAZ0 !\t"; *p != '\0'; p++) {
    if (iscntrl(*p))
      printf("\\x%02x:", *p);
    else
      printf("   %c:", *p);
    printf("  %c  ", isalnum(*p) ? 'x' : ' ');
    printf("  %c  ", isalpha(*p) ? 'x' : ' ');
    printf("  %c  ", iscntrl(*p) ? 'x' : ' ');
    printf("  %c  ", isdigit(*p) ? 'x' : ' ');
    printf("  %c  ", isgraph(*p) ? 'x' : ' ');
    printf("  %c  ", islower(*p) ? 'x' : ' ');
    printf("  %c  ", isprint(*p) ? 'x' : ' ');
    printf("  %c  ", ispunct(*p) ? 'x' : ' ');
    printf("  %c  ", isspace(*p) ? 'x' : ' ');
    printf("  %c  ", isupper(*p) ? 'x' : ' ');
    printf("  %c  ", isxdigit(*p) ? 'x' : ' ');
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe92(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1456 <main+0x296>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1050 <iscntrl@plt>
cmp    $0x0,%rax
je     1228 <main+0x68>
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    123d <main+0x7d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isalnum@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   10a0 <isalpha@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1050 <iscntrl@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xda0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   10e0 <isgraph@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <islower@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xd44(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   10c0 <isprint@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1080 <ispunct@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xce8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1090 <isspace@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   10b0 <isupper@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   10d0 <isxdigit@plt>
mov    %rax,%rcx
mov    $0x20,%esi
mov    $0x78,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc36(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11e8 <main+0x28>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe2d(%rip),%rdi
call   1060 <puts@plt>
mov    $0x61,%al
lea    0xe00(%rip),%r14
lea    0xe02(%rip),%r12
mov    $0x20,%r13d
lea    0xe04(%rip),%rbx
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1070 <iscntrl@plt>
test   %rax,%rax
movsbl (%r15,%r14,1),%ebp
mov    %r12,%rdi
lea    0xdd7(%rip),%rax
cmove  %rax,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   1090 <isalnum@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10c0 <isalpha@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   1070 <iscntrl@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   1040 <isdigit@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   1100 <isgraph@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   1050 <islower@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10e0 <isprint@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10a0 <ispunct@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10b0 <isspace@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10d0 <isupper@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%edi
call   10f0 <isxdigit@plt>
test   %rax,%rax
mov    $0x78,%esi
cmove  %r13d,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movzbl 0x1(%r15,%r14,1),%eax
add    $0x1,%r15
cmp    $0x8,%r15
jne    1220 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [118 x i8] c" alnum cntrl graph print space xdigit\0A alpha digit lower punct upper\0A\00"
@.str.1 = [9 x i8] c"azAZ0 !\09\00"
@.str.2 = [8 x i8] c"\\x%02x:\00"
@.str.3 = [7 x i8] c" %c:\00"
@.str.4 = [7 x i8] c" %c \00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %4
4: ; preds = %103, %0
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %106
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = call i64 @iscntrl(i8 signext %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %17)
br label %24
19: ; preds = %9
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %19, %14
%25 = load i8*, i8** %2
%26 = load i8, i8* %25
%27 = call i64 @isalnum(i8 signext %26)
%28 = icmp ne i64 %27, 0
%29 = zext i1 %28 to i64
%30 = select i1 %28, i32 120, i32 32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = load i8*, i8** %2
%33 = load i8, i8* %32
%34 = call i64 @isalpha(i8 signext %33)
%35 = icmp ne i64 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i32 120, i32 32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = load i8*, i8** %2
%40 = load i8, i8* %39
%41 = call i64 @iscntrl(i8 signext %40)
%42 = icmp ne i64 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i32 120, i32 32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %44)
%46 = load i8*, i8** %2
%47 = load i8, i8* %46
%48 = call i64 @isdigit(i8 signext %47)
%49 = icmp ne i64 %48, 0
%50 = zext i1 %49 to i64
%51 = select i1 %49, i32 120, i32 32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %51)
%53 = load i8*, i8** %2
%54 = load i8, i8* %53
%55 = call i64 @isgraph(i8 signext %54)
%56 = icmp ne i64 %55, 0
%57 = zext i1 %56 to i64
%58 = select i1 %56, i32 120, i32 32
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %58)
%60 = load i8*, i8** %2
%61 = load i8, i8* %60
%62 = call i64 @islower(i8 signext %61)
%63 = icmp ne i64 %62, 0
%64 = zext i1 %63 to i64
%65 = select i1 %63, i32 120, i32 32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %65)
%67 = load i8*, i8** %2
%68 = load i8, i8* %67
%69 = call i64 @isprint(i8 signext %68)
%70 = icmp ne i64 %69, 0
%71 = zext i1 %70 to i64
%72 = select i1 %70, i32 120, i32 32
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %72)
%74 = load i8*, i8** %2
%75 = load i8, i8* %74
%76 = call i64 @ispunct(i8 signext %75)
%77 = icmp ne i64 %76, 0
%78 = zext i1 %77 to i64
%79 = select i1 %77, i32 120, i32 32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %79)
%81 = load i8*, i8** %2
%82 = load i8, i8* %81
%83 = call i64 @isspace(i8 signext %82)
%84 = icmp ne i64 %83, 0
%85 = zext i1 %84 to i64
%86 = select i1 %84, i32 120, i32 32
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %86)
%88 = load i8*, i8** %2
%89 = load i8, i8* %88
%90 = call i64 @isupper(i8 signext %89)
%91 = icmp ne i64 %90, 0
%92 = zext i1 %91 to i64
%93 = select i1 %91, i32 120, i32 32
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %93)
%95 = load i8*, i8** %2
%96 = load i8, i8* %95
%97 = call i64 @isxdigit(i8 signext %96)
%98 = icmp ne i64 %97, 0
%99 = zext i1 %98 to i64
%100 = select i1 %98, i32 120, i32 32
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %100)
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %103
103: ; preds = %24
%104 = load i8*, i8** %2
%105 = getelementptr inbounds i8, i8* %104, i32 1
store i8* %105, i8** %2
br label %4
106: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"azAZ0 !\09\00"
@.str.2 = [8 x i8] c"\\x%02x:\00"
@.str.3 = [7 x i8] c" %c:\00"
@.str.4 = [7 x i8] c" %c \00"
@str = [117 x i8] c" alnum cntrl graph print space xdigit\0A alpha digit lower punct upper\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i8 [ 97, %0 ], [ %68, %2 ]
%4 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %67, %2 ]
%5 = tail call i64 @iscntrl(i8 signext %3)
%6 = icmp eq i64 %5, 0
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = select i1 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9, i32 %8)
%11 = load i8, i8* %4
%12 = tail call i64 @isalnum(i8 signext %11)
%13 = icmp eq i64 %12, 0
%14 = select i1 %13, i32 32, i32 120
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = load i8, i8* %4
%17 = tail call i64 @isalpha(i8 signext %16)
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i32 32, i32 120
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %19)
%21 = load i8, i8* %4
%22 = tail call i64 @iscntrl(i8 signext %21)
%23 = icmp eq i64 %22, 0
%24 = select i1 %23, i32 32, i32 120
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %24)
%26 = load i8, i8* %4
%27 = tail call i64 @isdigit(i8 signext %26)
%28 = icmp eq i64 %27, 0
%29 = select i1 %28, i32 32, i32 120
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = load i8, i8* %4
%32 = tail call i64 @isgraph(i8 signext %31)
%33 = icmp eq i64 %32, 0
%34 = select i1 %33, i32 32, i32 120
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%36 = load i8, i8* %4
%37 = tail call i64 @islower(i8 signext %36)
%38 = icmp eq i64 %37, 0
%39 = select i1 %38, i32 32, i32 120
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = load i8, i8* %4
%42 = tail call i64 @isprint(i8 signext %41)
%43 = icmp eq i64 %42, 0
%44 = select i1 %43, i32 32, i32 120
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %44)
%46 = load i8, i8* %4
%47 = tail call i64 @ispunct(i8 signext %46)
%48 = icmp eq i64 %47, 0
%49 = select i1 %48, i32 32, i32 120
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %49)
%51 = load i8, i8* %4
%52 = tail call i64 @isspace(i8 signext %51)
%53 = icmp eq i64 %52, 0
%54 = select i1 %53, i32 32, i32 120
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %54)
%56 = load i8, i8* %4
%57 = tail call i64 @isupper(i8 signext %56)
%58 = icmp eq i64 %57, 0
%59 = select i1 %58, i32 32, i32 120
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %59)
%61 = load i8, i8* %4
%62 = tail call i64 @isxdigit(i8 signext %61)
%63 = icmp eq i64 %62, 0
%64 = select i1 %63, i32 32, i32 120
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %64)
%66 = tail call i32 @putchar(i32 10)
%67 = getelementptr inbounds i8, i8* %4, i64 1
%68 = load i8, i8* %67
%69 = icmp eq i8* %67, getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 8)
br i1 %69, label %70, label %2
70: ; preds = %2
ret i32 0
}