// File: /workspace/github_c_makefile_star2_O2/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 %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rcx, 0x10(%rsp)
andl $0x0, (%rcx)
movq %rdi, %r15
movl 0x8(%rdi), %ebp
xorl %r13d, %r13d
testl %ebp, %ebp
movl $0x0, %r12d
cmovgl %ebp, %r12d
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x1c628
movq 0x10(%r15), %rdi
addq %r13, %rdi
movq %r14, %rsi
callq 0x84e0
testl %eax, %eax
je 0x1c625
incq %rbx
addq $0x400, %r13            # imm = 0x400
jmp 0x1c601
movl %ebx, %r12d
cmpl %ebp, %r12d
jne 0x1c634
xorl %eax, %eax
jmp 0x1c763
movl %r12d, %ebx
movq %rbx, %rbp
shlq $0xa, %rbp
movq 0x18(%r15), %rdi
addq %rbp, %rdi
leaq 0xd79c3(%rip), %rsi     # 0xf400f
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x83b0
cmpl $0x1, %eax
jne 0x1c6ff
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%r15), %rax
movw $0x1, (%rax,%rbx,2)
movl 0x8(%r15), %ebx
addq $0x400, %rbp            # imm = 0x400
incl %r12d
cmpl %r12d, %ebx
jle 0x1c62d
leaq 0x400(%rbp), %r13
addq 0x10(%r15), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x84e0
movq %r13, %rbp
testl %eax, %eax
jne 0x1c681
movq (%r15), %rcx
leaq 0xcb5a0(%rip), %rsi     # 0xe7c50
leaq 0x820(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0xc89b6(%rip), %rsi     # 0xe5082
leaq 0xcb5ac(%rip), %rdx     # 0xe7c7f
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xc8948(%rip), %rsi     # 0xe5034
leaq 0xcb54d(%rip), %rdx     # 0xe7c40
movq 0x8(%rsp), %rdi
movl $0xcd, %ecx
jmp 0x1c756
movq (%r15), %rcx
leaq 0xcb4d8(%rip), %rsi     # 0xe7be1
leaq 0x820(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0xc895d(%rip), %rsi     # 0xe5082
leaq 0xcb4ea(%rip), %rdx     # 0xe7c16
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xc88ef(%rip), %rsi     # 0xe5034
leaq 0xcb4f4(%rip), %rdx     # 0xe7c40
movq 0x8(%rsp), %rdi
movl $0xbf, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq