// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HyRec2020/hydrogen.c
// Function: allocate_and_read_fit
void allocate_and_read_fit(FIT_FUNC *fit, int *error, char *path_to_hyrec, char error_message[SIZE_ErrorM]){

  char sub_message[128];

  /*********** Effective rates *************/
  char *fit_file;
  fit_file = malloc(SIZE_InputFile);
  fit_file[0] = 0;
  strcat(fit_file, path_to_hyrec);
  strcat(fit_file, FIT_FILE);

  FILE *fA = fopen(fit_file, "r");
  if (fA == NULL) {
    sprintf(sub_message, "in allocate_and_read_fit: could not open file %s \n", fit_file);
    strcat(error_message, sub_message);
    *error = 1;
    return;
  }
  unsigned i, j;

  /* Allocate memory */
  fit->swift_func[0] = create_1D_array(DKK_SIZE, error, error_message);
  fit->swift_func[1] = create_1D_array(DKK_SIZE, error, error_message);
  fit->swift_func[2] = create_1D_array(DKK_SIZE, error, error_message);
  fit->swift_func[3] = create_1D_array(DKK_SIZE, error, error_message);
  fit->swift_func[4] = create_1D_array(DKK_SIZE, error, error_message);

  for (i = 0; i < DKK_SIZE; i++) {
    for (j = 0; j < 5; j++) {
      if( fscanf(fA,"%le", &(fit->swift_func[j][i])) != 1){
        sprintf(sub_message, "in allocate_and_read_atomic: could not read file %s completely -- The file might be corrupted\n", fit_file);
        strcat(error_message, sub_message);
        *error = 1;
        return;
      }
    }
  }
  fclose(fA);
  free(fit_file);
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
movl $0x200, %edi            # imm = 0x200
callq 0x8460
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x18(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x8660
movq 0x18(%rsp), %rdi
leaq 0x6645f(%rip), %rsi     # 0x20ea4b
callq 0x8660
movq 0x18(%rsp), %rdi
leaq 0x4863a(%rip), %rsi     # 0x1f0c37
callq 0x8410
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1a864c
leaq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x66439(%rip), %rsi     # 0x20ea59
movb $0x0, %al
callq 0x8090
movq 0xa8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8660
movq 0xb8(%rsp), %rax
movl $0x1, (%rax)
jmp 0x1a87e2
movq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x109, %edi            # imm = 0x109
callq 0x1a5690
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, (%rax)
movq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x109, %edi            # imm = 0x109
callq 0x1a5690
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x109, %edi            # imm = 0x109
callq 0x1a5690
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x109, %edi            # imm = 0x109
callq 0x1a5690
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x109, %edi            # imm = 0x109
callq 0x1a5690
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0xc(%rsp)
cmpl $0x109, 0xc(%rsp)       # imm = 0x109
jae 0x1a87ce
movl $0x0, 0x8(%rsp)
cmpl $0x5, 0x8(%rsp)
jae 0x1a87bc
movq 0x10(%rsp), %rdi
movq 0xc0(%rsp), %rax
movl 0x8(%rsp), %ecx
movq (%rax,%rcx,8), %rdx
movl 0xc(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x62a8a(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x1a87aa
leaq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x66255(%rip), %rsi     # 0x20e9d6
movb $0x0, %al
callq 0x8090
movq 0xa8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8660
movq 0xb8(%rsp), %rax
movl $0x1, (%rax)
jmp 0x1a87e2
jmp 0x1a87ac
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1a8736
jmp 0x1a87be
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1a8720
movq 0x10(%rsp), %rdi
callq 0x83c0
movq 0x18(%rsp), %rdi
callq 0x8420
addq $0xc8, %rsp
retq
nopw (%rax,%rax)