// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/annotationsketch/block.c
// Function: gt_block_get_max_height
int gt_block_get_max_height(const GtBlock *block, double *result,
                            const GtStyle *sty, GtError *err)
{
  GtUword max_height = 0;
  GtStyleQueryStatus rval = GT_STYLE_QUERY_OK;
  GtUword i;
  gt_assert(block && sty);
  for (i=0;i<gt_array_size(block->elements);i++) {
    GtElement *elem;
    double height = 0;
    elem = *(GtElement**) gt_array_get(block->elements, i);
    /* get default or image-wide bar height */
    rval = gt_style_get_num(sty, "format", "bar_height", &height, NULL, err);
    switch (rval) {
    case GT_STYLE_QUERY_ERROR:
      return -1;
      break; /* should never reach this */
    case GT_STYLE_QUERY_NOT_SET:
      height = BAR_HEIGHT_DEFAULT;
      break;
    default:
      /* do nothing */
      break;
    }
    /* try to get type-specific bar height */
    rval = gt_style_get_num(sty, gt_element_get_type(elem), "bar_height",
                            &height, gt_element_get_node_ref(elem),
                            err);
    if (rval == GT_STYLE_QUERY_ERROR) {
      return -1;
    }
    if (gt_double_smaller_double(max_height, height))
      max_height = height;
  }
  *result = max_height;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x8b2ab
movq %rdx, %r15
testq %rdx, %rdx
je 0x8b2ab
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq (%rdi), %rdi
callq 0x6ecda
testq %rax, %rax
je 0x8b28b
movq %rbx, 0x10(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq (%r12), %rdi
movq %r13, %rsi
callq 0x6e9fa
movq (%rax), %rbx
xorl %ebp, %ebp
movq %r15, %rdi
leaq 0x56014(%rip), %rsi     # 0xe1196
leaq 0x61ec0(%rip), %rdx     # 0xed049
movq %rsp, %rcx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x545d2
cmpl $0x2, %eax
je 0x8b249
cmpl $0x1, %eax
jne 0x8b1b3
movabsq $0x4030000000000000, %rax # imm = 0x4030000000000000
movq %rax, (%rsp)
movq %rbx, %rdi
callq 0x8e691
movq %rax, %rbp
movq %rbx, %rdi
callq 0x8e6dc
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x61e76(%rip), %rdx     # 0xed049
movq %rsp, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x545d2
cmpl $0x2, %eax
jne 0x8b1ea
xorl %ebp, %ebp
jmp 0x8b249
movsd 0x8(%rsp), %xmm1
unpcklps 0x56289(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x56291(%rip), %xmm1    # 0xe1490
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd (%rsp), %xmm1
callq 0x7a0a0
movsd (%rsp), %xmm1
movapd %xmm1, %xmm0
subsd 0x5f58a(%rip), %xmm0    # 0xea7b0
testb %al, %al
je 0x8b246
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x8(%rsp)
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8b297
incq %r13
movq (%r12), %rdi
callq 0x6ecda
cmpq %rax, %r13
jb 0x8b15f
movsd 0x8(%rsp), %xmm1
unpcklps 0x56210(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x56218(%rip), %xmm1    # 0xe1490
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq 0x10(%rsp), %rbx
jmp 0x8b28f
xorpd %xmm0, %xmm0
movsd %xmm0, (%rbx)
xorl %eax, %eax
jmp 0x8b29c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2140a