// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/feature_in_stream.c
// Function: gt_feature_in_stream_unit_test
int gt_feature_in_stream_unit_test(GtError *error)
{
  GtNodeStream *src, *dest;
  GtFeatureIndex *prefeat, *postfeat;
  GtRange range1, range1test, range2, range2test, range3, range3test;
  GtStrArray *seqids;

  prefeat = in_stream_test_data(error);
  postfeat = gt_feature_index_memory_new();
  src = gt_feature_in_stream_new(prefeat);
  dest = gt_feature_out_stream_new(src, postfeat);
  int result = gt_node_stream_pull(dest, error);
  if (result == -1)
    return -1;

  seqids = gt_feature_index_get_seqids(postfeat, error);
  if (gt_str_array_size(seqids) != 3)
  {
    gt_error_set(error, "error in feature_in_stream unit test 1: expected 3 "
                 "seqids, found "GT_WU"", gt_str_array_size(seqids));
    return -1;
  }
  gt_str_array_delete(seqids);

  range1test.start = 500;  range1test.end = 75000;
  range2test.start = 4000; range2test.end = 9500;
  gt_feature_index_get_range_for_seqid(postfeat, &range1, "chr1", error);
  gt_feature_index_get_range_for_seqid(postfeat, &range2, "scf0001", error);
  if (gt_range_compare(&range1, &range1test) ||
      gt_range_compare(&range2, &range2test))
  {
    gt_error_set(error, "error in feature_in_stream unit test 1: incorrect "
                 "sequence regions");
    return -1;
  }

  gt_feature_index_get_orig_range_for_seqid(postfeat, &range1, "chr1", error);
  gt_feature_index_get_orig_range_for_seqid(postfeat, &range2, "scf0001",error);
  if (gt_range_compare(&range1, &range1test) ||
      gt_range_compare(&range2, &range2test))
  {
    gt_error_set(error, "error in feature_in_stream unit test 1: incorrect "
                 "sequence regions");
    return -1;
  }
  gt_feature_index_delete(prefeat);
  gt_feature_index_delete(postfeat);
  gt_node_stream_delete(src);
  gt_node_stream_delete(dest);

  prefeat = in_stream_test_data(error);
  postfeat = gt_feature_index_memory_new();
  src = gt_feature_in_stream_new(prefeat);
  dest = gt_feature_out_stream_new(src, postfeat);
  gt_feature_in_stream_use_orig_ranges((GtFeatureInStream *)src);
  result = gt_node_stream_pull(dest, error);
  if (result == -1)
    return -1;

  range1test.start = 500;  range1test.end = 75000;
  range2test.start = 4000; range2test.end = 9500;
  gt_feature_index_get_range_for_seqid(postfeat, &range1, "chr1", error);
  gt_feature_index_get_range_for_seqid(postfeat, &range2, "scf0001",error);
  if (gt_range_compare(&range1, &range1test) ||
      gt_range_compare(&range2, &range2test))
  {
    gt_error_set(error, "error in feature_in_stream unit test 1: incorrect "
                 "sequence regions");
    return -1;
  }
  range1test.start = 1; range1test.end = 100000;
  range2test.start = 1; range2test.end = 10000;
  range3test.start = 1; range3test.end = 25000;
  gt_feature_index_get_orig_range_for_seqid(postfeat, &range1, "chr1", error);
  gt_feature_index_get_orig_range_for_seqid(postfeat, &range2, "scf0001",error);
  gt_feature_index_get_orig_range_for_seqid(postfeat, &range3, "ChrM", error);
  if (gt_range_compare(&range1, &range1test) ||
      gt_range_compare(&range2, &range2test) ||
      gt_range_compare(&range3, &range3test))
  {
    gt_error_set(error, "error in feature_in_stream unit test 1: incorrect "
                 "sequence regions");
    return -1;
  }
  gt_feature_index_delete(prefeat);
  gt_feature_index_delete(postfeat);
  gt_node_stream_delete(src);
  gt_node_stream_delete(dest);

  return 0;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq 0x98(%rsp), %rdi
callq 0x168f70
movq %rax, 0x80(%rsp)
callq 0x16bc30
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1689e0
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x171090
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x1b1f90
movl %eax, 0xc(%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x168b1d
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x169dc0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x11fcc0
cmpq $0x3, %rax
je 0x168b7f
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x11fcc0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x3e6b81(%rip), %rsi    # 0x54f6e9
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq 0x10(%rsp), %rdi
callq 0x11fd20
movq $0x1f4, 0x58(%rsp)      # imm = 0x1F4
movq $0x124f8, 0x60(%rsp)    # imm = 0x124F8
movq $0xfa0, 0x38(%rsp)      # imm = 0xFA0
movq $0x251c, 0x40(%rsp)     # imm = 0x251C
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x68(%rsp), %rsi
leaq 0x3e6b68(%rip), %rdx    # 0x54f72e
callq 0x169e70
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x48(%rsp), %rsi
leaq 0x3e6b4f(%rip), %rdx    # 0x54f733
callq 0x169e70
leaq 0x68(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
jne 0x168c11
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
je 0x168c37
movq 0x98(%rsp), %rdi
leaq 0x3e6b1b(%rip), %rsi    # 0x54f73b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x68(%rsp), %rsi
leaq 0x3e6ade(%rip), %rdx    # 0x54f72e
callq 0x169f40
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x48(%rsp), %rsi
leaq 0x3e6ac5(%rip), %rdx    # 0x54f733
callq 0x169f40
leaq 0x68(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
jne 0x168c9b
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
je 0x168cc1
movq 0x98(%rsp), %rdi
leaq 0x3e6a91(%rip), %rsi    # 0x54f73b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq 0x80(%rsp), %rdi
callq 0x169460
movq 0x78(%rsp), %rdi
callq 0x169460
movq 0x90(%rsp), %rdi
callq 0x1b1cb0
movq 0x88(%rsp), %rdi
callq 0x1b1cb0
movq 0x98(%rsp), %rdi
callq 0x168f70
movq %rax, 0x80(%rsp)
callq 0x16bc30
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x1689e0
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x171090
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rdi
callq 0x1689d0
movq 0x88(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x1b1f90
movl %eax, 0xc(%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x168d7d
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq $0x1f4, 0x58(%rsp)      # imm = 0x1F4
movq $0x124f8, 0x60(%rsp)    # imm = 0x124F8
movq $0xfa0, 0x38(%rsp)      # imm = 0xFA0
movq $0x251c, 0x40(%rsp)     # imm = 0x251C
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x68(%rsp), %rsi
leaq 0x3e6974(%rip), %rdx    # 0x54f72e
callq 0x169e70
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x48(%rsp), %rsi
leaq 0x3e695b(%rip), %rdx    # 0x54f733
callq 0x169e70
leaq 0x68(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
jne 0x168e05
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
je 0x168e2b
movq 0x98(%rsp), %rdi
leaq 0x3e6927(%rip), %rsi    # 0x54f73b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq $0x1, 0x58(%rsp)
movq $0x186a0, 0x60(%rsp)    # imm = 0x186A0
movq $0x1, 0x38(%rsp)
movq $0x2710, 0x40(%rsp)     # imm = 0x2710
movq $0x1, 0x18(%rsp)
movq $0x61a8, 0x20(%rsp)     # imm = 0x61A8
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x68(%rsp), %rsi
leaq 0x3e68b4(%rip), %rdx    # 0x54f72e
callq 0x169f40
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x48(%rsp), %rsi
leaq 0x3e689b(%rip), %rdx    # 0x54f733
callq 0x169f40
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rcx
leaq 0x28(%rsp), %rsi
leaq 0x3e68c8(%rip), %rdx    # 0x54f77e
callq 0x169f40
leaq 0x68(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
jne 0x168ef7
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
jne 0x168ef7
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x106fa0
cmpl $0x0, %eax
je 0x168f1a
movq 0x98(%rsp), %rdi
leaq 0x3e6835(%rip), %rsi    # 0x54f73b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x168f56
movq 0x80(%rsp), %rdi
callq 0x169460
movq 0x78(%rsp), %rdi
callq 0x169460
movq 0x90(%rsp), %rdi
callq 0x1b1cb0
movq 0x88(%rsp), %rdi
callq 0x1b1cb0
movl $0x0, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)