// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_discrete_recursive
double decisiontree_vc_dimension_discrete_recursive(Datasetptr current_dataset, int d, Decisionnodeptr rootnode)
{
 int i, sum;
 BOOLEAN all_leaves = BOOLEAN_TRUE;
 if (rootnode->featureno == LEAF_NODE)
   return 1;
 for (i = 0; i < current_dataset->features[rootnode->featureno].valuecount; i++)
   if (rootnode->string[i].featureno != LEAF_NODE)
     all_leaves = BOOLEAN_FALSE;
 if (all_leaves)
  {
   sum = 1;
   for (i = 0; i < current_dataset->featurecount; i++)
     if (current_dataset->features[i].type != CLASSDEF)
       sum += pow(2, current_dataset->features[i].valuecount - 1) - 1; 
   return log2(sum) + 1;
  }
 sum = 0;
 for (i = 0; i < current_dataset->features[rootnode->featureno].valuecount; i++)
   sum += ((int) decisiontree_vc_dimension_discrete_recursive(current_dataset, d - 1, &(rootnode->string[i])));
 return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x30(%rax)
jne 0xe0286
movsd 0x1d9c(%rip), %xmm0     # 0xe2018
movsd %xmm0, -0x8(%rbp)
jmp 0xe0418
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movq -0x20(%rbp), %rdx
movslq 0x30(%rdx), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0xe02e2
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x160, %rcx, %rcx      # imm = 0x160
addq %rcx, %rax
cmpl $-0x1, 0x30(%rax)
je 0xe02d5
movl $0x0, -0x2c(%rbp)
jmp 0xe02d7
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe028d
cmpl $0x0, -0x2c(%rbp)
je 0xe03a1
movl $0x1, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0xe0384
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x24(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0xe0374
movq -0x10(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x24(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl 0x18(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x2950(%rip), %xmm0     # 0xe2ca0
callq 0x4290
movaps %xmm0, %xmm1
movsd 0x1cb8(%rip), %xmm0     # 0xe2018
subsd %xmm0, %xmm1
cvtsi2sdl -0x28(%rbp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x28(%rbp)
jmp 0xe0376
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe02fa
cvtsi2sdl -0x28(%rbp), %xmm0
callq 0x52ad0
movsd 0x1c82(%rip), %xmm1     # 0xe2018
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe0418
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movq -0x20(%rbp), %rdx
movslq 0x30(%rdx), %rdx
imulq $0x340, %rdx, %rdx      # imm = 0x340
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0xe040e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl $0x1, %esi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movslq -0x24(%rbp), %rax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rdx
callq 0xe0250
cvttsd2si %xmm0, %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe03af
cvtsi2sdl -0x28(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)