// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: testfullscan
static int testfullscan(const GtStrArray *filenametab,
                        const GtEncseq *encseq,
                        GtReadmode readmode,
                        GtError *err)
{
  GtUword pos, totallength;
  GtUchar ccscan = 0, ccra, ccsr;
  GtSequenceBuffer *fb = NULL;
  int retval;
  bool haserr = false;
  GtEncseqReader *esr = NULL;

  gt_error_check(err);
  totallength = encseq->totallength;
  if (filenametab != NULL) {
    fb = gt_sequence_buffer_new_guess_type(filenametab, err);
    if (!fb)
      haserr = true;
    if (!haserr)
      gt_sequence_buffer_set_symbolmap(fb, gt_encseq_alphabetsymbolmap(encseq));
  }
  if (!haserr) {
    esr = gt_encseq_create_reader_with_readmode(encseq, readmode, 0);
    for (pos=0; /* Nothing */; pos++) {
      if (filenametab != NULL && readmode == GT_READMODE_FORWARD) {
        retval = gt_sequence_buffer_next(fb, &ccscan, err);
        if (retval < 0) {
          haserr = true;
          break;
        }
        if (retval == 0)
          break;
      } else {
        if (pos >= totallength)
          break;
      }
      /* Random access */
      ccra = gt_encseq_get_encoded_char(encseq, pos, readmode);
      if (filenametab != NULL && readmode == GT_READMODE_FORWARD) {
        if (ccscan != ccra) {
          gt_error_set(err, "access=%s, position=" GT_WU
                            ": scan (readnextchar) = %u != "
                            "%u = random access",
                            gt_encseq_accessname(encseq),
                            pos,
                            (unsigned int) ccscan,
                            (unsigned int) ccra);
          haserr = true;
          break;
        }
      }
      ccsr = gt_encseq_reader_next_encoded_char(esr);
      if (ccra != ccsr) {
        gt_error_set(err, "access=%s, mode=%s: position="GT_WU
                          ": random access = %u != %u = sequential read",
                          gt_encseq_accessname(encseq),
                          gt_readmode_show(readmode),
                          pos,
                          (unsigned int) ccra,
                          (unsigned int) ccsr);
        haserr = true;
        break;
      }
    }
    /* gt_progressbar_stop(); */
  }
  if (!haserr) {
    if (pos != totallength) {
      gt_error_set(err, "sequence length must be "GT_WU" but is " GT_WU,
                       totallength, pos);
      haserr = true;
    }
  }
  gt_encseq_reader_delete(esr);
  gt_sequence_buffer_delete(fb);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movb $0x0, 0x47(%rsp)
movq $0x0, 0x38(%rsp)
movb $0x0, 0x33(%rsp)
movq $0x0, 0x28(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x1213e3
movq 0x58(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x1213ab
jmp 0x1213e3
movq 0x92c26(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x3ccaa(%rip), %rsi     # 0x15e066
leaq 0x3d285(%rip), %rdx     # 0x15e648
leaq 0x659b9(%rip), %rcx     # 0x186d83
leaq 0x6428d(%rip), %r8      # 0x18565e
movl $0x1ec7, %r9d           # imm = 0x1EC7
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1213e5
movq 0x68(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0x121446
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x9b6a0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x12141c
movb $0x1, 0x33(%rsp)
testb $0x1, 0x33(%rsp)
jne 0x121444
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
callq 0x11b0c0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x9ba60
jmp 0x121446
testb $0x1, 0x33(%rsp)
jne 0x1215cf
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x116560
movq %rax, 0x28(%rsp)
movq $0x0, 0x50(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0x1214b7
cmpl $0x0, 0x64(%rsp)
jne 0x1214b7
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rdx
leaq 0x47(%rsp), %rsi
callq 0x9bd50
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jge 0x1214a9
movb $0x1, 0x33(%rsp)
jmp 0x1215cd
cmpl $0x0, 0x34(%rsp)
jne 0x1214b5
jmp 0x1215cd
jmp 0x1214ca
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
jb 0x1214c8
jmp 0x1215cd
jmp 0x1214ca
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x64(%rsp), %edx
callq 0x113f80
movb %al, 0x46(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0x121545
cmpl $0x0, 0x64(%rsp)
jne 0x121545
movzbl 0x47(%rsp), %eax
movzbl 0x46(%rsp), %ecx
cmpl %ecx, %eax
je 0x121543
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rdi
callq 0x116850
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movq 0x50(%rsp), %rcx
movzbl 0x47(%rsp), %r8d
movzbl 0x46(%rsp), %r9d
leaq 0x687b2(%rip), %rsi     # 0x189ce4
movb $0x0, %al
callq 0xc0d0
movb $0x1, 0x33(%rsp)
jmp 0x1215cd
jmp 0x121545
movq 0x28(%rsp), %rdi
callq 0x115010
movb %al, 0x45(%rsp)
movzbl 0x46(%rsp), %eax
movzbl 0x45(%rsp), %ecx
cmpl %ecx, %eax
je 0x1215b8
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
callq 0x116850
movq %rax, 0x10(%rsp)
movl 0x64(%rsp), %edi
callq 0x149af0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq 0x50(%rsp), %r8
movzbl 0x46(%rsp), %r9d
movzbl 0x45(%rsp), %eax
leaq 0x68785(%rip), %rsi     # 0x189d2c
movl %eax, (%rsp)
movb $0x0, %al
callq 0xc0d0
movb $0x1, 0x33(%rsp)
jmp 0x1215cd
jmp 0x1215ba
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x121471
jmp 0x1215cf
testb $0x1, 0x33(%rsp)
jne 0x121606
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x121604
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x68781(%rip), %rsi     # 0x189d79
movb $0x0, %al
callq 0xc0d0
movb $0x1, 0x33(%rsp)
jmp 0x121606
movq 0x28(%rsp), %rdi
callq 0x1165d0
movq 0x38(%rsp), %rdi
callq 0x9b570
movb 0x33(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x78, %rsp
retq