#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*/ data_dump(unsigned char *, int, int);
int /*<<< orphan*/ ip_dump(unsigned char *, int, int);
int /*<<< orphan*/ lprintf(int, char *, ...);
int /*<<< orphan*/ memcpy(char *, unsigned char *, int);
int /*<<< orphan*/ netrom_flags(unsigned char);
int /*<<< orphan*/ netrom_inp_dump(unsigned char *, int);
unsigned char pax25(char *, unsigned char *);
void netrom_dump(unsigned char *data, int length, int hexdump, int type) {
  char tmp[15];
  int i;
  if (data[0] == 0xFF) {
    if (type != 0x03) {
      netrom_inp_dump(data, length);
      return;
    }
    memcpy(tmp, data + 1, 6);
    tmp[6] = '\0';
    lprintf(7, "NET/ROM Routing: %s\n", tmp);
    data += (6 + 1);
    length -= (6 + 1);
    for (i = 0; i < 11; i++) {
      if (length < 7)
        break;
      lprintf(5, "        %12s", pax25(tmp, data));
      memcpy(tmp, data + 7, 6);
      tmp[6] = '\0';
      lprintf(5, "%8s", tmp);
      lprintf(5, "    %12s", pax25(tmp, data + 7 + 6));
      lprintf(5, "    %3u\n", data[7 + 6 + 7]);
      data += (7 + 6 + 7 + 1);
      length -= (7 + 6 + 7 + 1);
    }
    return;
  }
  if (data[0] == 0xFE) {
    memcpy(tmp, data + 1, 6);
    tmp[6] = '\0';
    lprintf(7, "NET/ROM Poll: %s\n", tmp);
    return;
  }
  lprintf(7, "NET/ROM: ");
  lprintf(8, "%s->", pax25(tmp, data));
  lprintf(8, "%s", pax25(tmp, data + 7));
  lprintf(7, " ttl %d\n", data[7 + 7]);
  data += (7 + 7 + 1);
  length -= (7 + 7 + 1);
  switch (data[4] & 0x0F) {
  case 0:
    if (data[0] == 0x0C && data[1] == 0x0C) {
      ip_dump(data + 5, length - 5, hexdump);
      return;
    } else {
      lprintf(7, "         protocol family %x, proto %x", data[0], data[1]);
    }
    break;
  case 1:
    lprintf(7, "         conn rqst: my ckt %02X/%02X", data[0], data[1]);
    lprintf(7, " wnd %d", data[5]);
    lprintf(8, " %s", pax25(tmp, data + 6));
    lprintf(8, "@%s", pax25(tmp, data + 6 + 7));
    data += 7 + 7 + 6;
    length -= 7 + 7 + 6;
    if (length > 0)
      lprintf(7, " timeout %d", data[1] * 256 + data[0]);
    lprintf(7, "\n");
    break;
  case 2:
    lprintf(7, "         conn ack: ur ckt %02X/%02X my ckt %02X/%02X", data[0],
            data[1], data[2], data[3]);
    lprintf(7, " wnd %d", data[5]);
    netrom_flags(data[4]);
    break;
  case 3:
    lprintf(7, "         disc: ur ckt %02X/%02X\n", data[0], data[1]);
    break;
  case 4:
    lprintf(7, "         disc ack: ur ckt %02X/%02X\n", data[0], data[1]);
    break;
  case 5:
    lprintf(7, "         info: ur ckt %02X/%02X", data[0], data[1]);
    lprintf(7, " txseq %d rxseq %d", data[2], data[3]);
    netrom_flags(data[4]);
    data_dump(data + 5, length - 5, hexdump);
    break;
  case 6:
    lprintf(7, "         info ack: ur ckt %02X/%02X", data[0], data[1]);
    lprintf(7, " rxseq %d", data[3]);
    netrom_flags(data[4]);
    break;
  default:
    lprintf(7, "         unknown transport type %d\n", data[4] & 0x0f);
    break;
  }
}


x86 assembly (clang, -O0):
<netrom_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
jne    12da <netrom_dump+0x16a>
cmpl   $0x3,-0x14(%rbp)
je     11b2 <netrom_dump+0x42>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <netrom_inp_dump@plt>
jmp    16c6 <netrom_dump+0x556>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,-0x1d(%rbp)
lea    -0x23(%rbp),%rdx
mov    $0x7,%edi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x7,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0xb,-0x28(%rbp)
jge    12d5 <netrom_dump+0x165>
cmpl   $0x7,-0xc(%rbp)
jge    1218 <netrom_dump+0xa8>
jmp    12d5 <netrom_dump+0x165>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xdfd(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,-0x1d(%rbp)
lea    -0x23(%rbp),%rdx
mov    $0x5,%edi
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
add    $0x6,%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x14(%rax),%edx
mov    $0x5,%edi
lea    0xd97(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x15,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x15,%eax
mov    %eax,-0xc(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ff <netrom_dump+0x8f>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xfe,%eax
jne    1322 <netrom_dump+0x1b2>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,-0x1d(%rbp)
lea    -0x23(%rbp),%rdx
mov    $0x7,%edi
lea    0xd35(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
jmp    16c6 <netrom_dump+0x556>
lea    0xd34(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x31(%rbp)
mov    $0x7,%edi
mov    %edi,-0x38(%rbp)
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rsi
lea    -0x23(%rbp),%rdi
mov    %rdi,-0x48(%rbp)
call   1050 <pax25@plt>
mov    %al,%cl
mov    -0x31(%rbp),%al
movzbl %cl,%edx
lea    0xd0c(%rip),%rsi
mov    $0x8,%edi
mov    %edi,-0x3c(%rbp)
call   1090 <lprintf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
call   1050 <pax25@plt>
mov    -0x3c(%rbp),%edi
mov    %al,%cl
mov    -0x31(%rbp),%al
movzbl %cl,%edx
lea    0xd3e(%rip),%rsi
call   1090 <lprintf@plt>
mov    -0x38(%rbp),%edi
mov    -0x31(%rbp),%al
mov    -0x8(%rbp),%rcx
movzbl 0xe(%rcx),%edx
lea    0xcc7(%rip),%rsi
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
add    $0xf,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffff1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
and    $0xf,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x6,%eax
ja     16a8 <netrom_dump+0x538>
mov    -0x30(%rbp),%rax
lea    0xc1c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xc,%eax
jne    1429 <netrom_dump+0x2b9>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xc,%eax
jne    1429 <netrom_dump+0x2b9>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
mov    -0xc(%rbp),%esi
sub    $0x5,%esi
mov    -0x10(%rbp),%edx
call   1070 <ip_dump@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xc31(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xc30(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%edx
mov    $0x7,%edi
lea    0xc3a(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x6,%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x8,%edi
lea    0xc1b(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
lea    -0x23(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x6,%rsi
add    $0x7,%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x8,%edi
lea    0xbf4(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x14,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1525 <netrom_dump+0x3b5>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%edx
shl    $0x8,%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    %eax,%edx
mov    $0x7,%edi
lea    0xbb2(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    $0x7,%edi
lea    0xbff(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%r8d
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%r9d
mov    $0x7,%edi
lea    0xb72(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%edx
mov    $0x7,%edi
lea    0xb3b(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1080 <netrom_flags@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb58(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb52(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb50(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%ecx
mov    $0x7,%edi
lea    0xb4d(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1080 <netrom_flags@plt>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
mov    -0xc(%rbp),%esi
sub    $0x5,%esi
mov    -0x10(%rbp),%edx
call   1040 <data_dump@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb16(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edx
mov    $0x7,%edi
lea    0xaf1(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1080 <netrom_flags@plt>
jmp    16c6 <netrom_dump+0x556>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edx
and    $0xf,%edx
mov    $0x7,%edi
lea    0xaef(%rip),%rsi
mov    $0x0,%al
call   1090 <lprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netrom_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    (%rdi),%al
cmp    $0xfe,%al
je     12a6 <netrom_dump+0x136>
mov    %esi,%r14d
cmp    $0xff,%al
jne    12df <netrom_dump+0x16f>
cmp    $0x3,%ecx
jne    13a3 <netrom_dump+0x233>
lea    0x1(%rbx),%rsi
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xe5b(%rip),%rsi
mov    $0x7,%edi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <lprintf@plt>
cmp    $0xe,%r14d
jl     158b <netrom_dump+0x41b>
add    $0xfffffff9,%r14d
add    $0x7,%rbx
lea    0x9(%rsp),%rbp
lea    0xe47(%rip),%r13
lea    0xe4d(%rip),%r15
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xe17(%rip),%rsi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0x7(%rbx),%rsi
mov    %rbp,%rdi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,0xf(%rsp)
mov    $0x5,%edi
lea    0xdfb(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0xd(%rbx),%rsi
mov    %rbp,%rdi
call   1050 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x14(%rbx),%edx
mov    $0x5,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1090 <lprintf@plt>
cmp    $0x9,%r12d
ja     158b <netrom_dump+0x41b>
lea    -0x15(%r14),%eax
add    $0x1,%r12d
add    $0x15,%rbx
cmp    $0x1c,%r14d
mov    %eax,%r14d
jae    1200 <netrom_dump+0x90>
jmp    158b <netrom_dump+0x41b>
add    $0x1,%rbx
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1060 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xd80(%rip),%rsi
mov    $0x7,%edi
mov    %rbp,%rdx
xor    %eax,%eax
call   1090 <lprintf@plt>
jmp    158b <netrom_dump+0x41b>
mov    %edx,%r15d
lea    0xd74(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1050 <pax25@plt>
movzbl %al,%edx
lea    0xd58(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0x7(%rbx),%rsi
mov    %rbp,%rdi
call   1050 <pax25@plt>
movzbl %al,%edx
lea    0xd98(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0xe(%rbx),%edx
lea    0xd24(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x13(%rbx),%edx
and    $0xf,%edx
cmp    $0x6,%edx
ja     13bc <netrom_dump+0x24c>
lea    0xc99(%rip),%rax
movslq (%rax,%rdx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
movzbl 0xf(%rbx),%edx
mov    0x10(%rbx),%al
cmp    $0xc,%edx
jne    1575 <netrom_dump+0x405>
cmp    $0xc,%al
jne    1575 <netrom_dump+0x405>
add    $0x14,%rbx
add    $0xffffffec,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
call   1070 <ip_dump@plt>
jmp    158b <netrom_dump+0x41b>
mov    %rbx,%rdi
mov    %r14d,%esi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <netrom_inp_dump@plt>
lea    0xdeb(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
jmp    158b <netrom_dump+0x41b>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xcb8(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x14(%rbx),%edx
lea    0xcc6(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0x15(%rbx),%rsi
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <pax25@plt>
movzbl %al,%edx
lea    0xca7(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0x1c(%rbx),%rsi
mov    %rbp,%rdi
call   1050 <pax25@plt>
movzbl %al,%edx
lea    0xc89(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
cmp    $0x24,%r14d
jl     146c <netrom_dump+0x2fc>
movzwl 0x23(%rbx),%edx
lea    0xc70(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
lea    0xcbd(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
jmp    158b <netrom_dump+0x41b>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
movzbl 0x11(%rbx),%r8d
movzbl 0x12(%rbx),%r9d
lea    0xc3f(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x14(%rbx),%edx
lea    0xc0c(%rip),%rsi
jmp    155e <netrom_dump+0x3ee>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc49(%rip),%rsi
jmp    157f <netrom_dump+0x40f>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc56(%rip),%rsi
jmp    157f <netrom_dump+0x40f>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc67(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x11(%rbx),%edx
movzbl 0x12(%rbx),%ecx
lea    0xc6c(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x13(%rbx),%edi
call   1080 <netrom_flags@plt>
add    $0x14,%rbx
add    $0xffffffec,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
call   1040 <data_dump@plt>
jmp    158b <netrom_dump+0x41b>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc43(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x12(%rbx),%edx
lea    0xc22(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
movzbl 0x13(%rbx),%edi
call   1080 <netrom_flags@plt>
jmp    158b <netrom_dump+0x41b>
movzbl %al,%ecx
lea    0xaf6(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1090 <lprintf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"NET/ROM Routing: %s\0A\00"
@.str.1 = [13 x i8] c" %12s\00"
@.str.2 = [4 x i8] c"%8s\00"
@.str.3 = [9 x i8] c" %12s\00"
@.str.4 = [9 x i8] c" %3u\0A\00"
@.str.5 = [18 x i8] c"NET/ROM Poll: %s\0A\00"
@.str.6 = [10 x i8] c"NET/ROM: \00"
@.str.7 = [5 x i8] c"%s->\00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [9 x i8] c" ttl %d\0A\00"
@.str.10 = [38 x i8] c" protocol family %x, proto %x\00"
@.str.11 = [37 x i8] c" conn rqst: my ckt %02X/%02X\00"
@.str.12 = [8 x i8] c" wnd %d\00"
@.str.13 = [4 x i8] c" %s\00"
@.str.14 = [4 x i8] c"@%s\00"
@.str.15 = [12 x i8] c" timeout %d\00"
@.str.16 = [2 x i8] c"\0A\00"
@.str.17 = [53 x i8] c" conn ack: ur ckt %02X/%02X my ckt %02X/%02X\00"
@.str.18 = [33 x i8] c" disc: ur ckt %02X/%02X\0A\00"
@.str.19 = [37 x i8] c" disc ack: ur ckt %02X/%02X\0A\00"
@.str.20 = [32 x i8] c" info: ur ckt %02X/%02X\00"
@.str.21 = [19 x i8] c" txseq %d rxseq %d\00"
@.str.22 = [36 x i8] c" info ack: ur ckt %02X/%02X\00"
@.str.23 = [10 x i8] c" rxseq %d\00"
@.str.24 = [36 x i8] c" unknown transport type %d\0A\00"
define void @netrom_dump(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [15 x i8]
%10 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 255
br i1 %15, label %16, label %75
16: ; preds = %4
%17 = load i32, i32* %8
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i8*, i8** %5
%21 = load i32, i32* %6
%22 = call i32 @netrom_inp_dump(i8* %20, i32 %21)
br label %296
23: ; preds = %16
%24 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = call i32 @memcpy(i8* %24, i8* %26, i32 6)
%28 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 6
store i8 0, i8* %28
%29 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%30 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %29)
%31 = load i8*, i8** %5
%32 = getelementptr inbounds i8, i8* %31, i64 7
store i8* %32, i8** %5
%33 = load i32, i32* %6
%34 = sub nsw i32 %33, 7
store i32 %34, i32* %6
store i32 0, i32* %10
br label %35
35: ; preds = %71, %23
%36 = load i32, i32* %10
%37 = icmp slt i32 %36, 11
br i1 %37, label %38, label %74
38: ; preds = %35
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 7
br i1 %40, label %41, label %42
41: ; preds = %38
br label %74
42: ; preds = %38
%43 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%44 = load i8*, i8** %5
%45 = call zeroext i8 @pax25(i8* %43, i8* %44)
%46 = zext i8 %45 to i32
%47 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%49 = load i8*, i8** %5
%50 = getelementptr inbounds i8, i8* %49, i64 7
%51 = call i32 @memcpy(i8* %48, i8* %50, i32 6)
%52 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 6
store i8 0, i8* %52
%53 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%54 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %53)
%55 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%56 = load i8*, i8** %5
%57 = getelementptr inbounds i8, i8* %56, i64 7
%58 = getelementptr inbounds i8, i8* %57, i64 6
%59 = call zeroext i8 @pax25(i8* %55, i8* %58)
%60 = zext i8 %59 to i32
%61 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %60)
%62 = load i8*, i8** %5
%63 = getelementptr inbounds i8, i8* %62, i64 20
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %65)
%67 = load i8*, i8** %5
%68 = getelementptr inbounds i8, i8* %67, i64 21
store i8* %68, i8** %5
%69 = load i32, i32* %6
%70 = sub nsw i32 %69, 21
store i32 %70, i32* %6
br label %71
71: ; preds = %42
%72 = load i32, i32* %10
%73 = add nsw i32 %72, 1
store i32 %73, i32* %10
br label %35
74: ; preds = %41, %35
br label %296
75: ; preds = %4
%76 = load i8*, i8** %5
%77 = getelementptr inbounds i8, i8* %76, i64 0
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = icmp eq i32 %79, 254
br i1 %80, label %81, label %89
81: ; preds = %75
%82 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%83 = load i8*, i8** %5
%84 = getelementptr inbounds i8, i8* %83, i64 1
%85 = call i32 @memcpy(i8* %82, i8* %84, i32 6)
%86 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 6
store i8 0, i8* %86
%87 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%88 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %87)
br label %296
89: ; preds = %75
%90 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%91 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%92 = load i8*, i8** %5
%93 = call zeroext i8 @pax25(i8* %91, i8* %92)
%94 = zext i8 %93 to i32
%95 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %94)
%96 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%97 = load i8*, i8** %5
%98 = getelementptr inbounds i8, i8* %97, i64 7
%99 = call zeroext i8 @pax25(i8* %96, i8* %98)
%100 = zext i8 %99 to i32
%101 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %100)
%102 = load i8*, i8** %5
%103 = getelementptr inbounds i8, i8* %102, i64 14
%104 = load i8, i8* %103
%105 = zext i8 %104 to i32
%106 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %105)
%107 = load i8*, i8** %5
%108 = getelementptr inbounds i8, i8* %107, i64 15
store i8* %108, i8** %5
%109 = load i32, i32* %6
%110 = sub nsw i32 %109, 15
store i32 %110, i32* %6
%111 = load i8*, i8** %5
%112 = getelementptr inbounds i8, i8* %111, i64 4
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = and i32 %114, 15
switch i32 %115, label %289 [
i32 0, label %116
i32 1, label %146
i32 2, label %194
i32 3, label %221
i32 4, label %231
i32 5, label %241
i32 6, label %270
]
116: ; preds = %89
%117 = load i8*, i8** %5
%118 = getelementptr inbounds i8, i8* %117, i64 0
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = icmp eq i32 %120, 12
br i1 %121, label %122, label %135
122: ; preds = %116
%123 = load i8*, i8** %5
%124 = getelementptr inbounds i8, i8* %123, i64 1
%125 = load i8, i8* %124
%126 = zext i8 %125 to i32
%127 = icmp eq i32 %126, 12
br i1 %127, label %128, label %135
128: ; preds = %122
%129 = load i8*, i8** %5
%130 = getelementptr inbounds i8, i8* %129, i64 5
%131 = load i32, i32* %6
%132 = sub nsw i32 %131, 5
%133 = load i32, i32* %7
%134 = call i32 @ip_dump(i8* %130, i32 %132, i32 %133)
br label %296
135: ; preds = %122, %116
%136 = load i8*, i8** %5
%137 = getelementptr inbounds i8, i8* %136, i64 0
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = load i8*, i8** %5
%141 = getelementptr inbounds i8, i8* %140, i64 1
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %139, i32 %143)
br label %145
145: ; preds = %135
br label %296
146: ; preds = %89
%147 = load i8*, i8** %5
%148 = getelementptr inbounds i8, i8* %147, i64 0
%149 = load i8, i8* %148
%150 = zext i8 %149 to i32
%151 = load i8*, i8** %5
%152 = getelementptr inbounds i8, i8* %151, i64 1
%153 = load i8, i8* %152
%154 = zext i8 %153 to i32
%155 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0), i32 %150, i32 %154)
%156 = load i8*, i8** %5
%157 = getelementptr inbounds i8, i8* %156, i64 5
%158 = load i8, i8* %157
%159 = zext i8 %158 to i32
%160 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %159)
%161 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%162 = load i8*, i8** %5
%163 = getelementptr inbounds i8, i8* %162, i64 6
%164 = call zeroext i8 @pax25(i8* %161, i8* %163)
%165 = zext i8 %164 to i32
%166 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %165)
%167 = getelementptr inbounds [15 x i8], [15 x i8]* %9, i64 0, i64 0
%168 = load i8*, i8** %5
%169 = getelementptr inbounds i8, i8* %168, i64 6
%170 = getelementptr inbounds i8, i8* %169, i64 7
%171 = call zeroext i8 @pax25(i8* %167, i8* %170)
%172 = zext i8 %171 to i32
%173 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %172)
%174 = load i8*, i8** %5
%175 = getelementptr inbounds i8, i8* %174, i64 20
store i8* %175, i8** %5
%176 = load i32, i32* %6
%177 = sub nsw i32 %176, 20
store i32 %177, i32* %6
%178 = load i32, i32* %6
%179 = icmp sgt i32 %178, 0
br i1 %179, label %180, label %192
180: ; preds = %146
%181 = load i8*, i8** %5
%182 = getelementptr inbounds i8, i8* %181, i64 1
%183 = load i8, i8* %182
%184 = zext i8 %183 to i32
%185 = mul nsw i32 %184, 256
%186 = load i8*, i8** %5
%187 = getelementptr inbounds i8, i8* %186, i64 0
%188 = load i8, i8* %187
%189 = zext i8 %188 to i32
%190 = add nsw i32 %185, %189
%191 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %190)
br label %192
192: ; preds = %180, %146
%193 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %296
194: ; preds = %89
%195 = load i8*, i8** %5
%196 = getelementptr inbounds i8, i8* %195, i64 0
%197 = load i8, i8* %196
%198 = zext i8 %197 to i32
%199 = load i8*, i8** %5
%200 = getelementptr inbounds i8, i8* %199, i64 1
%201 = load i8, i8* %200
%202 = zext i8 %201 to i32
%203 = load i8*, i8** %5
%204 = getelementptr inbounds i8, i8* %203, i64 2
%205 = load i8, i8* %204
%206 = zext i8 %205 to i32
%207 = load i8*, i8** %5
%208 = getelementptr inbounds i8, i8* %207, i64 3
%209 = load i8, i8* %208
%210 = zext i8 %209 to i32
%211 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.17, i64 0, i64 0), i32 %198, i32 %202, i32 %206, i32 %210)
%212 = load i8*, i8** %5
%213 = getelementptr inbounds i8, i8* %212, i64 5
%214 = load i8, i8* %213
%215 = zext i8 %214 to i32
%216 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %215)
%217 = load i8*, i8** %5
%218 = getelementptr inbounds i8, i8* %217, i64 4
%219 = load i8, i8* %218
%220 = call i32 @netrom_flags(i8 zeroext %219)
br label %296
221: ; preds = %89
%222 = load i8*, i8** %5
%223 = getelementptr inbounds i8, i8* %222, i64 0
%224 = load i8, i8* %223
%225 = zext i8 %224 to i32
%226 = load i8*, i8** %5
%227 = getelementptr inbounds i8, i8* %226, i64 1
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 %225, i32 %229)
br label %296
231: ; preds = %89
%232 = load i8*, i8** %5
%233 = getelementptr inbounds i8, i8* %232, i64 0
%234 = load i8, i8* %233
%235 = zext i8 %234 to i32
%236 = load i8*, i8** %5
%237 = getelementptr inbounds i8, i8* %236, i64 1
%238 = load i8, i8* %237
%239 = zext i8 %238 to i32
%240 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0), i32 %235, i32 %239)
br label %296
241: ; preds = %89
%242 = load i8*, i8** %5
%243 = getelementptr inbounds i8, i8* %242, i64 0
%244 = load i8, i8* %243
%245 = zext i8 %244 to i32
%246 = load i8*, i8** %5
%247 = getelementptr inbounds i8, i8* %246, i64 1
%248 = load i8, i8* %247
%249 = zext i8 %248 to i32
%250 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i32 %245, i32 %249)
%251 = load i8*, i8** %5
%252 = getelementptr inbounds i8, i8* %251, i64 2
%253 = load i8, i8* %252
%254 = zext i8 %253 to i32
%255 = load i8*, i8** %5
%256 = getelementptr inbounds i8, i8* %255, i64 3
%257 = load i8, i8* %256
%258 = zext i8 %257 to i32
%259 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i32 %254, i32 %258)
%260 = load i8*, i8** %5
%261 = getelementptr inbounds i8, i8* %260, i64 4
%262 = load i8, i8* %261
%263 = call i32 @netrom_flags(i8 zeroext %262)
%264 = load i8*, i8** %5
%265 = getelementptr inbounds i8, i8* %264, i64 5
%266 = load i32, i32* %6
%267 = sub nsw i32 %266, 5
%268 = load i32, i32* %7
%269 = call i32 @data_dump(i8* %265, i32 %267, i32 %268)
br label %296
270: ; preds = %89
%271 = load i8*, i8** %5
%272 = getelementptr inbounds i8, i8* %271, i64 0
%273 = load i8, i8* %272
%274 = zext i8 %273 to i32
%275 = load i8*, i8** %5
%276 = getelementptr inbounds i8, i8* %275, i64 1
%277 = load i8, i8* %276
%278 = zext i8 %277 to i32
%279 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0), i32 %274, i32 %278)
%280 = load i8*, i8** %5
%281 = getelementptr inbounds i8, i8* %280, i64 3
%282 = load i8, i8* %281
%283 = zext i8 %282 to i32
%284 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32 %283)
%285 = load i8*, i8** %5
%286 = getelementptr inbounds i8, i8* %285, i64 4
%287 = load i8, i8* %286
%288 = call i32 @netrom_flags(i8 zeroext %287)
br label %296
289: ; preds = %89
%290 = load i8*, i8** %5
%291 = getelementptr inbounds i8, i8* %290, i64 4
%292 = load i8, i8* %291
%293 = zext i8 %292 to i32
%294 = and i32 %293, 15
%295 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), i32 %294)
br label %296
296: ; preds = %19, %74, %81, %128, %289, %270, %241, %231, %221, %194, %192, %145
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"NET/ROM Routing: %s\0A\00"
@.str.1 = [13 x i8] c" %12s\00"
@.str.2 = [4 x i8] c"%8s\00"
@.str.3 = [9 x i8] c" %12s\00"
@.str.4 = [9 x i8] c" %3u\0A\00"
@.str.5 = [18 x i8] c"NET/ROM Poll: %s\0A\00"
@.str.6 = [10 x i8] c"NET/ROM: \00"
@.str.7 = [5 x i8] c"%s->\00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [9 x i8] c" ttl %d\0A\00"
@.str.10 = [38 x i8] c" protocol family %x, proto %x\00"
@.str.11 = [37 x i8] c" conn rqst: my ckt %02X/%02X\00"
@.str.12 = [8 x i8] c" wnd %d\00"
@.str.13 = [4 x i8] c" %s\00"
@.str.14 = [4 x i8] c"@%s\00"
@.str.15 = [12 x i8] c" timeout %d\00"
@.str.16 = [2 x i8] c"\0A\00"
@.str.17 = [53 x i8] c" conn ack: ur ckt %02X/%02X my ckt %02X/%02X\00"
@.str.18 = [33 x i8] c" disc: ur ckt %02X/%02X\0A\00"
@.str.19 = [37 x i8] c" disc ack: ur ckt %02X/%02X\0A\00"
@.str.20 = [32 x i8] c" info: ur ckt %02X/%02X\00"
@.str.21 = [19 x i8] c" txseq %d rxseq %d\00"
@.str.22 = [36 x i8] c" info ack: ur ckt %02X/%02X\00"
@.str.23 = [10 x i8] c" rxseq %d\00"
@.str.24 = [36 x i8] c" unknown transport type %d\0A\00"
define void @netrom_dump(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [15 x i8]
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %0
switch i8 %7, label %50 [
i8 -1, label %8
i8 -2, label %45
]
8: ; preds = %4
%9 = icmp eq i32 %3, 3
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @netrom_inp_dump(i8* %0, i32 %1)
br label %182
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 1
%14 = call i32 @memcpy(i8* %6, i8* %13, i32 6)
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 6
store i8 0, i8* %15
%16 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
%17 = icmp slt i32 %1, 14
br i1 %17, label %182, label %18
18: ; preds = %12
%19 = add nsw i32 %1, -7
%20 = getelementptr inbounds i8, i8* %0, i64 7
br label %21
21: ; preds = %18, %21
%22 = phi i32 [ %41, %21 ], [ 0, %18 ]
%23 = phi i8* [ %39, %21 ], [ %20, %18 ]
%24 = phi i32 [ %40, %21 ], [ %19, %18 ]
%25 = call zeroext i8 @pax25(i8* %6, i8* %23)
%26 = zext i8 %25 to i32
%27 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds i8, i8* %23, i64 7
%29 = call i32 @memcpy(i8* %6, i8* %28, i32 6)
store i8 0, i8* %15
%30 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%31 = getelementptr inbounds i8, i8* %23, i64 13
%32 = call zeroext i8 @pax25(i8* %6, i8* %31)
%33 = zext i8 %32 to i32
%34 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds i8, i8* %23, i64 20
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i8, i8* %23, i64 21
%40 = add nsw i32 %24, -21
%41 = add nuw nsw i32 %22, 1
%42 = icmp ugt i32 %22, 9
%43 = icmp ult i32 %24, 28
%44 = select i1 %42, i1 true, i1 %43
br i1 %44, label %182, label %21
45: ; preds = %4
%46 = getelementptr inbounds i8, i8* %0, i64 1
%47 = call i32 @memcpy(i8* %6, i8* %46, i32 6)
%48 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 6
store i8 0, i8* %48
%49 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %6)
br label %182
50: ; preds = %4
%51 = tail call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%52 = call zeroext i8 @pax25(i8* %6, i8* %0)
%53 = zext i8 %52 to i32
%54 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %53)
%55 = getelementptr inbounds i8, i8* %0, i64 7
%56 = call zeroext i8 @pax25(i8* %6, i8* %55)
%57 = zext i8 %56 to i32
%58 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %57)
%59 = getelementptr inbounds i8, i8* %0, i64 14
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %61)
%63 = getelementptr inbounds i8, i8* %0, i64 15
%64 = getelementptr inbounds i8, i8* %0, i64 19
%65 = load i8, i8* %64
%66 = and i8 %65, 15
%67 = zext i8 %66 to i32
switch i32 %67, label %180 [
i32 0, label %68
i32 1, label %83
i32 2, label %115
i32 3, label %134
i32 4, label %141
i32 5, label %148
i32 6, label %167
]
68: ; preds = %50
%69 = load i8, i8* %63
%70 = icmp eq i8 %69, 12
%71 = getelementptr inbounds i8, i8* %0, i64 16
%72 = load i8, i8* %71
%73 = icmp eq i8 %72, 12
%74 = select i1 %70, i1 %73, i1 false
br i1 %74, label %75, label %79
75: ; preds = %68
%76 = getelementptr inbounds i8, i8* %0, i64 20
%77 = add nsw i32 %1, -20
%78 = call i32 @ip_dump(i8* %76, i32 %77, i32 %2)
br label %182
79: ; preds = %68
%80 = zext i8 %69 to i32
%81 = zext i8 %72 to i32
%82 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %80, i32 %81)
br label %182
83: ; preds = %50
%84 = load i8, i8* %63
%85 = zext i8 %84 to i32
%86 = getelementptr inbounds i8, i8* %0, i64 16
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0), i32 %85, i32 %88)
%90 = getelementptr inbounds i8, i8* %0, i64 20
%91 = load i8, i8* %90
%92 = zext i8 %91 to i32
%93 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %92)
%94 = getelementptr inbounds i8, i8* %0, i64 21
%95 = call zeroext i8 @pax25(i8* %6, i8* %94)
%96 = zext i8 %95 to i32
%97 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %96)
%98 = getelementptr inbounds i8, i8* %0, i64 28
%99 = call zeroext i8 @pax25(i8* %6, i8* %98)
%100 = zext i8 %99 to i32
%101 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %100)
%102 = icmp sgt i32 %1, 35
br i1 %102, label %103, label %113
103: ; preds = %83
%104 = getelementptr inbounds i8, i8* %0, i64 35
%105 = getelementptr inbounds i8, i8* %0, i64 36
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = shl nuw nsw i32 %107, 8
%109 = load i8, i8* %104
%110 = zext i8 %109 to i32
%111 = or i32 %108, %110
%112 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %103, %83
%114 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %182
115: ; preds = %50
%116 = load i8, i8* %63
%117 = zext i8 %116 to i32
%118 = getelementptr inbounds i8, i8* %0, i64 16
%119 = load i8, i8* %118
%120 = zext i8 %119 to i32
%121 = getelementptr inbounds i8, i8* %0, i64 17
%122 = load i8, i8* %121
%123 = zext i8 %122 to i32
%124 = getelementptr inbounds i8, i8* %0, i64 18
%125 = load i8, i8* %124
%126 = zext i8 %125 to i32
%127 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.17, i64 0, i64 0), i32 %117, i32 %120, i32 %123, i32 %126)
%128 = getelementptr inbounds i8, i8* %0, i64 20
%129 = load i8, i8* %128
%130 = zext i8 %129 to i32
%131 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %130)
%132 = load i8, i8* %64
%133 = call i32 @netrom_flags(i8 zeroext %132)
br label %182
134: ; preds = %50
%135 = load i8, i8* %63
%136 = zext i8 %135 to i32
%137 = getelementptr inbounds i8, i8* %0, i64 16
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.18, i64 0, i64 0), i32 %136, i32 %139)
br label %182
141: ; preds = %50
%142 = load i8, i8* %63
%143 = zext i8 %142 to i32
%144 = getelementptr inbounds i8, i8* %0, i64 16
%145 = load i8, i8* %144
%146 = zext i8 %145 to i32
%147 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.19, i64 0, i64 0), i32 %143, i32 %146)
br label %182
148: ; preds = %50
%149 = load i8, i8* %63
%150 = zext i8 %149 to i32
%151 = getelementptr inbounds i8, i8* %0, i64 16
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.20, i64 0, i64 0), i32 %150, i32 %153)
%155 = getelementptr inbounds i8, i8* %0, i64 17
%156 = load i8, i8* %155
%157 = zext i8 %156 to i32
%158 = getelementptr inbounds i8, i8* %0, i64 18
%159 = load i8, i8* %158
%160 = zext i8 %159 to i32
%161 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i32 %157, i32 %160)
%162 = load i8, i8* %64
%163 = call i32 @netrom_flags(i8 zeroext %162)
%164 = getelementptr inbounds i8, i8* %0, i64 20
%165 = add nsw i32 %1, -20
%166 = call i32 @data_dump(i8* %164, i32 %165, i32 %2)
br label %182
167: ; preds = %50
%168 = load i8, i8* %63
%169 = zext i8 %168 to i32
%170 = getelementptr inbounds i8, i8* %0, i64 16
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0), i32 %169, i32 %172)
%174 = getelementptr inbounds i8, i8* %0, i64 18
%175 = load i8, i8* %174
%176 = zext i8 %175 to i32
%177 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32 %176)
%178 = load i8, i8* %64
%179 = call i32 @netrom_flags(i8 zeroext %178)
br label %182
180: ; preds = %50
%181 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), i32 %67)
br label %182
182: ; preds = %21, %12, %79, %113, %115, %134, %141, %148, %167, %180, %75, %45, %10
ret void
}