// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/condenseq_creator.c
// Function: ces_c_analyse
static int ces_c_analyse(GtCondenseqCreator *ces_c, GtTimer *timer,
                         GtError *err)
{
  const GtKmercode *main_kmercode = NULL;
  CesCState state = GT_CONDENSEQ_CREATOR_CONT;
  int had_err = 0;

  ces_c->main_kmer_iter = gt_kmercodeiterator_encseq_new(ces_c->input_es,
                                                         GT_READMODE_FORWARD,
                                                         ces_c->kmersize,
                                                         ces_c->main_pos);
  if (gt_showtime_enabled())
    gt_timer_show_progress(timer, "analyse data, init kmer_db", stderr);
  had_err = ces_c_init_kmer_db(ces_c, err);
  if (!had_err &&
      !gt_kmercodeiterator_inputexhausted(ces_c->main_kmer_iter)) {
    GtUword percentile;
    const GtUword percent = ces_c->ces->orig_len / 100;
    gt_log_log(GT_WU " initial kmer positions in kmer_db",
               gt_kmer_database_get_kmer_count(ces_c->kmer_db));
    gt_log_log(GT_WU " initial bytes for kmer_db",
               gt_kmer_database_get_used_size(ces_c->kmer_db));
    gt_log_log(GT_WU " initial bytes allocated size of kmer_db",
               gt_kmer_database_get_byte_size(ces_c->kmer_db));
    percentile = ces_c->main_pos / percent;
    /* we are now within one sequence, and the rest of it is long enough, or we
       are at the beginning of a sequence that is long enough */
    if (gt_showtime_enabled())
      gt_timer_show_progress_formatted(timer, stderr,
                                       "analyse data, search hits, at least "
                                       GT_WU "%% processed", percentile+1);
    while (state == GT_CONDENSEQ_CREATOR_CONT &&
           (main_kmercode =
            gt_kmercodeiterator_encseq_next(ces_c->main_kmer_iter)) != NULL) {
      state = ces_c_process_kmer(ces_c, main_kmercode, err);
      /* handle first kmer after reset of position, state will either be CONT or
         EOD afterwards. */
      while (state == GT_CONDENSEQ_CREATOR_RESET &&
             (main_kmercode =
              gt_kmercodeiterator_encseq_next(ces_c->main_kmer_iter)) != NULL) {
        state = ces_c_process_kmer(ces_c, main_kmercode, err);
      }
      if (!had_err && state == GT_CONDENSEQ_CREATOR_ERROR)
        had_err = -1;
      if (!had_err) {
        ces_c->main_pos++;
        ces_c->current_seq_pos++;
        if (percentile < ces_c->main_pos / percent) {
          percentile = ces_c->main_pos / percent;
          gt_log_log(GT_WU "%% processed.", percentile);
          gt_log_log(GT_WU " kmer positions in unique (kmer_db)",
                     gt_kmer_database_get_kmer_count(ces_c->kmer_db));
          gt_log_log(GT_WU " times xdrop was called", ces_c_xdrops);
          gt_log_log(GT_WU " uniques", ces_c->ces->uds_nelems);
          gt_log_log(GT_WU " links", ces_c->ces->lds_nelems);
          if (gt_showtime_enabled()) {
            if (percentile + 1 <= 100)
              gt_timer_show_progress_formatted(timer, stderr,
                                               "analyse data, search hits, at "
                                               "least " GT_WU "%% processed",
                                               percentile+1);
          }
        }
      }
    }
    if (!had_err && state == GT_CONDENSEQ_CREATOR_ERROR)
      had_err = -1;
    if (!had_err && state != GT_CONDENSEQ_CREATOR_EOD) {
      had_err = -1;
      gt_error_set(err, "Processing of kmers stopped, but end of data not "
                   "reached");
    }
  }
  gt_kmercodeiterator_delete(ces_c->main_kmer_iter);
  gt_kmercodeiterator_delete(ces_c->adding_iter);
  ces_c->main_kmer_iter = NULL;
  ces_c->adding_iter = NULL;
  return had_err;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rax
movl 0x138(%rax), %edx
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rcx
xorl %esi, %esi
callq 0x2ca880
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
callq 0x11aa90
testb $0x1, %al
jne 0x145d79
jmp 0x145d94
movq 0x38(%rsp), %rdi
movq 0x4f621b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdx
leaq 0x406607(%rip), %rsi    # 0x54c396
callq 0x121930
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x147760
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jne 0x1460d0
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x2cb510
testb $0x1, %al
jne 0x1460d0
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x78(%rax), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x199a70
movq %rax, %rsi
leaq 0x4065b5(%rip), %rdi    # 0x54c3b1
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x19a2b0
movq %rax, %rsi
leaq 0x4065bc(%rip), %rdi    # 0x54c3d7
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x19a230
movq %rax, %rsi
leaq 0x4065bb(%rip), %rdi    # 0x54c3f5
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x11aa90
testb $0x1, %al
jne 0x145e66
jmp 0x145e8c
movq 0x38(%rsp), %rdi
movq 0x4f612e(%rip), %rax    # 0x63bfa0
movq (%rax), %rsi
movq 0x18(%rsp), %rcx
addq $0x1, %rcx
leaq 0x40659c(%rip), %rdx    # 0x54c421
movb $0x0, %al
callq 0x121970
jmp 0x145e8e
xorl %eax, %eax
cmpl $0x0, 0x24(%rsp)
movb %al, 0xf(%rsp)
jne 0x145eb9
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x2cac00
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x145ec6
jmp 0x14608f
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x147df0
movl %eax, 0x24(%rsp)
xorl %eax, %eax
cmpl $0x2, 0x24(%rsp)
movb %al, 0xe(%rsp)
jne 0x145f09
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x2cac00
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x145f13
jmp 0x145f2d
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x147df0
movl %eax, 0x24(%rsp)
jmp 0x145ede
cmpl $0x0, 0x20(%rsp)
jne 0x145f43
cmpl $0x3, 0x24(%rsp)
jne 0x145f43
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x20(%rsp)
jne 0x14608a
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xf0(%rax)
movq 0x40(%rsp), %rax
movq 0xd8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xd8(%rax)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x10(%rsp)
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x146088
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
leaq 0x406485(%rip), %rdi    # 0x54c455
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x199a70
movq %rax, %rsi
leaq 0x406477(%rip), %rdi    # 0x54c466
movb $0x0, %al
callq 0xe7740
movq 0x4fcd4b(%rip), %rsi    # 0x642d48
leaq 0x406489(%rip), %rdi    # 0x54c48d
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x98(%rax), %rsi
leaq 0x405d64(%rip), %rdi    # 0x54bd86
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x70(%rax), %rsi
leaq 0x405d55(%rip), %rdi    # 0x54bd92
movb $0x0, %al
callq 0xe7740
callq 0x11aa90
testb $0x1, %al
jne 0x14604f
jmp 0x146086
movq 0x18(%rsp), %rax
addq $0x1, %rax
cmpq $0x64, %rax
ja 0x146084
movq 0x38(%rsp), %rdi
movq 0x4f5f36(%rip), %rax    # 0x63bfa0
movq (%rax), %rsi
movq 0x18(%rsp), %rcx
addq $0x1, %rcx
leaq 0x4063a4(%rip), %rdx    # 0x54c421
movb $0x0, %al
callq 0x121970
jmp 0x146086
jmp 0x146088
jmp 0x14608a
jmp 0x145e8e
cmpl $0x0, 0x20(%rsp)
jne 0x1460a5
cmpl $0x3, 0x24(%rsp)
jne 0x1460a5
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x20(%rsp)
jne 0x1460ce
cmpl $0x1, 0x24(%rsp)
je 0x1460ce
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
movq 0x30(%rsp), %rdi
leaq 0x4063e1(%rip), %rsi    # 0x54c4a8
movb $0x0, %al
callq 0xd88c0
jmp 0x1460d0
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x2cb300
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x2cb300
movq 0x40(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x40(%rsp), %rax
movq $0x0, 0x10(%rax)
movl 0x20(%rsp), %eax
addq $0x48, %rsp
retq
nop