// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-errfind.c
// Function: gt_errfind
int gt_errfind(Sequentialsuffixarrayreader *ssar, const GtEncseq *encseq,
    GtUword k, GtUword c, GtUword debug_value,
    bool edit_twobitencoding, const char *indexname, GtError *err)
{
  GtBUstate_errfind *state;
  int had_err = 0;

  state = gt_malloc(sizeof (*state));
  state->alphasize = gt_alphabet_num_of_chars(gt_encseq_alphabet(encseq));
  state->kpositions = gt_malloc(sizeof (GtUword) * state->alphasize * c);
  state->count = gt_malloc(sizeof (GtUword) * state->alphasize);
  state->encseq = encseq;
  state->totallength = gt_encseq_total_length(encseq);
  state->firstmirrorpos = state->totallength;
  if (gt_encseq_is_mirrored(encseq))
    state->firstmirrorpos >>= 1;

  state->editor = NULL;
  if (edit_twobitencoding)
  {
    state->editor = gt_twobitenc_editor_new(encseq, indexname, err);
    if (state->editor == NULL)
      had_err = -1;
  }
  if (had_err == 0)
  {
    state->k = k;
    state->c = c;
    state->debug_value = debug_value;
    state->quiet = (state->debug_value == GT_UNDEF_UWORD ? false : true);
    gt_errfind_reset(state);
    had_err = gt_esa_bottomup_errfind(ssar, state, err);
  }

  if (state->editor != NULL)
  {
    gt_twobitenc_editor_delete(state->editor);
  }

  gt_free(state->kpositions);
  gt_free(state->count);
  gt_free(state);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x8(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, 0x28(%rsp)
leaq 0x1e5830(%rip), %r13    # 0x3ae087
movl $0x78, %edi
movq %r13, %rsi
movl $0x105, %edx            # imm = 0x105
callq 0x104226
movq %rax, %rbx
movq %rbp, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd11be
movl %eax, 0x18(%rbx)
movl %eax, %edi
imulq %r15, %rdi
shlq $0x3, %rdi
movq %r13, %rsi
movl $0x107, %edx            # imm = 0x107
callq 0x104226
movq %rax, 0x30(%rbx)
movl 0x18(%rbx), %edi
shlq $0x3, %rdi
movq %r13, %rsi
movl $0x108, %edx            # imm = 0x108
callq 0x104226
movq %rax, 0x38(%rbx)
movq %rbp, 0x10(%rbx)
movq %rbp, %rdi
callq 0xe7b9c
movq %rax, 0x60(%rbx)
movq %rax, 0x58(%rbx)
movq %rbp, %rdi
callq 0xf6567
testb %al, %al
je 0x1c88d6
shrq 0x58(%rbx)
movq 0x88(%rsp), %rdx
movq $0x0, 0x68(%rbx)
cmpb $0x0, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
je 0x1c8914
movq 0x80(%rsp), %rsi
movq %rbp, %rdi
callq 0x1dadf4
movq 0x10(%rsp), %rbx
movq %rax, 0x68(%rbx)
testq %rax, %rax
je 0x1c9017
movq %r12, 0x20(%rbx)
movq %r15, 0x28(%rbx)
movq %r14, 0x48(%rbx)
cmpq $-0x1, %r14
setne 0x50(%rbx)
movl $0x0, 0x1c(%rbx)
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1c894b
movq 0x38(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movq 0x10(%rsp), %rbx
movb $0x0, 0x40(%rbx)
leaq 0x1e56ce(%rip), %rsi    # 0x3ae024
movl $0x18, %edi
movl $0x61, %edx
callq 0x104226
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x20, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1c935c
movq %rax, (%rbx)
addq $0x20, 0x8(%rbx)
testq %rax, %rax
je 0x1c9343
movq 0x10(%rbx), %rcx
leaq (%rcx,%rcx,2), %rdx
incq %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rdx,8)
movq %rbx, 0x8(%rsp)
movq %rcx, 0x10(%rbx)
movq $-0x1, 0x10(%rax,%rdx,8)
movq 0x28(%rsp), %rdi
callq 0x1a5a46
movq $0x0, 0x20(%rsp)
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x1c9001
movb $0x1, %bl
xorl %r14d, %r14d
xorl %r12d, %r12d
movq $0x0, 0x18(%rsp)
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x28(%rsp), %rdi
cmpb $0x1, 0x40(%rdi)
jne 0x1c8b25
movq (%rdi), %rbp
movl 0xd4(%rbp), %eax
cmpl 0xd0(%rbp), %eax
jb 0x1c8a74
movq 0xd8(%rbp), %rdi
movq 0xe0(%rbp), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0xd0(%rbp)
movq 0xe0(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1c932f
movl $0x0, 0xd4(%rbp)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x28(%rsp), %rdi
je 0x1c904b
movq 0xd8(%rbp), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xd4(%rbp)
movl %eax, %eax
movzbl (%rcx,%rax), %r10d
cmpq $0xff, %r10
jne 0x1c8b77
movq (%rdi), %rbp
movl 0xec(%rbp), %eax
cmpl 0xe8(%rbp), %eax
jb 0x1c8b08
movq 0xf0(%rbp), %rdi
movq 0xf8(%rbp), %rcx
movl $0x10, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0xe8(%rbp)
movq 0xf8(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1c934d
movl $0x0, 0xec(%rbp)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x28(%rsp), %rdi
je 0x1c916a
movq 0xf0(%rbp), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xec(%rbp)
movl %eax, %eax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %r10
jmp 0x1c8b77
movq (%rdi), %rcx
movq 0x20(%rdi), %rax
cmpq 0x10(%rdi), %rax
jae 0x1c9032
movq 0x60(%rcx), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x20(%rdi)
movzbl (%rdx,%rax), %r10d
cmpq $0xff, %r10
jne 0x1c8b77
movq 0x68(%rcx), %rcx
movq 0x28(%rdi), %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
cmpq %rax, (%rcx,%rsi)
jne 0x1c9334
addq %rsi, %rcx
incq %rdx
movq %rdx, 0x28(%rdi)
movq 0x8(%rcx), %r10
movq (%rdi), %rbp
cmpb $0x1, 0x40(%rdi)
movq %r10, 0x30(%rsp)
jne 0x1c8c1d
movq 0xb0(%rbp), %rcx
testq %rcx, %rcx
je 0x1c8c36
movl 0xa4(%rbp), %eax
cmpl 0xa0(%rbp), %eax
jb 0x1c8cde
movq 0xa8(%rbp), %rdi
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0xa0(%rbp)
movq 0xb0(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1c8cba
movq 0x88(%rsp), %rdi
leaq 0x191003(%rip), %rsi    # 0x359bf1
leaq 0x219d56(%rip), %rdx    # 0x3e294b
xorl %eax, %eax
callq 0xfcb67
movl 0xa4(%rbp), %eax
movb $0x1, %cl
movq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r10
jmp 0x1c8cde
movq 0x58(%rbp), %rax
movq 0x18(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rdi)
movq (%rax,%rcx,8), %r15
jmp 0x1c8d30
movl 0x8c(%rbp), %eax
cmpl 0x88(%rbp), %eax
jb 0x1c8d1a
movq 0x90(%rbp), %rdi
movq 0x98(%rbp), %rcx
movl $0x4, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0x88(%rbp)
movq 0x98(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1c8cf6
movq 0x88(%rsp), %rdi
leaq 0x190f63(%rip), %rsi    # 0x359bf1
leaq 0x191366(%rip), %rdx    # 0x359ffb
xorl %eax, %eax
callq 0xfcb67
movl 0x8c(%rbp), %eax
movb $0x1, %cl
movq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r10
jmp 0x1c8d1a
movl $0x0, 0xa4(%rbp)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r10
je 0x1c9204
movq 0xa8(%rbp), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xa4(%rbp)
movl %eax, %eax
movq (%rcx,%rax,8), %r15
jmp 0x1c8d30
movl $0x0, 0x8c(%rbp)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r10
je 0x1c9204
movq 0x90(%rbp), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x8c(%rbp)
movl %eax, %eax
movl (%rcx,%rax,4), %r15d
movq 0x10(%r9), %rax
testq %rax, %rax
je 0x1c932a
movq (%r9), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rdi
cmpq %rdi, %r10
ja 0x1c8d7d
movzbl %bl, %eax
testb $0x1, %al
movl %eax, %ebx
movl $0x0, %ecx
cmovnel %ecx, %ebx
testq %rdi, %rdi
cmovnel %eax, %ebx
movq %r15, %rsi
movq %r8, %rdx
callq 0x1c939f
movq 0x30(%rsp), %r10
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
testq %r12, %r12
jne 0x1c9325
testb $0x1, 0x18(%rsp)
jne 0x1c9021
movq (%r9), %rbp
movq 0x10(%r9), %rsi
leaq (%rsi,%rsi,2), %rax
movq -0x18(%rbp,%rax,8), %rdi
cmpq %rdi, %r10
jae 0x1c8f48
movq %r15, 0x40(%rsp)
movl %ebx, %r15d
movq %rbp, %r12
decq %rsi
movq %rsi, 0x10(%r9)
leaq (%rsi,%rsi,2), %rbx
movq %r14, %r13
movq %r14, 0x10(%rbp,%rbx,8)
movq %r8, %rsi
movq %r8, %r14
callq 0x1c9497
movq 0x30(%rsp), %r10
movq 0x8(%rsp), %r9
movq (%r9), %rbp
movq 0x10(%r9), %rsi
leaq (%rsi,%rsi,2), %rax
movq -0x18(%rbp,%rax,8), %rdi
cmpq %rdi, %r10
jbe 0x1c8dfe
leaq (%r12,%rbx,8), %r12
movq %r14, %r8
movq %r13, %r14
jmp 0x1c8e78
movzbl %r15b, %eax
testb $0x1, %al
movl %eax, %r15d
movl $0x0, %ecx
cmovnel %ecx, %r15d
testq %rdi, %rdi
cmovnel %eax, %r15d
movq 0x20(%r14), %rax
decq %rax
cmpq %rdi, %rax
movq %r14, %r8
jbe 0x1c8e6c
movl $0x0, 0x1c(%r8)
movl 0x18(%r8), %edx
testq %rdx, %rdx
movq %r13, %r14
je 0x1c8e65
movq 0x38(%r8), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movq 0x30(%rsp), %r10
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x10(%r9), %rsi
leaq (%rsi,%rsi,2), %rax
movq -0x18(%rbp,%rax,8), %rdi
movb $0x0, 0x40(%r8)
jmp 0x1c8e75
movq %r13, %r14
jne 0x1c8e75
incl 0x1c(%r8)
xorl %r12d, %r12d
cmpq %rdi, %r10
jb 0x1c8db2
jbe 0x1c8f4f
testq %r12, %r12
movq 0x28(%rsp), %rdi
movl %r15d, %ebx
je 0x1c8f5c
movq 0x8(%r12), %r12
cmpq 0x8(%r9), %rsi
jb 0x1c8ee1
jne 0x1c9352
leaq 0x20(%rsi), %rdx
movq %rbp, %rdi
callq 0x1c935c
movq 0x8(%rsp), %r9
movq %rax, (%r9)
addq $0x20, 0x8(%r9)
testq %rax, %rax
je 0x1c9357
movq %rax, %rbp
movq 0x10(%r9), %rsi
movq 0x10(%rsp), %r8
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %r10
leaq (%rsi,%rsi,2), %rax
movq %r10, (%rbp,%rax,8)
movq %r12, 0x8(%rbp,%rax,8)
incq %rsi
movq %rsi, 0x10(%r9)
movq $-0x1, 0x10(%rbp,%rax,8)
movq 0x20(%r8), %rax
decq %rax
cmpq %r10, %rax
jbe 0x1c8fe0
movl $0x0, 0x1c(%r8)
movl 0x18(%r8), %edx
testq %rdx, %rdx
je 0x1c8f3e
movq 0x38(%r8), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movb $0x0, 0x40(%r8)
jmp 0x1c8fe6
ja 0x1c8f61
jmp 0x1c8fd6
movq 0x28(%rsp), %rdi
movl %r15d, %ebx
jmp 0x1c8fe9
movq 0x40(%rsp), %r15
cmpq 0x8(%r9), %rsi
jb 0x1c8fa0
jne 0x1c9339
leaq 0x20(%rsi), %rdx
movq %rbp, %rdi
callq 0x1c935c
movq 0x8(%rsp), %r9
movq %rax, (%r9)
addq $0x20, 0x8(%r9)
testq %rax, %rax
je 0x1c933e
movq %rax, %rbp
movq 0x10(%r9), %rsi
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %r10
leaq (%rsi,%rsi,2), %rax
movq %r10, (%rbp,%rax,8)
movq %r14, 0x8(%rbp,%rax,8)
incq %rsi
movq %rsi, 0x10(%r9)
movq $-0x1, 0x10(%rbp,%rax,8)
movq %r10, %rdi
movq %r15, %rsi
movq %r8, %rdx
callq 0x1c939f
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
xorl %r12d, %r12d
movq 0x28(%rsp), %rdi
jmp 0x1c8fe9
jne 0x1c8fe6
incl 0x1c(%r8)
xorl %r12d, %r12d
incq %r14
cmpq 0x38(%rsp), %r14
jne 0x1c89fa
movq 0x38(%rsp), %r14
jmp 0x1c922f
xorl %r14d, %r14d
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %r9
jmp 0x1c922f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1c92db
incq %r14
movq $0x0, 0x20(%rsp)
jmp 0x1c922f
movq 0x58(%rcx), %rax
movq 0x18(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rdi)
movq (%rax,%rcx,8), %rax
jmp 0x1c91fd
movq (%rdi), %r12
movq 0xb0(%r12), %rcx
testq %rcx, %rcx
je 0x1c90e2
movl 0xa4(%r12), %eax
cmpl 0xa0(%r12), %eax
jb 0x1c91b2
movq 0xa8(%r12), %rdi
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0xa0(%r12)
movq 0xb0(%r12), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1c919a
leaq 0x190b3e(%rip), %rsi    # 0x359bf1
leaq 0x219891(%rip), %rdx    # 0x3e294b
movq 0x88(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movl 0xa4(%r12), %eax
movb $0x1, %cl
movq %rcx, 0x18(%rsp)
movq 0x8(%rsp), %r9
jmp 0x1c91b2
movl 0x8c(%r12), %eax
cmpl 0x88(%r12), %eax
jb 0x1c91e5
movq 0x90(%r12), %rdi
movq 0x98(%r12), %rcx
movl $0x4, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r15
movl %r15d, 0x88(%r12)
movq 0x98(%r12), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1c91cd
leaq 0x190ab3(%rip), %rsi    # 0x359bf1
leaq 0x190eb6(%rip), %rdx    # 0x359ffb
movq 0x88(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movl 0x8c(%r12), %eax
movb $0x1, %cl
movq %rcx, 0x18(%rsp)
movq 0x8(%rsp), %r9
jmp 0x1c91e5
leaq 0x1909d4(%rip), %rsi    # 0x359b45
leaq 0x1e4eac(%rip), %rdx    # 0x3ae024
movq $0x0, 0x20(%rsp)
movq 0x88(%rsp), %rdi
movl $0x9d, %ecx
xorl %eax, %eax
callq 0xfcb67
jmp 0x1c9223
movl $0x0, 0xa4(%r12)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x8(%rsp), %r9
je 0x1c9204
movq 0xa8(%r12), %rcx
leal 0x1(%rax), %edx
movl %edx, 0xa4(%r12)
movl %eax, %eax
movq (%rcx,%rax,8), %rax
jmp 0x1c91fd
movl $0x0, 0x8c(%r12)
xorl %eax, %eax
testl %r15d, %r15d
movq 0x8(%rsp), %r9
je 0x1c9204
movq 0x90(%r12), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x8c(%r12)
movl %eax, %eax
movl (%rcx,%rax,4), %eax
movq %rax, 0x20(%rsp)
jmp 0x1c922f
leaq 0x190dd8(%rip), %rsi    # 0x359fe3
movq $0x0, 0x20(%rsp)
movq 0x88(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movq 0x8(%rsp), %r9
movb $0x1, %al
movq %rax, 0x18(%rsp)
movq 0x10(%r9), %rax
testq %rax, %rax
je 0x1c9348
movq (%r9), %rdi
testb $0x1, 0x18(%rsp)
jne 0x1c9291
leaq (%rax,%rax,2), %rax
movq -0x18(%rdi,%rax,8), %rax
testq %rax, %rax
je 0x1c9291
movq %rax, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x1c939f
movq %r14, %rdx
movq 0x8(%rsp), %r14
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rdx, -0x8(%rax,%rcx,8)
movq -0x18(%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x1c9497
movq (%r14), %rdi
leaq 0x1e4d8c(%rip), %r15    # 0x3ae024
movq %r15, %rsi
movl $0x72, %edx
callq 0x1045eb
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x73, %edx
callq 0x1045eb
movq 0x18(%rsp), %rax
andb $0x1, %al
movzbl %al, %ebp
negl %ebp
movq 0x10(%rsp), %rbx
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x1c92db
callq 0x1daf23
movq 0x10(%rsp), %rbx
movq 0x30(%rbx), %rdi
leaq 0x1e4da1(%rip), %r14    # 0x3ae087
movq %r14, %rsi
movl $0x125, %edx            # imm = 0x125
callq 0x1045eb
movq 0x38(%rbx), %rdi
movq %r14, %rsi
movl $0x126, %edx            # imm = 0x126
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x127, %edx            # imm = 0x127
callq 0x1045eb
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6a75d
callq 0x6a87a
callq 0x6a70d
callq 0x6a6d4
callq 0x6a808
callq 0x6a841
callq 0x6a8ec
callq 0x6a8b3
callq 0x6a735
callq 0x6a796
callq 0x6a7cf