// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movq %r9, -0x78(%rbp)
movq %r8, -0x70(%rbp)
movq %rcx, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
movq 0x80(%rbp), %r10
movq 0x78(%rbp), %r11
movapd 0x602a(%rip), %xmm3     # 0xd0e0
movsd 0x5f72(%rip), %xmm2     # 0xd030
pushq $0x1
popq %rax
pushq $-0x1
popq %rcx
movl %ecx, -0x44(%rbp)
movl %eax, %r8d
cmpl (%r11), %r8d
jg 0x73db
leal -0x1(%r8), %eax
movl %eax, -0x2c(%rbp)
pushq $0x1
popq %r12
movq %r8, -0x50(%rbp)
cmpl 0x4(%r11), %r12d
jg 0x73d0
movl 0x8(%r11), %eax
imull -0x2c(%rbp), %eax
addl %r12d, %eax
cltq
movsd -0x8(%r10,%rax,8), %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x73c8
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
subq $0x8, %rsp
movl %r8d, %edi
movl %r12d, %esi
leaq -0x40(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %r8
movq 0x10(%rbp), %r9
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq %r10
pushq %r11
pushq 0x70(%rbp)
pushq 0x68(%rbp)
pushq 0x60(%rbp)
pushq 0x58(%rbp)
pushq 0x50(%rbp)
pushq 0x18(%rbp)
callq 0x6630
movsd 0x5eb7(%rip), %xmm2     # 0xd030
movapd 0x5f5f(%rip), %xmm3     # 0xd0e0
movq 0x78(%rbp), %r11
movq 0x80(%rbp), %r10
addq $0x60, %rsp
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
andpd %xmm3, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x71c9
movsd -0x40(%rbp), %xmm1
movl 0x8(%r11), %eax
imull -0x2c(%rbp), %eax
addl %r12d, %eax
cltq
movq 0x88(%rbp), %rcx
movsd %xmm1, -0x8(%rcx,%rax,8)
movsd %xmm0, -0x8(%r10,%rax,8)
movq -0x50(%rbp), %r8
cmpl $0x2, %r8d
setb %al
cmpl $0x2, %r12d
setb %cl
orb %al, %cl
jne 0x73c8
movl %r8d, %edi
movl %r12d, %esi
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq 0x70(%rbp), %r8
movq %r11, %r9
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq %r10
callq 0x68ac
movq -0x50(%rbp), %r8
movsd 0x5e13(%rip), %xmm2     # 0xd030
movapd 0x5ebb(%rip), %xmm3     # 0xd0e0
movq 0x78(%rbp), %r11
movq 0x80(%rbp), %r10
addq $0x20, %rsp
pushq $0x3
popq %rcx
cmpl $0x21, %ecx
je 0x73c8
movl %r12d, %eax
movl %ecx, -0x54(%rbp)
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x0, %edx
cmovbl %edx, %ecx
leal 0x1(%rax), %eax
pushq $0x1
popq %rdx
cmovael %edx, %eax
movl -0x2c(%rbp), %r13d
subl %ecx, %r13d
movslq %eax, %rbx
movl -0x44(%rbp), %r14d
subl %ecx, %r14d
testl %r13d, %r13d
jle 0x73be
cmpl %r12d, %ebx
jge 0x73be
movl 0x8(%r11), %r15d
movl %r15d, %eax
imull %r14d, %eax
cltq
addq %rbx, %rax
movsd -0x8(%r10,%rax,8), %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x73b0
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
movl %r13d, %edi
movl %ebx, %esi
movl %r8d, %edx
movl %r12d, %ecx
leaq -0x40(%rbp), %r8
xorl %r9d, %r9d
pushq 0x98(%rbp)
pushq 0x90(%rbp)
pushq 0x88(%rbp)
pushq %r10
pushq %r11
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 -0x88(%rbp)
pushq -0x80(%rbp)
pushq -0x68(%rbp)
pushq -0x60(%rbp)
callq 0x6a6a
addq $0x90, %rsp
movsd -0x40(%rbp), %xmm0
movsd 0x5d14(%rip), %xmm1     # 0xd048
ucomisd %xmm0, %xmm1
jbe 0x735b
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
andq $0x0, -0x38(%rbp)
xorpd %xmm1, %xmm1
movsd 0x5cdf(%rip), %xmm0     # 0xd038
jmp 0x7360
movsd -0x38(%rbp), %xmm1
movapd 0x5d78(%rip), %xmm3     # 0xd0e0
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
movsd 0x5cb8(%rip), %xmm4     # 0xd030
ucomisd %xmm2, %xmm4
movapd %xmm4, %xmm2
movq 0x80(%rbp), %r10
movq 0x78(%rbp), %r11
movq -0x50(%rbp), %r8
jbe 0x73b0
imull -0x2c(%rbp), %r15d
addl %r12d, %r15d
movslq %r15d, %rax
movsd %xmm1, -0x8(%r10,%rax,8)
movq 0x88(%rbp), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
incq %rbx
decl %r14d
decl %r13d
jmp 0x7276
movl -0x54(%rbp), %ecx
incl %ecx
jmp 0x7237
incl %r12d
jmp 0x70e2
incl %r8d
incl -0x44(%rbp)
jmp 0x70ca
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq