// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../source/lensing.c
// Function: lensing_d40
int lensing_d40(
                double * mu,
                int num_mu,
                int lmax,
                double ** d40
                ) {
  double ll;
  int index_mu, l;
  double *fac1, *fac3, *fac4;
  ErrorMsg erreur;
  class_alloc(fac1,lmax*sizeof(double),erreur);
  class_alloc(fac3,lmax*sizeof(double),erreur);
  class_alloc(fac4,lmax*sizeof(double),erreur);
  for (l=4;l<lmax;l++) {
    ll = (double) l;
    fac1[l] = sqrt((2*ll+3)*(2*ll+1)/((ll-3)*(ll+5)));
    fac3[l] = sqrt((2*ll+3)*(ll-4)*(ll+4)/((2*ll-1)*(ll-3)*(ll+5)));
    fac4[l] = sqrt(2./(2*ll+3));
  }

  class_setup_parallel();
  for (index_mu=0;index_mu<num_mu;index_mu++) {
    class_run_parallel(=,
      int l;
      double declare_list_of_variables_inside_parallel_region(dlm1, dl, dlp1);
      d40[index_mu][0]=0;
      d40[index_mu][1]=0;
      d40[index_mu][2]=0;
      dlm1=0.; /*l=3*/
      d40[index_mu][3]=0;
      dl=sqrt(315.)*(1+mu[index_mu])*(1+mu[index_mu])*(1-mu[index_mu])*(1-mu[index_mu])/16.; /*l=4*/
      d40[index_mu][4] = dl * sqrt(2./9.);
      for (l=4;l<lmax;l++){
        /* sqrt((2l+1)/2)*d22 recurrence, supposed to be more stable */
        dlp1 = fac1[l]*mu[index_mu]*dl - fac3[l]*dlm1;
        d40[index_mu][l+1] = dlp1 * fac4[l];
        dlm1 = dl;
        dl = dlp1;
      }
      return _SUCCESS_;
    );
  }
  class_finish_parallel();
  free(fac1); free(fac3); free(fac4);
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10c8, %rsp           # imm = 0x10C8
movq %rcx, 0xa8(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdi, 0xa0(%rsp)
movl %edx, 0x4(%rsp)
movslq %edx, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x8460
testq %rax, %rax
je 0xc15bd
movq %rax, %r13
movq %r15, %rdi
callq 0x8460
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0xc1600
movq %r15, %rdi
callq 0x8460
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0xc1691
cmpl $0x5, 0x4(%rsp)
jl 0xc12de
movl 0x4(%rsp), %ebx
movl $0x4, %r14d
xorpd %xmm2, %xmm2
xorps %xmm4, %xmm4
cvtsi2sd %r14d, %xmm4
addsd %xmm4, %xmm4
movapd %xmm4, %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
addpd 0x64542(%rip), %xmm3    # 0x1256f0
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
mulsd %xmm3, %xmm0
movd %r14d, %xmm1
pshufd $0x50, %xmm1, %xmm5     # xmm5 = xmm1[0,0,1,1]
addsd 0x3061c(%rip), %xmm4    # 0xf17e8
movdqa %xmm5, %xmm1
paddd 0x64548(%rip), %xmm1    # 0x125720
cvtdq2pd %xmm1, %xmm6
paddd 0x6454c(%rip), %xmm5    # 0x125730
punpckldq 0x32f74(%rip), %xmm5 # xmm5 = xmm5[0],mem[0],xmm5[1],mem[1]
movdqa 0x336fc(%rip), %xmm1    # 0xf48f0
por %xmm1, %xmm5
subpd %xmm1, %xmm5
movapd %xmm6, %xmm1
mulpd %xmm5, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
movapd %xmm3, 0x30(%rsp)
jb 0xc121e
sqrtsd %xmm0, %xmm0
jmp 0xc125d
movapd %xmm4, 0x90(%rsp)
movapd %xmm5, 0x70(%rsp)
movapd %xmm6, 0xb0(%rsp)
callq 0x82b0
movapd 0xb0(%rsp), %xmm6
movapd 0x70(%rsp), %xmm5
movapd 0x90(%rsp), %xmm4
movapd 0x30(%rsp), %xmm3
xorpd %xmm2, %xmm2
movsd %xmm0, (%r13,%r14,8)
movapd %xmm3, %xmm0
unpcklpd %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0]
mulpd %xmm6, %xmm0
mulpd %xmm5, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0xc128c
sqrtsd %xmm0, %xmm0
jmp 0xc129b
callq 0x82b0
movapd 0x30(%rsp), %xmm3
xorpd %xmm2, %xmm2
movq 0x28(%rsp), %rax
movsd %xmm0, (%rax,%r14,8)
movsd 0x30a52(%rip), %xmm0    # 0xf1d00
divsd %xmm3, %xmm0
ucomisd %xmm2, %xmm0
jb 0xc12be
sqrtsd %xmm0, %xmm0
jmp 0xc12c7
callq 0x82b0
xorpd %xmm2, %xmm2
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax,%r14,8)
incq %r14
cmpq %r14, %rbx
jne 0xc1192
callq 0x1c5f0
leaq 0xc0(%rsp), %rdi
movl %eax, %esi
callq 0x1c6a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
cmpl $0x0, 0x1c(%rsp)
jle 0xc1594
movl $0x0, 0x30(%rsp)
movabsq $0x100000001, %rbx      # imm = 0x100000001
leaq 0x88ec7(%rip), %rax     # 0x14a1f0
addq $0x10, %rax
movq %rax, 0x90(%rsp)
movq %r13, 0x70(%rsp)
movl $0x20, %edi
callq 0x83b0
movq %rax, %r12
movq %rbx, 0x8(%rax)
movq 0x90(%rsp), %rax
movq %rax, (%r12)
movl $0x70, %edi
callq 0x83b0
movq %rax, %r15
movq %rbx, 0x8(%rax)
leaq 0x8a641(%rip), %rax     # 0x14b9b0
movq %rax, (%r15)
movq %r15, %rbx
addq $0x10, %rbx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x1d42e
movq %r12, %r14
addq $0x10, %r14
leaq 0x8a66c(%rip), %rax     # 0x14ba00
movq %rax, 0x10(%r15)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%r15)
movl 0x30(%rsp), %eax
movl %eax, 0x40(%r15)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%r15)
movl 0x4(%rsp), %eax
movl %eax, 0x50(%r15)
movq %r13, 0x58(%r15)
movq 0x28(%rsp), %rax
movq %rax, 0x60(%r15)
movq 0x20(%rsp), %rax
movq %rax, 0x68(%r15)
movq %rbx, 0x10(%r12)
movq %r15, 0x18(%r12)
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x1d35e
movq %r14, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movq 0x8abaf(%rip), %rax     # 0x14bfb0
cmpb $0x0, (%rax)
je 0xc140d
incl 0x8(%r12)
jmp 0xc1413
lock
incl 0x8(%r12)
movl $0x1, %r15d
lock
xaddl %r15d, 0xe0(%rsp)
movl 0xc0(%rsp), %ecx
testl %ecx, %ecx
je 0xc14b4
xorl %r13d, %r13d
leal (%r15,%r13), %eax
xorl %edx, %edx
divl %ecx
movq 0xe8(%rsp), %rbx
imulq $0xb0, %rdx, %rbp
leaq (%rbx,%rbp), %rdi
addq $0x58, %rdi
movq %rdi, 0x8(%rsp)
callq 0x8080
movl %eax, %r14d
testl %eax, %eax
sete 0x10(%rsp)
je 0xc1476
leaq 0x8(%rsp), %rdi
callq 0x1d17a
jmp 0xc149c
addq %rbp, %rbx
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
callq 0xc9adc
leaq 0x8(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x81c0
testl %r14d, %r14d
je 0xc1536
incl %r13d
movl 0xc0(%rsp), %ecx
cmpl %ecx, %r13d
jb 0xc1435
movl %r15d, %eax
xorl %edx, %edx
divl 0xc0(%rsp)
movq 0xe8(%rsp), %r14
imulq $0xb0, %rdx, %rbx
leaq (%r14,%rbx), %rax
addq $0x58, %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1d20a
addq %rbx, %r14
movb $0x1, 0x10(%rsp)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0xc9adc
leaq 0x8(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r14
movq %r14, %rdi
callq 0x81c0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xc1525
callq 0x1d2a6
movq 0x70(%rsp), %r13
movabsq $0x100000001, %rbx      # imm = 0x100000001
jmp 0xc1554
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
movabsq $0x100000001, %rbx      # imm = 0x100000001
je 0xc154f
callq 0x1d2a6
movq 0x70(%rsp), %r13
movq %r12, %rdi
callq 0x1d2a6
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1dcb8
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xc1580
callq 0x1d2a6
movl 0x30(%rsp), %eax
incl %eax
movl %eax, 0x30(%rsp)
cmpl 0x1c(%rsp), %eax
jne 0xc133a
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %r14
cmpq %r14, %rbx
je 0xc1643
movq %rbx, %rdi
callq 0x1c724
testl %eax, %eax
jne 0xc16e0
addq $0x10, %rbx
jmp 0xc159e
leaq 0x2fa40(%rip), %rsi     # 0xf1004
leaq 0x67489(%rip), %rdx     # 0x128a54
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0x2fa4d(%rip), %rsi     # 0xf1034
leaq 0x674ea(%rip), %rdx     # 0x128ad8
leaq 0x8c0(%rsp), %rdi
movl $0x710, %ecx            # imm = 0x710
jmp 0xc16cf
leaq 0x2f9fd(%rip), %rsi     # 0xf1004
leaq 0x6745c(%rip), %rdx     # 0x128a6a
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0x2fa0a(%rip), %rsi     # 0xf1034
leaq 0x674a7(%rip), %rdx     # 0x128ad8
leaq 0x8c0(%rsp), %rdi
movl $0x711, %ecx            # imm = 0x711
jmp 0xc16cf
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %r14
cmpq %rbx, %r14
je 0xc1671
movq %rbx, %r15
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0xc1663
callq 0x1d2a6
addq $0x10, %r15
cmpq %r14, %r15
jne 0xc1655
movq %rbx, 0x58(%rsp)
movq %r13, %rdi
callq 0x8410
movq 0x28(%rsp), %rdi
callq 0x8410
movq 0x20(%rsp), %rdi
callq 0x8410
xorl %ebx, %ebx
jmp 0xc16e5
leaq 0x2f96c(%rip), %rsi     # 0xf1004
leaq 0x673dc(%rip), %rdx     # 0x128a7b
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0x2f979(%rip), %rsi     # 0xf1034
leaq 0x67416(%rip), %rdx     # 0x128ad8
leaq 0x8c0(%rsp), %rdi
movl $0x712, %ecx            # imm = 0x712
movq %rbx, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebx
jmp 0xc16fc
movl $0x1, %ebx
leaq 0x50(%rsp), %rdi
callq 0x1c770
leaq 0xc0(%rsp), %rdi
callq 0x1c7b0
movl %ebx, %eax
addq $0x10c8, %rsp           # imm = 0x10C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc1719
movq %rax, %rbx
jmp 0xc175c
jmp 0xc174f
movq %rax, %rbx
jmp 0xc1785
movq %rax, %rbx
jmp 0xc172e
movq %rax, %rbx
movq %r15, %rdi
callq 0x8380
movq %r12, %rdi
callq 0x8380
jmp 0xc1785
movq %rax, %rbx
jmp 0xc177d
movq %rax, %rbx
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
jne 0xc1780
jmp 0xc1785
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1d17a
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0xc176b
callq 0x1d2a6
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xc177d
callq 0x1d2a6
movq %r12, %rdi
callq 0x1d2a6
leaq 0x50(%rsp), %rdi
callq 0x1c770
leaq 0xc0(%rsp), %rdi
callq 0x1c7b0
movq %rbx, %rdi
callq 0x8650