// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/input.c
// Function: input_find_file
int input_find_file(int argc,
                    char **argv,
                    struct file_content * fc,
                    ErrorMsg errmsg){

  /** Summary: */

  /** Define local variables */
  struct file_content fc_input;       // Temporary structure with all input parameters
  struct file_content fc_precision;   // Temporary structure with all precision parameters
  struct file_content * pfc_input;    // Pointer to either fc_root or fc_inputroot
  struct file_content fc_setroot;     // Temporary structure for setroot

  int i;
  char extension[5];
  char input_file[_ARGUMENT_LENGTH_MAX_];
  char precision_file[_ARGUMENT_LENGTH_MAX_];

  pfc_input = &fc_input;

  /** Initialize the two file_content structures (for input parameters and
      precision parameters) to some null content. If no arguments are passed,
      they will remain null and inform input_init that all parameters take
      default values. */
  fc->size = 0;
  fc_input.size = 0;
  fc_precision.size = 0;
  input_file[0]='\0';
  precision_file[0]='\0';

  /** If some arguments are passed, identify eventually some 'xxx.ini' and
      'xxx.pre' files, and store their name. */
  if (argc > 1) {
    for (i=1; i<argc; i++) {
      strncpy(extension,(argv[i]+strlen(argv[i])-4),4);
      extension[4]='\0';
      if (strcmp(extension,".ini") == 0) {
        class_test(input_file[0] != '\0',
                   errmsg,
                   "You have passed more than one input file with extension '.ini', choose one.");
        strcpy(input_file,argv[i]);
      }
      else if (strcmp(extension,".pre") == 0) {
        class_test(precision_file[0] != '\0',
                   errmsg,
                   "You have passed more than one precision with extension '.pre', choose one.");
        strcpy(precision_file,argv[i]);
      }
      else {
        fprintf(stdout,"Warning: the file '%s' has an extension different from .ini and .pre, so it has been ignored\n",argv[i]);
      }
    }
  }

  /** If there is an 'xxx.ini' file, read it and store its content. */
  if (input_file[0] != '\0'){
    class_call(parser_read_file(input_file,&fc_input,errmsg),
               errmsg,
               errmsg);

    /* *
     * Set correctly the pfc_input within the set_root function,
     * including the adjusted 'root' field.
     * It is either set to a pointer to fc_input,
     * or when a new filecontent is created with root appended,
     * it is set as the pointer to fc_setroot.
     * */
    class_call(input_set_root(input_file,&pfc_input,&fc_setroot,errmsg),
               errmsg,
               errmsg);
  }

  /** If there is an 'xxx.pre' file, read it and store its content. */
  if (precision_file[0] != '\0'){
    class_call(parser_read_file(precision_file,&fc_precision,errmsg),
               errmsg,
               errmsg);
  }

  /** If one or two files were read, merge their contents in a single 'file_content'
      structure. */
  if ((input_file[0]!='\0') || (precision_file[0]!='\0')){
    class_call(parser_cat(pfc_input,
                          &fc_precision,
                          fc,
                          errmsg),
               errmsg,
               errmsg);
  }

  /** Free local strutures */
  class_call(parser_free(pfc_input),
             errmsg,
             errmsg);
  class_call(parser_free(&fc_precision),
             errmsg,
             errmsg);

  return _SUCCESS_;

}

// Assembly:
subq $0x58c8, %rsp           # imm = 0x58C8
movl %edi, 0x58c0(%rsp)
movq %rsi, 0x58b8(%rsp)
movq %rdx, 0x58b0(%rsp)
movq %rcx, 0x58a8(%rsp)
leaq 0x5880(%rsp), %rax
movq %rax, 0x5850(%rsp)
movq 0x58b0(%rsp), %rax
movl $0x0, 0x8(%rax)
movl $0x0, 0x5888(%rsp)
movl $0x0, 0x5860(%rsp)
movb $0x0, 0x5410(%rsp)
movb $0x0, 0x5010(%rsp)
cmpl $0x1, 0x58c0(%rsp)
jle 0x5cf87
movl $0x1, 0x5824(%rsp)
movl 0x5824(%rsp), %eax
cmpl 0x58c0(%rsp), %eax
jge 0x5cf85
leaq 0x581f(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58b8(%rsp), %rax
movslq 0x5824(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq 0x58b8(%rsp), %rax
movslq 0x5824(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8190
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq %rax, %rsi
addq $-0x4, %rsi
movl $0x4, %edx
callq 0x81f0
movb $0x0, 0x5823(%rsp)
leaq 0x581f(%rsp), %rdi
leaq 0x179ded(%rip), %rsi    # 0x1d6bb4
callq 0x84b0
cmpl $0x0, %eax
jne 0x5ce7d
movsbl 0x5410(%rsp), %eax
cmpl $0x0, %eax
je 0x5ce57
leaq 0x4810(%rsp), %rdi
leaq 0x179b6a(%rip), %rsi    # 0x1d695b
movb $0x0, %al
callq 0x5b9c0
leaq 0x4010(%rsp), %rdi
leaq 0x4810(%rsp), %rcx
leaq 0x175273(%rip), %rsi    # 0x1d2082
leaq 0x179b91(%rip), %rdx    # 0x1d69a7
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x4010(%rsp), %r8
leaq 0x175200(%rip), %rsi    # 0x1d2034
leaq 0x179b82(%rip), %rdx    # 0x1d69bd
movl $0x90, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
leaq 0x5410(%rsp), %rdi
movq 0x58b8(%rsp), %rax
movslq 0x5824(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x8370
jmp 0x5cf6d
leaq 0x581f(%rsp), %rdi
leaq 0x179b41(%rip), %rsi    # 0x1d69cd
callq 0x84b0
cmpl $0x0, %eax
jne 0x5cf3f
movsbl 0x5010(%rsp), %eax
cmpl $0x0, %eax
je 0x5cf1c
leaq 0x3810(%rsp), %rdi
leaq 0x179b1c(%rip), %rsi    # 0x1d69d2
movb $0x0, %al
callq 0x5b9c0
leaq 0x3010(%rsp), %rdi
leaq 0x3810(%rsp), %rcx
leaq 0x1751ae(%rip), %rsi    # 0x1d2082
leaq 0x179b42(%rip), %rdx    # 0x1d6a1d
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x3010(%rsp), %r8
leaq 0x17513b(%rip), %rsi    # 0x1d2034
leaq 0x179abd(%rip), %rdx    # 0x1d69bd
movl $0x96, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
leaq 0x5010(%rsp), %rdi
movq 0x58b8(%rsp), %rax
movslq 0x5824(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x8370
jmp 0x5cf6b
movq 0x1e704a(%rip), %rax    # 0x243f90
movq (%rax), %rdi
movq 0x58b8(%rsp), %rax
movslq 0x5824(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x179ad3(%rip), %rsi    # 0x1d6a37
movb $0x0, %al
callq 0x84e0
jmp 0x5cf6d
jmp 0x5cf6f
movl 0x5824(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5824(%rsp)
jmp 0x5cd44
jmp 0x5cf87
movsbl 0x5410(%rsp), %eax
cmpl $0x0, %eax
je 0x5d0a4
leaq 0x5410(%rsp), %rdi
movq 0x58a8(%rsp), %rdx
leaq 0x5880(%rsp), %rsi
callq 0x37640
cmpl $0x1, %eax
jne 0x5d019
leaq 0x2810(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x175407(%rip), %rsi    # 0x1d23d8
leaq 0x179abd(%rip), %rdx    # 0x1d6a95
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x2810(%rsp), %r8
leaq 0x17503e(%rip), %rsi    # 0x1d2034
leaq 0x1799c0(%rip), %rdx    # 0x1d69bd
movl $0xa3, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
leaq 0x5410(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x5850(%rsp), %rsi
leaq 0x5828(%rsp), %rdx
callq 0x5d8e0
cmpl $0x1, %eax
jne 0x5d0a2
leaq 0x2010(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x17537e(%rip), %rsi    # 0x1d23d8
leaq 0x179a62(%rip), %rdx    # 0x1d6ac3
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x2010(%rsp), %r8
leaq 0x174fb5(%rip), %rsi    # 0x1d2034
leaq 0x179937(%rip), %rdx    # 0x1d69bd
movl $0xae, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
jmp 0x5d0a4
movsbl 0x5010(%rsp), %eax
cmpl $0x0, %eax
je 0x5d138
leaq 0x5010(%rsp), %rdi
movq 0x58a8(%rsp), %rdx
leaq 0x5858(%rsp), %rsi
callq 0x37640
cmpl $0x1, %eax
jne 0x5d136
leaq 0x1810(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x1752ea(%rip), %rsi    # 0x1d23d8
leaq 0x179a07(%rip), %rdx    # 0x1d6afc
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x1810(%rsp), %r8
leaq 0x174f21(%rip), %rsi    # 0x1d2034
leaq 0x1798a3(%rip), %rdx    # 0x1d69bd
movl $0xb5, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
jmp 0x5d138
movsbl 0x5410(%rsp), %eax
cmpl $0x0, %eax
jne 0x5d156
movsbl 0x5010(%rsp), %eax
cmpl $0x0, %eax
je 0x5d1e1
movq 0x5850(%rsp), %rdi
movq 0x58b0(%rsp), %rdx
movq 0x58a8(%rsp), %rcx
leaq 0x5858(%rsp), %rsi
callq 0x39c00
cmpl $0x1, %eax
jne 0x5d1df
leaq 0x1010(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x175241(%rip), %rsi    # 0x1d23d8
leaq 0x179994(%rip), %rdx    # 0x1d6b32
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x1010(%rsp), %r8
leaq 0x174e78(%rip), %rsi    # 0x1d2034
leaq 0x1797fa(%rip), %rdx    # 0x1d69bd
movl $0xc0, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
jmp 0x5d1e1
movq 0x5850(%rsp), %rdi
callq 0x382b0
cmpl $0x1, %eax
jne 0x5d24f
leaq 0x810(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x1751ce(%rip), %rsi    # 0x1d23d8
leaq 0x179952(%rip), %rdx    # 0x1d6b63
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x810(%rsp), %r8
leaq 0x174e05(%rip), %rsi    # 0x1d2034
leaq 0x179787(%rip), %rdx    # 0x1d69bd
movl $0xc6, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
leaq 0x5858(%rsp), %rdi
callq 0x382b0
cmpl $0x1, %eax
jne 0x5d2b7
leaq 0x10(%rsp), %rdi
movq 0x58a8(%rsp), %rcx
leaq 0x175163(%rip), %rsi    # 0x1d23d8
leaq 0x1798fe(%rip), %rdx    # 0x1d6b7a
movb $0x0, %al
callq 0x5b9c0
movq 0x58a8(%rsp), %rdi
leaq 0x10(%rsp), %r8
leaq 0x174d9d(%rip), %rsi    # 0x1d2034
leaq 0x17971f(%rip), %rdx    # 0x1d69bd
movl $0xc9, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x58c4(%rsp)
jmp 0x5d2c2
movl $0x0, 0x58c4(%rsp)
movl 0x58c4(%rsp), %eax
addq $0x58c8, %rsp           # imm = 0x58C8
retq
nopw %cs:(%rax,%rax)