#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*/ memcpy(char *, char *, unsigned int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
unsigned int strcspn(char *, char *);
unsigned int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, unsigned int);
int Parsing_PWMOut_Config_Param(char sARGIN_PwmOutConfigStr[],
                                char *sARGOUT_PwmOutN, char *sARGOUT_PwmOutFreq,
                                char *sARGOUT_PwmOutDuty,
                                char *sARGOUT_PwmOutVolt) {
  int iResult = 0;
  unsigned int uiLen = strlen(sARGIN_PwmOutConfigStr),
               uiPosOfColon = strcspn(sARGIN_PwmOutConfigStr, ":"),
               uiPosOfSpace = 0;
  char sTempStrToFetch[8][32] = {0}, sTempRestStr[128] = {0},
       sTempRestRearStr[128] = {0};
  char sPwmAttributes[4][32] = {0};
  int iCnt = 0;
  strcpy(sTempRestStr, sARGIN_PwmOutConfigStr);
  strcpy(sTempRestRearStr, sTempRestStr);
  do {
    strncpy(sTempStrToFetch[iCnt], sTempRestStr, uiPosOfColon);
    memset(sTempRestRearStr, 0, 128 * sizeof(char));
    strncpy(sTempRestRearStr, sTempRestStr + uiPosOfColon + 1,
            strlen(sTempRestStr) - uiPosOfColon - 1);
    memset(sTempRestStr, 0, 128 * sizeof(char));
    memcpy(sTempRestStr, sTempRestRearStr, strlen(sTempRestRearStr));
    uiPosOfColon = strcspn(sTempRestStr, ":");
    iCnt++;
  } while (strchr(sTempRestStr, ':') != NULL);
  strncpy(sTempStrToFetch[iCnt], sTempRestStr, strlen(sTempRestStr));
  while (iCnt >= 0) {
    if (!strncmp(sTempStrToFetch[iCnt], "OUT", 3))
      sprintf(sPwmAttributes[0], "%s", sTempStrToFetch[iCnt]);
    if (!strncmp(sTempStrToFetch[iCnt], "FREQ", 4))
      sprintf(sPwmAttributes[1], "%s", sTempStrToFetch[iCnt]);
    if (!strncmp(sTempStrToFetch[iCnt], "DUTY", 4))
      sprintf(sPwmAttributes[2], "%s", sTempStrToFetch[iCnt]);
    if (!strncmp(sTempStrToFetch[iCnt], "VOLT", 4))
      sprintf(sPwmAttributes[3], "%s", sTempStrToFetch[iCnt]);
    iCnt--;
  }
  strcpy(sARGOUT_PwmOutN, sPwmAttributes[0]);
  uiPosOfSpace = strcspn(sPwmAttributes[1], " ");
  strncpy(sARGOUT_PwmOutFreq, sPwmAttributes[1] + uiPosOfSpace + 1,
          strlen(sPwmAttributes[1]) - uiPosOfSpace - 1);
  uiPosOfSpace = strcspn(sPwmAttributes[2], " ");
  strncpy(sARGOUT_PwmOutDuty, sPwmAttributes[2] + uiPosOfSpace + 1,
          strlen(sPwmAttributes[2]) - uiPosOfSpace - 1);
  uiPosOfSpace = strcspn(sPwmAttributes[3], " ");
  strncpy(sARGOUT_PwmOutVolt, sPwmAttributes[3] + uiPosOfSpace + 1,
          strlen(sPwmAttributes[3]) - uiPosOfSpace - 1);
  return iResult;
}


x86 assembly (clang, -O0):
<Parsing_PWMOut_Config_Param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe33(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1080 <memset@plt>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
lea    -0x2c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
movl   $0x0,-0x2c4(%rbp)
lea    -0x1c0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x240(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1050 <strcpy@plt>
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    -0x1c0(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1030 <strncpy@plt>
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
lea    -0x240(%rbp),%rax
mov    %rax,-0x2e8(%rbp)
lea    -0x1c0(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x2e0(%rbp)
lea    -0x1c0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x2e8(%rbp),%rdi
mov    -0x2e0(%rbp),%rsi
mov    %eax,%edx
sub    -0x34(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
lea    -0x1c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
lea    -0x1c0(%rbp),%rax
mov    %rax,-0x2d8(%rbp)
lea    -0x240(%rbp),%rax
mov    %rax,-0x2d0(%rbp)
lea    -0x240(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x2d8(%rbp),%rdi
mov    -0x2d0(%rbp),%rsi
mov    %eax,%edx
call   10a0 <memcpy@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xcc9(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,-0x34(%rbp)
mov    -0x2c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c4(%rbp)
lea    -0x1c0(%rbp),%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
cmp    $0x0,%rax
jne    1255 <Parsing_PWMOut_Config_Param+0xc5>
movslq -0x2c4(%rbp),%rcx
lea    -0x140(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    %rax,-0x2f8(%rbp)
lea    -0x1c0(%rbp),%rax
mov    %rax,-0x2f0(%rbp)
lea    -0x1c0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x2f8(%rbp),%rdi
mov    -0x2f0(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
cmpl   $0x0,-0x2c4(%rbp)
jl     153d <Parsing_PWMOut_Config_Param+0x3ad>
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    0xc25(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1418 <Parsing_PWMOut_Config_Param+0x288>
lea    -0x2c0(%rbp),%rdi
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdx
shl    $0x5,%rax
add    %rax,%rdx
lea    0xbf3(%rip),%rsi
call   10b0 <sprintf@plt>
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    0xbd5(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1473 <Parsing_PWMOut_Config_Param+0x2e3>
lea    -0x2c0(%rbp),%rdi
add    $0x20,%rdi
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdx
shl    $0x5,%rax
add    %rax,%rdx
lea    0xb98(%rip),%rsi
call   10b0 <sprintf@plt>
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    0xb7f(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    14ce <Parsing_PWMOut_Config_Param+0x33e>
lea    -0x2c0(%rbp),%rdi
add    $0x40,%rdi
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdx
shl    $0x5,%rax
add    %rax,%rdx
lea    0xb3d(%rip),%rsi
call   10b0 <sprintf@plt>
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdi
shl    $0x5,%rax
add    %rax,%rdi
lea    0xb29(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1529 <Parsing_PWMOut_Config_Param+0x399>
lea    -0x2c0(%rbp),%rdi
add    $0x60,%rdi
movslq -0x2c4(%rbp),%rax
lea    -0x140(%rbp),%rdx
shl    $0x5,%rax
add    %rax,%rdx
lea    0xae2(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x2c4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c4(%rbp)
jmp    13b4 <Parsing_PWMOut_Config_Param+0x224>
mov    -0x10(%rbp),%rdi
lea    -0x2c0(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x2c0(%rbp),%rdi
add    $0x20,%rdi
lea    0xab9(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x328(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x20,%rax
mov    -0x38(%rbp),%ecx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x320(%rbp)
lea    -0x2c0(%rbp),%rdi
add    $0x20,%rdi
call   1060 <strlen@plt>
mov    -0x328(%rbp),%rdi
mov    -0x320(%rbp),%rsi
mov    %eax,%edx
sub    -0x38(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
lea    -0x2c0(%rbp),%rdi
add    $0x40,%rdi
lea    0xa4d(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x318(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x40,%rax
mov    -0x38(%rbp),%ecx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x310(%rbp)
lea    -0x2c0(%rbp),%rdi
add    $0x40,%rdi
call   1060 <strlen@plt>
mov    -0x318(%rbp),%rdi
mov    -0x310(%rbp),%rsi
mov    %eax,%edx
sub    -0x38(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
lea    -0x2c0(%rbp),%rdi
add    $0x60,%rdi
lea    0x9e1(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x308(%rbp)
lea    -0x2c0(%rbp),%rax
add    $0x60,%rax
mov    -0x38(%rbp),%ecx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x300(%rbp)
lea    -0x2c0(%rbp),%rdi
add    $0x60,%rdi
call   1060 <strlen@plt>
mov    -0x308(%rbp),%rdi
mov    -0x300(%rbp),%rsi
mov    %eax,%edx
sub    -0x38(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
mov    -0x2c(%rbp),%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Parsing_PWMOut_Config_Param>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2a8,%rsp
mov    %r8,0x18(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,(%rsp)
mov    %rdi,%rbx
call   1060 <strlen@plt>
lea    0xe4d(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcspn@plt>
mov    %eax,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,0x290(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
lea    0xa0(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
lea    0x120(%rsp),%r15
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <strcpy@plt>
lea    0x1a0(%rsp),%rbx
xor    %r14d,%r14d
nop
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
mov    %ebp,%eax
lea    (%rsp,%rax,1),%r13
add    $0xa1,%r13
mov    %r12,%rdi
call   1060 <strlen@plt>
not    %ebp
add    %eax,%ebp
mov    %r15,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1080 <memset@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    %r12,%rdi
lea    0xc70(%rip),%rsi
call   1090 <strcspn@plt>
mov    %eax,%ebp
add    $0x1,%r14
mov    %r12,%rdi
mov    $0x3a,%esi
call   1070 <strchr@plt>
add    $0x20,%rbx
test   %rax,%rax
jne    1320 <Parsing_PWMOut_Config_Param+0x1a0>
mov    %r14d,%eax
shl    $0x5,%rax
lea    (%rsp,%rax,1),%rbx
add    $0x1a0,%rbx
lea    0xa0(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
add    $0x1,%r14d
lea    0xc13(%rip),%r12
lea    0xc10(%rip),%rbp
lea    0xc0e(%rip),%r13
lea    0xc0c(%rip),%r15
jmp    1421 <Parsing_PWMOut_Config_Param+0x2a1>
cs nopw 0x0(%rax,%rax,1)
add    $0xffffffff,%r14d
add    $0xffffffffffffffe0,%rbx
test   %r14d,%r14d
jle    14b1 <Parsing_PWMOut_Config_Param+0x331>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1442 <Parsing_PWMOut_Config_Param+0x2c2>
lea    0x20(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1463 <Parsing_PWMOut_Config_Param+0x2e3>
lea    0x40(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1484 <Parsing_PWMOut_Config_Param+0x304>
lea    0x60(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1410 <Parsing_PWMOut_Config_Param+0x290>
lea    0x80(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
jmp    1410 <Parsing_PWMOut_Config_Param+0x290>
lea    0x20(%rsp),%rsi
mov    (%rsp),%rdi
call   1050 <strcpy@plt>
lea    0x40(%rsp),%r15
lea    0xb4a(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <strcspn@plt>
mov    %eax,%ebx
mov    %eax,%eax
lea    (%rsp,%rax,1),%rbp
add    $0x41,%rbp
mov    %r15,%rdi
call   1060 <strlen@plt>
not    %ebx
add    %eax,%ebx
mov    0x8(%rsp),%rdi
mov    %rbp,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
lea    0x60(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <strcspn@plt>
mov    %eax,%ebp
mov    %eax,%eax
lea    (%rsp,%rax,1),%rbx
add    $0x61,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
not    %ebp
add    %eax,%ebp
mov    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
lea    0x80(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <strcspn@plt>
mov    %eax,%ebp
mov    %eax,%eax
lea    (%rsp,%rax,1),%rbx
add    $0x81,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
not    %ebp
add    %eax,%ebp
mov    0x18(%rsp),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x2a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [4 x i8] c"OUT\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [5 x i8] c"FREQ\00"
@.str.4 = [5 x i8] c"DUTY\00"
@.str.5 = [5 x i8] c"VOLT\00"
@.str.6 = [2 x i8] c" \00"
define i32 @Parsing_PWMOut_Config_Param(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [8 x [32 x i8]]
%16 = alloca [128 x i8]
%17 = alloca [128 x i8]
%18 = alloca [4 x [32 x i8]]
%19 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
store i32 0, i32* %11
%20 = load i8*, i8** %6
%21 = call i32 @strlen(i8* %20)
store i32 %21, i32* %12
%22 = load i8*, i8** %6
%23 = call i32 @strcspn(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %23, i32* %13
store i32 0, i32* %14
%24 = bitcast [8 x [32 x i8]]* %15 to i8*
%25 = bitcast [128 x i8]* %16 to i8*
%26 = bitcast [128 x i8]* %17 to i8*
%27 = bitcast [4 x [32 x i8]]* %18 to i8*
store i32 0, i32* %19
%28 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%29 = load i8*, i8** %6
%30 = call i32 @strcpy(i8* %28, i8* %29)
%31 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%33 = call i32 @strcpy(i8* %31, i8* %32)
br label %34
34: ; preds = %67, %5
%35 = load i32, i32* %19
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %36
%38 = getelementptr inbounds [32 x i8], [32 x i8]* %37, i64 0, i64 0
%39 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%40 = load i32, i32* %13
%41 = call i32 @strncpy(i8* %38, i8* %39, i32 %40)
%42 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%43 = call i32 @memset(i8* %42, i32 0, i32 128)
%44 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%45 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%46 = load i32, i32* %13
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %45, i64 %47
%49 = getelementptr inbounds i8, i8* %48, i64 1
%50 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = load i32, i32* %13
%53 = sub i32 %51, %52
%54 = sub i32 %53, 1
%55 = call i32 @strncpy(i8* %44, i8* %49, i32 %54)
%56 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%57 = call i32 @memset(i8* %56, i32 0, i32 128)
%58 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%59 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%60 = getelementptr inbounds [128 x i8], [128 x i8]* %17, i64 0, i64 0
%61 = call i32 @strlen(i8* %60)
%62 = call i32 @memcpy(i8* %58, i8* %59, i32 %61)
%63 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%64 = call i32 @strcspn(i8* %63, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %64, i32* %13
%65 = load i32, i32* %19
%66 = add nsw i32 %65, 1
store i32 %66, i32* %19
br label %67
67: ; preds = %34
%68 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%69 = call i32* @strchr(i8* %68, i8 signext 58)
%70 = icmp ne i32* %69, null
br i1 %70, label %34, label %71
71: ; preds = %67
%72 = load i32, i32* %19
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %73
%75 = getelementptr inbounds [32 x i8], [32 x i8]* %74, i64 0, i64 0
%76 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%77 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%78 = call i32 @strlen(i8* %77)
%79 = call i32 @strncpy(i8* %75, i8* %76, i32 %78)
br label %80
80: ; preds = %143, %71
%81 = load i32, i32* %19
%82 = icmp sge i32 %81, 0
br i1 %82, label %83, label %146
83: ; preds = %80
%84 = load i32, i32* %19
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %85
%87 = getelementptr inbounds [32 x i8], [32 x i8]* %86, i64 0, i64 0
%88 = call i32 @strncmp(i8* %87, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%89 = icmp ne i32 %88, 0
br i1 %89, label %98, label %90
90: ; preds = %83
%91 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 0
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %91, i64 0, i64 0
%93 = load i32, i32* %19
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %94
%96 = getelementptr inbounds [32 x i8], [32 x i8]* %95, i64 0, i64 0
%97 = call i32 @sprintf(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %96)
br label %98
98: ; preds = %90, %83
%99 = load i32, i32* %19
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %100
%102 = getelementptr inbounds [32 x i8], [32 x i8]* %101, i64 0, i64 0
%103 = call i32 @strncmp(i8* %102, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 4)
%104 = icmp ne i32 %103, 0
br i1 %104, label %113, label %105
105: ; preds = %98
%106 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 1
%107 = getelementptr inbounds [32 x i8], [32 x i8]* %106, i64 0, i64 0
%108 = load i32, i32* %19
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %109
%111 = getelementptr inbounds [32 x i8], [32 x i8]* %110, i64 0, i64 0
%112 = call i32 @sprintf(i8* %107, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %111)
br label %113
113: ; preds = %105, %98
%114 = load i32, i32* %19
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %115
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %116, i64 0, i64 0
%118 = call i32 @strncmp(i8* %117, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%119 = icmp ne i32 %118, 0
br i1 %119, label %128, label %120
120: ; preds = %113
%121 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 2
%122 = getelementptr inbounds [32 x i8], [32 x i8]* %121, i64 0, i64 0
%123 = load i32, i32* %19
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %124
%126 = getelementptr inbounds [32 x i8], [32 x i8]* %125, i64 0, i64 0
%127 = call i32 @sprintf(i8* %122, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %126)
br label %128
128: ; preds = %120, %113
%129 = load i32, i32* %19
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %130
%132 = getelementptr inbounds [32 x i8], [32 x i8]* %131, i64 0, i64 0
%133 = call i32 @strncmp(i8* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%134 = icmp ne i32 %133, 0
br i1 %134, label %143, label %135
135: ; preds = %128
%136 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 3
%137 = getelementptr inbounds [32 x i8], [32 x i8]* %136, i64 0, i64 0
%138 = load i32, i32* %19
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %15, i64 0, i64 %139
%141 = getelementptr inbounds [32 x i8], [32 x i8]* %140, i64 0, i64 0
%142 = call i32 @sprintf(i8* %137, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %141)
br label %143
143: ; preds = %135, %128
%144 = load i32, i32* %19
%145 = add nsw i32 %144, -1
store i32 %145, i32* %19
br label %80
146: ; preds = %80
%147 = load i8*, i8** %7
%148 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 0
%149 = getelementptr inbounds [32 x i8], [32 x i8]* %148, i64 0, i64 0
%150 = call i32 @strcpy(i8* %147, i8* %149)
%151 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 1
%152 = getelementptr inbounds [32 x i8], [32 x i8]* %151, i64 0, i64 0
%153 = call i32 @strcspn(i8* %152, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 %153, i32* %14
%154 = load i8*, i8** %8
%155 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 1
%156 = getelementptr inbounds [32 x i8], [32 x i8]* %155, i64 0, i64 0
%157 = load i32, i32* %14
%158 = zext i32 %157 to i64
%159 = getelementptr inbounds i8, i8* %156, i64 %158
%160 = getelementptr inbounds i8, i8* %159, i64 1
%161 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 1
%162 = getelementptr inbounds [32 x i8], [32 x i8]* %161, i64 0, i64 0
%163 = call i32 @strlen(i8* %162)
%164 = load i32, i32* %14
%165 = sub i32 %163, %164
%166 = sub i32 %165, 1
%167 = call i32 @strncpy(i8* %154, i8* %160, i32 %166)
%168 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 2
%169 = getelementptr inbounds [32 x i8], [32 x i8]* %168, i64 0, i64 0
%170 = call i32 @strcspn(i8* %169, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 %170, i32* %14
%171 = load i8*, i8** %9
%172 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 2
%173 = getelementptr inbounds [32 x i8], [32 x i8]* %172, i64 0, i64 0
%174 = load i32, i32* %14
%175 = zext i32 %174 to i64
%176 = getelementptr inbounds i8, i8* %173, i64 %175
%177 = getelementptr inbounds i8, i8* %176, i64 1
%178 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 2
%179 = getelementptr inbounds [32 x i8], [32 x i8]* %178, i64 0, i64 0
%180 = call i32 @strlen(i8* %179)
%181 = load i32, i32* %14
%182 = sub i32 %180, %181
%183 = sub i32 %182, 1
%184 = call i32 @strncpy(i8* %171, i8* %177, i32 %183)
%185 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 3
%186 = getelementptr inbounds [32 x i8], [32 x i8]* %185, i64 0, i64 0
%187 = call i32 @strcspn(i8* %186, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 %187, i32* %14
%188 = load i8*, i8** %10
%189 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 3
%190 = getelementptr inbounds [32 x i8], [32 x i8]* %189, i64 0, i64 0
%191 = load i32, i32* %14
%192 = zext i32 %191 to i64
%193 = getelementptr inbounds i8, i8* %190, i64 %192
%194 = getelementptr inbounds i8, i8* %193, i64 1
%195 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %18, i64 0, i64 3
%196 = getelementptr inbounds [32 x i8], [32 x i8]* %195, i64 0, i64 0
%197 = call i32 @strlen(i8* %196)
%198 = load i32, i32* %14
%199 = sub i32 %197, %198
%200 = sub i32 %199, 1
%201 = call i32 @strncpy(i8* %188, i8* %194, i32 %200)
%202 = load i32, i32* %11
ret i32 %202
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [4 x i8] c"OUT\00"
@.str.3 = [5 x i8] c"FREQ\00"
@.str.4 = [5 x i8] c"DUTY\00"
@.str.5 = [5 x i8] c"VOLT\00"
@.str.6 = [2 x i8] c" \00"
define i32 @Parsing_PWMOut_Config_Param(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [8 x [32 x i8]]
%7 = alloca [128 x i8]
%8 = alloca [128 x i8]
%9 = alloca [4 x [32 x i8]]
%10 = tail call i32 @strlen(i8* %0)
%11 = tail call i32 @strcspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %6, i64 0, i64 0, i64 0
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%15 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 0, i64 0
%16 = call i32 @strcpy(i8* %13, i8* %0)
%17 = call i32 @strcpy(i8* %14, i8* %13)
br label %18
18: ; preds = %18, %5
%19 = phi i64 [ %35, %18 ], [ 0, %5 ]
%20 = phi i32 [ %34, %18 ], [ %11, %5 ]
%21 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %6, i64 0, i64 %19, i64 0
%22 = call i32 @strncpy(i8* %21, i8* %13, i32 %20)
%23 = call i32 @memset(i8* %14, i32 0, i32 128)
%24 = zext i32 %20 to i64
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 %24
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = call i32 @strlen(i8* %13)
%28 = xor i32 %20, -1
%29 = add i32 %27, %28
%30 = call i32 @strncpy(i8* %14, i8* %26, i32 %29)
%31 = call i32 @memset(i8* %13, i32 0, i32 128)
%32 = call i32 @strlen(i8* %14)
%33 = call i32 @memcpy(i8* %13, i8* %14, i32 %32)
%34 = call i32 @strcspn(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%35 = add nuw i64 %19, 1
%36 = call i32* @strchr(i8* %13, i8 signext 58)
%37 = icmp eq i32* %36, null
br i1 %37, label %38, label %18
38: ; preds = %18
%39 = and i64 %35, 4294967295
%40 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %6, i64 0, i64 %39, i64 0
%41 = call i32 @strlen(i8* %13)
%42 = call i32 @strncpy(i8* %40, i8* %13, i32 %41)
%43 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 1, i64 0
%44 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 2, i64 0
%45 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 3, i64 0
br label %46
46: ; preds = %38, %68
%47 = phi i64 [ %39, %38 ], [ %69, %68 ]
%48 = getelementptr inbounds [8 x [32 x i8]], [8 x [32 x i8]]* %6, i64 0, i64 %47, i64 0
%49 = call i32 @strncmp(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %46
%52 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %15, i8* %48)
br label %53
53: ; preds = %51, %46
%54 = call i32 @strncmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 4)
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %43, i8* %48)
br label %58
58: ; preds = %56, %53
%59 = call i32 @strncmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %44, i8* %48)
br label %63
63: ; preds = %61, %58
%64 = call i32 @strncmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %45, i8* %48)
br label %68
68: ; preds = %66, %63
%69 = add nsw i64 %47, -1
%70 = trunc i64 %47 to i32
%71 = icmp sgt i32 %70, 0
br i1 %71, label %46, label %72
72: ; preds = %68
%73 = call i32 @strcpy(i8* %1, i8* %15)
%74 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 1, i64 0
%75 = call i32 @strcspn(i8* %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 1, i64 %76
%78 = getelementptr inbounds i8, i8* %77, i64 1
%79 = call i32 @strlen(i8* %74)
%80 = xor i32 %75, -1
%81 = add i32 %79, %80
%82 = call i32 @strncpy(i8* %2, i8* %78, i32 %81)
%83 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 2, i64 0
%84 = call i32 @strcspn(i8* %83, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 2, i64 %85
%87 = getelementptr inbounds i8, i8* %86, i64 1
%88 = call i32 @strlen(i8* %83)
%89 = xor i32 %84, -1
%90 = add i32 %88, %89
%91 = call i32 @strncpy(i8* %3, i8* %87, i32 %90)
%92 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 3, i64 0
%93 = call i32 @strcspn(i8* %92, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds [4 x [32 x i8]], [4 x [32 x i8]]* %9, i64 0, i64 3, i64 %94
%96 = getelementptr inbounds i8, i8* %95, i64 1
%97 = call i32 @strlen(i8* %92)
%98 = xor i32 %93, -1
%99 = add i32 %97, %98
%100 = call i32 @strncpy(i8* %4, i8* %96, i32 %99)
ret i32 0
}