// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../tools/parser.c
// Function: parser_read_line
int parser_read_line(char * line,
                     int * is_data,
                     char * name,
                     char * value,
                     ErrorMsg errmsg) {

  char * phash;
  char * pequal;
  char * left;
  char * right;

  /* check that there is an '=' (if you want the role of '=' to be
     played by ':' you only need to substitute it in the next line and
     recompile) */

  pequal=strchr(line,'=');
  if (pequal == NULL) {*is_data = _FALSE_; return _SUCCESS_;}

  /* if yes, check that there is not an '#' before the '=' */

  phash=strchr(line,'#');
  if ((phash != NULL) && (phash-pequal<2)) {*is_data = _FALSE_; return _SUCCESS_;}

  /* get the name, i.e. the block before the '=' */

  left=line;
  while (left[0]==' ') {
    left++;
  }
  /* Ignore any of " ' */
  if(left[0]=='\'' || left[0]=='\"'){
    left++;
  }

  right=pequal-1;
  while (right[0]==' ') {
    right--;
  }
  if(right[0]=='\'' || right[0]=='\"'){
    right--;
  }

  /* deal with missing variable names */

  class_test(right-left < 0,
             errmsg,
             "Syntax error in the input line '%s': no name passed on the left of the '=' sign",line);

  class_test(right-left+1 >= _ARGUMENT_LENGTH_MAX_,
             errmsg,
             "name starting by '%s' too long; shorten it or increase _ARGUMENT_LENGTH_MAX_",strncpy(name,left,(_ARGUMENT_LENGTH_MAX_-1)));

  strncpy(name,left,right-left+1);
  name[right-left+1]='\0';

  /* get the value, i.e. the block after the '=' */

  left = pequal+1;
  while (left[0]==' ') {
    left++;
  }

  if (phash == NULL)
    right = line+strlen(line)-1;
  else
    right = phash-1;

  while (right[0]<=' ') {
    right--;
  }

  if (right-left < 0) {*is_data = _FALSE_; return _SUCCESS_;}

  class_test(right-left+1 >= _ARGUMENT_LENGTH_MAX_,
             errmsg,
             "value starting by '%s' too long; shorten it or increase _ARGUMENT_LENGTH_MAX_",strncpy(value,left,(_ARGUMENT_LENGTH_MAX_-1)));

  strncpy(value,left,right-left+1);
  value[right-left+1]='\0';

  *is_data = _TRUE_;

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movl $0x3d, %esi
callq 0x8130
testq %rax, %rax
je 0x1e327
movq %rax, %r12
movq %r13, 0x8(%rsp)
movq %rbp, %rdi
movl $0x23, %esi
callq 0x8130
movq %rax, %r13
testq %rax, %rax
setne %al
movq %r13, %rcx
subq %r12, %rcx
cmpq $0x2, %rcx
setl %cl
testb %cl, %al
je 0x1e335
movl $0x0, (%r15)
xorl %eax, %eax
jmp 0x1e531
movq %rbp, %rsi
jmp 0x1e33d
incq %rsi
movzbl (%rsi), %eax
cmpl $0x20, %eax
je 0x1e33a
cmpl $0x22, %eax
movq %r14, (%rsp)
je 0x1e353
cmpl $0x27, %eax
jne 0x1e356
incq %rsi
leaq -0x1(%r12), %r14
movzbl (%r14), %eax
decq %r14
cmpl $0x20, %eax
je 0x1e35b
cmpl $0x27, %eax
je 0x1e374
cmpl $0x22, %eax
je 0x1e374
incq %r14
subq %rsi, %r14
js 0x1e3ee
cmpq $0x3ff, %r14            # imm = 0x3FF
jb 0x1e446
movl $0x3ff, %edx            # imm = 0x3FF
movq %rbx, %rdi
callq 0x81e0
leaq 0xd27c6(%rip), %rsi     # 0xf0b60
leaq 0x810(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfccc(%rip), %rsi     # 0xee082
leaq 0xd27f0(%rip), %rdx     # 0xf0bad
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfc5e(%rip), %rsi     # 0xee034
leaq 0xd2772(%rip), %rdx     # 0xf0b4f
movq (%rsp), %rdi
movl $0x80, %ecx
movq %rbx, %r8
jmp 0x1e525
leaq 0xd26fb(%rip), %rsi     # 0xf0af0
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfc71(%rip), %rsi     # 0xee082
leaq 0xd2728(%rip), %rdx     # 0xf0b40
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfc03(%rip), %rsi     # 0xee034
leaq 0xd2717(%rip), %rdx     # 0xf0b4f
movq (%rsp), %rdi
movl $0x7c, %ecx
jmp 0x1e522
leaq 0x1(%r14), %rdx
movq %rbx, %rdi
callq 0x81e0
movb $0x0, 0x1(%rbx,%r14)
movq 0x8(%rsp), %rbx
subq %r12, %rbx
incq %rbx
movq %r12, %r14
decq %rbx
incq %r14
cmpb $0x20, 0x1(%r12)
leaq 0x1(%r12), %r12
je 0x1e466
testq %r13, %r13
jne 0x1e48c
movq %rbp, %rdi
callq 0x8180
movq %rax, %r13
addq %rbp, %r13
movq %r13, %rdx
subq %r14, %rdx
xorl %r14d, %r14d
decq %rdx
cmpb $0x21, -0x1(%r13,%r14)
leaq -0x1(%r14), %r14
jl 0x1e495
testq %rdx, %rdx
js 0x1e327
cmpq $0x3ff, %rdx            # imm = 0x3FF
jb 0x1e543
movl $0x3ff, %edx            # imm = 0x3FF
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x81e0
leaq 0xd26fd(%rip), %rsi     # 0xf0bd3
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfb90(%rip), %rsi     # 0xee082
leaq 0xd26b4(%rip), %rdx     # 0xf0bad
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcfb22(%rip), %rsi     # 0xee034
leaq 0xd2636(%rip), %rdx     # 0xf0b4f
movq (%rsp), %rdi
movl $0x99, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %rdx
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x81e0
addq %r14, %r13
movb $0x0, (%rbx,%r13)
movl $0x1, (%r15)
jmp 0x1e32e