// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/parser.c
// Function: parser_read_list_of_strings
int parser_read_list_of_strings(struct file_content * pfc,
                                char * name,
                                int * size,
                                char ** pointer_to_list,
                                int * found,
                                ErrorMsg errmsg) {
  int index;
  int i;

  char * string;
  char * substring;
  FileArg string_with_one_value;

  char * list;

  /* intialize the 'found' flag to false */

  * found = _FALSE_;

  /* search parameter */

  index=0;
  while ((index < pfc->size) && (strcmp(pfc->name[index],name) != 0))
    index++;

  /* if parameter not found, return with 'found' flag still equal to false */

  if (index == pfc->size)
    return _SUCCESS_;

  /* count number of comas and compute size = number of comas + 1 */
  i = 0;
  string = pfc->value[index];
  do {
    i ++;
    substring = strchr(string,',');
    string = substring+1;
  } while(substring != NULL);

  *size = i;

  /* free and re-allocate array of values */
  class_alloc(list,*size*sizeof(FileArg),errmsg);
  *pointer_to_list = list;

  /* read one string between each comas */
  i = 0;
  string = pfc->value[index];
  do {
    i ++;
    substring = strchr(string,',');
    if (substring == NULL) {
      strcpy(string_with_one_value,string);
    }
    else {
      strncpy(string_with_one_value,string,(substring-string));
      string_with_one_value[substring-string]='\0';
    }
    strcpy(list+(i-1)*_ARGUMENT_LENGTH_MAX_,string_with_one_value);
    //Insert EOL character:
    *(list+i*_ARGUMENT_LENGTH_MAX_-1) = '\n';
    string = substring+1;
  } while(substring != NULL);

  /* if parameter read correctly, set 'found' flag to true, as well as the flag
     associated with this parameter in the file_content structure */
  * found = _TRUE_;
  pfc->read[index] = _TRUE_;

  /* check for multiple entries of the same parameter. If another occurence is
     found,
     return an error. */
  for (i=index+1; i < pfc->size; i++) {
    class_test(strcmp(pfc->name[i],name) == 0,
               errmsg,
               "multiple entry of parameter '%s' in file '%s'\n",name,pfc->filename);
  }

  /* if everything proceeded normally, return with 'found' flag equal to true */
  return _SUCCESS_;
}

// Assembly:
subq $0x1c78, %rsp           # imm = 0x1C78
movq %rdi, 0x1c68(%rsp)
movq %rsi, 0x1c60(%rsp)
movq %rdx, 0x1c58(%rsp)
movq %rcx, 0x1c50(%rsp)
movq %r8, 0x1c48(%rsp)
movq %r9, 0x1c40(%rsp)
movq 0x1c48(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x1c3c(%rsp)
movl 0x1c3c(%rsp), %ecx
movq 0x1c68(%rsp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, 0xf(%rsp)
jge 0x3982c
movq 0x1c68(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c3c(%rsp), %rax
shlq $0xa, %rax
addq %rax, %rdi
movq 0x1c60(%rsp), %rsi
callq 0x84b0
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x39836
jmp 0x39849
movl 0x1c3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c3c(%rsp)
jmp 0x397e0
movl 0x1c3c(%rsp), %eax
movq 0x1c68(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x3986d
movl $0x0, 0x1c74(%rsp)
jmp 0x39be6
movl $0x0, 0x1c38(%rsp)
movq 0x1c68(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x1c3c(%rsp), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movq %rax, 0x1c30(%rsp)
movl 0x1c38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c38(%rsp)
movq 0x1c30(%rsp), %rdi
movl $0x2c, %esi
callq 0x8140
movq %rax, 0x1c28(%rsp)
movq 0x1c28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1c30(%rsp)
cmpq $0x0, 0x1c28(%rsp)
jne 0x3989b
movl 0x1c38(%rsp), %ecx
movq 0x1c58(%rsp), %rax
movl %ecx, (%rax)
movq 0x1c58(%rsp), %rax
movslq (%rax), %rdi
shlq $0xa, %rdi
callq 0x8460
movq %rax, 0x1818(%rsp)
cmpq $0x0, 0x1818(%rsp)
jne 0x39991
movq 0x1c58(%rsp), %rax
movslq (%rax), %rax
shlq $0xa, %rax
movl %eax, 0x1814(%rsp)
leaq 0x1010(%rsp), %rdi
movl 0x1814(%rsp), %ecx
leaq 0x1986bb(%rip), %rsi    # 0x1d2004
leaq 0x1bf885(%rip), %rdx    # 0x1f91d5
movb $0x0, %al
callq 0x5b9c0
movq 0x1c40(%rsp), %rdi
leaq 0x1010(%rsp), %r8
leaq 0x1986c6(%rip), %rsi    # 0x1d2034
leaq 0x19b4a9(%rip), %rdx    # 0x1d4e1e
movl $0x245, %ecx            # imm = 0x245
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1c74(%rsp)
jmp 0x39be6
movq 0x1818(%rsp), %rcx
movq 0x1c50(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x1c38(%rsp)
movq 0x1c68(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x1c3c(%rsp), %rcx
shlq $0xa, %rcx
addq %rcx, %rax
movq %rax, 0x1c30(%rsp)
movl 0x1c38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c38(%rsp)
movq 0x1c30(%rsp), %rdi
movl $0x2c, %esi
callq 0x8140
movq %rax, 0x1c28(%rsp)
cmpq $0x0, 0x1c28(%rsp)
jne 0x39a1f
leaq 0x1820(%rsp), %rdi
movq 0x1c30(%rsp), %rsi
callq 0x8370
jmp 0x39a62
leaq 0x1820(%rsp), %rdi
movq 0x1c30(%rsp), %rsi
movq 0x1c28(%rsp), %rdx
movq 0x1c30(%rsp), %rax
subq %rax, %rdx
callq 0x81f0
movq 0x1c28(%rsp), %rax
movq 0x1c30(%rsp), %rcx
subq %rcx, %rax
movb $0x0, 0x1820(%rsp,%rax)
movq 0x1818(%rsp), %rdi
movl 0x1c38(%rsp), %eax
subl $0x1, %eax
shll $0xa, %eax
cltq
addq %rax, %rdi
leaq 0x1820(%rsp), %rsi
callq 0x8370
movq 0x1818(%rsp), %rax
movl 0x1c38(%rsp), %ecx
shll $0xa, %ecx
movslq %ecx, %rcx
movb $0xa, -0x1(%rax,%rcx)
movq 0x1c28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1c30(%rsp)
cmpq $0x0, 0x1c28(%rsp)
jne 0x399d2
movq 0x1c48(%rsp), %rax
movl $0x1, (%rax)
movq 0x1c68(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x1c3c(%rsp), %rcx
movw $0x1, (%rax,%rcx,2)
movl 0x1c3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c38(%rsp)
movl 0x1c38(%rsp), %eax
movq 0x1c68(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x39bdb
movq 0x1c68(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x1c38(%rsp), %rax
shlq $0xa, %rax
addq %rax, %rdi
movq 0x1c60(%rsp), %rsi
callq 0x84b0
cmpl $0x0, %eax
jne 0x39bc3
leaq 0x810(%rsp), %rdi
movq 0x1c60(%rsp), %rdx
movq 0x1c68(%rsp), %rax
movq (%rax), %rcx
leaq 0x19b112(%rip), %rsi    # 0x1d4c78
movb $0x0, %al
callq 0x5b9c0
leaq 0x10(%rsp), %rdi
leaq 0x810(%rsp), %rcx
leaq 0x198501(%rip), %rsi    # 0x1d2082
leaq 0x19b11f(%rip), %rdx    # 0x1d4ca7
movb $0x0, %al
callq 0x5b9c0
movq 0x1c40(%rsp), %rdi
leaq 0x10(%rsp), %r8
leaq 0x198491(%rip), %rsi    # 0x1d2034
leaq 0x19b274(%rip), %rdx    # 0x1d4e1e
movl $0x266, %ecx            # imm = 0x266
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1c74(%rsp)
jmp 0x39be6
jmp 0x39bc5
movl 0x1c38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c38(%rsp)
jmp 0x39aff
movl $0x0, 0x1c74(%rsp)
movl 0x1c74(%rsp), %eax
addq $0x1c78, %rsp           # imm = 0x1C78
retq
nopw %cs:(%rax,%rax)