#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*/ ansi_transition_mushcode(int, int);
int /*<<< orphan*/ safe_copy_chr(char, char *, char **, int);
int /*<<< orphan*/ safe_copy_str(int /*<<< orphan*/, char *, char **, int);
int /*<<< orphan*/ safe_known_str(char *, int, char *, char **);
int /*<<< orphan*/ skip_esccode(char **);
int /*<<< orphan*/ track_esccode(char **, int *);
char *translate_string(char *str, int type) {
  static char new[8192];
  char *bp;
  bp = new;
  if (type) {
    int ansi_state = 0x0099;
    int ansi_state_prev = 0x0099;
    while (*str) {
      switch (*str) {
      case '\033':
        while (*str == '\033') {
          track_esccode(&str, &ansi_state);
        }
        safe_copy_str((ansi_transition_mushcode(ansi_state_prev, ansi_state)),
                      (new), (&bp), (8192 - 1));
        ansi_state_prev = ansi_state;
        continue;
      case ' ':
        if (str[1] == ' ') {
          safe_known_str("%b", 2, new, &bp);
        } else {
          safe_copy_chr((' '), (new), (&bp), (8192 - 1));
        }
        break;
      case '\\':
      case '%':
      case '[':
      case ']':
      case '{':
      case '}':
      case '(':
      case ')':
        safe_copy_chr(('%'), (new), (&bp), (8192 - 1));
        safe_copy_chr((*str), (new), (&bp), (8192 - 1));
        break;
      case '\r':
        break;
      case '\n':
        safe_known_str("%r", 2, new, &bp);
        break;
      case '\t':
        safe_known_str("%t", 2, new, &bp);
        break;
      default:
        safe_copy_chr((*str), (new), (&bp), (8192 - 1));
      }
      str++;
    }
  } else {
    while (*str) {
      switch (*str) {
      case '\033':
        skip_esccode(&str);
        continue;
      case '\r':
        break;
      case '\n':
      case '\t':
        safe_copy_chr((' '), (new), (&bp), (8192 - 1));
        break;
      default:
        safe_copy_chr((*str), (new), (&bp), (8192 - 1));
      }
      str++;
    }
  }
  *bp = '\0';
  return new;
}


x86 assembly (clang, -O0):
<translate_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0x2eea(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1325 <translate_string+0x1c5>
movl   $0x99,-0x1c(%rbp)
movl   $0x99,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1320 <translate_string+0x1c0>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0xfffffff7,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x74,%eax
ja     12f3 <translate_string+0x193>
mov    -0x28(%rbp),%rax
lea    0xe3d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    11d1 <translate_string+0x71>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1b,%eax
jne    11f3 <translate_string+0x93>
lea    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <track_esccode@plt>
jmp    11d1 <translate_string+0x71>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <ansi_transition_mushcode@plt>
mov    %eax,%edi
lea    0x2e59(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
call   1080 <safe_copy_str@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1192 <translate_string+0x32>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x20,%eax
jne    1252 <translate_string+0xf2>
lea    0xf9c(%rip),%rdi
mov    $0x2,%esi
lea    0x2e1c(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <safe_known_str@plt>
jmp    126c <translate_string+0x10c>
mov    $0x20,%edi
lea    0x2e02(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
jmp    130f <translate_string+0x1af>
mov    $0x25,%edi
lea    0x2de3(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
mov    -0x8(%rbp),%rax
lea    0x2dca(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
movsbl (%rax),%edi
call   1050 <safe_copy_chr@plt>
jmp    130f <translate_string+0x1af>
jmp    130f <translate_string+0x1af>
lea    0xf1f(%rip),%rdi
mov    $0x2,%esi
lea    0x2d9c(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <safe_known_str@plt>
jmp    130f <translate_string+0x1af>
lea    0xf01(%rip),%rdi
mov    $0x2,%esi
lea    0x2d7b(%rip),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <safe_known_str@plt>
jmp    130f <translate_string+0x1af>
mov    -0x8(%rbp),%rax
lea    0x2d62(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
movsbl (%rax),%edi
call   1050 <safe_copy_chr@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1192 <translate_string+0x32>
jmp    13d8 <translate_string+0x278>
jmp    132a <translate_string+0x1ca>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     13d3 <translate_string+0x273>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x2c(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1387 <translate_string+0x227>
jmp    1352 <translate_string+0x1f2>
mov    -0x2c(%rbp),%eax
sub    $0xd,%eax
je     1382 <translate_string+0x222>
jmp    1363 <translate_string+0x203>
mov    -0x2c(%rbp),%eax
sub    $0x1b,%eax
jne    13a6 <translate_string+0x246>
jmp    1374 <translate_string+0x214>
lea    -0x8(%rbp),%rdi
call   1060 <skip_esccode@plt>
jmp    132a <translate_string+0x1ca>
jmp    13c2 <translate_string+0x262>
mov    $0x20,%edi
lea    0x2ccd(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
jmp    13c2 <translate_string+0x262>
mov    -0x8(%rbp),%rax
lea    0x2caf(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x1fff,%ecx
movsbl (%rax),%edi
call   1050 <safe_copy_chr@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    132a <translate_string+0x1ca>
jmp    13d8 <translate_string+0x278>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2c7a(%rip),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_string>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %rbx
sub    $0x20,%rsp
mov    %rdi,0x8(%rsp)
lea    0x2ee8(%rip),%rax
mov    %rax,0x18(%rsp)
test   %esi,%esi
je     12b7 <translate_string+0x157>
movl   $0x99,0x10(%rsp)
mov    (%rdi),%cl
test   %cl,%cl
je     1320 <translate_string+0x1c0>
movl   $0x99,0x14(%rsp)
lea    0x2eba(%rip),%r14
lea    0x18(%rsp),%rbx
lea    0xe4e(%rip),%rbp
lea    0x8(%rsp),%r13
mov    %r13,%r15
nopw   0x0(%rax,%rax,1)
movsbl %cl,%eax
lea    -0x9(%rax),%edx
cmp    $0x74,%edx
ja     1216 <translate_string+0xb6>
movslq 0x0(%rbp,%rdx,4),%rdx
add    %rbp,%rdx
jmp    *%rdx
mov    $0x25,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
mov    0x8(%rsp),%rax
movsbl (%rax),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
jmp    1237 <translate_string+0xd7>
lea    0xfcf(%rip),%rdi
jmp    1227 <translate_string+0xc7>
lea    0xfc3(%rip),%rdi
jmp    1227 <translate_string+0xc7>
mov    %eax,%edi
jmp    11f2 <translate_string+0x92>
cmpb   $0x20,0x1(%rdi)
jne    1258 <translate_string+0xf8>
lea    0xfad(%rip),%rdi
mov    $0x2,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <safe_known_str@plt>
mov    %r15,%r13
mov    0x8(%rsp),%rax
lea    0x1(%rax),%rdi
mov    %rdi,0x8(%rsp)
mov    0x1(%rax),%cl
test   %cl,%cl
jne    11c0 <translate_string+0x60>
jmp    1320 <translate_string+0x1c0>
mov    $0x20,%edi
jmp    11f2 <translate_string+0x92>
cmp    $0x1b,%cl
jne    1287 <translate_string+0x127>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
lea    0x10(%rsp),%rsi
call   1030 <track_esccode@plt>
mov    0x8(%rsp),%rax
cmpb   $0x1b,(%rax)
je     1270 <translate_string+0x110>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edi
call   1070 <ansi_transition_mushcode@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x1fff,%ecx
call   1080 <safe_copy_str@plt>
mov    0x10(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    0x8(%rsp),%rdi
mov    (%rdi),%cl
jmp    124b <translate_string+0xeb>
mov    (%rdi),%al
test   %al,%al
je     1320 <translate_string+0x1c0>
lea    0x2d9c(%rip),%rbx
lea    0x18(%rsp),%rbp
lea    0x8(%rsp),%r14
jmp    12fa <translate_string+0x19a>
mov    %eax,%edx
movsbl %dl,%edi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    $0x1fff,%ecx
call   1050 <safe_copy_chr@plt>
mov    0x8(%rsp),%rax
add    $0x1,%rax
mov    %rax,0x8(%rsp)
movzbl (%rax),%eax
test   %al,%al
je     1320 <translate_string+0x1c0>
movsbl %al,%ecx
mov    $0x20,%dl
lea    -0x9(%rcx),%esi
cmp    $0x2,%esi
jb     12d2 <translate_string+0x172>
cmp    $0xd,%ecx
je     12e5 <translate_string+0x185>
cmp    $0x1b,%ecx
jne    12d0 <translate_string+0x170>
mov    %r14,%rdi
call   1060 <skip_esccode@plt>
mov    0x8(%rsp),%rax
jmp    12f3 <translate_string+0x193>
mov    0x18(%rsp),%rax
movb   $0x0,(%rax)
lea    0x2d31(%rip),%rax
add    $0x20,%rsp
pop    %rbx
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@translate_string.new = internal global [8192 x i8] zeroinitializer
@.str = [3 x i8] c"%b\00"
@.str.1 = [3 x i8] c"%r\00"
@.str.2 = [3 x i8] c"%t\00"
define i8* @translate_string(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %62
10: ; preds = %2
store i32 153, i32* %6
store i32 153, i32* %7
br label %11
11: ; preds = %58, %27, %10
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %61
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
switch i32 %18, label %54 [
i32 27, label %19
i32 32, label %33
i32 92, label %44
i32 37, label %44
i32 91, label %44
i32 93, label %44
i32 123, label %44
i32 125, label %44
i32 40, label %44
i32 41, label %44
i32 13, label %49
i32 10, label %50
i32 9, label %52
]
19: ; preds = %15
br label %20
20: ; preds = %25, %19
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 27
br i1 %24, label %25, label %27
25: ; preds = %20
%26 = call i32 @track_esccode(i8** %3, i32* %6)
br label %20
27: ; preds = %20
%28 = load i32, i32* %7
%29 = load i32, i32* %6
%30 = call i32 @ansi_transition_mushcode(i32 %28, i32 %29)
%31 = call i32 @safe_copy_str(i32 %30, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
%32 = load i32, i32* %6
store i32 %32, i32* %7
br label %11
33: ; preds = %15
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i64 1
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 32
br i1 %38, label %39, label %41
39: ; preds = %33
%40 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5)
br label %43
41: ; preds = %33
%42 = call i32 @safe_copy_chr(i8 signext 32, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
br label %43
43: ; preds = %41, %39
br label %58
44: ; preds = %15, %15, %15, %15, %15, %15, %15, %15
%45 = call i32 @safe_copy_chr(i8 signext 37, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
%46 = load i8*, i8** %3
%47 = load i8, i8* %46
%48 = call i32 @safe_copy_chr(i8 signext %47, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
br label %58
49: ; preds = %15
br label %58
50: ; preds = %15
%51 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5)
br label %58
52: ; preds = %15
%53 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5)
br label %58
54: ; preds = %15
%55 = load i8*, i8** %3
%56 = load i8, i8* %55
%57 = call i32 @safe_copy_chr(i8 signext %56, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
br label %58
58: ; preds = %54, %52, %50, %49, %44, %43
%59 = load i8*, i8** %3
%60 = getelementptr inbounds i8, i8* %59, i32 1
store i8* %60, i8** %3
br label %11
61: ; preds = %11
br label %84
62: ; preds = %2
br label %63
63: ; preds = %80, %71, %62
%64 = load i8*, i8** %3
%65 = load i8, i8* %64
%66 = icmp ne i8 %65, 0
br i1 %66, label %67, label %83
67: ; preds = %63
%68 = load i8*, i8** %3
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
switch i32 %70, label %76 [
i32 27, label %71
i32 13, label %73
i32 10, label %74
i32 9, label %74
]
71: ; preds = %67
%72 = call i32 @skip_esccode(i8** %3)
br label %63
73: ; preds = %67
br label %80
74: ; preds = %67, %67
%75 = call i32 @safe_copy_chr(i8 signext 32, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
br label %80
76: ; preds = %67
%77 = load i8*, i8** %3
%78 = load i8, i8* %77
%79 = call i32 @safe_copy_chr(i8 signext %78, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %5, i32 8191)
br label %80
80: ; preds = %76, %74, %73
%81 = load i8*, i8** %3
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %3
br label %63
83: ; preds = %63
br label %84
84: ; preds = %83, %61
%85 = load i8*, i8** %5
store i8 0, i8* %85
ret i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0)
}

LLVM IR (-O2):
@translate_string.new = internal global [8192 x i8] zeroinitializer
@.str = [3 x i8] c"%b\00"
@.str.1 = [3 x i8] c"%r\00"
@.str.2 = [3 x i8] c"%t\00"
define i8* @translate_string(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = bitcast i8** %4 to i8*
store i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4
%7 = icmp eq i32 %1, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %0
%10 = icmp eq i8 %9, 0
br i1 %10, label %80, label %63
11: ; preds = %2
%12 = bitcast i32* %5 to i8*
store i32 153, i32* %5
%13 = load i8, i8* %0
%14 = icmp eq i8 %13, 0
br i1 %14, label %62, label %15
15: ; preds = %11, %30
%16 = phi i8 [ %36, %30 ], [ %13, %11 ]
%17 = phi i8* [ %35, %30 ], [ %0, %11 ]
%18 = phi i32 [ %34, %30 ], [ 153, %11 ]
br label %19
19: ; preds = %15, %57
%20 = phi i8 [ %16, %15 ], [ %60, %57 ]
%21 = phi i8* [ %17, %15 ], [ %59, %57 ]
%22 = sext i8 %20 to i32
switch i32 %22, label %55 [
i32 27, label %23
i32 32, label %38
i32 92, label %46
i32 37, label %46
i32 91, label %46
i32 93, label %46
i32 123, label %46
i32 125, label %46
i32 40, label %46
i32 41, label %46
i32 13, label %57
i32 10, label %51
i32 9, label %53
]
23: ; preds = %19
%24 = icmp eq i8 %20, 27
br i1 %24, label %25, label %30
25: ; preds = %23, %25
%26 = call i32 @track_esccode(i8** %3, i32* %5)
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 27
br i1 %29, label %25, label %30
30: ; preds = %25, %23
%31 = load i32, i32* %5
%32 = call i32 @ansi_transition_mushcode(i32 %18, i32 %31)
%33 = call i32 @safe_copy_str(i32 %32, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
%34 = load i32, i32* %5
%35 = load i8*, i8** %3
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 0
br i1 %37, label %62, label %15
38: ; preds = %19
%39 = getelementptr inbounds i8, i8* %21, i64 1
%40 = load i8, i8* %39
%41 = icmp eq i8 %40, 32
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4)
br label %57
44: ; preds = %38
%45 = call i32 @safe_copy_chr(i8 signext 32, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
br label %57
46: ; preds = %19, %19, %19, %19, %19, %19, %19, %19
%47 = call i32 @safe_copy_chr(i8 signext 37, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
%48 = load i8*, i8** %3
%49 = load i8, i8* %48
%50 = call i32 @safe_copy_chr(i8 signext %49, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
br label %57
51: ; preds = %19
%52 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4)
br label %57
53: ; preds = %19
%54 = call i32 @safe_known_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4)
br label %57
55: ; preds = %19
%56 = call i32 @safe_copy_chr(i8 signext %20, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
br label %57
57: ; preds = %42, %44, %55, %53, %51, %19, %46
%58 = load i8*, i8** %3
%59 = getelementptr inbounds i8, i8* %58, i64 1
store i8* %59, i8** %3
%60 = load i8, i8* %59
%61 = icmp eq i8 %60, 0
br i1 %61, label %62, label %19
62: ; preds = %30, %57, %11
br label %80
63: ; preds = %8, %69
%64 = phi i8 [ %71, %69 ], [ %9, %8 ]
%65 = sext i8 %64 to i32
switch i32 %65, label %73 [
i32 27, label %66
i32 13, label %77
i32 10, label %74
i32 9, label %74
]
66: ; preds = %63
%67 = call i32 @skip_esccode(i8** %3)
%68 = load i8*, i8** %3
br label %69
69: ; preds = %66, %77
%70 = phi i8* [ %68, %66 ], [ %79, %77 ]
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 0
br i1 %72, label %80, label %63
73: ; preds = %63
br label %74
74: ; preds = %63, %63, %73
%75 = phi i8 [ %64, %73 ], [ 32, %63 ], [ 32, %63 ]
%76 = call i32 @safe_copy_chr(i8 signext %75, i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0), i8** %4, i32 8191)
br label %77
77: ; preds = %74, %63
%78 = load i8*, i8** %3
%79 = getelementptr inbounds i8, i8* %78, i64 1
store i8* %79, i8** %3
br label %69
80: ; preds = %69, %8, %62
%81 = load i8*, i8** %4
store i8 0, i8* %81
ret i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @translate_string.new, i64 0, i64 0)
}