// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: maxTM2
void maxTM2(int i,int j,double stackEntropies[],double stackEnthalpies[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],char numSeq1[],char numSeq2[])
{
	double T0,T1,S0,S1,H0,H1;

	S0=entropyDPT[(i-1)*Initint[2]+j-1];
	H0=enthalpyDPT[(i-1)*Initint[2]+j-1];
	T0=(H0+Initdouble[0])/(S0+Initdouble[1]+Initdouble[2]);
	if(fabs(enthalpyDPT[(i-1)*Initint[2]+j-1])<999999999)
	{
		S1=(entropyDPT[i*Initint[2]+j-2]+Ss(i,j,2,stackEntropies,Initint,numSeq1,numSeq2));
		H1=(enthalpyDPT[i*Initint[2]+j-2]+Hs(i,j,2,stackEnthalpies,Initint,numSeq1,numSeq2));
	}
	else
	{
		S1=-1.0;
		H1=1.0*INFINITY;
	}
	T1=(H1+Initdouble[0])/(S1+Initdouble[1]+Initdouble[2]);
	if(S1<-2500.0)
	{
		S1=-3224.0;
		H1=0.0;
	}
	if(S0<-2500.0)
	{
		S0=-3224.0;
		H0=0.0;
 	}

	if(T1>T0)
	{
		entropyDPT[(i-1)*Initint[2]+j-1]=S1;
		enthalpyDPT[(i-1)*Initint[2]+j-1]= H1;
	}
	else
	{
		entropyDPT[(i-1)*Initint[2]+j-1]=S0;
		enthalpyDPT[(i-1)*Initint[2]+j-1]=H0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r10
movq %rdx, %rcx
movl %esi, %r15d
movl %edi, %r12d
movq 0x18(%rbp), %rsi
movq 0x10(%rbp), %r14
leal -0x1(%r12), %edx
movl 0x8(%r9), %eax
imull %eax, %edx
addl %r15d, %edx
movslq %edx, %r13
movsd -0x8(%rsi,%r13,8), %xmm4
movsd -0x8(%r14,%r13,8), %xmm3
movsd (%r8), %xmm5
movsd 0x8(%r8), %xmm6
movsd 0x10(%r8), %xmm7
movapd 0xad35(%rip), %xmm0     # 0xe0c0
andpd %xmm3, %xmm0
movsd 0xac89(%rip), %xmm1     # 0xe020
ucomisd %xmm0, %xmm1
jbe 0x3461
movq %r9, %rbx
movq 0x28(%rbp), %rdx
movq 0x20(%rbp), %r9
imull %r12d, %eax
addl %r15d, %eax
movslq %eax, %r14
movsd -0x10(%rsi,%r14,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rdx, (%rsp)
movl %r12d, %edi
movl %r15d, %esi
movl $0x2, %edx
movq %rbx, %r8
movq %r10, -0x38(%rbp)
movapd %xmm3, -0x80(%rbp)
movapd %xmm4, -0x70(%rbp)
movsd %xmm5, -0x50(%rbp)
movsd %xmm6, -0x48(%rbp)
movsd %xmm7, -0x40(%rbp)
callq 0x31b8
addsd -0x30(%rbp), %xmm0
movapd %xmm0, -0x60(%rbp)
movq 0x10(%rbp), %rax
movsd -0x10(%rax,%r14,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x10(%rbp), %r14
movq 0x28(%rbp), %rax
movq %rax, (%rsp)
movl %r12d, %edi
movl %r15d, %esi
movl $0x2, %edx
movq -0x38(%rbp), %rcx
movq %rbx, %r8
movq 0x20(%rbp), %r9
callq 0x3247
movapd -0x60(%rbp), %xmm8
movsd -0x40(%rbp), %xmm7
movsd -0x48(%rbp), %xmm6
movsd -0x50(%rbp), %xmm5
movapd -0x70(%rbp), %xmm4
movapd -0x80(%rbp), %xmm3
movq 0x18(%rbp), %rsi
addsd -0x30(%rbp), %xmm0
jmp 0x3472
movsd 0xabaf(%rip), %xmm0     # 0xe018
movsd 0xabbe(%rip), %xmm8     # 0xe030
movapd %xmm3, %xmm1
addsd %xmm5, %xmm1
movapd %xmm4, %xmm2
addsd %xmm6, %xmm2
addsd %xmm7, %xmm2
divsd %xmm2, %xmm1
addsd %xmm0, %xmm5
addsd %xmm8, %xmm6
addsd %xmm7, %xmm6
divsd %xmm6, %xmm5
ucomisd %xmm1, %xmm5
cmpltsd %xmm5, %xmm1
andpd %xmm1, %xmm8
andnpd %xmm4, %xmm1
orpd %xmm8, %xmm1
ja 0x34b8
movapd %xmm3, %xmm0
movsd 0xab78(%rip), %xmm3     # 0xe038
ucomisd %xmm1, %xmm3
xorpd %xmm2, %xmm2
ja 0x34ce
movapd %xmm0, %xmm2
movapd %xmm1, %xmm0
cmpltsd %xmm3, %xmm0
movsd 0xab49(%rip), %xmm3     # 0xe028
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm0, %xmm3
movlpd %xmm3, -0x8(%rsi,%r13,8)
movsd %xmm2, -0x8(%r14,%r13,8)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq