#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 /*<<< orphan*/ uint32_t;
struct iphdr {
  int protocol;
  int /*<<< orphan*/ ihl;
  int /*<<< orphan*/ daddr;
  int /*<<< orphan*/ saddr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int ETHER_HDR_LEN;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ *inet_ntop(int /*<<< orphan*/, int /*<<< orphan*/ *, char *,
                              int);
int /*<<< orphan*/ ip4_print_protocol(int);
char *malloc(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ tcp_succinct_analysis(unsigned char const *,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/ const);
int /*<<< orphan*/ udp_short_analysis(unsigned char const *,
                                      int /*<<< orphan*/);
void ip4_succinct_analysis(const unsigned char *packet, const uint32_t len) {
  const struct iphdr *ip4_header;
  char *src, *dst;
  ip4_header = (const struct iphdr *)(packet + ETHER_HDR_LEN);
  src = malloc(INET_ADDRSTRLEN * sizeof(char));
  dst = malloc(INET_ADDRSTRLEN * sizeof(char));
  if (src == NULL) {
    fprintf(stderr, "Error: could not allocate memory for source address.");
    fprintf(stderr, " Discarding packet.\n");
    return;
  }
  if (dst == NULL) {
    fprintf(stderr, "Error: could not allocate memory for dest address.");
    fprintf(stderr, " Discarding packet.\n");
    free(src);
    return;
  }
  if ((inet_ntop(AF_INET, &ip4_header->saddr, src, INET_ADDRSTRLEN)) == NULL) {
    fprintf(stderr, "Error retrieving source address. Discarding packet.\n");
    return;
  }
  if ((inet_ntop(AF_INET, &ip4_header->daddr, dst, INET_ADDRSTRLEN)) == NULL) {
    fprintf(stderr, "Error retrieving dest address. Discarding packet.\n");
    return;
  }
  fprintf(stdout, " - %s", src);
  fprintf(stdout, " -> %s", dst);
  fprintf(stdout, " - ");
  ip4_print_protocol(ip4_header->protocol);
  free(src);
  free(dst);
  switch (ip4_header->protocol) {
  case 6:
    tcp_succinct_analysis(packet, ip4_header->ihl, len);
    fprintf(stdout, "\n");
    break;
  case 17:
    udp_short_analysis(packet, ip4_header->ihl);
    fprintf(stdout, "\n");
    break;
  default:
    fprintf(stdout, "\n");
    break;
  }
}


x86 assembly (clang, -O0):
<ip4_succinct_analysis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2e36(%rip),%rcx
movslq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    0x2e35(%rip),%rax
movslq (%rax),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e1c(%rip),%rax
movslq (%rax),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1204 <ip4_succinct_analysis+0x94>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
lea    0xe1f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
cmpq   $0x0,-0x28(%rbp)
jne    124b <ip4_succinct_analysis+0xdb>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
lea    0xe16(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
lea    0xe52(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1050 <free@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
mov    -0x20(%rbp),%rdx
mov    0x2d69(%rip),%rax
mov    (%rax),%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    1294 <ip4_succinct_analysis+0x124>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
mov    0x2d4d(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
mov    -0x28(%rbp),%rdx
mov    0x2d20(%rip),%rax
mov    (%rax),%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    12dd <ip4_succinct_analysis+0x16d>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
lea    0xdcc(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
mov    0x2ce4(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xddb(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x2d(%rbp)
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rcx
mov    -0x2d(%rbp),%al
mov    (%rcx),%edi
mov    -0x28(%rbp),%rdx
lea    0xdc3(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x38(%rbp),%rcx
mov    -0x2d(%rbp),%al
mov    (%rcx),%edi
lea    0xdb5(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1040 <ip4_print_protocol@plt>
mov    -0x20(%rbp),%rdi
call   1050 <free@plt>
mov    -0x28(%rbp),%rdi
call   1050 <free@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x6,%eax
je     1372 <ip4_succinct_analysis+0x202>
jmp    1361 <ip4_succinct_analysis+0x1f1>
mov    -0x2c(%rbp),%eax
sub    $0x11,%eax
je     13a1 <ip4_succinct_analysis+0x231>
jmp    13cd <ip4_succinct_analysis+0x25d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0xc(%rbp),%edx
call   1060 <tcp_succinct_analysis@plt>
mov    0x2c3c(%rip),%rax
mov    (%rax),%edi
lea    0xd06(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
call   1090 <udp_short_analysis@plt>
mov    0x2c10(%rip),%rax
mov    (%rax),%edi
lea    0xcda(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13e4 <ip4_succinct_analysis+0x274>
mov    0x2bf4(%rip),%rax
mov    (%rax),%edi
lea    0xcbe(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip4_succinct_analysis>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %rdi,%rbp
mov    0x2e34(%rip),%rax
movslq (%rax),%r13
mov    0x2e3a(%rip),%r14
mov    (%r14),%ebx
mov    %ebx,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
call   1080 <malloc@plt>
test   %r15,%r15
je     1286 <ip4_succinct_analysis+0x116>
mov    %rax,%r12
test   %rax,%rax
je     12a8 <ip4_succinct_analysis+0x138>
mov    %rbp,0x10(%rsp)
add    %rbp,%r13
mov    0x2e1a(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xc(%r13),%rsi
mov    %r15,%rdx
mov    %ebx,%ecx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     12e5 <ip4_succinct_analysis+0x175>
mov    0x0(%rbp),%edi
lea    0x8(%r13),%rsi
mov    (%r14),%ecx
mov    %r12,%rdx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     12f7 <ip4_succinct_analysis+0x187>
mov    0x2dbe(%rip),%rbx
mov    (%rbx),%edi
lea    0xebd(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeb0(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xea4(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%r13),%edi
call   1040 <ip4_print_protocol@plt>
mov    %r15,%rdi
call   1050 <free@plt>
mov    %r12,%rdi
call   1050 <free@plt>
mov    0x0(%r13),%eax
cmp    $0x11,%eax
je     1309 <ip4_succinct_analysis+0x199>
cmp    $0x6,%eax
mov    0x10(%rsp),%rdi
jne    1317 <ip4_succinct_analysis+0x1a7>
mov    0x4(%r13),%esi
mov    0xc(%rsp),%edx
call   1060 <tcp_succinct_analysis@plt>
jmp    1317 <ip4_succinct_analysis+0x1a7>
mov    0x2d4b(%rip),%rbx
mov    (%rbx),%edi
lea    0xd6a(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xde2(%rip),%rsi
jmp    1320 <ip4_succinct_analysis+0x1b0>
mov    0x2d29(%rip),%rbx
mov    (%rbx),%edi
lea    0xd7d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdc0(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r15,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <free@plt>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
lea    0xd73(%rip),%rsi
jmp    1320 <ip4_succinct_analysis+0x1b0>
mov    0x2cda(%rip),%rax
mov    (%rax),%edi
lea    0xd96(%rip),%rsi
jmp    1320 <ip4_succinct_analysis+0x1b0>
mov    0x4(%r13),%esi
mov    0x10(%rsp),%rdi
call   1090 <udp_short_analysis@plt>
mov    (%rbx),%edi
lea    0xd7b(%rip),%rsi
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <fprintf@plt>

LLVM IR (-O0):
%struct.iphdr = type { i32, i32, i32, i32 }
@ETHER_HDR_LEN = global i32 0
@INET_ADDRSTRLEN = global i32 0
@stderr = global i32 0
@.str = [53 x i8] c"Error: could not allocate memory for source address.\00"
@.str.1 = [21 x i8] c" Discarding packet.\0A\00"
@.str.2 = [51 x i8] c"Error: could not allocate memory for dest address.\00"
@AF_INET = global i32 0
@.str.3 = [53 x i8] c"Error retrieving source address. Discarding packet.\0A\00"
@.str.4 = [51 x i8] c"Error retrieving dest address. Discarding packet.\0A\00"
@stdout = global i32 0
@.str.5 = [6 x i8] c" - %s\00"
@.str.6 = [7 x i8] c" -> %s\00"
@.str.7 = [4 x i8] c" - \00"
@.str.8 = [2 x i8] c"\0A\00"
define void @ip4_succinct_analysis(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.iphdr*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = load i8*, i8** %3
%9 = load i32, i32* @ETHER_HDR_LEN
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = bitcast i8* %11 to %struct.iphdr*
store %struct.iphdr* %12, %struct.iphdr** %5
%13 = load i32, i32* @INET_ADDRSTRLEN
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 1
%16 = trunc i64 %15 to i32
%17 = call i8* @malloc(i32 %16)
store i8* %17, i8** %6
%18 = load i32, i32* @INET_ADDRSTRLEN
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 1
%21 = trunc i64 %20 to i32
%22 = call i8* @malloc(i32 %21)
store i8* %22, i8** %7
%23 = load i8*, i8** %6
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %30
25: ; preds = %2
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %102
30: ; preds = %2
%31 = load i8*, i8** %7
%32 = icmp eq i8* %31, null
br i1 %32, label %33, label %40
33: ; preds = %30
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%38 = load i8*, i8** %6
%39 = call i32 @free(i8* %38)
br label %102
40: ; preds = %30
%41 = load i32, i32* @AF_INET
%42 = load %struct.iphdr*, %struct.iphdr** %5
%43 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %42, i32 0, i32 3
%44 = load i8*, i8** %6
%45 = load i32, i32* @INET_ADDRSTRLEN
%46 = call i32* @inet_ntop(i32 %41, i32* %43, i8* %44, i32 %45)
%47 = icmp eq i32* %46, null
br i1 %47, label %48, label %51
48: ; preds = %40
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
br label %102
51: ; preds = %40
%52 = load i32, i32* @AF_INET
%53 = load %struct.iphdr*, %struct.iphdr** %5
%54 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %53, i32 0, i32 2
%55 = load i8*, i8** %7
%56 = load i32, i32* @INET_ADDRSTRLEN
%57 = call i32* @inet_ntop(i32 %52, i32* %54, i8* %55, i32 %56)
%58 = icmp eq i32* %57, null
br i1 %58, label %59, label %62
59: ; preds = %51
%60 = load i32, i32* @stderr
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
br label %102
62: ; preds = %51
%63 = load i32, i32* @stdout
%64 = load i8*, i8** %6
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %64)
%66 = load i32, i32* @stdout
%67 = load i8*, i8** %7
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %67)
%69 = load i32, i32* @stdout
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%71 = load %struct.iphdr*, %struct.iphdr** %5
%72 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %71, i32 0, i32 0
%73 = load i32, i32* %72
%74 = call i32 @ip4_print_protocol(i32 %73)
%75 = load i8*, i8** %6
%76 = call i32 @free(i8* %75)
%77 = load i8*, i8** %7
%78 = call i32 @free(i8* %77)
%79 = load %struct.iphdr*, %struct.iphdr** %5
%80 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %79, i32 0, i32 0
%81 = load i32, i32* %80
switch i32 %81, label %99 [
i32 6, label %82
i32 17, label %91
]
82: ; preds = %62
%83 = load i8*, i8** %3
%84 = load %struct.iphdr*, %struct.iphdr** %5
%85 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %84, i32 0, i32 1
%86 = load i32, i32* %85
%87 = load i32, i32* %4
%88 = call i32 @tcp_succinct_analysis(i8* %83, i32 %86, i32 %87)
%89 = load i32, i32* @stdout
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %102
91: ; preds = %62
%92 = load i8*, i8** %3
%93 = load %struct.iphdr*, %struct.iphdr** %5
%94 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %93, i32 0, i32 1
%95 = load i32, i32* %94
%96 = call i32 @udp_short_analysis(i8* %92, i32 %95)
%97 = load i32, i32* @stdout
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %102
99: ; preds = %62
%100 = load i32, i32* @stdout
%101 = call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %102
102: ; preds = %25, %33, %48, %59, %99, %91, %82
ret void
}

LLVM IR (-O2):
@ETHER_HDR_LEN = global i32 0
@INET_ADDRSTRLEN = global i32 0
@stderr = global i32 0
@.str = [53 x i8] c"Error: could not allocate memory for source address.\00"
@.str.1 = [21 x i8] c" Discarding packet.\0A\00"
@.str.2 = [51 x i8] c"Error: could not allocate memory for dest address.\00"
@AF_INET = global i32 0
@.str.3 = [53 x i8] c"Error retrieving source address. Discarding packet.\0A\00"
@.str.4 = [51 x i8] c"Error retrieving dest address. Discarding packet.\0A\00"
@stdout = global i32 0
@.str.5 = [6 x i8] c" - %s\00"
@.str.6 = [7 x i8] c" -> %s\00"
@.str.7 = [4 x i8] c" - \00"
@.str.8 = [2 x i8] c"\0A\00"
define void @ip4_succinct_analysis(i8* %0, i32 %1) {
%3 = load i32, i32* @ETHER_HDR_LEN
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i32, i32* @INET_ADDRSTRLEN
%7 = tail call i8* @malloc(i32 %6)
%8 = tail call i8* @malloc(i32 %6)
%9 = icmp eq i8* %7, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %72
15: ; preds = %2
%16 = icmp eq i8* %8, null
br i1 %16, label %17, label %23
17: ; preds = %15
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%22 = tail call i32 @free(i8* %7)
br label %72
23: ; preds = %15
%24 = load i32, i32* @AF_INET
%25 = getelementptr inbounds i8, i8* %5, i64 12
%26 = bitcast i8* %25 to i32*
%27 = tail call i32* @inet_ntop(i32 %24, i32* %26, i8* %7, i32 %6)
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %32
29: ; preds = %23
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
br label %72
32: ; preds = %23
%33 = load i32, i32* @AF_INET
%34 = getelementptr inbounds i8, i8* %5, i64 8
%35 = bitcast i8* %34 to i32*
%36 = load i32, i32* @INET_ADDRSTRLEN
%37 = tail call i32* @inet_ntop(i32 %33, i32* %35, i8* %8, i32 %36)
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %42
39: ; preds = %32
%40 = load i32, i32* @stderr
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
br label %72
42: ; preds = %32
%43 = load i32, i32* @stdout
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %7)
%45 = load i32, i32* @stdout
%46 = tail call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %8)
%47 = load i32, i32* @stdout
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%49 = bitcast i8* %5 to i32*
%50 = load i32, i32* %49
%51 = tail call i32 @ip4_print_protocol(i32 %50)
%52 = tail call i32 @free(i8* %7)
%53 = tail call i32 @free(i8* %8)
%54 = load i32, i32* %49
switch i32 %54, label %69 [
i32 6, label %55
i32 17, label %62
]
55: ; preds = %42
%56 = getelementptr inbounds i8, i8* %5, i64 4
%57 = bitcast i8* %56 to i32*
%58 = load i32, i32* %57
%59 = tail call i32 @tcp_succinct_analysis(i8* %0, i32 %58, i32 %1)
%60 = load i32, i32* @stdout
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %72
62: ; preds = %42
%63 = getelementptr inbounds i8, i8* %5, i64 4
%64 = bitcast i8* %63 to i32*
%65 = load i32, i32* %64
%66 = tail call i32 @udp_short_analysis(i8* %0, i32 %65)
%67 = load i32, i32* @stdout
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %72
69: ; preds = %42
%70 = load i32, i32* @stdout
%71 = tail call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %72
72: ; preds = %55, %62, %69, %39, %29, %17, %10
ret void
}