// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/diagram.c
// Function: add_to_parent
static int add_to_parent(GtDiagram *d, GtFeatureNode *node,
                         GtFeatureNode *parent, GtError *err)
{
  GtBlock *block = NULL;
  NodeInfoElement *par_ni, *ni;
  gt_assert(d && node);
  if (!parent)
    return 0;
  par_ni = nodeinfo_get(d, parent);
  ni = nodeinfo_get(d, node);
  gt_log_log("adding %s to parent %p", gt_feature_node_get_type(node), parent);
  ni->parent = parent;
  block = nodeinfo_find_block(par_ni,
                              gt_feature_node_get_type(node),
                              parent);
  if (!block) {
    block = gt_block_new_from_node(parent);
    gt_block_set_type(block, gt_feature_node_get_type(node));
    if (assign_block_caption(d, node, parent, block, err) < 0) {
      gt_block_delete(block);
      return -1;
    }
    nodeinfo_add_block(par_ni,
                     gt_feature_node_get_type((GtFeatureNode*) node),
                     parent,
                     block);
  }
  gt_assert(block);
  gt_block_insert_element(block, node);
  return 0;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x3d711
cmpq $0x0, 0x40(%rsp)
jne 0x3d749
movq 0x1768c0(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x120944(%rip), %rsi    # 0x15e066
leaq 0x12a3e4(%rip), %rdx    # 0x167b0d
leaq 0x12a5f9(%rip), %rcx    # 0x167d29
leaq 0x12a220(%rip), %r8     # 0x167957
movl $0x13e, %r9d            # imm = 0x13E
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x3d74b
cmpq $0x0, 0x38(%rsp)
jne 0x3d760
movl $0x0, 0x54(%rsp)
jmp 0x3d8da
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x3d8f0
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3d8f0
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
callq 0x211d0
movq %rax, %rsi
movq 0x38(%rsp), %rdx
leaq 0x12a596(%rip), %rdi    # 0x167d37
movb $0x0, %al
callq 0xc930
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x211d0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rdx
callq 0x3d9e0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x3d87f
movq 0x38(%rsp), %rdi
callq 0xb0640
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x211d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xb1080
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
callq 0x3e0b0
cmpl $0x0, %eax
jge 0x3d856
movq 0x28(%rsp), %rdi
callq 0xb21b0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x3d8da
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x211d0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x3db00
jmp 0x3d881
cmpq $0x0, 0x28(%rsp)
jne 0x3d8c1
movq 0x176748(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1207cc(%rip), %rsi    # 0x15e066
leaq 0x1375ee(%rip), %rdx    # 0x174e8f
leaq 0x12a481(%rip), %rcx    # 0x167d29
leaq 0x12a0a8(%rip), %r8     # 0x167957
movl $0x154, %r9d            # imm = 0x154
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x3d8c3
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xb0730
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)