// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_new_copy
VL_EXPORT VlKMeans *
vl_kmeans_new_copy (VlKMeans const * kmeans)
{
  VlKMeans * self = vl_malloc(sizeof(VlKMeans)) ;

  self->algorithm = kmeans->algorithm ;
  self->distance = kmeans->distance ;
  self->dataType = kmeans->dataType ;

  self->verbosity = kmeans->verbosity ;
  self->maxNumIterations = kmeans->maxNumIterations ;
  self->numRepetitions = kmeans->numRepetitions ;

  self->dimension = kmeans->dimension ;
  self->numCenters = kmeans->numCenters ;
  self->centers = NULL ;
  self->centerDistances = NULL ;

  self->numTrees = kmeans->numTrees;
  self->maxNumComparisons = kmeans->maxNumComparisons;

  if (kmeans->centers) {
    vl_size dataSize = vl_get_type_size(self->dataType) * self->dimension * self->numCenters ;
    self->centers = vl_malloc(dataSize) ;
    memcpy (self->centers, kmeans->centers, dataSize) ;
  }

  if (kmeans->centerDistances) {
    vl_size dataSize = vl_get_type_size(self->dataType) * self->numCenters * self->numCenters ;
    self->centerDistances = vl_malloc(dataSize) ;
    memcpy (self->centerDistances, kmeans->centerDistances, dataSize) ;
  }

  return self ;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x80, %edi
callq 0x9660
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movl 0x2c(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x2c(%rax)
movq 0x20(%rsp), %rax
movl 0x30(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x20(%rsp), %rax
movl (%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movl 0x50(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x50(%rax)
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x60(%rax)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x2ec0f
movq 0x18(%rsp), %rax
movl (%rax), %edi
callq 0x2ec80
movq 0x18(%rsp), %rcx
imulq 0x8(%rcx), %rax
movq 0x18(%rsp), %rcx
imulq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x9660
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x9640
movq 0x20(%rsp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2ec72
movq 0x18(%rsp), %rax
movl (%rax), %edi
callq 0x2ec80
movq 0x18(%rsp), %rcx
imulq 0x10(%rcx), %rax
movq 0x18(%rsp), %rcx
imulq 0x10(%rcx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x9660
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x18(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0x8(%rsp), %rdx
callq 0x9640
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)