#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 */
typedef int uint8_t;
typedef int /*<<< orphan*/ *option;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
size_t INET_ADDRSTRLEN;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ *inet_ntop(int /*<<< orphan*/, int const *, char *, size_t);
char *malloc(size_t);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void ip4_print_option(const uint8_t *option) {
  uint8_t type, len;
  char *addr;
  type = option[0];
  len = option[1];
  fprintf(stdout, "\t    (%02d) ", type);
  switch (type) {
  case 2:
    fprintf(stdout, "Security: ");
    for (size_t i = 0; i < len; i++) {
      fprintf(stdout, "%x", option[i + 2]);
    }
    break;
  case 3:
    fprintf(stdout, "Loose source route:\n");
    for (size_t i = 0; i < len; i += INET_ADDRSTRLEN) {
      addr = malloc(INET_ADDRSTRLEN * sizeof(char));
      if ((inet_ntop(AF_INET, (option + 2), addr, INET_ADDRSTRLEN)) == NULL) {
        fprintf(stderr, "Error retrieving address.");
      } else {
        fprintf(stdout, "\t\t\t%s\n", addr);
      }
    }
    break;
  case 7:
    fprintf(stdout, "Record route:\n");
    for (size_t i = 0; i < len; i += INET_ADDRSTRLEN) {
      addr = malloc(INET_ADDRSTRLEN * sizeof(char));
      if ((inet_ntop(AF_INET, (option + 2), addr, INET_ADDRSTRLEN)) == NULL) {
        fprintf(stderr, "Error retrieving address.");
      } else {
        fprintf(stdout, "\t\t\t%s\n", addr);
      }
    }
    break;
  case 9:
    fprintf(stdout, "Strict source route:\n");
    for (size_t i = 0; i < len; i += INET_ADDRSTRLEN) {
      addr = malloc(INET_ADDRSTRLEN * sizeof(char));
      if ((inet_ntop(AF_INET, (option + 2), addr, INET_ADDRSTRLEN)) == NULL) {
        fprintf(stderr, "Error retrieving address.");
      } else {
        fprintf(stdout, "\t\t\t%s\n", addr);
      }
    }
    break;
  case 68:
    fprintf(stdout, "Timestamps:\n");
    option += 3;
    switch (*(option)&0x00FF) {
    case 0:
      for (size_t i = 1; i < len; i += 8) {
        fprintf(stdout, "\t\t%d", option[i]);
      }
      break;
    case 1:
      for (size_t i = 0; i < len; i += INET_ADDRSTRLEN) {
        addr = malloc(INET_ADDRSTRLEN * sizeof(char));
        if ((inet_ntop(AF_INET, (option + 4), addr, INET_ADDRSTRLEN)) == NULL) {
          fprintf(stderr, "Error retrieving address.");
        } else {
          fprintf(stdout, "\t\t%s\n", addr);
        }
      }
      break;
    case 3:
      break;
      for (size_t i = 1; i < len; i += 8) {
        fprintf(stdout, "\t\t%d", option[i]);
      }
    }
    fprintf(stdout, "\t(Option has overflowed by %d modules)\n",
            (*(option + 3) & 0xFF00));
    break;
  case 82:
    fprintf(stdout, "Traceroute:\n");
    fprintf(stdout, "\tId: %x%x\n", option[2], option[3]);
    fprintf(stdout, "\tOutbound hop count: %x%x\n", option[4], option[5]);
    fprintf(stdout, "\tReturn hop count: %x%x\n", option[6], option[7]);
    addr = malloc(INET_ADDRSTRLEN * sizeof(char));
    if ((inet_ntop(AF_INET, (option + 8), addr, INET_ADDRSTRLEN)) == NULL) {
      fprintf(stderr, "Error retrieving address.");
    } else {
      fprintf(stdout, "\tOriginator IP address%s\n", addr);
    }
    break;
  }
}


x86 assembly (clang, -O0):
<ip4_print_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xe9e(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4c(%rbp)
sub    $0x2,%eax
je     11d2 <ip4_print_option+0xa2>
jmp    117d <ip4_print_option+0x4d>
mov    -0x4c(%rbp),%eax
sub    $0x3,%eax
je     123b <ip4_print_option+0x10b>
jmp    118e <ip4_print_option+0x5e>
mov    -0x4c(%rbp),%eax
sub    $0x7,%eax
je     1308 <ip4_print_option+0x1d8>
jmp    119f <ip4_print_option+0x6f>
mov    -0x4c(%rbp),%eax
sub    $0x9,%eax
je     13d5 <ip4_print_option+0x2a5>
jmp    11b0 <ip4_print_option+0x80>
mov    -0x4c(%rbp),%eax
sub    $0x44,%eax
je     14a2 <ip4_print_option+0x372>
jmp    11c1 <ip4_print_option+0x91>
mov    -0x4c(%rbp),%eax
sub    $0x52,%eax
je     1633 <ip4_print_option+0x503>
jmp    173a <ip4_print_option+0x60a>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
lea    0xe2b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1236 <ip4_print_option+0x106>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    0x8(%rax,%rcx,4),%edx
lea    0xdfa(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11f1 <ip4_print_option+0xc1>
jmp    173a <ip4_print_option+0x60a>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1303 <ip4_print_option+0x1d3>
mov    0x2d5e(%rip),%rax
mov    (%rax),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2d32(%rip),%rax
mov    (%rax),%rcx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    12cc <ip4_print_option+0x19c>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
lea    0xd70(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12e7 <ip4_print_option+0x1b7>
mov    0x2cf5(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xd6a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    12ec <ip4_print_option+0x1bc>
mov    0x2cdd(%rip),%rax
mov    (%rax),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    125a <ip4_print_option+0x12a>
jmp    173a <ip4_print_option+0x60a>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
lea    0xd39(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    13d0 <ip4_print_option+0x2a0>
mov    0x2c91(%rip),%rax
mov    (%rax),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2c65(%rip),%rax
mov    (%rax),%rcx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    1399 <ip4_print_option+0x269>
mov    0x2c54(%rip),%rax
mov    (%rax),%edi
lea    0xca3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    13b4 <ip4_print_option+0x284>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xc9d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    13b9 <ip4_print_option+0x289>
mov    0x2c10(%rip),%rax
mov    (%rax),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1327 <ip4_print_option+0x1f7>
jmp    173a <ip4_print_option+0x60a>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
lea    0xc7b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    149d <ip4_print_option+0x36d>
mov    0x2bc4(%rip),%rax
mov    (%rax),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2b98(%rip),%rax
mov    (%rax),%rcx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    1466 <ip4_print_option+0x336>
mov    0x2b87(%rip),%rax
mov    (%rax),%edi
lea    0xbd6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1481 <ip4_print_option+0x351>
mov    0x2b5b(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xbd0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1486 <ip4_print_option+0x356>
mov    0x2b43(%rip),%rax
mov    (%rax),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    13f4 <ip4_print_option+0x2c4>
jmp    173a <ip4_print_option+0x60a>
mov    0x2b1f(%rip),%rax
mov    (%rax),%edi
lea    0xbc4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x50(%rbp)
test   %eax,%eax
je     14fe <ip4_print_option+0x3ce>
jmp    14dc <ip4_print_option+0x3ac>
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
je     154f <ip4_print_option+0x41f>
jmp    14ed <ip4_print_option+0x3bd>
mov    -0x50(%rbp),%eax
sub    $0x3,%eax
je     1605 <ip4_print_option+0x4d5>
jmp    160a <ip4_print_option+0x4da>
movq   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    154a <ip4_print_option+0x41a>
mov    0x2aaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xb51(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
jmp    1506 <ip4_print_option+0x3d6>
jmp    160a <ip4_print_option+0x4da>
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1600 <ip4_print_option+0x4d0>
mov    0x2a61(%rip),%rax
mov    (%rax),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2a62(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
mov    -0x18(%rbp),%rdx
mov    0x2a35(%rip),%rax
mov    (%rax),%rcx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    15c9 <ip4_print_option+0x499>
mov    0x2a24(%rip),%rax
mov    (%rax),%edi
lea    0xa73(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    15e4 <ip4_print_option+0x4b4>
mov    0x29f8(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xa6e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    15e9 <ip4_print_option+0x4b9>
mov    0x29e0(%rip),%rax
mov    (%rax),%rax
add    -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1557 <ip4_print_option+0x427>
jmp    160a <ip4_print_option+0x4da>
jmp    160a <ip4_print_option+0x4da>
mov    0x29b7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
and    $0xff00,%edx
lea    0xa61(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    173a <ip4_print_option+0x60a>
mov    0x298e(%rip),%rax
mov    (%rax),%edi
lea    0xa6d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2977(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
lea    0xa55(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2952(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
lea    0xa3b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x292d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
lea    0xa31(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2910(%rip),%rax
mov    (%rax),%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    0x2911(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
add    $0x20,%rsi
mov    -0x18(%rbp),%rdx
mov    0x28e4(%rip),%rax
mov    (%rax),%rcx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    171a <ip4_print_option+0x5ea>
mov    0x28d3(%rip),%rax
mov    (%rax),%edi
lea    0x922(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1735 <ip4_print_option+0x605>
mov    0x28a7(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0x9ce(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    173a <ip4_print_option+0x60a>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip4_print_option>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
mov    (%rdi),%ebx
movslq 0x4(%rdi),%r14
mov    0x2e7d(%rip),%r15
mov    (%r15),%edi
lea    0xecb(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    -0x2(%rbx),%eax
cmp    $0x7,%eax
ja     11c6 <ip4_print_option+0x96>
lea    0xe93(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r14d,%r14d
je     1496 <ip4_print_option+0x366>
lea    0xe9b(%rip),%rbx
xor    %ebp,%ebp
nop
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r13,%rbp,4),%edx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11a0 <ip4_print_option+0x70>
jmp    1496 <ip4_print_option+0x366>
cmp    $0x44,%ebx
je     14a5 <ip4_print_option+0x375>
cmp    $0x52,%ebx
jne    1496 <ip4_print_option+0x366>
mov    (%r15),%edi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
mov    0x8(%r13),%edx
mov    0xc(%r13),%ecx
lea    0xee2(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
mov    0x10(%r13),%edx
mov    0x14(%r13),%ecx
lea    0xed4(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
mov    0x18(%r13),%edx
mov    0x1c(%r13),%ecx
lea    0xed6(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%rbp
mov    %rbp,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    0x2d98(%rip),%rax
mov    (%rax),%edi
add    $0x20,%r13
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     155b <ip4_print_option+0x42b>
mov    (%r15),%edi
lea    0xea5(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
lea    0xd9c(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r14d,%r14d
je     1496 <ip4_print_option+0x366>
add    $0x8,%r13
mov    0x2d16(%rip),%rax
mov    (%rax),%rbx
mov    0x2d24(%rip),%r15
xor    %r12d,%r12d
jmp    12fd <ip4_print_option+0x1cd>
nopl   0x0(%rax)
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
lea    0xd70(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2ce2(%rip),%rax
mov    (%rax),%rbx
add    %rbx,%r12
cmp    %r14,%r12
jae    1496 <ip4_print_option+0x366>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    (%r15),%edi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     12d0 <ip4_print_option+0x1a0>
mov    0x2ca3(%rip),%rax
mov    (%rax),%edi
lea    0xd3c(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    12e7 <ip4_print_option+0x1b7>
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
lea    0xd27(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r14d,%r14d
je     1496 <ip4_print_option+0x366>
add    $0x8,%r13
mov    0x2c6b(%rip),%rax
mov    (%rax),%rbx
mov    0x2c79(%rip),%r15
xor    %r12d,%r12d
jmp    13ad <ip4_print_option+0x27d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x2c51(%rip),%rax
mov    (%rax),%edi
lea    0xcc0(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2c32(%rip),%rax
mov    (%rax),%rbx
add    %rbx,%r12
cmp    %r14,%r12
jae    1496 <ip4_print_option+0x366>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    (%r15),%edi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     1380 <ip4_print_option+0x250>
mov    0x2bf3(%rip),%rax
mov    (%rax),%edi
lea    0xc8c(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1397 <ip4_print_option+0x267>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
lea    0xc86(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r14d,%r14d
je     1496 <ip4_print_option+0x366>
add    $0x8,%r13
mov    0x2bbb(%rip),%rax
mov    (%rax),%rbx
mov    0x2bc9(%rip),%r15
xor    %r12d,%r12d
jmp    1459 <ip4_print_option+0x329>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
lea    0xc10(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2b82(%rip),%rax
mov    (%rax),%rbx
add    %rbx,%r12
cmp    %r14,%r12
jae    1496 <ip4_print_option+0x366>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    (%r15),%edi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     1430 <ip4_print_option+0x300>
mov    0x2b47(%rip),%rax
mov    (%rax),%edi
lea    0xbe0(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1447 <ip4_print_option+0x317>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r15),%edi
lea    0xbe7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0xc(%r13),%al
test   %al,%al
je     1580 <ip4_print_option+0x450>
cmp    $0x1,%al
jne    15c2 <ip4_print_option+0x492>
test   %r14d,%r14d
je     15c2 <ip4_print_option+0x492>
lea    0x1c(%r13),%rax
mov    %rax,(%rsp)
mov    0x2aee(%rip),%rax
mov    (%rax),%rbx
xor    %r12d,%r12d
jmp    151a <ip4_print_option+0x3ea>
nopw   0x0(%rax,%rax,1)
mov    (%r15),%edi
lea    0xb71(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2ac5(%rip),%rax
mov    (%rax),%rbx
add    %rbx,%r12
cmp    %r14,%r12
jae    15c2 <ip4_print_option+0x492>
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    0x2abc(%rip),%rax
mov    (%rax),%edi
mov    (%rsp),%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1030 <inet_ntop@plt>
test   %rax,%rax
jne    14f0 <ip4_print_option+0x3c0>
mov    0x2a8f(%rip),%rax
mov    (%rax),%edi
lea    0xafe(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1504 <ip4_print_option+0x3d4>
mov    0x2a76(%rip),%rax
mov    (%rax),%edi
lea    0xae5(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
cmp    $0x2,%r14d
jb     15c2 <ip4_print_option+0x492>
mov    $0x4,%ebp
lea    0xb11(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15),%edi
mov    0x0(%r13,%rbp,4),%edx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0x8(%rbp),%rax
add    $0x5,%rbp
cmp    %r14,%rbp
mov    %rax,%rbp
jb     15a0 <ip4_print_option+0x470>
mov    (%r15),%edi
movzbl 0x19(%r13),%edx
shl    $0x8,%edx
lea    0xad4(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"\09 (%02d) \00"
@.str.1 = [11 x i8] c"Security: \00"
@.str.2 = [3 x i8] c"%x\00"
@.str.3 = [21 x i8] c"Loose source route:\0A\00"
@INET_ADDRSTRLEN = global i64 0
@AF_INET = global i32 0
@stderr = global i32 0
@.str.4 = [26 x i8] c"Error retrieving address.\00"
@.str.5 = [7 x i8] c"\09\09\09%s\0A\00"
@.str.6 = [15 x i8] c"Record route:\0A\00"
@.str.7 = [22 x i8] c"Strict source route:\0A\00"
@.str.8 = [13 x i8] c"Timestamps:\0A\00"
@.str.9 = [5 x i8] c"\09\09%d\00"
@.str.10 = [6 x i8] c"\09\09%s\0A\00"
@.str.11 = [40 x i8] c"\09(Option has overflowed by %d modules)\0A\00"
@.str.12 = [13 x i8] c"Traceroute:\0A\00"
@.str.13 = [11 x i8] c"\09Id: %x%x\0A\00"
@.str.14 = [27 x i8] c"\09Outbound hop count: %x%x\0A\00"
@.str.15 = [25 x i8] c"\09Return hop count: %x%x\0A\00"
@.str.16 = [26 x i8] c"\09Originator IP address%s\0A\00"
define void @ip4_print_option(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i32* %0, i32** %2
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
store i32 %14, i32* %3
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
store i32 %17, i32* %4
%18 = load i32, i32* @stdout
%19 = load i32, i32* %3
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %3
switch i32 %21, label %246 [
i32 2, label %22
i32 3, label %42
i32 7, label %74
i32 9, label %106
i32 68, label %138
i32 82, label %201
]
22: ; preds = %1
%23 = load i32, i32* @stdout
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i64 0, i64* %6
br label %25
25: ; preds = %38, %22
%26 = load i64, i64* %6
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = icmp ult i64 %26, %28
br i1 %29, label %30, label %41
30: ; preds = %25
%31 = load i32, i32* @stdout
%32 = load i32*, i32** %2
%33 = load i64, i64* %6
%34 = add i64 %33, 2
%35 = getelementptr inbounds i32, i32* %32, i64 %34
%36 = load i32, i32* %35
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %36)
br label %38
38: ; preds = %30
%39 = load i64, i64* %6
%40 = add i64 %39, 1
store i64 %40, i64* %6
br label %25
41: ; preds = %25
br label %246
42: ; preds = %1
%43 = load i32, i32* @stdout
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
store i64 0, i64* %7
br label %45
45: ; preds = %69, %42
%46 = load i64, i64* %7
%47 = load i32, i32* %4
%48 = sext i32 %47 to i64
%49 = icmp ult i64 %46, %48
br i1 %49, label %50, label %73
50: ; preds = %45
%51 = load i64, i64* @INET_ADDRSTRLEN
%52 = mul i64 %51, 1
%53 = call i8* @malloc(i64 %52)
store i8* %53, i8** %5
%54 = load i32, i32* @AF_INET
%55 = load i32*, i32** %2
%56 = getelementptr inbounds i32, i32* %55, i64 2
%57 = load i8*, i8** %5
%58 = load i64, i64* @INET_ADDRSTRLEN
%59 = call i32* @inet_ntop(i32 %54, i32* %56, i8* %57, i64 %58)
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %64
61: ; preds = %50
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %68
64: ; preds = %50
%65 = load i32, i32* @stdout
%66 = load i8*, i8** %5
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %66)
br label %68
68: ; preds = %64, %61
br label %69
69: ; preds = %68
%70 = load i64, i64* @INET_ADDRSTRLEN
%71 = load i64, i64* %7
%72 = add i64 %71, %70
store i64 %72, i64* %7
br label %45
73: ; preds = %45
br label %246
74: ; preds = %1
%75 = load i32, i32* @stdout
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
store i64 0, i64* %8
br label %77
77: ; preds = %101, %74
%78 = load i64, i64* %8
%79 = load i32, i32* %4
%80 = sext i32 %79 to i64
%81 = icmp ult i64 %78, %80
br i1 %81, label %82, label %105
82: ; preds = %77
%83 = load i64, i64* @INET_ADDRSTRLEN
%84 = mul i64 %83, 1
%85 = call i8* @malloc(i64 %84)
store i8* %85, i8** %5
%86 = load i32, i32* @AF_INET
%87 = load i32*, i32** %2
%88 = getelementptr inbounds i32, i32* %87, i64 2
%89 = load i8*, i8** %5
%90 = load i64, i64* @INET_ADDRSTRLEN
%91 = call i32* @inet_ntop(i32 %86, i32* %88, i8* %89, i64 %90)
%92 = icmp eq i32* %91, null
br i1 %92, label %93, label %96
93: ; preds = %82
%94 = load i32, i32* @stderr
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %100
96: ; preds = %82
%97 = load i32, i32* @stdout
%98 = load i8*, i8** %5
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %98)
br label %100
100: ; preds = %96, %93
br label %101
101: ; preds = %100
%102 = load i64, i64* @INET_ADDRSTRLEN
%103 = load i64, i64* %8
%104 = add i64 %103, %102
store i64 %104, i64* %8
br label %77
105: ; preds = %77
br label %246
106: ; preds = %1
%107 = load i32, i32* @stdout
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
store i64 0, i64* %9
br label %109
109: ; preds = %133, %106
%110 = load i64, i64* %9
%111 = load i32, i32* %4
%112 = sext i32 %111 to i64
%113 = icmp ult i64 %110, %112
br i1 %113, label %114, label %137
114: ; preds = %109
%115 = load i64, i64* @INET_ADDRSTRLEN
%116 = mul i64 %115, 1
%117 = call i8* @malloc(i64 %116)
store i8* %117, i8** %5
%118 = load i32, i32* @AF_INET
%119 = load i32*, i32** %2
%120 = getelementptr inbounds i32, i32* %119, i64 2
%121 = load i8*, i8** %5
%122 = load i64, i64* @INET_ADDRSTRLEN
%123 = call i32* @inet_ntop(i32 %118, i32* %120, i8* %121, i64 %122)
%124 = icmp eq i32* %123, null
br i1 %124, label %125, label %128
125: ; preds = %114
%126 = load i32, i32* @stderr
%127 = call i32 (i32, i8*, ...) @fprintf(i32 %126, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %132
128: ; preds = %114
%129 = load i32, i32* @stdout
%130 = load i8*, i8** %5
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %130)
br label %132
132: ; preds = %128, %125
br label %133
133: ; preds = %132
%134 = load i64, i64* @INET_ADDRSTRLEN
%135 = load i64, i64* %9
%136 = add i64 %135, %134
store i64 %136, i64* %9
br label %109
137: ; preds = %109
br label %246
138: ; preds = %1
%139 = load i32, i32* @stdout
%140 = call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%141 = load i32*, i32** %2
%142 = getelementptr inbounds i32, i32* %141, i64 3
store i32* %142, i32** %2
%143 = load i32*, i32** %2
%144 = load i32, i32* %143
%145 = and i32 %144, 255
switch i32 %145, label %194 [
i32 0, label %146
i32 1, label %163
i32 3, label %193
]
146: ; preds = %138
store i64 1, i64* %10
br label %147
147: ; preds = %159, %146
%148 = load i64, i64* %10
%149 = load i32, i32* %4
%150 = sext i32 %149 to i64
%151 = icmp ult i64 %148, %150
br i1 %151, label %152, label %162
152: ; preds = %147
%153 = load i32, i32* @stdout
%154 = load i32*, i32** %2
%155 = load i64, i64* %10
%156 = getelementptr inbounds i32, i32* %154, i64 %155
%157 = load i32, i32* %156
%158 = call i32 (i32, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %157)
br label %159
159: ; preds = %152
%160 = load i64, i64* %10
%161 = add i64 %160, 8
store i64 %161, i64* %10
br label %147
162: ; preds = %147
br label %194
163: ; preds = %138
store i64 0, i64* %11
br label %164
164: ; preds = %188, %163
%165 = load i64, i64* %11
%166 = load i32, i32* %4
%167 = sext i32 %166 to i64
%168 = icmp ult i64 %165, %167
br i1 %168, label %169, label %192
169: ; preds = %164
%170 = load i64, i64* @INET_ADDRSTRLEN
%171 = mul i64 %170, 1
%172 = call i8* @malloc(i64 %171)
store i8* %172, i8** %5
%173 = load i32, i32* @AF_INET
%174 = load i32*, i32** %2
%175 = getelementptr inbounds i32, i32* %174, i64 4
%176 = load i8*, i8** %5
%177 = load i64, i64* @INET_ADDRSTRLEN
%178 = call i32* @inet_ntop(i32 %173, i32* %175, i8* %176, i64 %177)
%179 = icmp eq i32* %178, null
br i1 %179, label %180, label %183
180: ; preds = %169
%181 = load i32, i32* @stderr
%182 = call i32 (i32, i8*, ...) @fprintf(i32 %181, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %187
183: ; preds = %169
%184 = load i32, i32* @stdout
%185 = load i8*, i8** %5
%186 = call i32 (i32, i8*, ...) @fprintf(i32 %184, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %185)
br label %187
187: ; preds = %183, %180
br label %188
188: ; preds = %187
%189 = load i64, i64* @INET_ADDRSTRLEN
%190 = load i64, i64* %11
%191 = add i64 %190, %189
store i64 %191, i64* %11
br label %164
192: ; preds = %164
br label %194
193: ; preds = %138
br label %194
194: ; preds = %138, %193, %192, %162
%195 = load i32, i32* @stdout
%196 = load i32*, i32** %2
%197 = getelementptr inbounds i32, i32* %196, i64 3
%198 = load i32, i32* %197
%199 = and i32 %198, 65280
%200 = call i32 (i32, i8*, ...) @fprintf(i32 %195, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0), i32 %199)
br label %246
201: ; preds = %1
%202 = load i32, i32* @stdout
%203 = call i32 (i32, i8*, ...) @fprintf(i32 %202, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
%204 = load i32, i32* @stdout
%205 = load i32*, i32** %2
%206 = getelementptr inbounds i32, i32* %205, i64 2
%207 = load i32, i32* %206
%208 = load i32*, i32** %2
%209 = getelementptr inbounds i32, i32* %208, i64 3
%210 = load i32, i32* %209
%211 = call i32 (i32, i8*, ...) @fprintf(i32 %204, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %207, i32 %210)
%212 = load i32, i32* @stdout
%213 = load i32*, i32** %2
%214 = getelementptr inbounds i32, i32* %213, i64 4
%215 = load i32, i32* %214
%216 = load i32*, i32** %2
%217 = getelementptr inbounds i32, i32* %216, i64 5
%218 = load i32, i32* %217
%219 = call i32 (i32, i8*, ...) @fprintf(i32 %212, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i32 %215, i32 %218)
%220 = load i32, i32* @stdout
%221 = load i32*, i32** %2
%222 = getelementptr inbounds i32, i32* %221, i64 6
%223 = load i32, i32* %222
%224 = load i32*, i32** %2
%225 = getelementptr inbounds i32, i32* %224, i64 7
%226 = load i32, i32* %225
%227 = call i32 (i32, i8*, ...) @fprintf(i32 %220, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i32 %223, i32 %226)
%228 = load i64, i64* @INET_ADDRSTRLEN
%229 = mul i64 %228, 1
%230 = call i8* @malloc(i64 %229)
store i8* %230, i8** %5
%231 = load i32, i32* @AF_INET
%232 = load i32*, i32** %2
%233 = getelementptr inbounds i32, i32* %232, i64 8
%234 = load i8*, i8** %5
%235 = load i64, i64* @INET_ADDRSTRLEN
%236 = call i32* @inet_ntop(i32 %231, i32* %233, i8* %234, i64 %235)
%237 = icmp eq i32* %236, null
br i1 %237, label %238, label %241
238: ; preds = %201
%239 = load i32, i32* @stderr
%240 = call i32 (i32, i8*, ...) @fprintf(i32 %239, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %245
241: ; preds = %201
%242 = load i32, i32* @stdout
%243 = load i8*, i8** %5
%244 = call i32 (i32, i8*, ...) @fprintf(i32 %242, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %243)
br label %245
245: ; preds = %241, %238
br label %246
246: ; preds = %1, %245, %194, %137, %105, %73, %41
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"\09 (%02d) \00"
@.str.1 = [11 x i8] c"Security: \00"
@.str.2 = [3 x i8] c"%x\00"
@.str.3 = [21 x i8] c"Loose source route:\0A\00"
@INET_ADDRSTRLEN = global i64 0
@AF_INET = global i32 0
@stderr = global i32 0
@.str.4 = [26 x i8] c"Error retrieving address.\00"
@.str.5 = [7 x i8] c"\09\09\09%s\0A\00"
@.str.6 = [15 x i8] c"Record route:\0A\00"
@.str.7 = [22 x i8] c"Strict source route:\0A\00"
@.str.8 = [13 x i8] c"Timestamps:\0A\00"
@.str.9 = [5 x i8] c"\09\09%d\00"
@.str.10 = [6 x i8] c"\09\09%s\0A\00"
@.str.11 = [40 x i8] c"\09(Option has overflowed by %d modules)\0A\00"
@.str.12 = [13 x i8] c"Traceroute:\0A\00"
@.str.13 = [11 x i8] c"\09Id: %x%x\0A\00"
@.str.14 = [27 x i8] c"\09Outbound hop count: %x%x\0A\00"
@.str.15 = [25 x i8] c"\09Return hop count: %x%x\0A\00"
@.str.16 = [26 x i8] c"\09Originator IP address%s\0A\00"
define void @ip4_print_option(i32* %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
switch i32 %2, label %176 [
i32 2, label %7
i32 3, label %22
i32 7, label %47
i32 9, label %72
i32 68, label %97
i32 82, label %143
]
7: ; preds = %1
%8 = load i32, i32* @stdout
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %4, 0
br i1 %10, label %176, label %11
11: ; preds = %7
%12 = sext i32 %4 to i64
br label %13
13: ; preds = %11, %13
%14 = phi i64 [ %20, %13 ], [ 0, %11 ]
%15 = load i32, i32* @stdout
%16 = add i64 %14, 2
%17 = getelementptr inbounds i32, i32* %0, i64 %16
%18 = load i32, i32* %17
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = add nuw i64 %14, 1
%21 = icmp eq i64 %20, %12
br i1 %21, label %176, label %13
22: ; preds = %1
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%25 = sext i32 %4 to i64
%26 = icmp eq i32 %4, 0
br i1 %26, label %176, label %27
27: ; preds = %22
%28 = getelementptr inbounds i32, i32* %0, i64 2
%29 = load i64, i64* @INET_ADDRSTRLEN
br label %30
30: ; preds = %27, %43
%31 = phi i64 [ %29, %27 ], [ %44, %43 ]
%32 = phi i64 [ 0, %27 ], [ %45, %43 ]
%33 = tail call i8* @malloc(i64 %31)
%34 = load i32, i32* @AF_INET
%35 = tail call i32* @inet_ntop(i32 %34, i32* %28, i8* %33, i64 %31)
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %40
37: ; preds = %30
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %43
40: ; preds = %30
%41 = load i32, i32* @stdout
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %33)
br label %43
43: ; preds = %37, %40
%44 = load i64, i64* @INET_ADDRSTRLEN
%45 = add i64 %44, %32
%46 = icmp ult i64 %45, %25
br i1 %46, label %30, label %176
47: ; preds = %1
%48 = load i32, i32* @stdout
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%50 = sext i32 %4 to i64
%51 = icmp eq i32 %4, 0
br i1 %51, label %176, label %52
52: ; preds = %47
%53 = getelementptr inbounds i32, i32* %0, i64 2
%54 = load i64, i64* @INET_ADDRSTRLEN
br label %55
55: ; preds = %52, %68
%56 = phi i64 [ %54, %52 ], [ %69, %68 ]
%57 = phi i64 [ 0, %52 ], [ %70, %68 ]
%58 = tail call i8* @malloc(i64 %56)
%59 = load i32, i32* @AF_INET
%60 = tail call i32* @inet_ntop(i32 %59, i32* %53, i8* %58, i64 %56)
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %65
62: ; preds = %55
%63 = load i32, i32* @stderr
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %68
65: ; preds = %55
%66 = load i32, i32* @stdout
%67 = tail call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %58)
br label %68
68: ; preds = %62, %65
%69 = load i64, i64* @INET_ADDRSTRLEN
%70 = add i64 %69, %57
%71 = icmp ult i64 %70, %50
br i1 %71, label %55, label %176
72: ; preds = %1
%73 = load i32, i32* @stdout
%74 = tail call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%75 = sext i32 %4 to i64
%76 = icmp eq i32 %4, 0
br i1 %76, label %176, label %77
77: ; preds = %72
%78 = getelementptr inbounds i32, i32* %0, i64 2
%79 = load i64, i64* @INET_ADDRSTRLEN
br label %80
80: ; preds = %77, %93
%81 = phi i64 [ %79, %77 ], [ %94, %93 ]
%82 = phi i64 [ 0, %77 ], [ %95, %93 ]
%83 = tail call i8* @malloc(i64 %81)
%84 = load i32, i32* @AF_INET
%85 = tail call i32* @inet_ntop(i32 %84, i32* %78, i8* %83, i64 %81)
%86 = icmp eq i32* %85, null
br i1 %86, label %87, label %90
87: ; preds = %80
%88 = load i32, i32* @stderr
%89 = tail call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %93
90: ; preds = %80
%91 = load i32, i32* @stdout
%92 = tail call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %83)
br label %93
93: ; preds = %87, %90
%94 = load i64, i64* @INET_ADDRSTRLEN
%95 = add i64 %94, %82
%96 = icmp ult i64 %95, %75
br i1 %96, label %80, label %176
97: ; preds = %1
%98 = load i32, i32* @stdout
%99 = tail call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%100 = getelementptr inbounds i32, i32* %0, i64 3
%101 = load i32, i32* %100
%102 = trunc i32 %101 to i8
switch i8 %102, label %137 [
i8 0, label %109
i8 1, label %103
]
103: ; preds = %97
%104 = sext i32 %4 to i64
%105 = icmp eq i32 %4, 0
br i1 %105, label %137, label %106
106: ; preds = %103
%107 = getelementptr inbounds i32, i32* %0, i64 7
%108 = load i64, i64* @INET_ADDRSTRLEN
br label %120
109: ; preds = %97
%110 = sext i32 %4 to i64
%111 = icmp ugt i32 %4, 1
br i1 %111, label %112, label %137
112: ; preds = %109, %112
%113 = phi i64 [ %118, %112 ], [ 1, %109 ]
%114 = load i32, i32* @stdout
%115 = getelementptr inbounds i32, i32* %100, i64 %113
%116 = load i32, i32* %115
%117 = tail call i32 (i32, i8*, ...) @fprintf(i32 %114, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %116)
%118 = add i64 %113, 8
%119 = icmp ult i64 %118, %110
br i1 %119, label %112, label %137
120: ; preds = %106, %133
%121 = phi i64 [ %108, %106 ], [ %134, %133 ]
%122 = phi i64 [ 0, %106 ], [ %135, %133 ]
%123 = tail call i8* @malloc(i64 %121)
%124 = load i32, i32* @AF_INET
%125 = tail call i32* @inet_ntop(i32 %124, i32* %107, i8* %123, i64 %121)
%126 = icmp eq i32* %125, null
br i1 %126, label %127, label %130
127: ; preds = %120
%128 = load i32, i32* @stderr
%129 = tail call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %133
130: ; preds = %120
%131 = load i32, i32* @stdout
%132 = tail call i32 (i32, i8*, ...) @fprintf(i32 %131, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %123)
br label %133
133: ; preds = %127, %130
%134 = load i64, i64* @INET_ADDRSTRLEN
%135 = add i64 %134, %122
%136 = icmp ult i64 %135, %104
br i1 %136, label %120, label %137
137: ; preds = %133, %112, %103, %109, %97
%138 = load i32, i32* @stdout
%139 = getelementptr inbounds i32, i32* %0, i64 6
%140 = load i32, i32* %139
%141 = and i32 %140, 65280
%142 = tail call i32 (i32, i8*, ...) @fprintf(i32 %138, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0), i32 %141)
br label %176
143: ; preds = %1
%144 = load i32, i32* @stdout
%145 = tail call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
%146 = load i32, i32* @stdout
%147 = getelementptr inbounds i32, i32* %0, i64 2
%148 = load i32, i32* %147
%149 = getelementptr inbounds i32, i32* %0, i64 3
%150 = load i32, i32* %149
%151 = tail call i32 (i32, i8*, ...) @fprintf(i32 %146, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %148, i32 %150)
%152 = load i32, i32* @stdout
%153 = getelementptr inbounds i32, i32* %0, i64 4
%154 = load i32, i32* %153
%155 = getelementptr inbounds i32, i32* %0, i64 5
%156 = load i32, i32* %155
%157 = tail call i32 (i32, i8*, ...) @fprintf(i32 %152, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i32 %154, i32 %156)
%158 = load i32, i32* @stdout
%159 = getelementptr inbounds i32, i32* %0, i64 6
%160 = load i32, i32* %159
%161 = getelementptr inbounds i32, i32* %0, i64 7
%162 = load i32, i32* %161
%163 = tail call i32 (i32, i8*, ...) @fprintf(i32 %158, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i32 %160, i32 %162)
%164 = load i64, i64* @INET_ADDRSTRLEN
%165 = tail call i8* @malloc(i64 %164)
%166 = load i32, i32* @AF_INET
%167 = getelementptr inbounds i32, i32* %0, i64 8
%168 = tail call i32* @inet_ntop(i32 %166, i32* %167, i8* %165, i64 %164)
%169 = icmp eq i32* %168, null
br i1 %169, label %170, label %173
170: ; preds = %143
%171 = load i32, i32* @stderr
%172 = tail call i32 (i32, i8*, ...) @fprintf(i32 %171, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %176
173: ; preds = %143
%174 = load i32, i32* @stdout
%175 = tail call i32 (i32, i8*, ...) @fprintf(i32 %174, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %165)
br label %176
176: ; preds = %93, %68, %43, %13, %72, %47, %22, %7, %170, %173, %1, %137
ret void
}