// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Allocate_Normal_modes
void Allocate_Normal_modes(struct Normal_Mode *NM,
			   int N_modes, int N_axes, int N_Cart)
{
  NM->N=N_modes;
  NM->N_kin=N_modes;
  NM->N_axes=N_axes;
  NM->N_Cart=N_Cart;
  int i;

  NM->select=malloc(N_modes*sizeof(int));
  NM->omega=malloc(N_modes*sizeof(float));
  NM->omega2=malloc(N_modes*sizeof(float));
  NM->sigma2=malloc(N_modes*sizeof(float));
  NM->Cart=Allocate_mat2_f(N_modes, N_Cart);
  NM->Tors=Allocate_mat2_f(N_modes, N_axes);
  NM->MW_Tors=Allocate_mat2_f(N_modes, N_axes);
  NM->Cart_coll=malloc(N_modes*sizeof(float));
  NM->Tors_coll=malloc(N_modes*sizeof(float));
  NM->MW_Tors_coll=malloc(N_modes*sizeof(float));
  NM->Max_dev=malloc(N_modes*sizeof(float));
  NM->sort=malloc(N_modes*sizeof(int));
  NM->Tors_frac=malloc(N_modes*sizeof(float));
  for(i=0; i<N_modes; i++)NM->Tors_frac[i]=1.0;
  NM->tors_fluct=malloc(NM->N_axes*sizeof(float));
  NM->cart_fluct=malloc(NM->N_Cart*sizeof(float));
  NM->confchange2=malloc(N_modes*sizeof(float));
  NM->sigma2_anhar=malloc(N_modes*sizeof(float));
  NM->d_KL=malloc(N_modes*sizeof(float));
  NM->Anharmonicity=malloc(N_modes*sizeof(float));
  NM->Anharm_struct=malloc(N_modes*sizeof(float));
  for(i=0; i<N_modes; i++){
    NM->Anharmonicity[i]=0; NM->Anharm_struct[i]=0;
  }
  NM->Max_factor=malloc(N_modes*sizeof(float));
  NM->Max_RMSD=malloc(N_modes*sizeof(float));
  for(i=0; i<N_modes; i++)NM->Max_RMSD[i]=-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r13d
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %esi, (%rdi)
movl %esi, 0x4(%rdi)
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movslq %esi, %r12
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xc0(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x18(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x20(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x28(%r14)
movl %r12d, %edi
movl %r13d, %esi
callq 0x496ae
movq %rax, 0x38(%r14)
movl %r12d, %edi
movl %ebp, %esi
callq 0x496ae
movq %rax, 0x40(%r14)
movl %r12d, %edi
movl %ebp, %esi
movl %ebx, %ebp
callq 0x496ae
movq %rax, 0x48(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x68(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x70(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x78(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x80(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xb8(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x60(%r14)
movl %ebx, %ebx
testl %r12d, %r12d
jle 0x23cc1
xorl %ecx, %ecx
movl $0x3f800000, (%rax,%rcx,4) # imm = 0x3F800000
incq %rcx
cmpq %rcx, %rbx
jne 0x23cb2
movslq 0x8(%r14), %rdi
shlq $0x2, %rdi
callq 0x21d0
movq %rax, 0x50(%r14)
movslq 0xc(%r14), %rdi
shlq $0x2, %rdi
callq 0x21d0
movq %rax, 0x58(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x88(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x90(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, %r12
movq %rax, 0x98(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xa0(%r14)
testl %ebp, %ebp
jle 0x23d5f
movq %rax, %r13
movl %ebp, 0x4(%rsp)
leaq (,%rbx,4), %rbp
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x2110
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movl 0x4(%rsp), %ebp
callq 0x2110
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xa8(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xb0(%r14)
testl %ebp, %ebp
jle 0x23d92
xorl %ecx, %ecx
movl $0xbf800000, (%rax,%rcx,4) # imm = 0xBF800000
incq %rcx
cmpq %rcx, %rbx
jne 0x23d83
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq