// File: /workspace/github_c_makefile_star2_O1/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 0x1d18af
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xefce0
movq %rax, %r12
movq (%rbx), %rdi
movq %r14, 0x10(%rsp)
movq %r14, %rsi
callq 0xeffd3
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x1d17d0
addq %rax, %r12
movq 0x8(%rsp), %rbp
negq %rbp
leaq 0x195c11(%rip), %r15    # 0x36737c
movq 0x30(%rbx), %rsi
cmpq %rsi, 0x38(%rbx)
jb 0x1d1799
addq $0x4000, %rsi           # imm = 0x4000
movq %rsi, 0x30(%rbx)
movq 0x28(%rbx), %rdi
leaq 0x1e5d3f(%rip), %rdx    # 0x3b74ca
movl $0xfa, %ecx
callq 0x1094e6
movq %rax, 0x28(%rbx)
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x1d18aa
leaq (%r12,%rbp), %rsi
movq (%rbx), %rdi
movq 0x38(%rbx), %r13
leaq 0x1(%r13), %rax
movq %rax, 0x38(%rbx)
xorl %edx, %edx
callq 0xec603
movzbl %al, %eax
movb (%rax,%r15), %al
movb %al, (%r14,%r13)
incq %rbp
jne 0x1d176b
incq 0x78(%rbx)
movq 0x98(%rbx), %rax
movq 0x10(%rsp), %r14
movq %r14, %r12
notq %r12
testq %rax, %rax
je 0x1d1817
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 0x1d1897
movq 0x48(%rbx), %rdi
leaq 0x1e5d8c(%rip), %rsi    # 0x3b75b9
callq 0x12097f
movq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x120af4
movq 0x48(%rbx), %rdi
leaq 0x1e5d73(%rip), %rsi    # 0x3b75bc
callq 0x12097f
movq 0x48(%rbx), %rdi
movq 0x60(%rbx), %rax
addq %rax, %r12
shrq %rax
cmpq %r14, %rax
cmovaq %r14, %r12
movq %r12, %rsi
callq 0x120af4
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 0x120ba5
movq %r14, 0x58(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6be91
callq 0x6beca