// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/ltr/ltr_classify_stream.c
// Function: gt_ltr_classify_stream_next
static int gt_ltr_classify_stream_next(GtNodeStream *ns,
                                       GtGenomeNode **gn,
                                       GtError *err)
{
  GtLTRClassifyStream *lcs;
  GtGenomeNode *ref_gn;
  int had_err = 0;

  gt_error_check(err);
  lcs = gt_ltr_classify_stream_cast(ns);
  if (lcs->first_next) {
    while (!(had_err = gt_node_stream_next(lcs->in_stream, gn, err)) && *gn) {
      gt_assert(*gn && !had_err);
      ref_gn = gt_genome_node_ref(*gn);
      gt_array_add(lcs->nodes, ref_gn);
    }
    if (!had_err)
      had_err = classify_ltrs(lcs->nodes, lcs->features, lcs->famprefix,
                              lcs->current_state, lcs->progress, err);
    if (!had_err) {
      *gn = *(GtGenomeNode**) gt_array_get(lcs->nodes, lcs->next_index);
      lcs->next_index++;
      lcs->first_next = false;
      return 0;
    }
  } else {
    if (lcs->next_index >= gt_array_size(lcs->nodes))
      *gn = NULL;
    else {
      *gn = *(GtGenomeNode**) gt_array_get(lcs->nodes, lcs->next_index);
      lcs->next_index++;
    }
    return 0;
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2068, %rsp           # imm = 0x2068
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x1bae07
movq %rbp, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1bb501
callq 0x1bad44
movq %rax, %rdi
movq %rbx, %rsi
callq 0x102c81
movq %rax, %r12
cmpb $0x1, 0x38(%rax)
jne 0x1bae65
leaq 0x50(%rsp), %rbx
pushq $0x8
popq %r14
movq 0x10(%r12), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x102a22
testl %eax, %eax
jne 0x1bb4ef
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1baea1
callq 0xdccf8
movq %rax, 0x50(%rsp)
movq 0x18(%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5851d
jmp 0x1bae29
movq 0x18(%r12), %rdi
movq 0x40(%r12), %rbx
callq 0x586a4
cmpq %rax, %rbx
jae 0x1bae98
movq 0x18(%r12), %rdi
movq 0x40(%r12), %rsi
callq 0x581aa
movq (%rax), %rax
movq %rax, (%r15)
incq 0x40(%r12)
jmp 0x1bb4ed
andq $0x0, (%r15)
jmp 0x1bb4ed
movq 0x18(%r12), %rax
movq %rax, (%rsp)
movq 0x20(%r12), %r13
movq 0x28(%r12), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%r12), %rbx
movq 0x48(%r12), %rax
movq %rax, 0x8(%rsp)
testq %rbp, %rbp
je 0x1baedd
movq %rbp, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1bb594
movq %rbx, 0x30(%rsp)
cmpq $0x0, (%rsp)
je 0x1bb532
leaq 0x17bdca(%rip), %rbx    # 0x336cbe
movq %r15, 0x40(%rsp)
movq %r12, 0x38(%rsp)
movq (%rsp), %r15
movq %rbp, 0x20(%rsp)
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x586a4
movq %r15, %rdi
cmpq %rax, %r14
jae 0x1bb059
movq %r14, %rsi
callq 0x581aa
movq (%rax), %r12
movq %r12, %rdi
callq 0xdc2f0
testq %rax, %rax
je 0x1bb051
movq %r14, 0x28(%rsp)
pushq $0x1
popq %rdi
leaq -0x12770a(%rip), %rsi   # 0x9383f
xorl %edx, %edx
callq 0x8f330
movq %rax, 0x10(%rsp)
movq %r12, %r15
movq %r12, %rdi
callq 0xdc6f0
movq %rax, %rbp
movb $0x1, %al
movl %eax, 0x18(%rsp)
movq %rbp, %rdi
callq 0xdc92e
testq %rax, %rax
je 0x1bb025
movq %rax, %r14
movq %rax, %rdi
callq 0xda338
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x179e0
testl %eax, %eax
je 0x1baf69
movq %r12, %rdi
leaq 0x179f85(%rip), %rsi    # 0x334f26
callq 0x179e0
testl %eax, %eax
je 0x1baf69
movq %r12, %rdi
leaq 0x17c85d(%rip), %rsi    # 0x337811
callq 0x179e0
testl %eax, %eax
je 0x1bafe9
movq %r12, %rdi
leaq 0x166062(%rip), %rsi    # 0x321029
callq 0x179e0
testl %eax, %eax
jne 0x1bafe2
movq %r14, %rdi
leaq 0x167b91(%rip), %rsi    # 0x322b6b
callq 0xd9628
movq %rax, %r12
testq %r12, %r12
je 0x1baf69
jmp 0x1bb008
testb $0x1, 0x18(%rsp)
leaq 0x1a483e(%rip), %r12    # 0x35f833
leaq 0x1a4832(%rip), %rax    # 0x35f82e
cmovneq %rax, %r12
movl $0x0, 0x18(%rsp)
movq %r12, %rdi
callq 0x6c2be
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x8f4bd
jmp 0x1baf69
movq %r15, %rdi
leaq 0x1a4809(%rip), %rsi    # 0x35f838
movq 0x10(%rsp), %rdx
leaq 0xa4b(%rip), %rcx       # 0x1bba86
callq 0xdd810
movq %rbp, %rdi
callq 0xdc9f1
movq (%rsp), %r15
movq 0x28(%rsp), %r14
incq %r14
jmp 0x1baf0a
callq 0x586a4
movq %rax, 0x10(%rsp)
pushq $0x8
popq %rdi
callq 0x5809c
movq %rax, %rbp
movq 0x30(%rsp), %rbx
testq %rbx, %rbx
je 0x1bb09b
movq (%rbx), %rdi
leaq 0x1a4748(%rip), %rsi    # 0x35f7ca
movl $0x14b, %edx            # imm = 0x14B
callq 0x936f9
leaq 0x1a4763(%rip), %rdi    # 0x35f7f6
callq 0x6c2be
movq %rax, (%rbx)
xorl %r14d, %r14d
cmpq 0x10(%rsp), %r14
je 0x1bb15c
movq %r15, %rdi
movq %r14, %rsi
callq 0x581aa
movq (%rax), %r12
movq %r12, %rdi
callq 0xdc2f0
testq %rax, %rax
je 0x1bb154
xorl %r15d, %r15d
movq %rbp, %rdi
callq 0x586a4
cmpq %rax, %r15
jae 0x1bb111
movq %rbp, %rdi
movq %r15, %rsi
callq 0x581aa
movq (%rax), %rbx
movq (%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movq 0x20(%rsp), %r8
callq 0x1bb6af
incq %r15
testb %al, %al
je 0x1bb0cb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e143
jmp 0x1bb13b
movq 0x10(%rsp), %rdi
callq 0x5e0b0
movq %rax, 0x58(%rsp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x5e143
movq %rbp, %rdi
leaq 0x58(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x5851d
cmpq $0x0, 0x8(%rsp)
movq (%rsp), %r15
movq 0x30(%rsp), %rbx
je 0x1bb154
movq 0x8(%rsp), %rax
incq (%rax)
incq %r14
jmp 0x1bb09e
testq %rbx, %rbx
je 0x1bb184
movq (%rbx), %rdi
leaq 0x1a465f(%rip), %rsi    # 0x35f7ca
movl $0x166, %edx            # imm = 0x166
callq 0x936f9
leaq 0x1a469b(%rip), %rdi    # 0x35f817
callq 0x6c2be
movq %rax, (%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb19b
callq 0x89eb7
testb %al, %al
jne 0x1bb5c2
testq %rbp, %rbp
je 0x1bb563
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x586a4
cmpq %rax, %rbx
jae 0x1bb2ad
movq %r15, %rdi
movq %rbx, %rsi
callq 0x581aa
movq (%rax), %r12
movq %r12, %rdi
callq 0xdc2f0
testq %rax, %rax
je 0x1bb2a5
pushq $0x8
popq %rdi
callq 0x5809c
movq %rax, %r14
xorl %r15d, %r15d
movq %rbp, %rdi
callq 0x586a4
cmpq %rax, %r15
jae 0x1bb231
movq %rbp, %rdi
movq %r15, %rsi
callq 0x581aa
movq (%rax), %rdx
movq %rdx, 0x60(%rsp)
movq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rcx
movq 0x20(%rsp), %r8
callq 0x1bb6af
testb %al, %al
je 0x1bb22c
movq %r14, %rdi
leaq 0x60(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x5851d
incq %r15
jmp 0x1bb1e4
movq %r14, %rdi
callq 0x586a4
cmpq $0x2, %rax
movq (%rsp), %r15
jb 0x1bb28d
xorl %r12d, %r12d
movq %rbp, %rdi
callq 0x586a4
cmpq %rax, %r12
jae 0x1bb28d
movq %rbp, %rdi
movq %r12, %rsi
callq 0x581aa
movq (%rax), %rdi
movq %rdi, 0x60(%rsp)
movq %rbx, %rsi
callq 0x5e199
movq 0x60(%rsp), %rdi
callq 0x5eb04
testq %rax, %rax
jne 0x1bb288
movq %rbp, %rdi
movq %r12, %rsi
callq 0x5829c
incq %r12
jmp 0x1bb246
movq %r14, %rdi
callq 0x58eb9
cmpq $0x0, 0x8(%rsp)
je 0x1bb2a5
movq 0x8(%rsp), %rax
incq (%rax)
incq %rbx
jmp 0x1bb1a6
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1bb2c4
callq 0x89eb7
testb %al, %al
jne 0x1bb5f0
movq $0x0, 0x18(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
movq %rbp, %rdi
callq 0x586a4
cmpq %rax, %r12
movq %rax, 0x10(%rsp)
jae 0x1bb447
movq %rbp, %rdi
movq %r12, %rsi
callq 0x581aa
movq (%rax), %rbx
pushq $0x8
popq %rdi
callq 0x5809c
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5e7a7
movq %r13, %rdi
callq 0x586a4
cmpq $0x2, %rax
jae 0x1bb32e
movq %r13, %rdi
callq 0x58eb9
jmp 0x1bb40f
movq %r12, 0x28(%rsp)
xorl %r14d, %r14d
movq %r13, %rdi
callq 0x586a4
cmpq %rax, %r14
jae 0x1bb3fd
movq %r13, %rdi
movq %r14, %rsi
callq 0x581aa
movq (%rax), %rsi
movq %r15, %rdi
callq 0x581aa
movq (%rax), %rdi
callq 0xdc6f0
movq %rax, %r12
movq %rax, %rdi
callq 0xdc92e
movq %rax, %rbx
movq %rax, %rdi
callq 0xda338
movq %rax, %rdi
leaq 0x17b939(%rip), %rsi    # 0x336cbe
callq 0x179e0
testl %eax, %eax
jne 0x1bb417
movq %r13, %r15
movq 0x48(%rsp), %rcx
movl $0x2000, %esi           # imm = 0x2000
leaq 0x60(%rsp), %r13
movq %r13, %rdi
testq %rcx, %rcx
je 0x1bb3c1
leaq 0x1a452a(%rip), %rdx    # 0x35f8dd
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x17bf0
jmp 0x1bb3d4
leaq 0x1a451b(%rip), %rdx    # 0x35f8e3
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x17bf0
movq %rbx, %rdi
leaq 0x1a4510(%rip), %rsi    # 0x35f8ee
movq %r13, %rdx
callq 0xda48b
movq %r12, %rdi
callq 0xdc9f1
incq %r14
movq %r15, %r13
movq (%rsp), %r15
jmp 0x1bb336
movq %r13, %rdi
callq 0x58eb9
incq 0x8(%rsp)
movq 0x28(%rsp), %r12
incq %r12
jmp 0x1bb2d9
movq %r12, %rdi
callq 0xdc9f1
leaq 0x1a44cf(%rip), %rsi    # 0x35f8f5
movq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
movq %r13, %rdi
callq 0x58eb9
pushq $-0x1
popq %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %r12
xorl %ebx, %ebx
movq %rbp, %rdi
callq 0x586a4
cmpq %rax, %rbx
jae 0x1bb46e
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x581aa
movq (%rax), %rdi
callq 0x5ecf6
incq %rbx
jmp 0x1bb449
movq %rbp, %rdi
callq 0x58eb9
xorl %ebx, %ebx
leaq 0x1a43b9(%rip), %r14    # 0x35f838
movq 0x40(%rsp), %r13
movq 0x38(%rsp), %rbp
movq %r15, %rdi
callq 0x586a4
cmpq %rax, %rbx
jae 0x1bb4c5
movq %r15, %rdi
movq %rbx, %rsi
callq 0x581aa
movq (%rax), %r15
movq %r15, %rdi
callq 0xdc2f0
testq %rax, %rax
je 0x1bb4bc
movq %r15, %rdi
movq %r14, %rsi
callq 0xdd9b8
incq %rbx
movq (%rsp), %r15
jmp 0x1bb489
cmpq 0x10(%rsp), %r12
movq 0x18(%rsp), %rax
jb 0x1bb4ef
movq 0x18(%rbp), %rdi
movq 0x40(%rbp), %rsi
callq 0x581aa
movq (%rax), %rax
movq %rax, (%r13)
incq 0x40(%rbp)
movb $0x0, 0x38(%rbp)
xorl %eax, %eax
addq $0x2068, %rsp           # imm = 0x2068
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x27ca60(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129b01(%rip), %rsi    # 0x2e5013
leaq 0x129ca6(%rip), %rdx    # 0x2e51bf
leaq 0x1a428e(%rip), %rcx    # 0x35f7ae
leaq 0x1a42a3(%rip), %r8     # 0x35f7ca
movl $0x180, %r9d            # imm = 0x180
jmp 0x1bb61c
movq 0x27ca2f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129ad0(%rip), %rsi    # 0x2e5013
leaq 0x1425a1(%rip), %rdx    # 0x2fdaeb
leaq 0x1a4297(%rip), %rcx    # 0x35f7e8
leaq 0x1a4272(%rip), %r8     # 0x35f7ca
movl $0x144, %r9d            # imm = 0x144
jmp 0x1bb61c
movq 0x27c9fe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129a9f(%rip), %rsi    # 0x2e5013
leaq 0x1a434d(%rip), %rdx    # 0x35f8c8
leaq 0x1a432b(%rip), %rcx    # 0x35f8ad
leaq 0x1a4241(%rip), %r8     # 0x35f7ca
movl $0xb0, %r9d
jmp 0x1bb61c
movq 0x27c9cd(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129a6e(%rip), %rsi    # 0x2e5013
leaq 0x129c13(%rip), %rdx    # 0x2e51bf
leaq 0x1a4235(%rip), %rcx    # 0x35f7e8
leaq 0x1a4210(%rip), %r8     # 0x35f7ca
movl $0x143, %r9d            # imm = 0x143
jmp 0x1bb61c
movq 0x27c99f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129a40(%rip), %rsi    # 0x2e5013
leaq 0x129be5(%rip), %rdx    # 0x2e51bf
leaq 0x1a42cc(%rip), %rcx    # 0x35f8ad
leaq 0x1a41e2(%rip), %r8     # 0x35f7ca
movl $0xaf, %r9d
jmp 0x1bb61c
movq 0x27c971(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x129a12(%rip), %rsi    # 0x2e5013
leaq 0x129bb7(%rip), %rdx    # 0x2e51bf
leaq 0x1a4447(%rip), %rcx    # 0x35fa56
leaq 0x1a41b4(%rip), %r8     # 0x35f7ca
movl $0xd7, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390