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

  /* 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_;

  /* read parameter value. If this fails, return an error */

  class_test(sscanf(pfc->value[index],"%d",value) != 1,
             errmsg,
             "could not read value of parameter '%s' in file '%s'\n",name,pfc->filename);

  /* 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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movq %r8, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, 0x18(%rsp)
movl $0x0, (%rcx)
movslq 0x8(%rdi), %r12
xorl %ebp, %ebp
movl $0x0, %r13d
testq %r12, %r12
jle 0x1e7a4
movq %rdx, 0x10(%rsp)
movq 0x10(%r15), %rbx
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84b0
testl %eax, %eax
je 0x1e79f
incq %r13
addq $0x400, %rbx            # imm = 0x400
cmpq %r13, %r12
jne 0x1e77a
xorl %ebp, %ebp
jmp 0x1e8d9
movq 0x10(%rsp), %rdx
cmpl %r12d, %r13d
je 0x1e8d9
movl %r13d, %ebx
movq %rbx, %rbp
shlq $0xa, %rbp
movq 0x18(%r15), %rdi
addq %rbp, %rdi
leaq 0xde982(%rip), %rsi     # 0xfd147
xorl %eax, %eax
callq 0x8390
cmpl $0x1, %eax
jne 0x1e873
movq 0x18(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%r15), %rax
movw $0x1, (%rax,%rbx,2)
movl 0x8(%r15), %ebx
addq $0x400, %rbp            # imm = 0x400
incl %r13d
cmpl %r13d, %ebx
jle 0x1e798
leaq 0x400(%rbp), %r12
addq 0x10(%r15), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x84b0
movq %r12, %rbp
testl %eax, %eax
jne 0x1e7f5
movq (%r15), %rcx
leaq 0xd246c(%rip), %rsi     # 0xf0c90
leaq 0x820(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0xcf842(%rip), %rsi     # 0xee082
leaq 0xd2478(%rip), %rdx     # 0xf0cbf
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcf7d4(%rip), %rsi     # 0xee034
leaq 0xd2419(%rip), %rdx     # 0xf0c80
movq 0x8(%rsp), %rdi
movl $0xcd, %ecx
jmp 0x1e8ca
movq (%r15), %rcx
leaq 0xd23a4(%rip), %rsi     # 0xf0c21
leaq 0x820(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0xcf7e9(%rip), %rsi     # 0xee082
leaq 0xd23b6(%rip), %rdx     # 0xf0c56
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcf77b(%rip), %rsi     # 0xee034
leaq 0xd23c0(%rip), %rdx     # 0xf0c80
movq 0x8(%rsp), %rdi
movl $0xbf, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq