// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/rdj-spmfind.c
// Function: gt_spmfind_state_delete
static void gt_spmfind_state_delete(bool eqlen, GtBUstate_spm *state)
{
  if (state != NULL)
  {
    gt_logger_log(state->verbose_logger, "number of %ssuffix-prefix matches "
        "[thread %u] = "GT_WU"", state->elimtrans ? "irreducible " : "",
        state->threadnum, state->nofvalidspm);
    if (state->elimtrans)
      gt_logger_log(state->verbose_logger, "number of transitive "
          "suffix-prefix matches [thread %u] = "GT_WU"",
          state->threadnum, state->nof_transitive_withrc +
          (state->nof_transitive_other >> 1));
#ifdef GT_READJOINER_STATISTICS
    showstatistics_spm(state);
    gt_disc_distri_delete(state->w_per_terminal);
#endif

    gt_free(state->l_set);
    deletewset_spm(state->w_set, state->w_allocated);
    if (eqlen)
      gt_GtArrayGtBUItvinfo_delete_spmeq(
          (GtArrayGtBUItvinfo_spmeq *)state->stack, state);
    else
    {
      GtStr *path = gt_str_new_cstr(state->indexname);
      gt_str_append_cstr(path, GT_READJOINER_SUFFIX_CNTLIST);

      gt_logger_log(state->verbose_logger, "number of internally contained "
                    "reads [thread %u] = "GT_WU"", state->threadnum,
                    state->nof_contained);

      gt_str_delete(path);
      gt_GtArrayGtBUItvinfo_delete_spmvar(
          (GtArrayGtBUItvinfo_spmvar *)state->stack, state);
      gt_fa_fclose(state->cntfile);
    }
    if (state->procdata != NULL)
      /*@ignore@*/
      gt_fa_fclose((FILE*)state->procdata);
      /*@end@*/
    gt_free(state);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x17c1ae
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x178179(%rip), %rax    # 0x2f426e
leaq 0x1ee474(%rip), %rdx    # 0x36a570
cmpb $0x0, 0x28(%rsi)
cmovneq %rax, %rdx
movl 0xf8(%rsi), %ecx
movq 0x10(%rsi), %rdi
movq 0xc0(%rsi), %r8
leaq 0x1d292a(%rip), %rsi    # 0x34ea46
xorl %eax, %eax
callq 0x92e71
cmpb $0x1, 0x28(%rbx)
jne 0x17c152
movl 0xf8(%rbx), %edx
movq 0x10(%rbx), %rdi
movq 0xd0(%rbx), %rcx
shrq %rcx
addq 0xc8(%rbx), %rcx
leaq 0x1d292f(%rip), %rsi    # 0x34ea7a
xorl %eax, %eax
callq 0x92e71
movq 0x60(%rbx), %rdi
leaq 0x1d270f(%rip), %rsi    # 0x34e86c
movl $0x32a, %edx            # imm = 0x32A
callq 0x936f9
movq 0x78(%rbx), %r14
movq 0x88(%rbx), %r15
leaq 0x8(%r14), %r12
subq $0x1, %r15
jb 0x17c18b
movq (%r12), %rdi
callq 0x195304
addq $0x10, %r12
jmp 0x17c176
leaq 0x1d26da(%rip), %rsi    # 0x34e86c
movq %r14, %rdi
movl $0xe9, %edx
callq 0x936f9
testb %bpl, %bpl
je 0x17c1af
movq (%rbx), %rdi
callq 0x17ba01
jmp 0x17c205
retq
movq 0x30(%rbx), %rdi
callq 0xacbd1
movq %rax, %r14
leaq 0x176634(%rip), %rsi    # 0x2f27f6
movq %rax, %rdi
callq 0xacbfb
movl 0xf8(%rbx), %edx
movq 0x10(%rbx), %rdi
movq 0xe8(%rbx), %rcx
leaq 0x1d28d5(%rip), %rsi    # 0x34eab7
xorl %eax, %eax
callq 0x92e71
movq %r14, %rdi
callq 0xae103
movq (%rbx), %rdi
callq 0x17bbc6
movq 0xe0(%rbx), %rdi
callq 0x8a4fd
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x17c216
callq 0x8a4fd
leaq 0x1d264f(%rip), %rsi    # 0x34e86c
movq %rbx, %rdi
movl $0x341, %edx            # imm = 0x341
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x936f9