// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/tir_stream.c
// Function: gt_tir_stream_new
GtNodeStream* gt_tir_stream_new(GtStr *str_indexname,
                                GtUword min_seed_length,
                                GtUword min_TIR_length,
                                GtUword max_TIR_length,
                                GtUword min_TIR_distance,
                                GtUword max_TIR_distance,
                                GtXdropArbitraryscores arbit_scores,
                                int xdrop_belowscore,
                                double similarity_threshold,
                                bool best_overlaps,
                                bool longest_overlaps,
                                bool no_overlaps,
                                GtUword min_TSD_length,
                                GtUword max_TSD_length,
                                GtUword vicinity,
                                GtError *err)
{
  int had_err = 0;
  GtNodeStream *ns = gt_node_stream_create(gt_tir_stream_class(), false);
  GtTIRStream *tir_stream = gt_node_stream_cast(gt_tir_stream_class(), ns);
  tir_stream->num_of_tirs = 0;
  tir_stream->tir_pairs = NULL;
  tir_stream->cur_elem_index = 0;
  tir_stream->prev_seqnum = GT_UNDEF_UWORD;
  tir_stream->state = GT_TIR_STREAM_STATE_START;

  tir_stream->str_indexname = gt_str_ref(str_indexname);
  tir_stream->min_seed_length = min_seed_length;
  tir_stream->min_TIR_length = min_TIR_length;
  tir_stream->max_TIR_length = max_TIR_length;
  tir_stream->min_TIR_distance = min_TIR_distance;
  tir_stream->max_TIR_distance = max_TIR_distance;
  tir_stream->arbit_scores = arbit_scores;
  tir_stream->xdrop_belowscore = xdrop_belowscore;
  tir_stream->similarity_threshold = similarity_threshold;
  tir_stream->best_overlaps = best_overlaps;
  tir_stream->longest_overlaps = longest_overlaps;
  tir_stream->no_overlaps = no_overlaps;
  tir_stream->min_TSD_length = min_TSD_length;
  tir_stream->max_TSD_length = max_TSD_length;
  tir_stream->vicinity = vicinity;
  tir_stream->output_seqids = true;
  tir_stream->output_md5 = false;

  tir_stream->seedinfo.max_tir_length = max_TIR_length;
  tir_stream->seedinfo.min_tir_length = min_TIR_length;
  tir_stream->seedinfo.max_tir_distance = max_TIR_distance;
  tir_stream->seedinfo.min_tir_distance = min_TIR_distance;

  tir_stream->ssar =
      gt_newSequentialsuffixarrayreaderfromfile(gt_str_get(str_indexname),
                                                SARR_LCPTAB | SARR_SUFTAB |
                                                SARR_ESQTAB | SARR_DESTAB |
                                                SARR_SSPTAB | SARR_SDSTAB,
                                                true,
                                                NULL,
                                                err);
  if (tir_stream->ssar == NULL) {
    gt_node_stream_delete(ns);
    return NULL;
  }
  tir_stream->encseq = gt_encseqSequentialsuffixarrayreader(tir_stream->ssar);
  if (!gt_encseq_is_mirrored(tir_stream->encseq)) {
    gt_error_set(err, "index for '%s' is not mirrored (suffixerator option "
                      "-mirrored)!", gt_str_get(str_indexname));
    gt_node_stream_delete(ns);
    return NULL;
  }
  GT_INITARRAY(&tir_stream->seedinfo.seed, Seed);
  GT_INITARRAY(&tir_stream->first_pairs, TIRPair);
  tir_stream->seedinfo.num_of_contigs =
                                 gt_encseq_num_of_sequences(tir_stream->encseq);
  tir_stream->seedinfo.totallength =
                                 gt_encseq_total_length(tir_stream->encseq);
  tir_stream->seedinfo.midpos =
                           (gt_encseq_total_length(tir_stream->encseq) - 1) / 2;

  if (!had_err)
    return ns;

  return NULL;
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r10
movq 0x10(%rsp), %rsi
movq %rdi, %r11
movq 0x18(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0xd0(%rsp), %rax
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movb 0xb8(%rsp), %al
movb 0xb0(%rsp), %cl
movb 0xa8(%rsp), %dl
movl 0xa0(%rsp), %ebx
leaq 0x90(%rsp), %rbx
movq %rbx, 0x20(%rsp)
movq %r11, 0x70(%rsp)
movq %r10, 0x68(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
andb $0x1, %dl
movb %dl, 0x3f(%rsp)
andb $0x1, %cl
movb %cl, 0x3e(%rsp)
andb $0x1, %al
movb %al, 0x3d(%rsp)
movl $0x0, 0x38(%rsp)
callq 0x1ef3f0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1b1b80
movq %rax, 0x30(%rsp)
callq 0x1ef3f0
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x1b20f0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq $0x0, 0x98(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x70(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0xa0(%rax)
movq 0x28(%rsp), %rax
movq $-0x1, 0xa8(%rax)
movq 0x28(%rsp), %rax
movl $0x0, 0x90(%rax)
movq 0x70(%rsp), %rdi
callq 0x11e360
movq 0x20(%rsp), %rcx
movq %rax, %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xb0(%rax)
movq 0x68(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xb8(%rax)
movq 0x60(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xc0(%rax)
movq 0x58(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xc8(%rax)
movq 0x50(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xd0(%rax)
movq 0x48(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rdx, 0xd8(%rax)
movq 0x28(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, 0xe0(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0xe8(%rax)
movl 0xa0(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0xf0(%rax)
movsd 0x40(%rsp), %xmm0
movq 0x28(%rsp), %rax
movsd %xmm0, 0xf8(%rax)
movb 0x3f(%rsp), %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x101(%rax)
movb 0x3e(%rsp), %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x102(%rax)
movb 0x3d(%rsp), %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x100(%rax)
movq 0xc0(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x108(%rax)
movq 0xc8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x110(%rax)
movq 0xd0(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x118(%rax)
movq 0x28(%rsp), %rax
movb $0x1, 0x103(%rax)
movq 0x28(%rsp), %rax
movb $0x0, 0x104(%rax)
movq 0x58(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x60(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x50(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x70(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0xd8(%rsp), %r8
movl $0xb7, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x23b3e0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1f077e
movq 0x30(%rsp), %rdi
callq 0x1b1cb0
movq $0x0, 0x78(%rsp)
jmp 0x1f08b8
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x23bd50
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x1f07ef
movq 0xd8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x378a06(%rip), %rsi    # 0x5691d6
movb $0x0, %al
callq 0xd88c0
movq 0x30(%rsp), %rdi
callq 0x1b1cb0
movq $0x0, 0x78(%rsp)
jmp 0x1f08b8
jmp 0x1f07f1
movq 0x28(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x28(%rax)
jmp 0x1f081a
movq 0x28(%rsp), %rax
movq $0x0, 0x78(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x88(%rax)
movq 0x28(%rsp), %rax
movq $0x0, 0x80(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xa9d00
movq %rax, %rcx
subq $0x1, %rcx
shrq %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x60(%rax)
cmpl $0x0, 0x38(%rsp)
jne 0x1f08af
movq 0x30(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x1f08b8
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
addq $0x80, %rsp
popq %rbx
retq
nopw %cs:(%rax,%rax)