// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/srm.c
// Function: move_vc_estimates
int move_vc_estimates(Vcestimateptr header, Vcestimateptr from, Vcestimateptr to, Datasetptr d, void* parameters, int nodecount, double previousmse)
{
 /*!Last Changed 05.04.2006*/
 Epsilonestimateptr deleted, added;
 double epsilon, vcdimension, mse;
 int ncount;
 if (to->issaturated)
   return FAILURE;
 epsilon = vc_single_epsilon_estimate(parameters, d, to->n, &ncount);
 if (ncount == nodecount)
  {
   deleted = from->epsilonestimates;
   from->epsilonestimates = from->epsilonestimates->next;
   (from->count)--;
   added = create_epsilon_estimate(epsilon);
   added->next = to->epsilonestimates;
   to->epsilonestimates = added;
   (to->count)++;
   vcdimension = vc_dimension_for_a_design(header, OPTIMIZED_DESIGN, -1);
   mse = mse_fitting_for_vc_dimension(header, vcdimension, -1);   
   if (mse < previousmse)
    {
     safe_free(deleted);
     if (from->count == 0)
      {
       from->before->next = from->next;
       if (from->next)
         from->next->before = from->before;
       safe_free(from);
      }
     return SUCCESS;
    }
   else
    {
     (to->count)--;
     to->epsilonestimates = to->epsilonestimates->next;
     (from->count)++;
     deleted->next = from->epsilonestimates;
     from->epsilonestimates = deleted;
     safe_free(added);
     return FAILURE;
    }
  }
 else
   return FAILURE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0xc1b0b
movl $0x0, -0x4(%rbp)
jmp 0xc1c92
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %edx
leaq -0x6c(%rbp), %rcx
callq 0xc11d0
movsd %xmm0, -0x58(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0xc1c8b
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movsd -0x58(%rbp), %xmm0
callq 0xc0a50
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xc0cc0
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xc10f0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc1c2f
movq -0x48(%rbp), %rdi
callq 0x52e80
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xc1c26
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xc1c1d
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rdi
callq 0x52e80
movl $0x1, -0x4(%rbp)
jmp 0xc1c92
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x50(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x4(%rbp)
jmp 0xc1c92
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)