// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/chain2dim.c
// Function: gt_chain2dim_activatematchpoint
static void gt_chain2dim_activatematchpoint(bool addterminal,
                               const GtChain2Dimmatchtable *matchtable,
                               GtChain2DimMatchstore *matchstore,
                               GtChain2DimMatchpoint *qmatch2)
{
  GtChain2DimMatchpoint *tmp2;
  GtChain2Dimscoretype qpriority;

  qpriority = gt_chain2dim_evalpriority(addterminal,matchtable,
                                        FRAGIDENT(qmatch2));
  tmp2 = (GtChain2DimMatchpoint *) gt_rbtree_previous_equal_key(
                                     matchstore->dictroot,
                                     qmatch2,
                                     gt_chain2dim_cmpendMatchpoint2,
                                     NULL);
  if (tmp2 == NULL ||
      qpriority > gt_chain2dim_evalpriority(addterminal,matchtable,
                                            FRAGIDENT(tmp2)))
  {
    gt_chain2dim_insertintodict(addterminal,matchtable,matchstore,qmatch2);
    while (true)
    {
      tmp2 = (GtChain2DimMatchpoint *) gt_rbtree_next_key(
                                               matchstore->dictroot,
                                               qmatch2,
                                               gt_chain2dim_cmpendMatchpoint2,
                                               NULL);
      if (tmp2 == NULL ||
          qpriority <= gt_chain2dim_evalpriority(addterminal,matchtable,
                                                 FRAGIDENT(tmp2)))
      {
        break;
      }
      if (gt_rbtree_erase(matchstore->dictroot, tmp2) != 0)
      {
        fprintf(stderr,"cannot delete successor node\n");
        exit(GT_EXIT_PROGRAMMING_ERROR);
      }
    }
  } else
  {
    gt_free(qmatch2);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movq (%rcx), %rcx
movq (%rsi), %rax
imulq $0x50, %rcx, %rcx
testl %edi, %edi
je 0x137ac8
movq 0x48(%rax,%rcx), %r13
subq 0x40(%rax,%rcx), %r13
jmp 0x137acd
movq 0x48(%rax,%rcx), %r13
movq (%r14), %rdi
leaq -0x18f(%rip), %rdx      # 0x137948
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x107744
testq %rax, %rax
je 0x137b0f
movq (%rax), %rcx
movq (%r15), %rax
testb %bpl, %bpl
je 0x137b01
imulq $0x50, %rcx, %rdx
movq 0x48(%rax,%rdx), %rcx
subq 0x40(%rax,%rdx), %rcx
jmp 0x137b0a
imulq $0x50, %rcx, %rcx
movq 0x48(%rax,%rcx), %rcx
cmpq %rcx, %r13
jle 0x137b5b
movq (%r14), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x106b2f
testq %rax, %rax
je 0x137c2b
cmpb $0x0, 0x7(%rsp)
jne 0x137ba4
movq (%rax), %rcx
movq (%r15), %rsi
imulq $0x50, %rcx, %rcx
testb %bpl, %bpl
je 0x137b7d
movq 0x48(%rsi,%rcx), %rdx
subq 0x40(%rsi,%rcx), %rdx
movq (%rbx), %rcx
imulq $0x50, %rcx, %r8
movq 0x48(%rsi,%r8), %rdi
subq 0x40(%rsi,%r8), %rdi
jmp 0x137b8e
leaq 0x207216(%rip), %rsi    # 0x33ed78
movq %rbx, %rdi
movl $0x384, %edx            # imm = 0x384
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x936f9
movq 0x48(%rsi,%rcx), %rdx
movq (%rbx), %rcx
imulq $0x50, %rcx, %rdi
movq 0x48(%rsi,%rdi), %rdi
cmpq %rdi, %rdx
jge 0x137ba4
movq 0x8(%rax), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x137c63
movq %rcx, (%rax)
leaq -0x263(%rip), %r12      # 0x137948
movq (%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x10784c
testq %rax, %rax
je 0x137c1c
movq (%rax), %rdx
movq (%r15), %rcx
testb %bpl, %bpl
je 0x137bdb
imulq $0x50, %rdx, %rsi
movq 0x48(%rcx,%rsi), %rdx
subq 0x40(%rcx,%rsi), %rdx
jmp 0x137be4
imulq $0x50, %rdx, %rdx
movq 0x48(%rcx,%rdx), %rdx
cmpq %rdx, %r13
jle 0x137c1c
movq (%r14), %rdi
movq %rax, %rsi
callq 0x106ce5
testl %eax, %eax
je 0x137bab
movq 0x300369(%rip), %rax    # 0x437f68
movq (%rax), %rcx
leaq 0x2074eb(%rip), %rdi    # 0x33f0f4
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
pushq $0x2
popq %rdi
callq 0x178f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x300336(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1ad3d7(%rip), %rsi    # 0x2e5013
leaq 0x2074cf(%rip), %rdx    # 0x33f112
leaq 0x2074d8(%rip), %rcx    # 0x33f122
leaq 0x207127(%rip), %r8     # 0x33ed78
movl $0x34f, %r9d            # imm = 0x34F
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x3002fe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1ad39f(%rip), %rsi    # 0x2e5013
leaq 0x2074c3(%rip), %rdx    # 0x33f13e
leaq 0x2074a0(%rip), %rcx    # 0x33f122
leaq 0x2070ef(%rip), %r8     # 0x33ed78
movl $0x355, %r9d            # imm = 0x355
jmp 0x137c57