#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_Delay(char *);
int /*<<< orphan*/ Action_Port(char *);
char *Strstr(char *, char *);
void Bast_Export(char *Str) {
  char *P = Str, *T;
  T = Strstr(P, "port");
  if (T) {
    Action_Port(T);
    return;
  }
  T = Strstr(P, "delay");
  if (T) {
    Action_Delay(T);
    return;
  }
}


x86 assembly (clang, -O0):
<Bast_Export>:
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 <Bast_Export+0x41>
mov    -0x18(%rbp),%rdi
call   1040 <Action_Port@plt>
jmp    1199 <Bast_Export+0x69>
mov    -0x10(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1050 <Strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1199 <Bast_Export+0x69>
mov    -0x18(%rbp),%rdi
call   1030 <Action_Delay@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"port\00"
@.str.1 = [6 x i8] c"delay\00"
define void @Bast_Export(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 ([5 x i8], [5 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(i8* %11)
br label %21
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i8* @Strstr(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 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_Delay(i8* %19)
br label %21
21: ; preds = %10, %18, %13
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"port\00"
@.str.1 = [6 x i8] c"delay\00"
define void @Bast_Export(i8* %0) {
%2 = tail call i8* @Strstr(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 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(i8* %2)
br label %11
6: ; preds = %1
%7 = tail call i8* @Strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 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_Delay(i8* %7)
br label %11
11: ; preds = %6, %9, %4
ret void
}