// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/shu-encseq-gc.c
// Function: gt_encseq_gc_count
GtUword *gt_encseq_gc_count(const GtEncseq *encseq)
{
  GtEncseqReader *reader;
  GtAlphabet *alphabet;
  GtUword *gc_count_per_seq,
                char_idx, totallength, max_unit,
                seq_idx = 0,
                nextsep = 0;
  bool is_mirrored_encseq;
  GtUchar cCgG_encoded[4], current_c;

  alphabet = gt_encseq_alphabet(encseq);
  gt_assert(gt_alphabet_is_dna(alphabet));
  gt_alphabet_encode_seq(alphabet, cCgG_encoded, "cCgG", 4UL);
  totallength = gt_encseq_total_length(encseq);
  reader = gt_encseq_create_reader_with_readmode(encseq,
                                                 GT_READMODE_FORWARD,
                                                 0);
  is_mirrored_encseq = gt_encseq_is_mirrored(encseq);
  if (is_mirrored_encseq) {
    max_unit = GT_DIV2(gt_encseq_num_of_sequences(encseq));
    gc_count_per_seq = gt_calloc((size_t) GT_MULT2(max_unit),
                                 sizeof (*gc_count_per_seq));
  }
  else {
    max_unit = gt_encseq_num_of_sequences(encseq);
    gc_count_per_seq = gt_calloc((size_t) max_unit, sizeof (*gc_count_per_seq));
  }

  nextsep = gt_encseq_seqstartpos(encseq, seq_idx) +
            gt_encseq_seqlength(encseq, seq_idx);

  for (char_idx = 0; char_idx < totallength; char_idx++)
  {
    if (nextsep == char_idx)
    {
      gt_assert(gc_count_per_seq[seq_idx] <=
                gt_encseq_seqlength(encseq, seq_idx));
      seq_idx++;

      nextsep = gt_encseq_seqstartpos(encseq, seq_idx) +
                gt_encseq_seqlength(encseq, seq_idx);

      gt_encseq_reader_reinit_with_readmode(reader,
                                            encseq,
                                            GT_READMODE_FORWARD,
                                            char_idx + 1UL);
      char_idx++;
    }
    current_c = gt_encseq_reader_next_encoded_char(reader);
    if (current_c == cCgG_encoded[0] || current_c == cCgG_encoded[1] ||
        current_c == cCgG_encoded[2] || current_c == cCgG_encoded[3]) {
       gc_count_per_seq[seq_idx]++;
       gt_assert(gc_count_per_seq[seq_idx] != 0);
    }
  }
  gt_encseq_reader_delete(reader);
  return gc_count_per_seq;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x60(%rsp), %rdi
callq 0xb0f00
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x7f400
testb $0x1, %al
jne 0x2ebb60
movq 0x350471(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x22a4da(%rip), %rsi    # 0x516013
leaq 0x25044e(%rip), %rdx    # 0x53bf8e
leaq 0x2a2d27(%rip), %rcx    # 0x58e86e
leaq 0x2a2d33(%rip), %r8     # 0x58e881
movl $0x39, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ebb62
movq 0x50(%rsp), %rdi
leaq 0x1b(%rsp), %rsi
leaq 0x2a2d28(%rip), %rdx    # 0x58e89b
movl $0x4, %ecx
callq 0x7f850
movq 0x60(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xac380
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0xc2ec0
andb $0x1, %al
movb %al, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
je 0x2ebbef
movq 0x60(%rsp), %rdi
callq 0xa9d50
shrq %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
shlq %rdi
movl $0x8, %esi
leaq 0x2a2ca3(%rip), %rdx    # 0x58e881
movl $0x43, %ecx
callq 0xe83c0
movq %rax, 0x48(%rsp)
jmp 0x2ebc1e
movq 0x60(%rsp), %rdi
callq 0xa9d50
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl $0x8, %esi
leaq 0x2a2c72(%rip), %rdx    # 0x58e881
movl $0x47, %ecx
callq 0xe83c0
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb0530
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb09f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x2ebe0a
movq 0x20(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x2ebd4c
jmp 0x2ebc7c
movq 0x48(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb09f0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jbe 0x2ebce3
movq 0x3502ee(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x22a357(%rip), %rsi    # 0x516013
leaq 0x2a2bdd(%rip), %rdx    # 0x58e8a0
leaq 0x2a2ba4(%rip), %rcx    # 0x58e86e
leaq 0x2a2bb0(%rip), %r8     # 0x58e881
movl $0x52, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ebce5
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb0530
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xb09f0
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x40(%rsp), %rcx
addq $0x1, %rcx
xorl %edx, %edx
callq 0xabdb0
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0xaae30
movb %al, 0x1a(%rsp)
movzbl 0x1a(%rsp), %eax
movzbl 0x1b(%rsp), %ecx
cmpl %ecx, %eax
je 0x2ebd92
movzbl 0x1a(%rsp), %eax
movzbl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
je 0x2ebd92
movzbl 0x1a(%rsp), %eax
movzbl 0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x2ebd92
movzbl 0x1a(%rsp), %eax
movzbl 0x1e(%rsp), %ecx
cmpl %ecx, %eax
jne 0x2ebdf5
movq 0x48(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x48(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x2ebdf1
movq 0x3501e0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x22a249(%rip), %rsi    # 0x516013
leaq 0x2a2b11(%rip), %rdx    # 0x58e8e2
leaq 0x2a2a96(%rip), %rcx    # 0x58e86e
leaq 0x2a2aa2(%rip), %r8     # 0x58e881
movl $0x62, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ebdf3
jmp 0x2ebdf5
jmp 0x2ebdf7
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2ebc5a
movq 0x58(%rsp), %rdi
callq 0xac3f0
movq 0x48(%rsp), %rax
addq $0x68, %rsp
retq
nop