#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*/ Action_Port_Cfg(char *);
int /*<<< orphan*/ Action_Port_Set(char *);
char *Strstr(char *, char *);
void Action_Port(char *Str) {
  char *P = Str, *T;
  T = Strstr(P, "set");
  if (T) {
    Action_Port_Set(T);
    return;
  }
  T = Strstr(P, "cfg");
  if (T) {
    Action_Port_Cfg(T);
    return;
  }
}


x86 assembly (clang, -O0):
<Action_Port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1050 <Strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1171 <Action_Port+0x41>
mov    -0x18(%rbp),%rdi
call   1030 <Action_Port_Set@plt>
jmp    1199 <Action_Port+0x69>
mov    -0x10(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1050 <Strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1199 <Action_Port+0x69>
mov    -0x18(%rbp),%rdi
call   1040 <Action_Port_Cfg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Action_Port>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1050 <Strstr@plt>
test   %rax,%rax
je     114e <Action_Port+0x1e>
mov    %rax,%rdi
pop    %rbx
jmp    1030 <Action_Port_Set@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1050 <Strstr@plt>
test   %rax,%rax
je     116b <Action_Port+0x3b>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <Action_Port_Cfg@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"set\00"
@.str.1 = [4 x i8] c"cfg\00"
define void @Action_Port(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @Strstr(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = call i32 @Action_Port_Set(i8* %11)
br label %21
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i8* @Strstr(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i8* %15, i8** %4
%16 = load i8*, i8** %4
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i8*, i8** %4
%20 = call i32 @Action_Port_Cfg(i8* %19)
br label %21
21: ; preds = %10, %18, %13
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"set\00"
@.str.1 = [4 x i8] c"cfg\00"
define void @Action_Port(i8* %0) {
%2 = tail call i8* @Strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @Action_Port_Set(i8* %2)
br label %11
6: ; preds = %1
%7 = tail call i8* @Strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @Action_Port_Cfg(i8* %7)
br label %11
11: ; preds = %6, %9, %4
ret void
}