// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: fillMatrix
void fillMatrix(double stackEntropies[],double stackEnthalpies[],double stackint2Entropies[],double stackint2Enthalpies[],double dangleEntropies3[],double dangleEnthalpies3[],double dangleEntropies5[],double dangleEnthalpies5[],double interiorLoopEntropies[],double bulgeLoopEntropies[],double interiorLoopEnthalpies[],double bulgeLoopEnthalpies[],double tstackEntropies[],double tstackEnthalpies[],double tstack2Entropies[],double tstack2Enthalpies[],double atpS[],double atpH[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],char numSeq1[],char numSeq2[])
{
	int d,i,j,ii,jj;
	double SH[2];

	for(i=1;i<=Initint[0];++i)
	{
		for(j=1;j<=Initint[1];++j)
		{
			if(fabs(enthalpyDPT[(i-1)*Initint[2]+j-1])<999999999)
			{
				SH[0]=-1.0;
				SH[1]=1.0*INFINITY;
				LSH(i,j,SH,dangleEntropies3,dangleEnthalpies3,dangleEntropies5,dangleEnthalpies5,tstack2Entropies,tstack2Enthalpies,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);

				if(fabs(SH[1])<999999999)
				{
					entropyDPT[(i-1)*Initint[2]+j-1]=SH[0];
					enthalpyDPT[(i-1)*Initint[2]+j-1]=SH[1];
				}
				if(i>1&&j>1)
				{
					maxTM(i,j,stackEntropies,stackEnthalpies,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);
					for(d=3;d<=32;d++)
					{
						ii=i-1;
						jj=-ii-d+(j+i);
						if(jj<1)
						{
							ii-=abs(jj-1);
							jj=1;
						}
						for(;ii>0&&jj<j;--ii,++jj)
						{
							if(fabs(enthalpyDPT[(ii-1)*Initint[2]+jj-1])<999999999)
							{
								SH[0]=-1.0;
								SH[1]=1.0*INFINITY;
								calc_bulge_internal(ii,jj,i,j,SH,0,stackEntropies,stackEnthalpies,stackint2Entropies,stackint2Enthalpies,interiorLoopEntropies,bulgeLoopEntropies,interiorLoopEnthalpies,bulgeLoopEnthalpies,tstackEntropies,tstackEnthalpies,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);

								if(SH[0]<-2500.0)
								{
									SH[0] =-3224.0;
									SH[1] = 0.0;
								}
								if(fabs(SH[1])<999999999)
								{
									enthalpyDPT[(i-1)*Initint[2]+j-1]=SH[1];
									entropyDPT[(i-1)*Initint[2]+j-1]=SH[0];
								}
							}
						}
					}
				} // if 
			}
		} // for 
	} //for
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, -0x90(%rbp)
movq %r8, -0x88(%rbp)
movq %rcx, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq %rsi, -0x80(%rbp)
movq %rdi, -0x78(%rbp)
movq 0x78(%rbp), %r10
movl (%r10), %eax
testl %eax, %eax
jle 0x7e51
movq 0x80(%rbp), %rcx
movapd 0x65f9(%rip), %xmm3     # 0xe0c0
movsd 0x6551(%rip), %xmm2     # 0xe020
addq $-0x8, %rcx
movq %rcx, -0x48(%rbp)
movl 0x4(%r10), %ecx
movq $-0x1, -0x68(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x1, %edx
movq %rdx, -0x30(%rbp)
testl %ecx, %ecx
jle 0x7e36
movslq -0x30(%rbp), %rax
decq %rax
movq %rax, -0x50(%rbp)
movl $0x1, %r15d
movslq 0x8(%r10), %rax
imulq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
leaq (%rcx,%r15,8), %rcx
movsd (%rcx,%rax,8), %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x7e1f
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
subq $0x8, %rsp
movq -0x30(%rbp), %rdi
movl %r15d, %esi
leaq -0x40(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq -0x90(%rbp), %r8
movq 0x10(%rbp), %r9
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq 0x80(%rbp)
pushq %r10
pushq 0x70(%rbp)
pushq 0x68(%rbp)
pushq 0x60(%rbp)
pushq 0x58(%rbp)
pushq 0x50(%rbp)
pushq 0x18(%rbp)
callq 0x701f
movsd 0x6479(%rip), %xmm2     # 0xe020
movapd 0x6511(%rip), %xmm3     # 0xe0c0
movq 0x78(%rbp), %r10
addq $0x60, %rsp
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
andpd %xmm3, %xmm1
ucomisd %xmm1, %xmm2
movslq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
jbe 0x7bf9
movsd -0x40(%rbp), %xmm1
movslq 0x8(%r10), %rax
imulq -0x70(%rbp), %rax
addq %r15, %rax
movq 0x88(%rbp), %rcx
movsd %xmm1, -0x8(%rcx,%rax,8)
movq -0x48(%rbp), %rcx
movsd %xmm0, (%rcx,%rax,8)
cmpl $0x2, -0x30(%rbp)
setb %al
cmpq $0x2, %r15
setb %cl
orb %al, %cl
jne 0x7e1f
movq -0x30(%rbp), %rdi
movl %r15d, %esi
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq 0x70(%rbp), %r8
movq %r10, %r9
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq 0x80(%rbp)
callq 0x729e
movsd 0x63d6(%rip), %xmm2     # 0xe020
movapd 0x646e(%rip), %xmm3     # 0xe0c0
movq 0x78(%rbp), %r10
addq $0x20, %rsp
movl $0x3, %eax
movl %r15d, %ecx
movl %eax, -0x54(%rbp)
subl %eax, %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x0, %edx
cmovbl %edx, %eax
leal 0x1(%rcx), %ecx
movl $0x1, %edx
cmovael %edx, %ecx
cmpl %eax, -0x50(%rbp)
jle 0x7e11
movslq %ecx, %r12
cmpq %r12, %r15
jle 0x7e11
movslq 0x8(%r10), %rcx
movq %rcx, %rdx
imulq -0x70(%rbp), %rdx
addq %r15, %rdx
movq %rdx, -0x98(%rbp)
movl %eax, %edx
negl %eax
movslq %eax, %r13
addq -0x60(%rbp), %r13
movq -0x68(%rbp), %rax
subq %rdx, %rax
imulq %rcx, %rax
leaq (,%r12,8), %rdx
leaq (%rdx,%rax,8), %rbx
addq -0x48(%rbp), %rbx
shlq $0x3, %rcx
movl $0x8, %r14d
subq %rcx, %r14
movsd (%rbx), %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x7df9
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
movl %r13d, %edi
movl %r12d, %esi
movq -0x30(%rbp), %rdx
movl %r15d, %ecx
leaq -0x40(%rbp), %r8
xorl %r9d, %r9d
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq 0x80(%rbp)
pushq %r10
pushq 0x70(%rbp)
pushq 0x68(%rbp)
pushq 0x60(%rbp)
pushq 0x48(%rbp)
pushq 0x40(%rbp)
pushq 0x38(%rbp)
pushq 0x30(%rbp)
pushq 0x28(%rbp)
pushq 0x20(%rbp)
pushq -0xa8(%rbp)
pushq -0xa0(%rbp)
pushq -0x80(%rbp)
pushq -0x78(%rbp)
callq 0x7462
addq $0x90, %rsp
movsd -0x40(%rbp), %xmm0
movsd 0x62b1(%rip), %xmm1     # 0xe038
ucomisd %xmm0, %xmm1
jbe 0x7db1
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
xorpd %xmm1, %xmm1
movsd 0x6279(%rip), %xmm0     # 0xe028
jmp 0x7db6
movsd -0x38(%rbp), %xmm1
movapd 0x6302(%rip), %xmm3     # 0xe0c0
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
movsd 0x6252(%rip), %xmm4     # 0xe020
ucomisd %xmm2, %xmm4
movapd %xmm4, %xmm2
movq 0x78(%rbp), %r10
jbe 0x7df9
movq -0x48(%rbp), %rax
movq -0x98(%rbp), %rcx
movsd %xmm1, (%rax,%rcx,8)
movq 0x88(%rbp), %rax
movsd %xmm0, -0x8(%rax,%rcx,8)
cmpq $0x2, %r13
jl 0x7e11
incq %r12
decq %r13
addq %r14, %rbx
cmpq %r15, %r12
jl 0x7ce5
movl -0x54(%rbp), %eax
incl %eax
cmpl $0x21, %eax
jne 0x7c5f
leaq 0x1(%r15), %rax
movslq 0x4(%r10), %rcx
cmpq %rcx, %r15
movq %rax, %r15
jl 0x7b0d
movl (%r10), %eax
movq -0x30(%rbp), %rsi
leal 0x1(%rsi), %edx
incq -0x60(%rbp)
incq -0x68(%rbp)
cmpl %eax, %esi
movq %rdx, -0x30(%rbp)
jl 0x7af4
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq