char *hp2ascii(char *src, int len) {
  char *esc;
  unsigned char c;
  static char dst[256];
  int s, d = 0;
  for (s = 0; s < len; s++) {
    c = src[s] & 127;
    switch (c) {
    case 0:
      esc = "\342\227\206";
      break;
    case 1:
      esc = "\313\243";
      break;
    case 2:
      esc = "x\314\204";
      break;
    case 3:
      esc = "\342\206\220";
      break;
    case 4:
      esc = "\316\261";
      break;
    case 5:
      esc = "\316\262";
      break;
    case 6:
      esc = "\316\223";
      break;
    case 7:
      esc = "\342\206\223";
      break;
    case 8:
      esc = "\316\224";
      break;
    case 9:
      esc = "\317\203";
      break;
    case 10:
      esc = "\342\227\206";
      break;
    case 11:
      esc = "\316\273";
      break;
    case 12:
      esc = "\316\274";
      break;
    case 13:
      esc = "\342\210\241";
      break;
    case 14:
      esc = "\317\204";
      break;
    case 15:
      esc = "\316\246";
      break;
    case 16:
      esc = "\316\230";
      break;
    case 17:
      esc = "\316\251";
      break;
    case 18:
      esc = "\316\264";
      break;
    case 19:
      esc = "\303\205";
      break;
    case 20:
      esc = "\303\245";
      break;
    case 21:
      esc = "\303\204";
      break;
    case 22:
      esc = "\303\244";
      break;
    case 23:
      esc = "\303\226";
      break;
    case 24:
      esc = "\303\266";
      break;
    case 25:
      esc = "\303\234";
      break;
    case 26:
      esc = "\303\274";
      break;
    case 27:
      esc = "\303\206";
      break;
    case 28:
      esc = "\303\246";
      break;
    case 29:
      esc = "\342\211\240";
      break;
    case 30:
      esc = "\302\243";
      break;
    case 31:
      esc = "\342\226\222";
      break;
    case 94:
      esc = "\342\206\221";
      break;
    case 123:
      esc = "\317\200";
      break;
    case 125:
      esc = "\342\206\222";
      break;
    case 126:
      esc = "\316\243";
      break;
    case 127:
      esc = "\342\224\234";
      break;
    default:
      dst[d++] = c;
      continue;
    }
    while (*esc != 0)
      dst[d++] = *esc++;
  }
  dst[d] = 0;
  return dst;
}


x86 assembly (clang, -O0):
<hp2ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    141f <hp2ascii+0x31f>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,1),%al
and    $0x7f,%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
mov    %rax,-0x30(%rbp)
test   %al,%al
js     13a9 <hp2ascii+0x2a9>
mov    -0x30(%rbp),%rax
lea    0xeb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x10a0(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1094(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1087(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x107b(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x106f(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1062(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1055(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1048(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x103c(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x102f(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1000(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1012(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0x1005(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xff8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfec(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfdf(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfd2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfc5(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfb8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xfab(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf9e(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf91(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf84(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf77(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf6a(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf5d(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf50(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf43(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf36(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf29(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf1d(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf10(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xf04(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xef8(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xedf(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
lea    0xed2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13c9 <hp2ascii+0x2c9>
mov    -0x19(%rbp),%dl
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %eax,%rcx
lea    0x2c6f(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    1411 <hp2ascii+0x311>
jmp    13ce <hp2ascii+0x2ce>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     140c <hp2ascii+0x30c>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%dl
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %eax,%rcx
lea    0x2c2c(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    13ce <hp2ascii+0x2ce>
jmp    1411 <hp2ascii+0x311>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1119 <hp2ascii+0x19>
movslq -0x24(%rbp),%rcx
lea    0x2c06(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2bfb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hp2ascii>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    130d <hp2ascii+0x20d>
mov    %esi,%r10d
xor    %r14d,%r14d
lea    0x10e6(%rip),%r8
lea    0x2f0f(%rip),%r15
lea    0xed8(%rip),%r9
xor    %r11d,%r11d
jmp    114d <hp2ascii+0x4d>
movslq %r11d,%rax
add    $0x1,%r11d
mov    %cl,(%rax,%r15,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r10,%r14
je     1310 <hp2ascii+0x210>
movzbl (%rdi,%r14,1),%ecx
and    $0x7f,%ecx
cmp    $0x7f,%ecx
ja     112d <hp2ascii+0x2d>
movslq (%r9,%rcx,4),%rdx
add    %r9,%rdx
mov    %r8,%rax
jmp    *%rdx
lea    0x1097(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x108e(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1086(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x107e(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1075(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x106c(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1063(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x105b(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1052(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1049(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1040(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1037(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x102f(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1026(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x101d(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1014(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x100b(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0x1002(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xff9(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xff0(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfe7(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfde(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfd8(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfd2(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfcc(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfc6(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfc0(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfba(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfb5(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfaf(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfaa(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xfa5(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xf9f(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xf9a(%rip),%rax
jmp    12e0 <hp2ascii+0x1e0>
lea    0xf94(%rip),%rax
xchg   %ax,%ax
mov    (%rax),%dl
test   %dl,%dl
je     1140 <hp2ascii+0x40>
movslq %r11d,%rcx
xor    %ebx,%ebx
nop
lea    (%rcx,%rbx,1),%rsi
mov    %dl,(%r15,%rsi,1)
movzbl 0x1(%rax,%rbx,1),%edx
add    $0x1,%rbx
test   %dl,%dl
jne    12f0 <hp2ascii+0x1f0>
add    %ebx,%r11d
jmp    1140 <hp2ascii+0x40>
xor    %r11d,%r11d
movslq %r11d,%rcx
lea    0x2d16(%rip),%rax
movb   $0x0,(%rcx,%rax,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@hp2ascii.dst = internal global [256 x i8] zeroinitializer
@.str = [4 x i8] c"\E2\97\86\00"
@.str.1 = [3 x i8] c"\CB\A3\00"
@.str.2 = [4 x i8] c"x\CC\84\00"
@.str.3 = [4 x i8] c"\E2\86\90\00"
@.str.4 = [3 x i8] c"\CE\B1\00"
@.str.5 = [3 x i8] c"\CE\B2\00"
@.str.6 = [3 x i8] c"\CE\93\00"
@.str.7 = [4 x i8] c"\E2\86\93\00"
@.str.8 = [3 x i8] c"\CE\94\00"
@.str.9 = [3 x i8] c"\CF\83\00"
@.str.10 = [3 x i8] c"\CE\BB\00"
@.str.11 = [3 x i8] c"\CE\BC\00"
@.str.12 = [4 x i8] c"\E2\88\A1\00"
@.str.13 = [3 x i8] c"\CF\84\00"
@.str.14 = [3 x i8] c"\CE\A6\00"
@.str.15 = [3 x i8] c"\CE\98\00"
@.str.16 = [3 x i8] c"\CE\A9\00"
@.str.17 = [3 x i8] c"\CE\B4\00"
@.str.18 = [3 x i8] c"\C3\85\00"
@.str.19 = [3 x i8] c"\C3\A5\00"
@.str.20 = [3 x i8] c"\C3\84\00"
@.str.21 = [3 x i8] c"\C3\A4\00"
@.str.22 = [3 x i8] c"\C3\96\00"
@.str.23 = [3 x i8] c"\C3\B6\00"
@.str.24 = [3 x i8] c"\C3\9C\00"
@.str.25 = [3 x i8] c"\C3\BC\00"
@.str.26 = [3 x i8] c"\C3\86\00"
@.str.27 = [3 x i8] c"\C3\A6\00"
@.str.28 = [4 x i8] c"\E2\89\A0\00"
@.str.29 = [3 x i8] c"\C2\A3\00"
@.str.30 = [4 x i8] c"\E2\96\92\00"
@.str.31 = [4 x i8] c"\E2\86\91\00"
@.str.32 = [3 x i8] c"\CF\80\00"
@.str.33 = [4 x i8] c"\E2\86\92\00"
@.str.34 = [3 x i8] c"\CE\A3\00"
@.str.35 = [4 x i8] c"\E2\94\9C\00"
define i8* @hp2ascii(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %8
store i32 0, i32* %7
br label %9
9: ; preds = %82, %2
%10 = load i32, i32* %7
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %85
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = and i32 %19, 127
%21 = trunc i32 %20 to i8
store i8 %21, i8* %6
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
switch i32 %23, label %61 [
i32 0, label %24
i32 1, label %25
i32 2, label %26
i32 3, label %27
i32 4, label %28
i32 5, label %29
i32 6, label %30
i32 7, label %31
i32 8, label %32
i32 9, label %33
i32 10, label %34
i32 11, label %35
i32 12, label %36
i32 13, label %37
i32 14, label %38
i32 15, label %39
i32 16, label %40
i32 17, label %41
i32 18, label %42
i32 19, label %43
i32 20, label %44
i32 21, label %45
i32 22, label %46
i32 23, label %47
i32 24, label %48
i32 25, label %49
i32 26, label %50
i32 27, label %51
i32 28, label %52
i32 29, label %53
i32 30, label %54
i32 31, label %55
i32 94, label %56
i32 123, label %57
i32 125, label %58
i32 126, label %59
i32 127, label %60
]
24: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %5
br label %67
25: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %5
br label %67
26: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %5
br label %67
27: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %5
br label %67
28: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %5
br label %67
29: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %5
br label %67
30: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %5
br label %67
31: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8** %5
br label %67
32: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8** %5
br label %67
33: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8** %5
br label %67
34: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %5
br label %67
35: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %5
br label %67
36: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8** %5
br label %67
37: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %5
br label %67
38: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8** %5
br label %67
39: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8** %5
br label %67
40: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8** %5
br label %67
41: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8** %5
br label %67
42: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8** %5
br label %67
43: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8** %5
br label %67
44: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8** %5
br label %67
45: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i8** %5
br label %67
46: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i8** %5
br label %67
47: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8** %5
br label %67
48: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), i8** %5
br label %67
49: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0), i8** %5
br label %67
50: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), i8** %5
br label %67
51: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0), i8** %5
br label %67
52: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8** %5
br label %67
53: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i8** %5
br label %67
54: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %5
br label %67
55: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i64 0, i64 0), i8** %5
br label %67
56: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i64 0, i64 0), i8** %5
br label %67
57: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.32, i64 0, i64 0), i8** %5
br label %67
58: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i64 0, i64 0), i8** %5
br label %67
59: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.34, i64 0, i64 0), i8** %5
br label %67
60: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i64 0, i64 0), i8** %5
br label %67
61: ; preds = %13
%62 = load i8, i8* %6
%63 = load i32, i32* %8
%64 = add nsw i32 %63, 1
store i32 %64, i32* %8
%65 = sext i32 %63 to i64
%66 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %65
store i8 %62, i8* %66
br label %82
67: ; preds = %60, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24
br label %68
68: ; preds = %73, %67
%69 = load i8*, i8** %5
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %81
73: ; preds = %68
%74 = load i8*, i8** %5
%75 = getelementptr inbounds i8, i8* %74, i32 1
store i8* %75, i8** %5
%76 = load i8, i8* %74
%77 = load i32, i32* %8
%78 = add nsw i32 %77, 1
store i32 %78, i32* %8
%79 = sext i32 %77 to i64
%80 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %79
store i8 %76, i8* %80
br label %68
81: ; preds = %68
br label %82
82: ; preds = %81, %61
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %9
85: ; preds = %9
%86 = load i32, i32* %8
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %87
store i8 0, i8* %88
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 0)
}

LLVM IR (-O2):
@hp2ascii.dst = internal global [256 x i8] zeroinitializer
@.str = [4 x i8] c"\E2\97\86\00"
@.str.1 = [3 x i8] c"\CB\A3\00"
@.str.2 = [4 x i8] c"x\CC\84\00"
@.str.3 = [4 x i8] c"\E2\86\90\00"
@.str.4 = [3 x i8] c"\CE\B1\00"
@.str.5 = [3 x i8] c"\CE\B2\00"
@.str.6 = [3 x i8] c"\CE\93\00"
@.str.7 = [4 x i8] c"\E2\86\93\00"
@.str.8 = [3 x i8] c"\CE\94\00"
@.str.9 = [3 x i8] c"\CF\83\00"
@.str.10 = [3 x i8] c"\CE\BB\00"
@.str.11 = [3 x i8] c"\CE\BC\00"
@.str.12 = [4 x i8] c"\E2\88\A1\00"
@.str.13 = [3 x i8] c"\CF\84\00"
@.str.14 = [3 x i8] c"\CE\A6\00"
@.str.15 = [3 x i8] c"\CE\98\00"
@.str.16 = [3 x i8] c"\CE\A9\00"
@.str.17 = [3 x i8] c"\CE\B4\00"
@.str.18 = [3 x i8] c"\C3\85\00"
@.str.19 = [3 x i8] c"\C3\A5\00"
@.str.20 = [3 x i8] c"\C3\84\00"
@.str.21 = [3 x i8] c"\C3\A4\00"
@.str.22 = [3 x i8] c"\C3\96\00"
@.str.23 = [3 x i8] c"\C3\B6\00"
@.str.24 = [3 x i8] c"\C3\9C\00"
@.str.25 = [3 x i8] c"\C3\BC\00"
@.str.26 = [3 x i8] c"\C3\86\00"
@.str.27 = [3 x i8] c"\C3\A6\00"
@.str.28 = [4 x i8] c"\E2\89\A0\00"
@.str.29 = [3 x i8] c"\C2\A3\00"
@.str.30 = [4 x i8] c"\E2\96\92\00"
@.str.31 = [4 x i8] c"\E2\86\91\00"
@.str.32 = [3 x i8] c"\CF\80\00"
@.str.33 = [4 x i8] c"\E2\86\92\00"
@.str.34 = [3 x i8] c"\CE\A3\00"
@.str.35 = [4 x i8] c"\E2\94\9C\00"
define i8* @hp2ascii(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %73
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %69
%7 = phi i64 [ 0, %4 ], [ %71, %69 ]
%8 = phi i32 [ 0, %4 ], [ %70, %69 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = and i8 %10, 127
%12 = zext i8 %11 to i32
switch i32 %12, label %48 [
i32 0, label %52
i32 1, label %13
i32 2, label %14
i32 3, label %15
i32 4, label %16
i32 5, label %17
i32 6, label %18
i32 7, label %19
i32 8, label %20
i32 9, label %21
i32 10, label %52
i32 11, label %22
i32 12, label %23
i32 13, label %24
i32 14, label %25
i32 15, label %26
i32 16, label %27
i32 17, label %28
i32 18, label %29
i32 19, label %30
i32 20, label %31
i32 21, label %32
i32 22, label %33
i32 23, label %34
i32 24, label %35
i32 25, label %36
i32 26, label %37
i32 27, label %38
i32 28, label %39
i32 29, label %40
i32 30, label %41
i32 31, label %42
i32 94, label %43
i32 123, label %44
i32 125, label %45
i32 126, label %46
i32 127, label %47
]
13: ; preds = %6
br label %52
14: ; preds = %6
br label %52
15: ; preds = %6
br label %52
16: ; preds = %6
br label %52
17: ; preds = %6
br label %52
18: ; preds = %6
br label %52
19: ; preds = %6
br label %52
20: ; preds = %6
br label %52
21: ; preds = %6
br label %52
22: ; preds = %6
br label %52
23: ; preds = %6
br label %52
24: ; preds = %6
br label %52
25: ; preds = %6
br label %52
26: ; preds = %6
br label %52
27: ; preds = %6
br label %52
28: ; preds = %6
br label %52
29: ; preds = %6
br label %52
30: ; preds = %6
br label %52
31: ; preds = %6
br label %52
32: ; preds = %6
br label %52
33: ; preds = %6
br label %52
34: ; preds = %6
br label %52
35: ; preds = %6
br label %52
36: ; preds = %6
br label %52
37: ; preds = %6
br label %52
38: ; preds = %6
br label %52
39: ; preds = %6
br label %52
40: ; preds = %6
br label %52
41: ; preds = %6
br label %52
42: ; preds = %6
br label %52
43: ; preds = %6
br label %52
44: ; preds = %6
br label %52
45: ; preds = %6
br label %52
46: ; preds = %6
br label %52
47: ; preds = %6
br label %52
48: ; preds = %6
%49 = add nsw i32 %8, 1
%50 = sext i32 %8 to i64
%51 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %50
store i8 %11, i8* %51
br label %69
52: ; preds = %6, %6, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%53 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i64 0, i64 0), %47 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.34, i64 0, i64 0), %46 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i64 0, i64 0), %45 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.32, i64 0, i64 0), %44 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i64 0, i64 0), %43 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i64 0, i64 0), %42 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), %41 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), %40 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), %39 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0), %38 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), %37 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0), %36 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0), %35 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), %34 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), %33 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), %32 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), %31 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), %30 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), %29 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), %28 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), %27 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), %26 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), %25 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), %24 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), %23 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), %22 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), %21 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), %20 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), %19 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), %18 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), %17 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %16 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %15 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %14 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %13 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %6 ]
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 0
br i1 %55, label %69, label %56
56: ; preds = %52
%57 = sext i32 %8 to i64
br label %58
58: ; preds = %56, %58
%59 = phi i64 [ %57, %56 ], [ %63, %58 ]
%60 = phi i8 [ %54, %56 ], [ %65, %58 ]
%61 = phi i8* [ %53, %56 ], [ %62, %58 ]
%62 = getelementptr inbounds i8, i8* %61, i64 1
%63 = add i64 %59, 1
%64 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %59
store i8 %60, i8* %64
%65 = load i8, i8* %62
%66 = icmp eq i8 %65, 0
br i1 %66, label %67, label %58
67: ; preds = %58
%68 = trunc i64 %63 to i32
br label %69
69: ; preds = %67, %52, %48
%70 = phi i32 [ %49, %48 ], [ %8, %52 ], [ %68, %67 ]
%71 = add nuw nsw i64 %7, 1
%72 = icmp eq i64 %71, %5
br i1 %72, label %73, label %6
73: ; preds = %69, %2
%74 = phi i32 [ 0, %2 ], [ %70, %69 ]
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %75
store i8 0, i8* %76
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 0)
}