#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 *, ...);
void putcharExplicit(char c) {
  if ('a' <= c && c <= 'z') {
    printf("%c", c);
    return;
  }
  if ('A' <= c && c <= 'Z') {
    printf("%c", c);
    return;
  }
  if ('0' <= c && c <= '9') {
    printf("%c", c);
    return;
  }
  if (c == ' ') {
    printf("_");
    return;
  }
  if (c == '\n') {
    printf("<\\n>\n");
    return;
  }
  if (c == '\0') {
    printf("<\\0>");
  }
  printf("<%c:%d>", c, c);
}


x86 assembly (clang, -O0):
<putcharExplicit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1153 <putcharExplicit+0x43>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1153 <putcharExplicit+0x43>
movsbl -0x1(%rbp),%esi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <putcharExplicit+0x11e>
movsbl -0x1(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1188 <putcharExplicit+0x78>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1188 <putcharExplicit+0x78>
movsbl -0x1(%rbp),%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <putcharExplicit+0x11e>
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     11bd <putcharExplicit+0xad>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     11bd <putcharExplicit+0xad>
movsbl -0x1(%rbp),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <putcharExplicit+0x11e>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jne    11dd <putcharExplicit+0xcd>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <putcharExplicit+0x11e>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    11fd <putcharExplicit+0xed>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122e <putcharExplicit+0x11e>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1218 <putcharExplicit+0x108>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1(%rbp),%esi
movsbl -0x1(%rbp),%edx
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcharExplicit>:
push   %rbx
mov    %edi,%ebx
lea    -0x61(%rbx),%eax
cmp    $0x19,%al
jbe    1148 <putcharExplicit+0x18>
lea    -0x41(%rbx),%eax
cmp    $0x19,%al
jbe    1148 <putcharExplicit+0x18>
lea    -0x30(%rbx),%eax
cmp    $0x9,%al
ja     1150 <putcharExplicit+0x20>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <putchar@plt>
test   %bl,%bl
je     1169 <putcharExplicit+0x39>
cmp    $0xa,%bl
je     118a <putcharExplicit+0x5a>
cmp    $0x20,%bl
jne    1177 <putcharExplicit+0x47>
mov    $0x5f,%edi
pop    %rbx
jmp    1030 <putchar@plt>
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe87(%rip),%rdi
mov    %ebx,%esi
mov    %ebx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>
lea    0xe7c(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@.str.3 = [5 x i8] c"<\\0>\00"
@.str.4 = [8 x i8] c"<%c:%d>\00"
@str = [5 x i8] c"<\\n>\00"
define void @putcharExplicit(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @putchar(i32 %2)
br label %26
7: ; preds = %1
%8 = add i8 %0, -65
%9 = icmp ult i8 %8, 26
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @putchar(i32 %2)
br label %26
12: ; preds = %7
%13 = add i8 %0, -48
%14 = icmp ult i8 %13, 10
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @putchar(i32 %2)
br label %26
17: ; preds = %12
switch i8 %0, label %24 [
i8 32, label %18
i8 10, label %20
i8 0, label %22
]
18: ; preds = %17
%19 = tail call i32 @putchar(i32 95)
br label %26
20: ; preds = %17
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %26
22: ; preds = %17
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %17, %22
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %2, i32 %2)
br label %26
26: ; preds = %24, %20, %18, %15, %10, %5
ret void
}