// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: fillMatrix2
void fillMatrix2(double stackEntropies[],double stackEnthalpies[],double stackint2Entropies[],double stackint2Enthalpies[],double hairpinLoopEntropies[],double interiorLoopEntropies[],double bulgeLoopEntropies[],double hairpinLoopEnthalpies[],double interiorLoopEnthalpies[],double bulgeLoopEnthalpies[],double tstackEntropies[],double tstackEnthalpies[],double tstack2Entropies[],double tstack2Enthalpies[],char *triloopEntropies1,char *triloopEnthalpies1,char *tetraloopEntropies1,char *tetraloopEnthalpies1,double *triloopEntropies2,double *triloopEnthalpies2,double *tetraloopEntropies2,double *tetraloopEnthalpies2,int numTriloops,int numTetraloops,double atpS[],double atpH[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],char numSeq1[],char numSeq2[])
{
	int i, j;
	double SH[2];

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

				SH[0] = -1.0;
				SH[1] =1.0*INFINITY;
				calc_hairpin(i, j, SH, 0,hairpinLoopEntropies,hairpinLoopEnthalpies,tstack2Entropies,tstack2Enthalpies,triloopEntropies1,triloopEnthalpies1,tetraloopEntropies1,tetraloopEnthalpies1,triloopEntropies2,triloopEnthalpies2,tetraloopEntropies2,tetraloopEnthalpies2,numTriloops,numTetraloops,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1);
				if(fabs(SH[1])<999999999)
				{
					if(SH[0] <-2500.0) /* to not give dH any value if dS is unreasonable */
					{
						SH[0] =-3224.0;
						SH[1] = 0.0;
					}
					entropyDPT[(i-1)*Initint[2]+j-1]= SH[0];
					enthalpyDPT[(i-1)*Initint[2]+j-1]= SH[1];
				}
			}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, -0x80(%rbp)
movq %r8, -0x78(%rbp)
movq %rcx, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
movq 0xb8(%rbp), %r12
movl 0x4(%r12), %eax
cmpl $0x2, %eax
jl 0x44cd
movq 0xc0(%rbp), %r10
movapd 0x9e3f(%rip), %xmm2     # 0xe0c0
movsd 0x9d97(%rip), %xmm3     # 0xe020
movl $0x2, %edx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x5, %edx
jb 0x44bd
movl %r15d, -0x4c(%rbp)
movq %rdx, -0x48(%rbp)
movl %r15d, %ebx
leal -0x1(%rbx), %r15d
addl $-0x2, %ebx
movl 0x8(%r12), %eax
imull %ebx, %eax
addl %edx, %eax
cltq
movsd -0x8(%r10,%rax,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x44aa
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
movl %r15d, %edi
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %r13
movq %r13, %rdx
movq -0x60(%rbp), %r14
movq %r14, %rcx
movq 0xb0(%rbp), %r8
movq %r12, %r9
movq 0xd8(%rbp), %rax
pushq %rax
movq 0xd0(%rbp), %rax
pushq %rax
movq 0xc8(%rbp), %rax
pushq %rax
pushq %r10
callq 0x332d
addq $0x20, %rsp
movl %r15d, %edi
movq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %r14, %r9
pushq 0xd8(%rbp)
pushq 0xd0(%rbp)
pushq 0xc8(%rbp)
pushq 0xc0(%rbp)
pushq %r12
pushq 0xb0(%rbp)
movq 0xa8(%rbp), %r14
pushq %r14
movq 0xa0(%rbp), %r13
pushq %r13
pushq 0x38(%rbp)
pushq 0x30(%rbp)
pushq 0x28(%rbp)
pushq 0x20(%rbp)
pushq 0x10(%rbp)
pushq -0x80(%rbp)
pushq -0x70(%rbp)
pushq -0x68(%rbp)
callq 0x3c53
addq $0x80, %rsp
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
subq $0x8, %rsp
movl %r15d, %edi
movq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movq -0x78(%rbp), %r8
movq 0x18(%rbp), %r9
pushq 0xd0(%rbp)
pushq 0xc8(%rbp)
pushq 0xc0(%rbp)
pushq %r12
pushq 0xb0(%rbp)
pushq %r14
pushq %r13
movl 0x98(%rbp), %eax
pushq %rax
movl 0x90(%rbp), %eax
pushq %rax
pushq 0x88(%rbp)
pushq 0x80(%rbp)
pushq 0x78(%rbp)
pushq 0x70(%rbp)
pushq 0x68(%rbp)
pushq 0x60(%rbp)
pushq 0x58(%rbp)
pushq 0x50(%rbp)
pushq 0x48(%rbp)
pushq 0x40(%rbp)
callq 0x3ea4
movq -0x48(%rbp), %rdx
movsd 0x9bf3(%rip), %xmm3     # 0xe020
movapd 0x9c8b(%rip), %xmm2     # 0xe0c0
movq 0xc0(%rbp), %r10
addq $0xa0, %rsp
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x44aa
movsd -0x40(%rbp), %xmm1
movsd 0x9bd5(%rip), %xmm4     # 0xe038
ucomisd %xmm1, %xmm4
jbe 0x448b
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
xorpd %xmm0, %xmm0
movsd 0x9b9d(%rip), %xmm1     # 0xe028
imull 0x8(%r12), %ebx
addl %edx, %ebx
movslq %ebx, %rax
movq 0xc8(%rbp), %rcx
movsd %xmm1, -0x8(%rcx,%rax,8)
movsd %xmm0, -0x8(%r10,%rax,8)
cmpl $0x1, %r15d
jg 0x42a5
movl 0x4(%r12), %eax
movl -0x4c(%rbp), %r15d
leal 0x1(%rdx), %ecx
incl %r15d
cmpl %eax, %edx
movl %ecx, %edx
jl 0x4294
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq