#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_Ms(char *);
int /*<<< orphan*/ Action_Delay_S(char *);
char *Strstr(char *, char *);
void Action_Delay(char *Str) {
  char *P = Str, *T;
  T = Strstr(P, "ms");
  if (T) {
    Action_Delay_Ms(T);
    return;
  }
  T = Strstr(P, "s");
  if (T) {
    Action_Delay_S(T);
    return;
  }
}


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

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

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

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