// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, 0x10(%rsp)
leaq 0x1e5be4(%rip), %r13    # 0x3b7687
movl $0x78, %edi
movq %r13, %rsi
movl $0x105, %edx            # imm = 0x105
callq 0x1092b2
movq %rax, %rbx
movq %rbp, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3713
movl %eax, 0x18(%rbx)
movl %eax, %edi
imulq %r12, %rdi
shlq $0x3, %rdi
movq %r13, %rsi
movl $0x107, %edx            # imm = 0x107
callq 0x1092b2
movq %rax, 0x30(%rbx)
movl 0x18(%rbx), %edi
shlq $0x3, %rdi
movq %r13, %rsi
movl $0x108, %edx            # imm = 0x108
callq 0x1092b2
movq %rax, 0x38(%rbx)
movq %rbp, 0x10(%rbx)
movq %rbp, %rdi
callq 0xec1d8
movq %rax, 0x60(%rbx)
movq %rax, 0x58(%rbx)
movq %rbp, %rdi
callq 0xfac80
testb %al, %al
je 0x1d1b22
shrq 0x58(%rbx)
movq 0x88(%rsp), %rdx
movq $0x0, 0x68(%rbx)
cmpb $0x0, 0x8(%rsp)
je 0x1d1b56
movq 0x80(%rsp), %rsi
movq %rbp, %rdi
callq 0x1e461c
movq %rax, 0x68(%rbx)
testq %rax, %rax
je 0x1d255e
movq %r14, 0x20(%rbx)
movq %r12, 0x28(%rbx)
movq %r15, 0x48(%rbx)
cmpq $-0x1, %r15
setne 0x50(%rbx)
movl $0x0, 0x1c(%rbx)
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1d1b88
movq 0x38(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movb $0x0, 0x40(%rbx)
leaq 0x1e5a91(%rip), %rsi    # 0x3b7624
movl $0x18, %edi
movl $0x61, %edx
callq 0x1092b2
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x8(%rax), %rsi
testq %rsi, %rsi
movq 0x10(%rsp), %r13
jne 0x1d1bdb
jne 0x1d258d
movq (%r15), %rdi
leaq 0x20(%rsi), %rdx
callq 0x1d25a1
movq %rax, (%r15)
addq $0x20, 0x8(%r15)
movq (%r15), %rax
testq %rax, %rax
je 0x1d2574
movq 0x10(%r15), %rcx
leaq (%rcx,%rcx,2), %rdx
incq %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rdx,8)
movq %rcx, 0x10(%r15)
movq $-0x1, 0x10(%rax,%rdx,8)
movq %r13, %rdi
callq 0x1ae599
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x1d246c
movb $0x1, %r14b
movq $0x0, 0x20(%rsp)
xorl %r8d, %r8d
movq $0x0, 0x18(%rsp)
xorl %edx, %edx
movq $0x0, 0x8(%rsp)
movq %rax, 0x28(%rsp)
cmpb $0x1, 0x40(%r13)
movq %r8, (%rsp)
movq %rdx, 0x30(%rsp)
jne 0x1d1d72
movq (%r13), %rbp
movl 0xd4(%rbp), %eax
cmpl 0xd0(%rbp), %eax
jb 0x1d1cc1
movq 0xd8(%rbp), %rdi
movq 0xe0(%rbp), %rcx
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r13
movl %r13d, 0xd0(%rbp)
movq 0xe0(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1d256f
movl $0x0, 0xd4(%rbp)
testl %r13d, %r13d
movq 0x10(%rsp), %r13
movq (%rsp), %r8
je 0x1d1f48
movq 0xd8(%rbp), %rax
movl 0xd4(%rbp), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xd4(%rbp)
movb (%rax,%rcx), %al
movq %rax, 0x28(%rsp)
xorl %eax, %eax
testb %al, %al
je 0x1d1ded
movq (%r13), %r13
movq 0xb0(%r13), %rcx
testq %rcx, %rcx
je 0x1d1e05
movl 0xa4(%r13), %eax
cmpl 0xa0(%r13), %eax
jb 0x1d1f70
movq 0xa8(%r13), %rdi
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0xa0(%r13)
movq 0xb0(%r13), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1d1f59
movq 0x88(%rsp), %rdi
leaq 0x190efa(%rip), %rsi    # 0x362c4e
leaq 0x21a314(%rip), %rdx    # 0x3ec06f
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq (%rsp), %r8
jmp 0x1d1f70
movq (%r13), %rcx
movq 0x20(%r13), %rax
cmpq 0x10(%r13), %rax
jae 0x1d1dcd
movq 0x60(%rcx), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x20(%r13)
movzbl (%rdx,%rax), %r12d
cmpq $0xff, %r12
movq %r12, 0x28(%rsp)
jne 0x1d1dc6
movq 0x68(%rcx), %rcx
movq 0x28(%r13), %rdx
movq %rdx, %rsi
shlq $0x4, %rsi
cmpq %rax, (%rcx,%rsi)
jne 0x1d2583
addq %rsi, %rcx
incq %rdx
movq %rdx, 0x28(%r13)
movq 0x8(%rcx), %r12
movb $0x1, %al
jmp 0x1d1fde
movq 0x58(%rcx), %rax
movq 0x18(%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r13)
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
jmp 0x1d1fde
movq 0x28(%rsp), %rax
cmpb $-0x1, %al
je 0x1d1e81
movzbl %al, %r12d
xorl %eax, %eax
jmp 0x1d1fd9
movl 0x8c(%r13), %eax
cmpl 0x88(%r13), %eax
jb 0x1d1fa5
movq 0x90(%r13), %rdi
movq 0x98(%r13), %rcx
movl $0x4, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0x88(%r13)
movq 0x98(%r13), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1d1f8e
movq 0x88(%rsp), %rdi
leaq 0x190deb(%rip), %rsi    # 0x362c4e
leaq 0x191205(%rip), %rdx    # 0x36306f
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq (%rsp), %r8
jmp 0x1d1fa5
movq (%r13), %rbp
movl 0xec(%rbp), %eax
cmpl 0xe8(%rbp), %eax
jb 0x1d1eea
movq 0xf0(%rbp), %rdi
movq 0xf8(%rbp), %rcx
movl $0x10, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %r13
movl %r13d, 0xe8(%rbp)
movq 0xf8(%rbp), %rdi
callq 0x17f00
testl %eax, %eax
jne 0x1d2597
movl $0x0, 0xec(%rbp)
testl %r13d, %r13d
movq 0x10(%rsp), %r13
movq (%rsp), %r8
je 0x1d2465
movq 0xf0(%rbp), %rax
movl 0xec(%rbp), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xec(%rbp)
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, 0x38(%rsp)
xorl %ecx, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x1d1f4f
movq 0x88(%rsp), %rdi
leaq 0x190c7d(%rip), %rsi    # 0x362ba2
leaq 0x1e56f8(%rip), %rdx    # 0x3b7624
movl $0x9d, %ecx
xorl %eax, %eax
callq 0x1019cf
movq (%rsp), %r8
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x1d1fd4
movb $0x1, %al
jmp 0x1d1ce1
movq 0x38(%rsp), %r12
jmp 0x1d1fd9
movl $0x0, 0xa4(%r13)
testl %ebp, %ebp
movq (%rsp), %r8
je 0x1d2438
movq 0xa8(%r13), %rax
movl 0xa4(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xa4(%r13)
movq (%rax,%rcx,8), %rax
jmp 0x1d1fc0
movl $0x0, 0x8c(%r13)
testl %ebp, %ebp
movq (%rsp), %r8
je 0x1d2438
movq 0x90(%r13), %rax
movl 0x8c(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8c(%r13)
movl (%rax,%rcx,4), %eax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
movb $0x1, %bpl
movq 0x10(%rsp), %r13
testb %bpl, %bpl
je 0x1d1fd9
movl $0x6, %eax
testl %eax, %eax
sete %al
testb %al, %al
je 0x1d2481
movq %r13, %rsi
movq (%r13), %r13
cmpb $0x1, 0x40(%rsi)
jne 0x1d207c
movq 0xb0(%r13), %rcx
testq %rcx, %rcx
je 0x1d209d
movl 0xa4(%r13), %eax
cmpl 0xa0(%r13), %eax
jb 0x1d2129
movq 0xa8(%r13), %rdi
movl $0x8, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0xa0(%r13)
movq 0xb0(%r13), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1d2112
movq 0x88(%rsp), %rdi
leaq 0x190bf0(%rip), %rsi    # 0x362c4e
leaq 0x21a00a(%rip), %rdx    # 0x3ec06f
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq (%rsp), %r8
jmp 0x1d2129
movq 0x58(%r13), %rax
movq 0x18(%rsi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%rsi)
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq %rsi, %r13
jmp 0x1d218f
movl 0x8c(%r13), %eax
cmpl 0x88(%r13), %eax
jb 0x1d215e
movq 0x90(%r13), %rdi
movq 0x98(%r13), %rcx
movl $0x4, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x17b40
movq %rax, %rbp
movl %ebp, 0x88(%r13)
movq 0x98(%r13), %rdi
callq 0x17f00
testl %eax, %eax
je 0x1d2147
movq 0x88(%rsp), %rdi
leaq 0x190b57(%rip), %rsi    # 0x362c4e
leaq 0x190f71(%rip), %rdx    # 0x36306f
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq (%rsp), %r8
jmp 0x1d215e
movl $0x0, 0xa4(%r13)
testl %ebp, %ebp
movq (%rsp), %r8
je 0x1d2410
movq 0xa8(%r13), %rax
movl 0xa4(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xa4(%r13)
movq (%rax,%rcx,8), %rax
jmp 0x1d2179
movl $0x0, 0x8c(%r13)
testl %ebp, %ebp
movq (%rsp), %r8
je 0x1d2410
movq 0x90(%r13), %rax
movl 0x8c(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x8c(%r13)
movl (%rax,%rcx,4), %eax
movq %rax, 0x20(%rsp)
movb $0x1, %bpl
movq 0x10(%rsp), %r13
testb %bpl, %bpl
je 0x1d2481
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1d256a
movq (%r15), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rdi
cmpq %rdi, %r12
ja 0x1d21d7
movzbl %r14b, %eax
testb $0x1, %al
movl %eax, %r14d
movl $0x0, %ecx
cmovnel %ecx, %r14d
testq %rdi, %rdi
cmovnel %eax, %r14d
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1d25e4
movq (%rsp), %r8
movq 0x30(%rsp), %rax
testq %rax, %rax
jne 0x1d2565
testb $0x1, 0x8(%rsp)
je 0x1d21f3
xorl %edx, %edx
jmp 0x1d23e7
movq (%r15), %r13
movq 0x10(%r15), %rax
leaq (%rax,%rax,2), %rcx
movq -0x18(%r13,%rcx,8), %rcx
cmpq %rcx, %r12
jae 0x1d22cc
decq %rax
movq %rax, 0x10(%r15)
leaq (%rax,%rax,2), %rbp
movq %r8, 0x10(%r13,%rbp,8)
movq (%r13,%rbp,8), %rdi
movq %rbx, %rsi
callq 0x1d26d3
movq (%r15), %rax
movq 0x10(%r15), %rcx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rax,%rcx,8), %rax
cmpq %rax, %r12
jbe 0x1d224b
leaq (,%rbp,8), %rdx
addq %r13, %rdx
jmp 0x1d2295
movzbl %r14b, %ecx
testb $0x1, %cl
movl %ecx, %r14d
movl $0x0, %edx
cmovnel %edx, %r14d
testq %rax, %rax
cmovnel %ecx, %r14d
movq 0x20(%rbx), %rcx
decq %rcx
cmpq %rax, %rcx
jbe 0x1d229b
movl $0x0, 0x1c(%rbx)
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1d228f
movq 0x38(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movb $0x0, 0x40(%rbx)
xorl %edx, %edx
movq (%rsp), %r8
jmp 0x1d22a6
movq (%rsp), %r8
jne 0x1d22a4
incl 0x1c(%rbx)
xorl %edx, %edx
testb $0x1, 0x8(%rsp)
jne 0x1d23e2
movq (%r15), %r13
movq 0x10(%r15), %rax
leaq (%rax,%rax,2), %rcx
movq -0x18(%r13,%rcx,8), %rcx
cmpq %rcx, %r12
jb 0x1d220c
jmp 0x1d22ce
xorl %edx, %edx
cmpq %rcx, %r12
jbe 0x1d23e2
testq %rdx, %rdx
je 0x1d2378
movq 0x8(%rdx), %rbp
movq 0x8(%r15), %rsi
cmpq %rsi, %rax
jb 0x1d230b
jne 0x1d2592
leaq 0x20(%rsi), %rdx
movq %r13, %rdi
callq 0x1d25a1
movq %rax, (%r15)
addq $0x20, 0x8(%r15)
movq (%rsp), %r8
movq (%r15), %rax
testq %rax, %rax
je 0x1d257e
movq 0x10(%r15), %rcx
leaq (%rcx,%rcx,2), %rdx
movq %r12, (%rax,%rdx,8)
movq %rbp, 0x8(%rax,%rdx,8)
incq %rcx
movq %rcx, 0x10(%r15)
movq $-0x1, 0x10(%rax,%rdx,8)
movq 0x20(%rbx), %rax
decq %rax
cmpq %r12, %rax
movq 0x10(%rsp), %r13
jbe 0x1d2402
movl $0x0, 0x1c(%rbx)
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1d236f
movq 0x38(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x173a0
movq (%rsp), %r8
movb $0x0, 0x40(%rbx)
jmp 0x1d21ec
movq 0x8(%r15), %rsi
cmpq %rsi, %rax
jb 0x1d239f
jne 0x1d259c
leaq 0x20(%rsi), %rdx
movq %r13, %rdi
callq 0x1d25a1
movq %rax, (%r15)
addq $0x20, 0x8(%r15)
movq (%rsp), %r8
movq (%r15), %rax
testq %rax, %rax
je 0x1d2588
movq 0x10(%r15), %rcx
leaq (%rcx,%rcx,2), %rdx
movq %r12, (%rax,%rdx,8)
movq %r8, 0x8(%rax,%rdx,8)
incq %rcx
movq %rcx, 0x10(%r15)
movq $-0x1, 0x10(%rax,%rdx,8)
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x1d25e4
movq (%rsp), %r8
xorl %edx, %edx
movq 0x10(%rsp), %r13
incq %r8
testb $0x1, 0x8(%rsp)
jne 0x1d2481
cmpq 0x40(%rsp), %r8
jb 0x1d1c44
jmp 0x1d2481
jne 0x1d21ec
incl 0x1c(%rbx)
jmp 0x1d21ec
xorl %ebp, %ebp
movq 0x88(%rsp), %rdi
leaq 0x190c36(%rip), %rsi    # 0x363057
xorl %eax, %eax
callq 0x1019cf
movq (%rsp), %r8
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x1d2181
xorl %ebp, %ebp
movq 0x88(%rsp), %rdi
leaq 0x190c0e(%rip), %rsi    # 0x363057
xorl %eax, %eax
callq 0x1019cf
movq (%rsp), %r8
movb $0x1, %al
movq %rax, 0x8(%rsp)
movl $0x6, %eax
jmp 0x1d1fca
movb $0x1, %cl
jmp 0x1d1f10
xorl %r8d, %r8d
movq $0x0, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1d2579
testb $0x1, 0x8(%rsp)
jne 0x1d24d3
movq (%r15), %rcx
leaq (%rax,%rax,2), %rax
movq -0x18(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x1d24d3
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
movq %r8, %r14
callq 0x1d25e4
movq (%r15), %rax
movq 0x10(%r15), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %r14, -0x8(%rax,%rcx,8)
movq -0x18(%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x1d26d3
movq (%r15), %rdi
leaq 0x1e5147(%rip), %r14    # 0x3b7624
movq %r14, %rsi
movl $0x72, %edx
callq 0x109670
movq %r15, %rdi
movq %r14, %rsi
movl $0x73, %edx
callq 0x109670
movq 0x8(%rsp), %rax
andb $0x1, %al
movzbl %al, %ebp
negl %ebp
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x1d2514
callq 0x1e474b
movq 0x30(%rbx), %rdi
leaq 0x1e5168(%rip), %r14    # 0x3b7687
movq %r14, %rsi
movl $0x125, %edx            # imm = 0x125
callq 0x109670
movq 0x38(%rbx), %rdi
movq %r14, %rsi
movl $0x126, %edx            # imm = 0x126
callq 0x109670
movq %rbx, %rdi
movq %r14, %rsi
movl $0x127, %edx            # imm = 0x127
callq 0x109670
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1d2506
callq 0x6c070
callq 0x6c18d
callq 0x6c020
callq 0x6c1ff
callq 0x6c1c6
callq 0x6c0e2
callq 0x6bfe7
callq 0x6c154
callq 0x6bfae
callq 0x6c0a9
callq 0x6c048
callq 0x6c11b