// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x3d
popq %rsi
callq 0x8140
testq %rax, %rax
je 0x1c1d2
movq %rax, %r12
movq %r13, 0x8(%rsp)
pushq $0x23
popq %rsi
movq %rbp, %rdi
callq 0x8140
movq %rax, %r13
testq %rax, %rax
setne %al
movq %r13, %rcx
subq %r12, %rcx
cmpq $0x2, %rcx
setl %cl
testb %cl, %al
je 0x1c1dd
andl $0x0, (%r15)
xorl %eax, %eax
jmp 0x1c3d5
movq %rbp, %rsi
jmp 0x1c1e5
incq %rsi
movzbl (%rsi), %eax
cmpl $0x20, %eax
je 0x1c1e2
cmpl $0x22, %eax
movq %r14, (%rsp)
je 0x1c1fb
cmpl $0x27, %eax
jne 0x1c1fe
incq %rsi
leaq -0x1(%r12), %r14
movzbl (%r14), %eax
decq %r14
cmpl $0x20, %eax
je 0x1c203
cmpl $0x27, %eax
je 0x1c21c
cmpl $0x22, %eax
je 0x1c21c
incq %r14
subq %rsi, %r14
js 0x1c296
cmpq $0x3ff, %r14            # imm = 0x3FF
jb 0x1c2ec
movl $0x3ff, %edx            # imm = 0x3FF
movq %rbx, %rdi
callq 0x8200
leaq 0xcb8de(%rip), %rsi     # 0xe7b20
leaq 0x810(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8e24(%rip), %rsi     # 0xe5082
leaq 0xcb908(%rip), %rdx     # 0xe7b6d
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8db6(%rip), %rsi     # 0xe5034
leaq 0xcb88a(%rip), %rdx     # 0xe7b0f
movq (%rsp), %rdi
movl $0x80, %ecx
movq %rbx, %r8
jmp 0x1c3cb
leaq 0xcb813(%rip), %rsi     # 0xe7ab0
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8dc9(%rip), %rsi     # 0xe5082
leaq 0xcb840(%rip), %rdx     # 0xe7b00
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8d5b(%rip), %rsi     # 0xe5034
leaq 0xcb82f(%rip), %rdx     # 0xe7b0f
pushq $0x7c
popq %rcx
movq (%rsp), %rdi
jmp 0x1c3c8
leaq 0x1(%r14), %rdx
movq %rbx, %rdi
callq 0x8200
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 0x1c30c
testq %r13, %r13
jne 0x1c332
movq %rbp, %rdi
callq 0x8190
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 0x1c33b
testq %rdx, %rdx
js 0x1c1d2
cmpq $0x3ff, %rdx            # imm = 0x3FF
jb 0x1c3e7
movl $0x3ff, %edx            # imm = 0x3FF
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x8200
leaq 0xcb817(%rip), %rsi     # 0xe7b93
leaq 0x810(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8cea(%rip), %rsi     # 0xe5082
leaq 0xcb7ce(%rip), %rdx     # 0xe7b6d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8c7c(%rip), %rsi     # 0xe5034
leaq 0xcb750(%rip), %rdx     # 0xe7b0f
movq (%rsp), %rdi
movl $0x99, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
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 0x8200
addq %r14, %r13
movb $0x0, (%rbx,%r13)
movl $0x1, (%r15)
jmp 0x1c1d6