// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_diagbandseed_chain_out
static void gt_diagbandseed_chain_out(void *data,
                                      const GtChain2Dimmatchtable *matchtable,
                                      const GtChain2Dim *chain)
{
  GtUword idx, chainlength;
  const GtDiagbandseedSequencePair *sequencepair
    = (const GtDiagbandseedSequencePair *) data;

  gt_assert(chain != NULL);
  chainlength = gt_chain_chainlength(chain);
  printf("# chain of length " GT_WU " with score " GT_WD "\n",
         chainlength,gt_chain_chainscore(chain));

  gt_assert(!gt_chain_storedinreverseorder(chain));
  for (idx = 0; idx < chainlength; idx++)
  {
    GtChain2Dimmatchvalues value;

    gt_chain_extractchainelem(&value, matchtable, chain, idx);
    gt_assert(value.startpos[0] <= value.endpos[0] &&
              value.weight >= 0 &&
              value.endpos[0] - value.startpos[0] + 1
                        == (GtUword) value.weight &&
              value.startpos[1] <= value.endpos[1] &&
              value.endpos[1] - value.startpos[1] + 1
                        == (GtUword) value.weight);

    gt_diagbandseed_printchainelem(stdout,
                                   sequencepair->aseqnum,
                                   value.startpos[0],
                                   sequencepair->bseqnum,
                                   value.startpos[1],
                                   (GtUword) value.weight);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdx, %rdx
je 0x142bc1
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x13777f
movq %rax, %r12
movq %rbx, %rdi
callq 0x13777a
leaq 0x1feff2(%rip), %rdi    # 0x341ae3
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x17070
movq %rbx, %rdi
callq 0x137784
testb %al, %al
jne 0x142bef
xorl %r13d, %r13d
movq 0x2f5398(%rip), %rbp    # 0x437eb0
cmpq %r13, %r12
je 0x142b7a
movq %rsp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x137788
movq (%rsp), %rdx
movq 0x10(%rsp), %rax
subq %rdx, %rax
jb 0x142b89
movq 0x20(%rsp), %r9
testq %r9, %r9
js 0x142b89
incq %rax
cmpq %r9, %rax
jne 0x142b89
movq 0x8(%rsp), %r8
movq 0x18(%rsp), %rax
subq %r8, %rax
jb 0x142b89
incq %rax
cmpq %r9, %rax
jne 0x142b89
movq (%rbp), %rdi
movl (%r15), %esi
movl 0x4(%r15), %ecx
callq 0x138b2a
incq %r13
jmp 0x142b18
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f53d8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a2479(%rip), %rsi    # 0x2e5013
leaq 0x1fef8e(%rip), %rdx    # 0x341b2f
leaq 0x1fef21(%rip), %rcx    # 0x341ac9
leaq 0x1fd30d(%rip), %r8     # 0x33febc
movl $0xb2c, %r9d            # imm = 0xB2C
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2f53a0(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a2441(%rip), %rsi    # 0x2e5013
leaq 0x1feee2(%rip), %rdx    # 0x341abb
leaq 0x1feee9(%rip), %rcx    # 0x341ac9
leaq 0x1fd2d5(%rip), %r8     # 0x33febc
movl $0xb1b, %r9d            # imm = 0xB1B
jmp 0x142bb5
movq 0x2f5372(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a2413(%rip), %rsi    # 0x2e5013
leaq 0x1fef02(%rip), %rdx    # 0x341b09
leaq 0x1feebb(%rip), %rcx    # 0x341ac9
leaq 0x1fd2a7(%rip), %r8     # 0x33febc
movl $0xb20, %r9d            # imm = 0xB20
jmp 0x142bb5
nopl (%rax)