#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 */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strcspn(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
scalar_t__ strstr(char *, char *);
int ParseTokenList(char sARGIN_TokenListStr[], char *sARGOUT_TokenArray[],
                   int *iNumOfToken) {
  int iCnt = 0;
  int iPosOfComma = strcspn(sARGIN_TokenListStr, ",");
  char sCurrentTokenStr[128] = {0}, sRestStr[512] = {0}, sTempStr[512] = {0};
  if (iPosOfComma == strlen(sARGIN_TokenListStr)) {
    *iNumOfToken = 1;
    sARGOUT_TokenArray[0] =
        (char *)malloc((strlen(sARGIN_TokenListStr) + 1) * sizeof(char));
    sprintf(sARGOUT_TokenArray[0], "%s", sARGIN_TokenListStr);
    return 0;
  }
  sprintf(sRestStr, "%s", sARGIN_TokenListStr);
  iCnt = 0;
  do {
    iPosOfComma = strcspn(sRestStr, ",");
    strncpy(sCurrentTokenStr, sRestStr, iPosOfComma);
    {
      sARGOUT_TokenArray[iCnt] =
          (char *)malloc((strlen(sCurrentTokenStr) + 1) * sizeof(char));
      sprintf(sARGOUT_TokenArray[iCnt], "%s", sCurrentTokenStr);
      ++iCnt;
    }
    memset(sCurrentTokenStr, 0, (strlen(sCurrentTokenStr) + 1));
    {
      strncpy(sTempStr, sRestStr + iPosOfComma + 1,
              strlen(sRestStr) - iPosOfComma - 1);
      memset(sRestStr, 0, (strlen(sRestStr) + 1));
      strcpy(sRestStr, sTempStr);
      memset(sTempStr, 0, (strlen(sTempStr) + 1));
    }
  } while (strstr(sRestStr, ","));
  if (0 != strlen(sRestStr)) {
    sARGOUT_TokenArray[iCnt] =
        (char *)malloc((strlen(sRestStr) + 1) * sizeof(char));
    sprintf(sARGOUT_TokenArray[iCnt], "%s", sRestStr);
    *iNumOfToken = iCnt + 1;
  } else {
    *iNumOfToken = iCnt;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ParseTokenList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe57(%rip),%rsi
call   1070 <strcspn@plt>
mov    %eax,-0x28(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1060 <memset@plt>
lea    -0x2b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
lea    -0x4b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
mov    -0x28(%rbp),%eax
mov    %eax,-0x4b4(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x4b4(%rbp),%eax
cmp    %ecx,%eax
jne    125c <ParseTokenList+0xdc>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rdx
lea    0xdb7(%rip),%rsi
call   1090 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1481 <ParseTokenList+0x301>
lea    -0x2b0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xd94(%rip),%rsi
call   1090 <sprintf@plt>
movl   $0x0,-0x24(%rbp)
lea    -0x2b0(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1070 <strcspn@plt>
mov    %eax,-0x28(%rbp)
lea    -0xb0(%rbp),%rdi
lea    -0x2b0(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1030 <strncpy@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0xb0(%rbp),%rdx
lea    0xd17(%rip),%rsi
call   1090 <sprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
lea    -0xb0(%rbp),%rax
mov    %rax,-0x4e0(%rbp)
lea    -0xb0(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x4e0(%rbp),%rdi
mov    %eax,%edx
add    $0x1,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    -0x4b0(%rbp),%rax
mov    %rax,-0x4d8(%rbp)
lea    -0x2b0(%rbp),%rax
movslq -0x28(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,-0x4d0(%rbp)
lea    -0x2b0(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x4d8(%rbp),%rdi
mov    -0x4d0(%rbp),%rsi
mov    %eax,%edx
sub    -0x28(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
lea    -0x2b0(%rbp),%rax
mov    %rax,-0x4c8(%rbp)
lea    -0x2b0(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x4c8(%rbp),%rdi
mov    %eax,%edx
add    $0x1,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    -0x2b0(%rbp),%rdi
lea    -0x4b0(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x4b0(%rbp),%rax
mov    %rax,-0x4c0(%rbp)
lea    -0x4b0(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x4c0(%rbp),%rdi
mov    %eax,%edx
add    $0x1,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    -0x2b0(%rbp),%rdi
lea    0xc11(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    127a <ParseTokenList+0xfa>
lea    -0x2b0(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1471 <ParseTokenList+0x2f1>
lea    -0x2b0(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x2b0(%rbp),%rdx
lea    0xba7(%rip),%rsi
call   1090 <sprintf@plt>
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    147a <ParseTokenList+0x2fa>
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseTokenList>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x498,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbp
lea    0xe6f(%rip),%rsi
call   1070 <strcspn@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
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)
movaps %xmm0,0x10(%rsp)
lea    0x90(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    0x290(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %rbp,%rdi
call   1050 <strlen@plt>
cmp    %eax,%ebx
jne    1224 <ParseTokenList+0xb4>
movl   $0x1,(%r14)
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   1080 <malloc@plt>
mov    %rax,(%r15)
mov    %rax,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
jmp    1374 <ParseTokenList+0x204>
mov    %r14,(%rsp)
lea    0x90(%rsp),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %r15,0x8(%rsp)
xor    %r15d,%r15d
lea    0x10(%rsp),%r13
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
lea    0xda6(%rip),%rsi
call   1070 <strcspn@plt>
mov    %eax,%r14d
mov    %r13,%rdi
mov    %r12,%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    %r13,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   1080 <malloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx,%r15,8)
mov    %rax,%rdi
mov    %r13,%rsi
call   1040 <strcpy@plt>
add    $0x1,%r15
mov    %r13,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
movslq %r14d,%rbp
lea    (%rsp,%rbp,1),%rbx
add    $0x91,%rbx
mov    %r12,%rdi
call   1050 <strlen@plt>
not    %ebp
add    %eax,%ebp
lea    0x290(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r12,%rdi
lea    0xce6(%rip),%rsi
call   1090 <strstr@plt>
test   %rax,%rax
jne    1250 <ParseTokenList+0xe0>
mov    0x8(%rsp),%rbp
lea    0x90(%rsp),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
je     136d <ParseTokenList+0x1fd>
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   1080 <malloc@plt>
mov    %r15d,%ecx
mov    %rax,0x0(%rbp,%rcx,8)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
add    $0x1,%r15d
mov    (%rsp),%rax
mov    %r15d,(%rax)
xor    %eax,%eax
add    $0x498,%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 = [3 x i8] c"%s\00"
define i32 @ParseTokenList(i8* %0, i8** %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [128 x i8]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i32* %2, i32** %7
store i32 0, i32* %8
%13 = load i8*, i8** %5
%14 = call i32 @strcspn(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %9
%15 = bitcast [128 x i8]* %10 to i8*
%16 = bitcast [512 x i8]* %11 to i8*
%17 = bitcast [512 x i8]* %12 to i8*
%18 = load i32, i32* %9
%19 = load i8*, i8** %5
%20 = call i32 @strlen(i8* %19)
%21 = icmp eq i32 %18, %20
br i1 %21, label %22, label %39
22: ; preds = %3
%23 = load i32*, i32** %7
store i32 1, i32* %23
%24 = load i8*, i8** %5
%25 = call i32 @strlen(i8* %24)
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 1
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to i8*
%32 = load i8**, i8*** %6
%33 = getelementptr inbounds i8*, i8** %32, i64 0
store i8* %31, i8** %33
%34 = load i8**, i8*** %6
%35 = getelementptr inbounds i8*, i8** %34, i64 0
%36 = load i8*, i8** %35
%37 = load i8*, i8** %5
%38 = call i32 @sprintf(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %37)
store i32 0, i32* %4
br label %136
39: ; preds = %3
%40 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%41 = load i8*, i8** %5
%42 = call i32 @sprintf(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %41)
store i32 0, i32* %8
br label %43
43: ; preds = %101, %39
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%45 = call i32 @strcspn(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %45, i32* %9
%46 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%47 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%48 = load i32, i32* %9
%49 = call i32 @strncpy(i8* %46, i8* %47, i32 %48)
%50 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = add nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = mul i64 %53, 1
%55 = trunc i64 %54 to i32
%56 = call i64 @malloc(i32 %55)
%57 = inttoptr i64 %56 to i8*
%58 = load i8**, i8*** %6
%59 = load i32, i32* %8
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
store i8* %57, i8** %61
%62 = load i8**, i8*** %6
%63 = load i32, i32* %8
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %62, i64 %64
%66 = load i8*, i8** %65
%67 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%68 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %67)
%69 = load i32, i32* %8
%70 = add nsw i32 %69, 1
store i32 %70, i32* %8
%71 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%72 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%73 = call i32 @strlen(i8* %72)
%74 = add nsw i32 %73, 1
%75 = call i32 @memset(i8* %71, i32 0, i32 %74)
%76 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%77 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%78 = load i32, i32* %9
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8, i8* %77, i64 %79
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%83 = call i32 @strlen(i8* %82)
%84 = load i32, i32* %9
%85 = sub nsw i32 %83, %84
%86 = sub nsw i32 %85, 1
%87 = call i32 @strncpy(i8* %76, i8* %81, i32 %86)
%88 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%89 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%90 = call i32 @strlen(i8* %89)
%91 = add nsw i32 %90, 1
%92 = call i32 @memset(i8* %88, i32 0, i32 %91)
%93 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%95 = call i32 @strcpy(i8* %93, i8* %94)
%96 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%97 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%98 = call i32 @strlen(i8* %97)
%99 = add nsw i32 %98, 1
%100 = call i32 @memset(i8* %96, i32 0, i32 %99)
br label %101
101: ; preds = %43
%102 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%103 = call i64 @strstr(i8* %102, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%104 = icmp ne i64 %103, 0
br i1 %104, label %43, label %105
105: ; preds = %101
%106 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%107 = call i32 @strlen(i8* %106)
%108 = icmp ne i32 0, %107
br i1 %108, label %109, label %132
109: ; preds = %105
%110 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%111 = call i32 @strlen(i8* %110)
%112 = add nsw i32 %111, 1
%113 = sext i32 %112 to i64
%114 = mul i64 %113, 1
%115 = trunc i64 %114 to i32
%116 = call i64 @malloc(i32 %115)
%117 = inttoptr i64 %116 to i8*
%118 = load i8**, i8*** %6
%119 = load i32, i32* %8
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8*, i8** %118, i64 %120
store i8* %117, i8** %121
%122 = load i8**, i8*** %6
%123 = load i32, i32* %8
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i8*, i8** %122, i64 %124
%126 = load i8*, i8** %125
%127 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%128 = call i32 @sprintf(i8* %126, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %127)
%129 = load i32, i32* %8
%130 = add nsw i32 %129, 1
%131 = load i32*, i32** %7
store i32 %130, i32* %131
br label %135
132: ; preds = %105
%133 = load i32, i32* %8
%134 = load i32*, i32** %7
store i32 %133, i32* %134
br label %135
135: ; preds = %132, %109
store i32 0, i32* %4
br label %136
136: ; preds = %135, %22
%137 = load i32, i32* %4
ret i32 %137
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define i32 @ParseTokenList(i8* %0, i8** nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = alloca [128 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = tail call i32 @strcspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%11 = tail call i32 @strlen(i8* %0)
%12 = icmp eq i32 %7, %11
br i1 %12, label %13, label %19
13: ; preds = %3
store i32 1, i32* %2
%14 = tail call i32 @strlen(i8* %0)
%15 = add nsw i32 %14, 1
%16 = tail call i64 @malloc(i32 %15)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %1
%18 = tail call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %17, i8* %0)
br label %67
19: ; preds = %3
%20 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %9, i8* %0)
br label %21
21: ; preds = %21, %19
%22 = phi i64 [ %31, %21 ], [ 0, %19 ]
%23 = call i32 @strcspn(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @strncpy(i8* %8, i8* %9, i32 %23)
%25 = call i32 @strlen(i8* %8)
%26 = add nsw i32 %25, 1
%27 = call i64 @malloc(i32 %26)
%28 = inttoptr i64 %27 to i8*
%29 = getelementptr inbounds i8*, i8** %1, i64 %22
store i8* %28, i8** %29
%30 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %28, i8* %8)
%31 = add nuw i64 %22, 1
%32 = call i32 @strlen(i8* %8)
%33 = add nsw i32 %32, 1
%34 = call i32 @memset(i8* %8, i32 0, i32 %33)
%35 = sext i32 %23 to i64
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 %35
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = call i32 @strlen(i8* %9)
%39 = xor i32 %23, -1
%40 = add i32 %38, %39
%41 = call i32 @strncpy(i8* %10, i8* %37, i32 %40)
%42 = call i32 @strlen(i8* %9)
%43 = add nsw i32 %42, 1
%44 = call i32 @memset(i8* %9, i32 0, i32 %43)
%45 = call i32 @strcpy(i8* %9, i8* %10)
%46 = call i32 @strlen(i8* %10)
%47 = add nsw i32 %46, 1
%48 = call i32 @memset(i8* %10, i32 0, i32 %47)
%49 = call i64 @strstr(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %21
51: ; preds = %21
%52 = trunc i64 %31 to i32
%53 = call i32 @strlen(i8* %9)
%54 = icmp eq i32 %53, 0
br i1 %54, label %65, label %55
55: ; preds = %51
%56 = trunc i64 %22 to i32
%57 = call i32 @strlen(i8* %9)
%58 = add nsw i32 %57, 1
%59 = call i64 @malloc(i32 %58)
%60 = inttoptr i64 %59 to i8*
%61 = and i64 %31, 4294967295
%62 = getelementptr inbounds i8*, i8** %1, i64 %61
store i8* %60, i8** %62
%63 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %60, i8* %9)
%64 = add nuw nsw i32 %56, 2
br label %65
65: ; preds = %51, %55
%66 = phi i32 [ %64, %55 ], [ %52, %51 ]
store i32 %66, i32* %2
br label %67
67: ; preds = %65, %13
ret i32 0
}