void putcp(register int c) {
  switch (c) {
  case 0:
    break;
  case '\f':
    break;
  case '\r':
    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     1263 <putcp+0x143>
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1291 <putcp+0x171>
jmp    1291 <putcp+0x171>
jmp    1291 <putcp+0x171>
lea    0x1092(%rip),%rdi
lea    0x108e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0x1078(%rip),%rdi
lea    0x1080(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0x105e(%rip),%rdi
lea    0x1072(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0x1044(%rip),%rdi
lea    0x105b(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0x102a(%rip),%rdi
lea    0x1045(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0x1010(%rip),%rdi
lea    0x102f(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0xff6(%rip),%rdi
lea    0x1018(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0xfdc(%rip),%rdi
lea    0x1001(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0xfc2(%rip),%rdi
lea    0xfeb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
lea    0xfa8(%rip),%rdi
lea    0xfd9(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1291 <putcp+0x171>
cmpl   $0x20,-0x4(%rbp)
jge    1282 <putcp+0x162>
mov    $0x5e,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    1287 <putcp+0x167>
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     1195 <putcp+0x75>
mov    %ebx,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
pop    %rbx
ret
lea    0x10b5(%rip),%rdi
lea    0x10d7(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x10a2(%rip),%rdi
lea    0x10b6(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x108f(%rip),%rdi
lea    0x10a6(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x107c(%rip),%rdi
lea    0x109b(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x106c(%rip),%rdi
lea    0x1068(%rip),%rsi
jmp    1201 <putcp+0xe1>
cmp    $0x1f,%ebx
jg     11a9 <putcp+0x89>
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    0x103e(%rip),%rdi
lea    0x1067(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x102e(%rip),%rdi
lea    0x1049(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x101e(%rip),%rdi
lea    0x1043(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0x100e(%rip),%rdi
lea    0x103f(%rip),%rsi
jmp    1201 <putcp+0xe1>
lea    0xffe(%rip),%rdi
lea    0x1006(%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 %27 [
i32 0, label %4
i32 12, label %5
i32 13, label %6
i32 123, label %7
i32 125, label %9
i32 92, label %11
i32 95, label %13
i32 45, label %15
i32 96, label %17
i32 39, label %19
i32 46, label %21
i32 42, label %23
i32 47, label %25
i32 9, label %35
i32 10, label %35
]
4: ; preds = %1
br label %38
5: ; preds = %1
br label %38
6: ; preds = %1
br label %38
7: ; preds = %1
%8 = 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 %38
9: ; preds = %1
%10 = 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 %38
11: ; preds = %1
%12 = 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 %38
13: ; preds = %1
%14 = 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 %38
15: ; preds = %1
%16 = 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 %38
17: ; preds = %1
%18 = 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 %38
19: ; preds = %1
%20 = 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 %38
21: ; preds = %1
%22 = 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 %38
23: ; preds = %1
%24 = 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 %38
25: ; preds = %1
%26 = 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 %38
27: ; preds = %1
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 32
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 94)
%32 = load i32, i32* %2
%33 = or i32 %32, 64
store i32 %33, i32* %2
br label %34
34: ; preds = %30, %27
br label %35
35: ; preds = %1, %1, %34
%36 = load i32, i32* %2
%37 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %36)
br label %38
38: ; preds = %35, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %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 13, 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, %16, %1, %1, %1, %14, %12, %10, %8, %6, %4, %2
ret void
}