#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);
unsigned char pax25(char *, unsigned char *);
void netrom_dump(unsigned char *data, int length, int hexdump) {
  char tmp[15];
  int i;
  if (data[0] == 0xFF) {
    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: ckt %d/%d", 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 %d/%d my ckt %d/%d", data[0], data[1],
            data[2], data[3]);
    lprintf(7, " wnd %d", data[5]);
    netrom_flags(data[4]);
    break;
  case 3:
    lprintf(7, "         disc: ckt %d/%d\n", data[0], data[1]);
    break;
  case 4:
    lprintf(7, "         disc ack: ckt %d/%d\n", data[0], data[1]);
    break;
  case 5:
    lprintf(7, "         info: ckt %d/%d", 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: ckt %d/%d", 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    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
jne    12ac <netrom_dump+0x14c>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1f(%rbp),%rdx
mov    $0x7,%edi
lea    0xe6e(%rip),%rsi
mov    $0x0,%al
call   1080 <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,-0x24(%rbp)
cmpl   $0xb,-0x24(%rbp)
jge    12a7 <netrom_dump+0x147>
cmpl   $0x7,-0xc(%rbp)
jge    11ea <netrom_dump+0x8a>
jmp    12a7 <netrom_dump+0x147>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1f(%rbp),%rdx
mov    $0x5,%edi
lea    0xe07(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
add    $0x6,%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xdd3(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x14(%rax),%edx
mov    $0x5,%edi
lea    0xdc5(%rip),%rsi
mov    $0x0,%al
call   1080 <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    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d1 <netrom_dump+0x71>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xfe,%eax
jne    12f4 <netrom_dump+0x194>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1f(%rbp),%rdx
mov    $0x7,%edi
lea    0xd63(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
jmp    1698 <netrom_dump+0x538>
lea    0xd62(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x31(%rbp)
mov    $0x7,%edi
mov    %edi,-0x38(%rbp)
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rsi
lea    -0x1f(%rbp),%rdi
mov    %rdi,-0x48(%rbp)
call   1040 <pax25@plt>
mov    %al,%cl
mov    -0x31(%rbp),%al
movzbl %cl,%edx
lea    0xd3a(%rip),%rsi
mov    $0x8,%edi
mov    %edi,-0x3c(%rbp)
call   1080 <lprintf@plt>
mov    -0x48(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
call   1040 <pax25@plt>
mov    -0x3c(%rbp),%edi
mov    %al,%cl
mov    -0x31(%rbp),%al
movzbl %cl,%edx
lea    0xd65(%rip),%rsi
call   1080 <lprintf@plt>
mov    -0x38(%rbp),%edi
mov    -0x31(%rbp),%al
mov    -0x8(%rbp),%rcx
movzbl 0xe(%rcx),%edx
lea    0xcf5(%rip),%rsi
call   1080 <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     167a <netrom_dump+0x51a>
mov    -0x30(%rbp),%rax
lea    0xc4a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xc,%eax
jne    13fb <netrom_dump+0x29b>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xc,%eax
jne    13fb <netrom_dump+0x29b>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
mov    -0xc(%rbp),%esi
sub    $0x5,%esi
mov    -0x10(%rbp),%edx
call   1060 <ip_dump@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xc5f(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xc5e(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%edx
mov    $0x7,%edi
lea    0xc61(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x6,%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x8,%edi
lea    0xc42(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
lea    -0x1f(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x6,%rsi
add    $0x7,%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x8,%edi
lea    0xc1b(%rip),%rsi
mov    $0x0,%al
call   1080 <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    14f7 <netrom_dump+0x397>
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    0xbd9(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    $0x7,%edi
lea    0xca2(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
jmp    1698 <netrom_dump+0x538>
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    0xb99(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%edx
mov    $0x7,%edi
lea    0xb62(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1070 <netrom_flags@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb77(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb6a(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb61(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%ecx
mov    $0x7,%edi
lea    0xb57(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1070 <netrom_flags@plt>
mov    -0x8(%rbp),%rdi
add    $0x5,%rdi
mov    -0xc(%rbp),%esi
sub    $0x5,%esi
mov    -0x10(%rbp),%edx
call   1030 <data_dump@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    $0x7,%edi
lea    0xb20(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%edx
mov    $0x7,%edi
lea    0xafb(%rip),%rsi
mov    $0x0,%al
call   1080 <lprintf@plt>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edi
call   1070 <netrom_flags@plt>
jmp    1698 <netrom_dump+0x538>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%edx
and    $0xf,%edx
mov    $0x7,%edi
lea    0xaf2(%rip),%rsi
mov    $0x0,%al
call   1080 <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     1286 <netrom_dump+0x126>
mov    %esi,%r14d
cmp    $0xff,%al
jne    12bf <netrom_dump+0x15f>
lea    0x1(%rbx),%rsi
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xe74(%rip),%rsi
mov    $0x7,%edi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <lprintf@plt>
cmp    $0xe,%r14d
jl     1552 <netrom_dump+0x3f2>
add    $0xfffffff9,%r14d
add    $0x7,%rbx
lea    0x9(%rsp),%rbp
lea    0xe60(%rip),%r13
lea    0xe66(%rip),%r15
xor    %r12d,%r12d
nop
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
lea    0xe37(%rip),%rsi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0x7(%rbx),%rsi
mov    %rbp,%rdi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,0xf(%rsp)
mov    $0x5,%edi
lea    0xe1b(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0xd(%rbx),%rsi
mov    %rbp,%rdi
call   1040 <pax25@plt>
movzbl %al,%edx
mov    $0x5,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x14(%rbx),%edx
mov    $0x5,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1080 <lprintf@plt>
cmp    $0x9,%r12d
ja     1552 <netrom_dump+0x3f2>
lea    -0x15(%r14),%eax
add    $0x1,%r12d
add    $0x15,%rbx
cmp    $0x1c,%r14d
mov    %eax,%r14d
jae    11e0 <netrom_dump+0x80>
jmp    1552 <netrom_dump+0x3f2>
add    $0x1,%rbx
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1050 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xda0(%rip),%rsi
mov    $0x7,%edi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <lprintf@plt>
jmp    1552 <netrom_dump+0x3f2>
mov    %edx,%r15d
lea    0xd94(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1040 <pax25@plt>
movzbl %al,%edx
lea    0xd78(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0x7(%rbx),%rsi
mov    %rbp,%rdi
call   1040 <pax25@plt>
movzbl %al,%edx
lea    0xdb1(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0xe(%rbx),%edx
lea    0xd44(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x13(%rbx),%edx
and    $0xf,%edx
cmp    $0x6,%edx
ja     1383 <netrom_dump+0x223>
lea    0xcb9(%rip),%rax
movslq (%rax,%rdx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
movzbl 0xf(%rbx),%edx
mov    0x10(%rbx),%al
cmp    $0xc,%edx
jne    153c <netrom_dump+0x3dc>
cmp    $0xc,%al
jne    153c <netrom_dump+0x3dc>
add    $0x14,%rbx
add    $0xffffffec,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
call   1060 <ip_dump@plt>
jmp    1552 <netrom_dump+0x3f2>
lea    0xdf9(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
jmp    1552 <netrom_dump+0x3f2>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xcf1(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x14(%rbx),%edx
lea    0xcf8(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0x15(%rbx),%rsi
lea    0x9(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <pax25@plt>
movzbl %al,%edx
lea    0xcd9(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0x1c(%rbx),%rsi
mov    %rbp,%rdi
call   1040 <pax25@plt>
movzbl %al,%edx
lea    0xcbb(%rip),%rsi
mov    $0x8,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
cmp    $0x24,%r14d
jl     1433 <netrom_dump+0x2d3>
movzwl 0x23(%rbx),%edx
lea    0xca2(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
lea    0xd6b(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
jmp    1552 <netrom_dump+0x3f2>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
movzbl 0x11(%rbx),%r8d
movzbl 0x12(%rbx),%r9d
lea    0xc71(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x14(%rbx),%edx
lea    0xc3e(%rip),%rsi
jmp    1525 <netrom_dump+0x3c5>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc73(%rip),%rsi
jmp    1546 <netrom_dump+0x3e6>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc79(%rip),%rsi
jmp    1546 <netrom_dump+0x3e6>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc83(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x11(%rbx),%edx
movzbl 0x12(%rbx),%ecx
lea    0xc81(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x13(%rbx),%edi
call   1070 <netrom_flags@plt>
add    $0x14,%rbx
add    $0xffffffec,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
call   1030 <data_dump@plt>
jmp    1552 <netrom_dump+0x3f2>
movzbl 0xf(%rbx),%edx
movzbl 0x10(%rbx),%ecx
lea    0xc58(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x12(%rbx),%edx
lea    0xc37(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <lprintf@plt>
movzbl 0x13(%rbx),%edi
call   1070 <netrom_flags@plt>
jmp    1552 <netrom_dump+0x3f2>
movzbl %al,%ecx
lea    0xb2f(%rip),%rsi
mov    $0x7,%edi
xor    %eax,%eax
call   1080 <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 = [30 x i8] c" conn rqst: ckt %d/%d\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 = [45 x i8] c" conn ack: ur ckt %d/%d my ckt %d/%d\00"
@.str.18 = [26 x i8] c" disc: ckt %d/%d\0A\00"
@.str.19 = [30 x i8] c" disc ack: ckt %d/%d\0A\00"
@.str.20 = [25 x i8] c" info: ckt %d/%d\00"
@.str.21 = [19 x i8] c" txseq %d rxseq %d\00"
@.str.22 = [29 x i8] c" info ack: ckt %d/%d\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) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [15 x i8]
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 255
br i1 %13, label %14, label %66
14: ; preds = %3
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = call i32 @memcpy(i8* %15, i8* %17, i32 6)
%19 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 6
store i8 0, i8* %19
%20 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%21 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 7
store i8* %23, i8** %4
%24 = load i32, i32* %5
%25 = sub nsw i32 %24, 7
store i32 %25, i32* %5
store i32 0, i32* %8
br label %26
26: ; preds = %62, %14
%27 = load i32, i32* %8
%28 = icmp slt i32 %27, 11
br i1 %28, label %29, label %65
29: ; preds = %26
%30 = load i32, i32* %5
%31 = icmp slt i32 %30, 7
br i1 %31, label %32, label %33
32: ; preds = %29
br label %65
33: ; preds = %29
%34 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%35 = load i8*, i8** %4
%36 = call zeroext i8 @pax25(i8* %34, i8* %35)
%37 = zext i8 %36 to i32
%38 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%40 = load i8*, i8** %4
%41 = getelementptr inbounds i8, i8* %40, i64 7
%42 = call i32 @memcpy(i8* %39, i8* %41, i32 6)
%43 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 6
store i8 0, i8* %43
%44 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%45 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %44)
%46 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%47 = load i8*, i8** %4
%48 = getelementptr inbounds i8, i8* %47, i64 7
%49 = getelementptr inbounds i8, i8* %48, i64 6
%50 = call zeroext i8 @pax25(i8* %46, i8* %49)
%51 = zext i8 %50 to i32
%52 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %51)
%53 = load i8*, i8** %4
%54 = getelementptr inbounds i8, i8* %53, i64 20
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %56)
%58 = load i8*, i8** %4
%59 = getelementptr inbounds i8, i8* %58, i64 21
store i8* %59, i8** %4
%60 = load i32, i32* %5
%61 = sub nsw i32 %60, 21
store i32 %61, i32* %5
br label %62
62: ; preds = %33
%63 = load i32, i32* %8
%64 = add nsw i32 %63, 1
store i32 %64, i32* %8
br label %26
65: ; preds = %32, %26
br label %287
66: ; preds = %3
%67 = load i8*, i8** %4
%68 = getelementptr inbounds i8, i8* %67, i64 0
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = icmp eq i32 %70, 254
br i1 %71, label %72, label %80
72: ; preds = %66
%73 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%74 = load i8*, i8** %4
%75 = getelementptr inbounds i8, i8* %74, i64 1
%76 = call i32 @memcpy(i8* %73, i8* %75, i32 6)
%77 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 6
store i8 0, i8* %77
%78 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%79 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %78)
br label %287
80: ; preds = %66
%81 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%82 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%83 = load i8*, i8** %4
%84 = call zeroext i8 @pax25(i8* %82, i8* %83)
%85 = zext i8 %84 to i32
%86 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %85)
%87 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%88 = load i8*, i8** %4
%89 = getelementptr inbounds i8, i8* %88, i64 7
%90 = call zeroext i8 @pax25(i8* %87, i8* %89)
%91 = zext i8 %90 to i32
%92 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %91)
%93 = load i8*, i8** %4
%94 = getelementptr inbounds i8, i8* %93, i64 14
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %96)
%98 = load i8*, i8** %4
%99 = getelementptr inbounds i8, i8* %98, i64 15
store i8* %99, i8** %4
%100 = load i32, i32* %5
%101 = sub nsw i32 %100, 15
store i32 %101, i32* %5
%102 = load i8*, i8** %4
%103 = getelementptr inbounds i8, i8* %102, i64 4
%104 = load i8, i8* %103
%105 = zext i8 %104 to i32
%106 = and i32 %105, 15
switch i32 %106, label %280 [
i32 0, label %107
i32 1, label %137
i32 2, label %185
i32 3, label %212
i32 4, label %222
i32 5, label %232
i32 6, label %261
]
107: ; preds = %80
%108 = load i8*, i8** %4
%109 = getelementptr inbounds i8, i8* %108, i64 0
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
%112 = icmp eq i32 %111, 12
br i1 %112, label %113, label %126
113: ; preds = %107
%114 = load i8*, i8** %4
%115 = getelementptr inbounds i8, i8* %114, i64 1
%116 = load i8, i8* %115
%117 = zext i8 %116 to i32
%118 = icmp eq i32 %117, 12
br i1 %118, label %119, label %126
119: ; preds = %113
%120 = load i8*, i8** %4
%121 = getelementptr inbounds i8, i8* %120, i64 5
%122 = load i32, i32* %5
%123 = sub nsw i32 %122, 5
%124 = load i32, i32* %6
%125 = call i32 @ip_dump(i8* %121, i32 %123, i32 %124)
br label %287
126: ; preds = %113, %107
%127 = load i8*, i8** %4
%128 = getelementptr inbounds i8, i8* %127, i64 0
%129 = load i8, i8* %128
%130 = zext i8 %129 to i32
%131 = load i8*, i8** %4
%132 = getelementptr inbounds i8, i8* %131, i64 1
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %130, i32 %134)
br label %136
136: ; preds = %126
br label %287
137: ; preds = %80
%138 = load i8*, i8** %4
%139 = getelementptr inbounds i8, i8* %138, i64 0
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = load i8*, i8** %4
%143 = getelementptr inbounds i8, i8* %142, i64 1
%144 = load i8, i8* %143
%145 = zext i8 %144 to i32
%146 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %141, i32 %145)
%147 = load i8*, i8** %4
%148 = getelementptr inbounds i8, i8* %147, i64 5
%149 = load i8, i8* %148
%150 = zext i8 %149 to i32
%151 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %150)
%152 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%153 = load i8*, i8** %4
%154 = getelementptr inbounds i8, i8* %153, i64 6
%155 = call zeroext i8 @pax25(i8* %152, i8* %154)
%156 = zext i8 %155 to i32
%157 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %156)
%158 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%159 = load i8*, i8** %4
%160 = getelementptr inbounds i8, i8* %159, i64 6
%161 = getelementptr inbounds i8, i8* %160, i64 7
%162 = call zeroext i8 @pax25(i8* %158, i8* %161)
%163 = zext i8 %162 to i32
%164 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %163)
%165 = load i8*, i8** %4
%166 = getelementptr inbounds i8, i8* %165, i64 20
store i8* %166, i8** %4
%167 = load i32, i32* %5
%168 = sub nsw i32 %167, 20
store i32 %168, i32* %5
%169 = load i32, i32* %5
%170 = icmp sgt i32 %169, 0
br i1 %170, label %171, label %183
171: ; preds = %137
%172 = load i8*, i8** %4
%173 = getelementptr inbounds i8, i8* %172, i64 1
%174 = load i8, i8* %173
%175 = zext i8 %174 to i32
%176 = mul nsw i32 %175, 256
%177 = load i8*, i8** %4
%178 = getelementptr inbounds i8, i8* %177, i64 0
%179 = load i8, i8* %178
%180 = zext i8 %179 to i32
%181 = add nsw i32 %176, %180
%182 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %181)
br label %183
183: ; preds = %171, %137
%184 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %287
185: ; preds = %80
%186 = load i8*, i8** %4
%187 = getelementptr inbounds i8, i8* %186, i64 0
%188 = load i8, i8* %187
%189 = zext i8 %188 to i32
%190 = load i8*, i8** %4
%191 = getelementptr inbounds i8, i8* %190, i64 1
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
%194 = load i8*, i8** %4
%195 = getelementptr inbounds i8, i8* %194, i64 2
%196 = load i8, i8* %195
%197 = zext i8 %196 to i32
%198 = load i8*, i8** %4
%199 = getelementptr inbounds i8, i8* %198, i64 3
%200 = load i8, i8* %199
%201 = zext i8 %200 to i32
%202 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0), i32 %189, i32 %193, i32 %197, i32 %201)
%203 = load i8*, i8** %4
%204 = getelementptr inbounds i8, i8* %203, i64 5
%205 = load i8, i8* %204
%206 = zext i8 %205 to i32
%207 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %206)
%208 = load i8*, i8** %4
%209 = getelementptr inbounds i8, i8* %208, i64 4
%210 = load i8, i8* %209
%211 = call i32 @netrom_flags(i8 zeroext %210)
br label %287
212: ; preds = %80
%213 = load i8*, i8** %4
%214 = getelementptr inbounds i8, i8* %213, i64 0
%215 = load i8, i8* %214
%216 = zext i8 %215 to i32
%217 = load i8*, i8** %4
%218 = getelementptr inbounds i8, i8* %217, i64 1
%219 = load i8, i8* %218
%220 = zext i8 %219 to i32
%221 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i32 %216, i32 %220)
br label %287
222: ; preds = %80
%223 = load i8*, i8** %4
%224 = getelementptr inbounds i8, i8* %223, i64 0
%225 = load i8, i8* %224
%226 = zext i8 %225 to i32
%227 = load i8*, i8** %4
%228 = getelementptr inbounds i8, i8* %227, i64 1
%229 = load i8, i8* %228
%230 = zext i8 %229 to i32
%231 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.19, i64 0, i64 0), i32 %226, i32 %230)
br label %287
232: ; preds = %80
%233 = load i8*, i8** %4
%234 = getelementptr inbounds i8, i8* %233, i64 0
%235 = load i8, i8* %234
%236 = zext i8 %235 to i32
%237 = load i8*, i8** %4
%238 = getelementptr inbounds i8, i8* %237, i64 1
%239 = load i8, i8* %238
%240 = zext i8 %239 to i32
%241 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i32 %236, i32 %240)
%242 = load i8*, i8** %4
%243 = getelementptr inbounds i8, i8* %242, i64 2
%244 = load i8, i8* %243
%245 = zext i8 %244 to i32
%246 = load i8*, i8** %4
%247 = getelementptr inbounds i8, i8* %246, i64 3
%248 = load i8, i8* %247
%249 = zext i8 %248 to i32
%250 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i32 %245, i32 %249)
%251 = load i8*, i8** %4
%252 = getelementptr inbounds i8, i8* %251, i64 4
%253 = load i8, i8* %252
%254 = call i32 @netrom_flags(i8 zeroext %253)
%255 = load i8*, i8** %4
%256 = getelementptr inbounds i8, i8* %255, i64 5
%257 = load i32, i32* %5
%258 = sub nsw i32 %257, 5
%259 = load i32, i32* %6
%260 = call i32 @data_dump(i8* %256, i32 %258, i32 %259)
br label %287
261: ; preds = %80
%262 = load i8*, i8** %4
%263 = getelementptr inbounds i8, i8* %262, i64 0
%264 = load i8, i8* %263
%265 = zext i8 %264 to i32
%266 = load i8*, i8** %4
%267 = getelementptr inbounds i8, i8* %266, i64 1
%268 = load i8, i8* %267
%269 = zext i8 %268 to i32
%270 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i32 %265, i32 %269)
%271 = load i8*, i8** %4
%272 = getelementptr inbounds i8, i8* %271, i64 3
%273 = load i8, i8* %272
%274 = zext i8 %273 to i32
%275 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32 %274)
%276 = load i8*, i8** %4
%277 = getelementptr inbounds i8, i8* %276, i64 4
%278 = load i8, i8* %277
%279 = call i32 @netrom_flags(i8 zeroext %278)
br label %287
280: ; preds = %80
%281 = load i8*, i8** %4
%282 = getelementptr inbounds i8, i8* %281, i64 4
%283 = load i8, i8* %282
%284 = zext i8 %283 to i32
%285 = and i32 %284, 15
%286 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), i32 %285)
br label %287
287: ; preds = %65, %72, %119, %280, %261, %232, %222, %212, %185, %183, %136
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 = [30 x i8] c" conn rqst: ckt %d/%d\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 = [45 x i8] c" conn ack: ur ckt %d/%d my ckt %d/%d\00"
@.str.18 = [26 x i8] c" disc: ckt %d/%d\0A\00"
@.str.19 = [30 x i8] c" disc ack: ckt %d/%d\0A\00"
@.str.20 = [25 x i8] c" info: ckt %d/%d\00"
@.str.21 = [19 x i8] c" txseq %d rxseq %d\00"
@.str.22 = [29 x i8] c" info ack: ckt %d/%d\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) {
%4 = alloca [15 x i8]
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%6 = load i8, i8* %0
switch i8 %6, label %45 [
i8 -1, label %7
i8 -2, label %40
]
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = call i32 @memcpy(i8* %5, i8* %8, i32 6)
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
store i8 0, i8* %10
%11 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5)
%12 = icmp slt i32 %1, 14
br i1 %12, label %177, label %13
13: ; preds = %7
%14 = add nsw i32 %1, -7
%15 = getelementptr inbounds i8, i8* %0, i64 7
br label %16
16: ; preds = %13, %16
%17 = phi i32 [ %36, %16 ], [ 0, %13 ]
%18 = phi i8* [ %34, %16 ], [ %15, %13 ]
%19 = phi i32 [ %35, %16 ], [ %14, %13 ]
%20 = call zeroext i8 @pax25(i8* %5, i8* %18)
%21 = zext i8 %20 to i32
%22 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds i8, i8* %18, i64 7
%24 = call i32 @memcpy(i8* %5, i8* %23, i32 6)
store i8 0, i8* %10
%25 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%26 = getelementptr inbounds i8, i8* %18, i64 13
%27 = call zeroext i8 @pax25(i8* %5, i8* %26)
%28 = zext i8 %27 to i32
%29 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds i8, i8* %18, i64 20
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = call i32 (i32, i8*, ...) @lprintf(i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds i8, i8* %18, i64 21
%35 = add nsw i32 %19, -21
%36 = add nuw nsw i32 %17, 1
%37 = icmp ugt i32 %17, 9
%38 = icmp ult i32 %19, 28
%39 = select i1 %37, i1 true, i1 %38
br i1 %39, label %177, label %16
40: ; preds = %3
%41 = getelementptr inbounds i8, i8* %0, i64 1
%42 = call i32 @memcpy(i8* %5, i8* %41, i32 6)
%43 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 6
store i8 0, i8* %43
%44 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %5)
br label %177
45: ; preds = %3
%46 = tail call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%47 = call zeroext i8 @pax25(i8* %5, i8* %0)
%48 = zext i8 %47 to i32
%49 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds i8, i8* %0, i64 7
%51 = call zeroext i8 @pax25(i8* %5, i8* %50)
%52 = zext i8 %51 to i32
%53 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds i8, i8* %0, i64 14
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds i8, i8* %0, i64 15
%59 = getelementptr inbounds i8, i8* %0, i64 19
%60 = load i8, i8* %59
%61 = and i8 %60, 15
%62 = zext i8 %61 to i32
switch i32 %62, label %175 [
i32 0, label %63
i32 1, label %78
i32 2, label %110
i32 3, label %129
i32 4, label %136
i32 5, label %143
i32 6, label %162
]
63: ; preds = %45
%64 = load i8, i8* %58
%65 = icmp eq i8 %64, 12
%66 = getelementptr inbounds i8, i8* %0, i64 16
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 12
%69 = select i1 %65, i1 %68, i1 false
br i1 %69, label %70, label %74
70: ; preds = %63
%71 = getelementptr inbounds i8, i8* %0, i64 20
%72 = add nsw i32 %1, -20
%73 = call i32 @ip_dump(i8* %71, i32 %72, i32 %2)
br label %177
74: ; preds = %63
%75 = zext i8 %64 to i32
%76 = zext i8 %67 to i32
%77 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %75, i32 %76)
br label %177
78: ; preds = %45
%79 = load i8, i8* %58
%80 = zext i8 %79 to i32
%81 = getelementptr inbounds i8, i8* %0, i64 16
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %80, i32 %83)
%85 = getelementptr inbounds i8, i8* %0, i64 20
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %87)
%89 = getelementptr inbounds i8, i8* %0, i64 21
%90 = call zeroext i8 @pax25(i8* %5, i8* %89)
%91 = zext i8 %90 to i32
%92 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds i8, i8* %0, i64 28
%94 = call zeroext i8 @pax25(i8* %5, i8* %93)
%95 = zext i8 %94 to i32
%96 = call i32 (i32, i8*, ...) @lprintf(i32 8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %95)
%97 = icmp sgt i32 %1, 35
br i1 %97, label %98, label %108
98: ; preds = %78
%99 = getelementptr inbounds i8, i8* %0, i64 35
%100 = getelementptr inbounds i8, i8* %0, i64 36
%101 = load i8, i8* %100
%102 = zext i8 %101 to i32
%103 = shl nuw nsw i32 %102, 8
%104 = load i8, i8* %99
%105 = zext i8 %104 to i32
%106 = or i32 %103, %105
%107 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %106)
br label %108
108: ; preds = %98, %78
%109 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %177
110: ; preds = %45
%111 = load i8, i8* %58
%112 = zext i8 %111 to i32
%113 = getelementptr inbounds i8, i8* %0, i64 16
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = getelementptr inbounds i8, i8* %0, i64 17
%117 = load i8, i8* %116
%118 = zext i8 %117 to i32
%119 = getelementptr inbounds i8, i8* %0, i64 18
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0), i32 %112, i32 %115, i32 %118, i32 %121)
%123 = getelementptr inbounds i8, i8* %0, i64 20
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %125)
%127 = load i8, i8* %59
%128 = call i32 @netrom_flags(i8 zeroext %127)
br label %177
129: ; preds = %45
%130 = load i8, i8* %58
%131 = zext i8 %130 to i32
%132 = getelementptr inbounds i8, i8* %0, i64 16
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i32 %131, i32 %134)
br label %177
136: ; preds = %45
%137 = load i8, i8* %58
%138 = zext i8 %137 to i32
%139 = getelementptr inbounds i8, i8* %0, i64 16
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.19, i64 0, i64 0), i32 %138, i32 %141)
br label %177
143: ; preds = %45
%144 = load i8, i8* %58
%145 = zext i8 %144 to i32
%146 = getelementptr inbounds i8, i8* %0, i64 16
%147 = load i8, i8* %146
%148 = zext i8 %147 to i32
%149 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.20, i64 0, i64 0), i32 %145, i32 %148)
%150 = getelementptr inbounds i8, i8* %0, i64 17
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = getelementptr inbounds i8, i8* %0, i64 18
%154 = load i8, i8* %153
%155 = zext i8 %154 to i32
%156 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i32 %152, i32 %155)
%157 = load i8, i8* %59
%158 = call i32 @netrom_flags(i8 zeroext %157)
%159 = getelementptr inbounds i8, i8* %0, i64 20
%160 = add nsw i32 %1, -20
%161 = call i32 @data_dump(i8* %159, i32 %160, i32 %2)
br label %177
162: ; preds = %45
%163 = load i8, i8* %58
%164 = zext i8 %163 to i32
%165 = getelementptr inbounds i8, i8* %0, i64 16
%166 = load i8, i8* %165
%167 = zext i8 %166 to i32
%168 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i32 %164, i32 %167)
%169 = getelementptr inbounds i8, i8* %0, i64 18
%170 = load i8, i8* %169
%171 = zext i8 %170 to i32
%172 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.23, i64 0, i64 0), i32 %171)
%173 = load i8, i8* %59
%174 = call i32 @netrom_flags(i8 zeroext %173)
br label %177
175: ; preds = %45
%176 = call i32 (i32, i8*, ...) @lprintf(i32 7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.24, i64 0, i64 0), i32 %62)
br label %177
177: ; preds = %16, %7, %74, %108, %110, %129, %136, %143, %162, %175, %70, %40
ret void
}