// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../source/primordial.c
// Function: primordial_indices
int primordial_indices(
                       struct perturbations   * ppt,
                       struct primordial * ppm
                       ) {

  int index_md;

  ppm->md_size = ppt->md_size;

  class_alloc(ppm->lnpk,ppt->md_size*sizeof(double*),ppm->error_message);

  class_alloc(ppm->ddlnpk,ppt->md_size*sizeof(double*),ppm->error_message);

  class_alloc(ppm->ic_size,ppt->md_size*sizeof(int*),ppm->error_message);

  class_alloc(ppm->ic_ic_size,ppt->md_size*sizeof(int*),ppm->error_message);

  class_alloc(ppm->is_non_zero,ppm->md_size*sizeof(short *),ppm->error_message);

  for (index_md = 0; index_md < ppt->md_size; index_md++) {

    ppm->ic_size[index_md] = ppt->ic_size[index_md];

    ppm->ic_ic_size[index_md] = (ppm->ic_size[index_md]*(ppm->ic_size[index_md]+1))/2;

    class_alloc(ppm->lnpk[index_md],
                ppm->lnk_size*ppm->ic_ic_size[index_md]*sizeof(double),
                ppm->error_message);

    class_alloc(ppm->ddlnpk[index_md],
                ppm->lnk_size*ppm->ic_ic_size[index_md]*sizeof(double),
                ppm->error_message);

    class_alloc(ppm->is_non_zero[index_md],
                ppm->ic_ic_size[index_md]*sizeof(short),
                ppm->error_message);


  }

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x854(%rdi), %r12
movl %r12d, 0x278(%rsi)
movq %r12, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x8460
movq %rax, 0x2a0(%rbx)
testq %rax, %rax
je 0x98d19
movq %r15, %rdi
callq 0x8460
movq %rax, 0x2a8(%rbx)
testq %rax, %rax
je 0x98d5e
movq %r15, %rdi
callq 0x8460
movq %rax, 0x280(%rbx)
testq %rax, %rax
je 0x98da3
movq %r15, %rdi
callq 0x8460
movq %rax, 0x288(%rbx)
testq %rax, %rax
je 0x98de8
movq %r15, %rdi
callq 0x8460
movq %rax, 0x2b0(%rbx)
testq %rax, %rax
je 0x98e2d
cmpl $0x0, 0x854(%r14)
jle 0x98e72
xorl %r15d, %r15d
movq 0x870(%r14), %rax
movl (%rax,%r15,4), %eax
movq 0x280(%rbx), %rcx
movl %eax, (%rcx,%r15,4)
leal 0x1(%rax), %ecx
imull %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movq 0x288(%rbx), %rcx
movl %eax, (%rcx,%r15,4)
movl 0x290(%rbx), %ebp
imull %ebp, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq 0x2a0(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x288(%rbx), %rax
movq 0x2a0(%rbx), %rcx
cmpq $0x0, (%rcx,%r15,8)
movl (%rax,%r15,4), %eax
je 0x98e79
imull %ebp, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq 0x2a8(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x288(%rbx), %rax
movq 0x2a8(%rbx), %rcx
cmpq $0x0, (%rcx,%r15,8)
movslq (%rax,%r15,4), %rdi
je 0x98ebe
addq %rdi, %rdi
callq 0x8460
movq 0x2b0(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x2b0(%rbx), %rax
cmpq $0x0, (%rax,%r15,8)
je 0x98f00
incq %r15
movslq 0x854(%r14), %rcx
xorl %eax, %eax
cmpq %rcx, %r15
jl 0x98c36
jmp 0x98f54
leal (,%r12,8), %ecx
leaq 0x582dc(%rip), %rsi     # 0xf1004
leaq 0x83406(%rip), %rdx     # 0x11c135
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x582ea(%rip), %rsi     # 0xf1034
leaq 0x833ee(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x291, %ecx            # imm = 0x291
jmp 0x98f45
leal (,%r12,8), %ecx
leaq 0x58297(%rip), %rsi     # 0xf1004
leaq 0x833de(%rip), %rdx     # 0x11c152
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x582a5(%rip), %rsi     # 0xf1034
leaq 0x833a9(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x293, %ecx            # imm = 0x293
jmp 0x98f45
leal (,%r12,8), %ecx
leaq 0x58252(%rip), %rsi     # 0xf1004
leaq 0x833a5(%rip), %rdx     # 0x11c15e
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58260(%rip), %rsi     # 0xf1034
leaq 0x83364(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x295, %ecx            # imm = 0x295
jmp 0x98f45
leal (,%r12,8), %ecx
leaq 0x5820d(%rip), %rsi     # 0xf1004
leaq 0x8336d(%rip), %rdx     # 0x11c16b
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x5821b(%rip), %rsi     # 0xf1034
leaq 0x8331f(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x297, %ecx            # imm = 0x297
jmp 0x98f45
leal (,%r12,8), %ecx
leaq 0x581c8(%rip), %rsi     # 0xf1004
leaq 0x83338(%rip), %rdx     # 0x11c17b
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x581d6(%rip), %rsi     # 0xf1034
leaq 0x832da(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x299, %ecx            # imm = 0x299
jmp 0x98f45
xorl %eax, %eax
jmp 0x98f54
imull %eax, %ebp
shll $0x3, %ebp
leaq 0x5817e(%rip), %rsi     # 0xf1004
leaq 0x832ff(%rip), %rdx     # 0x11c18c
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x5818a(%rip), %rsi     # 0xf1034
leaq 0x8328e(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x2a3, %ecx            # imm = 0x2A3
jmp 0x98f45
imull %edi, %ebp
shll $0x3, %ebp
leaq 0x58139(%rip), %rsi     # 0xf1004
leaq 0x832ce(%rip), %rdx     # 0x11c1a0
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58145(%rip), %rsi     # 0xf1034
leaq 0x83249(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x2a7, %ecx            # imm = 0x2A7
jmp 0x98f45
movq 0x288(%rbx), %rax
movl (%rax,%r15,4), %ecx
addl %ecx, %ecx
leaq 0x580f0(%rip), %rsi     # 0xf1004
leaq 0x8329b(%rip), %rdx     # 0x11c1b6
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x580fe(%rip), %rsi     # 0xf1034
leaq 0x83202(%rip), %rdx     # 0x11c13f
movq %rbx, %rdi
movl $0x2ab, %ecx            # imm = 0x2AB
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq