// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: CBI
void CBI(int i,int j,double* EntropyEnthalpy,int traceback,double stackEntropies[],double stackEnthalpies[],double stackint2Entropies[],double stackint2Enthalpies[],double interiorLoopEntropies[],double bulgeLoopEntropies[],double interiorLoopEnthalpies[],double bulgeLoopEnthalpies[],double tstackEntropies[],double tstackEnthalpies[],double atpS[],double atpH[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],char numSeq1[],char numSeq2[])
{
	int d,ii,jj;

	for(d=j-i-3;d>=4&&d>=j-i-32;--d)
		for(ii=i+1;ii<j-d&&ii<=Initint[0];++ii)
		{
			jj=d+ii;
			if(traceback==0)
			{
				EntropyEnthalpy[0]=-1.0;
				EntropyEnthalpy[1]=1.0*INFINITY;
			}
			if(fabs(enthalpyDPT[(ii-1)*Initint[2]+jj-1])<999999999)
			{
				calc_bulge_internal2(i,j,ii,jj,EntropyEnthalpy,traceback,stackEntropies,stackEnthalpies,stackint2Entropies,stackint2Enthalpies,interiorLoopEntropies,bulgeLoopEntropies,interiorLoopEnthalpies,bulgeLoopEnthalpies,tstackEntropies,tstackEnthalpies,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);
				if(fabs(EntropyEnthalpy[1])<999999999)
				{
					if(EntropyEnthalpy[0] <-2500.0)
					{
						EntropyEnthalpy[0]=-3224.0;
						EntropyEnthalpy[1]=0.0;
					}
					if(traceback==0)
					{
						enthalpyDPT[(i-1)*Initint[2]+j-1]=EntropyEnthalpy[1];
						entropyDPT[(i-1)*Initint[2]+j-1]=EntropyEnthalpy[0];
					}
				}
			}
		}
	return;
}

// 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)
movl %ecx, %r12d
movq %rdx, %r8
movq %rsi, %rax
movq %rsi, -0x40(%rbp)
movq %rdi, -0x48(%rbp)
subl %edi, %eax
leal -0x3(%rax), %ecx
addl $-0x20, %eax
cmpl $0x5, %eax
movl $0x4, %edx
cmovgel %eax, %edx
movl %edx, -0x54(%rbp)
cmpl %edx, %ecx
jl 0x3e46
movq 0x70(%rbp), %r15
movq 0x68(%rbp), %rbx
movapd 0xa415(%rip), %xmm2     # 0xe0c0
movsd 0xa36d(%rip), %xmm1     # 0xe020
movq -0x48(%rbp), %rax
leal 0x1(%rax), %edx
movl %edx, -0x50(%rbp)
decl %eax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rax
addl $-0x2, %eax
movl %eax, -0x30(%rbp)
movl $0x2, -0x2c(%rbp)
movq %r8, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rcx, -0x68(%rbp)
subl %ecx, %eax
cmpl %eax, -0x50(%rbp)
jge 0x3e2e
movl -0x30(%rbp), %r14d
movl -0x2c(%rbp), %r13d
movq -0x48(%rbp), %rax
movl %eax, %edx
cmpl (%rbx), %edx
jge 0x3e2e
movl %edx, %eax
testl %r12d, %r12d
jne 0x3d22
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%r8)
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
movq %rcx, 0x8(%r8)
leal 0x1(%rax), %edx
imull 0x8(%rbx), %eax
addl %r14d, %eax
cltq
movsd -0x8(%r15,%rax,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x3e22
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %edx, -0x34(%rbp)
movl -0x34(%rbp), %edx
movl %r14d, %ecx
movq -0x60(%rbp), %r8
movl %r12d, %r9d
pushq 0x88(%rbp)
pushq 0x80(%rbp)
pushq 0x78(%rbp)
pushq %r15
pushq %rbx
pushq 0x60(%rbp)
pushq 0x58(%rbp)
pushq 0x50(%rbp)
pushq 0x48(%rbp)
pushq 0x40(%rbp)
pushq 0x38(%rbp)
pushq 0x30(%rbp)
pushq 0x28(%rbp)
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq 0x10(%rbp)
pushq -0x78(%rbp)
pushq -0x70(%rbp)
callq 0x3508
movl -0x34(%rbp), %edx
movapd 0xa31c(%rip), %xmm2     # 0xe0c0
movq -0x60(%rbp), %r8
addq $0x90, %rsp
movsd 0x8(%r8), %xmm0
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
movsd 0xa25b(%rip), %xmm3     # 0xe020
ucomisd %xmm1, %xmm3
movsd 0xa24f(%rip), %xmm1     # 0xe020
jbe 0x3e22
movsd 0xa25d(%rip), %xmm3     # 0xe038
ucomisd (%r8), %xmm3
jbe 0x3dfb
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, (%r8)
movq $0x0, 0x8(%r8)
xorpd %xmm0, %xmm0
testl %r12d, %r12d
jne 0x3e22
movl 0x8(%rbx), %eax
imull -0x4c(%rbp), %eax
addl -0x40(%rbp), %eax
cltq
movsd %xmm0, -0x8(%r15,%rax,8)
movsd (%r8), %xmm0
movq 0x78(%rbp), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
incl %r14d
decl %r13d
jne 0x3cf8
movq -0x68(%rbp), %rcx
leal -0x1(%rcx), %eax
incl -0x2c(%rbp)
decl -0x30(%rbp)
cmpl -0x54(%rbp), %ecx
movl %eax, %ecx
jg 0x3cd7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq