// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x31496
movq %rdx, %r12
testq %rdx, %rdx
je 0x314c7
movq %rcx, %r13
testq %rcx, %rcx
je 0x314f5
movq %r8, %rbx
testq %r8, %r8
je 0x31523
movl %esi, %ebp
movq %rdi, %r15
movl %esi, %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x312c0
testl %eax, %eax
js 0x31481
leaq 0xa3562(%rip), %rdx     # 0xd4913
pushq $0x1
popq %rdi
pushq $0x78
popq %rsi
movl $0x110, %ecx            # imm = 0x110
callq 0xce9a
movq %rax, %r14
movq %r13, 0x8(%rax)
movq %r12, (%rax)
movl %ebp, 0x48(%rax)
andq $0x0, 0x28(%rax)
movq %r15, %rdi
callq 0x2a933
movq %rax, 0x30(%r14)
movq %rdx, 0x38(%r14)
andq $0x0, 0x40(%r14)
andq $0x0, 0x58(%r14)
leaq 0x39d94(%rip), %rax     # 0x6b188
movq %rax, 0x60(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r14)
callq 0x15d09
movq %rax, 0x50(%r14)
andw $0x0, 0x10(%r14)
movq %r15, %rdi
callq 0x2acc3
movq %rax, %rdi
callq 0x4b482
movq %rax, 0x18(%r14)
leaq -0x2409b(%rip), %rsi    # 0xd38f
leaq 0x6112(%rip), %rdx      # 0x37543
pushq $0x1
popq %rdi
callq 0x55da4
movq %rax, 0x20(%r14)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2ab31
testq %rax, %rax
je 0x3145b
movq %rax, %rdi
callq 0x55ef1
movq %rax, 0x28(%r14)
jmp 0x31484
movq 0x18(%r14), %rdi
callq 0x4c19d
movq 0x20(%r14), %rdi
callq 0x563a7
leaq 0xa349f(%rip), %rsi     # 0xd4913
movq %r14, %rdi
movl $0x126, %edx            # imm = 0x126
callq 0xd249
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xfcb1b(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x98bbf(%rip), %rsi     # 0xca066
leaq 0xb5411(%rip), %rdx     # 0xe68bf
leaq 0xa347c(%rip), %rcx     # 0xd4931
leaq 0xa3457(%rip), %r8      # 0xd4913
movl $0x10a, %r9d            # imm = 0x10A
jmp 0x3154f
movq 0xfcaea(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x98b8e(%rip), %rsi     # 0xca066
leaq 0xb6429(%rip), %rdx     # 0xe7908
leaq 0xa344b(%rip), %rcx     # 0xd4931
leaq 0xa3426(%rip), %r8      # 0xd4913
movl $0x10b, %r9d            # imm = 0x10B
jmp 0x3154f
movq 0xfcabc(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x98b60(%rip), %rsi     # 0xca066
leaq 0xa46cb(%rip), %rdx     # 0xd5bd8
leaq 0xa341d(%rip), %rcx     # 0xd4931
leaq 0xa33f8(%rip), %r8      # 0xd4913
movl $0x10c, %r9d            # imm = 0x10C
jmp 0x3154f
movq 0xfca8e(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x98b32(%rip), %rsi     # 0xca066
leaq 0xb3623(%rip), %rdx     # 0xe4b5e
leaq 0xa33ef(%rip), %rcx     # 0xd4931
leaq 0xa33ca(%rip), %r8      # 0xd4913
movl $0x10d, %r9d            # imm = 0x10D
xorl %eax, %eax
callq 0xb8c0
callq 0xb300