// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/rdj-contigs-writer.c
// Function: gt_contigs_writer_append
void gt_contigs_writer_append(GtContigsWriter *contigs_writer,
    GtUword seqnum, GtUword nofchars)
{
  GtUword pos, i;
  gt_assert(contigs_writer != NULL);
  pos = gt_encseq_seqstartpos(contigs_writer->reads, seqnum) +
      gt_encseq_seqlength(contigs_writer->reads, seqnum) - nofchars;
  for (i = 0; i < nofchars; i++, pos++)
  {
    char *c;
    GT_GETNEXTFREEINARRAY(c, &contigs_writer->contig, char,
        GT_CONTIGS_WRITER_CONTIG_INC);
    *c = gt_encseq_get_encoded_char_nospecial(contigs_writer->reads, pos,
        GT_READMODE_FORWARD)["acgt"];
  }
  contigs_writer->depthinfo.depth++;
  if (contigs_writer->rcn != NULL)
  {
    contigs_writer->depthinfo.internal_copynum += contigs_writer->rcn[
      GT_CONTIGS_WRITER_READNUM(seqnum, contigs_writer->nofseqs)];
  }
  if (contigs_writer->show_paths)
  {
    gt_str_append_cstr(contigs_writer->path_desc, "-(");
    gt_str_append_uword(contigs_writer->path_desc, nofchars);
    gt_str_append_cstr(contigs_writer->path_desc, ")->");
    gt_str_append_uword(contigs_writer->path_desc,
        GT_CONTIGS_WRITER_READNUM(seqnum, contigs_writer->nofseqs));
    gt_str_append_char(contigs_writer->path_desc,
        GT_CONTIGS_WRITER_LETTER(seqnum, contigs_writer->nofseqs));
  }
  else
  {
    contigs_writer->lastseqnum = seqnum;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x178e5a
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x74d9c
movq %rax, %r13
movq (%rbx), %rdi
movq %r14, 0x10(%rsp)
movq %r14, %rsi
callq 0x75173
movq %rax, %r12
movq %r15, 0x8(%rsp)
negq %r15
addq %r13, %r12
leaq 0x18555c(%rip), %r14    # 0x2fe234
testq %r15, %r15
je 0x178d48
movq 0x30(%rbx), %rsi
cmpq %rsi, 0x38(%rbx)
jae 0x178ced
movq 0x28(%rbx), %rbp
jmp 0x178d14
addq $0x4000, %rsi           # imm = 0x4000
movq %rsi, 0x30(%rbx)
movq 0x28(%rbx), %rdi
leaq 0x1d5517(%rip), %rdx    # 0x34e21a
movl $0xfa, %ecx
callq 0x93472
movq %rax, %rbp
movq %rax, 0x28(%rbx)
testq %rbp, %rbp
je 0x178e22
leaq (%r12,%r15), %rsi
movq (%rbx), %rdi
movq 0x38(%rbx), %r13
leaq 0x1(%r13), %rax
movq %rax, 0x38(%rbx)
xorl %edx, %edx
callq 0x70bf6
movzbl %al, %eax
movb (%rax,%r14), %al
movb %al, (%rbp,%r13)
incq %r15
jmp 0x178cd8
incq 0x78(%rbx)
movq 0x98(%rbx), %rax
movq 0x10(%rsp), %r14
movq %r14, %r12
notq %r12
testq %rax, %rax
je 0x178d8f
movq 0x60(%rbx), %rcx
movq %rcx, %rdx
shrq %rdx
addq %r12, %rcx
cmpq %r14, %rdx
cmovaq %r14, %rcx
movzbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
addss 0x8c(%rbx), %xmm0
movss %xmm0, 0x8c(%rbx)
cmpb $0x1, 0x10(%rbx)
movq 0x8(%rsp), %r15
jne 0x178e0f
movq 0x48(%rbx), %rdi
leaq 0x1d5564(%rip), %rsi    # 0x34e309
callq 0xacbfb
movq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0xace26
movq 0x48(%rbx), %rdi
leaq 0x1d554b(%rip), %rsi    # 0x34e30c
callq 0xacbfb
movq 0x48(%rbx), %rdi
movq 0x60(%rbx), %rax
addq %rax, %r12
shrq %rax
cmpq %r14, %rax
cmovaq %r14, %r12
movq %r12, %rsi
callq 0xace26
movq 0x60(%rbx), %rax
shrq %rax
xorl %ecx, %ecx
cmpq %r14, %rax
seta %cl
movq 0x48(%rbx), %rdi
leal (%rcx,%rcx,2), %esi
addl $0x42, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xaced9
movq %r14, 0x58(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2bf13f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x16c1e0(%rip), %rsi    # 0x2e5013
leaq 0x1d54a2(%rip), %rdx    # 0x34e2dc
leaq 0x1d5482(%rip), %rcx    # 0x34e2c3
leaq 0x1d53d2(%rip), %r8     # 0x34e21a
movl $0xfa, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2bf107(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x16c1a8(%rip), %rsi    # 0x2e5013
leaq 0x1d53db(%rip), %rdx    # 0x34e24d
leaq 0x1d544a(%rip), %rcx    # 0x34e2c3
leaq 0x1d539a(%rip), %r8     # 0x34e21a
movl $0xf3, %r9d
jmp 0x178e4e