// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghsymbol.cc
// Function: DecisionNode::split(DecisionProperties&)
void DecisionNode::split(DecisionProperties &props)

{
  if (list.size() <= 1) {
    bitsize = 0;		// Only one pattern, terminal node by default
    return;
  }

  chooseOptimalField();
  if (bitsize == 0) {
    orderPatterns(props);
    return;
  }
  if ((parent != (DecisionNode *)0) && (list.size() >= parent->num))
    throw LowlevelError("Child has as many Patterns as parent");

  int4 numChildren = 1 << bitsize;

  for(int4 i=0;i<numChildren;++i) {
    DecisionNode *nd = new DecisionNode( this );
    children.push_back( nd );
  }
  for(int4 i=0;i<list.size();++i) {
    vector<uint4> vals;		// Bins this pattern belongs in
				// If the pattern does not care about some
				// bits in the field we are splitting on, that
				// pattern will get put into multiple bins
    consistentValues(vals,list[i].first);
    for(int4 j=0;j<vals.size();++j)
      children[vals[j]]->addConstructorPair(list[i].first,list[i].second);
    delete list[i].first;	// We no longer need original pattern
  }
  list.clear();

  for(int4 i=0;i<numChildren;++i)
    children[i]->split(props);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cmpq $0x10, %rax
ja 0x74c04
andl $0x0, 0x3c(%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %r14, %rdi
callq 0x4f8f0
movl 0x3c(%r14), %ecx
testl %ecx, %ecx
je 0x74d5a
movq %rbx, 0x30(%rsp)
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x74c41
movq 0x8(%r14), %rdx
subq (%r14), %rdx
sarq $0x4, %rdx
movslq 0x30(%rax), %rax
cmpq %rax, %rdx
jae 0x74d73
pushq $0x1
popq %rax
shll %cl, %eax
xorl %ebx, %ebx
testl %eax, %eax
cmovgl %eax, %ebx
leaq 0x18(%r14), %r15
pushq $0x48
popq %r12
leaq 0x10(%rsp), %r13
movl %ebx, 0xc(%rsp)
subl $0x1, %ebx
jb 0x74c8b
movq %r12, %rdi
callq 0x4f5d0
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
callq 0x4fd20
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x4d2b0
jmp 0x74c5e
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %r13, %rdx
jbe 0x74d28
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r13, %rbp
shlq $0x4, %rbp
movq (%rax,%rbp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x502f0
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x74d06
movl (%rax,%rbx,4), %eax
movq (%r14), %rcx
movq 0x18(%r14), %rdx
movq (%rdx,%rax,8), %rdi
movq (%rcx,%rbp), %rsi
movq 0x8(%rcx,%rbp), %rdx
callq 0x4d650
incq %rbx
jmp 0x74ccf
movq (%r14), %rax
movq (%rax,%rbp), %rdi
testq %rdi, %rdi
je 0x74d18
movq (%rdi), %rax
callq *0x8(%rax)
movq %r12, %rdi
callq 0x4e300
incq %r13
jmp 0x74c93
cmpq %rax, %rcx
je 0x74d31
movq %rax, 0x8(%r14)
movl 0xc(%rsp), %ebx
xorl %r14d, %r14d
movq 0x30(%rsp), %r12
cmpq %r14, %rbx
je 0x74bf5
movq (%r15), %rax
movq (%rax,%r14,8), %rdi
movq %r12, %rsi
callq 0x4ecc0
incq %r14
jmp 0x74d3d
movq %r14, %rdi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50ae0
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x13933(%rip), %rsi     # 0x886b8
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x3a0f3(%rip), %rsi     # 0xaeea0
movq 0x39e84(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x74dd3
jmp 0x74dfc
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
jmp 0x74dfc
jmp 0x74def
movq %rax, %r14
pushq $0x48
popq %rsi
movq %rbp, %rdi
callq 0x4f670
jmp 0x74dfc
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e300
movq %r14, %rdi
callq 0x518c0