tst_vt52() {
  static struct rtabl {
    char *rcode;
    char *rmsg;
  } resptable[] = {{"\033/K", " -- OK (means Standard VT52)"},
                   {"\033/Z", " -- OK (means VT100 emulating VT52)"},
                   {"", " -- Unknown response"}};
  int i, j;
  char *response;
  rm("?2");
  esc("H");
  esc("J");
  esc("H");
  for (i = 0; i <= 23; i++) {
    for (j = 0; j <= 9; j++)
      printf("%s", "FooBar ");
    println("Bletch");
  }
  esc("H");
  esc("J");
  vt52cup(7, 47);
  printf("nothing more.");
  for (i = 1; i <= 10; i++)
    printf("THIS SHOULD GO AWAY! ");
  for (i = 1; i <= 5; i++) {
    vt52cup(1, 1);
    printf("%s", "Back scroll (this should go away)");
    esc("I");
  }
  vt52cup(12, 60);
  esc("J");
  for (i = 2; i <= 6; i++) {
    vt52cup(i, 1);
    esc("K");
  }
  for (i = 2; i <= 23; i++) {
    vt52cup(i, 70);
    printf("%s", "**Foobar");
  }
  vt52cup(23, 10);
  for (i = 23; i >= 2; i--) {
    printf("%s", "*");
    printf("%c", 8);
    esc("I");
  }
  vt52cup(1, 70);
  for (i = 70; i >= 10; i--) {
    printf("%s", "*");
    esc("D");
    esc("D");
  }
  vt52cup(24, 10);
  for (i = 10; i <= 70; i++) {
    printf("%s", "*");
    printf("%c", 8);
    esc("C");
  }
  vt52cup(2, 11);
  for (i = 2; i <= 23; i++) {
    printf("%s", "!");
    printf("%c", 8);
    esc("B");
  }
  vt52cup(23, 69);
  for (i = 23; i >= 2; i--) {
    printf("%s", "!");
    printf("%c", 8);
    esc("A");
  }
  for (i = 2; i <= 23; i++) {
    vt52cup(i, 71);
    esc("K");
  }
  vt52cup(10, 16);
  printf("%s", "The screen should be cleared, and have a centered");
  vt52cup(11, 16);
  printf("%s", "rectangle of \"*\"s with \"!\"s on the inside to the");
  vt52cup(12, 16);
  printf("%s", "left and right. Only this, and");
  vt52cup(13, 16);
  holdit();
  esc("H");
  esc("J");
  printf("%s", "This is the normal character set:");
  for (j = 0; j <= 1; j++) {
    vt52cup(3 + j, 16);
    for (i = 0; i <= 47; i++)
      printf("%c", 32 + i + 48 * j);
  }
  vt52cup(6, 1);
  printf("%s", "This is the special graphics character set:");
  esc("F");
  for (j = 0; j <= 1; j++) {
    vt52cup(8 + j, 16);
    for (i = 0; i <= 47; i++)
      printf("%c", 32 + i + 48 * j);
  }
  esc("G");
  vt52cup(12, 1);
  holdit();
  esc("H");
  esc("J");
  println("Test of terminal response to IDENTIFY command");
  esc("Z");
  response = instr();
  println("");
  printf("Response was");
  esc("<");
  chrprint(response);
  for (i = 0; resptable[i].rcode[0] != '\0'; i++)
    if (!strcmp(response, resptable[i].rcode))
      break;
  printf("%s", resptable[i].rmsg);
  println("");
  println("");
  holdit();
}


x86 assembly (clang, -O0):
<tst_vt52>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <rm@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x17,-0x8(%rbp)
jg     1231 <tst_vt52+0xa1>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     1215 <tst_vt52+0x85>
lea    0xe6c(%rip),%rdi
lea    0xe68(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11e8 <tst_vt52+0x58>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1060 <println@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d7 <tst_vt52+0x47>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    $0x7,%edi
mov    $0x2f,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1299 <tst_vt52+0x109>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1273 <tst_vt52+0xe3>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     12e9 <tst_vt52+0x159>
mov    $0x1,%esi
mov    %esi,%edi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xda6(%rip),%rdi
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a0 <tst_vt52+0x110>
mov    $0xc,%edi
mov    $0x3c,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
movl   $0x2,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jg     1344 <tst_vt52+0x1b4>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    130f <tst_vt52+0x17f>
movl   $0x2,-0x8(%rbp)
cmpl   $0x17,-0x8(%rbp)
jg     1387 <tst_vt52+0x1f7>
mov    -0x8(%rbp),%edi
mov    $0x46,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xcfa(%rip),%rdi
lea    0xd4d(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    134b <tst_vt52+0x1bb>
mov    $0x17,%edi
mov    $0xa,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x17,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     13ed <tst_vt52+0x25d>
lea    0xcb5(%rip),%rdi
lea    0xd11(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd05(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    139f <tst_vt52+0x20f>
mov    $0x1,%edi
mov    $0x46,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x46,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jl     144e <tst_vt52+0x2be>
lea    0xc4f(%rip),%rdi
lea    0xcab(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xca2(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0xc94(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1405 <tst_vt52+0x275>
mov    $0x18,%edi
mov    $0xa,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0xa,-0x8(%rbp)
cmpl   $0x46,-0x8(%rbp)
jg     14b4 <tst_vt52+0x324>
lea    0xbee(%rip),%rdi
lea    0xc4a(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc3e(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc30(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1466 <tst_vt52+0x2d6>
mov    $0x2,%edi
mov    $0xb,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x2,-0x8(%rbp)
cmpl   $0x17,-0x8(%rbp)
jg     151a <tst_vt52+0x38a>
lea    0xb88(%rip),%rdi
lea    0xbed(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbd8(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbce(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14cc <tst_vt52+0x33c>
mov    $0x17,%edi
mov    $0x45,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x17,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1580 <tst_vt52+0x3f0>
lea    0xb22(%rip),%rdi
lea    0xb87(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb72(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb6a(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1532 <tst_vt52+0x3a2>
movl   $0x2,-0x8(%rbp)
cmpl   $0x17,-0x8(%rbp)
jg     15bc <tst_vt52+0x42c>
mov    -0x8(%rbp),%edi
mov    $0x47,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xa5b(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1587 <tst_vt52+0x3f7>
mov    $0xa,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xa91(%rip),%rdi
lea    0xafc(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xb,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xa6b(%rip),%rdi
lea    0xb08(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xc,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0xa45(%rip),%rdi
lea    0xb13(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xd,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
mov    $0x0,%al
call   10a0 <holdit@plt>
lea    0xa14(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0xa08(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0x9fc(%rip),%rdi
lea    0xae9(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     16e6 <tst_vt52+0x556>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2f,-0x8(%rbp)
jg     16d3 <tst_vt52+0x543>
mov    -0x8(%rbp),%esi
add    $0x20,%esi
imul   $0x30,-0xc(%rbp),%eax
add    %eax,%esi
lea    0xa0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16a1 <tst_vt52+0x511>
jmp    16d8 <tst_vt52+0x548>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    167e <tst_vt52+0x4ee>
mov    $0x6,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
lea    0x967(%rip),%rdi
lea    0xa76(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa94(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     1789 <tst_vt52+0x5f9>
mov    -0xc(%rbp),%edi
add    $0x8,%edi
mov    $0x10,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x2f,-0x8(%rbp)
jg     1776 <tst_vt52+0x5e6>
mov    -0x8(%rbp),%esi
add    $0x20,%esi
imul   $0x30,-0xc(%rbp),%eax
add    %eax,%esi
lea    0x969(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1744 <tst_vt52+0x5b4>
jmp    177b <tst_vt52+0x5eb>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1721 <tst_vt52+0x591>
lea    0xa19(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    $0xc,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   10b0 <vt52cup@plt>
mov    $0x0,%al
call   10a0 <holdit@plt>
lea    0x8ab(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0x89f(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
lea    0x9d9(%rip),%rdi
mov    $0x0,%al
call   1060 <println@plt>
lea    0x843(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    $0x0,%al
call   1050 <instr@plt>
cltq
mov    %rax,-0x18(%rbp)
lea    0x89f(%rip),%rdi
mov    $0x0,%al
call   1060 <println@plt>
lea    0x9d0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x9cf(%rip),%rdi
mov    $0x0,%al
call   1080 <esc@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1090 <chrprint@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
lea    0x2835(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1890 <tst_vt52+0x700>
mov    -0x18(%rbp),%rdi
movslq -0x8(%rbp),%rcx
lea    0x2810(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    187d <tst_vt52+0x6ed>
jmp    1890 <tst_vt52+0x700>
jmp    1882 <tst_vt52+0x6f2>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1830 <tst_vt52+0x6a0>
movslq -0x8(%rbp),%rcx
lea    0x27d5(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
lea    0x7b8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x7df(%rip),%rdi
mov    $0x0,%al
call   1060 <println@plt>
lea    0x7d1(%rip),%rdi
mov    $0x0,%al
call   1060 <println@plt>
mov    $0x0,%al
call   10a0 <holdit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_vt52>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1040 <rm@plt>
lea    0xea1(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x18,%ebp
lea    0xe77(%rip),%r14
lea    0xe73(%rip),%rbx
lea    0xe74(%rip),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <println@plt>
add    $0xffffffff,%ebp
jne    1200 <tst_vt52+0x60>
lea    0xdc5(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0xdb9(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x7,%edi
mov    $0x2f,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0xdab(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdab(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0xd0f(%rip),%r14
lea    0xd3e(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd4c(%rip),%r13
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xc,%edi
mov    $0x3c,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x2,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0xbb4(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x3,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x4,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x5,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x6,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x2,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0xbe3(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x4,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x6,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x9,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xb,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xc,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xd,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xe,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xf,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x10,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x11,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x12,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x13,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x14,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x15,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x16,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x17,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x17,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x18,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1780 <tst_vt52+0x5e0>
mov    $0x1,%edi
mov    $0x46,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x47,%ebp
lea    0x905(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
add    $0xffffffff,%ebp
cmp    $0xa,%ebp
ja     17d0 <tst_vt52+0x630>
mov    $0x18,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x3d,%ebp
lea    0x8b7(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
add    $0xffffffff,%ebp
jne    1820 <tst_vt52+0x680>
mov    $0x2,%edi
mov    $0xb,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x16,%ebp
lea    0x86c(%rip),%rbx
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
add    $0xffffffff,%ebp
jne    1860 <tst_vt52+0x6c0>
mov    $0x17,%edi
mov    $0x45,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x18,%ebp
lea    0x82e(%rip),%rbx
mov    $0x21,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
ja     18a0 <tst_vt52+0x700>
mov    $0x2,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0x724(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x3,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x4,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x5,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x6,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x7,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x8,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x9,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xa,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xb,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xc,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xd,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xe,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xf,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x10,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x11,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x12,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x13,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x14,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x15,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x16,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x17,%edi
mov    $0x47,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xa,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0x52e(%rip),%rbx
lea    0x592(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xb,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0x5a2(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xc,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0x5b1(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xd,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
xor    %eax,%eax
call   10b0 <holdit@plt>
lea    0x4b6(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0x4aa(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0x58b(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x20,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x50,%ebx
jne    1bf0 <tst_vt52+0xa50>
mov    $0x4,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1c20 <tst_vt52+0xa80>
mov    $0x6,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
lea    0x41b(%rip),%rdi
lea    0x523(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x541(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0x8,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x20,%ebx
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x50,%ebx
jne    1c80 <tst_vt52+0xae0>
mov    $0x9,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1cb0 <tst_vt52+0xb10>
lea    0x4d9(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1090 <esc@plt>
mov    $0xc,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   10c0 <vt52cup@plt>
xor    %eax,%eax
call   10b0 <holdit@plt>
lea    0x36f(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0x363(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
lea    0x496(%rip),%rdi
xor    %eax,%eax
call   1070 <println@plt>
lea    0x307(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
xor    %eax,%eax
call   1060 <instr@plt>
movslq %eax,%rbx
lea    0x366(%rip),%rdi
xor    %eax,%eax
call   1070 <println@plt>
lea    0x490(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x48f(%rip),%rdi
xor    %eax,%eax
call   1090 <esc@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <chrprint@plt>
lea    0x298(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %eax,%eax
je     1d90 <tst_vt52+0xbf0>
lea    0x2a6(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
cmp    $0x1,%eax
mov    $0x2,%r14d
sbb    $0x0,%r14
shl    $0x4,%r14
lea    0x2055(%rip),%rax
mov    0x8(%r14,%rax,1),%rsi
lea    0x2be(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2e5(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <println@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <println@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <holdit@plt>

LLVM IR (-O0):
%struct.rtabl = type { i8*, i8* }
@tst_vt52.resptable = internal global [3 x %struct.rtabl] [%struct.rtabl { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i32 0, i32 0) }, %struct.rtabl { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i32 0, i32 0) }, %struct.rtabl { i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i32 0, i32 0) }]
@.str = [4 x i8] c"\1B/K\00"
@.str.1 = [29 x i8] c" -- OK (means Standard VT52)\00"
@.str.2 = [4 x i8] c"\1B/Z\00"
@.str.3 = [36 x i8] c" -- OK (means VT100 emulating VT52)\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [21 x i8] c" -- Unknown response\00"
@.str.6 = [3 x i8] c"?2\00"
@.str.7 = [2 x i8] c"H\00"
@.str.8 = [2 x i8] c"J\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [8 x i8] c"FooBar \00"
@.str.11 = [7 x i8] c"Bletch\00"
@.str.12 = [14 x i8] c"nothing more.\00"
@.str.13 = [22 x i8] c"THIS SHOULD GO AWAY! \00"
@.str.14 = [34 x i8] c"Back scroll (this should go away)\00"
@.str.15 = [2 x i8] c"I\00"
@.str.16 = [2 x i8] c"K\00"
@.str.17 = [9 x i8] c"**Foobar\00"
@.str.18 = [2 x i8] c"*\00"
@.str.19 = [3 x i8] c"%c\00"
@.str.20 = [2 x i8] c"D\00"
@.str.21 = [2 x i8] c"C\00"
@.str.22 = [2 x i8] c"!\00"
@.str.23 = [2 x i8] c"B\00"
@.str.24 = [2 x i8] c"A\00"
@.str.25 = [50 x i8] c"The screen should be cleared, and have a centered\00"
@.str.26 = [49 x i8] c"rectangle of \22*\22s with \22!\22s on the inside to the\00"
@.str.27 = [31 x i8] c"left and right. Only this, and\00"
@.str.28 = [34 x i8] c"This is the normal character set:\00"
@.str.29 = [44 x i8] c"This is the special graphics character set:\00"
@.str.30 = [2 x i8] c"F\00"
@.str.31 = [2 x i8] c"G\00"
@.str.32 = [46 x i8] c"Test of terminal response to IDENTIFY command\00"
@.str.33 = [2 x i8] c"Z\00"
@.str.34 = [13 x i8] c"Response was\00"
@.str.35 = [2 x i8] c"<\00"
define i32 @tst_vt52() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @rm to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %2
br label %9
9: ; preds = %23, %0
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 23
br i1 %11, label %12, label %26
12: ; preds = %9
store i32 0, i32* %3
br label %13
13: ; preds = %18, %12
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 9
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %18
18: ; preds = %16
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %13
21: ; preds = %13
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %23
23: ; preds = %21
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %9
26: ; preds = %9
%27 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%29 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 7, i32 47)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
store i32 1, i32* %2
br label %31
31: ; preds = %36, %26
%32 = load i32, i32* %2
%33 = icmp sle i32 %32, 10
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %31
39: ; preds = %31
store i32 1, i32* %2
br label %40
40: ; preds = %47, %39
%41 = load i32, i32* %2
%42 = icmp sle i32 %41, 5
br i1 %42, label %43, label %50
43: ; preds = %40
%44 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%46 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %47
47: ; preds = %43
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %40
50: ; preds = %40
%51 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 60)
%52 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 2, i32* %2
br label %53
53: ; preds = %60, %50
%54 = load i32, i32* %2
%55 = icmp sle i32 %54, 6
br i1 %55, label %56, label %63
56: ; preds = %53
%57 = load i32, i32* %2
%58 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 %57, i32 1)
%59 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %60
60: ; preds = %56
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %53
63: ; preds = %53
store i32 2, i32* %2
br label %64
64: ; preds = %71, %63
%65 = load i32, i32* %2
%66 = icmp sle i32 %65, 23
br i1 %66, label %67, label %74
67: ; preds = %64
%68 = load i32, i32* %2
%69 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 %68, i32 70)
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
br label %71
71: ; preds = %67
%72 = load i32, i32* %2
%73 = add nsw i32 %72, 1
store i32 %73, i32* %2
br label %64
74: ; preds = %64
%75 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 10)
store i32 23, i32* %2
br label %76
76: ; preds = %83, %74
%77 = load i32, i32* %2
%78 = icmp sge i32 %77, 2
br i1 %78, label %79, label %86
79: ; preds = %76
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 8)
%82 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %83
83: ; preds = %79
%84 = load i32, i32* %2
%85 = add nsw i32 %84, -1
store i32 %85, i32* %2
br label %76
86: ; preds = %76
%87 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 70)
store i32 70, i32* %2
br label %88
88: ; preds = %95, %86
%89 = load i32, i32* %2
%90 = icmp sge i32 %89, 10
br i1 %90, label %91, label %98
91: ; preds = %88
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%93 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%94 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %95
95: ; preds = %91
%96 = load i32, i32* %2
%97 = add nsw i32 %96, -1
store i32 %97, i32* %2
br label %88
98: ; preds = %88
%99 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 24, i32 10)
store i32 10, i32* %2
br label %100
100: ; preds = %107, %98
%101 = load i32, i32* %2
%102 = icmp sle i32 %101, 70
br i1 %102, label %103, label %110
103: ; preds = %100
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 8)
%106 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
br label %107
107: ; preds = %103
%108 = load i32, i32* %2
%109 = add nsw i32 %108, 1
store i32 %109, i32* %2
br label %100
110: ; preds = %100
%111 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 2, i32 11)
store i32 2, i32* %2
br label %112
112: ; preds = %119, %110
%113 = load i32, i32* %2
%114 = icmp sle i32 %113, 23
br i1 %114, label %115, label %122
115: ; preds = %112
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 8)
%118 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
br label %119
119: ; preds = %115
%120 = load i32, i32* %2
%121 = add nsw i32 %120, 1
store i32 %121, i32* %2
br label %112
122: ; preds = %112
%123 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 69)
store i32 23, i32* %2
br label %124
124: ; preds = %131, %122
%125 = load i32, i32* %2
%126 = icmp sge i32 %125, 2
br i1 %126, label %127, label %134
127: ; preds = %124
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 8)
%130 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
br label %131
131: ; preds = %127
%132 = load i32, i32* %2
%133 = add nsw i32 %132, -1
store i32 %133, i32* %2
br label %124
134: ; preds = %124
store i32 2, i32* %2
br label %135
135: ; preds = %142, %134
%136 = load i32, i32* %2
%137 = icmp sle i32 %136, 23
br i1 %137, label %138, label %145
138: ; preds = %135
%139 = load i32, i32* %2
%140 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 %139, i32 71)
%141 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %142
142: ; preds = %138
%143 = load i32, i32* %2
%144 = add nsw i32 %143, 1
store i32 %144, i32* %2
br label %135
145: ; preds = %135
%146 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 10, i32 16)
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.25, i64 0, i64 0))
%148 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 11, i32 16)
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.26, i64 0, i64 0))
%150 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 16)
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.27, i64 0, i64 0))
%152 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 13, i32 16)
%153 = call i32 (...) @holdit()
%154 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%155 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0))
store i32 0, i32* %3
br label %157
157: ; preds = %178, %145
%158 = load i32, i32* %3
%159 = icmp sle i32 %158, 1
br i1 %159, label %160, label %181
160: ; preds = %157
%161 = load i32, i32* %3
%162 = add nsw i32 3, %161
%163 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 %162, i32 16)
store i32 0, i32* %2
br label %164
164: ; preds = %174, %160
%165 = load i32, i32* %2
%166 = icmp sle i32 %165, 47
br i1 %166, label %167, label %177
167: ; preds = %164
%168 = load i32, i32* %2
%169 = add nsw i32 32, %168
%170 = load i32, i32* %3
%171 = mul nsw i32 48, %170
%172 = add nsw i32 %169, %171
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 %172)
br label %174
174: ; preds = %167
%175 = load i32, i32* %2
%176 = add nsw i32 %175, 1
store i32 %176, i32* %2
br label %164
177: ; preds = %164
br label %178
178: ; preds = %177
%179 = load i32, i32* %3
%180 = add nsw i32 %179, 1
store i32 %180, i32* %3
br label %157
181: ; preds = %157
%182 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 6, i32 1)
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.29, i64 0, i64 0))
%184 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.30, i64 0, i64 0))
store i32 0, i32* %3
br label %185
185: ; preds = %206, %181
%186 = load i32, i32* %3
%187 = icmp sle i32 %186, 1
br i1 %187, label %188, label %209
188: ; preds = %185
%189 = load i32, i32* %3
%190 = add nsw i32 8, %189
%191 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 %190, i32 16)
store i32 0, i32* %2
br label %192
192: ; preds = %202, %188
%193 = load i32, i32* %2
%194 = icmp sle i32 %193, 47
br i1 %194, label %195, label %205
195: ; preds = %192
%196 = load i32, i32* %2
%197 = add nsw i32 32, %196
%198 = load i32, i32* %3
%199 = mul nsw i32 48, %198
%200 = add nsw i32 %197, %199
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i32 %200)
br label %202
202: ; preds = %195
%203 = load i32, i32* %2
%204 = add nsw i32 %203, 1
store i32 %204, i32* %2
br label %192
205: ; preds = %192
br label %206
206: ; preds = %205
%207 = load i32, i32* %3
%208 = add nsw i32 %207, 1
store i32 %208, i32* %3
br label %185
209: ; preds = %185
%210 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i64 0, i64 0))
%211 = call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 1)
%212 = call i32 (...) @holdit()
%213 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%214 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%215 = call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.32, i64 0, i64 0))
%216 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.33, i64 0, i64 0))
%217 = call i32 (...) @instr()
%218 = sext i32 %217 to i64
%219 = inttoptr i64 %218 to i8*
store i8* %219, i8** %4
%220 = call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0))
%222 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0))
%223 = load i8*, i8** %4
%224 = call i32 (i8*, ...) bitcast (i32 (...)* @chrprint to i32 (i8*, ...)*)(i8* %223)
store i32 0, i32* %2
br label %225
225: ; preds = %246, %209
%226 = load i32, i32* %2
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds [3 x %struct.rtabl], [3 x %struct.rtabl]* @tst_vt52.resptable, i64 0, i64 %227
%229 = getelementptr inbounds %struct.rtabl, %struct.rtabl* %228, i32 0, i32 0
%230 = load i8*, i8** %229
%231 = getelementptr inbounds i8, i8* %230, i64 0
%232 = load i8, i8* %231
%233 = sext i8 %232 to i32
%234 = icmp ne i32 %233, 0
br i1 %234, label %235, label %249
235: ; preds = %225
%236 = load i8*, i8** %4
%237 = load i32, i32* %2
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [3 x %struct.rtabl], [3 x %struct.rtabl]* @tst_vt52.resptable, i64 0, i64 %238
%240 = getelementptr inbounds %struct.rtabl, %struct.rtabl* %239, i32 0, i32 0
%241 = load i8*, i8** %240
%242 = call i32 @strcmp(i8* %236, i8* %241)
%243 = icmp ne i32 %242, 0
br i1 %243, label %245, label %244
244: ; preds = %235
br label %249
245: ; preds = %235
br label %246
246: ; preds = %245
%247 = load i32, i32* %2
%248 = add nsw i32 %247, 1
store i32 %248, i32* %2
br label %225
249: ; preds = %244, %225
%250 = load i32, i32* %2
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [3 x %struct.rtabl], [3 x %struct.rtabl]* @tst_vt52.resptable, i64 0, i64 %251
%253 = getelementptr inbounds %struct.rtabl, %struct.rtabl* %252, i32 0, i32 1
%254 = load i8*, i8** %253
%255 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %254)
%256 = call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%257 = call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%258 = call i32 (...) @holdit()
%259 = load i32, i32* %1
ret i32 %259
}

LLVM IR (-O2):
%struct.rtabl = type { i8*, i8* }
@tst_vt52.resptable = internal unnamed_addr constant [3 x %struct.rtabl] [%struct.rtabl { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i32 0, i32 0) }, %struct.rtabl { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i32 0, i32 0) }, %struct.rtabl { i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i32 0, i32 0) }]
@.str = [4 x i8] c"\1B/K\00"
@.str.1 = [29 x i8] c" -- OK (means Standard VT52)\00"
@.str.2 = [4 x i8] c"\1B/Z\00"
@.str.3 = [36 x i8] c" -- OK (means VT100 emulating VT52)\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [21 x i8] c" -- Unknown response\00"
@.str.6 = [3 x i8] c"?2\00"
@.str.7 = [2 x i8] c"H\00"
@.str.8 = [2 x i8] c"J\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [8 x i8] c"FooBar \00"
@.str.11 = [7 x i8] c"Bletch\00"
@.str.12 = [14 x i8] c"nothing more.\00"
@.str.13 = [22 x i8] c"THIS SHOULD GO AWAY! \00"
@.str.14 = [34 x i8] c"Back scroll (this should go away)\00"
@.str.15 = [2 x i8] c"I\00"
@.str.16 = [2 x i8] c"K\00"
@.str.17 = [9 x i8] c"**Foobar\00"
@.str.20 = [2 x i8] c"D\00"
@.str.21 = [2 x i8] c"C\00"
@.str.23 = [2 x i8] c"B\00"
@.str.24 = [2 x i8] c"A\00"
@.str.25 = [50 x i8] c"The screen should be cleared, and have a centered\00"
@.str.26 = [49 x i8] c"rectangle of \22*\22s with \22!\22s on the inside to the\00"
@.str.27 = [31 x i8] c"left and right. Only this, and\00"
@.str.28 = [34 x i8] c"This is the normal character set:\00"
@.str.29 = [44 x i8] c"This is the special graphics character set:\00"
@.str.30 = [2 x i8] c"F\00"
@.str.31 = [2 x i8] c"G\00"
@.str.32 = [46 x i8] c"Test of terminal response to IDENTIFY command\00"
@.str.33 = [2 x i8] c"Z\00"
@.str.34 = [13 x i8] c"Response was\00"
@.str.35 = [2 x i8] c"<\00"
define i32 @tst_vt52() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @rm to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %5
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %18, %5 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%18 = add nuw nsw i32 %6, 1
%19 = icmp eq i32 %18, 24
br i1 %19, label %20, label %5
20: ; preds = %5
%21 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%23 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 7, i32 47)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%35 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%37 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%38 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%40 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%41 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%43 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%44 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%46 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%47 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 1)
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0))
%49 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%50 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 60)
%51 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%52 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 2, i32 1)
%53 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%54 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 3, i32 1)
%55 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%56 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 4, i32 1)
%57 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%58 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 5, i32 1)
%59 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%60 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 6, i32 1)
%61 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%62 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 2, i32 70)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%64 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 3, i32 70)
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%66 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 4, i32 70)
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%68 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 5, i32 70)
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%70 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 6, i32 70)
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%72 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 7, i32 70)
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%74 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 8, i32 70)
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%76 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 9, i32 70)
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%78 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 10, i32 70)
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%80 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 11, i32 70)
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%82 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 70)
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%84 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 13, i32 70)
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%86 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 14, i32 70)
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%88 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 15, i32 70)
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%90 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 16, i32 70)
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%92 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 17, i32 70)
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%94 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 18, i32 70)
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%96 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 19, i32 70)
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%98 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 20, i32 70)
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%100 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 21, i32 70)
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%102 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 22, i32 70)
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%104 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 70)
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
%106 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 10)
br label %107
107: ; preds = %20, %107
%108 = phi i32 [ 23, %20 ], [ %112, %107 ]
%109 = tail call i32 @putchar(i32 42)
%110 = tail call i32 @putchar(i32 8)
%111 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%112 = add nsw i32 %108, -1
%113 = icmp ugt i32 %108, 2
br i1 %113, label %107, label %114
114: ; preds = %107
%115 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 1, i32 70)
br label %116
116: ; preds = %114, %116
%117 = phi i32 [ 70, %114 ], [ %121, %116 ]
%118 = tail call i32 @putchar(i32 42)
%119 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%120 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%121 = add nsw i32 %117, -1
%122 = icmp ugt i32 %117, 10
br i1 %122, label %116, label %123
123: ; preds = %116
%124 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 24, i32 10)
br label %125
125: ; preds = %123, %125
%126 = phi i32 [ 10, %123 ], [ %130, %125 ]
%127 = tail call i32 @putchar(i32 42)
%128 = tail call i32 @putchar(i32 8)
%129 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%130 = add nuw nsw i32 %126, 1
%131 = icmp eq i32 %130, 71
br i1 %131, label %132, label %125
132: ; preds = %125
%133 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 2, i32 11)
br label %134
134: ; preds = %132, %134
%135 = phi i32 [ 2, %132 ], [ %139, %134 ]
%136 = tail call i32 @putchar(i32 33)
%137 = tail call i32 @putchar(i32 8)
%138 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%139 = add nuw nsw i32 %135, 1
%140 = icmp eq i32 %139, 24
br i1 %140, label %141, label %134
141: ; preds = %134
%142 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 69)
br label %143
143: ; preds = %141, %143
%144 = phi i32 [ 23, %141 ], [ %148, %143 ]
%145 = tail call i32 @putchar(i32 33)
%146 = tail call i32 @putchar(i32 8)
%147 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%148 = add nsw i32 %144, -1
%149 = icmp ugt i32 %144, 2
br i1 %149, label %143, label %150
150: ; preds = %143
%151 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 2, i32 71)
%152 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%153 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 3, i32 71)
%154 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%155 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 4, i32 71)
%156 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%157 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 5, i32 71)
%158 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%159 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 6, i32 71)
%160 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%161 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 7, i32 71)
%162 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%163 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 8, i32 71)
%164 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%165 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 9, i32 71)
%166 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%167 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 10, i32 71)
%168 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%169 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 11, i32 71)
%170 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%171 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 71)
%172 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%173 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 13, i32 71)
%174 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%175 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 14, i32 71)
%176 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%177 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 15, i32 71)
%178 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%179 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 16, i32 71)
%180 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%181 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 17, i32 71)
%182 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%183 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 18, i32 71)
%184 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%185 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 19, i32 71)
%186 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%187 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 20, i32 71)
%188 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%189 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 21, i32 71)
%190 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%191 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 22, i32 71)
%192 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%193 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 23, i32 71)
%194 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%195 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 10, i32 16)
%196 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.25, i64 0, i64 0))
%197 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 11, i32 16)
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.26, i64 0, i64 0))
%199 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 16)
%200 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.27, i64 0, i64 0))
%201 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 13, i32 16)
%202 = tail call i32 (...) @holdit()
%203 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%204 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%205 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0))
%206 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 3, i32 16)
br label %207
207: ; preds = %150, %207
%208 = phi i32 [ 0, %150 ], [ %211, %207 ]
%209 = add nuw nsw i32 %208, 32
%210 = tail call i32 @putchar(i32 %209)
%211 = add nuw nsw i32 %208, 1
%212 = icmp eq i32 %211, 48
br i1 %212, label %213, label %207
213: ; preds = %207
%214 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 4, i32 16)
br label %215
215: ; preds = %215, %213
%216 = phi i32 [ 0, %213 ], [ %219, %215 ]
%217 = add nuw nsw i32 %216, 80
%218 = tail call i32 @putchar(i32 %217)
%219 = add nuw nsw i32 %216, 1
%220 = icmp eq i32 %219, 48
br i1 %220, label %221, label %215
221: ; preds = %215
%222 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 6, i32 1)
%223 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.29, i64 0, i64 0))
%224 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.30, i64 0, i64 0))
%225 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 8, i32 16)
br label %226
226: ; preds = %221, %226
%227 = phi i32 [ 0, %221 ], [ %230, %226 ]
%228 = add nuw nsw i32 %227, 32
%229 = tail call i32 @putchar(i32 %228)
%230 = add nuw nsw i32 %227, 1
%231 = icmp eq i32 %230, 48
br i1 %231, label %232, label %226
232: ; preds = %226
%233 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 9, i32 16)
br label %234
234: ; preds = %234, %232
%235 = phi i32 [ 0, %232 ], [ %238, %234 ]
%236 = add nuw nsw i32 %235, 80
%237 = tail call i32 @putchar(i32 %236)
%238 = add nuw nsw i32 %235, 1
%239 = icmp eq i32 %238, 48
br i1 %239, label %240, label %234
240: ; preds = %234
%241 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i64 0, i64 0))
%242 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @vt52cup to i32 (i32, i32, ...)*)(i32 12, i32 1)
%243 = tail call i32 (...) @holdit()
%244 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%245 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%246 = tail call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.32, i64 0, i64 0))
%247 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.33, i64 0, i64 0))
%248 = tail call i32 (...) @instr()
%249 = sext i32 %248 to i64
%250 = inttoptr i64 %249 to i8*
%251 = tail call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%252 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0))
%253 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0))
%254 = tail call i32 (i8*, ...) bitcast (i32 (...)* @chrprint to i32 (i8*, ...)*)(i8* %250)
%255 = tail call i32 @strcmp(i8* dereferenceable(1) %250, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%256 = icmp eq i32 %255, 0
br i1 %256, label %261, label %257
257: ; preds = %240
%258 = tail call i32 @strcmp(i8* dereferenceable(1) %250, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%259 = icmp eq i32 %258, 0
%260 = select i1 %259, i64 1, i64 2
br label %261
261: ; preds = %257, %240
%262 = phi i64 [ 0, %240 ], [ %260, %257 ]
%263 = getelementptr inbounds [3 x %struct.rtabl], [3 x %struct.rtabl]* @tst_vt52.resptable, i64 0, i64 %262, i32 1
%264 = load i8*, i8** %263
%265 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %264)
%266 = tail call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%267 = tail call i32 (i8*, ...) bitcast (i32 (...)* @println to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%268 = tail call i32 (...) @holdit()
ret i32 undef
}