// File: /workspace/github_c_makefile_star2_O0/fukunagatsu[P]RIblast/raccess.cpp
// Function: Raccess::CalcMultiProbability(int, int)
double Raccess::CalcMultiProbability(int x, int w){
  double probability = 0.0;
  double temp = 0.0;
  bool flag = 0;
  
  for(int i = x+w-1; i<=min(x+_maximal_span,_seq_length);i++){
    if(_Beta_multi[x-1][i-x+1] != -INF && _Alpha_multi[x+w-1][i-x-w+1] != -INF){
      temp = flag == 0 ? _Beta_multi[x-1][i-x+1] + _Alpha_multi[x+w-1][i-x-w+1] : logsumexp(temp,_Beta_multi[x-1][i-x+1] + _Alpha_multi[x+w-1][i-x-w+1]);
      flag = 1;
    }
  }
  
  for(int i = max(0,x+w-1-_maximal_span); i<x;i++){
    if(_Beta_multi2[i][x+w-1-i] != -INF && _Alpha_multi2[i][x-i-1] != -INF){
      temp = flag == 0 ? _Beta_multi2[i][x+w-1-i] + _Alpha_multi2[i][x-i-1] : logsumexp(temp,_Beta_multi2[i][x+w-1-i] + _Alpha_multi2[i][x-i-1]);
      flag = 1;
    }
  }
  if(flag == 1){ probability = fmath::expd(temp-_Alpha_outer[_seq_length]); }
  return(probability);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rsi
movl -0x28(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0xc(%rbp), %eax
addl 0x62114(%rsi), %eax
movl %eax, -0x2c(%rbp)
addq $0x62110, %rsi          # imm = 0x62110
leaq -0x2c(%rbp), %rdi
callq 0xc850
movq %rax, %rcx
movl -0x44(%rbp), %eax
cmpl (%rcx), %eax
jg 0x14c39
movq -0x40(%rbp), %rdi
addq $0x62230, %rdi          # imm = 0x62230
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd (%rax), %xmm0
movsd 0x23e76(%rip), %xmm1    # 0x38920
ucomisd %xmm1, %xmm0
jne 0x14ab7
jp 0x14ab7
jmp 0x14c29
movq -0x40(%rbp), %rdi
addq $0x62188, %rdi          # imm = 0x62188
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd (%rax), %xmm0
movsd 0x23e2a(%rip), %xmm1    # 0x38920
ucomisd %xmm1, %xmm0
jne 0x14b03
jp 0x14b03
jmp 0x14c29
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x14b8c
movq -0x40(%rbp), %rdi
addq $0x62230, %rdi          # imm = 0x62230
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
addq $0x62188, %rdi          # imm = 0x62188
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd -0x58(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x14c1b
movq -0x40(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
addq $0x62230, %rdi          # imm = 0x62230
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
addq $0x62188, %rdi          # imm = 0x62188
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150a0
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd -0x68(%rbp), %xmm1
movq -0x40(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
addsd (%rax), %xmm1
callq 0x12a20
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
jmp 0x14c2b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x14a3d
movq -0x40(%rbp), %rcx
movl $0x0, -0x34(%rbp)
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
subl 0x62114(%rcx), %eax
movl %eax, -0x38(%rbp)
leaq -0x34(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15060
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x14e1b
movq -0x40(%rbp), %rdi
addq $0x62278, %rdi          # imm = 0x62278
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
subl -0x30(%rbp), %eax
movslq %eax, %rsi
callq 0x150c0
movsd (%rax), %xmm0
movsd 0x23c75(%rip), %xmm1    # 0x38920
ucomisd %xmm1, %xmm0
jne 0x14cb8
jp 0x14cb8
jmp 0x14e0b
movq -0x40(%rbp), %rdi
addq $0x621d0, %rdi          # imm = 0x621D0
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd (%rax), %xmm0
movsd 0x23c34(%rip), %xmm1    # 0x38920
ucomisd %xmm1, %xmm0
jne 0x14cf9
jp 0x14cf9
jmp 0x14e0b
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x14d75
movq -0x40(%rbp), %rdi
addq $0x62278, %rdi          # imm = 0x62278
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
subl -0x30(%rbp), %eax
movslq %eax, %rsi
callq 0x150c0
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x78(%rbp)
addq $0x621d0, %rdi          # imm = 0x621D0
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd -0x78(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
jmp 0x14dfd
movq -0x40(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
addq $0x62278, %rdi          # imm = 0x62278
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
subl -0x30(%rbp), %eax
movslq %eax, %rsi
callq 0x150c0
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
addq $0x621d0, %rdi          # imm = 0x621D0
movslq -0x30(%rbp), %rsi
callq 0x150a0
movq %rax, %rdi
movl -0xc(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x150c0
movsd -0x88(%rbp), %xmm1
movq -0x40(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
addsd (%rax), %xmm1
callq 0x12a20
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
jmp 0x14e0d
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x14c68
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x14e65
movq -0x40(%rbp), %rax
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movq %rax, %rdi
addq $0x62140, %rdi          # imm = 0x62140
movslq 0x62110(%rax), %rsi
callq 0x150c0
movsd -0x90(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x151d0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)