// File: atfrank[P]PCASA/lib/DTree.cpp
// Function: DTree::addDTree(double, DTreeNode*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DTree::addDTree(double key, DTreeNode *node, unsigned int index, std::string classin){
  if (node->left != NULL){
    addDTree(key, node->left, index, classin);
  }
  else{
    node->left=new DTreeNode;
    node->left->key_value=key;
    node->left->inx=index;
    node->left->left=NULL; //Sets left child of child node to NULL
    node->left->right=NULL; //Sets right child of child node to NULL
    node->left->leaf=classin; //The class of this node node
  }
  if (node->right != NULL){
    addDTree(key, node->right, index, classin);
  }
  else{
    node->right=new DTreeNode;
    node->right->key_value=key;
    node->right->inx=index;
    node->right->left=NULL; //Sets left child of child node to NULL
    node->right->right=NULL; //Sets right child of child node to NULL
    node->right->leaf=classin; //The class of this node node
  }
}

// Assembly:
subq $0xd8, %rsp
movq %rcx, 0x50(%rsp)
movq %rdi, 0xd0(%rsp)
movsd %xmm0, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movl %edx, 0xbc(%rsp)
movq %rcx, 0xb0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3b30e
movq 0x50(%rsp), %rsi
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0x44(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x51b0
movq 0x58(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movq 0x38(%rsp), %rsi
movl 0x44(%rsp), %edx
movq 0x48(%rsp), %rcx
callq 0x3b220
jmp 0x3b2d6
leaq 0x90(%rsp), %rdi
callq 0x5250
jmp 0x3b3a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x5250
jmp 0x3b4ea
movl $0x40, %edi
callq 0x5410
movq %rax, %rdi
movq %rdi, 0x28(%rsp)
callq 0x3c730
movq 0x28(%rsp), %rcx
movq 0x50(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq %rcx, 0x10(%rax)
movsd 0xc8(%rsp), %xmm0
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movsd %xmm0, (%rax)
movl 0xbc(%rsp), %ecx
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movl %ecx, 0x8(%rax)
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x10(%rax)
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x18(%rax)
movq 0xc0(%rsp), %rax
movq 0x10(%rax), %rdi
addq $0x20, %rdi
callq 0x5060
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3b44b
movq 0x50(%rsp), %rsi
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0x1c(%rsp)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x51b0
movq 0x58(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rcx
callq 0x3b220
jmp 0x3b419
leaq 0x60(%rsp), %rdi
callq 0x5250
jmp 0x3b4e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5250
jmp 0x3b4ea
movl $0x40, %edi
callq 0x5410
movq %rax, %rdi
movq %rdi, (%rsp)
callq 0x3c730
movq (%rsp), %rcx
movq 0x50(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq %rcx, 0x18(%rax)
movsd 0xc8(%rsp), %xmm0
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movsd %xmm0, (%rax)
movl 0xbc(%rsp), %ecx
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x8(%rax)
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movq $0x0, 0x10(%rax)
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movq $0x0, 0x18(%rax)
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rdi
addq $0x20, %rdi
callq 0x5060
addq $0xd8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x5720
nopw (%rax,%rax)