#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*/ Utils_tokenizeMessage(char const *, char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int Control_NetworkDataType(const char *msg, char *user, char *data) {
  char type[8];
  if (!Utils_tokenizeMessage(msg, type, user, data))
    return 19;
  if (0 == strcmp(type, "MESSAGE_"))
    return 22;
  if (0 == strcmp(type, "CONN_REQ"))
    return 20;
  if (0 == strcmp(type, "CONN_RES"))
    return 21;
  if (0 == strcmp(type, "CONNCONF"))
    return 23;
  if (0 == strcmp(type, "_DISCONN"))
    return 24;
  return 19;
}


x86 assembly (clang, -O0):
<Control_NetworkDataType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <Utils_tokenizeMessage@plt>
cmp    $0x0,%eax
jne    115e <Control_NetworkDataType+0x3e>
movl   $0x13,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
lea    -0x28(%rbp),%rdi
lea    0xe97(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1188 <Control_NetworkDataType+0x68>
movl   $0x16,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
lea    -0x28(%rbp),%rdi
lea    0xe76(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    11b2 <Control_NetworkDataType+0x92>
movl   $0x14,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
lea    -0x28(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    11dc <Control_NetworkDataType+0xbc>
movl   $0x15,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
lea    -0x28(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1206 <Control_NetworkDataType+0xe6>
movl   $0x17,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
lea    -0x28(%rbp),%rdi
lea    0xe13(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1230 <Control_NetworkDataType+0x110>
movl   $0x18,-0x4(%rbp)
jmp    1237 <Control_NetworkDataType+0x117>
movl   $0x13,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Control_NetworkDataType>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rsp,%rsi
call   1030 <Utils_tokenizeMessage@plt>
test   %eax,%eax
je     11a2 <Control_NetworkDataType+0x82>
lea    0xec6(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11a9 <Control_NetworkDataType+0x89>
lea    0xebb(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b0 <Control_NetworkDataType+0x90>
lea    0xeb0(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b7 <Control_NetworkDataType+0x97>
lea    0xea5(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11be <Control_NetworkDataType+0x9e>
lea    0xe9a(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
lea    (%rcx,%rcx,4),%eax
add    $0x13,%eax
pop    %rcx
ret
mov    $0x13,%eax
pop    %rcx
ret
mov    $0x16,%eax
pop    %rcx
ret
mov    $0x14,%eax
pop    %rcx
ret
mov    $0x15,%eax
pop    %rcx
ret
mov    $0x17,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"MESSAGE_\00"
@.str.1 = [9 x i8] c"CONN_REQ\00"
@.str.2 = [9 x i8] c"CONN_RES\00"
@.str.3 = [9 x i8] c"CONNCONF\00"
@.str.4 = [9 x i8] c"_DISCONN\00"
define i32 @Control_NetworkDataType(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [8 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load i8*, i8** %5
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = call i32 @Utils_tokenizeMessage(i8* %9, i8* %10, i8* %11, i8* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %3
store i32 19, i32* %4
br label %42
16: ; preds = %3
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%19 = icmp eq i64 0, %18
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 22, i32* %4
br label %42
21: ; preds = %16
%22 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i64 0, %23
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 20, i32* %4
br label %42
26: ; preds = %21
%27 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 0, %28
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 21, i32* %4
br label %42
31: ; preds = %26
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%34 = icmp eq i64 0, %33
br i1 %34, label %35, label %36
35: ; preds = %31
store i32 23, i32* %4
br label %42
36: ; preds = %31
%37 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp eq i64 0, %38
br i1 %39, label %40, label %41
40: ; preds = %36
store i32 24, i32* %4
br label %42
41: ; preds = %36
store i32 19, i32* %4
br label %42
42: ; preds = %41, %40, %35, %30, %25, %20, %15
%43 = load i32, i32* %4
ret i32 %43
}

LLVM IR (-O2):
@.str = [9 x i8] c"MESSAGE_\00"
@.str.1 = [9 x i8] c"CONN_REQ\00"
@.str.2 = [9 x i8] c"CONN_RES\00"
@.str.3 = [9 x i8] c"CONNCONF\00"
@.str.4 = [9 x i8] c"_DISCONN\00"
define i32 @Control_NetworkDataType(i8* %0, i8* %1, i8* %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @Utils_tokenizeMessage(i8* %0, i8* %5, i8* %1, i8* %2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %24, label %8
8: ; preds = %3
%9 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %24, label %11
11: ; preds = %8
%12 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %24, label %14
14: ; preds = %11
%15 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %24, label %17
17: ; preds = %14
%18 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %24, label %20
20: ; preds = %17
%21 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
%23 = select i1 %22, i32 24, i32 19
br label %24
24: ; preds = %20, %17, %14, %11, %8, %3
%25 = phi i32 [ 19, %3 ], [ 22, %8 ], [ 20, %11 ], [ 21, %14 ], [ 23, %17 ], [ %23, %20 ]
ret i32 %25
}