// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x2, 0x4(%r12)
jl 0x459e
movq 0xc0(%rbp), %r10
movapd 0x9d4f(%rip), %xmm1     # 0xe0b0
movsd 0x9cc7(%rip), %xmm2     # 0xe030
movl $0x2, %edx
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
cmpl $0x5, %edx
jb 0x458b
movl -0x44(%rbp), %r15d
movq %rdx, -0x50(%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 %xmm1, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x4581
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0x40(%rbp)
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, -0x38(%rbp)
movl %r15d, %edi
movq -0x50(%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 0x33ca
addq $0x20, %rsp
movl %r15d, %edi
movq -0x50(%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 0x3d0f
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 -0x50(%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 0x3f56
movq -0x50(%rbp), %rdx
movsd 0x9b22(%rip), %xmm2     # 0xe030
movapd 0x9b9a(%rip), %xmm1     # 0xe0b0
movq 0xc0(%rbp), %r10
addq $0xa0, %rsp
movsd -0x38(%rbp), %xmm0
andpd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x4581
movsd 0x9b0d(%rip), %xmm0     # 0xe048
ucomisd -0x40(%rbp), %xmm0
jbe 0x4558
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movsd -0x40(%rbp), %xmm0
imull 0x8(%r12), %ebx
addl %edx, %ebx
movslq %ebx, %rax
movq 0xc8(%rbp), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x8(%r10,%rax,8)
cmpl $0x1, %r15d
jg 0x4386
leal 0x1(%rdx), %eax
incl -0x44(%rbp)
cmpl 0x4(%r12), %edx
movl %eax, %edx
jl 0x4375
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq