// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/diagband-struct.c
// Function: gt_diagband_statistics_add
void gt_diagband_statistics_add(void *v_diagband_statistics,
                                /* remove GT_UNUSED once arguments are used */
                                GT_UNUSED const GtEncseq *aencseq,
                                GT_UNUSED const GtEncseq *bencseq,
                                GT_UNUSED GtUword aseqnum,
                                GT_UNUSED GtUword bseqnum,
                                const GtDiagbandStruct *diagband_struct,
                                const GtDiagbandseedMaximalmatch *memstore,
                                GT_UNUSED unsigned int seedlength,
                                const GtSeedpairPositions *seedstore,
                                GtUword segment_length)
{
  GtUword idx;
  GtDiagbandStatistics *diagband_statistics
    = (GtDiagbandStatistics *) v_diagband_statistics;

  if (diagband_statistics->track == NULL)
  {
    GT_INITBITTAB(diagband_statistics->track,diagband_struct->num_diagbands);
  } else
  {
    GT_CLEARBITTAB(diagband_statistics->track,diagband_struct->num_diagbands);
  }
  if (seedstore != NULL)
  {
    for (idx = 0; idx < segment_length; idx++)
    {
      const GtUword diagband_idx
        = GT_DIAGBANDSEED_DIAGONALBAND(diagband_struct->amaxlen,
                                       diagband_struct->logdiagbandwidth,
                                       seedstore[idx].apos,
                                       seedstore[idx].bpos);
      gt_diagband_statistics_score_add(diagband_statistics,diagband_struct,
                                       diagband_idx);
    }
  } else
  {
    gt_assert(memstore != NULL);
    for (idx = 0; idx < segment_length; idx++)
    {
      const GtUword diagband_idx
        = GT_DIAGBANDSEED_DIAGONALBAND(diagband_struct->amaxlen,
                                       diagband_struct->logdiagbandwidth,
                                       memstore[idx].apos,
                                       memstore[idx].bpos);
      gt_diagband_statistics_score_add(diagband_statistics,diagband_struct,
                                       diagband_idx);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %rdi, %r14
movq 0x40(%rsp), %r13
movq 0x10(%rdi), %rdi
movq 0x10(%r9), %rax
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rax
pushq $0x8
popq %r15
cmovaeq %rax, %r15
testq %rdi, %rdi
jne 0x2a6d17
leaq 0xd9d30(%rip), %rdx     # 0x380a31
xorl %edi, %edi
movq %r15, %rsi
movl $0x13e, %ecx            # imm = 0x13E
callq 0x93472
movq %rax, %rdi
movq %rax, 0x10(%r14)
movq 0x48(%rsp), %r12
xorl %esi, %esi
movq %r15, %rdx
callq 0x17380
testq %r13, %r13
je 0x2a6d59
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x2a6d91
movl (%r13,%r15,8), %eax
movl 0x4(%r13,%r15,8), %edx
addq (%rbx), %rdx
subq %rax, %rdx
movb 0x8(%rbx), %cl
shrq %cl, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a6dd3
incq %r15
jmp 0x2a6d2e
movq 0x30(%rsp), %r15
testq %r15, %r15
je 0x2a6d9b
addq $0x4, %r15
subq $0x1, %r12
jb 0x2a6d91
movl -0x4(%r15), %eax
movl (%r15), %edx
addq (%rbx), %rdx
subq %rax, %rdx
movb 0x8(%rbx), %cl
shrq %cl, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a6dd3
addq $0xc, %r15
jmp 0x2a6d67
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x1911c6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x3e267(%rip), %rsi     # 0x2e5013
leaq 0xd9d80(%rip), %rdx     # 0x380b33
leaq 0xd9e3f(%rip), %rcx     # 0x380bf9
leaq 0xd9c70(%rip), %r8      # 0x380a31
movl $0x151, %r9d            # imm = 0x151
xorl %eax, %eax
callq 0x17a50
callq 0x17390