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

  /** Define local variables */
  int index_z, index_x;

  /** Define and allocate z array */
  psd->z_min = ppr->sd_z_min;
  psd->z_max = ppr->sd_z_max;
  psd->z_size = ppr->sd_z_size;
  psd->z_delta = (log(psd->z_max)-log(psd->z_min))/psd->z_size;

  class_alloc(psd->z,
              psd->z_size*sizeof(double),
              psd->error_message);

  for (index_z = 0; index_z < psd->z_size; index_z++) {
    psd->z[index_z] = exp(log(psd->z_min+1)+psd->z_delta*index_z);
  }

  /** Define and allocate integrating weights for z array */
  class_alloc(psd->z_weights,
              psd->z_size*sizeof(double),
              psd->error_message);
  class_call(array_trapezoidal_weights(
                                       psd->z,
                                       psd->z_size,
                                       psd->z_weights,
                                       psd->error_message),
             psd->error_message,
             psd->error_message);

  /** Define and allocate x array */
  if (psd->sd_branching_approx != bra_exact) {
    psd->x_min = ppr->sd_x_min;
    psd->x_max = ppr->sd_x_max;
    psd->x_size = ppr->sd_x_size;
    psd->x_delta = (log(psd->x_max)-log(psd->x_min))/psd->x_size;

    class_alloc(psd->x,
                psd->x_size*sizeof(double),
                psd->error_message);

    for (index_x = 0; index_x<psd->x_size; index_x++) {
      psd->x[index_x] = exp(log(psd->x_min)+psd->x_delta*index_x);
    }

  }
  else if (psd->has_detector_file == _FALSE_) {
    psd->x_min = psd->sd_detector_nu_min/psd->x_to_nu;
    psd->x_max = psd->sd_detector_nu_max/psd->x_to_nu;
    psd->x_delta = psd->sd_detector_nu_delta/psd->x_to_nu;
    psd->x_size = psd->sd_detector_bin_number+1;

    class_alloc(psd->x,
                psd->x_size*sizeof(double),
                psd->error_message);

    for (index_x = 0; index_x<psd->x_size; index_x++){
      psd->x[index_x] = psd->x_min+psd->x_delta*index_x;
    }
  }

  /** Define and allocate integrating weights for x array */
  class_alloc(psd->x_weights,
              psd->x_size*sizeof(double),
              psd->error_message);
  class_call(array_trapezoidal_weights(
                                       psd->x,
                                       psd->x_size,
                                       psd->x_weights,
                                       psd->error_message),
             psd->error_message,
             psd->error_message);

  return _SUCCESS_;
}

// Assembly:
subq $0x3888, %rsp           # imm = 0x3888
movq %rdi, 0x3878(%rsp)
movq %rsi, 0x3870(%rsp)
movq %rdx, 0x3868(%rsp)
movq %rcx, 0x3860(%rsp)
movq 0x3878(%rsp), %rax
movsd 0x8f0(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x320(%rax)
movq 0x3878(%rsp), %rax
movsd 0x8f8(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x328(%rax)
movq 0x3878(%rsp), %rax
movl 0x900(%rax), %ecx
movq 0x3860(%rsp), %rax
movl %ecx, 0x330(%rax)
movq 0x3860(%rsp), %rax
movsd 0x328(%rax), %xmm0
callq 0x82f0
movsd %xmm0, 0x8(%rsp)
movq 0x3860(%rsp), %rax
movsd 0x320(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movq 0x3860(%rsp), %rax
cvtsi2sdl 0x330(%rax), %xmm1
divsd %xmm1, %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x338(%rax)
movq 0x3860(%rsp), %rax
movslq 0x330(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x3860(%rsp), %rax
movq %rcx, 0x340(%rax)
movq 0x3860(%rsp), %rax
cmpq $0x0, 0x340(%rax)
jne 0x19011f
movq 0x3860(%rsp), %rax
movslq 0x330(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x3854(%rsp)
leaq 0x3050(%rsp), %rdi
movl 0x3854(%rsp), %ecx
leaq 0x41f34(%rip), %rsi     # 0x1d2004
leaq 0x7b1c9(%rip), %rdx     # 0x20b2a0
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x3050(%rsp), %r8
leaq 0x41f38(%rip), %rsi     # 0x1d2034
leaq 0x7b1a4(%rip), %rdx     # 0x20b2a7
movl $0x22d, %ecx            # imm = 0x22D
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movl $0x0, 0x385c(%rsp)
movl 0x385c(%rsp), %eax
movq 0x3860(%rsp), %rcx
cmpl 0x330(%rcx), %eax
jge 0x1901b9
movq 0x3860(%rsp), %rax
movsd 0x420f7(%rip), %xmm0    # 0x1d2248
addsd 0x320(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movq 0x3860(%rsp), %rax
movsd 0x338(%rax), %xmm0
cvtsi2sdl 0x385c(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movq 0x3860(%rsp), %rax
movq 0x340(%rax), %rax
movslq 0x385c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x385c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x385c(%rsp)
jmp 0x19012a
movq 0x3860(%rsp), %rax
movslq 0x330(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x3860(%rsp), %rax
movq %rcx, 0x348(%rax)
movq 0x3860(%rsp), %rax
cmpq $0x0, 0x348(%rax)
jne 0x190274
movq 0x3860(%rsp), %rax
movslq 0x330(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x304c(%rsp)
leaq 0x2840(%rsp), %rdi
movl 0x304c(%rsp), %ecx
leaq 0x41ddf(%rip), %rsi     # 0x1d2004
leaq 0x7b094(%rip), %rdx     # 0x20b2c0
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x2840(%rsp), %r8
leaq 0x41de3(%rip), %rsi     # 0x1d2034
leaq 0x7b04f(%rip), %rdx     # 0x20b2a7
movl $0x236, %ecx            # imm = 0x236
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movq 0x3860(%rsp), %rax
movq 0x340(%rax), %rdi
movq 0x3860(%rsp), %rax
movl 0x330(%rax), %esi
movq 0x3860(%rsp), %rax
movq 0x348(%rax), %rdx
movq 0x3860(%rsp), %rcx
addq $0x1602, %rcx           # imm = 0x1602
callq 0x2a8d0
cmpl $0x1, %eax
jne 0x190326
leaq 0x2040(%rsp), %rdi
movq 0x3860(%rsp), %rcx
addq $0x1602, %rcx           # imm = 0x1602
leaq 0x42101(%rip), %rsi     # 0x1d23d8
leaq 0x7aff1(%rip), %rdx     # 0x20b2cf
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x2040(%rsp), %r8
leaq 0x41d31(%rip), %rsi     # 0x1d2034
leaq 0x7af9d(%rip), %rdx     # 0x20b2a7
movl $0x23d, %ecx            # imm = 0x23D
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movq 0x3860(%rsp), %rax
cmpl $0x4, (%rax)
je 0x190544
movq 0x3878(%rsp), %rax
movsd 0x908(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x350(%rax)
movq 0x3878(%rsp), %rax
movsd 0x910(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x358(%rax)
movq 0x3878(%rsp), %rax
movl 0x918(%rax), %ecx
movq 0x3860(%rsp), %rax
movl %ecx, 0x368(%rax)
movq 0x3860(%rsp), %rax
movsd 0x358(%rax), %xmm0
callq 0x82f0
movsd %xmm0, (%rsp)
movq 0x3860(%rsp), %rax
movsd 0x350(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
subsd %xmm1, %xmm0
movq 0x3860(%rsp), %rax
cvtsi2sdl 0x368(%rax), %xmm1
divsd %xmm1, %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x360(%rax)
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x3860(%rsp), %rax
movq %rcx, 0x370(%rax)
movq 0x3860(%rsp), %rax
cmpq $0x0, 0x370(%rax)
jne 0x1904ad
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x203c(%rsp)
leaq 0x1830(%rsp), %rdi
movl 0x203c(%rsp), %ecx
leaq 0x41ba6(%rip), %rsi     # 0x1d2004
leaq 0x7ad6e(%rip), %rdx     # 0x20b1d3
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x1830(%rsp), %r8
leaq 0x41baa(%rip), %rsi     # 0x1d2034
leaq 0x7ae16(%rip), %rdx     # 0x20b2a7
movl $0x248, %ecx            # imm = 0x248
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movl $0x0, 0x3858(%rsp)
movl 0x3858(%rsp), %eax
movq 0x3860(%rsp), %rcx
cmpl 0x368(%rcx), %eax
jge 0x19053f
movq 0x3860(%rsp), %rax
movsd 0x350(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movq 0x3860(%rsp), %rax
movsd 0x360(%rax), %xmm0
cvtsi2sdl 0x3858(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x8670
movq 0x3860(%rsp), %rax
movq 0x370(%rax), %rax
movslq 0x3858(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x3858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3858(%rsp)
jmp 0x1904b8
jmp 0x190749
movq 0x3860(%rsp), %rax
cmpl $0x0, 0xcdc(%rax)
jne 0x190747
movq 0x3860(%rsp), %rax
movsd 0x2d0(%rax), %xmm0
movq 0x3860(%rsp), %rax
divsd 0x380(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x350(%rax)
movq 0x3860(%rsp), %rax
movsd 0x2d8(%rax), %xmm0
movq 0x3860(%rsp), %rax
divsd 0x380(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x358(%rax)
movq 0x3860(%rsp), %rax
movsd 0x2e0(%rax), %xmm0
movq 0x3860(%rsp), %rax
divsd 0x380(%rax), %xmm0
movq 0x3860(%rsp), %rax
movsd %xmm0, 0x360(%rax)
movq 0x3860(%rsp), %rax
movl 0x2e8(%rax), %ecx
addl $0x1, %ecx
movq 0x3860(%rsp), %rax
movl %ecx, 0x368(%rax)
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x3860(%rsp), %rax
movq %rcx, 0x370(%rax)
movq 0x3860(%rsp), %rax
cmpq $0x0, 0x370(%rax)
jne 0x1906c3
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x182c(%rsp)
leaq 0x1020(%rsp), %rdi
movl 0x182c(%rsp), %ecx
leaq 0x41990(%rip), %rsi     # 0x1d2004
leaq 0x7ab58(%rip), %rdx     # 0x20b1d3
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x1020(%rsp), %r8
leaq 0x41994(%rip), %rsi     # 0x1d2034
leaq 0x7ac00(%rip), %rdx     # 0x20b2a7
movl $0x257, %ecx            # imm = 0x257
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movl $0x0, 0x3858(%rsp)
movl 0x3858(%rsp), %eax
movq 0x3860(%rsp), %rcx
cmpl 0x368(%rcx), %eax
jge 0x190745
movq 0x3860(%rsp), %rax
movsd 0x350(%rax), %xmm1
movq 0x3860(%rsp), %rax
movsd 0x360(%rax), %xmm0
cvtsi2sdl 0x3858(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x3860(%rsp), %rax
movq 0x370(%rax), %rax
movslq 0x3858(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x3858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3858(%rsp)
jmp 0x1906ce
jmp 0x190747
jmp 0x190749
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x3860(%rsp), %rax
movq %rcx, 0x378(%rax)
movq 0x3860(%rsp), %rax
cmpq $0x0, 0x378(%rax)
jne 0x190804
movq 0x3860(%rsp), %rax
movslq 0x368(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x101c(%rsp)
leaq 0x810(%rsp), %rdi
movl 0x101c(%rsp), %ecx
leaq 0x4184f(%rip), %rsi     # 0x1d2004
leaq 0x7ab67(%rip), %rdx     # 0x20b323
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x810(%rsp), %r8
leaq 0x41853(%rip), %rsi     # 0x1d2034
leaq 0x7aabf(%rip), %rdx     # 0x20b2a7
movl $0x261, %ecx            # imm = 0x261
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movq 0x3860(%rsp), %rax
movq 0x370(%rax), %rdi
movq 0x3860(%rsp), %rax
movl 0x368(%rax), %esi
movq 0x3860(%rsp), %rax
movq 0x378(%rax), %rdx
movq 0x3860(%rsp), %rcx
addq $0x1602, %rcx           # imm = 0x1602
callq 0x2a8d0
cmpl $0x1, %eax
jne 0x1908ad
leaq 0x10(%rsp), %rdi
movq 0x3860(%rsp), %rcx
addq $0x1602, %rcx           # imm = 0x1602
leaq 0x41b74(%rip), %rsi     # 0x1d23d8
leaq 0x7aac7(%rip), %rdx     # 0x20b332
movb $0x0, %al
callq 0x5b9c0
movq 0x3860(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x10(%rsp), %r8
leaq 0x417a7(%rip), %rsi     # 0x1d2034
leaq 0x7aa13(%rip), %rdx     # 0x20b2a7
movl $0x268, %ecx            # imm = 0x268
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3884(%rsp)
jmp 0x1908b8
movl $0x0, 0x3884(%rsp)
movl 0x3884(%rsp), %eax
addq $0x3888, %rsp           # imm = 0x3888
retq
nopw (%rax,%rax)