// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/block.c
// Function: gt_block_unit_test
int gt_block_unit_test(GtError *err)
{
  GtRange r1, r2, r_temp, b_range;
  GtStrand s;
  GtGenomeNode *gn1, *gn2;
  GtElement *e1, *e2;
  double height;
  GtBlock *b;
  GtStr *seqid, *caption1, *caption2;
  int had_err = 0;
  GtStyle *sty;
  GtError *testerr;
  gt_error_check(err);

  seqid = gt_str_new_cstr("seqid");
  caption1 = gt_str_new_cstr("foo");
  caption2 = gt_str_new_cstr("bar");
  testerr = gt_error_new();

  r1.start = 10UL;
  r1.end = 50UL;

  r2.start = 40UL;
  r2.end = 50UL;

  gn1 = gt_feature_node_new(seqid, gt_ft_gene, r1.start, r1.end,
                            GT_STRAND_FORWARD);
  gn2 = gt_feature_node_new(seqid, gt_ft_exon, r2.start, r2.end,
                            GT_STRAND_FORWARD);

  e1 = gt_element_new((GtFeatureNode*) gn1);
  e2 = gt_element_new((GtFeatureNode*) gn2);

  b = gt_block_new();

  /* test gt_block_insert_elements */
  gt_ensure((0UL == gt_block_get_size(b)));
  gt_block_insert_element(b, (GtFeatureNode*) gn1);
  gt_ensure((1UL == gt_block_get_size(b)));
  gt_block_insert_element(b, (GtFeatureNode*) gn2);
  gt_ensure((2UL == gt_block_get_size(b)));

  /* test gt_block_set_range & gt_block_get_range */
  r_temp = gt_range_join(&r1, &r2);
  gt_block_set_range(b, r_temp);
  b_range = gt_block_get_range(b);
  gt_ensure((0 == gt_range_compare(&b_range, &r_temp)));
  gt_ensure((1 == gt_range_compare(&r2, &r_temp)));

  /* tests gt_block_set_caption & gt_block_get_caption */
  gt_block_set_caption(b, caption1);
  gt_ensure((0 == gt_str_cmp(gt_block_get_caption(b), caption1)));
  gt_ensure((0 != gt_str_cmp(gt_block_get_caption(b), caption2)));

  /* tests gt_block_set_strand & gt_block_get_range */
  s = gt_block_get_strand(b);
  gt_ensure((GT_STRAND_UNKNOWN == s));
  gt_block_set_strand(b, GT_STRAND_FORWARD);
  s = gt_block_get_strand(b);
  gt_ensure((GT_STRAND_FORWARD == s));

  /* test gt_block_get_max_height() */
  sty = gt_style_new(err);
  gt_ensure(gt_block_get_max_height(b, &height, sty, err) == 0);
  gt_ensure(!gt_error_is_set(testerr));
  gt_ensure(height == BAR_HEIGHT_DEFAULT);
  gt_style_set_num(sty, "exon", "bar_height", 42);
  gt_ensure(gt_block_get_max_height(b, &height, sty, err) == 0);
  gt_ensure(!gt_error_is_set(testerr));
  gt_ensure(height == 42);
  gt_style_set_num(sty, "gene", "bar_height", 23);
  gt_ensure(gt_block_get_max_height(b, &height, sty, err) == 0);
  gt_ensure(!gt_error_is_set(testerr));
  gt_ensure(height == 42);
  gt_style_unset(sty, "exon", "bar_height");
  gt_ensure(gt_block_get_max_height(b, &height, sty, err) == 0);
  gt_ensure(!gt_error_is_set(testerr));
  gt_ensure(height == 23);

  gt_str_delete(caption2);
  gt_str_delete(seqid);
  gt_element_delete(e1);
  gt_element_delete(e2);
  gt_block_delete(b);
  gt_style_delete(sty);
  gt_error_delete(testerr);
  gt_genome_node_delete(gn1);
  gt_genome_node_delete(gn2);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r15
testq %rdi, %rdi
je 0x8b4b9
movq %r15, %rdi
callq 0x3566a
testb %al, %al
jne 0x8bccd
leaq 0x768c0(%rip), %rdi     # 0x101d80
callq 0x3c03d
movq %rax, %r14
leaq 0x66762(%rip), %rdi     # 0xf1c31
callq 0x3c03d
movq %rax, %rbx
leaq 0x65de9(%rip), %rdi     # 0xf12c7
callq 0x3c03d
movq %rax, %rbp
callq 0x35584
movq %rax, 0x8(%rsp)
movq $0xa, 0x68(%rsp)
movl $0x32, %eax
movq %rax, 0x70(%rsp)
movq $0x28, 0x18(%rsp)
movq %rax, 0x20(%rsp)
leaq 0x81388(%rip), %rsi     # 0x10c8a0
movl $0xa, %edx
movl $0x32, %ecx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x3fbf0
movq %rax, %r12
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0x71441(%rip), %rsi     # 0xfc982
movq %r14, 0x40(%rsp)
movq %r14, %rdi
xorl %r8d, %r8d
callq 0x3fbf0
movq %rax, %r14
movq %r12, %rdi
callq 0x8e5a8
movq %rax, 0x30(%rsp)
movq %r14, %rdi
callq 0x8e5a8
movq %rax, 0x28(%rsp)
callq 0x8ad21
movq %rax, %r13
movq %rax, %rdi
callq 0x8aee8
testq %rax, %rax
movq %r14, 0x38(%rsp)
je 0x8b5c4
leaq 0x57bea(%rip), %rsi     # 0xe3179
leaq 0x6ab53(%rip), %rdx     # 0xf60e9
leaq 0x6ab39(%rip), %rcx     # 0xf60d6
leaq 0x6a7fd(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1a3, %r9d            # imm = 0x1A3
xorl %eax, %eax
callq 0x3559f
movq %r13, %rdi
movq %r12, %rsi
callq 0x8adcd
jmp 0x8b656
movq %r13, %rdi
movq %r12, %rsi
callq 0x8adcd
movq %r13, %rdi
callq 0x8aee8
cmpq $0x1, %rax
jne 0x8b62a
movq %r13, %rdi
movq %r14, %rsi
callq 0x8adcd
movq %r13, %rdi
callq 0x8aee8
movb $0x1, %r14b
cmpq $0x2, %rax
je 0x8b664
leaq 0x57b79(%rip), %rsi     # 0xe3179
leaq 0x6ab1e(%rip), %rdx     # 0xf6125
leaq 0x6aac8(%rip), %rcx     # 0xf60d6
leaq 0x6a78c(%rip), %r8      # 0xf5da1
xorl %r14d, %r14d
movq %r15, %rdi
movl $0x1a7, %r9d            # imm = 0x1A7
xorl %eax, %eax
callq 0x3559f
jmp 0x8b664
leaq 0x57b48(%rip), %rsi     # 0xe3179
leaq 0x6aacf(%rip), %rdx     # 0xf6107
leaq 0x6aa97(%rip), %rcx     # 0xf60d6
leaq 0x6a75b(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1a5, %r9d            # imm = 0x1A5
xorl %eax, %eax
callq 0x3559f
movq %r13, %rdi
movq %r14, %rsi
callq 0x8adcd
xorl %r14d, %r14d
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x7e16b
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %r13, %rdi
movq %rax, %rsi
callq 0x8b000
movq %r13, %rdi
callq 0x8ac4f
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
testb %r14b, %r14b
je 0x8b774
leaq 0x58(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x7df58
testl %eax, %eax
je 0x8b6e0
leaq 0x57abc(%rip), %rsi     # 0xe3179
leaq 0x6aa7f(%rip), %rdx     # 0xf6143
leaq 0x6aa0b(%rip), %rcx     # 0xf60d6
leaq 0x6a6cf(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1ad, %r9d            # imm = 0x1AD
jmp 0x8b76d
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x7df58
cmpl $0x1, %eax
jne 0x8b748
movq %r13, %rdi
movq %rbx, %rsi
callq 0x8b0c3
movq %r13, %rdi
callq 0x8ac63
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3c4b0
testl %eax, %eax
je 0x8bc80
leaq 0x57a58(%rip), %rsi     # 0xe3179
leaq 0x6aa6c(%rip), %rdx     # 0xf6194
leaq 0x6a9a7(%rip), %rcx     # 0xf60d6
leaq 0x6a66b(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1b2, %r9d            # imm = 0x1B2
xorl %eax, %eax
callq 0x3559f
jmp 0x8b77f
leaq 0x57a2a(%rip), %rsi     # 0xe3179
leaq 0x6aa18(%rip), %rdx     # 0xf616e
leaq 0x6a979(%rip), %rcx     # 0xf60d6
leaq 0x6a63d(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1ae, %r9d            # imm = 0x1AE
xorl %eax, %eax
callq 0x3559f
movq %r13, %rdi
movq %rbx, %rsi
callq 0x8b0c3
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movb $0x1, %bl
movq %r13, %rdi
callq 0x8b0e2
testb %bl, %bl
jne 0x8b7ca
cmpl $0x3, %eax
je 0x8b7ca
leaq 0x579da(%rip), %rsi     # 0xe3179
leaq 0x6aa58(%rip), %rdx     # 0xf61fe
leaq 0x6a929(%rip), %rcx     # 0xf60d6
leaq 0x6a5ed(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %rbp, 0x10(%rsp)
movq %r13, %rdi
xorl %esi, %esi
callq 0x8b0d3
movq %r13, %rdi
callq 0x8b0e2
movq %r12, %rbp
testl %r14d, %r14d
jne 0x8b81f
testl %eax, %eax
je 0x8b81f
leaq 0x57985(%rip), %rsi     # 0xe3179
leaq 0x6aa1c(%rip), %rdx     # 0xf6217
leaq 0x6a8d4(%rip), %rcx     # 0xf60d6
leaq 0x6a598(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1ba, %r9d            # imm = 0x1BA
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x53488
movq %rax, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movb $0x1, %cl
testl %r14d, %r14d
jne 0x8b8c1
movq %rsp, %rsi
movq %r13, %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8b111
testl %eax, %eax
je 0x8b877
leaq 0x57922(%rip), %rsi     # 0xe3179
leaq 0x6a9d2(%rip), %rdx     # 0xf6230
leaq 0x6a871(%rip), %rcx     # 0xf60d6
leaq 0x6a535(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1be, %r9d            # imm = 0x1BE
jmp 0x8b8b2
movq 0x8(%rsp), %rdi
callq 0x3566a
xorl %ecx, %ecx
movl $0x0, %r12d
testb %al, %al
je 0x8b8c1
leaq 0x578e5(%rip), %rsi     # 0xe3179
leaq 0x5924b(%rip), %rdx     # 0xe4ae6
leaq 0x6a834(%rip), %rcx     # 0xf60d6
leaq 0x6a4f8(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1bf, %r9d            # imm = 0x1BF
xorl %eax, %eax
callq 0x3559f
movb $0x1, %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %cl, %cl
jne 0x8b908
movsd (%rsp), %xmm0
ucomisd 0x61426(%rip), %xmm0    # 0xeccf8
jne 0x8b8d6
jnp 0x8b908
leaq 0x5789c(%rip), %rsi     # 0xe3179
leaq 0x6a97f(%rip), %rdx     # 0xf6263
leaq 0x6a7eb(%rip), %rcx     # 0xf60d6
leaq 0x6a4af(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c0, %r9d            # imm = 0x1C0
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x71073(%rip), %rsi     # 0xfc982
leaq 0x61733(%rip), %rdx     # 0xed049
movsd 0x613e2(%rip), %xmm0    # 0xecd00
movq %rbx, %rdi
callq 0x545ea
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movb $0x1, %cl
testl %r12d, %r12d
jne 0x8b9bd
movq %rsp, %rsi
movq %r13, %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8b111
testl %eax, %eax
je 0x8b973
leaq 0x57826(%rip), %rsi     # 0xe3179
leaq 0x6a8d6(%rip), %rdx     # 0xf6230
leaq 0x6a775(%rip), %rcx     # 0xf60d6
leaq 0x6a439(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c2, %r9d            # imm = 0x1C2
jmp 0x8b9ae
movq 0x8(%rsp), %rdi
callq 0x3566a
xorl %ecx, %ecx
movl $0x0, %r14d
testb %al, %al
je 0x8b9bd
leaq 0x577e9(%rip), %rsi     # 0xe3179
leaq 0x5914f(%rip), %rdx     # 0xe4ae6
leaq 0x6a738(%rip), %rcx     # 0xf60d6
leaq 0x6a3fc(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c3, %r9d            # imm = 0x1C3
xorl %eax, %eax
callq 0x3559f
movb $0x1, %cl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb %cl, %cl
jne 0x8ba04
movsd (%rsp), %xmm0
ucomisd 0x61332(%rip), %xmm0    # 0xecd00
jne 0x8b9d2
jnp 0x8ba04
leaq 0x577a0(%rip), %rsi     # 0xe3179
leaq 0x6a8a0(%rip), %rdx     # 0xf6280
leaq 0x6a6ef(%rip), %rcx     # 0xf60d6
leaq 0x6a3b3(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c4, %r9d            # imm = 0x1C4
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
leaq 0x80e95(%rip), %rsi     # 0x10c8a0
leaq 0x61637(%rip), %rdx     # 0xed049
movsd 0x612ee(%rip), %xmm0    # 0xecd08
movq %rbx, %rdi
callq 0x545ea
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movb $0x1, %cl
testl %r14d, %r14d
jne 0x8bab9
movq %rsp, %rsi
movq %r13, %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8b111
testl %eax, %eax
je 0x8ba6f
leaq 0x5772a(%rip), %rsi     # 0xe3179
leaq 0x6a7da(%rip), %rdx     # 0xf6230
leaq 0x6a679(%rip), %rcx     # 0xf60d6
leaq 0x6a33d(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c6, %r9d            # imm = 0x1C6
jmp 0x8baaa
movq 0x8(%rsp), %rdi
callq 0x3566a
xorl %ecx, %ecx
movl $0x0, %r12d
testb %al, %al
je 0x8bab9
leaq 0x576ed(%rip), %rsi     # 0xe3179
leaq 0x59053(%rip), %rdx     # 0xe4ae6
leaq 0x6a63c(%rip), %rcx     # 0xf60d6
leaq 0x6a300(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c7, %r9d            # imm = 0x1C7
xorl %eax, %eax
callq 0x3559f
movb $0x1, %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %cl, %cl
jne 0x8bb00
movsd (%rsp), %xmm0
ucomisd 0x61236(%rip), %xmm0    # 0xecd00
jne 0x8bace
jnp 0x8bb00
leaq 0x576a4(%rip), %rsi     # 0xe3179
leaq 0x6a7a4(%rip), %rdx     # 0xf6280
leaq 0x6a5f3(%rip), %rcx     # 0xf60d6
leaq 0x6a2b7(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1c8, %r9d            # imm = 0x1C8
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0x70e7b(%rip), %rsi     # 0xfc982
leaq 0x6153b(%rip), %rdx     # 0xed049
movq %rbx, %rdi
callq 0x54937
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movb $0x1, %cl
testl %r12d, %r12d
je 0x8bb28
movq %rbp, %r12
jmp 0x8bb78
movq %rsp, %rsi
movq %r13, %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8b111
testl %eax, %eax
movq %rbp, %r12
je 0x8bc28
leaq 0x5762e(%rip), %rsi     # 0xe3179
leaq 0x6a6de(%rip), %rdx     # 0xf6230
leaq 0x6a57d(%rip), %rcx     # 0xf60d6
leaq 0x6a241(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1ca, %r9d            # imm = 0x1CA
xorl %eax, %eax
callq 0x3559f
movb $0x1, %cl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rbp
testb %cl, %cl
jne 0x8bbc4
movsd (%rsp), %xmm0
ucomisd 0x6117a(%rip), %xmm0    # 0xecd08
jne 0x8bb92
jnp 0x8bbc4
leaq 0x575e0(%rip), %rsi     # 0xe3179
leaq 0x6a6ed(%rip), %rdx     # 0xf628d
leaq 0x6a52f(%rip), %rcx     # 0xf60d6
leaq 0x6a1f3(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1cc, %r9d            # imm = 0x1CC
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq %rbp, %rdi
callq 0x3d1eb
movq 0x40(%rsp), %rdi
callq 0x3d1eb
movq 0x30(%rsp), %rdi
callq 0x8ea90
movq 0x28(%rsp), %rdi
callq 0x8ea90
movq %r13, %rdi
callq 0x8bcd2
movq %rbx, %rdi
callq 0x54be4
movq 0x8(%rsp), %rdi
callq 0x35705
movq %r12, %rdi
callq 0x42ade
movq 0x38(%rsp), %rdi
callq 0x42ade
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
callq 0x3566a
xorl %ecx, %ecx
movl $0x0, %r14d
testb %al, %al
movq 0x10(%rsp), %rbp
je 0x8bb7d
leaq 0x5752b(%rip), %rsi     # 0xe3179
leaq 0x58e91(%rip), %rdx     # 0xe4ae6
leaq 0x6a47a(%rip), %rcx     # 0xf60d6
leaq 0x6a13e(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1cb, %r9d            # imm = 0x1CB
xorl %eax, %eax
callq 0x3559f
movb $0x1, %cl
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x8bb7d
movq %r13, %rdi
callq 0x8ac63
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3c4b0
xorl %ebx, %ebx
movl $0x0, %r14d
testl %eax, %eax
jne 0x8b787
leaq 0x574cf(%rip), %rsi     # 0xe3179
leaq 0x6a518(%rip), %rdx     # 0xf61c9
leaq 0x6a41e(%rip), %rcx     # 0xf60d6
leaq 0x6a0e2(%rip), %r8      # 0xf5da1
movq %r15, %rdi
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x8b73f
callq 0x2147c