// File: /workspace/github_c_makefile_star2_O3/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 0x95f17
movq %r15, %rdi
callq 0x8460
movq %rax, 0x2a8(%rbx)
testq %rax, %rax
je 0x95f5c
movq %r15, %rdi
callq 0x8460
movq %rax, 0x280(%rbx)
testq %rax, %rax
je 0x95fa1
movq %r15, %rdi
callq 0x8460
movq %rax, 0x288(%rbx)
testq %rax, %rax
je 0x95fe6
movq %r15, %rdi
callq 0x8460
movq %rax, 0x2b0(%rbx)
testq %rax, %rax
je 0x9602b
testl %r12d, %r12d
jle 0x96070
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 0x96077
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 0x960bc
addq %rdi, %rdi
callq 0x8460
movq 0x2b0(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x2b0(%rbx), %rax
cmpq $0x0, (%rax,%r15,8)
je 0x960fe
incq %r15
movslq 0x854(%r14), %rcx
xorl %eax, %eax
cmpq %rcx, %r15
jl 0x95e34
jmp 0x96152
leal (,%r12,8), %ecx
leaq 0x580de(%rip), %rsi     # 0xee004
leaq 0x83248(%rip), %rdx     # 0x119175
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x580ec(%rip), %rsi     # 0xee034
leaq 0x83230(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x291, %ecx            # imm = 0x291
jmp 0x96143
leal (,%r12,8), %ecx
leaq 0x58099(%rip), %rsi     # 0xee004
leaq 0x83220(%rip), %rdx     # 0x119192
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x580a7(%rip), %rsi     # 0xee034
leaq 0x831eb(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x293, %ecx            # imm = 0x293
jmp 0x96143
leal (,%r12,8), %ecx
leaq 0x58054(%rip), %rsi     # 0xee004
leaq 0x831e7(%rip), %rdx     # 0x11919e
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x58062(%rip), %rsi     # 0xee034
leaq 0x831a6(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x295, %ecx            # imm = 0x295
jmp 0x96143
leal (,%r12,8), %ecx
leaq 0x5800f(%rip), %rsi     # 0xee004
leaq 0x831af(%rip), %rdx     # 0x1191ab
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x5801d(%rip), %rsi     # 0xee034
leaq 0x83161(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x297, %ecx            # imm = 0x297
jmp 0x96143
leal (,%r12,8), %ecx
leaq 0x57fca(%rip), %rsi     # 0xee004
leaq 0x8317a(%rip), %rdx     # 0x1191bb
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x57fd8(%rip), %rsi     # 0xee034
leaq 0x8311c(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x299, %ecx            # imm = 0x299
jmp 0x96143
xorl %eax, %eax
jmp 0x96152
imull %eax, %ebp
shll $0x3, %ebp
leaq 0x57f80(%rip), %rsi     # 0xee004
leaq 0x83141(%rip), %rdx     # 0x1191cc
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x57f8c(%rip), %rsi     # 0xee034
leaq 0x830d0(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x2a3, %ecx            # imm = 0x2A3
jmp 0x96143
imull %edi, %ebp
shll $0x3, %ebp
leaq 0x57f3b(%rip), %rsi     # 0xee004
leaq 0x83110(%rip), %rdx     # 0x1191e0
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x57f47(%rip), %rsi     # 0xee034
leaq 0x8308b(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x2a7, %ecx            # imm = 0x2A7
jmp 0x96143
movq 0x288(%rbx), %rax
movl (%rax,%r15,4), %ecx
addl %ecx, %ecx
leaq 0x57ef2(%rip), %rsi     # 0xee004
leaq 0x830dd(%rip), %rdx     # 0x1191f6
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x32a, %rbx            # imm = 0x32A
leaq 0x57f00(%rip), %rsi     # 0xee034
leaq 0x83044(%rip), %rdx     # 0x11917f
movq %rbx, %rdi
movl $0x2ab, %ecx            # imm = 0x2AB
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq