void putcp(int c) {
  switch (c) {
  case 0:
    break;
  case '\f':
    break;
  case '{':
    printf("%s", "\\*(+K{\\*(-K");
    break;
  case '}':
    printf("%s", "\\*(+K}\\*(-K");
    break;
  case '\\':
    printf("%s", "\\e");
    break;
  case '_':
    printf("%s", "\\*_");
    break;
  case '-':
    printf("%s", "\\*-");
    break;
  case '`':
    printf("%s", "\\`");
    break;
  case '\'':
    printf("%s", "\\'");
    break;
  case '.':
    printf("%s", "\\&.");
    break;
  case '*':
    printf("%s", "\\fI*\\fP");
    break;
  case '/':
    printf("%s", "\\fI\\h'\\w' 'u-\\w'/'u'/\\fP");
    break;
  default:
    if (c < 040)
      putchar('^'), c |= '@';
  case '\t':
  case '\n':
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<putcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x7d,%rax
ja     125e <putcp+0x13e>
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    128c <putcp+0x16c>
jmp    128c <putcp+0x16c>
lea    0x1097(%rip),%rdi
lea    0x1093(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0x107d(%rip),%rdi
lea    0x1085(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0x1063(%rip),%rdi
lea    0x1077(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0x1049(%rip),%rdi
lea    0x1060(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0x102f(%rip),%rdi
lea    0x104a(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0x1015(%rip),%rdi
lea    0x1034(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0xffb(%rip),%rdi
lea    0x101d(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0xfe1(%rip),%rdi
lea    0x1006(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0xfc7(%rip),%rdi
lea    0xff0(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
lea    0xfad(%rip),%rdi
lea    0xfde(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    128c <putcp+0x16c>
cmpl   $0x20,-0x4(%rbp)
jge    127d <putcp+0x15d>
mov    $0x5e,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    1282 <putcp+0x162>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putcp>:
push   %rbx
mov    %edi,%ebx
cmp    $0x7d,%edi
ja     113c <putcp+0x1c>
mov    %ebx,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
pop    %rbx
ret
cmp    $0x1f,%ebx
jg     1150 <putcp+0x30>
mov    $0x5e,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
or     $0x40,%ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <putchar@plt>
lea    0x1097(%rip),%rdi
lea    0x10b9(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1084(%rip),%rdi
lea    0x10ad(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1074(%rip),%rdi
lea    0x108f(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1064(%rip),%rdi
lea    0x1089(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1054(%rip),%rdi
lea    0x1085(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1044(%rip),%rdi
lea    0x1058(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1034(%rip),%rdi
lea    0x104b(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1024(%rip),%rdi
lea    0x1043(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1014(%rip),%rdi
lea    0x1010(%rip),%rsi
jmp    11fb <putcp+0xdb>
lea    0x1004(%rip),%rdi
lea    0x100c(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [12 x i8] c"\\*(+K{\\*(-K\00"
@.str.2 = [12 x i8] c"\\*(+K}\\*(-K\00"
@.str.3 = [3 x i8] c"\\e\00"
@.str.4 = [4 x i8] c"\\*_\00"
@.str.5 = [4 x i8] c"\\*-\00"
@.str.6 = [3 x i8] c"\\`\00"
@.str.7 = [3 x i8] c"\\'\00"
@.str.8 = [4 x i8] c"\\&.\00"
@.str.9 = [8 x i8] c"\\fI*\\fP\00"
@.str.10 = [25 x i8] c"\\fI\\h'\\w' 'u-\\w'/'u'/\\fP\00"
define void @putcp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %26 [
i32 0, label %4
i32 12, label %5
i32 123, label %6
i32 125, label %8
i32 92, label %10
i32 95, label %12
i32 45, label %14
i32 96, label %16
i32 39, label %18
i32 46, label %20
i32 42, label %22
i32 47, label %24
i32 9, label %34
i32 10, label %34
]
4: ; preds = %1
br label %37
5: ; preds = %1
br label %37
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %37
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %37
10: ; preds = %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %37
12: ; preds = %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %37
14: ; preds = %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %37
16: ; preds = %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %37
18: ; preds = %1
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %37
20: ; preds = %1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %37
22: ; preds = %1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %37
24: ; preds = %1
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
br label %37
26: ; preds = %1
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 32
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 94)
%31 = load i32, i32* %2
%32 = or i32 %31, 64
store i32 %32, i32* %2
br label %33
33: ; preds = %29, %26
br label %34
34: ; preds = %1, %1, %33
%35 = load i32, i32* %2
%36 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %35)
br label %37
37: ; preds = %34, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %5, %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [12 x i8] c"\\*(+K{\\*(-K\00"
@.str.2 = [12 x i8] c"\\*(+K}\\*(-K\00"
@.str.3 = [3 x i8] c"\\e\00"
@.str.4 = [4 x i8] c"\\*_\00"
@.str.5 = [4 x i8] c"\\*-\00"
@.str.6 = [3 x i8] c"\\`\00"
@.str.7 = [3 x i8] c"\\'\00"
@.str.8 = [4 x i8] c"\\&.\00"
@.str.9 = [8 x i8] c"\\fI*\\fP\00"
@.str.10 = [25 x i8] c"\\fI\\h'\\w' 'u-\\w'/'u'/\\fP\00"
define void @putcp(i32 %0) {
switch i32 %0, label %22 [
i32 0, label %30
i32 12, label %30
i32 123, label %2
i32 125, label %4
i32 92, label %6
i32 95, label %8
i32 45, label %10
i32 96, label %12
i32 39, label %14
i32 46, label %16
i32 42, label %18
i32 47, label %20
i32 9, label %27
i32 10, label %27
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %30
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %30
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %30
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %30
10: ; preds = %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %30
12: ; preds = %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %30
14: ; preds = %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %30
16: ; preds = %1
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %30
18: ; preds = %1
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %30
20: ; preds = %1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
br label %30
22: ; preds = %1
%23 = icmp slt i32 %0, 32
br i1 %23, label %24, label %27
24: ; preds = %22
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 94)
%26 = or i32 %0, 64
br label %27
27: ; preds = %22, %24, %1, %1
%28 = phi i32 [ %26, %24 ], [ %0, %22 ], [ %0, %1 ], [ %0, %1 ]
%29 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %28)
br label %30
30: ; preds = %27, %20, %18, %1, %1, %16, %14, %12, %10, %8, %6, %4, %2
ret void
}