// File: /workspace/github_c_makefile_star2_O2/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, %r12
testq %rdi, %rdi
je 0x6bfea
movq %r12, %rdi
callq 0xc103
testb %al, %al
jne 0x6c7a9
leaq 0x7ef7f(%rip), %rdi     # 0xeaf70
callq 0x13da9
movq %rax, %r13
leaq 0x6ef01(%rip), %rdi     # 0xdaf01
callq 0x13da9
movq %rax, %rbx
leaq 0x6e218(%rip), %rdi     # 0xda227
callq 0x13da9
movq %rax, 0x10(%rsp)
callq 0xbff0
movq %rax, %r15
movq $0xa, 0x68(%rsp)
pushq $0x32
popq %r14
movq %r14, 0x70(%rsp)
movq $0x28, 0x48(%rsp)
movq %r14, 0x50(%rsp)
leaq 0x89908(%rip), %rsi     # 0xf5950
pushq $0xa
popq %rdx
movq %r13, %rdi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x18cbb
leaq 0x79bbe(%rip), %rsi     # 0xe5c1e
pushq $0x28
popq %rdx
movq %r13, 0x30(%rsp)
movq %r13, %rdi
movq %r14, %rcx
movq %rax, %r14
xorl %r8d, %r8d
callq 0x18cbb
movq %rax, %r13
movq %r14, %rdi
callq 0x6f3d4
movq %rax, 0x20(%rsp)
movq %r13, %rdi
callq 0x6f3d4
movq %rax, 0x18(%rsp)
callq 0x6b40c
movq %rax, %rbp
movq %rax, %rdi
callq 0x6b69d
testq %rax, %rax
movq %r14, 0x28(%rsp)
movq %r15, 0x8(%rsp)
je 0x6c0f1
leaq 0x6009d(%rip), %rsi     # 0xcc159
leaq 0x73326(%rip), %rdx     # 0xdf3e9
leaq 0x7330c(%rip), %rcx     # 0xdf3d6
leaq 0x72fd0(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1a3, %r9d            # imm = 0x1A3
xorl %eax, %eax
callq 0xc007
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6b4e5
jmp 0x6c186
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6b4e5
movq %rbp, %rdi
callq 0x6b69d
cmpq $0x1, %rax
jne 0x6c15a
movq %rbp, %rdi
movq %r13, %r15
movq %r13, %rsi
callq 0x6b4e5
movq %rbp, %rdi
callq 0x6b69d
movb $0x1, %r14b
cmpq $0x2, %rax
je 0x6c197
leaq 0x60029(%rip), %rsi     # 0xcc159
leaq 0x732ee(%rip), %rdx     # 0xdf425
leaq 0x73298(%rip), %rcx     # 0xdf3d6
leaq 0x72f5c(%rip), %r8      # 0xdf0a1
xorl %r14d, %r14d
movq %r12, %rdi
movl $0x1a7, %r9d            # imm = 0x1A7
xorl %eax, %eax
callq 0xc007
jmp 0x6c197
leaq 0x5fff8(%rip), %rsi     # 0xcc159
leaq 0x7329f(%rip), %rdx     # 0xdf407
leaq 0x73267(%rip), %rcx     # 0xdf3d6
leaq 0x72f2b(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1a5, %r9d            # imm = 0x1A5
xorl %eax, %eax
callq 0xc007
movq %rbp, %rdi
movq %r13, %r15
movq %r13, %rsi
callq 0x6b4e5
xorl %r14d, %r14d
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x5d269
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rbp, %rdi
movq %rax, %rsi
callq 0x6b8d4
movq %rbp, %rdi
callq 0x6b254
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
pushq $-0x1
popq %r13
testb %r14b, %r14b
je 0x6c2ab
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5cec8
testl %eax, %eax
je 0x6c217
leaq 0x5ff65(%rip), %rsi     # 0xcc159
leaq 0x73248(%rip), %rdx     # 0xdf443
leaq 0x731d4(%rip), %rcx     # 0xdf3d6
leaq 0x72e98(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1ad, %r9d            # imm = 0x1AD
jmp 0x6c2a4
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5cec8
cmpl $0x1, %eax
jne 0x6c27f
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x6ba8c
movq %rbp, %rdi
callq 0x6b29b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x14573
testl %eax, %eax
je 0x6c456
leaq 0x5ff01(%rip), %rsi     # 0xcc159
leaq 0x73235(%rip), %rdx     # 0xdf494
leaq 0x73170(%rip), %rcx     # 0xdf3d6
leaq 0x72e34(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1b2, %r9d            # imm = 0x1B2
xorl %eax, %eax
callq 0xc007
jmp 0x6c2b6
leaq 0x5fed3(%rip), %rsi     # 0xcc159
leaq 0x731e1(%rip), %rdx     # 0xdf46e
leaq 0x73142(%rip), %rcx     # 0xdf3d6
leaq 0x72e06(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1ae, %r9d            # imm = 0x1AE
xorl %eax, %eax
callq 0xc007
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x6ba8c
movb $0x1, %bl
movl %r13d, %r14d
movq %rbp, %rdi
callq 0x6bb11
testb %bl, %bl
jne 0x6c303
cmpl $0x3, %eax
movq 0x8(%rsp), %r13
je 0x6c308
leaq 0x5fe81(%rip), %rsi     # 0xcc159
leaq 0x7321f(%rip), %rdx     # 0xdf4fe
leaq 0x730f0(%rip), %rcx     # 0xdf3d6
leaq 0x72db4(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %r14
jmp 0x6c308
movq 0x8(%rsp), %r13
movq %rbp, %rdi
xorl %esi, %esi
callq 0x6bacf
movq %rbp, %rdi
callq 0x6bb11
testl %r14d, %r14d
jne 0x6c353
testl %eax, %eax
je 0x6c353
leaq 0x5fe2f(%rip), %rsi     # 0xcc159
leaq 0x731e6(%rip), %rdx     # 0xdf517
leaq 0x7309e(%rip), %rcx     # 0xdf3d6
leaq 0x72d62(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1ba, %r9d            # imm = 0x1BA
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %r14
movq %r12, %rdi
callq 0x32840
movq %rax, %rbx
testl %r14d, %r14d
jne 0x6c4d1
movq %rsp, %rsi
movq %rbp, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x6bbd9
testl %eax, %eax
je 0x6c3a6
leaq 0x5fdd6(%rip), %rsi     # 0xcc159
leaq 0x731a6(%rip), %rdx     # 0xdf530
leaq 0x73045(%rip), %rcx     # 0xdf3d6
leaq 0x72d09(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1be, %r9d            # imm = 0x1BE
jmp 0x6c4ca
movq %r13, %rdi
callq 0xc103
testb %al, %al
je 0x6c3dc
leaq 0x5fda0(%rip), %rsi     # 0xcc159
leaq 0x61706(%rip), %rdx     # 0xcdac6
leaq 0x7300f(%rip), %rcx     # 0xdf3d6
leaq 0x72cd3(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1bf, %r9d            # imm = 0x1BF
jmp 0x6c4ca
movsd (%rsp), %xmm0
ucomisd 0x698b7(%rip), %xmm0    # 0xd5ca0
jne 0x6c4a5
jp 0x6c4a5
leaq 0x79822(%rip), %rsi     # 0xe5c1e
leaq 0x69bee(%rip), %rdx     # 0xd5ff1
movsd 0x6989d(%rip), %xmm0    # 0xd5ca8
movq %rbx, %rdi
callq 0x34010
movq %rsp, %rsi
movq %rbp, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x6bbd9
testl %eax, %eax
je 0x6c58b
leaq 0x5fd26(%rip), %rsi     # 0xcc159
leaq 0x730f6(%rip), %rdx     # 0xdf530
leaq 0x72f95(%rip), %rcx     # 0xdf3d6
leaq 0x72c59(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c2, %r9d            # imm = 0x1C2
jmp 0x6c654
movq %rbp, %rdi
callq 0x6b29b
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x14573
xorl %ebx, %ebx
movl $0x0, %r14d
testl %eax, %eax
jne 0x6c2bb
leaq 0x5fcd7(%rip), %rsi     # 0xcc159
leaq 0x73040(%rip), %rdx     # 0xdf4c9
leaq 0x72f46(%rip), %rcx     # 0xdf3d6
leaq 0x72c0a(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x6c276
leaq 0x5fcad(%rip), %rsi     # 0xcc159
leaq 0x730b0(%rip), %rdx     # 0xdf563
leaq 0x72f1c(%rip), %rcx     # 0xdf3d6
leaq 0x72be0(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c0, %r9d            # imm = 0x1C0
xorl %eax, %eax
callq 0xc007
leaq 0x79746(%rip), %rsi     # 0xe5c1e
leaq 0x69b12(%rip), %rdx     # 0xd5ff1
movsd 0x697c1(%rip), %xmm0    # 0xd5ca8
movq %rbx, %rdi
callq 0x34010
leaq 0x8945a(%rip), %rsi     # 0xf5950
leaq 0x69af4(%rip), %rdx     # 0xd5ff1
movsd 0x697ab(%rip), %xmm0    # 0xd5cb0
movq %rbx, %rdi
callq 0x34010
leaq 0x7970a(%rip), %rsi     # 0xe5c1e
leaq 0x69ad6(%rip), %rdx     # 0xd5ff1
movq %rbx, %rdi
callq 0x34510
pushq $-0x1
popq %r14
movq 0x10(%rsp), %rdi
callq 0x152db
movq 0x30(%rsp), %rdi
callq 0x152db
movq 0x20(%rsp), %rdi
callq 0x6fad9
movq 0x18(%rsp), %rdi
callq 0x6fad9
movq %rbp, %rdi
callq 0x6c7e1
movq %rbx, %rdi
callq 0x34915
movq %r13, %rdi
callq 0xc291
movq 0x28(%rsp), %rdi
callq 0x1d1e3
movq %r15, %rdi
callq 0x1d1e3
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0xc103
testb %al, %al
je 0x6c5c1
leaq 0x5fbbb(%rip), %rsi     # 0xcc159
leaq 0x61521(%rip), %rdx     # 0xcdac6
leaq 0x72e2a(%rip), %rcx     # 0xdf3d6
leaq 0x72aee(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c3, %r9d            # imm = 0x1C3
jmp 0x6c654
movsd (%rsp), %xmm0
ucomisd 0x696da(%rip), %xmm0    # 0xd5ca8
jne 0x6c62f
jp 0x6c62f
leaq 0x89377(%rip), %rsi     # 0xf5950
leaq 0x69a11(%rip), %rdx     # 0xd5ff1
movsd 0x696c8(%rip), %xmm0    # 0xd5cb0
movq %rbx, %rdi
callq 0x34010
movq %rsp, %rsi
movq %rbp, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x6bbd9
testl %eax, %eax
je 0x6c660
leaq 0x5fb4d(%rip), %rsi     # 0xcc159
leaq 0x72f1d(%rip), %rdx     # 0xdf530
leaq 0x72dbc(%rip), %rcx     # 0xdf3d6
leaq 0x72a80(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c6, %r9d            # imm = 0x1C6
jmp 0x6c721
leaq 0x5fb23(%rip), %rsi     # 0xcc159
leaq 0x72f43(%rip), %rdx     # 0xdf580
leaq 0x72d92(%rip), %rcx     # 0xdf3d6
leaq 0x72a56(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c4, %r9d            # imm = 0x1C4
xorl %eax, %eax
callq 0xc007
jmp 0x6c4ef
movq %r13, %rdi
callq 0xc103
testb %al, %al
je 0x6c696
leaq 0x5fae6(%rip), %rsi     # 0xcc159
leaq 0x6144c(%rip), %rdx     # 0xcdac6
leaq 0x72d55(%rip), %rcx     # 0xdf3d6
leaq 0x72a19(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c7, %r9d            # imm = 0x1C7
jmp 0x6c721
movsd (%rsp), %xmm0
ucomisd 0x69605(%rip), %xmm0    # 0xd5ca8
jne 0x6c6fc
jp 0x6c6fc
leaq 0x79570(%rip), %rsi     # 0xe5c1e
leaq 0x6993c(%rip), %rdx     # 0xd5ff1
movq %rbx, %rdi
callq 0x34510
movq %rsp, %rsi
movq %rbp, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x6bbd9
testl %eax, %eax
je 0x6c72d
leaq 0x5fa80(%rip), %rsi     # 0xcc159
leaq 0x72e50(%rip), %rdx     # 0xdf530
leaq 0x72cef(%rip), %rcx     # 0xdf3d6
leaq 0x729b3(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1ca, %r9d            # imm = 0x1CA
jmp 0x6c79d
leaq 0x5fa56(%rip), %rsi     # 0xcc159
leaq 0x72e76(%rip), %rdx     # 0xdf580
leaq 0x72cc5(%rip), %rcx     # 0xdf3d6
leaq 0x72989(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1c8, %r9d            # imm = 0x1C8
xorl %eax, %eax
callq 0xc007
jmp 0x6c50d
movq %r13, %rdi
callq 0xc103
testb %al, %al
je 0x6c760
leaq 0x5fa19(%rip), %rsi     # 0xcc159
leaq 0x6137f(%rip), %rdx     # 0xcdac6
leaq 0x72c88(%rip), %rcx     # 0xdf3d6
leaq 0x7294c(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1cb, %r9d            # imm = 0x1CB
jmp 0x6c79d
movsd (%rsp), %xmm0
xorl %r14d, %r14d
ucomisd 0x69540(%rip), %xmm0    # 0xd5cb0
jne 0x6c778
jnp 0x6c527
leaq 0x5f9da(%rip), %rsi     # 0xcc159
leaq 0x72e07(%rip), %rdx     # 0xdf58d
leaq 0x72c49(%rip), %rcx     # 0xdf3d6
leaq 0x7290d(%rip), %r8      # 0xdf0a1
movq %r12, %rdi
movl $0x1cc, %r9d            # imm = 0x1CC
xorl %eax, %eax
callq 0xc007
jmp 0x6c523
movq 0xc1808(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x5d8ac(%rip), %rsi     # 0xca066
leaq 0x5de98(%rip), %rdx     # 0xca659
leaq 0x72c0e(%rip), %rcx     # 0xdf3d6
leaq 0x728d2(%rip), %r8      # 0xdf0a1
movl $0x18b, %r9d            # imm = 0x18B
xorl %eax, %eax
callq 0xb8c0
callq 0xb300