// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, (%r10)
jle 0x81c2
movq 0x80(%rbp), %rax
movapd 0x626b(%rip), %xmm2     # 0xe0b0
movsd 0x61e3(%rip), %xmm3     # 0xe030
addq $-0x8, %rax
movq %rax, -0x70(%rbp)
movq $-0x1, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x1, %eax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x4(%r10)
jle 0x81a6
movslq -0x30(%rbp), %rax
decq %rax
movq %rax, -0x48(%rbp)
movl $0x1, %r15d
movslq 0x8(%r10), %rax
imulq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
leaq (%rcx,%r15,8), %rcx
movsd (%rcx,%rax,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x8192
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 0x730b
movsd 0x610c(%rip), %xmm3     # 0xe030
movapd 0x6184(%rip), %xmm2     # 0xe0b0
movq 0x78(%rbp), %r10
addq $0x60, %rsp
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd %xmm1, %xmm3
movslq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
jbe 0x7f7a
movsd -0x40(%rbp), %xmm1
movslq 0x8(%r10), %rax
imulq -0x68(%rbp), %rax
addq %r15, %rax
movq 0x88(%rbp), %rcx
movsd %xmm1, -0x8(%rcx,%rax,8)
movq 0x80(%rbp), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
cmpl $0x2, -0x30(%rbp)
setb %al
cmpq $0x2, %r15
setb %cl
orb %al, %cl
jne 0x8192
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 0x761d
movsd 0x6065(%rip), %xmm3     # 0xe030
movapd 0x60dd(%rip), %xmm2     # 0xe0b0
movq 0x78(%rbp), %r10
addq $0x20, %rsp
movl $0x3, %eax
movl %r15d, %ecx
movl %eax, -0x4c(%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, -0x48(%rbp)
jle 0x8184
movslq %ecx, %r12
cmpq %r12, %r15
jle 0x8184
movslq 0x8(%r10), %rcx
movq %rcx, %rdx
imulq -0x68(%rbp), %rdx
addq %r15, %rdx
movq %rdx, -0x98(%rbp)
movl %eax, %edx
negl %eax
movslq %eax, %r13
addq -0x58(%rbp), %r13
movq -0x60(%rbp), %rax
subq %rdx, %rax
imulq %rcx, %rax
movq %r12, %rdx
shlq $0x3, %rdx
leaq (%rdx,%rax,8), %rbx
addq -0x70(%rbp), %rbx
shlq $0x3, %rcx
movl $0x8, %r14d
subq %rcx, %r14
movsd (%rbx), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x816c
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 0x77e1
addq $0x90, %rsp
movsd 0x5f46(%rip), %xmm0     # 0xe048
ucomisd -0x40(%rbp), %xmm0
jbe 0x811f
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
movapd 0x5f80(%rip), %xmm2     # 0xe0b0
andpd %xmm2, %xmm1
movsd 0x5ef4(%rip), %xmm3     # 0xe030
ucomisd %xmm1, %xmm3
movq 0x78(%rbp), %r10
jbe 0x816c
movq 0x80(%rbp), %rax
movq -0x98(%rbp), %rcx
movsd %xmm0, -0x8(%rax,%rcx,8)
movsd -0x40(%rbp), %xmm0
movq 0x88(%rbp), %rax
movsd %xmm0, -0x8(%rax,%rcx,8)
cmpq $0x2, %r13
jl 0x8184
incq %r12
decq %r13
addq %r14, %rbx
cmpq %r15, %r12
jl 0x8065
movl -0x4c(%rbp), %eax
incl %eax
cmpl $0x21, %eax
jne 0x7fe0
leaq 0x1(%r15), %rax
movslq 0x4(%r10), %rcx
cmpq %rcx, %r15
movq %rax, %r15
jl 0x7e8a
movq -0x30(%rbp), %rcx
leal 0x1(%rcx), %eax
incq -0x58(%rbp)
incq -0x60(%rbp)
cmpl (%r10), %ecx
movq %rax, -0x30(%rbp)
jl 0x7e6e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq