// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-spmfind.c
// Function: gt_spmfind_state_new
static GtBUstate_spm *gt_spmfind_state_new(bool eqlen, const GtEncseq *encseq,
    GtUword minmatchlength, GtUword w_maxsize, bool elimtrans,
    bool showspm, const char *indexname, unsigned int threadnum,
    GtLogger *default_logger, GtLogger *verbose_logger, GtError *err)
{
  GtBUstate_spmeq *state = gt_calloc((size_t)1, sizeof (*state));

  state->default_logger = default_logger;
  state->verbose_logger = verbose_logger;
  state->err = err;
  state->indexname = indexname;
  state->encseq = encseq;
  state->nofreads = gt_encseq_num_of_sequences(encseq);
  state->first_revcompl = gt_encseq_is_mirrored(encseq) ?
    state->nofreads >> 1 : 0;
  state->totallength = gt_encseq_total_length(encseq);
  state->minmatchlength = minmatchlength;
  state->elimtrans = elimtrans;
  state->w_maxsize = (w_maxsize == 0) ? ULONG_MAX : w_maxsize;\
  if (eqlen)
  {
    state->read_length = gt_encseq_seqlength(encseq, 0);
  }
  else
  {
    GtStr *suffix = gt_str_new();
    state->read_length = 0;
    gt_str_append_char(suffix, '.');
    gt_str_append_uint(suffix, threadnum);
    gt_str_append_cstr(suffix, GT_READJOINER_SUFFIX_CNTLIST);
    state->cntfile = gt_fa_fopen_with_suffix(indexname, gt_str_get(suffix),
        "wb", NULL);
    gt_cntlist_write_bin_header(gt_encseq_is_mirrored(encseq) ?
        state->nofreads >> 1 : state->nofreads, state->cntfile);
    gt_str_delete(suffix);
    if (!state->cntfile)
      exit(-1);
  }
  state->threadnum = threadnum;

  if (threadnum == 0)
  {
    gt_logger_log(verbose_logger, "readset name = %s", indexname);
    if (state->first_revcompl == 0)
      gt_logger_log(verbose_logger, "single strand mode");
    gt_logger_log(default_logger, "number of reads in filtered readset = "GT_WU,
                  state->first_revcompl > 0 ? state->first_revcompl :
                  state->nofreads);
    gt_logger_log(verbose_logger, "total length of filtered readset = "GT_WU"",
        gt_encseq_is_mirrored(encseq) ? (state->totallength -
          state->nofreads + 1) >> 1 : (state->totallength -
            state->nofreads + 1));
    if (eqlen)
      gt_logger_log(verbose_logger, "read length = "GT_WU"",
                    state->read_length); else
      gt_logger_log(verbose_logger, "read length = variable");
    gt_logger_log(verbose_logger, "minimal match length = "GT_WU"",
        state->minmatchlength);
    if (w_maxsize == 0)
      gt_logger_log(verbose_logger, "wset size limit = unlimited");
    else
      gt_logger_log(verbose_logger, "wset size limit = "GT_WU"",
          state->w_maxsize);
    gt_logger_log(verbose_logger, "eliminate transitive SPM = %s",
        state->elimtrans ? "true" : "false");
  }

  if (showspm)
  {
    state->proc = gt_spmproc_show_ascii;
    state->procdata = NULL;
  }
  else
  {
    GtStr *suffix = gt_str_new();
    gt_str_append_char(suffix, '.');
    gt_str_append_uint(suffix, threadnum);
    gt_str_append_cstr(suffix, GT_READJOINER_SUFFIX_SPMLIST);
    /*@ignore@*/
    state->procdata = gt_fa_fopen_with_suffix(indexname, gt_str_get(suffix),
        "wb", NULL);
    /*@end@*/
    gt_str_delete(suffix);
    if (state->procdata == NULL)
      exit(-1);
    if (state->first_revcompl > UINT32_MAX ||
        (state->first_revcompl == 0 && state->nofreads > UINT32_MAX))
    {
      state->proc = gt_spmproc_show_bin64;
      /*@ignore@*/
      gt_spmlist_write_header_bin64((FILE*)state->procdata);
      /*@end@*/
    }
    else
    {
      state->proc = gt_spmproc_show_bin32;
      /*@ignore@*/
      gt_spmlist_write_header_bin32((FILE*)state->procdata);
      /*@end@*/
    }
  }

  state->nofvalidspm = 0;

  initlset_spm(state);
  initwset_spm(state);

  state->stack = (void *) gt_GtArrayGtBUItvinfo_new();

#ifdef GT_READJOINER_STATISTICS
  if (threadnum == 0)
    gt_logger_log(state->verbose_logger,
        "spmfind: additional statistics output activated");
  state->initial_l_allocated = state->l_allocated;
  state->initial_w_allocated = state->w_allocated;
  state->w_per_terminal = gt_disc_distri_new();
#endif

  return state;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x10(%rsp)
movl %r8d, 0x14(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbp
movl %edi, 0xc(%rsp)
movq 0x78(%rsp), %r12
movq 0x70(%rsp), %r15
movq 0x60(%rsp), %r13
movq 0x80(%rsp), %r14
leaq 0x1e3585(%rip), %rdx    # 0x3ae51c
movl $0x1, %edi
movl $0x100, %esi            # imm = 0x100
movl $0x273, %ecx            # imm = 0x273
callq 0x10436a
movq %rax, %rbx
movq %r15, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %r13, %r14
movq %r13, 0x30(%rax)
movq %rbp, 0x38(%rax)
movq %rbp, %rdi
callq 0xe7bac
movq %rax, 0x50(%rbx)
movq %rbp, %rdi
callq 0xf6567
testb %al, %al
je 0x1cafe6
movq 0x50(%rbx), %rax
shrq %rax
jmp 0x1cafe8
xorl %eax, %eax
movl 0x68(%rsp), %r12d
movq %rax, 0x58(%rbx)
movq %rbp, %rdi
callq 0xe7b9c
movq %rax, 0x40(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rbx)
xorl %eax, %eax
movq 0x20(%rsp), %r13
cmpq $0x1, %r13
sbbq %rax, %rax
movl 0x14(%rsp), %ecx
movb %cl, 0x28(%rbx)
orq %r13, %rax
movq %rax, 0xa0(%rbx)
cmpb $0x0, 0xc(%rsp)
je 0x1cb044
movq %rbp, %rdi
xorl %esi, %esi
callq 0xeb9d2
movq %rax, 0x48(%rbx)
movq 0x78(%rsp), %r15
jmp 0x1cb0e4
callq 0x11ac6c
movq %rax, %r15
movq $0x0, 0x48(%rbx)
movq %rax, %rdi
movl $0x2e, %esi
callq 0x11af23
movq %r15, %rdi
movl %r12d, %esi
callq 0x11b054
leaq 0x187773(%rip), %rsi    # 0x3527e6
movq %r15, %rdi
callq 0x11acf3
movq %r15, %rdi
callq 0x11b0a1
leaq 0x18aa57(%rip), %rdx    # 0x355ae1
leaq 0x1e348b(%rip), %rcx    # 0x3ae51c
movq %r14, %rdi
movq %rax, %rsi
movl $0x28d, %r8d            # imm = 0x28D
xorl %r9d, %r9d
callq 0xfcf97
movq %rax, 0xe0(%rbx)
movq %rbp, %rdi
callq 0xf6567
movq 0x50(%rbx), %rdi
movq 0xe0(%rbx), %rsi
movl %eax, %ecx
shrq %cl, %rdi
callq 0x1c1f0c
movq %r15, %rdi
callq 0x11bdbf
cmpq $0x0, 0xe0(%rbx)
movq 0x78(%rsp), %r15
je 0x1cb3fe
movl %r12d, 0xf8(%rbx)
testl %r12d, %r12d
jne 0x1cb206
leaq 0x1876a1(%rip), %rsi    # 0x35279c
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x103fe1
movq 0x58(%rbx), %rdx
testq %rdx, %rdx
jne 0x1cb12f
leaq 0x1e3560(%rip), %rsi    # 0x3ae678
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x58(%rbx), %rdx
testq %rdx, %rdx
jne 0x1cb12f
movq 0x50(%rbx), %rdx
leaq 0x187c74(%rip), %rsi    # 0x352daa
movq 0x70(%rsp), %rdi
xorl %eax, %eax
callq 0x103fe1
movq %rbp, %rdi
callq 0xf6567
movq 0x40(%rbx), %rdx
subq 0x50(%rbx), %rdx
incq %rdx
movl %eax, %ecx
shrq %cl, %rdx
leaq 0x187c73(%rip), %rsi    # 0x352dd4
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
cmpb $0x0, 0xc(%rsp)
je 0x1cb189
movq 0x48(%rbx), %rdx
leaq 0x187c7e(%rip), %rsi    # 0x352dfb
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0x1cb19a
leaq 0x187c7d(%rip), %rsi    # 0x352e0d
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
movq 0x20(%rbx), %rdx
leaq 0x1e34e6(%rip), %rsi    # 0x3ae68b
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
testq %r13, %r13
je 0x1cb1ce
movq 0xa0(%rbx), %rdx
leaq 0x1e3500(%rip), %rsi    # 0x3ae6c2
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0x1cb1df
leaq 0x1e34d1(%rip), %rsi    # 0x3ae6a6
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
leaq 0x1d6aef(%rip), %rax    # 0x3a1cd5
leaq 0x1bb3ff(%rip), %rdx    # 0x3865ec
cmpb $0x0, 0x28(%rbx)
cmovneq %rax, %rdx
leaq 0x1e34dc(%rip), %rsi    # 0x3ae6d8
movq %r15, %rdi
xorl %eax, %eax
callq 0x103fe1
cmpb $0x0, 0x10(%rsp)
je 0x1cb22b
leaq 0x196d(%rip), %rax      # 0x1ccb81
movq %rax, 0xb0(%rbx)
movq $0x0, 0xb8(%rbx)
jmp 0x1cb2e6
callq 0x11ac6c
movq %r14, %r15
movq %rax, %r14
movq %rax, %rdi
movl $0x2e, %esi
callq 0x11af23
movq %r14, %rdi
movl %r12d, %esi
callq 0x11b054
leaq 0x188c9a(%rip), %rsi    # 0x353eef
movq %r14, %rdi
callq 0x11acf3
movq %r14, %rdi
callq 0x11b0a1
leaq 0x18a875(%rip), %rdx    # 0x355ae1
leaq 0x1e32a9(%rip), %rcx    # 0x3ae51c
movq %r15, %rdi
movq %rax, %rsi
movl $0x2be, %r8d            # imm = 0x2BE
xorl %r9d, %r9d
callq 0xfcf97
movq %rax, 0xb8(%rbx)
movq %r14, %rdi
callq 0x11bdbf
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x1cb3fe
movq 0x58(%rbx), %rax
movq %rax, %rcx
shrq $0x20, %rcx
je 0x1cb2c8
leaq 0x1485(%rip), %rax      # 0x1cc73f
movq %rax, 0xb0(%rbx)
callq 0x1cc732
jmp 0x1cb2e6
testq %rax, %rax
jne 0x1cb2d3
cmpl $0x0, 0x54(%rbx)
jne 0x1cb2b3
leaq 0x13f3(%rip), %rax      # 0x1cc6cd
movq %rax, 0xb0(%rbx)
callq 0x1cc6c0
xorl %r15d, %r15d
movq %r15, 0xc0(%rbx)
movl $0x400, %r12d           # imm = 0x400
movq %r12, 0x70(%rbx)
leaq 0x1e321b(%rip), %r14    # 0x3ae51c
movl $0x2000, %edi           # imm = 0x2000
movq %r14, %rsi
movl $0xef, %edx
callq 0x104226
movq %rax, 0x60(%rbx)
movq %r15, 0x68(%rbx)
movq %r12, 0x88(%rbx)
movl $0x4000, %edi           # imm = 0x4000
movq %r14, %rsi
movl $0x81, %edx
callq 0x104226
movq %rax, 0x78(%rbx)
movq %r15, 0x80(%rbx)
movq 0x88(%rbx), %rdx
testq %rdx, %rdx
je 0x1cb3e4
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
addq $0x18, %rax
movdqa 0x18d6b0(%rip), %xmm1   # 0x358a20
movdqa 0x18d6b8(%rip), %xmm2   # 0x358a30
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x18d6b8(%rip), %xmm4   # 0x358a40
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x1cb3c1
movq $0x0, -0x10(%rax)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1cb3d6
movq $0x0, (%rax)
paddq %xmm4, %xmm1
addq $0x20, %rax
addq $-0x2, %rcx
jne 0x1cb388
callq 0x30fe38
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x17940