#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 SOCK_DGRAM;
int SOCK_STREAM;
int atoi(char *);
int /*<<< orphan*/ slog(int, char *, char *);
scalar_t__ strcmp(char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strstr(char *, char *);
void parseNetworkData(char *string, char *destinationHost, int *destinationPort,
                      int *socketType, char *protocolName) {
  *destinationPort = 514;
  *socketType = SOCK_DGRAM;
  strncpy(destinationHost, "localhost", 256);
  strncpy(protocolName, "udp", 256);
  string += strlen("network=");
  if (strlen(string)) {
    char *port = strstr(string, ":");
    if (port) {
      if ((port - string) < 256) {
        strncpy(destinationHost, string, (port - string));
        destinationHost[port - string] = '\0';
      } else {
        strncpy(destinationHost, string, 256);
        destinationHost[256 - 1] = '\0';
        slog(2, "WARNING: hostname truncated to: %s!\n", destinationHost);
      }
      string = ++port;
      char *proto = strstr(string, ":");
      if (proto) {
        char destPortStr[proto - string + 1];
        strncpy(destPortStr, string, proto - string);
        destPortStr[proto - string] = '\0';
        *destinationPort = atoi(destPortStr);
        proto++;
        if (strcmp("tcp", proto) == 0 || strcmp("TCP", proto) == 0) {
          strncpy(protocolName, "tcp", 256);
          *socketType = SOCK_STREAM;
        } else if (strcmp("rtcp", proto) == 0 || strcmp("TCP", proto) == 0) {
          strncpy(protocolName, "rtcp", 256);
          *socketType = SOCK_STREAM;
        }
      } else {
        if (strlen(port)) {
          *destinationPort = atoi(port);
        }
      }
    } else {
      strncpy(destinationHost, string, 256);
    }
    if (strlen(destinationHost) == 0) {
      strncpy(destinationHost, "localhost", 256);
      slog(2, "WARNING: assuming hostname: %s!\n", destinationHost);
    }
  }
}


x86 assembly (clang, -O0):
<parseNetworkData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x202,(%rax)
mov    0x2e5b(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xe60(%rip),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    -0x28(%rbp),%rdi
lea    0xe55(%rip),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
lea    0xe48(%rip),%rdi
call   1040 <strlen@plt>
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
je     146b <parseNetworkData+0x30b>
mov    -0x8(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1080 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1417 <parseNetworkData+0x2b7>
mov    -0x30(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x100,%rax
jge    124e <parseNetworkData+0xee>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1280 <parseNetworkData+0x120>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,0xff(%rax)
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
lea    0xd9e(%rip),%rsi
call   1060 <slog@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xd7c(%rip),%rsi
call   1080 <strstr@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     13e9 <parseNetworkData+0x289>
mov    -0x38(%rbp),%rcx
mov    -0x8(%rbp),%rax
sub    %rax,%rcx
mov    %rcx,%rax
add    $0x1,%rax
mov    %rsp,%rdx
mov    %rdx,-0x40(%rbp)
add    $0x10,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x50(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x38(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
movb   $0x0,(%rdi,%rax,1)
call   1070 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xd15(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1357 <parseNetworkData+0x1f7>
mov    -0x38(%rbp),%rsi
lea    0xcf6(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1380 <parseNetworkData+0x220>
mov    -0x28(%rbp),%rdi
lea    0xce1(%rip),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    0x2c65(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    13dd <parseNetworkData+0x27d>
mov    -0x38(%rbp),%rsi
lea    0xcb7(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     13b4 <parseNetworkData+0x254>
mov    -0x38(%rbp),%rsi
lea    0xc99(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    13d8 <parseNetworkData+0x278>
mov    -0x28(%rbp),%rdi
lea    0xc83(%rip),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    0x2c08(%rip),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    13dd <parseNetworkData+0x27d>
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
jmp    1412 <parseNetworkData+0x2b2>
mov    -0x30(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
je     140d <parseNetworkData+0x2ad>
mov    -0x30(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1412 <parseNetworkData+0x2b2>
jmp    1429 <parseNetworkData+0x2c9>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jne    1466 <parseNetworkData+0x306>
mov    -0x10(%rbp),%rdi
lea    0xbb9(%rip),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
lea    0xbe6(%rip),%rsi
call   1060 <slog@plt>
jmp    146b <parseNetworkData+0x30b>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseNetworkData>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8,%r14
mov    %rcx,%r12
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
movl   $0x202,(%rdx)
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rcx)
lea    0xe68(%rip),%rsi
mov    %r13,%rdi
mov    $0x100,%edx
call   1030 <strncpy@plt>
lea    0xe5e(%rip),%rsi
mov    %r14,%rdi
mov    $0x100,%edx
call   1030 <strncpy@plt>
add    $0x8,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
je     1378 <parseNetworkData+0x218>
mov    %r15,-0x38(%rbp)
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     1210 <parseNetworkData+0xb0>
mov    %rax,%r15
mov    %r14,-0x48(%rbp)
mov    %rax,%r14
sub    %rbx,%r14
mov    %r13,%rdi
mov    %rbx,%rsi
cmp    $0xff,%r14
jg     1225 <parseNetworkData+0xc5>
mov    %r14d,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x0(%r13,%r14,1)
jmp    124b <parseNetworkData+0xeb>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
jmp    1349 <parseNetworkData+0x1e9>
mov    $0x100,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xff(%r13)
lea    0xdd0(%rip),%rsi
mov    $0x2,%edi
mov    %r13,%rdx
call   1070 <slog@plt>
add    $0x1,%r15
mov    %r15,%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     1307 <parseNetworkData+0x1a7>
mov    %rax,%r14
mov    %r12,-0x30(%rbp)
mov    %rsp,-0x40(%rbp)
mov    %rax,%rbx
sub    %r15,%rbx
lea    0x10(%rbx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %r12,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r12,1)
mov    %r12,%rdi
call   1080 <atoi@plt>
mov    -0x38(%rbp),%rcx
mov    %eax,(%rcx)
add    $0x1,%r14
lea    0xd86(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1324 <parseNetworkData+0x1c4>
lea    0xd6a(%rip),%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
mov    -0x30(%rbp),%r15
je     1328 <parseNetworkData+0x1c8>
lea    0xd56(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1328 <parseNetworkData+0x1c8>
lea    0xd3b(%rip),%rdi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1345 <parseNetworkData+0x1e5>
jmp    1328 <parseNetworkData+0x1c8>
mov    %r15,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
je     1349 <parseNetworkData+0x1e9>
mov    %r15,%rdi
call   1080 <atoi@plt>
mov    -0x38(%rbp),%rcx
mov    %eax,(%rcx)
jmp    1349 <parseNetworkData+0x1e9>
mov    -0x30(%rbp),%r15
mov    -0x48(%rbp),%rdi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
mov    0x2c98(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%r15)
mov    -0x40(%rbp),%rsp
cmpb   $0x0,0x0(%r13)
jne    1378 <parseNetworkData+0x218>
lea    0xca9(%rip),%rsi
mov    %r13,%rdi
mov    $0x100,%edx
call   1030 <strncpy@plt>
lea    0xcd1(%rip),%rsi
mov    $0x2,%edi
mov    %r13,%rdx
call   1070 <slog@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@SOCK_DGRAM = global i32 0
@.str = [10 x i8] c"localhost\00"
@.str.1 = [4 x i8] c"udp\00"
@.str.2 = [9 x i8] c"network=\00"
@.str.3 = [2 x i8] c":\00"
@.str.4 = [37 x i8] c"WARNING: hostname truncated to: %s!\0A\00"
@.str.5 = [4 x i8] c"tcp\00"
@.str.6 = [4 x i8] c"TCP\00"
@SOCK_STREAM = global i32 0
@.str.7 = [5 x i8] c"rtcp\00"
@.str.8 = [33 x i8] c"WARNING: assuming hostname: %s!\0A\00"
define void @parseNetworkData(i8* %0, i8* %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%15 = load i32*, i32** %8
store i32 514, i32* %15
%16 = load i32, i32* @SOCK_DGRAM
%17 = load i32*, i32** %9
store i32 %16, i32* %17
%18 = load i8*, i8** %7
%19 = call i32 @strncpy(i8* %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 256)
%20 = load i8*, i8** %10
%21 = call i32 @strncpy(i8* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 256)
%22 = call i64 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%23 = load i8*, i8** %6
%24 = getelementptr inbounds i8, i8* %23, i64 %22
store i8* %24, i8** %6
%25 = load i8*, i8** %6
%26 = call i64 @strlen(i8* %25)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %151
28: ; preds = %5
%29 = load i8*, i8** %6
%30 = call i8* @strstr(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %30, i8** %11
%31 = load i8*, i8** %11
%32 = icmp ne i8* %31, null
br i1 %32, label %33, label %137
33: ; preds = %28
%34 = load i8*, i8** %11
%35 = load i8*, i8** %6
%36 = ptrtoint i8* %34 to i64
%37 = ptrtoint i8* %35 to i64
%38 = sub i64 %36, %37
%39 = icmp slt i64 %38, 256
br i1 %39, label %40, label %57
40: ; preds = %33
%41 = load i8*, i8** %7
%42 = load i8*, i8** %6
%43 = load i8*, i8** %11
%44 = load i8*, i8** %6
%45 = ptrtoint i8* %43 to i64
%46 = ptrtoint i8* %44 to i64
%47 = sub i64 %45, %46
%48 = trunc i64 %47 to i32
%49 = call i32 @strncpy(i8* %41, i8* %42, i32 %48)
%50 = load i8*, i8** %7
%51 = load i8*, i8** %11
%52 = load i8*, i8** %6
%53 = ptrtoint i8* %51 to i64
%54 = ptrtoint i8* %52 to i64
%55 = sub i64 %53, %54
%56 = getelementptr inbounds i8, i8* %50, i64 %55
store i8 0, i8* %56
br label %65
57: ; preds = %33
%58 = load i8*, i8** %7
%59 = load i8*, i8** %6
%60 = call i32 @strncpy(i8* %58, i8* %59, i32 256)
%61 = load i8*, i8** %7
%62 = getelementptr inbounds i8, i8* %61, i64 255
store i8 0, i8* %62
%63 = load i8*, i8** %7
%64 = call i32 @slog(i32 2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %63)
br label %65
65: ; preds = %57, %40
%66 = load i8*, i8** %11
%67 = getelementptr inbounds i8, i8* %66, i32 1
store i8* %67, i8** %11
store i8* %67, i8** %6
%68 = load i8*, i8** %6
%69 = call i8* @strstr(i8* %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %69, i8** %12
%70 = load i8*, i8** %12
%71 = icmp ne i8* %70, null
br i1 %71, label %72, label %127
72: ; preds = %65
%73 = load i8*, i8** %12
%74 = load i8*, i8** %6
%75 = ptrtoint i8* %73 to i64
%76 = ptrtoint i8* %74 to i64
%77 = sub i64 %75, %76
%78 = add nsw i64 %77, 1
%79 = call i8* @llvm.stacksave()
store i8* %79, i8** %13
%80 = alloca i8, i64 %78
store i64 %78, i64* %14
%81 = load i8*, i8** %6
%82 = load i8*, i8** %12
%83 = load i8*, i8** %6
%84 = ptrtoint i8* %82 to i64
%85 = ptrtoint i8* %83 to i64
%86 = sub i64 %84, %85
%87 = trunc i64 %86 to i32
%88 = call i32 @strncpy(i8* %80, i8* %81, i32 %87)
%89 = load i8*, i8** %12
%90 = load i8*, i8** %6
%91 = ptrtoint i8* %89 to i64
%92 = ptrtoint i8* %90 to i64
%93 = sub i64 %91, %92
%94 = getelementptr inbounds i8, i8* %80, i64 %93
store i8 0, i8* %94
%95 = call i32 @atoi(i8* %80)
%96 = load i32*, i32** %8
store i32 %95, i32* %96
%97 = load i8*, i8** %12
%98 = getelementptr inbounds i8, i8* %97, i32 1
store i8* %98, i8** %12
%99 = load i8*, i8** %12
%100 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %99)
%101 = icmp eq i64 %100, 0
br i1 %101, label %106, label %102
102: ; preds = %72
%103 = load i8*, i8** %12
%104 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %103)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %111
106: ; preds = %102, %72
%107 = load i8*, i8** %10
%108 = call i32 @strncpy(i8* %107, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 256)
%109 = load i32, i32* @SOCK_STREAM
%110 = load i32*, i32** %9
store i32 %109, i32* %110
br label %125
111: ; preds = %102
%112 = load i8*, i8** %12
%113 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %112)
%114 = icmp eq i64 %113, 0
br i1 %114, label %119, label %115
115: ; preds = %111
%116 = load i8*, i8** %12
%117 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %116)
%118 = icmp eq i64 %117, 0
br i1 %118, label %119, label %124
119: ; preds = %115, %111
%120 = load i8*, i8** %10
%121 = call i32 @strncpy(i8* %120, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 256)
%122 = load i32, i32* @SOCK_STREAM
%123 = load i32*, i32** %9
store i32 %122, i32* %123
br label %124
124: ; preds = %119, %115
br label %125
125: ; preds = %124, %106
%126 = load i8*, i8** %13
br label %136
127: ; preds = %65
%128 = load i8*, i8** %11
%129 = call i64 @strlen(i8* %128)
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %135
131: ; preds = %127
%132 = load i8*, i8** %11
%133 = call i32 @atoi(i8* %132)
%134 = load i32*, i32** %8
store i32 %133, i32* %134
br label %135
135: ; preds = %131, %127
br label %136
136: ; preds = %135, %125
br label %141
137: ; preds = %28
%138 = load i8*, i8** %7
%139 = load i8*, i8** %6
%140 = call i32 @strncpy(i8* %138, i8* %139, i32 256)
br label %141
141: ; preds = %137, %136
%142 = load i8*, i8** %7
%143 = call i64 @strlen(i8* %142)
%144 = icmp eq i64 %143, 0
br i1 %144, label %145, label %150
145: ; preds = %141
%146 = load i8*, i8** %7
%147 = call i32 @strncpy(i8* %146, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 256)
%148 = load i8*, i8** %7
%149 = call i32 @slog(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* %148)
br label %150
150: ; preds = %145, %141
br label %151
151: ; preds = %150, %5
ret void
}

LLVM IR (-O2):
@SOCK_DGRAM = global i32 0
@.str = [10 x i8] c"localhost\00"
@.str.1 = [4 x i8] c"udp\00"
@.str.4 = [37 x i8] c"WARNING: hostname truncated to: %s!\0A\00"
@.str.5 = [4 x i8] c"tcp\00"
@.str.6 = [4 x i8] c"TCP\00"
@SOCK_STREAM = global i32 0
@.str.7 = [5 x i8] c"rtcp\00"
@.str.8 = [33 x i8] c"WARNING: assuming hostname: %s!\0A\00"
define void @parseNetworkData(i8* %0, i8* %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i8* %4) {
store i32 514, i32* %2
%6 = load i32, i32* @SOCK_DGRAM
store i32 %6, i32* %3
%7 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 256)
%8 = tail call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 256)
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = tail call i64 @strlen(i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %73, label %12
12: ; preds = %5
%13 = tail call i8* @strchr(i8* %9, i32 58)
%14 = icmp eq i8* %13, null
br i1 %14, label %65, label %15
15: ; preds = %12
%16 = ptrtoint i8* %13 to i64
%17 = ptrtoint i8* %9 to i64
%18 = sub i64 %16, %17
%19 = icmp slt i64 %18, 256
br i1 %19, label %20, label %24
20: ; preds = %15
%21 = trunc i64 %18 to i32
%22 = tail call i32 @strncpy(i8* %1, i8* %9, i32 %21)
%23 = getelementptr inbounds i8, i8* %1, i64 %18
store i8 0, i8* %23
br label %28
24: ; preds = %15
%25 = tail call i32 @strncpy(i8* %1, i8* %9, i32 256)
%26 = getelementptr inbounds i8, i8* %1, i64 255
store i8 0, i8* %26
%27 = tail call i32 @slog(i32 2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %28
28: ; preds = %24, %20
%29 = getelementptr inbounds i8, i8* %13, i64 1
%30 = tail call i8* @strchr(i8* %29, i32 58)
%31 = icmp eq i8* %30, null
br i1 %31, label %60, label %32
32: ; preds = %28
%33 = ptrtoint i8* %30 to i64
%34 = ptrtoint i8* %29 to i64
%35 = sub i64 %33, %34
%36 = add nsw i64 %35, 1
%37 = tail call i8* @llvm.stacksave()
%38 = alloca i8, i64 %36
%39 = trunc i64 %35 to i32
%40 = call i32 @strncpy(i8* %38, i8* %29, i32 %39)
%41 = getelementptr inbounds i8, i8* %38, i64 %35
store i8 0, i8* %41
%42 = call i32 @atoi(i8* %38)
store i32 %42, i32* %2
%43 = getelementptr inbounds i8, i8* %30, i64 1
%44 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %55, label %46
46: ; preds = %32
%47 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %43)
%48 = icmp eq i64 %47, 0
br i1 %48, label %55, label %49
49: ; preds = %46
%50 = call i64 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %43)
%51 = icmp eq i64 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %43)
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %59
55: ; preds = %49, %52, %32, %46
%56 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %46 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %32 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %52 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %49 ]
%57 = call i32 @strncpy(i8* %4, i8* %56, i32 256)
%58 = load i32, i32* @SOCK_STREAM
store i32 %58, i32* %3
br label %59
59: ; preds = %55, %52
br label %67
60: ; preds = %28
%61 = tail call i64 @strlen(i8* %29)
%62 = icmp eq i64 %61, 0
br i1 %62, label %67, label %63
63: ; preds = %60
%64 = tail call i32 @atoi(i8* %29)
store i32 %64, i32* %2
br label %67
65: ; preds = %12
%66 = tail call i32 @strncpy(i8* %1, i8* %9, i32 256)
br label %67
67: ; preds = %59, %63, %60, %65
%68 = load i8, i8* %1
%69 = icmp eq i8 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 256)
%72 = call i32 @slog(i32 2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* %1)
br label %73
73: ; preds = %67, %70, %5
ret void
}