// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: traceback
void traceback(int i,int j,int* ps1,int* ps2,double stackEntropies[],double stackEnthalpies[],double stackint2Entropies[],double stackint2Enthalpies[],double dangleEntropies3[],double dangleEnthalpies3[],double dangleEntropies5[],double dangleEnthalpies5[],double interiorLoopEntropies[],double bulgeLoopEntropies[],double interiorLoopEnthalpies[],double bulgeLoopEnthalpies[],double tstackEntropies[],double tstackEnthalpies[],double tstack2Entropies[],double tstack2Enthalpies[],double atpS[],double atpH[],double Initdouble[],int Initint[],double enthalpyDPT[],double entropyDPT[],char numSeq1[],char numSeq2[])
{
	int d,ii,jj,done;
	double SH[2];

	ps1[i-1]=j;
	ps2[j-1]=i;
	while(1)
	{
		SH[0]=-1.0;
		SH[1]=1.0*INFINITY;
		LSH(i,j,SH,dangleEntropies3,dangleEnthalpies3,dangleEntropies5,dangleEnthalpies5,tstack2Entropies,tstack2Enthalpies,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);
		if(equal(entropyDPT[(i-1)*Initint[2]+j-1],SH[0])&&equal(enthalpyDPT[(i-1)*Initint[2]+j-1],SH[1]))
			break;

		done = 0;
		if(i>1&&j>1&&equal(entropyDPT[(i-1)*Initint[2]+j-1],Ss(i-1,j-1,1,stackEntropies,Initint,numSeq1,numSeq2)+entropyDPT[(i-2)*Initint[2]+j-2]))
		{
			i=i-1;
			j=j-1;
			ps1[i-1]=j;
			ps2[j-1]=i;
			done=1;
		}
		for(d=3;!done&&d<=32;++d)
		{
			ii=i-1;
			jj=-ii-d+(j+i);
			if(jj<1)
			{
				ii-=abs(jj-1);
				jj=1;
			}
			for(;!done&&ii>0&&jj<j;--ii,++jj)
			{
				SH[0]=-1.0;
				SH[1]=1.0*INFINITY;
				calc_bulge_internal(ii,jj,i,j,SH,1,stackEntropies,stackEnthalpies,stackint2Entropies,stackint2Enthalpies,interiorLoopEntropies,bulgeLoopEntropies,interiorLoopEnthalpies,bulgeLoopEnthalpies,tstackEntropies,tstackEnthalpies,atpS,atpH,Initdouble,Initint,enthalpyDPT,entropyDPT,numSeq1,numSeq2);
				if(equal(entropyDPT[(i-1)*Initint[2]+j-1],SH[0])&&equal(enthalpyDPT[(i-1)*Initint[2]+j-1],SH[1]))
				{
					i=ii;
					j=jj;
					ps1[i-1]=j;
					ps2[j-1]=i;
					done=1;
					break;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq 0xb8(%rbp), %rax
movq 0xb0(%rbp), %rax
movq 0xa8(%rbp), %rax
movq 0xa0(%rbp), %rax
movq 0x98(%rbp), %rax
movq 0x90(%rbp), %rax
movq 0x88(%rbp), %rax
movq 0x80(%rbp), %rax
movq 0x78(%rbp), %rax
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movq 0x48(%rbp), %rax
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, -0x2c(%rbp)
movl %esi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %edx
movq -0x40(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movsd 0xa968(%rip), %xmm0     # 0x17140
movsd %xmm0, -0x70(%rbp)
movsd 0xa94b(%rip), %xmm0     # 0x17130
movsd %xmm0, -0x68(%rbp)
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
leaq -0x70(%rbp), %rdx
movq 0x20(%rbp), %rcx
movq 0x28(%rbp), %r8
movq 0x30(%rbp), %r9
movq 0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0x70(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x80(%rbp), %r13
movq 0x88(%rbp), %r12
movq 0x90(%rbp), %r15
movq 0x98(%rbp), %r14
movq 0xa0(%rbp), %rbx
movq 0xa8(%rbp), %r11
movq 0xb0(%rbp), %r10
movq 0xb8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x90(%rbp), %rax
movq %rax, (%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x80(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x78(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
callq 0x9cb0
movq 0xa8(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x70(%rbp), %xmm1
callq 0x7a70
cmpl $0x0, %eax
je 0xc91a
movq 0xa0(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x68(%rbp), %xmm1
callq 0x7a70
cmpl $0x0, %eax
je 0xc91a
jmp 0xcd0e
movl $0x0, -0x60(%rbp)
cmpl $0x1, -0x2c(%rbp)
jle 0xca10
cmpl $0x1, -0x30(%rbp)
jle 0xca10
movq 0xa8(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x98(%rbp)
movl -0x2c(%rbp), %edi
subl $0x1, %edi
movl -0x30(%rbp), %esi
subl $0x1, %esi
movq -0x48(%rbp), %rcx
movq 0x98(%rbp), %r8
movq 0xb0(%rbp), %r9
movq 0xb8(%rbp), %rax
movl $0x1, %edx
movq %rax, (%rsp)
callq 0x3af0
movaps %xmm0, %xmm1
movsd -0x98(%rbp), %xmm0
movq 0xa8(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x2, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm1
callq 0x7a70
cmpl $0x0, %eax
je 0xca10
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %edx
movq -0x40(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x60(%rbp)
movl $0x3, -0x54(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x60(%rbp)
movb %al, -0x99(%rbp)
jne 0xca32
cmpl $0x20, -0x54(%rbp)
setle %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xca41
jmp 0xcd09
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x58(%rbp)
xorl %eax, %eax
subl -0x58(%rbp), %eax
subl -0x54(%rbp), %eax
movl -0x30(%rbp), %ecx
addl -0x2c(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x1, -0x5c(%rbp)
jge 0xca7f
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0xca81
xorl %eax, %eax
cmpl $0x0, -0x60(%rbp)
movb %al, -0x9a(%rbp)
jne 0xcaac
xorl %eax, %eax
cmpl $0x0, -0x58(%rbp)
movb %al, -0x9a(%rbp)
jle 0xcaac
movl -0x5c(%rbp), %eax
cmpl -0x30(%rbp), %eax
setl %al
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
testb $0x1, %al
jne 0xcabb
jmp 0xccf9
movsd 0xa67d(%rip), %xmm0     # 0x17140
movsd %xmm0, -0x70(%rbp)
movsd 0xa660(%rip), %xmm0     # 0x17130
movsd %xmm0, -0x68(%rbp)
movl -0x58(%rbp), %edi
movl -0x5c(%rbp), %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
leaq -0x70(%rbp), %r8
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %r9
movq %r9, -0xf0(%rbp)
movq 0x10(%rbp), %r9
movq %r9, -0xe8(%rbp)
movq 0x18(%rbp), %r9
movq %r9, -0xe0(%rbp)
movq 0x40(%rbp), %r9
movq %r9, -0xd8(%rbp)
movq 0x48(%rbp), %r9
movq %r9, -0xd0(%rbp)
movq 0x50(%rbp), %r9
movq %r9, -0xc8(%rbp)
movq 0x58(%rbp), %r9
movq %r9, -0xc0(%rbp)
movq 0x60(%rbp), %r9
movq %r9, -0xb8(%rbp)
movq 0x68(%rbp), %r9
movq %r9, -0xb0(%rbp)
movq 0x80(%rbp), %r13
movq 0x88(%rbp), %r12
movq 0x90(%rbp), %r15
movq 0x98(%rbp), %r14
movq 0xa0(%rbp), %rbx
movq 0xa8(%rbp), %r11
movq 0xb0(%rbp), %r10
movq 0xb8(%rbp), %r9
movq %r9, -0xa8(%rbp)
movl $0x1, %r9d
movq %rax, (%rsp)
movq -0xf0(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xe8(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0xd8(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0xd0(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0xc8(%rbp), %rax
movq %rax, 0x30(%rsp)
movq -0xc0(%rbp), %rax
movq %rax, 0x38(%rsp)
movq -0xb8(%rbp), %rax
movq %rax, 0x40(%rsp)
movq -0xb0(%rbp), %rax
movq %rax, 0x48(%rsp)
movq -0xa8(%rbp), %rax
movq %r13, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq %r15, 0x60(%rsp)
movq %r14, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
movq %r11, 0x78(%rsp)
movq %r10, 0x80(%rsp)
movq %rax, 0x88(%rsp)
callq 0xaa90
movq 0xa8(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x70(%rbp), %xmm1
callq 0x7a70
cmpl $0x0, %eax
je 0xcce0
movq 0xa0(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movq 0x98(%rbp), %rdx
imull 0x8(%rdx), %ecx
addl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x68(%rbp), %xmm1
callq 0x7a70
cmpl $0x0, %eax
je 0xcce0
movl -0x58(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %edx
movq -0x40(%rbp), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x60(%rbp)
jmp 0xccf9
jmp 0xcce2
movl -0x58(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0xca81
jmp 0xccfb
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xca17
jmp 0xc7d0
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq