// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/distortions.c
// Function: distortions_read_br_data
int distortions_read_br_data(struct precision * ppr,
                             struct distortions * psd){

  /** Define local variables */
  int index_k,index_z;
  FILE * infile;
  DetectorFileName br_file;
  char line[_LINE_LENGTH_MAX_];
  char * left;
  int headlines = 0;

  /** Open file */
  class_sprintf(br_file,"%s/%s_branching_ratios.dat", ppr->sd_external_path, psd->sd_detector_name);
  class_open(infile, br_file, "r", psd->error_message);

  /** Read header */
  psd->br_exact_Nz = 0;
  while (fgets(line,_LINE_LENGTH_MAX_-1,infile) != NULL) {
    headlines++;

    /* Eliminate blank spaces at beginning of line */
    left=line;
    while (left[0]==' ') {
      left++;
    }

    if (left[0] > 39) {
      /** Read number of lines, infer size of arrays and allocate them */
      class_test(sscanf(line,"%d %d", &psd->br_exact_Nz, &psd->E_vec_size) != 2,
                 psd->error_message,
                 "could not header (number of lines, number of multipoles) at line %i in file '%s' \n",headlines,br_file);

      class_alloc(psd->br_exact_z, psd->br_exact_Nz*sizeof(double), psd->error_message);
      class_alloc(psd->f_g_exact, psd->br_exact_Nz*sizeof(double), psd->error_message);
      class_alloc(psd->f_y_exact, psd->br_exact_Nz*sizeof(double), psd->error_message);
      class_alloc(psd->f_mu_exact, psd->br_exact_Nz*sizeof(double), psd->error_message);

      class_alloc(psd->E_vec, psd->br_exact_Nz*psd->E_vec_size*sizeof(double), psd->error_message);
      break;
    }
  }

  /** Read parameters */
  for (index_z=0; index_z<psd->br_exact_Nz; ++index_z){
    class_test(fscanf(infile, "%le",
                      &(psd->br_exact_z[index_z]))!=1,                                // [-]
               psd->error_message,
               "Could not read z at line %i in file '%s'",index_z+headlines,br_file);
    class_test(fscanf(infile, "%le",
                      &(psd->f_g_exact[index_z]))!=1,                                 // [-]
               psd->error_message,
               "Could not read f_g at line %i in file '%s'",index_z+headlines,br_file);
    class_test(fscanf(infile, "%le",
                      &(psd->f_y_exact[index_z]))!=1,                                 // [-]
               psd->error_message,
               "Could not read f_y at line %i in file '%s'",index_z+headlines,br_file);
    class_test(fscanf(infile,"%le",
                      &(psd->f_mu_exact[index_z]))!=1,                                // [-]
               psd->error_message,
               "Could not read f_mu at line %i in file '%s'",index_z+headlines,br_file);
    for (index_k=0; index_k<psd->E_vec_size; ++index_k){
      class_test(fscanf(infile,"%le",
                        &(psd->E_vec[index_k*psd->br_exact_Nz+index_z]))!=1,           // [-]
                 psd->error_message,
                 "Could not read E vector at line %i in file '%s'",index_z+headlines,br_file);
    }
  }

  fclose(infile);

  return _SUCCESS_;
}

// Assembly:
subq $0x96f8, %rsp           # imm = 0x96F8
movq %rdi, 0x96e8(%rsp)
movq %rsi, 0x96e0(%rsp)
movl $0x0, 0x9054(%rsp)
movq 0x96e8(%rsp), %rcx
addq $0x928, %rcx            # imm = 0x928
movq 0x96e0(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
xorl %eax, %eax
movl %eax, %esi
leaq 0x77876(%rip), %rdx     # 0x20bc01
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, 0x9050(%rsp)
leaq 0x9460(%rsp), %rdi
movl 0x9050(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x96e8(%rsp), %rcx
addq $0x928, %rcx            # imm = 0x928
movq 0x96e0(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
leaq 0x7782b(%rip), %rdx     # 0x20bc01
movb $0x0, %al
callq 0x8540
leaq 0x9460(%rsp), %rdi
leaq 0x5c84b(%rip), %rsi     # 0x1f0c37
callq 0x8410
movq %rax, 0x96d0(%rsp)
cmpq $0x0, 0x96d0(%rsp)
jne 0x194471
leaq 0x8850(%rsp), %rdi
leaq 0x9460(%rsp), %rcx
leaq 0x405b5(%rip), %rsi     # 0x1d49d0
leaq 0x76cbc(%rip), %rdx     # 0x20b0de
leaq 0x405dc(%rip), %r8      # 0x1d4a05
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x8850(%rsp), %r8
leaq 0x3dbe6(%rip), %rsi     # 0x1d2034
leaq 0x777c7(%rip), %rdx     # 0x20bc1c
movl $0x591, %ecx            # imm = 0x591
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movl $0x0, 0xc20(%rax)
leaq 0x9060(%rsp), %rdi
movq 0x96d0(%rsp), %rdx
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x8530
cmpq $0x0, %rax
je 0x19499d
movl 0x9054(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9054(%rsp)
leaq 0x9060(%rsp), %rax
movq %rax, 0x9058(%rsp)
movq 0x9058(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x1944ee
movq 0x9058(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x9058(%rsp)
jmp 0x1944c8
movq 0x9058(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jle 0x194998
leaq 0x9060(%rsp), %rdi
movq 0x96e0(%rsp), %rdx
addq $0xc20, %rdx            # imm = 0xC20
movq 0x96e0(%rsp), %rcx
addq $0xc68, %rcx            # imm = 0xC68
leaq 0x5d6eb(%rip), %rsi     # 0x1f1c1a
movb $0x0, %al
callq 0x83b0
cmpl $0x2, %eax
je 0x1945ca
leaq 0x8050(%rsp), %rdi
movl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x776d8(%rip), %rsi     # 0x20bc35
movb $0x0, %al
callq 0x5b9c0
leaq 0x7850(%rsp), %rdi
leaq 0x8050(%rsp), %rcx
leaq 0x3db07(%rip), %rsi     # 0x1d2082
leaq 0x77706(%rip), %rdx     # 0x20bc88
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x7850(%rsp), %r8
leaq 0x3da8d(%rip), %rsi     # 0x1d2034
leaq 0x7766e(%rip), %rdx     # 0x20bc1c
movl $0x5a2, %ecx            # imm = 0x5A2
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x96e0(%rsp), %rax
movq %rcx, 0xc18(%rax)
movq 0x96e0(%rsp), %rax
cmpq $0x0, 0xc18(%rax)
jne 0x194685
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x784c(%rsp)
leaq 0x7040(%rsp), %rdi
movl 0x784c(%rsp), %ecx
leaq 0x3d9ce(%rip), %rsi     # 0x1d2004
leaq 0x7768a(%rip), %rdx     # 0x20bcc7
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x7040(%rsp), %r8
leaq 0x3d9d2(%rip), %rsi     # 0x1d2034
leaq 0x775b3(%rip), %rdx     # 0x20bc1c
movl $0x5a4, %ecx            # imm = 0x5A4
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x96e0(%rsp), %rax
movq %rcx, 0xc28(%rax)
movq 0x96e0(%rsp), %rax
cmpq $0x0, 0xc28(%rax)
jne 0x194740
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x703c(%rsp)
leaq 0x6830(%rsp), %rdi
movl 0x703c(%rsp), %ecx
leaq 0x3d913(%rip), %rsi     # 0x1d2004
leaq 0x775df(%rip), %rdx     # 0x20bcd7
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x6830(%rsp), %r8
leaq 0x3d917(%rip), %rsi     # 0x1d2034
leaq 0x774f8(%rip), %rdx     # 0x20bc1c
movl $0x5a5, %ecx            # imm = 0x5A5
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x96e0(%rsp), %rax
movq %rcx, 0xc38(%rax)
movq 0x96e0(%rsp), %rax
cmpq $0x0, 0xc38(%rax)
jne 0x1947fb
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x682c(%rsp)
leaq 0x6020(%rsp), %rdi
movl 0x682c(%rsp), %ecx
leaq 0x3d858(%rip), %rsi     # 0x1d2004
leaq 0x77533(%rip), %rdx     # 0x20bce6
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x6020(%rsp), %r8
leaq 0x3d85c(%rip), %rsi     # 0x1d2034
leaq 0x7743d(%rip), %rdx     # 0x20bc1c
movl $0x5a6, %ecx            # imm = 0x5A6
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x96e0(%rsp), %rax
movq %rcx, 0xc48(%rax)
movq 0x96e0(%rsp), %rax
cmpq $0x0, 0xc48(%rax)
jne 0x1948b6
movq 0x96e0(%rsp), %rax
movslq 0xc20(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x601c(%rsp)
leaq 0x5810(%rsp), %rdi
movl 0x601c(%rsp), %ecx
leaq 0x3d79d(%rip), %rsi     # 0x1d2004
leaq 0x77487(%rip), %rdx     # 0x20bcf5
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x5810(%rsp), %r8
leaq 0x3d7a1(%rip), %rsi     # 0x1d2034
leaq 0x77382(%rip), %rdx     # 0x20bc1c
movl $0x5a7, %ecx            # imm = 0x5A7
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96e0(%rsp), %rax
movl 0xc20(%rax), %eax
movq 0x96e0(%rsp), %rcx
imull 0xc68(%rcx), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x96e0(%rsp), %rax
movq %rcx, 0xc58(%rax)
movq 0x96e0(%rsp), %rax
cmpq $0x0, 0xc58(%rax)
jne 0x194996
movq 0x96e0(%rsp), %rax
movl 0xc20(%rax), %eax
movq 0x96e0(%rsp), %rcx
imull 0xc68(%rcx), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x580c(%rsp)
leaq 0x5000(%rsp), %rdi
movl 0x580c(%rsp), %ecx
leaq 0x3d6bd(%rip), %rsi     # 0x1d2004
leaq 0x773b7(%rip), %rdx     # 0x20bd05
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x5000(%rsp), %r8
leaq 0x3d6c1(%rip), %rsi     # 0x1d2034
leaq 0x772a2(%rip), %rdx     # 0x20bc1c
movl $0x5a9, %ecx            # imm = 0x5A9
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
jmp 0x19499d
jmp 0x194483
movl $0x0, 0x96d8(%rsp)
movl 0x96d8(%rsp), %eax
movq 0x96e0(%rsp), %rcx
cmpl 0xc20(%rcx), %eax
jge 0x194e2e
movq 0x96d0(%rsp), %rdi
movq 0x96e0(%rsp), %rax
movq 0xc18(%rax), %rdx
movslq 0x96d8(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x767fe(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x194a92
leaq 0x4800(%rsp), %rdi
movl 0x96d8(%rsp), %edx
addl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x772eb(%rip), %rsi     # 0x20bd10
movb $0x0, %al
callq 0x5b9c0
leaq 0x4000(%rsp), %rdi
leaq 0x4800(%rsp), %rcx
leaq 0x3d63f(%rip), %rsi     # 0x1d2082
leaq 0x772ef(%rip), %rdx     # 0x20bd39
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x4000(%rsp), %r8
leaq 0x3d5c5(%rip), %rsi     # 0x1d2034
leaq 0x771a6(%rip), %rdx     # 0x20bc1c
movl $0x5b3, %ecx            # imm = 0x5B3
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96d0(%rsp), %rdi
movq 0x96e0(%rsp), %rax
movq 0xc28(%rax), %rdx
movslq 0x96d8(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x7672f(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x194b61
leaq 0x3800(%rsp), %rdi
movl 0x96d8(%rsp), %edx
addl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x7727b(%rip), %rsi     # 0x20bd6f
movb $0x0, %al
callq 0x5b9c0
leaq 0x3000(%rsp), %rdi
leaq 0x3800(%rsp), %rcx
leaq 0x3d570(%rip), %rsi     # 0x1d2082
leaq 0x77281(%rip), %rdx     # 0x20bd9a
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x3000(%rsp), %r8
leaq 0x3d4f6(%rip), %rsi     # 0x1d2034
leaq 0x770d7(%rip), %rdx     # 0x20bc1c
movl $0x5b7, %ecx            # imm = 0x5B7
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96d0(%rsp), %rdi
movq 0x96e0(%rsp), %rax
movq 0xc38(%rax), %rdx
movslq 0x96d8(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x76660(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x194c30
leaq 0x2800(%rsp), %rdi
movl 0x96d8(%rsp), %edx
addl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x7720c(%rip), %rsi     # 0x20bdcf
movb $0x0, %al
callq 0x5b9c0
leaq 0x2000(%rsp), %rdi
leaq 0x2800(%rsp), %rcx
leaq 0x3d4a1(%rip), %rsi     # 0x1d2082
leaq 0x77212(%rip), %rdx     # 0x20bdfa
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x2000(%rsp), %r8
leaq 0x3d427(%rip), %rsi     # 0x1d2034
leaq 0x77008(%rip), %rdx     # 0x20bc1c
movl $0x5bb, %ecx            # imm = 0x5BB
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movq 0x96d0(%rsp), %rdi
movq 0x96e0(%rsp), %rax
movq 0xc48(%rax), %rdx
movslq 0x96d8(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x76591(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x194cff
leaq 0x1800(%rsp), %rdi
movl 0x96d8(%rsp), %edx
addl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x7719d(%rip), %rsi     # 0x20be2f
movb $0x0, %al
callq 0x5b9c0
leaq 0x1000(%rsp), %rdi
leaq 0x1800(%rsp), %rcx
leaq 0x3d3d2(%rip), %rsi     # 0x1d2082
leaq 0x771a4(%rip), %rdx     # 0x20be5b
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x1000(%rsp), %r8
leaq 0x3d358(%rip), %rsi     # 0x1d2034
leaq 0x76f39(%rip), %rdx     # 0x20bc1c
movl $0x5bf, %ecx            # imm = 0x5BF
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
movl $0x0, 0x96dc(%rsp)
movl 0x96dc(%rsp), %eax
movq 0x96e0(%rsp), %rcx
cmpl 0xc68(%rcx), %eax
jge 0x194e16
movq 0x96d0(%rsp), %rdi
movq 0x96e0(%rsp), %rax
movq 0xc58(%rax), %rdx
movl 0x96dc(%rsp), %eax
movq 0x96e0(%rsp), %rcx
imull 0xc20(%rcx), %eax
addl 0x96d8(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x76485(%rip), %rsi     # 0x20b1ee
movb $0x0, %al
callq 0x8690
cmpl $0x1, %eax
je 0x194dfe
leaq 0x800(%rsp), %rdi
movl 0x96d8(%rsp), %edx
addl 0x9054(%rsp), %edx
leaq 0x9460(%rsp), %rcx
leaq 0x770f2(%rip), %rsi     # 0x20be90
movb $0x0, %al
callq 0x5b9c0
movq %rsp, %rdi
leaq 0x800(%rsp), %rcx
leaq 0x3d2cb(%rip), %rsi     # 0x1d2082
leaq 0x77102(%rip), %rdx     # 0x20bec0
movb $0x0, %al
callq 0x5b9c0
movq 0x96e0(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
movq %rsp, %r8
leaq 0x3d256(%rip), %rsi     # 0x1d2034
leaq 0x76e37(%rip), %rdx     # 0x20bc1c
movl $0x5c4, %ecx            # imm = 0x5C4
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x96f4(%rsp)
jmp 0x194e46
jmp 0x194e00
movl 0x96dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x96dc(%rsp)
jmp 0x194d0a
jmp 0x194e18
movl 0x96d8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x96d8(%rsp)
jmp 0x1949a8
movq 0x96d0(%rsp), %rdi
callq 0x83c0
movl $0x0, 0x96f4(%rsp)
movl 0x96f4(%rsp), %eax
addq $0x96f8, %rsp           # imm = 0x96F8
retq
nopw %cs:(%rax,%rax)