// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::print(int) const
Node *Tree::insert(Node *parent, const Node *orig)
{
  if (size[1-active] < maxsize) {
    Node *child = root[1-active] + size[1-active]++;
    child->copy_values(orig);
    parent->add_child(child);
    return child;
  } else {
    std::cerr << "WARNING: Out of memory!\n";
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
movl (%rdi), %eax
testl %eax, %eax
je 0x90d1
decl %eax
cltd
idivl %esi
movl %eax, %ebp
movl %edx, %r15d
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %rdi
callq 0x3130
leaq 0x50(%rsp), %r14
movslq %r15d, %rax
leaq 0x182b(%rip), %rcx      # 0xa880
movsbl (%rax,%rcx), %esi
movq %r14, %rdi
callq 0x3220
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x3240
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3390
movq 0x40(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3320
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x3330
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3240
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3390
leaq 0x40(%rsp), %rdi
callq 0x3160
leaq 0x20(%rsp), %rdi
callq 0x30c0
jmp 0x90e0
leaq 0x157a(%rip), %rsi      # 0xa652
movq %rsp, %rdi
callq 0x3370
movq 0x5f09(%rip), %rdi      # 0xeff0
movq (%rdi), %rax
movq -0x18(%rax), %rcx
pushq $0x4
popq %rdx
movq %rdx, 0x8(%rdi,%rcx)
movq -0x18(%rax), %rcx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rdi,%rcx), %esi
orl $0x80, %esi
movl %esi, 0x18(%rdi,%rcx)
movq -0x18(%rax), %rax
movq %rdx, 0x10(%rdi,%rax)
movq %rsp, %rsi
callq 0x31c0
leaq 0x16f3(%rip), %rsi      # 0xa818
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x80, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movsd 0x10(%rbx), %xmm0
divsd 0x8(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x16a3(%rip), %rsi      # 0xa810
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x5, 0x10(%rax,%rcx)
movsd 0x8(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x1665(%rip), %rsi      # 0xa812
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x80, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movsd 0x20(%rbx), %xmm0
divsd 0x18(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x161b(%rip), %rsi      # 0xa810
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x5, 0x10(%rax,%rcx)
movsd 0x18(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x15e6(%rip), %rsi      # 0xa81b
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x80, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movsd 0x30(%rbx), %xmm0
divsd 0x28(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x1593(%rip), %rsi      # 0xa810
movq %rax, %rdi
callq 0x31e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x5, 0x10(%rax,%rcx)
movsd 0x28(%rbx), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x1567(%rip), %rsi      # 0xa824
movq %rax, %rdi
callq 0x31e0
movq %rsp, %rdi
callq 0x30c0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x92ed
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3160
leaq 0x20(%rsp), %rdi
callq 0x30c0
jmp 0x92fc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3340