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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ arp_dump(unsigned char *, int);
int /*<<< orphan*/ clear_code(unsigned char);
int /*<<< orphan*/ data_dump(unsigned char *, int, int);
int /*<<< orphan*/ facility(unsigned char *, int);
int /*<<< orphan*/ flexnet_dump(unsigned char *, int, int);
int /*<<< orphan*/ ip_dump(unsigned char *, int, int);
int /*<<< orphan*/ lprintf(int, char *, ...);
int /*<<< orphan*/ netrom_dump(unsigned char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ reset_code(unsigned char);
int /*<<< orphan*/ restart_code(unsigned char);
void rose_dump(unsigned char *data, int length, int hexdump) {
  unsigned int len, hlen;
  unsigned int lci = ((unsigned)(data[0] & 0x0F) << 8) + data[1];
  lprintf(11, "X.25: LCI %3.3X : ", lci);
  switch (data[2]) {
  case 0x0B:
    len = 4;
    hlen = (((data[3] >> 4) & 0x0F) + 1) / 2;
    hlen += (((data[3] >> 0) & 0x0F) + 1) / 2;
    len += hlen;
    data += len;
    length -= len;
    lprintf(11, "CALL REQUEST - ");
    if (length) {
      unsigned int flen = data[0] + 1;
      facility(data, length);
      length -= flen;
      data += flen;
      if (length > 0)
        data_dump(data, length, 1);
    } else {
      lprintf(11, "\n");
    }
    return;
  case 0x0F:
    lprintf(11, "CALL ACCEPTED\n");
    return;
  case 0x13:
    lprintf(11, "CLEAR REQUEST - Cause %s - Diag %d\n", clear_code(data[3]),
            data[4]);
    if (length > 6) {
      facility(data + 6, length - 6);
    }
    return;
  case 0x17:
    lprintf(11, "CLEAR CONFIRMATION\n");
    return;
  case 0xF1:
    lprintf(11, "DIAGNOSTIC - Diag %d\n", data[3]);
    return;
  case 0x23:
    lprintf(11, "INTERRUPT\n");
    data_dump(data + 3, length - 3, hexdump);
    return;
  case 0x27:
    lprintf(11, "INTERRUPT CONFIRMATION\n");
    return;
  case 0x1B:
    lprintf(11, "RESET REQUEST - Cause %s - Diag %d\n", reset_code(data[3]),
            data[4]);
    return;
  case 0x1F:
    lprintf(11, "RESET CONFIRMATION\n");
    return;
  case 0xFB:
    lprintf(11, "RESTART REQUEST - Cause %s - Diag %d\n", restart_code(data[3]),
            data[4]);
    return;
  case 0xFF:
    lprintf(11, "RESTART CONFIRMATION\n");
    return;
  case 0xF3:
    lprintf(11, "REGISTRATION REQUEST\n");
    return;
  case 0xF7:
    lprintf(11, "REGISTRATION CONFIRMATION\n");
    return;
  }
  if ((data[2] & 0x01) == 0x00) {
    lprintf(11, "DATA R%d S%d %s%s%s", (data[2] >> 5) & 0x07,
            (data[2] >> 1) & 0x07, (data[0] & 0x80) ? "Q" : "",
            (data[0] & 0x40) ? "D" : "", (data[2] & 0x10) ? "M" : "");
    if ((length >= 5) && (data[0] & 0x80) && (data[3] == 0x7f)) {
      int pid = data[4];
      data += 5;
      length -= 5;
      switch (pid) {
      case 0x08:
        lprintf(11, " len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      case 0xCD:
        lprintf(11, " pid=ARP len %d\n", length - 5);
        arp_dump(data, length);
        break;
      case 0xCF:
        lprintf(11, " pid=NET/ROM len %d\n", length - 5);
        netrom_dump(data, length, hexdump, 0);
        break;
      case 0xCC:
        lprintf(11, " pid=IP len %d\n", length - 5);
        ip_dump(data, length, hexdump);
        break;
      case 0x01:
        lprintf(11, " pid=X.25 len %d\n", length - 5);
        rose_dump(data, length, hexdump);
        break;
      case 0xC3:
        lprintf(11, " pid=TEXNET len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      case 0xCE:
        lprintf(11, " pid=FLEXNET len %d\n", length - 5);
        flexnet_dump(data, length, hexdump);
        break;
      case 0xF0:
        lprintf(11, " pid=Text len %d\n", length - 5);
        data_dump(data, length, hexdump);
        break;
      default:
        lprintf(11, " pid=0x%x len %d\n", pid, length - 5);
        data_dump(data, length, hexdump);
        break;
      }
    } else {
      lprintf(11, " len %d\n", length - 3);
      data_dump(data + 3, length - 3, hexdump);
    }
    return;
  }
  switch (data[2] & 0x1F) {
  case 0x01:
    lprintf(11, "RR R%d\n", (data[2] >> 5) & 0x07);
    return;
  case 0x05:
    lprintf(11, "RNR R%d\n", (data[2] >> 5) & 0x07);
    return;
  case 0x09:
    lprintf(11, "REJ R%d\n", (data[2] >> 5) & 0x07);
    return;
  }
  lprintf(11, "UNKNOWN\n");
  data_dump(data, length, 1);
}


x86 assembly (clang, -O0):
<rose_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%eax
and    $0xf,%eax
shl    $0x8,%eax
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
lea    0xe1e(%rip),%rsi
xor    %eax,%eax
mov    $0xb,%edi
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,-0x28(%rbp)
sub    $0xb,%eax
je     12dd <rose_dump+0x12d>
jmp    1207 <rose_dump+0x57>
mov    -0x28(%rbp),%eax
sub    $0xf,%eax
je     13cc <rose_dump+0x21c>
jmp    1218 <rose_dump+0x68>
mov    -0x28(%rbp),%eax
sub    $0x13,%eax
je     13e4 <rose_dump+0x234>
jmp    1229 <rose_dump+0x79>
mov    -0x28(%rbp),%eax
sub    $0x17,%eax
je     1430 <rose_dump+0x280>
jmp    123a <rose_dump+0x8a>
mov    -0x28(%rbp),%eax
sub    $0x1b,%eax
je     14ae <rose_dump+0x2fe>
jmp    124b <rose_dump+0x9b>
mov    -0x28(%rbp),%eax
sub    $0x1f,%eax
je     14dd <rose_dump+0x32d>
jmp    125c <rose_dump+0xac>
mov    -0x28(%rbp),%eax
sub    $0x23,%eax
je     1468 <rose_dump+0x2b8>
jmp    126d <rose_dump+0xbd>
mov    -0x28(%rbp),%eax
sub    $0x27,%eax
je     1496 <rose_dump+0x2e6>
jmp    127e <rose_dump+0xce>
mov    -0x28(%rbp),%eax
sub    $0xf1,%eax
je     1448 <rose_dump+0x298>
jmp    1291 <rose_dump+0xe1>
mov    -0x28(%rbp),%eax
sub    $0xf3,%eax
je     153c <rose_dump+0x38c>
jmp    12a4 <rose_dump+0xf4>
mov    -0x28(%rbp),%eax
sub    $0xf7,%eax
je     1554 <rose_dump+0x3a4>
jmp    12b7 <rose_dump+0x107>
mov    -0x28(%rbp),%eax
sub    $0xfb,%eax
je     14f5 <rose_dump+0x345>
jmp    12ca <rose_dump+0x11a>
mov    -0x28(%rbp),%eax
sub    $0xff,%eax
je     1524 <rose_dump+0x374>
jmp    156c <rose_dump+0x3bc>
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
sar    $0x4,%eax
and    $0xf,%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
sar    $0x0,%eax
and    $0xf,%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0xb,%edi
lea    0xcc4(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
cmpl   $0x0,-0xc(%rbp)
je     13b4 <rose_dump+0x204>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1090 <facility@plt>
mov    -0x20(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    13af <rose_dump+0x1ff>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1040 <data_dump@plt>
jmp    13c7 <rose_dump+0x217>
mov    $0xb,%edi
lea    0xc70(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xc4b(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edi
call   1050 <clear_code@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%ecx
mov    $0xb,%edi
lea    0xc2b(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
cmpl   $0x6,-0xc(%rbp)
jle    142b <rose_dump+0x27b>
mov    -0x8(%rbp),%rdi
add    $0x6,%rdi
mov    -0xc(%rbp),%esi
sub    $0x6,%esi
call   1090 <facility@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xc1a(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edx
mov    $0xb,%edi
lea    0xc0e(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xc0c(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x3,%rdi
mov    -0xc(%rbp),%esi
sub    $0x3,%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xbe9(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edi
call   10d0 <reset_code@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%ecx
mov    $0xb,%edi
lea    0xbd2(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xbde(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edi
call   1070 <restart_code@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%ecx
mov    $0xb,%edi
lea    0xbc3(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xbd1(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xbcf(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0xbcd(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    18c6 <rose_dump+0x716>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
sar    $0x5,%edx
and    $0x7,%edx
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%ecx
sar    $0x1,%ecx
and    $0x7,%ecx
mov    -0x8(%rbp),%rax
movzbl (%rax),%esi
and    $0x80,%esi
lea    0xa81(%rip),%r8
lea    0xba5(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
mov    -0x8(%rbp),%rax
movzbl (%rax),%esi
and    $0x40,%esi
lea    0xa62(%rip),%r9
lea    0xb88(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r9
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edi
and    $0x10,%edi
lea    0xa42(%rip),%rax
lea    0xb6a(%rip),%rsi
cmp    $0x0,%edi
cmovne %rsi,%rax
mov    $0xb,%edi
lea    0xb3f(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   10c0 <lprintf@plt>
cmpl   $0x5,-0xc(%rbp)
jl     1892 <rose_dump+0x6e2>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1892 <rose_dump+0x6e2>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x7f,%eax
jne    1892 <rose_dump+0x6e2>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,-0xc(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x1,%eax
je     17ae <rose_dump+0x5fe>
jmp    1678 <rose_dump+0x4c8>
mov    -0x2c(%rbp),%eax
sub    $0x8,%eax
je     16fb <rose_dump+0x54b>
jmp    1689 <rose_dump+0x4d9>
mov    -0x2c(%rbp),%eax
sub    $0xc3,%eax
je     17db <rose_dump+0x62b>
jmp    169c <rose_dump+0x4ec>
mov    -0x2c(%rbp),%eax
sub    $0xcc,%eax
je     1781 <rose_dump+0x5d1>
jmp    16af <rose_dump+0x4ff>
mov    -0x2c(%rbp),%eax
sub    $0xcd,%eax
je     1728 <rose_dump+0x578>
jmp    16c2 <rose_dump+0x512>
mov    -0x2c(%rbp),%eax
sub    $0xce,%eax
je     1808 <rose_dump+0x658>
jmp    16d5 <rose_dump+0x525>
mov    -0x2c(%rbp),%eax
sub    $0xcf,%eax
je     1752 <rose_dump+0x5a2>
jmp    16e8 <rose_dump+0x538>
mov    -0x2c(%rbp),%eax
sub    $0xf0,%eax
je     1835 <rose_dump+0x685>
jmp    1862 <rose_dump+0x6b2>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0xa94(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0xa28(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <arp_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0xa0f(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %ecx,%ecx
call   10a0 <netrom_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0x9f5(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   10b0 <ip_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0x9d8(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1080 <rose_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0x9bd(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0x9a4(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1060 <flexnet_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0xc(%rbp),%edx
sub    $0x5,%edx
mov    $0xb,%edi
lea    0x98c(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    188d <rose_dump+0x6dd>
mov    -0x24(%rbp),%edx
mov    -0xc(%rbp),%ecx
sub    $0x5,%ecx
mov    $0xb,%edi
lea    0x96e(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    18c1 <rose_dump+0x711>
mov    -0xc(%rbp),%edx
sub    $0x3,%edx
mov    $0xb,%edi
lea    0x8fd(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x3,%rdi
mov    -0xc(%rbp),%esi
sub    $0x3,%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
and    $0x1f,%eax
mov    %eax,-0x30(%rbp)
sub    $0x1,%eax
je     1904 <rose_dump+0x754>
jmp    18e2 <rose_dump+0x732>
mov    -0x30(%rbp),%eax
sub    $0x5,%eax
je     192a <rose_dump+0x77a>
jmp    18f3 <rose_dump+0x743>
mov    -0x30(%rbp),%eax
sub    $0x9,%eax
je     1950 <rose_dump+0x7a0>
jmp    1976 <rose_dump+0x7c6>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
sar    $0x5,%edx
and    $0x7,%edx
mov    $0xb,%edi
lea    0x8d9(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
sar    $0x5,%edx
and    $0x7,%edx
mov    $0xb,%edi
lea    0x8bb(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
sar    $0x5,%edx
and    $0x7,%edx
mov    $0xb,%edi
lea    0x89e(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
jmp    199a <rose_dump+0x7ea>
mov    $0xb,%edi
lea    0x88f(%rip),%rsi
mov    $0x0,%al
call   10c0 <lprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1040 <data_dump@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rose_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,0x18(%rsp)
mov    %rdi,%rbx
lea    0xfcc(%rip),%r12
lea    0xff6(%rip),%r13
lea    0xe36(%rip),%r14
xor    %r15d,%r15d
mov    %rsi,0x10(%rsp)
mov    %esi,%ebp
movzbl (%rbx,%r15,1),%eax
and    $0xf,%eax
shl    $0x8,%eax
movzbl 0x1(%rbx,%r15,1),%edx
or     %eax,%edx
mov    $0xb,%edi
mov    %r12,%rsi
xor    %eax,%eax
call   10b0 <lprintf@plt>
movzbl 0x2(%rbx,%r15,1),%edx
lea    0xf(%rdx),%eax
ror    %al
cmp    $0x1b,%al
ja     1211 <rose_dump+0x71>
movzbl %al,%eax
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %edx,%eax
test   $0x1,%dl
jne    14b5 <rose_dump+0x315>
shr    $0x5,%eax
mov    %edx,%ecx
shr    %ecx
and    $0x7,%ecx
movzbl (%rbx,%r15,1),%esi
test   $0x80,%sil
lea    0x10ae(%rip),%r8
cmove  %r13,%r8
test   $0x40,%sil
lea    0x10a1(%rip),%r9
cmove  %r13,%r9
test   $0x10,%dl
lea    0x1095(%rip),%rdx
cmove  %r13,%rdx
mov    %rdx,(%rsp)
mov    $0xb,%edi
lea    0x1069(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
cmp    $0x5,%ebp
jl     12de <rose_dump+0x13e>
cmpb   $0x0,(%rbx,%r15,1)
jns    12de <rose_dump+0x13e>
cmpb   $0x7f,0x3(%rbx,%r15,1)
jne    12de <rose_dump+0x13e>
movzbl 0x4(%rbx,%r15,1),%edx
cmp    $0x1,%edx
jne    12b1 <rose_dump+0x111>
lea    -0xa(%rbp),%edx
mov    $0xb,%edi
lea    0x1082(%rip),%rsi
xor    %eax,%eax
call   10b0 <lprintf@plt>
add    $0x5,%r15
add    $0xfffffffb,%ebp
jmp    11d4 <rose_dump+0x34>
lea    0x3d(%rdx),%eax
cmp    $0x45,%al
ja     160e <rose_dump+0x46e>
movzbl %al,%eax
lea    0xdaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xfffffff6,%ebp
lea    0x1059(%rip),%rsi
jmp    15fe <rose_dump+0x45e>
mov    0x10(%rsp),%rbp
sub    %r15d,%ebp
add    $0xfffffffd,%ebp
lea    0x1039(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x3,%rdi
mov    %ebp,%esi
jmp    1639 <rose_dump+0x499>
movzbl 0x3(%rbx,%r15,1),%edx
lea    0xed8(%rip),%rsi
mov    $0xb,%edi
jmp    16dd <rose_dump+0x53d>
lea    0xf74(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
lea    0xf7e(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
movzbl 0x3(%rbx,%r15,1),%edi
call   1070 <restart_code@plt>
movzbl 0x4(%rbx,%r15,1),%ecx
lea    0xf0f(%rip),%rsi
jmp    1444 <rose_dump+0x2a4>
lea    0xf29(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
movzbl 0x3(%rbx,%r15,1),%r12d
mov    %r12,%r14
shr    $0x4,%r14
add    $0x1,%r14
shr    %r14
and    $0xf,%r12d
add    $0x1,%r12
shr    %r12
lea    (%r12,%r14,1),%eax
mov    0x10(%rsp),%r13
mov    %r13d,%ebp
mov    %rax,0x18(%rsp)
sub    %eax,%ebp
add    $0xfffffffc,%ebp
lea    0xdfa(%rip),%rsi
mov    $0xb,%edi
xor    %eax,%eax
call   10b0 <lprintf@plt>
cmp    %r15d,%ebp
jne    1650 <rose_dump+0x4b0>
lea    0xdfb(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
lea    0xde2(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
movzbl 0x3(%rbx,%r15,1),%edi
call   1050 <clear_code@plt>
movzbl 0x4(%rbx,%r15,1),%ecx
lea    0xdd4(%rip),%rsi
mov    $0xb,%edi
mov    %eax,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
cmp    $0x7,%ebp
mov    0x10(%rsp),%rsi
jl     16b3 <rose_dump+0x513>
lea    (%rbx,%r15,1),%rdi
add    $0x6,%rdi
sub    %r15d,%esi
add    $0xfffffffa,%esi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <facility@plt>
lea    0xdb4(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
movzbl 0x3(%rbx,%r15,1),%edi
call   10c0 <reset_code@plt>
movzbl 0x4(%rbx,%r15,1),%ecx
lea    0xde7(%rip),%rsi
mov    $0xb,%edi
mov    %eax,%edx
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <lprintf@plt>
lea    0xde8(%rip),%rsi
jmp    149b <rose_dump+0x2fb>
lea    0xd98(%rip),%rsi
mov    $0xb,%edi
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x3,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffd,%esi
jmp    1639 <rose_dump+0x499>
lea    0xd78(%rip),%rsi
mov    $0xb,%edi
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <lprintf@plt>
and    $0x1f,%eax
cmp    $0x9,%eax
je     16c2 <rose_dump+0x522>
cmp    $0x5,%eax
je     16ce <rose_dump+0x52e>
cmp    $0x1,%eax
jne    16f2 <rose_dump+0x552>
shr    $0x5,%edx
lea    0xea2(%rip),%rsi
jmp    16d8 <rose_dump+0x538>
add    $0xfffffff6,%ebp
lea    0xe24(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x5,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffb,%esi
mov    0x18(%rsp),%edx
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10a0 <ip_dump@plt>
add    $0xfffffff6,%ebp
lea    0xdbc(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x5,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffb,%esi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <arp_dump@plt>
add    $0xfffffff6,%ebp
lea    0xdda(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x5,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffb,%esi
mov    0x18(%rsp),%edx
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <flexnet_dump@plt>
add    $0xfffffff6,%ebp
lea    0xd4d(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x5,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffb,%esi
mov    0x18(%rsp),%edx
xor    %ecx,%ecx
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <netrom_dump@plt>
add    $0xfffffff6,%ebp
lea    0xd69(%rip),%rsi
jmp    15fe <rose_dump+0x45e>
add    $0xfffffff6,%ebp
lea    0xd2b(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   10b0 <lprintf@plt>
jmp    1626 <rose_dump+0x486>
add    $0xfffffff6,%ebp
lea    0xd55(%rip),%rsi
mov    $0xb,%edi
mov    %ebp,%ecx
xor    %eax,%eax
call   10b0 <lprintf@plt>
lea    (%rbx,%r15,1),%rdi
add    $0x5,%rdi
mov    0x10(%rsp),%rsi
sub    %r15d,%esi
add    $0xfffffffb,%esi
mov    0x18(%rsp),%edx
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <data_dump@plt>
lea    (%r12,%r14,1),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x4,%rdi
mov    0x18(%rsp),%rbp
mov    %ebp,%eax
neg    %eax
lea    -0x4(%r13),%esi
add    %rax,%rsi
sub    %r15,%rsi
movzbl (%rdi,%r15,1),%eax
mov    %rax,0x20(%rsp)
add    %r15,%rdi
call   1080 <facility@plt>
mov    0x20(%rsp),%rdi
add    %edi,%ebp
neg    %ebp
add    $0xfffffffb,%r13d
add    %rbp,%r13
sub    %r15,%r13
test   %r13d,%r13d
jle    16b3 <rose_dump+0x513>
lea    (%r12,%r14,1),%rax
add    $0x4,%rax
add    $0x1,%rdi
add    %rax,%rdi
add    %rbx,%rdi
add    %r15,%rdi
mov    %r13d,%esi
jmp    170d <rose_dump+0x56d>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
shr    $0x5,%edx
lea    0xcc4(%rip),%rsi
jmp    16d8 <rose_dump+0x538>
shr    $0x5,%edx
lea    0xcaf(%rip),%rsi
mov    $0xb,%edi
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <lprintf@plt>
add    %r15,%rbx
lea    0xc9d(%rip),%rsi
mov    $0xb,%edi
xor    %eax,%eax
call   10b0 <lprintf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
jmp    163d <rose_dump+0x49d>

LLVM IR (-O0):
@.str = [19 x i8] c"X.25: LCI %3.3X : \00"
@.str.1 = [16 x i8] c"CALL REQUEST - \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [15 x i8] c"CALL ACCEPTED\0A\00"
@.str.4 = [36 x i8] c"CLEAR REQUEST - Cause %s - Diag %d\0A\00"
@.str.5 = [20 x i8] c"CLEAR CONFIRMATION\0A\00"
@.str.6 = [22 x i8] c"DIAGNOSTIC - Diag %d\0A\00"
@.str.7 = [11 x i8] c"INTERRUPT\0A\00"
@.str.8 = [24 x i8] c"INTERRUPT CONFIRMATION\0A\00"
@.str.9 = [36 x i8] c"RESET REQUEST - Cause %s - Diag %d\0A\00"
@.str.10 = [20 x i8] c"RESET CONFIRMATION\0A\00"
@.str.11 = [38 x i8] c"RESTART REQUEST - Cause %s - Diag %d\0A\00"
@.str.12 = [22 x i8] c"RESTART CONFIRMATION\0A\00"
@.str.13 = [22 x i8] c"REGISTRATION REQUEST\0A\00"
@.str.14 = [27 x i8] c"REGISTRATION CONFIRMATION\0A\00"
@.str.15 = [20 x i8] c"DATA R%d S%d %s%s%s\00"
@.str.16 = [2 x i8] c"Q\00"
@.str.17 = [1 x i8] zeroinitializer
@.str.18 = [2 x i8] c"D\00"
@.str.19 = [2 x i8] c"M\00"
@.str.20 = [9 x i8] c" len %d\0A\00"
@.str.21 = [17 x i8] c" pid=ARP len %d\0A\00"
@.str.22 = [21 x i8] c" pid=NET/ROM len %d\0A\00"
@.str.23 = [16 x i8] c" pid=IP len %d\0A\00"
@.str.24 = [18 x i8] c" pid=X.25 len %d\0A\00"
@.str.25 = [20 x i8] c" pid=TEXNET len %d\0A\00"
@.str.26 = [21 x i8] c" pid=FLEXNET len %d\0A\00"
@.str.27 = [18 x i8] c" pid=Text len %d\0A\00"
@.str.28 = [18 x i8] c" pid=0x%x len %d\0A\00"
@.str.29 = [8 x i8] c"RR R%d\0A\00"
@.str.30 = [9 x i8] c"RNR R%d\0A\00"
@.str.31 = [9 x i8] c"REJ R%d\0A\00"
@.str.32 = [9 x i8] c"UNKNOWN\0A\00"
define void @rose_dump(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = and i32 %15, 15
%17 = shl i32 %16, 8
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = add i32 %17, %21
store i32 %22, i32* %9
%23 = load i32, i32* %9
%24 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i64 2
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
switch i32 %28, label %154 [
i32 11, label %29
i32 15, label %87
i32 19, label %89
i32 23, label %108
i32 241, label %110
i32 35, label %116
i32 39, label %124
i32 27, label %126
i32 31, label %136
i32 251, label %138
i32 255, label %148
i32 243, label %150
i32 247, label %152
]
29: ; preds = %3
store i32 4, i32* %7
%30 = load i8*, i8** %4
%31 = getelementptr inbounds i8, i8* %30, i64 3
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = ashr i32 %33, 4
%35 = and i32 %34, 15
%36 = add nsw i32 %35, 1
%37 = sdiv i32 %36, 2
store i32 %37, i32* %8
%38 = load i8*, i8** %4
%39 = getelementptr inbounds i8, i8* %38, i64 3
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = ashr i32 %41, 0
%43 = and i32 %42, 15
%44 = add nsw i32 %43, 1
%45 = sdiv i32 %44, 2
%46 = load i32, i32* %8
%47 = add i32 %46, %45
store i32 %47, i32* %8
%48 = load i32, i32* %8
%49 = load i32, i32* %7
%50 = add i32 %49, %48
store i32 %50, i32* %7
%51 = load i32, i32* %7
%52 = load i8*, i8** %4
%53 = zext i32 %51 to i64
%54 = getelementptr inbounds i8, i8* %52, i64 %53
store i8* %54, i8** %4
%55 = load i32, i32* %7
%56 = load i32, i32* %5
%57 = sub i32 %56, %55
store i32 %57, i32* %5
%58 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%59 = load i32, i32* %5
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %84
61: ; preds = %29
%62 = load i8*, i8** %4
%63 = getelementptr inbounds i8, i8* %62, i64 0
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = add nsw i32 %65, 1
store i32 %66, i32* %10
%67 = load i8*, i8** %4
%68 = load i32, i32* %5
%69 = call i32 @facility(i8* %67, i32 %68)
%70 = load i32, i32* %10
%71 = load i32, i32* %5
%72 = sub i32 %71, %70
store i32 %72, i32* %5
%73 = load i32, i32* %10
%74 = load i8*, i8** %4
%75 = zext i32 %73 to i64
%76 = getelementptr inbounds i8, i8* %74, i64 %75
store i8* %76, i8** %4
%77 = load i32, i32* %5
%78 = icmp sgt i32 %77, 0
br i1 %78, label %79, label %83
79: ; preds = %61
%80 = load i8*, i8** %4
%81 = load i32, i32* %5
%82 = call i32 @data_dump(i8* %80, i32 %81, i32 1)
br label %83
83: ; preds = %79, %61
br label %86
84: ; preds = %29
%85 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %86
86: ; preds = %84, %83
br label %342
87: ; preds = %3
%88 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %342
89: ; preds = %3
%90 = load i8*, i8** %4
%91 = getelementptr inbounds i8, i8* %90, i64 3
%92 = load i8, i8* %91
%93 = call i32 @clear_code(i8 zeroext %92)
%94 = load i8*, i8** %4
%95 = getelementptr inbounds i8, i8* %94, i64 4
%96 = load i8, i8* %95
%97 = zext i8 %96 to i32
%98 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %93, i32 %97)
%99 = load i32, i32* %5
%100 = icmp sgt i32 %99, 6
br i1 %100, label %101, label %107
101: ; preds = %89
%102 = load i8*, i8** %4
%103 = getelementptr inbounds i8, i8* %102, i64 6
%104 = load i32, i32* %5
%105 = sub nsw i32 %104, 6
%106 = call i32 @facility(i8* %103, i32 %105)
br label %107
107: ; preds = %101, %89
br label %342
108: ; preds = %3
%109 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %342
110: ; preds = %3
%111 = load i8*, i8** %4
%112 = getelementptr inbounds i8, i8* %111, i64 3
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %114)
br label %342
116: ; preds = %3
%117 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%118 = load i8*, i8** %4
%119 = getelementptr inbounds i8, i8* %118, i64 3
%120 = load i32, i32* %5
%121 = sub nsw i32 %120, 3
%122 = load i32, i32* %6
%123 = call i32 @data_dump(i8* %119, i32 %121, i32 %122)
br label %342
124: ; preds = %3
%125 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %342
126: ; preds = %3
%127 = load i8*, i8** %4
%128 = getelementptr inbounds i8, i8* %127, i64 3
%129 = load i8, i8* %128
%130 = call i32 @reset_code(i8 zeroext %129)
%131 = load i8*, i8** %4
%132 = getelementptr inbounds i8, i8* %131, i64 4
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %130, i32 %134)
br label %342
136: ; preds = %3
%137 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
br label %342
138: ; preds = %3
%139 = load i8*, i8** %4
%140 = getelementptr inbounds i8, i8* %139, i64 3
%141 = load i8, i8* %140
%142 = call i32 @restart_code(i8 zeroext %141)
%143 = load i8*, i8** %4
%144 = getelementptr inbounds i8, i8* %143, i64 4
%145 = load i8, i8* %144
%146 = zext i8 %145 to i32
%147 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 %142, i32 %146)
br label %342
148: ; preds = %3
%149 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %342
150: ; preds = %3
%151 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %342
152: ; preds = %3
%153 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
br label %342
154: ; preds = %3
%155 = load i8*, i8** %4
%156 = getelementptr inbounds i8, i8* %155, i64 2
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
%159 = and i32 %158, 1
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %307
161: ; preds = %154
%162 = load i8*, i8** %4
%163 = getelementptr inbounds i8, i8* %162, i64 2
%164 = load i8, i8* %163
%165 = zext i8 %164 to i32
%166 = ashr i32 %165, 5
%167 = and i32 %166, 7
%168 = load i8*, i8** %4
%169 = getelementptr inbounds i8, i8* %168, i64 2
%170 = load i8, i8* %169
%171 = zext i8 %170 to i32
%172 = ashr i32 %171, 1
%173 = and i32 %172, 7
%174 = load i8*, i8** %4
%175 = getelementptr inbounds i8, i8* %174, i64 0
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = and i32 %177, 128
%179 = icmp ne i32 %178, 0
%180 = zext i1 %179 to i64
%181 = select i1 %179, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0)
%182 = load i8*, i8** %4
%183 = getelementptr inbounds i8, i8* %182, i64 0
%184 = load i8, i8* %183
%185 = zext i8 %184 to i32
%186 = and i32 %185, 64
%187 = icmp ne i32 %186, 0
%188 = zext i1 %187 to i64
%189 = select i1 %187, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0)
%190 = load i8*, i8** %4
%191 = getelementptr inbounds i8, i8* %190, i64 2
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
%194 = and i32 %193, 16
%195 = icmp ne i32 %194, 0
%196 = zext i1 %195 to i64
%197 = select i1 %195, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0)
%198 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %167, i32 %173, i8* %181, i8* %189, i8* %197)
%199 = load i32, i32* %5
%200 = icmp sge i32 %199, 5
br i1 %200, label %201, label %296
201: ; preds = %161
%202 = load i8*, i8** %4
%203 = getelementptr inbounds i8, i8* %202, i64 0
%204 = load i8, i8* %203
%205 = zext i8 %204 to i32
%206 = and i32 %205, 128
%207 = icmp ne i32 %206, 0
br i1 %207, label %208, label %296
208: ; preds = %201
%209 = load i8*, i8** %4
%210 = getelementptr inbounds i8, i8* %209, i64 3
%211 = load i8, i8* %210
%212 = zext i8 %211 to i32
%213 = icmp eq i32 %212, 127
br i1 %213, label %214, label %296
214: ; preds = %208
%215 = load i8*, i8** %4
%216 = getelementptr inbounds i8, i8* %215, i64 4
%217 = load i8, i8* %216
%218 = zext i8 %217 to i32
store i32 %218, i32* %11
%219 = load i8*, i8** %4
%220 = getelementptr inbounds i8, i8* %219, i64 5
store i8* %220, i8** %4
%221 = load i32, i32* %5
%222 = sub nsw i32 %221, 5
store i32 %222, i32* %5
%223 = load i32, i32* %11
switch i32 %223, label %286 [
i32 8, label %224
i32 205, label %232
i32 207, label %239
i32 204, label %247
i32 1, label %255
i32 195, label %262
i32 206, label %270
i32 240, label %278
]
224: ; preds = %214
%225 = load i32, i32* %5
%226 = sub nsw i32 %225, 5
%227 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 %226)
%228 = load i8*, i8** %4
%229 = load i32, i32* %5
%230 = load i32, i32* %6
%231 = call i32 @data_dump(i8* %228, i32 %229, i32 %230)
br label %295
232: ; preds = %214
%233 = load i32, i32* %5
%234 = sub nsw i32 %233, 5
%235 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i32 %234)
%236 = load i8*, i8** %4
%237 = load i32, i32* %5
%238 = call i32 @arp_dump(i8* %236, i32 %237)
br label %295
239: ; preds = %214
%240 = load i32, i32* %5
%241 = sub nsw i32 %240, 5
%242 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0), i32 %241)
%243 = load i8*, i8** %4
%244 = load i32, i32* %5
%245 = load i32, i32* %6
%246 = call i32 @netrom_dump(i8* %243, i32 %244, i32 %245, i32 0)
br label %295
247: ; preds = %214
%248 = load i32, i32* %5
%249 = sub nsw i32 %248, 5
%250 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i32 %249)
%251 = load i8*, i8** %4
%252 = load i32, i32* %5
%253 = load i32, i32* %6
%254 = call i32 @ip_dump(i8* %251, i32 %252, i32 %253)
br label %295
255: ; preds = %214
%256 = load i32, i32* %5
%257 = sub nsw i32 %256, 5
%258 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0), i32 %257)
%259 = load i8*, i8** %4
%260 = load i32, i32* %5
%261 = load i32, i32* %6
br label %295
262: ; preds = %214
%263 = load i32, i32* %5
%264 = sub nsw i32 %263, 5
%265 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.25, i64 0, i64 0), i32 %264)
%266 = load i8*, i8** %4
%267 = load i32, i32* %5
%268 = load i32, i32* %6
%269 = call i32 @data_dump(i8* %266, i32 %267, i32 %268)
br label %295
270: ; preds = %214
%271 = load i32, i32* %5
%272 = sub nsw i32 %271, 5
%273 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0), i32 %272)
%274 = load i8*, i8** %4
%275 = load i32, i32* %5
%276 = load i32, i32* %6
%277 = call i32 @flexnet_dump(i8* %274, i32 %275, i32 %276)
br label %295
278: ; preds = %214
%279 = load i32, i32* %5
%280 = sub nsw i32 %279, 5
%281 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), i32 %280)
%282 = load i8*, i8** %4
%283 = load i32, i32* %5
%284 = load i32, i32* %6
%285 = call i32 @data_dump(i8* %282, i32 %283, i32 %284)
br label %295
286: ; preds = %214
%287 = load i32, i32* %11
%288 = load i32, i32* %5
%289 = sub nsw i32 %288, 5
%290 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), i32 %287, i32 %289)
%291 = load i8*, i8** %4
%292 = load i32, i32* %5
%293 = load i32, i32* %6
%294 = call i32 @data_dump(i8* %291, i32 %292, i32 %293)
br label %295
295: ; preds = %286, %278, %270, %262, %255, %247, %239, %232, %224
br label %306
296: ; preds = %208, %201, %161
%297 = load i32, i32* %5
%298 = sub nsw i32 %297, 3
%299 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 %298)
%300 = load i8*, i8** %4
%301 = getelementptr inbounds i8, i8* %300, i64 3
%302 = load i32, i32* %5
%303 = sub nsw i32 %302, 3
%304 = load i32, i32* %6
%305 = call i32 @data_dump(i8* %301, i32 %303, i32 %304)
br label %306
306: ; preds = %296, %295
br label %342
307: ; preds = %154
%308 = load i8*, i8** %4
%309 = getelementptr inbounds i8, i8* %308, i64 2
%310 = load i8, i8* %309
%311 = zext i8 %310 to i32
%312 = and i32 %311, 31
switch i32 %312, label %337 [
i32 1, label %313
i32 5, label %321
i32 9, label %329
]
313: ; preds = %307
%314 = load i8*, i8** %4
%315 = getelementptr inbounds i8, i8* %314, i64 2
%316 = load i8, i8* %315
%317 = zext i8 %316 to i32
%318 = ashr i32 %317, 5
%319 = and i32 %318, 7
%320 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i64 0, i64 0), i32 %319)
br label %342
321: ; preds = %307
%322 = load i8*, i8** %4
%323 = getelementptr inbounds i8, i8* %322, i64 2
%324 = load i8, i8* %323
%325 = zext i8 %324 to i32
%326 = ashr i32 %325, 5
%327 = and i32 %326, 7
%328 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i32 %327)
br label %342
329: ; preds = %307
%330 = load i8*, i8** %4
%331 = getelementptr inbounds i8, i8* %330, i64 2
%332 = load i8, i8* %331
%333 = zext i8 %332 to i32
%334 = ashr i32 %333, 5
%335 = and i32 %334, 7
%336 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.31, i64 0, i64 0), i32 %335)
br label %342
337: ; preds = %307
%338 = call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0))
%339 = load i8*, i8** %4
%340 = load i32, i32* %5
%341 = call i32 @data_dump(i8* %339, i32 %340, i32 1)
br label %342
342: ; preds = %337, %329, %321, %313, %306, %152, %150, %148, %138, %136, %126, %124, %116, %110, %108, %107, %87, %86
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"X.25: LCI %3.3X : \00"
@.str.1 = [16 x i8] c"CALL REQUEST - \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [15 x i8] c"CALL ACCEPTED\0A\00"
@.str.4 = [36 x i8] c"CLEAR REQUEST - Cause %s - Diag %d\0A\00"
@.str.5 = [20 x i8] c"CLEAR CONFIRMATION\0A\00"
@.str.6 = [22 x i8] c"DIAGNOSTIC - Diag %d\0A\00"
@.str.7 = [11 x i8] c"INTERRUPT\0A\00"
@.str.8 = [24 x i8] c"INTERRUPT CONFIRMATION\0A\00"
@.str.9 = [36 x i8] c"RESET REQUEST - Cause %s - Diag %d\0A\00"
@.str.10 = [20 x i8] c"RESET CONFIRMATION\0A\00"
@.str.11 = [38 x i8] c"RESTART REQUEST - Cause %s - Diag %d\0A\00"
@.str.12 = [22 x i8] c"RESTART CONFIRMATION\0A\00"
@.str.13 = [22 x i8] c"REGISTRATION REQUEST\0A\00"
@.str.14 = [27 x i8] c"REGISTRATION CONFIRMATION\0A\00"
@.str.15 = [20 x i8] c"DATA R%d S%d %s%s%s\00"
@.str.16 = [2 x i8] c"Q\00"
@.str.17 = [1 x i8] zeroinitializer
@.str.18 = [2 x i8] c"D\00"
@.str.19 = [2 x i8] c"M\00"
@.str.20 = [9 x i8] c" len %d\0A\00"
@.str.21 = [17 x i8] c" pid=ARP len %d\0A\00"
@.str.22 = [21 x i8] c" pid=NET/ROM len %d\0A\00"
@.str.23 = [16 x i8] c" pid=IP len %d\0A\00"
@.str.24 = [18 x i8] c" pid=X.25 len %d\0A\00"
@.str.25 = [20 x i8] c" pid=TEXNET len %d\0A\00"
@.str.26 = [21 x i8] c" pid=FLEXNET len %d\0A\00"
@.str.27 = [18 x i8] c" pid=Text len %d\0A\00"
@.str.28 = [18 x i8] c" pid=0x%x len %d\0A\00"
@.str.29 = [8 x i8] c"RR R%d\0A\00"
@.str.30 = [9 x i8] c"RNR R%d\0A\00"
@.str.31 = [9 x i8] c"REJ R%d\0A\00"
@.str.32 = [9 x i8] c"UNKNOWN\0A\00"
define void @rose_dump(i8* %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %152, %3
%5 = phi i8* [ %0, %3 ], [ %134, %152 ]
%6 = phi i32 [ %1, %3 ], [ %135, %152 ]
%7 = load i8, i8* %5
%8 = and i8 %7, 15
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 8
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds i8, i8* %5, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = add i8 %17, 15
%20 = tail call i8 @llvm.fshl.i8(i8 %19, i8 %19, i8 7)
switch i8 %20, label %104 [
i8 13, label %21
i8 15, label %51
i8 17, label %53
i8 19, label %66
i8 0, label %68
i8 25, label %73
i8 27, label %78
i8 21, label %80
i8 23, label %88
i8 5, label %90
i8 7, label %98
i8 1, label %100
i8 3, label %102
]
21: ; preds = %4
%22 = getelementptr inbounds i8, i8* %5, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = lshr i32 %24, 4
%26 = add nuw nsw i32 %25, 1
%27 = lshr i32 %26, 1
%28 = and i32 %24, 15
%29 = add nuw nsw i32 %28, 1
%30 = lshr i32 %29, 1
%31 = add nuw nsw i32 %30, 4
%32 = add nuw nsw i32 %31, %27
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %5, i64 %33
%35 = sub i32 %6, %32
%36 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i32 %35, 0
br i1 %37, label %49, label %38
38: ; preds = %21
%39 = load i8, i8* %34
%40 = zext i8 %39 to i32
%41 = add nuw nsw i32 %40, 1
%42 = tail call i32 @facility(i8* %34, i32 %35)
%43 = sub i32 %35, %41
%44 = icmp sgt i32 %43, 0
br i1 %44, label %45, label %192
45: ; preds = %38
%46 = zext i32 %41 to i64
%47 = getelementptr inbounds i8, i8* %34, i64 %46
%48 = tail call i32 @data_dump(i8* %47, i32 %43, i32 1)
br label %192
49: ; preds = %21
%50 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %192
51: ; preds = %4
%52 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %192
53: ; preds = %4
%54 = getelementptr inbounds i8, i8* %5, i64 3
%55 = load i8, i8* %54
%56 = tail call i32 @clear_code(i8 zeroext %55)
%57 = getelementptr inbounds i8, i8* %5, i64 4
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %56, i32 %59)
%61 = icmp sgt i32 %6, 6
br i1 %61, label %62, label %192
62: ; preds = %53
%63 = getelementptr inbounds i8, i8* %5, i64 6
%64 = add nsw i32 %6, -6
%65 = tail call i32 @facility(i8* %63, i32 %64)
br label %192
66: ; preds = %4
%67 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %192
68: ; preds = %4
%69 = getelementptr inbounds i8, i8* %5, i64 3
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %71)
br label %192
73: ; preds = %4
%74 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%75 = getelementptr inbounds i8, i8* %5, i64 3
%76 = add nsw i32 %6, -3
%77 = tail call i32 @data_dump(i8* %75, i32 %76, i32 %2)
br label %192
78: ; preds = %4
%79 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %192
80: ; preds = %4
%81 = getelementptr inbounds i8, i8* %5, i64 3
%82 = load i8, i8* %81
%83 = tail call i32 @reset_code(i8 zeroext %82)
%84 = getelementptr inbounds i8, i8* %5, i64 4
%85 = load i8, i8* %84
%86 = zext i8 %85 to i32
%87 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %83, i32 %86)
br label %192
88: ; preds = %4
%89 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
br label %192
90: ; preds = %4
%91 = getelementptr inbounds i8, i8* %5, i64 3
%92 = load i8, i8* %91
%93 = tail call i32 @restart_code(i8 zeroext %92)
%94 = getelementptr inbounds i8, i8* %5, i64 4
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i32 %93, i32 %96)
br label %192
98: ; preds = %4
%99 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %192
100: ; preds = %4
%101 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
br label %192
102: ; preds = %4
%103 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
br label %192
104: ; preds = %4
%105 = and i32 %18, 1
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %177
107: ; preds = %104
%108 = lshr i32 %18, 5
%109 = lshr i32 %18, 1
%110 = and i32 %109, 7
%111 = load i8, i8* %5
%112 = zext i8 %111 to i32
%113 = and i32 %112, 128
%114 = icmp eq i32 %113, 0
%115 = select i1 %114, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0)
%116 = and i32 %112, 64
%117 = icmp eq i32 %116, 0
%118 = select i1 %117, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0)
%119 = and i32 %18, 16
%120 = icmp eq i32 %119, 0
%121 = select i1 %120, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0)
%122 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %108, i32 %110, i8* %115, i8* %118, i8* %121)
%123 = icmp sgt i32 %6, 4
br i1 %123, label %124, label %172
124: ; preds = %107
%125 = load i8, i8* %5
%126 = icmp sgt i8 %125, -1
br i1 %126, label %172, label %127
127: ; preds = %124
%128 = getelementptr inbounds i8, i8* %5, i64 3
%129 = load i8, i8* %128
%130 = icmp eq i8 %129, 127
br i1 %130, label %131, label %172
131: ; preds = %127
%132 = getelementptr inbounds i8, i8* %5, i64 4
%133 = load i8, i8* %132
%134 = getelementptr inbounds i8, i8* %5, i64 5
%135 = add nsw i32 %6, -5
switch i8 %133, label %167 [
i8 8, label %136
i8 -51, label %140
i8 -49, label %144
i8 -52, label %148
i8 1, label %152
i8 -61, label %155
i8 -50, label %159
i8 -16, label %163
]
136: ; preds = %131
%137 = add nsw i32 %6, -10
%138 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 %137)
%139 = tail call i32 @data_dump(i8* %134, i32 %135, i32 %2)
br label %192
140: ; preds = %131
%141 = add nsw i32 %6, -10
%142 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i32 %141)
%143 = tail call i32 @arp_dump(i8* %134, i32 %135)
br label %192
144: ; preds = %131
%145 = add nsw i32 %6, -10
%146 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.22, i64 0, i64 0), i32 %145)
%147 = tail call i32 @netrom_dump(i8* %134, i32 %135, i32 %2, i32 0)
br label %192
148: ; preds = %131
%149 = add nsw i32 %6, -10
%150 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i32 %149)
%151 = tail call i32 @ip_dump(i8* %134, i32 %135, i32 %2)
br label %192
152: ; preds = %131
%153 = add nsw i32 %6, -10
%154 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0), i32 %153)
br label %4
155: ; preds = %131
%156 = add nsw i32 %6, -10
%157 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.25, i64 0, i64 0), i32 %156)
%158 = tail call i32 @data_dump(i8* %134, i32 %135, i32 %2)
br label %192
159: ; preds = %131
%160 = add nsw i32 %6, -10
%161 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0), i32 %160)
%162 = tail call i32 @flexnet_dump(i8* %134, i32 %135, i32 %2)
br label %192
163: ; preds = %131
%164 = add nsw i32 %6, -10
%165 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), i32 %164)
%166 = tail call i32 @data_dump(i8* %134, i32 %135, i32 %2)
br label %192
167: ; preds = %131
%168 = zext i8 %133 to i32
%169 = add nsw i32 %6, -10
%170 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), i32 %168, i32 %169)
%171 = tail call i32 @data_dump(i8* %134, i32 %135, i32 %2)
br label %192
172: ; preds = %127, %124, %107
%173 = add nsw i32 %6, -3
%174 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 %173)
%175 = getelementptr inbounds i8, i8* %5, i64 3
%176 = tail call i32 @data_dump(i8* %175, i32 %173, i32 %2)
br label %192
177: ; preds = %104
%178 = zext i8 %17 to i32
%179 = and i32 %178, 31
switch i32 %179, label %189 [
i32 1, label %180
i32 5, label %183
i32 9, label %186
]
180: ; preds = %177
%181 = lshr i32 %178, 5
%182 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i64 0, i64 0), i32 %181)
br label %192
183: ; preds = %177
%184 = lshr i32 %178, 5
%185 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i32 %184)
br label %192
186: ; preds = %177
%187 = lshr i32 %178, 5
%188 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.31, i64 0, i64 0), i32 %187)
br label %192
189: ; preds = %177
%190 = tail call i32 (i32, i8*, ...) @lprintf(i32 11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0))
%191 = tail call i32 @data_dump(i8* %5, i32 %6, i32 1)
br label %192
192: ; preds = %172, %167, %163, %159, %155, %148, %144, %140, %136, %53, %62, %49, %45, %38, %189, %186, %183, %180, %102, %100, %98, %90, %88, %80, %78, %73, %68, %66, %51
ret void
}