// File: /workspace/github_c_makefile_star2_O1/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 0x1e2b1
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 0x1e2bf
movl $0x0, (%r15)
xorl %eax, %eax
jmp 0x1e4bb
movq %rbp, %rsi
jmp 0x1e2c7
incq %rsi
movzbl (%rsi), %eax
cmpl $0x20, %eax
je 0x1e2c4
cmpl $0x22, %eax
movq %r14, (%rsp)
je 0x1e2dd
cmpl $0x27, %eax
jne 0x1e2e0
incq %rsi
leaq -0x1(%r12), %r14
movzbl (%r14), %eax
decq %r14
cmpl $0x20, %eax
je 0x1e2e5
cmpl $0x27, %eax
je 0x1e2fe
cmpl $0x22, %eax
je 0x1e2fe
incq %r14
subq %rsi, %r14
js 0x1e378
cmpq $0x3ff, %r14            # imm = 0x3FF
jl 0x1e3d0
movl $0x3ff, %edx            # imm = 0x3FF
movq %rbx, %rdi
callq 0x81e0
leaq 0xd582c(%rip), %rsi     # 0xf3b50
leaq 0x810(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2d42(%rip), %rsi     # 0xf1082
leaq 0xd5856(%rip), %rdx     # 0xf3b9d
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2cd4(%rip), %rsi     # 0xf1034
leaq 0xd57d8(%rip), %rdx     # 0xf3b3f
movq (%rsp), %rdi
movl $0x80, %ecx
movq %rbx, %r8
jmp 0x1e4af
leaq 0xd5761(%rip), %rsi     # 0xf3ae0
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2ce7(%rip), %rsi     # 0xf1082
leaq 0xd578e(%rip), %rdx     # 0xf3b30
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2c79(%rip), %rsi     # 0xf1034
leaq 0xd577d(%rip), %rdx     # 0xf3b3f
movq (%rsp), %rdi
movl $0x7c, %ecx
jmp 0x1e4ac
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 0x1e3f0
testq %r13, %r13
jne 0x1e416
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 0x1e41f
testq %rdx, %rdx
js 0x1e2b1
cmpq $0x3ff, %rdx            # imm = 0x3FF
jl 0x1e4cd
movl $0x3ff, %edx            # imm = 0x3FF
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x81e0
leaq 0xd5763(%rip), %rsi     # 0xf3bc3
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2c06(%rip), %rsi     # 0xf1082
leaq 0xd571a(%rip), %rdx     # 0xf3b9d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2b98(%rip), %rsi     # 0xf1034
leaq 0xd569c(%rip), %rdx     # 0xf3b3f
movq (%rsp), %rdi
movl $0x99, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
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 0x1e2b8