// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/merge_stream.c
// Function: gt_merge_stream_new
GtNodeStream* gt_merge_stream_new(const GtArray *node_streams)
{
  GtNodeStream *in_stream,
               *ns = gt_node_stream_create(gt_merge_stream_class(), true);
  GtMergeStream *ms = gt_merge_stream_cast(ns);
  GtUword i;
#ifndef NDEBUG
  gt_assert(gt_array_size(node_streams)); /* at least one input stream given */
  /* each input stream is sorted */
  for (i = 0; i < gt_array_size(node_streams); i++) {
    gt_assert(gt_node_stream_is_sorted(*(GtNodeStream**)
                                       gt_array_get(node_streams, i)));
  }
#endif
  ms->items = gt_calloc(gt_array_size(node_streams),
                        sizeof (GtMergeStreamItem));
  ms->node_streams = gt_array_new(sizeof (GtNodeStream*));
  for (i = 0; i < gt_array_size(node_streams); i++) {
    in_stream = gt_node_stream_ref(*(GtNodeStream**)
                                   gt_array_get(node_streams, i));
    gt_array_add(ms->node_streams, in_stream);
  }
  ms->pq = gt_priority_queue_new(gt_merge_stream_item_compare,
                                 gt_array_size(node_streams));
  ms->filled = false;
  ms->first_node = ms->second_node = NULL;
  return ns;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
callq 0x1ae7c0
movq %rax, %rdi
movl $0x1, %esi
callq 0x1b1b80
movq %rax, 0x20(%rsp)
callq 0x1ae7c0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1b20f0
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x81370
cmpq $0x0, %rax
jne 0x1aebef
movq 0x48d3e2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36744b(%rip), %rsi    # 0x516013
leaq 0x3b0546(%rip), %rdx    # 0x55f115
leaq 0x3b055b(%rip), %rcx    # 0x55f131
leaq 0x3b0568(%rip), %r8     # 0x55f145
movl $0xd3, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aebf1
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x1aec87
jmp 0x1aec1d
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x80b60
movq (%rax), %rdi
callq 0x1b2090
testb $0x1, %al
jne 0x1aec70
movq 0x48d361(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3673ca(%rip), %rsi    # 0x516013
leaq 0x3b0511(%rip), %rdx    # 0x55f161
leaq 0x3b04da(%rip), %rcx    # 0x55f131
leaq 0x3b04e7(%rip), %r8     # 0x55f145
movl $0xd7, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aec72
jmp 0x1aec74
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1aebfa
movq 0x30(%rsp), %rdi
callq 0x81370
movq %rax, %rdi
movl $0x10, %esi
leaq 0x3b04a5(%rip), %rdx    # 0x55f145
movl $0xdb, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x28(%rax)
movl $0x8, %edi
callq 0x80990
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
callq 0x81370
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x1aed38
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x80b60
movq (%rax), %rdi
callq 0x1b1c50
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x28(%rsp), %rsi
movl $0x8, %edx
callq 0x81100
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x1aecd5
movq 0x30(%rsp), %rdi
callq 0x81370
movq %rax, %rsi
leaq 0x44(%rip), %rdi        # 0x1aed90
callq 0x1b5fb0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x38(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)