#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 */
char *GetSip(char *, char const *);
int /*<<< orphan*/ GetVports(char **, char const *);
char *GetVtype(char *, char const *);
void ParseRequest(const char *req, char *Vtype, char *Sip,
                  char (*Vports)[1024 + 1]) {
  if (NULL == (req = GetVtype(Vtype, req)))
    return;
  if (NULL == (req = GetSip(Sip, req)))
    return;
  GetVports(Vports, req);
}


x86 assembly (clang, -O0):
<ParseRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <GetVtype@plt>
mov    %rax,%rcx
mov    %rcx,-0x8(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    116c <ParseRequest+0x3c>
jmp    119d <ParseRequest+0x6d>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <GetSip@plt>
mov    %rax,%rcx
mov    %rcx,-0x8(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1190 <ParseRequest+0x60>
jmp    119d <ParseRequest+0x6d>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <GetVports@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseRequest>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1050 <GetVtype@plt>
test   %rax,%rax
je     116f <ParseRequest+0x3f>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <GetSip@plt>
test   %rax,%rax
je     116f <ParseRequest+0x3f>
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <GetVports@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ParseRequest(i8* %0, i8* %1, i8* %2, [1025 x i8]* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca [1025 x i8]*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store [1025 x i8]* %3, [1025 x i8]** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = call i8* @GetVtype(i8* %9, i8* %10)
store i8* %11, i8** %5
%12 = icmp eq i8* null, %11
br i1 %12, label %13, label %14
13: ; preds = %4
br label %25
14: ; preds = %4
%15 = load i8*, i8** %7
%16 = load i8*, i8** %5
%17 = call i8* @GetSip(i8* %15, i8* %16)
store i8* %17, i8** %5
%18 = icmp eq i8* null, %17
br i1 %18, label %19, label %20
19: ; preds = %14
br label %25
20: ; preds = %14
%21 = load [1025 x i8]*, [1025 x i8]** %8
%22 = bitcast [1025 x i8]* %21 to i8**
%23 = load i8*, i8** %5
%24 = call i32 @GetVports(i8** %22, i8* %23)
br label %25
25: ; preds = %20, %19, %13
ret void
}

LLVM IR (-O2):
define void @ParseRequest(i8* %0, i8* %1, i8* %2, [1025 x i8]* %3) {
%5 = tail call i8* @GetVtype(i8* %1, i8* %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = tail call i8* @GetSip(i8* %2, i8* %5)
%9 = icmp eq i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = bitcast [1025 x i8]* %3 to i8**
%12 = tail call i32 @GetVports(i8** %11, i8* %8)
br label %13
13: ; preds = %7, %4, %10
ret void
}