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 = "\\diamond";
      break;
    case 1:
      esc = "x";
      break;
    case 2:
      esc = "\\mean";
      break;
    case 3:
      esc = "<-";
      break;
    case 4:
      esc = "\\alpha";
      break;
    case 5:
      esc = "\\beta";
      break;
    case 6:
      esc = "\\Gamma";
      break;
    case 7:
      esc = "v";
      break;
    case 8:
      esc = "\\Delta";
      break;
    case 9:
      esc = "\\sigma";
      break;
    case 10:
      esc = "\\LF";
      break;
    case 11:
      esc = "\\lambda";
      break;
    case 12:
      esc = "\\mu";
      break;
    case 13:
      esc = "\\angle";
      break;
    case 14:
      esc = "\\tau";
      break;
    case 15:
      esc = "\\Phi";
      break;
    case 16:
      esc = "\\Theta";
      break;
    case 17:
      esc = "\\Omega";
      break;
    case 18:
      esc = "\\delta";
      break;
    case 19:
      esc = "\305";
      break;
    case 20:
      esc = "\345";
      break;
    case 21:
      esc = "\304";
      break;
    case 22:
      esc = "\344";
      break;
    case 23:
      esc = "\326";
      break;
    case 24:
      esc = "\366";
      break;
    case 25:
      esc = "\334";
      break;
    case 26:
      esc = "\374";
      break;
    case 27:
      esc = "\306";
      break;
    case 28:
      esc = "\346";
      break;
    case 29:
      esc = "!=";
      break;
    case 30:
      esc = "\243";
      break;
    case 31:
      esc = "\\gray";
      break;
    case '\\':
      esc = "\\\\";
      break;
    case 96:
      esc = "\\T";
      break;
    case 123:
      esc = "\\pi";
      break;
    case 125:
      esc = "->";
      break;
    case 126:
      esc = "\\Sigma";
      break;
    case 127:
      esc = "|-";
      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    142f <hp2ascii+0x32f>
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     13b9 <hp2ascii+0x2b9>
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    13d9 <hp2ascii+0x2d9>
lea    0x1099(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x108b(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1081(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1074(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x106b(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1061(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1058(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x104a(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1041(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1038(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x102c(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1024(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1018(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x100f(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0x1004(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xff9(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xff0(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfe7(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfde(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfd0(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfc2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfb4(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xfa6(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf98(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf8a(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf7c(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf6e(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf60(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf52(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf45(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf37(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf2d(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf20(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf13(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xf07(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xefa(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
lea    0xef1(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    13d9 <hp2ascii+0x2d9>
mov    -0x19(%rbp),%dl
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x24(%rbp)
movslq %eax,%rcx
lea    0x2c5f(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    1421 <hp2ascii+0x321>
jmp    13de <hp2ascii+0x2de>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     141c <hp2ascii+0x31c>
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    0x2c1c(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    13de <hp2ascii+0x2de>
jmp    1421 <hp2ascii+0x321>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1119 <hp2ascii+0x19>
movslq -0x24(%rbp),%rcx
lea    0x2bf6(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2beb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hp2ascii>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    132d <hp2ascii+0x22d>
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     1330 <hp2ascii+0x230>
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    0x109c(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1092(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x108c(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1083(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x107e(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1078(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1073(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1069(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1064(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x105f(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1057(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1053(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x104b(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1046(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x103f(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1038(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1033(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x102e(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1029(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x101f(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1015(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x100b(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0x1001(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xff7(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfed(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfe6(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfdf(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfd8(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfd1(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfcb(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfc4(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfc1(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfbb(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfb5(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfb0(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfaa(%rip),%rax
jmp    1300 <hp2ascii+0x200>
lea    0xfa8(%rip),%rax
nopl   0x0(%rax)
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    1310 <hp2ascii+0x210>
add    %ebx,%r11d
jmp    1140 <hp2ascii+0x40>
xor    %r11d,%r11d
movslq %r11d,%rcx
lea    0x2cf6(%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 = [9 x i8] c"\\diamond\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [6 x i8] c"\\mean\00"
@.str.3 = [3 x i8] c"<-\00"
@.str.4 = [7 x i8] c"\\alpha\00"
@.str.5 = [6 x i8] c"\\beta\00"
@.str.6 = [7 x i8] c"\\Gamma\00"
@.str.7 = [2 x i8] c"v\00"
@.str.8 = [7 x i8] c"\\Delta\00"
@.str.9 = [7 x i8] c"\\sigma\00"
@.str.10 = [4 x i8] c"\\LF\00"
@.str.11 = [8 x i8] c"\\lambda\00"
@.str.12 = [4 x i8] c"\\mu\00"
@.str.13 = [7 x i8] c"\\angle\00"
@.str.14 = [5 x i8] c"\\tau\00"
@.str.15 = [5 x i8] c"\\Phi\00"
@.str.16 = [7 x i8] c"\\Theta\00"
@.str.17 = [7 x i8] c"\\Omega\00"
@.str.18 = [7 x i8] c"\\delta\00"
@.str.19 = [2 x i8] c"\C5\00"
@.str.20 = [2 x i8] c"\E5\00"
@.str.21 = [2 x i8] c"\C4\00"
@.str.22 = [2 x i8] c"\E4\00"
@.str.23 = [2 x i8] c"\D6\00"
@.str.24 = [2 x i8] c"\F6\00"
@.str.25 = [2 x i8] c"\DC\00"
@.str.26 = [2 x i8] c"\FC\00"
@.str.27 = [2 x i8] c"\C6\00"
@.str.28 = [2 x i8] c"\E6\00"
@.str.29 = [3 x i8] c"!=\00"
@.str.30 = [2 x i8] c"\A3\00"
@.str.31 = [6 x i8] c"\\gray\00"
@.str.32 = [3 x i8] c"\\\\\00"
@.str.33 = [3 x i8] c"\\T\00"
@.str.34 = [4 x i8] c"\\pi\00"
@.str.35 = [3 x i8] c"->\00"
@.str.36 = [7 x i8] c"\\Sigma\00"
@.str.37 = [3 x i8] c"|-\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 = %83, %2
%10 = load i32, i32* %7
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %86
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 %62 [
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 92, label %56
i32 96, label %57
i32 123, label %58
i32 125, label %59
i32 126, label %60
i32 127, label %61
]
24: ; preds = %13
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %5
br label %68
25: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %5
br label %68
26: ; preds = %13
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %5
br label %68
27: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %5
br label %68
28: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %5
br label %68
29: ; preds = %13
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %5
br label %68
30: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %5
br label %68
31: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8** %5
br label %68
32: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %5
br label %68
33: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8** %5
br label %68
34: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %5
br label %68
35: ; preds = %13
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %5
br label %68
36: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %5
br label %68
37: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8** %5
br label %68
38: ; preds = %13
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8** %5
br label %68
39: ; preds = %13
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8** %5
br label %68
40: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8** %5
br label %68
41: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8** %5
br label %68
42: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i8** %5
br label %68
43: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), i8** %5
br label %68
44: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), i8** %5
br label %68
45: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), i8** %5
br label %68
46: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0), i8** %5
br label %68
47: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i8** %5
br label %68
48: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), i8** %5
br label %68
49: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), i8** %5
br label %68
50: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0), i8** %5
br label %68
51: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0), i8** %5
br label %68
52: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.28, i64 0, i64 0), i8** %5
br label %68
53: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %5
br label %68
54: ; preds = %13
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.30, i64 0, i64 0), i8** %5
br label %68
55: ; preds = %13
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.31, i64 0, i64 0), i8** %5
br label %68
56: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.32, i64 0, i64 0), i8** %5
br label %68
57: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.33, i64 0, i64 0), i8** %5
br label %68
58: ; preds = %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0), i8** %5
br label %68
59: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.35, i64 0, i64 0), i8** %5
br label %68
60: ; preds = %13
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.36, i64 0, i64 0), i8** %5
br label %68
61: ; preds = %13
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.37, i64 0, i64 0), i8** %5
br label %68
62: ; preds = %13
%63 = load i8, i8* %6
%64 = load i32, i32* %8
%65 = add nsw i32 %64, 1
store i32 %65, i32* %8
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %66
store i8 %63, i8* %67
br label %83
68: ; preds = %61, %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 %69
69: ; preds = %74, %68
%70 = load i8*, i8** %5
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %82
74: ; preds = %69
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i32 1
store i8* %76, i8** %5
%77 = load i8, i8* %75
%78 = load i32, i32* %8
%79 = add nsw i32 %78, 1
store i32 %79, i32* %8
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %80
store i8 %77, i8* %81
br label %69
82: ; preds = %69
br label %83
83: ; preds = %82, %62
%84 = load i32, i32* %7
%85 = add nsw i32 %84, 1
store i32 %85, i32* %7
br label %9
86: ; preds = %9
%87 = load i32, i32* %8
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %88
store i8 0, i8* %89
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 = [9 x i8] c"\\diamond\00"
@.str.1 = [2 x i8] c"x\00"
@.str.2 = [6 x i8] c"\\mean\00"
@.str.3 = [3 x i8] c"<-\00"
@.str.4 = [7 x i8] c"\\alpha\00"
@.str.5 = [6 x i8] c"\\beta\00"
@.str.6 = [7 x i8] c"\\Gamma\00"
@.str.7 = [2 x i8] c"v\00"
@.str.8 = [7 x i8] c"\\Delta\00"
@.str.9 = [7 x i8] c"\\sigma\00"
@.str.10 = [4 x i8] c"\\LF\00"
@.str.11 = [8 x i8] c"\\lambda\00"
@.str.12 = [4 x i8] c"\\mu\00"
@.str.13 = [7 x i8] c"\\angle\00"
@.str.14 = [5 x i8] c"\\tau\00"
@.str.15 = [5 x i8] c"\\Phi\00"
@.str.16 = [7 x i8] c"\\Theta\00"
@.str.17 = [7 x i8] c"\\Omega\00"
@.str.18 = [7 x i8] c"\\delta\00"
@.str.19 = [2 x i8] c"\C5\00"
@.str.20 = [2 x i8] c"\E5\00"
@.str.21 = [2 x i8] c"\C4\00"
@.str.22 = [2 x i8] c"\E4\00"
@.str.23 = [2 x i8] c"\D6\00"
@.str.24 = [2 x i8] c"\F6\00"
@.str.25 = [2 x i8] c"\DC\00"
@.str.26 = [2 x i8] c"\FC\00"
@.str.27 = [2 x i8] c"\C6\00"
@.str.28 = [2 x i8] c"\E6\00"
@.str.29 = [3 x i8] c"!=\00"
@.str.30 = [2 x i8] c"\A3\00"
@.str.31 = [6 x i8] c"\\gray\00"
@.str.32 = [3 x i8] c"\\\\\00"
@.str.33 = [3 x i8] c"\\T\00"
@.str.34 = [4 x i8] c"\\pi\00"
@.str.35 = [3 x i8] c"->\00"
@.str.36 = [7 x i8] c"\\Sigma\00"
@.str.37 = [3 x i8] c"|-\00"
define i8* @hp2ascii(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %75
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %71
%7 = phi i64 [ 0, %4 ], [ %73, %71 ]
%8 = phi i32 [ 0, %4 ], [ %72, %71 ]
%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 %50 [
i32 0, label %54
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 %22
i32 11, label %23
i32 12, label %24
i32 13, label %25
i32 14, label %26
i32 15, label %27
i32 16, label %28
i32 17, label %29
i32 18, label %30
i32 19, label %31
i32 20, label %32
i32 21, label %33
i32 22, label %34
i32 23, label %35
i32 24, label %36
i32 25, label %37
i32 26, label %38
i32 27, label %39
i32 28, label %40
i32 29, label %41
i32 30, label %42
i32 31, label %43
i32 92, label %44
i32 96, label %45
i32 123, label %46
i32 125, label %47
i32 126, label %48
i32 127, label %49
]
13: ; preds = %6
br label %54
14: ; preds = %6
br label %54
15: ; preds = %6
br label %54
16: ; preds = %6
br label %54
17: ; preds = %6
br label %54
18: ; preds = %6
br label %54
19: ; preds = %6
br label %54
20: ; preds = %6
br label %54
21: ; preds = %6
br label %54
22: ; preds = %6
br label %54
23: ; preds = %6
br label %54
24: ; preds = %6
br label %54
25: ; preds = %6
br label %54
26: ; preds = %6
br label %54
27: ; preds = %6
br label %54
28: ; preds = %6
br label %54
29: ; preds = %6
br label %54
30: ; preds = %6
br label %54
31: ; preds = %6
br label %54
32: ; preds = %6
br label %54
33: ; preds = %6
br label %54
34: ; preds = %6
br label %54
35: ; preds = %6
br label %54
36: ; preds = %6
br label %54
37: ; preds = %6
br label %54
38: ; preds = %6
br label %54
39: ; preds = %6
br label %54
40: ; preds = %6
br label %54
41: ; preds = %6
br label %54
42: ; preds = %6
br label %54
43: ; preds = %6
br label %54
44: ; preds = %6
br label %54
45: ; preds = %6
br label %54
46: ; preds = %6
br label %54
47: ; preds = %6
br label %54
48: ; preds = %6
br label %54
49: ; preds = %6
br label %54
50: ; preds = %6
%51 = add nsw i32 %8, 1
%52 = sext i32 %8 to i64
%53 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %52
store i8 %11, i8* %53
br label %71
54: ; preds = %6, %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, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%55 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.37, i64 0, i64 0), %49 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.36, i64 0, i64 0), %48 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.35, i64 0, i64 0), %47 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i64 0, i64 0), %46 ], [ getelementptr inbounds ([3 x i8], [3 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 ([6 x i8], [6 x i8]* @.str.31, i64 0, i64 0), %43 ], [ getelementptr inbounds ([2 x i8], [2 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 ([2 x i8], [2 x i8]* @.str.28, i64 0, i64 0), %40 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0), %39 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0), %38 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0), %37 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0), %36 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), %35 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0), %34 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), %33 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0), %32 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), %31 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), %30 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), %29 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), %28 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), %26 ], [ getelementptr inbounds ([7 x i8], [7 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 ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), %23 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %22 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), %21 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), %20 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), %19 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), %18 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %17 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %16 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %15 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %14 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %13 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %6 ]
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 0
br i1 %57, label %71, label %58
58: ; preds = %54
%59 = sext i32 %8 to i64
br label %60
60: ; preds = %58, %60
%61 = phi i64 [ %59, %58 ], [ %65, %60 ]
%62 = phi i8 [ %56, %58 ], [ %67, %60 ]
%63 = phi i8* [ %55, %58 ], [ %64, %60 ]
%64 = getelementptr inbounds i8, i8* %63, i64 1
%65 = add i64 %61, 1
%66 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %61
store i8 %62, i8* %66
%67 = load i8, i8* %64
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %60
69: ; preds = %60
%70 = trunc i64 %65 to i32
br label %71
71: ; preds = %69, %54, %50
%72 = phi i32 [ %51, %50 ], [ %8, %54 ], [ %70, %69 ]
%73 = add nuw nsw i64 %7, 1
%74 = icmp eq i64 %73, %5
br i1 %74, label %75, label %6
75: ; preds = %71, %2
%76 = phi i32 [ 0, %2 ], [ %72, %71 ]
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 %77
store i8 0, i8* %78
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @hp2ascii.dst, i64 0, i64 0)
}