#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *parse_Sdesig(char *, int *);
int /*<<< orphan*/ println(char *);
int scan_chr(char *, int *, char);
int scanto(char *, int *, char);
int /*<<< orphan*/ show_result(char *, ...);
int /*<<< orphan*/ vt_move(int, int);
void show_DECCIR(char *report) {
  int Pr, Pc, Pp, Srend, Satt, Sflag, Pgl, Pgr, Scss;
  int pos = 3;
  int n;
  Pr = scanto(report, &pos, ';');
  Pc = scanto(report, &pos, ';');
  Pp = scanto(report, &pos, ';');
  vt_move(5, 10);
  show_result("Cursor (%d,%d), page %d", Pr, Pc, Pp);
  Srend = scan_chr(report, &pos, ';');
  vt_move(6, 10);
  if (Srend & 0x40) {
    if (Srend & 0x40) {
      Srend &= ~0x40;
      show_result("Rendition:");
    };
    if (Srend == 0)
      show_result(" normal");
    if (Srend & 0x08) {
      Srend &= ~0x08;
      show_result(" reverse");
    };
    if (Srend & 0x04) {
      Srend &= ~0x04;
      show_result(" blinking");
    };
    if (Srend & 0x02) {
      Srend &= ~0x02;
      show_result(" underline");
    };
    if (Srend & 0x01) {
      Srend &= ~0x01;
      show_result(" bold");
    };
  }
  if (Srend)
    show_result(" -> unknown rendition (0x%x)", Srend);
  Satt = scan_chr(report, &pos, ';');
  vt_move(7, 10);
  switch (Satt) {
  case 0x40:
    show_result("Selective erase: off");
    break;
  case 0x41:
    show_result("Selective erase: ON");
    break;
  default:
    show_result("Selective erase: unknown (0x%x)", Satt);
  }
  Sflag = scan_chr(report, &pos, ';');
  vt_move(8, 10);
  if (Sflag & 0x40) {
    if (Sflag & 0x40) {
      Sflag &= ~0x40;
      show_result("Flags:");
    };
    if (Sflag & 0x08) {
      Sflag &= ~0x08;
      show_result(" autowrap pending");
    };
    if (Sflag & 0x04) {
      Sflag &= ~0x04;
      show_result(" SS3 pending");
    };
    if (Sflag & 0x02) {
      Sflag &= ~0x02;
      show_result(" SS2 pending");
    };
    if (Sflag & 0x01) {
      Sflag &= ~0x01;
      show_result(" origin-mode on");
    };
  } else {
    show_result(" -> unknown flag (0x%x)", Sflag);
  }
  Pgl = scanto(report, &pos, ';');
  Pgr = scanto(report, &pos, ';');
  vt_move(9, 10);
  show_result("Char set in GL: G%d, Char set in GR: G%d", Pgl, Pgr);
  Scss = scan_chr(report, &pos, ';');
  vt_move(10, 10);
  if (Scss & 0x40) {
    if (Scss & 0x40) {
      Scss &= ~0x40;
      show_result("Char set sizes:");
    };
    if (Scss & 0x08) {
      Scss &= ~0x08;
      show_result(" G3 is 96 char");
    };
    if (Scss & 0x04) {
      Scss &= ~0x04;
      show_result(" G2 is 96 char");
    };
    if (Scss & 0x02) {
      Scss &= ~0x02;
      show_result(" G1 is 96 char");
    };
    if (Scss & 0x01) {
      Scss &= ~0x01;
      show_result(" G0 is 96 char");
    };
  } else {
    show_result(" -> unknown char set size (0x%x)", Scss);
  }
  n = 11;
  vt_move(n, 10);
  show_result("Character set idents for G0...G3: ");
  println("");
  while (report[pos] != '\0') {
    const char *result = parse_Sdesig(report, &pos);
    show_result("            %s\n", result);
    println("");
  }
}


x86 assembly (clang, -O0):
<show_DECCIR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,-0x14(%rbp)
mov    $0x5,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,-0x18(%rbp)
mov    $0x6,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
mov    -0x18(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     12e6 <show_DECCIR+0x186>
mov    -0x18(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1231 <show_DECCIR+0xd1>
mov    -0x18(%rbp),%eax
and    $0xffffffbf,%eax
mov    %eax,-0x18(%rbp)
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1249 <show_DECCIR+0xe9>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x18(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     126f <show_DECCIR+0x10f>
mov    -0x18(%rbp),%eax
and    $0xfffffff7,%eax
mov    %eax,-0x18(%rbp)
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x18(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1295 <show_DECCIR+0x135>
mov    -0x18(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x18(%rbp)
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x18(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     12bb <show_DECCIR+0x15b>
mov    -0x18(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0x18(%rbp)
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     12e1 <show_DECCIR+0x181>
mov    -0x18(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x18(%rbp)
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
jmp    12e6 <show_DECCIR+0x186>
cmpl   $0x0,-0x18(%rbp)
je     1301 <show_DECCIR+0x1a1>
mov    -0x18(%rbp),%esi
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x7,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x40,%eax
je     134a <show_DECCIR+0x1ea>
jmp    1339 <show_DECCIR+0x1d9>
mov    -0x44(%rbp),%eax
sub    $0x41,%eax
je     135d <show_DECCIR+0x1fd>
jmp    1370 <show_DECCIR+0x210>
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
jmp    1381 <show_DECCIR+0x221>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
jmp    1381 <show_DECCIR+0x221>
mov    -0x1c(%rbp),%esi
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,-0x20(%rbp)
mov    $0x8,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
mov    -0x20(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1477 <show_DECCIR+0x317>
mov    -0x20(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     13da <show_DECCIR+0x27a>
mov    -0x20(%rbp),%eax
and    $0xffffffbf,%eax
mov    %eax,-0x20(%rbp)
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x20(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1400 <show_DECCIR+0x2a0>
mov    -0x20(%rbp),%eax
and    $0xfffffff7,%eax
mov    %eax,-0x20(%rbp)
lea    0xcc3(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x20(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1426 <show_DECCIR+0x2c6>
mov    -0x20(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x20(%rbp)
lea    0xcaf(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x20(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     144c <show_DECCIR+0x2ec>
mov    -0x20(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0x20(%rbp)
lea    0xc96(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x20(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1472 <show_DECCIR+0x312>
mov    -0x20(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x20(%rbp)
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
jmp    1488 <show_DECCIR+0x328>
mov    -0x20(%rbp),%esi
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,-0x28(%rbp)
mov    $0x9,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xc42(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,-0x2c(%rbp)
mov    $0xa,%esi
mov    %esi,%edi
call   1040 <vt_move@plt>
mov    -0x2c(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     15c8 <show_DECCIR+0x468>
mov    -0x2c(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     152b <show_DECCIR+0x3cb>
mov    -0x2c(%rbp),%eax
and    $0xffffffbf,%eax
mov    %eax,-0x2c(%rbp)
lea    0xc15(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x2c(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1551 <show_DECCIR+0x3f1>
mov    -0x2c(%rbp),%eax
and    $0xfffffff7,%eax
mov    %eax,-0x2c(%rbp)
lea    0xbff(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x2c(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1577 <show_DECCIR+0x417>
mov    -0x2c(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x2c(%rbp)
lea    0xbe8(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x2c(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     159d <show_DECCIR+0x43d>
mov    -0x2c(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0x2c(%rbp)
lea    0xbd1(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     15c3 <show_DECCIR+0x463>
mov    -0x2c(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x2c(%rbp)
lea    0xbba(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
jmp    15d9 <show_DECCIR+0x479>
mov    -0x2c(%rbp),%esi
lea    0xbb3(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
movl   $0xb,-0x34(%rbp)
mov    -0x34(%rbp),%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
lea    0xbb2(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
lea    0xbd6(%rip),%rdi
call   1050 <println@plt>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1650 <show_DECCIR+0x4f0>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1070 <parse_Sdesig@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xb91(%rip),%rdi
mov    $0x0,%al
call   1060 <show_result@plt>
lea    0xb92(%rip),%rdi
call   1050 <println@plt>
jmp    1607 <show_DECCIR+0x4a7>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_DECCIR>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
movl   $0x3,0xc(%rsp)
lea    0xc(%rsp),%r15
mov    %r15,%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,%r12d
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
lea    0xe3a(%rip),%rdi
mov    %r12d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,%ebp
mov    $0x6,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
test   $0x40,%bpl
je     1244 <show_DECCIR+0xe4>
lea    0xe16(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %ebp,%ebx
and    $0xffffffbf,%ebx
je     125a <show_DECCIR+0xfa>
test   $0x8,%bpl
jne    1519 <show_DECCIR+0x3b9>
test   $0x4,%bl
jne    1535 <show_DECCIR+0x3d5>
test   $0x2,%bl
jne    154f <show_DECCIR+0x3ef>
test   $0x1,%bl
je     1242 <show_DECCIR+0xe2>
and    $0xfffffffe,%ebx
lea    0xe0e(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %ebx,%ebp
test   %ebp,%ebp
je     1268 <show_DECCIR+0x108>
lea    0xe00(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <show_result@plt>
jmp    1268 <show_DECCIR+0x108>
lea    0xdc2(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,%ebx
mov    $0x7,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
cmp    $0x41,%ebx
je     129e <show_DECCIR+0x13e>
cmp    $0x40,%ebx
jne    12ae <show_DECCIR+0x14e>
lea    0xdd0(%rip),%rdi
jmp    12a5 <show_DECCIR+0x145>
lea    0xddc(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
jmp    12be <show_DECCIR+0x15e>
lea    0xde0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <show_result@plt>
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,%ebp
mov    $0x8,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
test   $0x40,%bpl
jne    12f9 <show_DECCIR+0x199>
lea    0xe0a(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <show_result@plt>
jmp    135e <show_DECCIR+0x1fe>
lea    0xdb5(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x8,%bpl
jne    1318 <show_DECCIR+0x1b8>
and    $0xffffffbf,%ebp
test   $0x4,%bpl
jne    132f <show_DECCIR+0x1cf>
jmp    1340 <show_DECCIR+0x1e0>
and    $0xffffffb7,%ebp
lea    0xd9a(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x4,%bpl
je     1340 <show_DECCIR+0x1e0>
and    $0xffffffbb,%ebp
lea    0xd95(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x2,%bpl
jne    1403 <show_DECCIR+0x2a3>
test   $0x1,%bpl
je     135e <show_DECCIR+0x1fe>
lea    0xd91(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
lea    0xc(%rsp),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1030 <scanto@plt>
mov    %eax,%ebp
mov    $0x9,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
lea    0xd73(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3b,%edx
call   1080 <scan_chr@plt>
mov    %eax,%ebp
mov    $0xa,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
test   $0x40,%bpl
jne    13e4 <show_DECCIR+0x284>
lea    0xdaf(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <show_result@plt>
jmp    1469 <show_DECCIR+0x309>
lea    0xd4e(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x8,%bpl
jne    1423 <show_DECCIR+0x2c3>
and    $0xffffffbf,%ebp
test   $0x4,%bpl
jne    143a <show_DECCIR+0x2da>
jmp    144b <show_DECCIR+0x2eb>
and    $0xfffffffd,%ebp
lea    0xcce(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x1,%bpl
jne    1350 <show_DECCIR+0x1f0>
jmp    135e <show_DECCIR+0x1fe>
and    $0xffffffb7,%ebp
lea    0xd1c(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x4,%bpl
je     144b <show_DECCIR+0x2eb>
and    $0xffffffbb,%ebp
lea    0xd14(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x2,%bpl
jne    14f9 <show_DECCIR+0x399>
test   $0x1,%bpl
je     1469 <show_DECCIR+0x309>
lea    0xd14(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
mov    $0xb,%edi
mov    $0xa,%esi
call   1040 <vt_move@plt>
lea    0xd27(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
lea    0xd4b(%rip),%rdi
call   1050 <println@plt>
movslq 0xc(%rsp),%rax
cmpb   $0x0,(%r14,%rax,1)
je     14ec <show_DECCIR+0x38c>
lea    0xc(%rsp),%r15
lea    0xd1f(%rip),%rbx
lea    0xd27(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <parse_Sdesig@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %rbp,%rdi
call   1050 <println@plt>
movslq 0xc(%rsp),%rax
cmpb   $0x0,(%r14,%rax,1)
jne    14c0 <show_DECCIR+0x360>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
and    $0xfffffffd,%ebp
lea    0xc64(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x1,%bpl
jne    145b <show_DECCIR+0x2fb>
jmp    1469 <show_DECCIR+0x309>
and    $0xffffffb7,%ebp
lea    0xb08(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
mov    %ebp,%ebx
test   $0x4,%bl
je     1223 <show_DECCIR+0xc3>
and    $0xffffffbb,%ebx
lea    0xaf5(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x2,%bl
je     122c <show_DECCIR+0xcc>
and    $0xfffffffd,%ebx
lea    0xae5(%rip),%rdi
xor    %eax,%eax
call   1060 <show_result@plt>
test   $0x1,%bl
jne    1231 <show_DECCIR+0xd1>
jmp    1242 <show_DECCIR+0xe2>

LLVM IR (-O0):
@.str = [24 x i8] c"Cursor (%d,%d), page %d\00"
@.str.1 = [11 x i8] c"Rendition:\00"
@.str.2 = [8 x i8] c" normal\00"
@.str.3 = [9 x i8] c" reverse\00"
@.str.4 = [10 x i8] c" blinking\00"
@.str.5 = [11 x i8] c" underline\00"
@.str.6 = [6 x i8] c" bold\00"
@.str.7 = [29 x i8] c" -> unknown rendition (0x%x)\00"
@.str.8 = [21 x i8] c"Selective erase: off\00"
@.str.9 = [20 x i8] c"Selective erase: ON\00"
@.str.10 = [32 x i8] c"Selective erase: unknown (0x%x)\00"
@.str.11 = [7 x i8] c"Flags:\00"
@.str.12 = [18 x i8] c" autowrap pending\00"
@.str.13 = [13 x i8] c" SS3 pending\00"
@.str.14 = [13 x i8] c" SS2 pending\00"
@.str.15 = [16 x i8] c" origin-mode on\00"
@.str.16 = [24 x i8] c" -> unknown flag (0x%x)\00"
@.str.17 = [41 x i8] c"Char set in GL: G%d, Char set in GR: G%d\00"
@.str.18 = [16 x i8] c"Char set sizes:\00"
@.str.19 = [15 x i8] c" G3 is 96 char\00"
@.str.20 = [15 x i8] c" G2 is 96 char\00"
@.str.21 = [15 x i8] c" G1 is 96 char\00"
@.str.22 = [15 x i8] c" G0 is 96 char\00"
@.str.23 = [33 x i8] c" -> unknown char set size (0x%x)\00"
@.str.24 = [35 x i8] c"Character set idents for G0...G3: \00"
@.str.25 = [1 x i8] zeroinitializer
@.str.26 = [16 x i8] c" %s\0A\00"
define void @show_DECCIR(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %2
store i32 3, i32* %12
%15 = load i8*, i8** %2
%16 = call i32 @scanto(i8* %15, i32* %12, i8 signext 59)
store i32 %16, i32* %3
%17 = load i8*, i8** %2
%18 = call i32 @scanto(i8* %17, i32* %12, i8 signext 59)
store i32 %18, i32* %4
%19 = load i8*, i8** %2
%20 = call i32 @scanto(i8* %19, i32* %12, i8 signext 59)
store i32 %20, i32* %5
%21 = call i32 @vt_move(i32 5, i32 10)
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
%26 = load i8*, i8** %2
%27 = call i32 @scan_chr(i8* %26, i32* %12, i8 signext 59)
store i32 %27, i32* %6
%28 = call i32 @vt_move(i32 6, i32 10)
%29 = load i32, i32* %6
%30 = and i32 %29, 64
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %78
32: ; preds = %1
%33 = load i32, i32* %6
%34 = and i32 %33, 64
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %32
%37 = load i32, i32* %6
%38 = and i32 %37, -65
store i32 %38, i32* %6
%39 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %40
40: ; preds = %36, %32
%41 = load i32, i32* %6
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %43, %40
%46 = load i32, i32* %6
%47 = and i32 %46, 8
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %45
%50 = load i32, i32* %6
%51 = and i32 %50, -9
store i32 %51, i32* %6
%52 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %53
53: ; preds = %49, %45
%54 = load i32, i32* %6
%55 = and i32 %54, 4
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %61
57: ; preds = %53
%58 = load i32, i32* %6
%59 = and i32 %58, -5
store i32 %59, i32* %6
%60 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %61
61: ; preds = %57, %53
%62 = load i32, i32* %6
%63 = and i32 %62, 2
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %69
65: ; preds = %61
%66 = load i32, i32* %6
%67 = and i32 %66, -3
store i32 %67, i32* %6
%68 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %69
69: ; preds = %65, %61
%70 = load i32, i32* %6
%71 = and i32 %70, 1
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %77
73: ; preds = %69
%74 = load i32, i32* %6
%75 = and i32 %74, -2
store i32 %75, i32* %6
%76 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %77
77: ; preds = %73, %69
br label %78
78: ; preds = %77, %1
%79 = load i32, i32* %6
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %78
%82 = load i32, i32* %6
%83 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %82)
br label %84
84: ; preds = %81, %78
%85 = load i8*, i8** %2
%86 = call i32 @scan_chr(i8* %85, i32* %12, i8 signext 59)
store i32 %86, i32* %7
%87 = call i32 @vt_move(i32 7, i32 10)
%88 = load i32, i32* %7
switch i32 %88, label %93 [
i32 64, label %89
i32 65, label %91
]
89: ; preds = %84
%90 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %96
91: ; preds = %84
%92 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
br label %96
93: ; preds = %84
%94 = load i32, i32* %7
%95 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %93, %91, %89
%97 = load i8*, i8** %2
%98 = call i32 @scan_chr(i8* %97, i32* %12, i8 signext 59)
store i32 %98, i32* %8
%99 = call i32 @vt_move(i32 8, i32 10)
%100 = load i32, i32* %8
%101 = and i32 %100, 64
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %144
103: ; preds = %96
%104 = load i32, i32* %8
%105 = and i32 %104, 64
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %111
107: ; preds = %103
%108 = load i32, i32* %8
%109 = and i32 %108, -65
store i32 %109, i32* %8
%110 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %111
111: ; preds = %107, %103
%112 = load i32, i32* %8
%113 = and i32 %112, 8
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %119
115: ; preds = %111
%116 = load i32, i32* %8
%117 = and i32 %116, -9
store i32 %117, i32* %8
%118 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
br label %119
119: ; preds = %115, %111
%120 = load i32, i32* %8
%121 = and i32 %120, 4
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %119
%124 = load i32, i32* %8
%125 = and i32 %124, -5
store i32 %125, i32* %8
%126 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %127
127: ; preds = %123, %119
%128 = load i32, i32* %8
%129 = and i32 %128, 2
%130 = icmp ne i32 %129, 0
br i1 %130, label %131, label %135
131: ; preds = %127
%132 = load i32, i32* %8
%133 = and i32 %132, -3
store i32 %133, i32* %8
%134 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %135
135: ; preds = %131, %127
%136 = load i32, i32* %8
%137 = and i32 %136, 1
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %143
139: ; preds = %135
%140 = load i32, i32* %8
%141 = and i32 %140, -2
store i32 %141, i32* %8
%142 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %143
143: ; preds = %139, %135
br label %147
144: ; preds = %96
%145 = load i32, i32* %8
%146 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i32 %145)
br label %147
147: ; preds = %144, %143
%148 = load i8*, i8** %2
%149 = call i32 @scanto(i8* %148, i32* %12, i8 signext 59)
store i32 %149, i32* %9
%150 = load i8*, i8** %2
%151 = call i32 @scanto(i8* %150, i32* %12, i8 signext 59)
store i32 %151, i32* %10
%152 = call i32 @vt_move(i32 9, i32 10)
%153 = load i32, i32* %9
%154 = load i32, i32* %10
%155 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), i32 %153, i32 %154)
%156 = load i8*, i8** %2
%157 = call i32 @scan_chr(i8* %156, i32* %12, i8 signext 59)
store i32 %157, i32* %11
%158 = call i32 @vt_move(i32 10, i32 10)
%159 = load i32, i32* %11
%160 = and i32 %159, 64
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %203
162: ; preds = %147
%163 = load i32, i32* %11
%164 = and i32 %163, 64
%165 = icmp ne i32 %164, 0
br i1 %165, label %166, label %170
166: ; preds = %162
%167 = load i32, i32* %11
%168 = and i32 %167, -65
store i32 %168, i32* %11
%169 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
br label %170
170: ; preds = %166, %162
%171 = load i32, i32* %11
%172 = and i32 %171, 8
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %178
174: ; preds = %170
%175 = load i32, i32* %11
%176 = and i32 %175, -9
store i32 %176, i32* %11
%177 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
br label %178
178: ; preds = %174, %170
%179 = load i32, i32* %11
%180 = and i32 %179, 4
%181 = icmp ne i32 %180, 0
br i1 %181, label %182, label %186
182: ; preds = %178
%183 = load i32, i32* %11
%184 = and i32 %183, -5
store i32 %184, i32* %11
%185 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0))
br label %186
186: ; preds = %182, %178
%187 = load i32, i32* %11
%188 = and i32 %187, 2
%189 = icmp ne i32 %188, 0
br i1 %189, label %190, label %194
190: ; preds = %186
%191 = load i32, i32* %11
%192 = and i32 %191, -3
store i32 %192, i32* %11
%193 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0))
br label %194
194: ; preds = %190, %186
%195 = load i32, i32* %11
%196 = and i32 %195, 1
%197 = icmp ne i32 %196, 0
br i1 %197, label %198, label %202
198: ; preds = %194
%199 = load i32, i32* %11
%200 = and i32 %199, -2
store i32 %200, i32* %11
%201 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0))
br label %202
202: ; preds = %198, %194
br label %206
203: ; preds = %147
%204 = load i32, i32* %11
%205 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i32 %204)
br label %206
206: ; preds = %203, %202
store i32 11, i32* %13
%207 = load i32, i32* %13
%208 = call i32 @vt_move(i32 %207, i32 10)
%209 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0))
%210 = call i32 @println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i64 0, i64 0))
br label %211
211: ; preds = %219, %206
%212 = load i8*, i8** %2
%213 = load i32, i32* %12
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds i8, i8* %212, i64 %214
%216 = load i8, i8* %215
%217 = sext i8 %216 to i32
%218 = icmp ne i32 %217, 0
br i1 %218, label %219, label %225
219: ; preds = %211
%220 = load i8*, i8** %2
%221 = call i8* @parse_Sdesig(i8* %220, i32* %12)
store i8* %221, i8** %14
%222 = load i8*, i8** %14
%223 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.26, i64 0, i64 0), i8* %222)
%224 = call i32 @println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i64 0, i64 0))
br label %211
225: ; preds = %211
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Cursor (%d,%d), page %d\00"
@.str.1 = [11 x i8] c"Rendition:\00"
@.str.2 = [8 x i8] c" normal\00"
@.str.3 = [9 x i8] c" reverse\00"
@.str.4 = [10 x i8] c" blinking\00"
@.str.5 = [11 x i8] c" underline\00"
@.str.6 = [6 x i8] c" bold\00"
@.str.7 = [29 x i8] c" -> unknown rendition (0x%x)\00"
@.str.8 = [21 x i8] c"Selective erase: off\00"
@.str.9 = [20 x i8] c"Selective erase: ON\00"
@.str.10 = [32 x i8] c"Selective erase: unknown (0x%x)\00"
@.str.11 = [7 x i8] c"Flags:\00"
@.str.12 = [18 x i8] c" autowrap pending\00"
@.str.13 = [13 x i8] c" SS3 pending\00"
@.str.14 = [13 x i8] c" SS2 pending\00"
@.str.15 = [16 x i8] c" origin-mode on\00"
@.str.16 = [24 x i8] c" -> unknown flag (0x%x)\00"
@.str.17 = [41 x i8] c"Char set in GL: G%d, Char set in GR: G%d\00"
@.str.18 = [16 x i8] c"Char set sizes:\00"
@.str.19 = [15 x i8] c" G3 is 96 char\00"
@.str.20 = [15 x i8] c" G2 is 96 char\00"
@.str.21 = [15 x i8] c" G1 is 96 char\00"
@.str.22 = [15 x i8] c" G0 is 96 char\00"
@.str.23 = [33 x i8] c" -> unknown char set size (0x%x)\00"
@.str.24 = [35 x i8] c"Character set idents for G0...G3: \00"
@.str.25 = [1 x i8] zeroinitializer
@.str.26 = [16 x i8] c" %s\0A\00"
define void @show_DECCIR(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 3, i32* %2
%4 = call i32 @scanto(i8* %0, i32* %2, i8 signext 59)
%5 = call i32 @scanto(i8* %0, i32* %2, i8 signext 59)
%6 = call i32 @scanto(i8* %0, i32* %2, i8 signext 59)
%7 = call i32 @vt_move(i32 5, i32 10)
%8 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6)
%9 = call i32 @scan_chr(i8* %0, i32* %2, i8 signext 59)
%10 = call i32 @vt_move(i32 6, i32 10)
%11 = and i32 %9, 64
%12 = icmp eq i32 %11, 0
br i1 %12, label %46, label %13
13: ; preds = %1
%14 = and i32 %9, -65
%15 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %14, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %51
19: ; preds = %13
%20 = and i32 %9, 8
%21 = icmp eq i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = and i32 %9, -73
%24 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %22, %19
%26 = phi i32 [ %23, %22 ], [ %14, %19 ]
%27 = and i32 %26, 4
%28 = icmp eq i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %25
%30 = and i32 %26, -69
%31 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %32
32: ; preds = %29, %25
%33 = phi i32 [ %30, %29 ], [ %26, %25 ]
%34 = and i32 %33, 2
%35 = icmp eq i32 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %32
%37 = and i32 %33, -3
%38 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %39
39: ; preds = %36, %32
%40 = phi i32 [ %37, %36 ], [ %33, %32 ]
%41 = and i32 %40, 1
%42 = icmp eq i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %39
%44 = and i32 %40, -2
%45 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %46
46: ; preds = %39, %43, %1
%47 = phi i32 [ %44, %43 ], [ %40, %39 ], [ %9, %1 ]
%48 = icmp eq i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %46
%50 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %47)
br label %51
51: ; preds = %17, %49, %46
%52 = call i32 @scan_chr(i8* %0, i32* %2, i8 signext 59)
%53 = call i32 @vt_move(i32 7, i32 10)
switch i32 %52, label %58 [
i32 64, label %54
i32 65, label %56
]
54: ; preds = %51
%55 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %60
56: ; preds = %51
%57 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
br label %60
58: ; preds = %51
%59 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %52)
br label %60
60: ; preds = %58, %56, %54
%61 = call i32 @scan_chr(i8* %0, i32* %2, i8 signext 59)
%62 = call i32 @vt_move(i32 8, i32 10)
%63 = and i32 %61, 64
%64 = icmp eq i32 %63, 0
br i1 %64, label %93, label %65
65: ; preds = %60
%66 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%67 = and i32 %61, -65
%68 = and i32 %61, 8
%69 = icmp eq i32 %68, 0
br i1 %69, label %73, label %70
70: ; preds = %65
%71 = and i32 %61, -73
%72 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
br label %73
73: ; preds = %70, %65
%74 = phi i32 [ %71, %70 ], [ %67, %65 ]
%75 = and i32 %74, 4
%76 = icmp eq i32 %75, 0
br i1 %76, label %80, label %77
77: ; preds = %73
%78 = and i32 %74, -69
%79 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
br label %80
80: ; preds = %77, %73
%81 = phi i32 [ %78, %77 ], [ %74, %73 ]
%82 = and i32 %81, 2
%83 = icmp eq i32 %82, 0
br i1 %83, label %87, label %84
84: ; preds = %80
%85 = and i32 %81, -3
%86 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %87
87: ; preds = %84, %80
%88 = phi i32 [ %85, %84 ], [ %81, %80 ]
%89 = and i32 %88, 1
%90 = icmp eq i32 %89, 0
br i1 %90, label %95, label %91
91: ; preds = %87
%92 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %95
93: ; preds = %60
%94 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i32 %61)
br label %95
95: ; preds = %87, %91, %93
%96 = call i32 @scanto(i8* %0, i32* %2, i8 signext 59)
%97 = call i32 @scanto(i8* %0, i32* %2, i8 signext 59)
%98 = call i32 @vt_move(i32 9, i32 10)
%99 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), i32 %96, i32 %97)
%100 = call i32 @scan_chr(i8* %0, i32* %2, i8 signext 59)
%101 = call i32 @vt_move(i32 10, i32 10)
%102 = and i32 %100, 64
%103 = icmp eq i32 %102, 0
br i1 %103, label %132, label %104
104: ; preds = %95
%105 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
%106 = and i32 %100, -65
%107 = and i32 %100, 8
%108 = icmp eq i32 %107, 0
br i1 %108, label %112, label %109
109: ; preds = %104
%110 = and i32 %100, -73
%111 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
br label %112
112: ; preds = %109, %104
%113 = phi i32 [ %110, %109 ], [ %106, %104 ]
%114 = and i32 %113, 4
%115 = icmp eq i32 %114, 0
br i1 %115, label %119, label %116
116: ; preds = %112
%117 = and i32 %113, -69
%118 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0))
br label %119
119: ; preds = %116, %112
%120 = phi i32 [ %117, %116 ], [ %113, %112 ]
%121 = and i32 %120, 2
%122 = icmp eq i32 %121, 0
br i1 %122, label %126, label %123
123: ; preds = %119
%124 = and i32 %120, -3
%125 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.21, i64 0, i64 0))
br label %126
126: ; preds = %123, %119
%127 = phi i32 [ %124, %123 ], [ %120, %119 ]
%128 = and i32 %127, 1
%129 = icmp eq i32 %128, 0
br i1 %129, label %134, label %130
130: ; preds = %126
%131 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0))
br label %134
132: ; preds = %95
%133 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i32 %100)
br label %134
134: ; preds = %126, %130, %132
%135 = call i32 @vt_move(i32 11, i32 10)
%136 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0))
%137 = call i32 @println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i64 0, i64 0))
%138 = load i32, i32* %2
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds i8, i8* %0, i64 %139
%141 = load i8, i8* %140
%142 = icmp eq i8 %141, 0
br i1 %142, label %152, label %143
143: ; preds = %134, %143
%144 = call i8* @parse_Sdesig(i8* %0, i32* %2)
%145 = call i32 (i8*, ...) @show_result(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.26, i64 0, i64 0), i8* %144)
%146 = call i32 @println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.25, i64 0, i64 0))
%147 = load i32, i32* %2
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8, i8* %0, i64 %148
%150 = load i8, i8* %149
%151 = icmp eq i8 %150, 0
br i1 %151, label %152, label %143
152: ; preds = %143, %134
ret void
}