// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/splitstr.c
// Function: SplitString
int SplitString(char *Buffer, char **Fields, int MaxField)
{
  int FieldCnt, SymbCnt, FieldFlag, BuffLen;
  static char LocalBuffer[BUFSZ];


  FieldCnt =0; FieldFlag = 0;
  BuffLen = (int)strlen(Buffer) - 1;

  strcpy(LocalBuffer,Buffer);

  for(SymbCnt=0; SymbCnt<BuffLen; SymbCnt++) {
    if( (isspace(LocalBuffer[SymbCnt])) && FieldFlag == 0 && SymbCnt != BuffLen-1 ) continue;
    if( (!isspace(LocalBuffer[SymbCnt])) && FieldFlag == 1 && SymbCnt == BuffLen-1 ) {
      LocalBuffer[SymbCnt+1] = '\0';
      return(FieldCnt);
    }
    else
    if( (isspace(LocalBuffer[SymbCnt])) && FieldFlag == 1 ) {
      LocalBuffer[SymbCnt] = '\0';
      FieldFlag = 0;
      if( FieldCnt == MaxField ) return(FieldCnt);
    }
    else
    if( (!isspace(LocalBuffer[SymbCnt])) && FieldFlag == 0 ) {
      FieldFlag = 1;
      Fields[FieldCnt] = LocalBuffer+SymbCnt;
      FieldCnt++;
    }
  }
  
     return(FieldCnt);
 }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x20b0
subl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rsi
leaq 0x2dc01(%rip), %rdi     # 0x31400
callq 0x2060
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x3996
callq 0x2250
movq (%rax), %rax
movslq 0x14(%rsp), %rdx
leaq 0x2dbd2(%rip), %rcx     # 0x31400
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x385e
cmpl $0x0, 0x10(%rsp)
jne 0x385e
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x385e
jmp 0x3986
callq 0x2250
movq (%rax), %rax
movslq 0x14(%rsp), %rdx
leaq 0x2db8e(%rip), %rcx     # 0x31400
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x38bf
cmpl $0x1, 0x10(%rsp)
jne 0x38bf
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x38bf
movl 0x14(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2db52(%rip), %rax     # 0x31400
movb $0x0, (%rax,%rcx)
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x399e
callq 0x2250
movq (%rax), %rax
movslq 0x14(%rsp), %rdx
leaq 0x2db2d(%rip), %rcx     # 0x31400
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3920
cmpl $0x1, 0x10(%rsp)
jne 0x3920
movslq 0x14(%rsp), %rcx
leaq 0x2db05(%rip), %rax     # 0x31400
movb $0x0, (%rax,%rcx)
movl $0x0, 0x10(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jne 0x391e
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x399e
jmp 0x3982
callq 0x2250
movq (%rax), %rax
movslq 0x14(%rsp), %rdx
leaq 0x2dacc(%rip), %rcx     # 0x31400
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x3980
cmpl $0x0, 0x10(%rsp)
jne 0x3980
movl $0x1, 0x10(%rsp)
movslq 0x14(%rsp), %rax
leaq 0x2da9c(%rip), %rdx     # 0x31400
addq %rax, %rdx
movq 0x20(%rsp), %rax
movslq 0x18(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x3982
jmp 0x3984
jmp 0x3986
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x380c
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)