// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/layout.c
// Function: gt_layout_get_height
int gt_layout_get_height(GtLayout *layout, GtUword *result,
                         GtError *err)
{
  int had_err = 0;
  GtTracklineInfo lines;
  double tmp, head_track_space = HEAD_TRACK_SPACE_DEFAULT;
  bool show_track_captions = true;
  GtUword height, i;
  gt_assert(layout);

  had_err = layout_all_tracks(layout, err);
  if (!had_err) {
    /* get dynamic heights from tracks */
    lines.style = layout->style;
    lines.height = 0;
    if (gt_hashmap_foreach(layout->tracks, add_tracklines, &lines, err) < 0) {
      return -1;
    }
    height = lines.height;

    if (gt_style_get_bool(layout->style,
                          "format","show_track_captions",
                          &show_track_captions,
                          NULL, err) == GT_STYLE_QUERY_ERROR) {
      return -1;
    }

    /* add custom track space allotment */
    if (show_track_captions)
    {
      double theight = TEXT_SIZE_DEFAULT,
             captionspace = CAPTION_BAR_SPACE_DEFAULT;
      if (gt_style_get_num(layout->style,
                           "format", "track_caption_font_size",
                           &theight, NULL, err) == GT_STYLE_QUERY_ERROR) {
        return -1;
      }
      if (gt_style_get_num(layout->style,
                           "format", "track_caption_space",
                           &captionspace, NULL, err) == GT_STYLE_QUERY_ERROR) {
        return -1;
      }
      height += gt_array_size(layout->custom_tracks)
                    * (theight + captionspace);
    }

    for (i=0;i<gt_array_size(layout->custom_tracks);i++)
    {
      GtCustomTrack *ct = *(GtCustomTrack**) gt_array_get(layout->custom_tracks,
                                                          i);
      height += gt_custom_track_get_height(ct);
      if (gt_style_get_num(layout->style, "format", "track_vspace", &tmp,
                           NULL, err) == GT_STYLE_QUERY_ERROR) {
        return -1;
      }
      height += tmp;
    }

    /* add header space and footer */
    if (gt_style_get_num(layout->style, "format", "ruler_space",
                         &head_track_space, NULL,
                         err) == GT_STYLE_QUERY_ERROR) {
      return -1;
    }
    height += HEADER_SPACE + head_track_space + FOOTER_SPACE;

    *result = height;
    return 0;
  }
  return had_err;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movl $0x0, 0x64(%rsp)
movsd 0x122712(%rip), %xmm0   # 0x168b18
movsd %xmm0, 0x40(%rsp)
movb $0x1, 0x3f(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x46451
movq 0x16dbb8(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x117c3c(%rip), %rsi    # 0x15e066
leaq 0x12128a(%rip), %rdx    # 0x1676bb
leaq 0x12287f(%rip), %rcx    # 0x168cb7
leaq 0x12272c(%rip), %r8     # 0x168b6b
movl $0x19b, %r9d            # imm = 0x19B
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x46453
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x45e30
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x46818
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x68(%rsp), %rcx
leaq 0x3a4(%rip), %rsi       # 0x46840
leaq 0x50(%rsp), %rdx
callq 0x866f0
cmpl $0x0, %eax
jge 0x464bb
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %r9
leaq 0x117cbd(%rip), %rsi    # 0x15e196
leaq 0x1227ec(%rip), %rdx    # 0x168ccc
leaq 0x3f(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4a140
cmpl $0x2, %eax
jne 0x46504
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
testb $0x1, 0x3f(%rsp)
je 0x4663a
movsd 0x121e21(%rip), %xmm0   # 0x168338
movsd %xmm0, 0x20(%rsp)
movsd 0x1225fb(%rip), %xmm0   # 0x168b20
movsd %xmm0, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %r9
leaq 0x117c57(%rip), %rsi    # 0x15e196
leaq 0x12279a(%rip), %rdx    # 0x168ce0
leaq 0x20(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0x4656a
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %r9
leaq 0x117c18(%rip), %rsi    # 0x15e196
leaq 0x122773(%rip), %rdx    # 0x168cf8
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0x465a9
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x76490
movq %rax, %xmm0
movaps 0x117ebd(%rip), %xmm4   # 0x15e480
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movapd 0x117ec1(%rip), %xmm3   # 0x15e490
subpd %xmm3, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
addsd %xmm1, %xmm2
movq 0x30(%rsp), %xmm1
punpckldq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
subpd %xmm3, %xmm1
movaps %xmm1, %xmm3
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x121302(%rip), %xmm1   # 0x167928
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x4674a
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x75c80
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xb6780
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %r9
leaq 0x117ae7(%rip), %rsi    # 0x15e196
leaq 0x122656(%rip), %rdx    # 0x168d0c
leaq 0x48(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0x466da
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
movsd 0x48(%rsp), %xmm1
movaps 0x117d99(%rip), %xmm2   # 0x15e480
movq 0x30(%rsp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x117d97(%rip), %xmm2   # 0x15e490
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x121205(%rip), %xmm1   # 0x167928
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x46643
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %r9
leaq 0x117a38(%rip), %rsi    # 0x15e196
leaq 0x1225b4(%rip), %rdx    # 0x168d19
leaq 0x40(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0x46789
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x46823
movsd 0x40(%rsp), %xmm1
movsd 0x122391(%rip), %xmm0   # 0x168b28
addsd %xmm0, %xmm1
movsd 0x12237d(%rip), %xmm0   # 0x168b20
addsd %xmm0, %xmm1
movaps 0x117cd2(%rip), %xmm2   # 0x15e480
movq 0x30(%rsp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x117cd0(%rip), %xmm2   # 0x15e490
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x12113e(%rip), %xmm1   # 0x167928
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x84(%rsp)
jmp 0x46823
movl 0x64(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)