// File: /workspace/github_c_makefile_star2_O0/fukunagatsu[P]RIblast/gapped_extension.cpp
// Function: GappedExtension::CheckHelixLength(int, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, int, int, int, int, std::vector<std::vector<Cell, std::allocator<Cell>>, std::allocator<std::vector<Cell, std::allocator<Cell>>>>&)
int GappedExtension::CheckHelixLength(int flag, vector<unsigned char> &query_seq, vector<unsigned char> &db_seq, int q_start, int db_start,int i, int j, vector<vector<Cell> > &matrix_c){
  int type_zero = GetBPType(flag, query_seq, db_seq, q_start, db_start, i, j, 0);

  if(type_zero !=0){
    if(matrix_c[i-1][j-1].type == 0 || (CheckWobble(type_zero) && CheckWobble(matrix_c[i-1][j-1].type))){
      for(int x = 1; x <= _min_helix_length-1; x++){
        int type = GetBPType(flag, query_seq, db_seq, q_start, db_start, i, j, x);
        if(type == 0 || (x==1 && CheckWobble(type_zero) && CheckWobble(type))){
	  type_zero = 0;
          break;
        }
	
      }
    }
  }
  return(type_zero);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movl -0x28(%rbp), %r9d
movl 0x10(%rbp), %r10d
movl 0x18(%rbp), %eax
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2ea30
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x2e486
movq 0x20(%rbp), %rdi
movl 0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2ed90
movq %rax, %rdi
movl 0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2edb0
cmpl $0x0, 0x10(%rax)
je 0x2e3e6
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x2eb10
testb $0x1, %al
jne 0x2e3ae
jmp 0x2e484
movq 0x20(%rbp), %rdi
movl 0x10(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2ed90
movq %rax, %rdi
movl 0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2edb0
movq -0x40(%rbp), %rdi
movl 0x10(%rax), %esi
callq 0x2eb10
testb $0x1, %al
jne 0x2e3e6
jmp 0x2e484
movl $0x1, -0x30(%rbp)
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x2e482
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movl -0x28(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl -0x30(%rbp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x2ea30
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x2e469
cmpl $0x1, -0x30(%rbp)
jne 0x2e472
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x2eb10
testb $0x1, %al
jne 0x2e457
jmp 0x2e472
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x2eb10
testb $0x1, %al
jne 0x2e469
jmp 0x2e472
movl $0x0, -0x2c(%rbp)
jmp 0x2e482
jmp 0x2e474
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2e3ed
jmp 0x2e484
jmp 0x2e486
movl -0x2c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop