// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movq %r9, -0x60(%rbp)
movq %r8, -0x58(%rbp)
movl %ecx, %r13d
movq %rdx, %r8
movq 0x70(%rbp), %r15
movl %esi, %eax
subl %edi, %eax
leal -0x3(%rax), %ecx
addl $-0x20, %eax
cmpl $0x5, %eax
pushq $0x4
popq %rdx
cmovgel %eax, %edx
movl %edx, -0x34(%rbp)
movq 0x68(%rbp), %r12
movapd 0x959a(%rip), %xmm2     # 0xd0e0
movsd 0x94e2(%rip), %xmm1     # 0xd030
movq %rdi, -0x50(%rbp)
leal -0x1(%rdi), %eax
movl %eax, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
leal -0x2(%rsi), %r14d
cmpl -0x34(%rbp), %ecx
jl 0x3cd2
movq -0x30(%rbp), %rax
movl %eax, %esi
movl %ecx, -0x40(%rbp)
subl %ecx, %esi
movl %r14d, -0x3c(%rbp)
movq -0x50(%rbp), %rax
movl %eax, %ebx
movl %esi, -0x44(%rbp)
movl %ebx, %eax
leal 0x1(%rax), %ebx
cmpl %esi, %ebx
jge 0x3cc1
cmpl (%r12), %eax
jge 0x3cc1
testl %r13d, %r13d
jne 0x3bb8
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%r8)
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
movq %rcx, 0x8(%r8)
imull 0x8(%r12), %eax
addl %r14d, %eax
cltq
movsd -0x8(%r15,%rax,8), %xmm0
andpd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x3cb9
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl %ebx, %edx
movl %r14d, %ecx
movl %r14d, -0x48(%rbp)
movq %r8, %r14
movl %r13d, %r9d
pushq 0x88(%rbp)
pushq 0x80(%rbp)
pushq 0x78(%rbp)
pushq %r15
pushq %r12
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 -0x60(%rbp)
pushq -0x58(%rbp)
callq 0x33f0
movl -0x44(%rbp), %esi
movapd 0x94a7(%rip), %xmm2     # 0xd0e0
movq %r14, %r8
movl -0x48(%rbp), %r14d
addq $0x90, %rsp
movsd 0x8(%r8), %xmm0
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
movsd 0x93d3(%rip), %xmm3     # 0xd030
ucomisd %xmm1, %xmm3
movsd 0x93c7(%rip), %xmm1     # 0xd030
jbe 0x3cb9
movsd 0x93d5(%rip), %xmm3     # 0xd048
ucomisd (%r8), %xmm3
jbe 0x3c90
movabsq $-0x3f56d00000000000, %rax # imm = 0xC0A9300000000000
movq %rax, (%r8)
andq $0x0, 0x8(%r8)
xorpd %xmm0, %xmm0
testl %r13d, %r13d
jne 0x3cb9
movl 0x8(%r12), %eax
imull -0x38(%rbp), %eax
addl -0x30(%rbp), %eax
cltq
movsd %xmm0, -0x8(%r15,%rax,8)
movsd (%r8), %xmm0
movq 0x78(%rbp), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
incl %r14d
jmp 0x3b81
movl -0x40(%rbp), %ecx
decl %ecx
movl -0x3c(%rbp), %r14d
decl %r14d
jmp 0x3b60
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq