void tputS(wp, shf) register char *wp;
register struct shf *shf;
{
  register int c, quoted = 0;
  while (1)
    switch ((c = *wp++)) {
    case 0:
      return;
    case 1:
      tputC(*wp++, shf);
      break;
    case 2:
      c = *wp++;
      if (!quoted || (c == '"' || c == '`' || c == '$'))
        shf_putchar('\\', shf);
      ;
      tputC(c, shf);
      break;
    case 3:
      shf_putchar('$', shf);
      ;
      shf_putchar('(', shf);
      ;
      while (*wp != 0)
        tputC(*wp++, shf);
      shf_putchar(')', shf);
      ;
      wp++;
      break;
    case 4:
      shf_putchar('$', shf);
      ;
      shf_putchar('(', shf);
      ;
      shf_putchar('(', shf);
      ;
      while (*wp != 0)
        tputC(*wp++, shf);
      shf_putchar(')', shf);
      ;
      shf_putchar(')', shf);
      ;
      wp++;
      break;
    case 5:
      quoted = 1;
      shf_putchar('"', shf);
      ;
      break;
    case 6:
      quoted = 0;
      shf_putchar('"', shf);
      ;
      break;
    case 7:
      shf_putchar('$', shf);
      ;
      if (*wp++ == '{')
        shf_putchar('{', shf);
      ;
      while ((c = *wp++) != 0)
        tputC(c, shf);
      break;
    case 8:
      if (*wp++ == '}')
        shf_putchar('}', shf);
      ;
      break;
    case 9:
      shf_putchar(*wp++, shf);
      ;
      shf_putchar('(', shf);
      ;
      break;
    case 10:
      shf_putchar('|', shf);
      ;
      break;
    case 11:
      shf_putchar(')', shf);
      ;
      break;
    }
}


x86 assembly (clang, -O0):
<tputS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0xb,%eax
ja     1432 <tputS+0x312>
mov    -0x20(%rbp),%rax
lea    0xe9a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <tputC@plt>
jmp    1432 <tputS+0x312>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11d4 <tputS+0xb4>
cmpl   $0x22,-0x14(%rbp)
je     11d4 <tputS+0xb4>
cmpl   $0x60,-0x14(%rbp)
je     11d4 <tputS+0xb4>
cmpl   $0x24,-0x14(%rbp)
jne    11e4 <tputS+0xc4>
mov    -0x10(%rbp),%rsi
mov    $0x5c,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <tputC@plt>
jmp    1432 <tputS+0x312>
mov    -0x10(%rbp),%rsi
mov    $0x24,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x10(%rbp),%rsi
mov    $0x28,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1249 <tputS+0x129>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <tputC@plt>
jmp    1217 <tputS+0xf7>
mov    -0x10(%rbp),%rsi
mov    $0x29,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1432 <tputS+0x312>
mov    -0x10(%rbp),%rsi
mov    $0x24,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x10(%rbp),%rsi
mov    $0x28,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x10(%rbp),%rsi
mov    $0x28,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12cc <tputS+0x1ac>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <tputC@plt>
jmp    129a <tputS+0x17a>
mov    -0x10(%rbp),%rsi
mov    $0x29,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x10(%rbp),%rsi
mov    $0x29,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1432 <tputS+0x312>
movl   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x22,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1432 <tputS+0x312>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x22,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1432 <tputS+0x312>
mov    -0x10(%rbp),%rsi
mov    $0x24,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    1370 <tputS+0x250>
mov    -0x10(%rbp),%rsi
mov    $0x7b,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1375 <tputS+0x255>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     13a6 <tputS+0x286>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <tputC@plt>
jmp    1375 <tputS+0x255>
jmp    1432 <tputS+0x312>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x7d,%eax
jne    13d6 <tputS+0x2b6>
mov    -0x10(%rbp),%rsi
mov    $0x7d,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1432 <tputS+0x312>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
mov    -0x10(%rbp),%rsi
mov    $0x28,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1432 <tputS+0x312>
mov    -0x10(%rbp),%rsi
mov    $0x7c,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1432 <tputS+0x312>
mov    -0x10(%rbp),%rsi
mov    $0x29,%edi
mov    $0x0,%al
call   1030 <shf_putchar@plt>
jmp    1137 <tputS+0x17>

x86 assembly (clang, -O2):
<tputS>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecb(%rip),%r15
xor    %r12d,%r12d
jmp    1149 <tputS+0x29>
mov    $0x29,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    %r14,%rbp
add    $0x1,%r14
movsbl 0x0(%rbp),%eax
cmp    $0xb,%eax
ja     1149 <tputS+0x29>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
movsbl 0x1(%rbp),%edi
add    $0x2,%rbp
jmp    119e <tputS+0x7e>
mov    0x1(%rbp),%r14b
test   %r12d,%r12d
je     1187 <tputS+0x67>
cmp    $0x22,%r14b
je     1187 <tputS+0x67>
cmp    $0x60,%r14b
je     1187 <tputS+0x67>
cmp    $0x24,%r14b
jne    1196 <tputS+0x76>
mov    $0x5c,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
add    $0x2,%rbp
movsbl %r14b,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <tputC@plt>
mov    %rbp,%r14
jmp    1149 <tputS+0x29>
mov    $0x24,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x28,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x28,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    (%r14),%al
test   %al,%al
je     1209 <tputS+0xe9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <tputC@plt>
movzbl 0x2(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    11f0 <tputS+0xd0>
mov    $0x29,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x29,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
add    $0x2,%rbp
mov    %rbp,%r14
jmp    1149 <tputS+0x29>
mov    $0x7c,%edi
jmp    113f <tputS+0x1f>
mov    $0x24,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x28,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    (%r14),%al
test   %al,%al
je     1218 <tputS+0xf8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <tputC@plt>
movzbl 0x2(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1270 <tputS+0x150>
jmp    1218 <tputS+0xf8>
mov    $0x22,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x1,%r12d
jmp    1149 <tputS+0x29>
xor    %r12d,%r12d
mov    $0x22,%edi
jmp    113f <tputS+0x1f>
mov    $0x24,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
cmpb   $0x7b,0x1(%rbp)
jne    12d6 <tputS+0x1b6>
mov    $0x7b,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    0x2(%rbp),%al
add    $0x3,%rbp
mov    %rbp,%r14
test   %al,%al
je     1149 <tputS+0x29>
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <tputC@plt>
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    12f0 <tputS+0x1d0>
mov    %rbp,%r14
jmp    1149 <tputS+0x29>
lea    0x2(%rbp),%r14
cmpb   $0x7d,0x1(%rbp)
jne    1149 <tputS+0x29>
mov    $0x7d,%edi
jmp    113f <tputS+0x1f>
movsbl 0x1(%rbp),%edi
add    $0x2,%rbp
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    $0x28,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <shf_putchar@plt>
mov    %rbp,%r14
jmp    1149 <tputS+0x29>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.shf = type opaque
define void @tputS(i8* %0, %struct.shf* %1) {
%3 = alloca i8*
%4 = alloca %struct.shf*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store %struct.shf* %1, %struct.shf** %4
store i32 0, i32* %6
br label %7
7: ; preds = %2, %145
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
store i32 %11, i32* %5
switch i32 %11, label %145 [
i32 0, label %12
i32 1, label %13
i32 2, label %20
i32 3, label %43
i32 4, label %65
i32 5, label %91
i32 6, label %94
i32 7, label %97
i32 8, label %120
i32 9, label %130
i32 10, label %139
i32 11, label %142
]
12: ; preds = %7
ret void
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
%16 = load i8, i8* %14
%17 = sext i8 %16 to i32
%18 = load %struct.shf*, %struct.shf** %4
%19 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %17, %struct.shf* %18)
br label %145
20: ; preds = %7
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8, i8* %21
%24 = sext i8 %23 to i32
store i32 %24, i32* %5
%25 = load i32, i32* %6
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %36
27: ; preds = %20
%28 = load i32, i32* %5
%29 = icmp eq i32 %28, 34
br i1 %29, label %36, label %30
30: ; preds = %27
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 96
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = load i32, i32* %5
%35 = icmp eq i32 %34, 36
br i1 %35, label %36, label %39
36: ; preds = %33, %30, %27, %20
%37 = load %struct.shf*, %struct.shf** %4
%38 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 92, %struct.shf* %37)
br label %39
39: ; preds = %36, %33
%40 = load i32, i32* %5
%41 = load %struct.shf*, %struct.shf** %4
%42 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %40, %struct.shf* %41)
br label %145
43: ; preds = %7
%44 = load %struct.shf*, %struct.shf** %4
%45 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %44)
%46 = load %struct.shf*, %struct.shf** %4
%47 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %46)
br label %48
48: ; preds = %53, %43
%49 = load i8*, i8** %3
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %60
53: ; preds = %48
%54 = load i8*, i8** %3
%55 = getelementptr inbounds i8, i8* %54, i32 1
store i8* %55, i8** %3
%56 = load i8, i8* %54
%57 = sext i8 %56 to i32
%58 = load %struct.shf*, %struct.shf** %4
%59 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %57, %struct.shf* %58)
br label %48
60: ; preds = %48
%61 = load %struct.shf*, %struct.shf** %4
%62 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %61)
%63 = load i8*, i8** %3
%64 = getelementptr inbounds i8, i8* %63, i32 1
store i8* %64, i8** %3
br label %145
65: ; preds = %7
%66 = load %struct.shf*, %struct.shf** %4
%67 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %66)
%68 = load %struct.shf*, %struct.shf** %4
%69 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %68)
%70 = load %struct.shf*, %struct.shf** %4
%71 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %70)
br label %72
72: ; preds = %77, %65
%73 = load i8*, i8** %3
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %84
77: ; preds = %72
%78 = load i8*, i8** %3
%79 = getelementptr inbounds i8, i8* %78, i32 1
store i8* %79, i8** %3
%80 = load i8, i8* %78
%81 = sext i8 %80 to i32
%82 = load %struct.shf*, %struct.shf** %4
%83 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %81, %struct.shf* %82)
br label %72
84: ; preds = %72
%85 = load %struct.shf*, %struct.shf** %4
%86 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %85)
%87 = load %struct.shf*, %struct.shf** %4
%88 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %87)
%89 = load i8*, i8** %3
%90 = getelementptr inbounds i8, i8* %89, i32 1
store i8* %90, i8** %3
br label %145
91: ; preds = %7
store i32 1, i32* %6
%92 = load %struct.shf*, %struct.shf** %4
%93 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 34, %struct.shf* %92)
br label %145
94: ; preds = %7
store i32 0, i32* %6
%95 = load %struct.shf*, %struct.shf** %4
%96 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 34, %struct.shf* %95)
br label %145
97: ; preds = %7
%98 = load %struct.shf*, %struct.shf** %4
%99 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %98)
%100 = load i8*, i8** %3
%101 = getelementptr inbounds i8, i8* %100, i32 1
store i8* %101, i8** %3
%102 = load i8, i8* %100
%103 = sext i8 %102 to i32
%104 = icmp eq i32 %103, 123
br i1 %104, label %105, label %108
105: ; preds = %97
%106 = load %struct.shf*, %struct.shf** %4
%107 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 123, %struct.shf* %106)
br label %108
108: ; preds = %105, %97
br label %109
109: ; preds = %115, %108
%110 = load i8*, i8** %3
%111 = getelementptr inbounds i8, i8* %110, i32 1
store i8* %111, i8** %3
%112 = load i8, i8* %110
%113 = sext i8 %112 to i32
store i32 %113, i32* %5
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %119
115: ; preds = %109
%116 = load i32, i32* %5
%117 = load %struct.shf*, %struct.shf** %4
%118 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %116, %struct.shf* %117)
br label %109
119: ; preds = %109
br label %145
120: ; preds = %7
%121 = load i8*, i8** %3
%122 = getelementptr inbounds i8, i8* %121, i32 1
store i8* %122, i8** %3
%123 = load i8, i8* %121
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 125
br i1 %125, label %126, label %129
126: ; preds = %120
%127 = load %struct.shf*, %struct.shf** %4
%128 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 125, %struct.shf* %127)
br label %129
129: ; preds = %126, %120
br label %145
130: ; preds = %7
%131 = load i8*, i8** %3
%132 = getelementptr inbounds i8, i8* %131, i32 1
store i8* %132, i8** %3
%133 = load i8, i8* %131
%134 = sext i8 %133 to i32
%135 = load %struct.shf*, %struct.shf** %4
%136 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 %134, %struct.shf* %135)
%137 = load %struct.shf*, %struct.shf** %4
%138 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %137)
br label %145
139: ; preds = %7
%140 = load %struct.shf*, %struct.shf** %4
%141 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 124, %struct.shf* %140)
br label %145
142: ; preds = %7
%143 = load %struct.shf*, %struct.shf** %4
%144 = call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %143)
br label %145
145: ; preds = %7, %142, %139, %130, %129, %119, %94, %91, %84, %60, %39, %13
br label %7
}

LLVM IR (-O2):
%struct.shf = type opaque
define void @tputS(i8* nocapture %0, %struct.shf* %1) {
br label %3
3: ; preds = %81, %2
%4 = phi i8* [ %0, %2 ], [ %82, %81 ]
%5 = phi i32 [ 0, %2 ], [ %83, %81 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
switch i32 %8, label %81 [
i32 0, label %9
i32 1, label %10
i32 2, label %15
i32 3, label %30
i32 4, label %47
i32 5, label %66
i32 6, label %68
i32 7, label %70
i32 8, label %92
i32 9, label %98
i32 10, label %104
i32 11, label %106
]
9: ; preds = %3
ret void
10: ; preds = %3
%11 = getelementptr inbounds i8, i8* %4, i64 2
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %13, %struct.shf* %1)
br label %81
15: ; preds = %3
%16 = getelementptr inbounds i8, i8* %4, i64 2
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %5, 0
%20 = icmp eq i8 %17, 34
%21 = select i1 %19, i1 true, i1 %20
%22 = icmp eq i8 %17, 96
%23 = select i1 %21, i1 true, i1 %22
%24 = icmp eq i8 %17, 36
%25 = select i1 %23, i1 true, i1 %24
br i1 %25, label %26, label %28
26: ; preds = %15
%27 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 92, %struct.shf* %1)
br label %28
28: ; preds = %15, %26
%29 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %18, %struct.shf* %1)
br label %81
30: ; preds = %3
%31 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %1)
%32 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %1)
%33 = load i8, i8* %6
%34 = icmp eq i8 %33, 0
br i1 %34, label %43, label %35
35: ; preds = %30, %35
%36 = phi i8 [ %41, %35 ], [ %33, %30 ]
%37 = phi i8* [ %39, %35 ], [ %6, %30 ]
%38 = sext i8 %36 to i32
%39 = getelementptr inbounds i8, i8* %37, i64 1
%40 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %38, %struct.shf* %1)
%41 = load i8, i8* %39
%42 = icmp eq i8 %41, 0
br i1 %42, label %43, label %35
43: ; preds = %35, %30
%44 = phi i8* [ %4, %30 ], [ %37, %35 ]
%45 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %1)
%46 = getelementptr inbounds i8, i8* %44, i64 2
br label %81
47: ; preds = %3
%48 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %1)
%49 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %1)
%50 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %1)
%51 = load i8, i8* %6
%52 = icmp eq i8 %51, 0
br i1 %52, label %61, label %53
53: ; preds = %47, %53
%54 = phi i8 [ %59, %53 ], [ %51, %47 ]
%55 = phi i8* [ %57, %53 ], [ %6, %47 ]
%56 = sext i8 %54 to i32
%57 = getelementptr inbounds i8, i8* %55, i64 1
%58 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %56, %struct.shf* %1)
%59 = load i8, i8* %57
%60 = icmp eq i8 %59, 0
br i1 %60, label %61, label %53
61: ; preds = %53, %47
%62 = phi i8* [ %4, %47 ], [ %55, %53 ]
%63 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %1)
%64 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %1)
%65 = getelementptr inbounds i8, i8* %62, i64 2
br label %81
66: ; preds = %3
%67 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 34, %struct.shf* %1)
br label %81
68: ; preds = %3
%69 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 34, %struct.shf* %1)
br label %81
70: ; preds = %3
%71 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 36, %struct.shf* %1)
%72 = getelementptr inbounds i8, i8* %4, i64 2
%73 = load i8, i8* %6
%74 = icmp eq i8 %73, 123
br i1 %74, label %75, label %77
75: ; preds = %70
%76 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 123, %struct.shf* %1)
br label %77
77: ; preds = %75, %70
%78 = getelementptr inbounds i8, i8* %4, i64 3
%79 = load i8, i8* %72
%80 = icmp eq i8 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %84, %77, %92, %96, %3, %106, %104, %98, %68, %66, %61, %43, %28, %10
%82 = phi i8* [ %6, %3 ], [ %6, %106 ], [ %6, %104 ], [ %99, %98 ], [ %93, %96 ], [ %93, %92 ], [ %6, %68 ], [ %6, %66 ], [ %65, %61 ], [ %46, %43 ], [ %16, %28 ], [ %11, %10 ], [ %78, %77 ], [ %89, %84 ]
%83 = phi i32 [ %5, %3 ], [ %5, %106 ], [ %5, %104 ], [ %5, %98 ], [ %5, %96 ], [ %5, %92 ], [ 0, %68 ], [ 1, %66 ], [ %5, %61 ], [ %5, %43 ], [ %5, %28 ], [ %5, %10 ], [ %5, %77 ], [ %5, %84 ]
br label %3
84: ; preds = %77, %84
%85 = phi i8 [ %90, %84 ], [ %79, %77 ]
%86 = phi i8* [ %89, %84 ], [ %78, %77 ]
%87 = sext i8 %85 to i32
%88 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @tputC to i32 (i32, %struct.shf*, ...)*)(i32 %87, %struct.shf* %1)
%89 = getelementptr inbounds i8, i8* %86, i64 1
%90 = load i8, i8* %86
%91 = icmp eq i8 %90, 0
br i1 %91, label %81, label %84
92: ; preds = %3
%93 = getelementptr inbounds i8, i8* %4, i64 2
%94 = load i8, i8* %6
%95 = icmp eq i8 %94, 125
br i1 %95, label %96, label %81
96: ; preds = %92
%97 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 125, %struct.shf* %1)
br label %81
98: ; preds = %3
%99 = getelementptr inbounds i8, i8* %4, i64 2
%100 = load i8, i8* %6
%101 = sext i8 %100 to i32
%102 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 %101, %struct.shf* %1)
%103 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 40, %struct.shf* %1)
br label %81
104: ; preds = %3
%105 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 124, %struct.shf* %1)
br label %81
106: ; preds = %3
%107 = tail call i32 (i32, %struct.shf*, ...) bitcast (i32 (...)* @shf_putchar to i32 (i32, %struct.shf*, ...)*)(i32 41, %struct.shf* %1)
br label %81
}