// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: END5_2
double END5_2(int i,int hs,double dangleEntropies5[],double dangleEnthalpies5[],double atpS[],double atpH[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],double send5[],double hend5[],char numSeq1[])
{
	int k;
	double max_tm,T1,T2,H,S,H_max,S_max;

	H_max=1.0*INFINITY;
	max_tm=-1.0*INFINITY;
	S_max=-1.0;
	for(k=0;k<=i-6;++k)
	{
		T1=(hend5[k]+Initdouble[0])/(send5[k]+Initdouble[1]+Initdouble[2]);
		T2=Initdouble[0]/(Initdouble[1]+Initdouble[2]);
		if(T1>=T2)
		{
			H=hend5[k]+atpH[numSeq1[k+2]*5+numSeq1[i]]+Hd5(i,k+2,dangleEnthalpies5,numSeq1)+enthalpyDPT[(k+1)*Initint[2]+i-1];
			S=send5[k]+atpS[numSeq1[k+2]*5+numSeq1[i]]+Sd5(i,k+2,dangleEntropies5,numSeq1)+entropyDPT[(k+1)*Initint[2]+i-1];
			if(fabs(H)>999999999||H>0||S>0)
			{
				H=1.0*INFINITY;
				S=-1.0;
			}
			T1=(H+Initdouble[0])/(S+Initdouble[1]+Initdouble[2]);
		}
		else
		{
			H=atpH[numSeq1[k+2]*5+numSeq1[i]]+Hd5(i,k+2,dangleEnthalpies5,numSeq1)+enthalpyDPT[(k+1)*Initint[2]+i-1];
			S=atpS[numSeq1[k+2]*5+numSeq1[i]]+Sd5(i,k+2,dangleEntropies5,numSeq1)+entropyDPT[(k+1)*Initint[2]+i-1];
			if(fabs(H)>999999999||H>0||S>0)
			{
				H=1.0*INFINITY;
				S=-1.0;
			}
			T1=(H+Initdouble[0])/(S+Initdouble[1]+Initdouble[2]);
		}

		if(max_tm<T1)
		{
			if(S>-2500.0)
			{
				H_max=H;
				S_max=S;
				max_tm=T1;
			}
		}
	}
	if(hs==1)
		return H_max;
	return S_max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movsd 0x10dcb(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x68(%rbp)
movsd 0x10dfe(%rip), %xmm0    # 0x17170
movsd %xmm0, -0x40(%rbp)
movsd 0x10dc1(%rip), %xmm0    # 0x17140
movsd %xmm0, -0x70(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x6, %ecx
cmpl %ecx, %eax
jg 0x6774
movq 0x38(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x10(%rbp), %rax
addsd (%rax), %xmm0
movq 0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x10(%rbp), %rax
addsd 0x8(%rax), %xmm1
movq 0x10(%rbp), %rax
addsd 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movq 0x10(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq 0x10(%rbp), %rax
addsd 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x48(%rbp), %xmm0
ucomisd -0x50(%rbp), %xmm0
jb 0x65a0
movq 0x38(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x30(%rbp), %rax
movq 0x40(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movslq -0xc(%rbp), %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0xc(%rbp), %edi
movl -0x34(%rbp), %esi
addl $0x2, %esi
movq -0x20(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5d60
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movq 0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x28(%rbp), %rax
movq 0x40(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movslq -0xc(%rbp), %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0xc(%rbp), %edi
movl -0x34(%rbp), %esi
addl $0x2, %esi
movq -0x18(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5d00
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movaps 0x10cca(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x10c06(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
ja 0x6554
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x6554
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x656e
movsd 0x10bd4(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x58(%rbp)
movsd 0x10bd7(%rip), %xmm0    # 0x17140
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movq 0x10(%rbp), %rax
addsd (%rax), %xmm0
movsd -0x60(%rbp), %xmm1
movq 0x10(%rbp), %rax
addsd 0x8(%rax), %xmm1
movq 0x10(%rbp), %rax
addsd 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0x6721
movq -0x30(%rbp), %rax
movq 0x40(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movslq -0xc(%rbp), %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x90(%rbp)
movl -0xc(%rbp), %edi
movl -0x34(%rbp), %esi
addl $0x2, %esi
movq -0x20(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5d60
movaps %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movslq -0xc(%rbp), %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x88(%rbp)
movl -0xc(%rbp), %edi
movl -0x34(%rbp), %esi
addl $0x2, %esi
movq -0x18(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5d00
movaps %xmm0, %xmm1
movsd -0x88(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movaps 0x10b44(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x10a80(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
ja 0x66da
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x66da
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x66f4
movsd 0x10a4e(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x58(%rbp)
movsd 0x10a51(%rip), %xmm0    # 0x17140
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movq 0x10(%rbp), %rax
addsd (%rax), %xmm0
movsd -0x60(%rbp), %xmm1
movq 0x10(%rbp), %rax
addsd 0x8(%rax), %xmm1
movq 0x10(%rbp), %rax
addsd 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6764
movsd -0x60(%rbp), %xmm0
movsd 0x10a1a(%rip), %xmm1    # 0x17158
ucomisd %xmm1, %xmm0
jbe 0x6762
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x6764
jmp 0x6766
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x638b
cmpl $0x1, -0x10(%rbp)
jne 0x6786
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x6790
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
nop