// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_packedindex_chk_integrity.c
// Function: gt_packedindex_chk_integrity
extern int
gt_packedindex_chk_integrity(int argc, const char *argv[], GtError *err)
{
  struct encIdxSeq *seq;
  struct chkIndexOptions params;
  const char *inputProject;
  int parsedArgs;
  int had_err = 0;
  GtLogger *logger = NULL;
  gt_error_check(err);

  switch (parseChkIndexOptions(&parsedArgs, argc, argv, &params, err))
  {
    case GT_OPTION_PARSER_OK:
      break;
    case GT_OPTION_PARSER_ERROR:
      return -1;
    case GT_OPTION_PARSER_REQUESTS_EXIT:
      return 0;
  }

  inputProject = argv[parsedArgs];

  logger = gt_logger_new(params.verboseOutput, GT_LOGGER_DEFLT_PREFIX, stdout);

  seq = gt_loadEncIdxSeq(inputProject, params.encType, params.EISFeatureSet,
                      logger, err);
  if ((had_err = seq == NULL))
  {
    gt_error_set(err, "Failed to load index: %s", inputProject);
  }
  else
  {
    fprintf(stderr, "# Using index over sequence "GT_WU""
            " symbols long.\n", EISLength(seq));
    {
      int corrupt
        = gt_EISVerifyIntegrity(seq, inputProject, params.skipCount,
                             params.progressInterval, stderr,
                             params.checkFlags, logger, err);
      if ((had_err = corrupt != 0))
      {
        fputs(gt_error_get(err), stderr); fputs("\n", stderr);
        gt_error_set(err, "Integrity check failed for index: %s",
                  EISIntegrityCheckResultStrings[corrupt]);
      }
    }
  }
  if (seq) gt_deleteEncIdxSeq(seq);
  if (logger) gt_logger_delete(logger);
  return had_err?-1:0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testq %rdx, %rdx
je 0xb3f70
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xb4170
testq %rbx, %rbx
je 0xb3f70
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xb4175
leaq 0x2bad9b(%rip), %rdi    # 0x36ed12
leaq 0x2a669b(%rip), %rsi    # 0x35a619
callq 0x10cc4e
movq %rax, %r15
leaq 0x1c(%rsp), %rdx
leaq 0x2e4cc8(%rip), %rdi    # 0x398c5a
leaq 0x2a66ca(%rip), %rsi    # 0x35a663
xorl %ecx, %ecx
callq 0x10f451
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
leaq 0x2a66e9(%rip), %rdi    # 0x35a69b
leaq 0x2a66cd(%rip), %rsi    # 0x35a686
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x10f4c7
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
leaq 0x10(%rsp), %r12
leaq 0x2a66c4(%rip), %rdi    # 0x35a6a0
leaq 0x2a66c3(%rip), %rsi    # 0x35a6a6
movl $0x186a0, %ecx          # imm = 0x186A0
movq %r12, %rdx
callq 0x10f4c7
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
leaq 0x2a66d2(%rip), %rdi    # 0x35a6d4
leaq 0x2a66da(%rip), %rsi    # 0x35a6e3
leaq 0x3(%rsp), %r13
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x10f451
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x10d784
leaq 0x7138c(%rip), %r8      # 0x1253c8
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r9
callq 0x10d796
movl %eax, %ebp
movq %r15, %rdi
callq 0x10f2d0
movzbl (%r13), %eax
movl %eax, 0x8(%r12)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x10(%r12)
cmpl $0x1, %ebp
je 0xb4085
cmpl $0x2, %ebp
jne 0xb408c
xorl %eax, %eax
jmp 0xb4108
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xb4108
movslq 0x4(%rsp), %rax
movq (%r14,%rax,8), %r12
movzbl 0x1c(%rsp), %edi
movq 0x40fe47(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x29b829(%rip), %rsi    # 0x34f8d4
callq 0x108ed0
movq %rax, %r14
movl 0x20(%rsp), %esi
movl 0x24(%rsp), %edx
movq %r12, %rdi
movq %rax, %rcx
movq %rbx, %r8
callq 0x1a56aa
movq %rax, %r15
testq %rax, %rax
jne 0xb4117
leaq 0x2a64bf(%rip), %rsi    # 0x35a597
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
testq %r15, %r15
je 0xb40f5
movq %r15, %rdi
callq 0x1a574c
testq %r14, %r14
je 0xb4102
movq %r14, %rdi
callq 0x10916a
movzbl %bpl, %eax
negl %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40fe62(%rip), %r13    # 0x4c3f80
movq (%r13), %rdi
movq 0x10(%r15), %rdx
leaq 0x2a6483(%rip), %rsi    # 0x35a5b0
xorl %eax, %eax
callq 0x17ab0
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq (%r13), %r8
movl 0x18(%rsp), %r9d
movq %r15, %rdi
movq %r12, %rsi
pushq %rbx
pushq %r14
callq 0x1a5751
addq $0x10, %rsp
testl %eax, %eax
setne %bpl
je 0xb40e8
movq %rbx, %rdi
movl %eax, %esi
callq 0x1cfd1
jmp 0xb40e5
callq 0x1cf9a
callq 0x1cf63
nop