// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xa8, %rsp
movl %r8d, 0x4c(%rsp)
movq %rcx, %rax
movl 0x4c(%rsp), %ecx
movq %rax, 0x50(%rsp)
movq %rdx, %rax
movq 0x50(%rsp), %rdx
movq %rax, 0x58(%rsp)
movq %rsi, %rax
movq 0x58(%rsp), %rsi
movq %rax, 0x60(%rsp)
movl %edi, %r8d
movq 0x60(%rsp), %rdi
movb %r9b, %al
movq 0xd0(%rsp), %r9
movq 0xc8(%rsp), %r9
movq 0xc0(%rsp), %r9
movl 0xb8(%rsp), %r9d
movq 0xb0(%rsp), %r9
andb $0x1, %r8b
movb %r8b, 0xa7(%rsp)
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
andb $0x1, %cl
movb %cl, 0x87(%rsp)
andb $0x1, %al
movb %al, 0x86(%rsp)
movl $0x1, %edi
movl $0x100, %esi            # imm = 0x100
leaq 0x2f8e66(%rip), %rdx    # 0x581103
movl $0x273, %ecx            # imm = 0x273
callq 0xe83c0
movq %rax, 0x78(%rsp)
movq 0xc0(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xc8(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xd0(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xb0(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x98(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x98(%rsp), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x98(%rsp), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x28832d
jmp 0x288340
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
shrq %rax
movq %rax, 0x40(%rsp)
jmp 0x288349
xorl %eax, %eax
movq %rax, 0x40(%rsp)
jmp 0x288349
movq 0x40(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x98(%rsp), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x90(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x20(%rax)
movb 0x87(%rsp), %cl
movq 0x78(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x28(%rax)
cmpq $0x0, 0x88(%rsp)
jne 0x2883ac
movq $-0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x2883b9
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0xa0(%rax)
testb $0x1, 0xa7(%rsp)
je 0x2883f6
movq 0x98(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb09f0
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x48(%rax)
jmp 0x2884f9
callq 0x11d4a0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x70(%rsp), %rdi
movl $0x2e, %esi
callq 0x11da70
movq 0x70(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0x11de00
movq 0x70(%rsp), %rdi
leaq 0x29b42d(%rip), %rsi    # 0x523866
callq 0x11d550
movq 0xb0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
callq 0x11dee0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
leaq 0x29e739(%rip), %rdx    # 0x526b9d
leaq 0x2f8c98(%rip), %rcx    # 0x581103
movl $0x28d, %r8d            # imm = 0x28D
xorl %eax, %eax
movl %eax, %r9d
callq 0xd92c0
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0xe0(%rax)
movq 0x98(%rsp), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x28849d
jmp 0x2884b0
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
shrq %rax
movq %rax, 0x28(%rsp)
jmp 0x2884be
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0xe0(%rax), %rsi
callq 0x275070
movq 0x70(%rsp), %rdi
callq 0x11f560
movq 0x78(%rsp), %rax
cmpq $0x0, 0xe0(%rax)
jne 0x2884f7
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x19890
jmp 0x2884f9
movl 0xb8(%rsp), %ecx
movq 0x78(%rsp), %rax
movl %ecx, 0xf8(%rax)
cmpl $0x0, 0xb8(%rsp)
jne 0x2886f3
movq 0xc8(%rsp), %rdi
movq 0xb0(%rsp), %rdx
leaq 0x29b2ec(%rip), %rsi    # 0x52381c
movb $0x0, %al
callq 0xe7cd0
movq 0x78(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x288559
movq 0xc8(%rsp), %rdi
leaq 0x2f8d0d(%rip), %rsi    # 0x58125f
movb $0x0, %al
callq 0xe7cd0
movq 0xc0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jbe 0x288582
movq 0x78(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x288590
movq 0x78(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x29b889(%rip), %rsi    # 0x523e2a
movb $0x0, %al
callq 0xe7cd0
movq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x2885c8
jmp 0x2885e8
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x78(%rsp), %rcx
subq 0x50(%rcx), %rax
addq $0x1, %rax
shrq %rax
movq %rax, 0x8(%rsp)
jmp 0x288603
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x78(%rsp), %rcx
subq 0x50(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x29b840(%rip), %rsi    # 0x523e54
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0xa7(%rsp)
je 0x288646
movq 0xc8(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x48(%rax), %rdx
leaq 0x29b83e(%rip), %rsi    # 0x523e7b
movb $0x0, %al
callq 0xe7cd0
jmp 0x28865c
movq 0xc8(%rsp), %rdi
leaq 0x29b838(%rip), %rsi    # 0x523e8d
movb $0x0, %al
callq 0xe7cd0
movq 0xc8(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdx
leaq 0x2f8bfe(%rip), %rsi    # 0x581272
movb $0x0, %al
callq 0xe7cd0
cmpq $0x0, 0x88(%rsp)
jne 0x28869e
movq 0xc8(%rsp), %rdi
leaq 0x2f8bf8(%rip), %rsi    # 0x58128d
movb $0x0, %al
callq 0xe7cd0
jmp 0x2886c0
movq 0xc8(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0xa0(%rax), %rdx
leaq 0x2f8bf0(%rip), %rsi    # 0x5812a9
movb $0x0, %al
callq 0xe7cd0
movq 0xc8(%rsp), %rdi
movq 0x78(%rsp), %rax
movb 0x28(%rax), %cl
leaq 0x2d068c(%rip), %rdx    # 0x558d63
leaq 0x32c1cb(%rip), %rax    # 0x5b48a9
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x2f8bd3(%rip), %rsi    # 0x5812bf
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0x86(%rsp)
je 0x288725
movq 0x78(%rsp), %rax
leaq 0x3b07(%rip), %rcx      # 0x28c210
movq %rcx, 0xb0(%rax)
movq 0x78(%rsp), %rax
movq $0x0, 0xb8(%rax)
jmp 0x288845
callq 0x11d4a0
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movl $0x2e, %esi
callq 0x11da70
movq 0x68(%rsp), %rdi
movl 0xb8(%rsp), %esi
callq 0x11de00
movq 0x68(%rsp), %rdi
leaq 0x29c875(%rip), %rsi    # 0x524fd0
callq 0x11d550
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rsi
leaq 0x29e419(%rip), %rdx    # 0x526b9d
leaq 0x2f8978(%rip), %rcx    # 0x581103
movl $0x2be, %r8d            # imm = 0x2BE
xorl %eax, %eax
movl %eax, %r9d
callq 0xd92c0
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x68(%rsp), %rdi
callq 0x11f560
movq 0x78(%rsp), %rax
cmpq $0x0, 0xb8(%rax)
jne 0x2887cd
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x19890
movq 0x78(%rsp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x58(%rax)
ja 0x2887f9
movq 0x78(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x28881f
movq 0x78(%rsp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x50(%rax)
jbe 0x28881f
movq 0x78(%rsp), %rax
leaq 0x322b(%rip), %rcx      # 0x28ba30
movq %rcx, 0xb0(%rax)
movq 0x78(%rsp), %rax
movq 0xb8(%rax), %rdi
callq 0x28ba10
jmp 0x288843
movq 0x78(%rsp), %rax
leaq 0x3075(%rip), %rcx      # 0x28b8a0
movq %rcx, 0xb0(%rax)
movq 0x78(%rsp), %rax
movq 0xb8(%rax), %rdi
callq 0x28b880
jmp 0x288845
movq 0x78(%rsp), %rax
movq $0x0, 0xc0(%rax)
movq 0x78(%rsp), %rdi
callq 0x28b2f0
movq 0x78(%rsp), %rdi
callq 0x28b340
callq 0x4b2e80
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x78(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)