// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: END5_3
double END5_3(int i,int hs,double dangleEntropies3[],double dangleEnthalpies3[],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+1]*5+numSeq1[i-1]]+Hd3(i-1,k+1,dangleEnthalpies3,numSeq1)+enthalpyDPT[k*Initint[2]+i-2];
			S=send5[k]+atpS[numSeq1[k+1]*5+numSeq1[i-1]]+Sd3(i-1,k+1,dangleEntropies3,numSeq1)+entropyDPT[k*Initint[2]+i-2];
			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+1]*5+numSeq1[i-1]]+Hd3(i-1,k+1,dangleEnthalpies3,numSeq1)+enthalpyDPT[k*Initint[2]+i-2];
			S=atpS[numSeq1[k+1]*5+numSeq1[i-1]]+Sd3(i-1,k+1,dangleEntropies3,numSeq1)+entropyDPT[k*Initint[2]+i-2];
			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 0x1094b(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x68(%rbp)
movsd 0x1097e(%rip), %xmm0    # 0x17170
movsd %xmm0, -0x40(%rbp)
movsd 0x10941(%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 0x6c08
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 0x6a2a
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 $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movl -0xc(%rbp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x20(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5e20
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x2, %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 $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movl -0xc(%rbp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5dc0
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movaps 0x10840(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x1077c(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
ja 0x69de
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x69de
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x69f8
movsd 0x1074a(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x58(%rbp)
movsd 0x1074d(%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 0x6bb5
movq -0x30(%rbp), %rax
movq 0x40(%rbp), %rcx
movl -0x34(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movl -0xc(%rbp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x90(%rbp)
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x20(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5e20
movaps %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x2, %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 $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
imull $0x5, %ecx, %ecx
movq 0x40(%rbp), %rdx
movl -0xc(%rbp), %esi
subl $0x1, %esi
movslq %esi, %rsi
movsbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x88(%rbp)
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x34(%rbp), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
movq 0x40(%rbp), %rcx
callq 0x5dc0
movaps %xmm0, %xmm1
movsd -0x88(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movq 0x18(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0xc(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x58(%rbp), %xmm0
movaps 0x106b0(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x105ec(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
ja 0x6b6e
movsd -0x58(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x6b6e
movsd -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6b88
movsd 0x105ba(%rip), %xmm0    # 0x17130
movsd %xmm0, -0x58(%rbp)
movsd 0x105bd(%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 0x6bf8
movsd -0x60(%rbp), %xmm0
movsd 0x10586(%rip), %xmm1    # 0x17158
ucomisd %xmm1, %xmm0
jbe 0x6bf6
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 0x6bf8
jmp 0x6bfa
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x680b
cmpl $0x1, -0x10(%rbp)
jne 0x6c1a
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x6c24
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)