// File: /workspace/github_c_makefile_star2_O1/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, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, 0x18(%rsp)
movl $0x0, (%rcx)
movl 0x8(%rdi), %r12d
xorl %ebp, %ebp
movl $0x0, %r13d
testl %r12d, %r12d
jle 0x1e72a
movq %rdx, 0x8(%rsp)
movq 0x10(%r15), %rbx
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84b0
testl %eax, %eax
je 0x1e725
incq %r13
addq $0x400, %rbx            # imm = 0x400
cmpq %r13, %r12
jne 0x1e704
movl %r12d, %r13d
movq 0x8(%rsp), %rdx
cmpl %r12d, %r13d
je 0x1e868
movl %r13d, %ebp
movq %rbp, %rdi
shlq $0xa, %rdi
addq 0x18(%r15), %rdi
leaq 0xe19d7(%rip), %rsi     # 0x10011f
xorl %eax, %eax
callq 0x8390
cmpl $0x1, %eax
jne 0x1e7fe
movq 0x18(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%r15), %rax
movw $0x1, (%rax,%rbp,2)
movl 0x8(%r15), %ebx
shlq $0xa, %rbp
addq $0x400, %rbp            # imm = 0x400
incl %r13d
cmpl %r13d, %ebx
jle 0x1e866
leaq 0x400(%rbp), %r12
addq 0x10(%r15), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x84b0
movq %r12, %rbp
testl %eax, %eax
jne 0x1e77c
movq (%r15), %rcx
leaq 0xd54d1(%rip), %rsi     # 0xf3c80
leaq 0x820(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd28b7(%rip), %rsi     # 0xf1082
leaq 0xd54dd(%rip), %rdx     # 0xf3caf
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd2849(%rip), %rsi     # 0xf1034
leaq 0xd547e(%rip), %rdx     # 0xf3c70
movq 0x10(%rsp), %rdi
movl $0xcd, %ecx
jmp 0x1e855
movq (%r15), %rcx
leaq 0xd5409(%rip), %rsi     # 0xf3c11
leaq 0x820(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd285e(%rip), %rsi     # 0xf1082
leaq 0xd541b(%rip), %rdx     # 0xf3c46
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xd27f0(%rip), %rsi     # 0xf1034
leaq 0xd5425(%rip), %rdx     # 0xf3c70
movq 0x10(%rsp), %rdi
movl $0xbf, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
jmp 0x1e868
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq