// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/layout.c
// Function: gt_layout_sketch
int gt_layout_sketch(GtLayout *layout, GtCanvas *target_canvas, GtError *err)
{
  int had_err = 0;
  GtUword i;
  GtRenderTraverseInfo rti;
  gt_assert(layout && target_canvas);

  had_err = layout_all_tracks(layout, err);
  if (!had_err) {
    rti.layout = layout;
    rti.canvas = target_canvas;
    had_err = gt_canvas_visit_layout_pre(target_canvas, layout, err);
    if (had_err) return had_err;

    if (layout->track_ordering_func == NULL) {
      had_err = gt_hashmap_foreach_in_key_order(layout->tracks, render_tracks,
                                                &rti, err);
    } else {
      had_err = gt_hashmap_foreach_ordered(layout->tracks, render_tracks,
                                           &rti, (GtCompare) track_cmp_wrapper,
                                           err);
    }
    if (had_err) return had_err;
    had_err = gt_canvas_visit_layout_post(target_canvas, layout, err);
    if (had_err) return had_err;
    for (i=0;i<gt_array_size(layout->custom_tracks);i++)
    {
      GtCustomTrack *ct = *(GtCustomTrack**) gt_array_get(layout->custom_tracks,
                                                          i);
      had_err = render_custom_tracks(NULL, ct, &rti, err);
    }
  }
  return had_err ? -1 : 0;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x45c5b
cmpq $0x0, 0x40(%rsp)
jne 0x45c93
movq 0x16e376(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1183fa(%rip), %rsi    # 0x15e066
leaq 0x122f2d(%rip), %rdx    # 0x168ba0
leaq 0x122f3e(%rip), %rcx    # 0x168bb8
leaq 0x122eea(%rip), %r8     # 0x168b6b
movl $0x149, %r9d            # imm = 0x149
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x45c95
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x45e30
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x45e05
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x3a920
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x45cf3
movl 0x34(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x45e1a
movq 0x48(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x45d24
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x38(%rsp), %rcx
leaq 0x22c(%rip), %rsi       # 0x45f40
leaq 0x18(%rsp), %rdx
callq 0x86750
movl %eax, 0x34(%rsp)
jmp 0x45d4e
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x38(%rsp), %r8
leaq 0x207(%rip), %rsi       # 0x45f40
leaq 0x18(%rsp), %rdx
leaq 0x2ab(%rip), %rcx       # 0x45ff0
callq 0x865b0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x45d62
movl 0x34(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x45e1a
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x3a9c0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
je 0x45d8e
movl 0x34(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x45e1a
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x76490
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x45e03
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x75c80
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edi
leaq 0x18(%rsp), %rdx
callq 0x460b0
movl %eax, 0x34(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x45d97
jmp 0x45e05
movl 0x34(%rsp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)