// File: /workspace/github_c_makefile_star2_O3/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 0x21e0
movq %rax, 0xc0(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x18(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x20(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x28(%r14)
movl %r12d, %edi
movl %r13d, %esi
callq 0x4971a
movq %rax, 0x38(%r14)
movl %r12d, %edi
movl %ebp, %esi
callq 0x4971a
movq %rax, 0x40(%r14)
movl %r12d, %edi
movl %ebp, %esi
callq 0x4971a
movq %rax, 0x48(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x68(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x70(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x78(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x80(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0xb8(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x60(%r14)
movl %ebx, %ebp
testl %r12d, %r12d
jle 0x237a3
leal 0x3(%rbx), %ecx
leaq -0x1(%rbp), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %ecx
shlq $0x4, %rcx
movdqa 0x2d94a(%rip), %xmm1    # 0x51010
movdqa 0x2d952(%rip), %xmm2    # 0x51020
xorl %edx, %edx
movdqa 0x2d958(%rip), %xmm3    # 0x51030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x32a98(%rip), %xmm5    # 0x56180
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x23724
movl $0x3f800000, (%rax,%rdx) # imm = 0x3F800000
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x2373b
movl $0x3f800000, 0x4(%rax,%rdx) # imm = 0x3F800000
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0x2377b
movl $0x3f800000, 0x8(%rax,%rdx) # imm = 0x3F800000
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x2378e
movl $0x3f800000, 0xc(%rax,%rdx) # imm = 0x3F800000
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x236e8
movslq 0x8(%r14), %rdi
shlq $0x2, %rdi
callq 0x21e0
movq %rax, 0x50(%r14)
movslq 0xc(%r14), %rdi
shlq $0x2, %rdi
callq 0x21e0
movq %rax, 0x58(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x88(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0x90(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, %r12
movq %rax, 0x98(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0xa0(%r14)
testl %ebx, %ebx
jle 0x23845
movq %rax, %r13
movq %rbp, (%rsp)
movq (%rsp), %rax
leaq (,%rax,4), %rbp
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x2110
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq (%rsp), %rbp
callq 0x2110
movq %r15, %rdi
callq 0x21e0
movq %rax, 0xa8(%r14)
movq %r15, %rdi
callq 0x21e0
movq %rax, 0xb0(%r14)
testl %ebx, %ebx
jle 0x23963
addl $0x3, %ebx
decq %rbp
movq %rbp, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %ebx
shlq $0x4, %rbx
movdqa 0x2d786(%rip), %xmm1    # 0x51010
movdqa 0x2d78e(%rip), %xmm2    # 0x51020
xorl %ecx, %ecx
movdqa 0x2d794(%rip), %xmm3    # 0x51030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x328d4(%rip), %xmm5    # 0x56180
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x238e7
movl $0xbf800000, (%rax,%rcx) # imm = 0xBF800000
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x238fd
movl $0xbf800000, 0x4(%rax,%rcx) # imm = 0xBF800000
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x2393c
movl $0xbf800000, 0x8(%rax,%rcx) # imm = 0xBF800000
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x2394e
movl $0xbf800000, 0xc(%rax,%rcx) # imm = 0xBF800000
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rcx
cmpq %rcx, %rbx
jne 0x238ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq