// File: /workspace/github_c_makefile_star2_O2/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, -0x78(%rbp)
movq %r8, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
movq 0xc0(%rbp), %r10
movq 0xb8(%rbp), %r12
movapd 0x9013(%rip), %xmm2     # 0xd0e0
movsd 0x8f5b(%rip), %xmm3     # 0xd030
pushq $0x2
popq %rdx
pushq $-0x3
popq %rax
cmpl 0x4(%r12), %edx
jg 0x4303
movl %eax, -0x44(%rbp)
movl %eax, %ebx
movl %edx, -0x2c(%rbp)
leal 0x1(%rbx), %r15d
testl %r15d, %r15d
jle 0x42f7
movl 0x8(%r12), %eax
imull %ebx, %eax
addl %edx, %eax
cltq
movsd -0x8(%r10,%rax,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x42f0
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movq -0x50(%rbp), %r14
movq %r14, %rdx
movq -0x58(%rbp), %r13
movq %r13, %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 0x3219
addq $0x20, %rsp
movl %r15d, %edi
movl -0x2c(%rbp), %esi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movq %r14, %r8
movq %r13, %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 -0x78(%rbp)
pushq -0x68(%rbp)
pushq -0x60(%rbp)
callq 0x3b01
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
movl -0x2c(%rbp), %esi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
movq -0x70(%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 0x3d33
movl -0x2c(%rbp), %edx
movsd 0x8dbb(%rip), %xmm3     # 0xd030
movapd 0x8e63(%rip), %xmm2     # 0xd0e0
movq 0xc0(%rbp), %r10
addq $0xa0, %rsp
movsd -0x38(%rbp), %xmm0
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x42f0
movsd -0x40(%rbp), %xmm1
movsd 0x8d9d(%rip), %xmm4     # 0xd048
ucomisd %xmm1, %xmm4
jbe 0x42d0
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
andq $0x0, -0x38(%rbp)
xorpd %xmm0, %xmm0
movsd 0x8d68(%rip), %xmm1     # 0xd038
movl 0x8(%r12), %eax
imull %ebx, %eax
addl %edx, %eax
cltq
movq 0xc8(%rbp), %rcx
movsd %xmm1, -0x8(%rcx,%rax,8)
movsd %xmm0, -0x8(%r10,%rax,8)
decl %ebx
jmp 0x40ee
incl %edx
movl -0x44(%rbp), %eax
incl %eax
jmp 0x40db
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq