// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/node_stream.c
// Function: gt_node_stream_next
int gt_node_stream_next(GtNodeStream *ns, GtGenomeNode **gn, GtError *err)
{
  GtGenomeNode *new_node = NULL;
  int had_err = 0;
  gt_assert(ns && ns->c_class && ns->c_class->next);
  gt_error_check(err);
  /* filling */
  if (!ns->members->buffer)
    had_err = ns->c_class->next(ns, &ns->members->buffer, err);
  if (!had_err && ns->members->buffer)
    had_err = ns->c_class->next(ns, &new_node, err);
#ifndef NDEBUG
  /* checking */
  if (!had_err && ns->members->ensure_sorting && ns->members->buffer &&
      new_node) {
    gt_assert(gt_genome_node_compare(&ns->members->buffer, &new_node) <= 0);
  }
#endif
  /* serving */
  if (!had_err) {
    *gn = ns->members->buffer;
    ns->members->buffer = new_node;
  }
  return had_err;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x347d6
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
je 0x347d6
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x3480e
movq 0x17f7fb(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x12987f(%rip), %rsi    # 0x15e066
leaq 0x13181a(%rip), %rdx    # 0x166008
leaq 0x13183a(%rip), %rcx    # 0x16602f
leaq 0x131795(%rip), %r8     # 0x165f91
movl $0x58, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x34810
jmp 0x34812
cmpq $0x0, 0x10(%rsp)
je 0x34862
movq 0x10(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x3482a
jmp 0x34862
movq 0x17f7a7(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x12982b(%rip), %rsi    # 0x15e066
leaq 0x129e06(%rip), %rdx    # 0x15e648
leaq 0x1317e6(%rip), %rcx    # 0x16602f
leaq 0x131741(%rip), %r8     # 0x165f91
movl $0x59, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x34864
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, (%rax)
jne 0x34898
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x348cf
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, (%rax)
je 0x348cf
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rsi
callq *%rax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x34952
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
testb $0x1, 0x8(%rax)
je 0x34952
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, (%rax)
je 0x34952
cmpq $0x0, 0x8(%rsp)
je 0x34952
jmp 0x348fe
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x25db0
cmpl $0x0, %eax
jle 0x3494e
movq 0x17f6bb(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x12973f(%rip), %rsi    # 0x15e066
leaq 0x131715(%rip), %rdx    # 0x166043
leaq 0x1316fa(%rip), %rcx    # 0x16602f
leaq 0x131655(%rip), %r8     # 0x165f91
movl $0x63, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x34950
jmp 0x34952
cmpl $0x0, 0x4(%rsp)
jne 0x3497e
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movl 0x4(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)