// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/layout.c
// Function: gt_layout_new_with_twc
GtLayout* gt_layout_new_with_twc(GtDiagram *diagram,
                                 unsigned int width,
                                 GtStyle *style,
                                 GtTextWidthCalculator *twc,
                                 GtError *err)
{
  GtLayout *layout;
  GtHashmap *blocks;
  gt_assert(diagram);
  gt_assert(style);
  gt_assert(twc);
  gt_assert(err);
  if (check_width(width, style, err) < 0)
    return NULL;
  layout = gt_calloc(1, sizeof (GtLayout));
  layout->twc = twc;
  layout->style = style;
  layout->width = width;
  layout->blocks = NULL;
  layout->viewrange = gt_diagram_get_range(diagram);
  layout->nof_tracks = 0;
  layout->track_ordering_func = NULL;
  layout->block_ordering_func = gt_block_compare;
  layout->t_cmp_data = NULL;
  layout->b_cmp_data = NULL;
  layout->lock = gt_rwlock_new();
  layout->own_twc = false;
  layout->layout_done = false;
  layout->custom_tracks = gt_array_ref(gt_diagram_get_custom_tracks(diagram));
  /* XXX: use other container type here! */
  layout->tracks = gt_hashmap_new(GT_HASH_STRING, gt_free_func,
                                  (GtFree) gt_track_delete);
  blocks = gt_diagram_get_blocks(diagram, err);
  if (!blocks) {
    gt_array_delete(layout->custom_tracks);
    gt_hashmap_delete(layout->tracks);
    gt_free(layout);
    return NULL;
  } else
    layout->blocks = gt_hashmap_ref(blocks);
  return layout;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x458cc
movq 0x16e73d(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1187c1(%rip), %rsi    # 0x15e066
leaq 0x1361c9(%rip), %rdx    # 0x17ba75
leaq 0x1232d6(%rip), %rcx    # 0x168b89
leaq 0x1232b1(%rip), %r8     # 0x168b6b
movl $0x10a, %r9d            # imm = 0x10A
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x458ce
jmp 0x458d0
cmpq $0x0, 0x38(%rsp)
jne 0x45910
movq 0x16e6f9(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x11877d(%rip), %rsi    # 0x15e066
leaq 0x13720f(%rip), %rdx    # 0x17caff
leaq 0x123292(%rip), %rcx    # 0x168b89
leaq 0x12326d(%rip), %r8     # 0x168b6b
movl $0x10b, %r9d            # imm = 0x10B
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x45912
jmp 0x45914
cmpq $0x0, 0x30(%rsp)
jne 0x45954
movq 0x16e6b5(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x118739(%rip), %rsi    # 0x15e066
leaq 0x124509(%rip), %rdx    # 0x169e3d
leaq 0x12324e(%rip), %rcx    # 0x168b89
leaq 0x123229(%rip), %r8     # 0x168b6b
movl $0x10c, %r9d            # imm = 0x10C
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x45956
jmp 0x45958
cmpq $0x0, 0x28(%rsp)
jne 0x45998
movq 0x16e671(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1186f5(%rip), %rsi    # 0x15e066
leaq 0x13433e(%rip), %rdx    # 0x179cb6
leaq 0x12320a(%rip), %rcx    # 0x168b89
leaq 0x1231e5(%rip), %r8     # 0x168b6b
movl $0x10d, %r9d            # imm = 0x10D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x4599a
movl 0x44(%rsp), %edi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x457b0
cmpl $0x0, %eax
jge 0x459c0
movq $0x0, 0x50(%rsp)
jmp 0x45b6c
movl $0x1, %edi
movl $0x78, %esi
leaq 0x12319a(%rip), %rdx    # 0x168b6b
movl $0x110, %ecx            # imm = 0x110
callq 0xd5b0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movl 0x44(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x48(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
callq 0x3b7d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0x20(%rsp), %rax
leaq 0x6a7a0(%rip), %rcx     # 0xb0210
movq %rcx, 0x60(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x68(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x70(%rax)
callq 0x1bec0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x20(%rsp), %rax
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movb $0x0, 0x11(%rax)
movq 0x48(%rsp), %rdi
callq 0x3bd20
movq %rax, %rdi
callq 0x75c40
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x1, %edi
leaq -0x37ebb(%rip), %rsi    # 0xdc20
leaq 0x902e(%rip), %rdx      # 0x4eb10
callq 0x86190
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3ba90
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x45b4c
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x770a0
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86cc0
movq 0x20(%rsp), %rdi
leaq 0x123034(%rip), %rsi    # 0x168b6b
movl $0x126, %edx            # imm = 0x126
callq 0xdab0
movq $0x0, 0x50(%rsp)
jmp 0x45b6c
movq 0x18(%rsp), %rdi
callq 0x86460
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)