// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movl %ecx, %r12d
movl %edx, %ebp
movq %rdi, %r14
movl %esi, (%rdi)
movl %esi, 0x4(%rdi)
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movslq %esi, %rbx
leaq (,%rbx,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 %ebx, %edi
movl %r12d, %esi
callq 0x4379e
movq %rax, 0x38(%r14)
movl %ebx, %edi
movl %ebp, %esi
callq 0x4379e
movq %rax, 0x40(%r14)
movl %ebx, %edi
movl %ebp, %esi
callq 0x4379e
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)
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
cmpq %rcx, %rbx
je 0x214fb
movl $0x3f800000, (%rax,%rcx,4) # imm = 0x3F800000
incq %rcx
jmp 0x214ea
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)
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x2157d
andl $0x0, (%r12,%rcx,4)
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x2156a
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xa8(%r14)
movq %r15, %rdi
callq 0x21d0
movq %rax, 0xb0(%r14)
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x215ae
movl $0xbf800000, (%rax,%rcx,4) # imm = 0xBF800000
incq %rcx
jmp 0x2159d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq