// File: /workspace/github_c_makefile_star2_O0/fukunagatsu[P]RIblast/raccess.cpp
// Function: Raccess::LoopEnergy(int, int, int, int, int, int)
double Raccess::LoopEnergy(int type, int type2,int i,int j,int p,int q){
  double z=0;
  int u1 = p-i-1;
  int u2 = j-q-1;
  
  if ((u1==0) && (u2==0)){
    z = stack[type][type2];
  }else{
    if ((u1==0)||(u2==0)) {
      int u;
      u = u1 == 0 ? u2 : u1;
      z = u <=30 ? bulge[u] : bulge[30] - lxc37*log( u/30.)*10./kT;
      
      if (u == 1){
	z += stack[type][type2];
      }else {
	if (type>2){ z += TermAU;}
	if (type2>2){ z += TermAU;}
      }
    }else{     
      if (u1+u2==2) {
	z = int11[type][type2][_int_sequence[i+1]][_int_sequence[j-1]];
      }else if ((u1==1) && (u2==2)){
	z = int21[type][type2][_int_sequence[i+1]][_int_sequence[q+1]][_int_sequence[j-1]];
      }else if ((u1==2) && (u2==1)){
	z = int21[type2][type][_int_sequence[q+1]][_int_sequence[i+1]][_int_sequence[p-1]];
      }else if ((u1==2) && (u2==2)){
	z = int22[type][type2][_int_sequence[i+1]][_int_sequence[p-1]][_int_sequence[q+1]][_int_sequence[j-1]];
      }else{
	z = internal[u1+u2]+mismatchI[type][_int_sequence[i+1]][_int_sequence[j-1]]+mismatchI[type2][_int_sequence[q+1]][_int_sequence[p-1]];
	z += ninio[abs(u1-u2)];
      }
    }
  }
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl -0x1c(%rbp), %eax
subl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
subl 0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x1241f
cmpl $0x0, -0x30(%rbp)
jne 0x1241f
movq -0x40(%rbp), %rax
addq $0xbe8, %rax            # imm = 0xBE8
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x12a06
cmpl $0x0, -0x2c(%rbp)
je 0x1242f
cmpl $0x0, -0x30(%rbp)
jne 0x12542
cmpl $0x0, -0x2c(%rbp)
jne 0x1243d
movl -0x30(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x12443
movl -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x1e, -0x34(%rbp)
jg 0x12467
movq -0x40(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd 0xd70(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x124c9
movq -0x40(%rbp), %rax
movsd 0xe60(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd 0x6af20(%rip), %xmm0    # 0x7d3a0
movsd %xmm0, -0x60(%rbp)
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0x264b6(%rip), %xmm1    # 0x38948
divsd %xmm1, %xmm0
callq 0x3220
movsd -0x60(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x58(%rbp), %xmm0
mulsd %xmm2, %xmm1
movsd 0x2639c(%rip), %xmm2    # 0x38850
mulsd %xmm2, %xmm1
divsd 0xfda48(%rip), %xmm1    # 0x10ff08
subsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
cmpl $0x1, -0x34(%rbp)
jne 0x12503
movq -0x40(%rbp), %rax
addq $0xbe8, %rax            # imm = 0xBE8
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x1253d
cmpl $0x2, -0xc(%rbp)
jle 0x1251f
movq -0x40(%rbp), %rax
movsd 0xe68(%rax), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
cmpl $0x2, -0x10(%rbp)
jle 0x1253b
movq -0x40(%rbp), %rax
movsd 0xe68(%rax), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x1253d
jmp 0x12a04
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
cmpl $0x2, %eax
jne 0x125da
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0xe70, %rax            # imm = 0xE70
movslq -0xc(%rbp), %rcx
imulq $0x640, %rcx, %rcx      # imm = 0x640
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x70(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x12a02
cmpl $0x1, -0x2c(%rbp)
jne 0x126ae
cmpl $0x2, -0x30(%rbp)
jne 0x126ae
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x4070, %rax           # imm = 0x4070
movslq -0xc(%rbp), %rcx
imulq $0x1f40, %rcx, %rcx     # imm = 0x1F40
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq %rcx, %rax
movq %rax, -0x88(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x88(%rbp), %rax
movslq (%rcx), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl 0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x80(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x12a00
cmpl $0x2, -0x2c(%rbp)
jne 0x1278e
cmpl $0x1, -0x30(%rbp)
jne 0x1278e
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x4070, %rax           # imm = 0x4070
movslq -0x10(%rbp), %rcx
imulq $0x1f40, %rcx, %rcx     # imm = 0x1F40
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl 0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movslq (%rcx), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0x98(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq %rax, %rcx
movq -0x90(%rbp), %rax
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x129fe
cmpl $0x2, -0x2c(%rbp)
jne 0x128a5
cmpl $0x2, -0x30(%rbp)
jne 0x128a5
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x13a70, %rax          # imm = 0x13A70
movslq -0xc(%rbp), %rcx
imulq $0x9c40, %rcx, %rcx     # imm = 0x9C40
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
imulq $0x1388, %rcx, %rcx     # imm = 0x1388
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xc0(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movslq (%rcx), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl 0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movslq (%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x129fc
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
cltq
movsd 0x61c70(%rdi,%rax,8), %xmm0
movsd %xmm0, -0xe8(%rbp)
movq %rdi, %rax
addq $0x670, %rax            # imm = 0x670
movslq -0xc(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xf0(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movsd -0xe8(%rbp), %xmm0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movslq (%rcx), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0xd0(%rbp)
movq %rdi, %rax
addq $0x670, %rax            # imm = 0x670
movslq -0x10(%rbp), %rcx
imulq $0xc8, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl 0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movslq (%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
addq $0x620f8, %rdi          # imm = 0x620F8
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbac0
movsd -0xd0(%rbp), %xmm0
movq -0xc8(%rbp), %rcx
movq %rax, %rdx
movq -0x40(%rbp), %rax
movslq (%rdx), %rdx
addsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
subl -0x30(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
movslq %ecx, %rcx
movsd 0x62000(%rax,%rcx,8), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x129fe
jmp 0x12a00
jmp 0x12a02
jmp 0x12a04
jmp 0x12a06
movsd -0x28(%rbp), %xmm0
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)