LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_apply_bounds_f
static void
VL_XCAT(_vl_gmm_apply_bounds_, SFX)(VlGMM * self)
{
  vl_uindex dim ;
  vl_uindex k ;
  vl_size numAdjusted = 0 ;
  TYPE * cov = (TYPE*)self->covariances ;
  double const * lbs = self->sigmaLowBound ;

  for (k = 0 ; k < self->numClusters ; ++k) {
    vl_bool adjusted = VL_FALSE ;
    for (dim = 0 ; dim < self->dimension ; ++dim) {
      if (cov[k * self->dimension + dim] < lbs[dim] ) {
        cov[k * self->dimension + dim] = lbs[dim] ;
        adjusted = VL_TRUE ;
      }
    }
    if (adjusted) { numAdjusted ++ ; }
  }

  if (numAdjusted > 0 && self->verbosity > 0) {
    VL_PRINT("gmm: detected %d of %d modes with at least one dimension "
             "with covariance too small (set to lower bound)\n",
             numAdjusted, self->numClusters) ;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x40(%rdi), %rcx
movq 0x58(%rdi), %rdx
xorl %esi, %esi
pushq $0x1
popq %rdi
xorl %r14d, %r14d
xorl %r8d, %r8d
cmpq %rax, %r8
je 0x12d2d
movq 0x8(%rbx), %r9
movq %r9, %r10
imulq %rsi, %r10
addq %rcx, %r10
xorl %r11d, %r11d
xorl %ebp, %ebp
cmpq %r11, %r9
je 0x12d1d
cvtss2sd (%r10,%r11,4), %xmm1
movsd (%rdx,%r11,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x12d18
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r10,%r11,4)
movl %edi, %ebp
incq %r11
jmp 0x12cf5
cmpl $0x1, %ebp
sbbq $-0x1, %r14
incq %r8
addq $0x4, %rsi
jmp 0x12cdd
testq %r14, %r14
je 0x12d56
cmpl $0x0, 0x30(%rbx)
jle 0x12d56
callq 0x9180
movq %rax, %rcx
movq 0x10(%rbx), %rdx
leaq 0x1a8aa(%rip), %rdi     # 0x2d5f5
movq %r14, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmpq *%rcx
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hikmeans.c
// Function: vl_hikm_copy_subset
vl_uint8*
vl_hikm_copy_subset (vl_uint8 const * data,
                     vl_uint32 *ids,
                     vl_size N, vl_size M,
                     vl_uint32 id, vl_size *N2)
{
  vl_uindex i ;
  vl_size count = 0;

  /* count how many data points with this label there are */
  for (i = 0 ; i < N ; i++) {
    if (ids[i] == id) {
      count ++ ;
    }
  }
  *N2 = count ;

  /* copy each datum to the buffer */
  {
    vl_uint8 *new_data = vl_malloc (sizeof(*new_data) * M * count);
    count = 0;
    for (i = 0 ; i < N ; i ++) {
      if (ids[i] == id) {
        memcpy(new_data + count * M,
               data + i * M,
               sizeof(*new_data) * M);
        count ++ ;
      }
    }
    *N2 = count ;
    return new_data ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %edi, %edi
xorl %eax, %eax
cmpq %rax, %r15
je 0x133dc
xorl %ecx, %ecx
cmpl %r8d, (%r12,%rax,4)
sete %cl
addq %rcx, %rdi
incq %rax
jmp 0x133c6
movq %r9, 0x10(%rsp)
movq %rdi, (%r9)
imulq %r14, %rdi
movl %r8d, 0x4(%rsp)
callq 0x95e0
movl 0x4(%rsp), %ecx
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x13430
cmpl %ecx, (%r12,%rbp,4)
jne 0x13428
movq %rbx, %rdi
imulq %r14, %rdi
addq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x95d0
movl 0x4(%rsp), %ecx
incq %rbx
incq %rbp
addq %r14, %r13
jmp 0x133ff
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hikmeans.c
// Function: vl_hikm_new
VlHIKMTree *
vl_hikm_new (int method)
{
  VlHIKMTree *f = vl_calloc (sizeof(VlHIKMTree), 1) ;
  f->max_niters = 200 ;
  f->method = method ;
  return f ;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $0x30
popq %rdi
pushq $0x1
popq %rsi
callq 0x9960
movq $0xc8, 0x18(%rax)
movl %ebx, 0x20(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hikmeans.c
// Function: xdelete
static void
xdelete (VlHIKMNode *node)
{
  if(node) {
    vl_uindex k ;
    if (node->children) {
      for(k = 0 ; k < vl_ikm_get_K (node->filter) ; ++k)
        xdelete (node->children[k]) ;
      vl_free (node->children) ;
    }
    if (node->filter) {
      vl_ikm_delete (node->filter) ;
    }
    vl_free(node);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x134d9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x134bd
xorl %r14d, %r14d
movq (%rbx), %rdi
callq 0x97a0
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jae 0x134b8
movq (%rdi,%r14,8), %rdi
callq 0x13483
incq %r14
jmp 0x13499
callq 0x95b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x134ca
callq 0x9250
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x95b0
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hikmeans.c
// Function: vl_hikm_init
void
vl_hikm_init (VlHIKMTree *f, vl_size M, vl_size K, vl_size depth)
{
  assert(depth > 0) ;
  assert(M > 0) ;
  assert(K > 0) ;

  xdelete (f -> root) ;
  f->root = 0;
  f->M = M ;
  f->K = K ;
  f->depth = depth ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x28(%rdi), %rdi
callq 0x13483
andq $0x0, 0x28(%r12)
movq %r15, (%r12)
movq %r14, 0x8(%r12)
movq %rbx, 0x10(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hikmeans.c
// Function: vl_hikm_push
void
vl_hikm_push (VlHIKMTree *f, vl_uint32 *asgn, vl_uint8 const *data, vl_size N)
{
  vl_uindex i, d ;
  vl_size M = vl_hikm_get_ndims (f) ;
  vl_size depth = vl_hikm_get_depth (f) ;

  /* for each datum */
  for(i = 0 ; i < N ; i++) {
    VlHIKMNode *node = f->root ;
    d = 0 ;
    while (node) {
      vl_uint32 best ;
      vl_ikm_push (node->filter,
                   &best,
                   data + i * M, 1) ;
      asgn[i * depth + d] = best ;
      ++ d ;
      if (!node->children) break ;
      node = node->children [best] ;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r15
movq (%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x10(%rdi), %rax
shlq $0x2, %rax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
leaq 0x4(%rsp), %r13
pushq $0x1
popq %rbp
cmpq 0x28(%rsp), %r12
je 0x137c3
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rbx
movq %r12, %r14
imulq 0x10(%rsp), %r14
addq 0x20(%rsp), %r14
movq %r15, 0x30(%rsp)
testq %rbx, %rbx
je 0x137b4
movq (%rbx), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x9070
movl 0x4(%rsp), %eax
movl %eax, (%r15)
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x137b4
movq (%rcx,%rax,8), %rbx
addq $0x4, %r15
jmp 0x13784
incq %r12
movq 0x30(%rsp), %r15
addq 0x8(%rsp), %r15
jmp 0x13761
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hog.c
// Function: vl_hog_delete
void
vl_hog_delete (VlHog * self)
{
  if (self->orientationX) {
    vl_free(self->orientationX) ;
    self->orientationX = NULL ;
  }

  if (self->orientationY) {
    vl_free(self->orientationY) ;
    self->orientationY = NULL ;
  }

  if (self->glyphs) {
    vl_free(self->glyphs) ;
    self->glyphs = NULL ;
  }

  if (self->permutation) {
    vl_free(self->permutation) ;
    self->permutation = NULL ;
  }

  if (self->hog) {
    vl_free(self->hog) ;
    self->hog = NULL ;
  }

  if (self->hogNorm) {
    vl_free(self->hogNorm) ;
    self->hogNorm = NULL ;
  }

  vl_free(self) ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x13d48
callq 0x95b0
andq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x13d5b
callq 0x95b0
andq $0x0, 0x40(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x13d6e
callq 0x95b0
andq $0x0, 0x28(%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x13d81
callq 0x95b0
andq $0x0, 0x20(%rbx)
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x13d94
callq 0x95b0
andq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x13da7
callq 0x95b0
andq $0x0, 0x50(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/hog.c
// Function: vl_hog_prepare_buffers
static void
vl_hog_prepare_buffers (VlHog * self, vl_size width, vl_size height, vl_size cellSize)
{
  vl_size hogWidth = (width + cellSize/2) / cellSize ;
  vl_size hogHeight = (height + cellSize/2) / cellSize ;

  assert(width > 3) ;
  assert(height > 3) ;
  assert(hogWidth > 0) ;
  assert(hogHeight > 0) ;

  if (self->hog &&
      self->hogWidth == hogWidth &&
      self->hogHeight == hogHeight) {
    /* a suitable buffer is already allocated */
    memset(self->hog, 0, sizeof(float) * hogWidth * hogHeight * self->numOrientations * 2) ;
    memset(self->hogNorm, 0, sizeof(float) * hogWidth * hogHeight) ;
    return ;
  }

  if (self->hog) {
    vl_free(self->hog) ;
    self->hog = NULL ;
  }

  if (self->hogNorm) {
    vl_free(self->hogNorm) ;
    self->hogNorm = NULL ;
  }

  self->hog = vl_calloc(hogWidth * hogHeight * self->numOrientations * 2, sizeof(float)) ;
  self->hogNorm = vl_calloc(hogWidth * hogHeight, sizeof(float)) ;
  self->hogWidth = hogWidth ;
  self->hogHeight = hogHeight ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
movq %rdi, %rbx
movq %rcx, %rdi
shrq %rdi
leaq (%rsi,%rdi), %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r14
addq %r8, %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r15
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x145fa
cmpq %r14, 0x58(%rbx)
jne 0x145f0
cmpq %r15, 0x60(%rbx)
jne 0x145f0
imulq %r15, %r14
shlq $0x2, %r14
movq 0x10(%rbx), %rdx
imulq %r14, %rdx
addq %rdx, %rdx
xorl %esi, %esi
callq 0x9420
movq 0x50(%rbx), %rdi
xorl %esi, %esi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x9420
callq 0x95b0
andq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x1460d
callq 0x95b0
andq $0x0, 0x50(%rbx)
movq %r15, %r12
imulq %r14, %r12
movq 0x10(%rbx), %rdi
imulq %r12, %rdi
addq %rdi, %rdi
pushq $0x4
popq %r13
movq %r13, %rsi
callq 0x9960
movq %rax, 0x48(%rbx)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9960
movq %rax, 0x50(%rbx)
movq %r14, 0x58(%rbx)
movq %r15, 0x60(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/homkermap.c
// Function: vl_homogeneouskernelmap_evaluate_f
void
VL_XCAT(vl_homogeneouskernelmap_evaluate_,SFX)
(VlHomogeneousKernelMap const * self,
 T * destination,
 vl_size stride,
 double x)
{
  /* break value into exponent and mantissa */
  int exponent ;
  int unsigned j ;
  double mantissa = frexp(x, &exponent) ;
  double sign = (mantissa >= 0.0) ? +1.0 : -1.0 ;
  mantissa *= 2*sign ;
  exponent -- ;

  if (mantissa == 0 ||
      exponent <= self->minExponent ||
      exponent >= self->maxExponent) {
    for (j = 0 ; j < 2*self->order+1 ; ++j) {
      *destination = (T) 0.0 ;
      destination += stride ;
    }
    return  ;
  }
  {
    vl_size featureDimension = 2*self->order + 1 ;
    double const * v1 = self->table +
    (exponent - self->minExponent) * self->numSubdivisions * featureDimension ;
    double const * v2 ;
    double f1, f2 ;

    mantissa -= 1.0 ;
    while (mantissa >= self->subdivision) {
      mantissa -= self->subdivision ;
      v1 += featureDimension ;
    }
    v2 = v1 + featureDimension ;
    for (j = 0 ; j < featureDimension ; ++j) {
      f1 = *v1++ ;
      f2 = *v2++ ;
      *destination = (T) sign * ((f2 - f1) * (self->numSubdivisions * mantissa) + f1) ;
      destination += stride ;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc(%rsp), %rdi
callq 0x9500
xorpd %xmm3, %xmm3
xorl %eax, %eax
ucomisd %xmm3, %xmm0
setae %al
leaq 0x1824e(%rip), %rcx     # 0x2d9c0
movsd (%rcx,%rax,8), %xmm2
movapd %xmm2, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jne 0x1578b
jnp 0x157eb
movslq 0xc(%rsp), %rax
decq %rax
movq %rax, %rdi
subq 0x38(%r15), %rdi
jle 0x157eb
cmpq %rax, 0x40(%r15)
jle 0x157eb
movq 0x18(%r15), %rdx
movq 0x28(%r15), %rsi
leaq (%rdx,%rdx), %rax
addsd 0x17a12(%rip), %xmm1    # 0x2d1c8
movsd 0x30(%r15), %xmm0
leaq 0x1(,%rdx,2), %rcx
imulq %rsi, %rcx
imulq %rdi, %rcx
shlq $0x3, %rcx
addq 0x48(%r15), %rcx
shlq $0x4, %rdx
leaq 0x8(%rdx), %rdi
ucomisd %xmm0, %xmm1
jb 0x1580a
subsd %xmm0, %xmm1
addq %rdi, %rcx
jmp 0x157dc
movq 0x18(%r15), %rax
addq %rax, %rax
shlq $0x2, %rbx
xorl %ecx, %ecx
movl %ecx, %edx
cmpq %rdx, %rax
jb 0x15876
andl $0x0, (%r14)
incl %ecx
addq %rbx, %r14
jmp 0x157f8
cvtsd2ss %xmm2, %xmm0
movq %rsi, %xmm2
punpckldq 0x17945(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1794d(%rip), %xmm2    # 0x2d170
cvtss2sd %xmm0, %xmm0
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
mulsd %xmm3, %xmm1
addq %rcx, %rdx
addq $0x8, %rdx
shlq $0x2, %rbx
xorl %esi, %esi
movl %esi, %edi
cmpq %rdi, %rax
jb 0x15876
movsd (%rcx,%rsi,8), %xmm2
movsd (%rdx,%rsi,8), %xmm3
subsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm0, %xmm3
cvtsd2ss %xmm3, %xmm2
movss %xmm2, (%r14)
incq %rsi
addq %rbx, %r14
jmp 0x15844
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/homkermap.c
// Function: vl_homogeneouskernelmap_get_spectrum
VL_INLINE double
vl_homogeneouskernelmap_get_spectrum (VlHomogeneousKernelMap const * self, double omega)
{
  assert (self) ;
  switch (self->kernelType) {
    case VlHomogeneousKernelIntersection:
      return (2.0 / VL_PI) / (1 + 4 * omega*omega) ;
    case VlHomogeneousKernelChi2:
      return 2.0 / (exp(VL_PI * omega) + exp(-VL_PI * omega)) ;
    case VlHomogeneousKernelJS:
      return (2.0 / log(4.0)) *
      2.0 / (exp(VL_PI * omega) + exp(-VL_PI * omega)) /
      (1 + 4 * omega*omega) ;
    default:
      abort() ;
  }
}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm2
movl (%rdi), %eax
cmpl $0x2, %eax
je 0x15a37
cmpl $0x1, %eax
je 0x159f3
testl %eax, %eax
jne 0x15aa4
movsd 0x17842(%rip), %xmm1    # 0x2d218
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x17852(%rip), %xmm1    # 0x2d238
movsd 0x1806a(%rip), %xmm0    # 0x2da58
jmp 0x15a9b
movsd 0x17f4d(%rip), %xmm0    # 0x2d948
mulsd %xmm2, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x9ae0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x1802a(%rip), %xmm0    # 0x2da48
callq 0x9ae0
movapd %xmm0, %xmm1
addsd 0x10(%rsp), %xmm1
movsd 0x18003(%rip), %xmm0    # 0x2da38
jmp 0x15a9b
movsd 0x17f09(%rip), %xmm0    # 0x2d948
mulsd %xmm2, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x9ae0
movsd %xmm0, 0x10(%rsp)
movsd 0x17fec(%rip), %xmm0    # 0x2da48
mulsd 0x8(%rsp), %xmm0
callq 0x9ae0
movapd %xmm0, %xmm1
addsd 0x10(%rsp), %xmm1
movsd 0x17fd7(%rip), %xmm0    # 0x2da50
divsd %xmm1, %xmm0
movsd 0x17793(%rip), %xmm1    # 0x2d218
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x1779d(%rip), %xmm1    # 0x2d238
divsd %xmm1, %xmm0
addq $0x18, %rsp
retq
callq 0x90b0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/host.c
// Function: vl_x86cpu_info_init
VL_INLINE void
_vl_cpuid (vl_int32* info, int function)
{
#if defined(VL_ARCH_IX86) && (defined(__PIC__) || defined(__pic__))
  /* This version is compatible with -fPIC on x386 targets. This special
   * case is required becaus
   * on such platform -fPIC alocates ebx as global offset table pointer.
   * Note that =r below will be mapped to a register different from ebx,
   * so the code is sound. */
  __asm__ __volatile__
  ("pushl %%ebx      \n" /* save %ebx */
   "cpuid            \n"
   "movl %%ebx, %1   \n" /* save what cpuid just put in %ebx */
   "popl %%ebx       \n" /* restore the old %ebx */
   : "=a"(info[0]), "=r"(info[1]), "=c"(info[2]), "=d"(info[3])
   : "a"(function)
   : "cc") ; /* clobbered (cc=condition codes) */
#else /* no -fPIC or -fPIC with a 64-bit target */
  __asm__ __volatile__
  ("cpuid"
   : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3])
   : "a"(function)
   : "cc") ;
#endif
}

// Assembly:
pushq %rbx
xorl %eax, %eax
cpuid
movl %ebx, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
testl %eax, %eax
jle 0x15af7
movl $0x1, %eax
cpuid
movl %edx, %eax
andl $0x800000, %eax         # imm = 0x800000
movl %eax, 0x38(%rdi)
movl %edx, %eax
andl $0x2000000, %eax        # imm = 0x2000000
movl %eax, 0x34(%rdi)
andl $0x4000000, %edx        # imm = 0x4000000
movl %edx, 0x30(%rdi)
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pand 0x17f6e(%rip), %xmm0    # 0x2da60
movdqu %xmm0, 0x20(%rdi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/host.c
// Function: vl_x86cpu_info_to_string_copy
char *
_vl_x86cpu_info_to_string_copy (VlX86CpuInfo const *self)
{
  char * string = 0 ;
  int length = 0 ;
  while (string == 0) {
    if (length > 0) {
      string = vl_malloc(sizeof(char) * length) ;
      if (string == NULL) break ;
    }
    length = snprintf(string, length, "%s%s%s%s%s%s%s%s",
                      self->vendor.string,
                      self->hasMMX   ? " MMX" : "",
                      self->hasSSE   ? " SSE" : "",
                      self->hasSSE2  ? " SSE2" : "",
                      self->hasSSE3  ? " SSE3" : "",
                      self->hasSSE41 ? " SSE41" : "",
                      self->hasSSE42 ? " SSE42" : "",
                      self->hasAVX   ? " AVX" : "") ;
    length += 1 ;
  }
  return string ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x17cba(%rip), %r13     # 0x2d7c8
xorl %r12d, %r12d
xorl %ebp, %ebp
testq %r12, %r12
jne 0x15bdc
testl %ebp, %ebp
jle 0x15b34
movl %ebp, %edi
callq 0x95e0
movq %rax, %r15
testq %rax, %rax
jne 0x15b37
jmp 0x15bdc
xorl %r15d, %r15d
cmpl $0x0, 0x38(%rbx)
leaq 0x17f4f(%rip), %r8      # 0x2da91
cmoveq %r13, %r8
cmpl $0x0, 0x34(%rbx)
leaq 0x17f45(%rip), %r9      # 0x2da96
cmoveq %r13, %r9
cmpl $0x0, 0x30(%rbx)
leaq 0x17f75(%rip), %r10     # 0x2dad5
cmoveq %r13, %r10
movslq %ebp, %rsi
movdqu 0x20(%rbx), %xmm0
pcmpeqd 0x17efc(%rip), %xmm0    # 0x2da70
movmskps %xmm0, %eax
testb $0x8, %al
leaq 0x17f1b(%rip), %r11     # 0x2da9b
cmovneq %r13, %r11
testb $0x4, %al
leaq 0x17f14(%rip), %r12     # 0x2daa1
cmovneq %r13, %r12
testb $0x2, %al
leaq 0x17f0e(%rip), %rbp     # 0x2daa8
cmovneq %r13, %rbp
testb $0x1, %al
leaq 0x17f08(%rip), %r14     # 0x2daaf
cmovneq %r13, %r14
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x17ec7(%rip), %rdx     # 0x2da80
movq %rbx, %rcx
xorl %eax, %eax
pushq %r14
pushq %rbp
pushq %r12
pushq %r11
pushq %r10
callq 0x93b0
addq $0x30, %rsp
movl %eax, %ebp
incl %ebp
movq %r15, %r12
jmp 0x15b13
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/ikmeans.c
// Function: vl_ikm_new
VlIKMFilt *
vl_ikm_new (int method)
{
  VlIKMFilt *f = vl_calloc (sizeof(VlIKMFilt), 1) ;
  f -> method = method ;
  f -> max_niters = 200 ;
  return f ;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $0x30
popq %rdi
pushq $0x1
popq %rsi
callq 0x9960
movl %ebx, 0x18(%rax)
movq $0xc8, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/ikmeans.c
// Function: vl_ikm_delete
void
vl_ikm_delete (VlIKMFilt* f)
{
  if (f) {
    if (f->centers) vl_free(f->centers) ;
    if (f->inter_dist) vl_free(f->inter_dist) ;
    vl_free(f) ;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x15cd1
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x15cba
callq 0x95b0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x15cc8
callq 0x95b0
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/ikmeans.c
// Function: vl_ikm_push
void
vl_ikm_push (VlIKMFilt *f, vl_uint32 *asgn, vl_uint8 const *data, vl_size N) {
  switch (f -> method) {
  case VL_IKM_LLOYD : vl_ikm_push_lloyd (f, asgn, data, N) ; break ;
  case VL_IKM_ELKAN : vl_ikm_push_elkan (f, asgn, data, N) ; break ;
  default :
    abort() ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, (%rsp)
movq %rdi, %r12
movl 0x18(%rdi), %eax
cmpl $0x1, %eax
je 0x1672b
testl %eax, %eax
jne 0x167d6
xorl %r13d, %r13d
cmpq %r13, 0x8(%rsp)
je 0x167c7
movq 0x20(%r12), %rdi
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %rdx, %rsi
imulq %r13, %rsi
addq 0x10(%rsp), %rsi
callq 0x9030
movq (%rsp), %rcx
movl %eax, (%rcx,%r13,4)
incq %r13
jmp 0x166f4
movq 0x28(%r12), %rax
xorl %ecx, %ecx
cmpq 0x8(%rsp), %rcx
je 0x167c7
movq 0x8(%r12), %rdx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
xorl %edi, %edi
xorl %r9d, %r9d
cmpq %rdx, %r9
je 0x167b8
movq %rdi, %r10
imulq %rdx, %r10
leaq (%rax,%r10,4), %r10
cmpl %esi, (%r10,%r9,4)
jge 0x167af
movq (%r12), %r10
movq %r10, %r11
imulq %r8, %r11
movq %rcx, %rbp
imulq %r10, %rbp
addq 0x10(%rsp), %rbp
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq %r15, %r10
je 0x167a4
movzbl (%rbp,%r15), %ebx
movq 0x20(%r12), %r14
addq %r11, %r14
subl (%r14,%r15,4), %ebx
imull %ebx, %ebx
addl %ebx, %r13d
incq %r15
jmp 0x16782
cmpl %esi, %r13d
cmovlq %r9, %rdi
cmovll %r13d, %esi
incq %r9
addq $0x4, %r8
jmp 0x1674f
movq (%rsp), %rdx
movl %edi, (%rdx,%rcx,4)
incq %rcx
jmp 0x16732
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x90b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/ikmeans.c
// Function: vl_ikm_push_one
vl_uint32
vl_ikm_push_one (vl_ikmacc_t const *centers,
		 vl_uint8 const *data,
		 vl_size M, vl_size K)
{
  vl_uindex i,k ;

  /* assign data to centers */
  vl_uindex best = (vl_uindex) -1 ;
  vl_ikmacc_t best_dist = 0 ;

  for(k = 0 ; k < K ; ++k) {
    vl_ikmacc_t dist = 0 ;

    /* compute distance with this center */
    for(i = 0 ; i < M ; ++i) {
      vl_ikmacc_t delta = (vl_ikmacc_t)data[i] - centers[k*M + i] ;
      dist += delta * delta ;
    }

    /* compare with current best */
    if (best == (vl_uindex) -1 || dist < best_dist) {
      best = k  ;
      best_dist = dist ;
    }
  }
  return (vl_uint32)best;
}

// Assembly:
pushq %rbp
pushq %rbx
leaq (,%rdx,4), %r8
xorl %r9d, %r9d
movabsq $-0x1, %rax
xorl %r10d, %r10d
cmpq %rcx, %r9
je 0x16837
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpq %rbx, %rdx
je 0x16816
movzbl (%rsi,%rbx), %ebp
subl (%rdi,%rbx,4), %ebp
imull %ebp, %ebp
addl %ebp, %r11d
incq %rbx
jmp 0x167ff
cmpq $-0x1, %rax
sete %bl
cmpl %r10d, %r11d
setl %bpl
orb %bl, %bpl
cmovneq %r9, %rax
cmovnel %r11d, %r10d
incq %r9
addq %r8, %rdi
jmp 0x167f5
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/imopv.c
// Function: vl_imsmooth_f
VL_EXPORT void
VL_XCAT(vl_imsmooth_, SFX)
(T * smoothed, vl_size smoothedStride,
 T const *image, vl_size width, vl_size height, vl_size stride,
 double sigmax, double sigmay)
{
  T *filterx, *filtery, *buffer ;
  vl_size sizex, sizey ;

  filterx = VL_XCAT(_vl_new_gaussian_fitler_,SFX)(&sizex,sigmax) ;
  if (sigmax == sigmay) {
    filtery = filterx ;
    sizey = sizex ;
  } else {
    filtery = VL_XCAT(_vl_new_gaussian_fitler_,SFX)(&sizey,sigmay) ;
  }
  buffer = vl_malloc(width*height*sizeof(T)) ;

  VL_XCAT(vl_imconvcol_v,SFX) (buffer, height,
                               image, width, height, stride,
                               filtery,
                               -((signed)sizey-1)/2, ((signed)sizey-1)/2,
                               1, VL_PAD_BY_CONTINUITY | VL_TRANSPOSE) ;

  VL_XCAT(vl_imconvcol_v,SFX) (smoothed, smoothedStride,
                               buffer, height, width, height,
                               filterx,
                               -((signed)sizex-1)/2, ((signed)sizex-1)/2,
                               1, VL_PAD_BY_CONTINUITY | VL_TRANSPOSE) ;

  vl_free(buffer) ;
  vl_free(filterx) ;
  if (sigmax != sigmay) {
    vl_free(filtery) ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %r9, 0x30(%rsp)
movq %r8, %r14
movq %rcx, %r12
movq %rdx, 0x28(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x176c7
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
ucomisd %xmm0, %xmm1
movq %rax, 0x48(%rsp)
jne 0x175b7
jp 0x175b7
movq 0x20(%rsp), %rbp
movq %rbp, %r15
movq %rax, 0x8(%rsp)
jmp 0x175d1
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x176c7
movq %rax, 0x8(%rsp)
movq (%r15), %r15
movq 0x20(%rsp), %rbp
movq %r12, %rdi
imulq %r14, %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, %r13
pushq $0x1
popq %rcx
movl %ecx, %eax
movq %rcx, %r11
subl %r15d, %eax
decl %r15d
pushq $0x2
popq %rbx
cltd
idivl %ebx
movslq %eax, %r10
movl %r15d, %eax
cltd
idivl %ebx
cltq
subq $0x8, %rsp
pushq $0x5
popq %r15
movq %r13, %rdi
movq %r14, %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rcx
movq %r14, %r8
movq 0x38(%rsp), %r9
pushq %r15
movq %r11, %r15
pushq %r11
pushq %rax
pushq %r10
pushq 0x30(%rsp)
callq 0x92c0
addq $0x30, %rsp
movl %r15d, %eax
subl %ebp, %eax
decl %ebp
cltd
idivl %ebx
movslq %eax, %r10
movl %ebp, %eax
cltd
idivl %ebx
cltq
subq $0x8, %rsp
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r14, %r9
pushq $0x5
popq %r11
pushq %r11
pushq %r15
pushq %rax
pushq %r10
movq 0x70(%rsp), %rbx
pushq %rbx
callq 0x92c0
addq $0x30, %rsp
movq %r13, %rdi
callq 0x95b0
movq %rbx, %rdi
callq 0x95b0
movsd 0x18(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jne 0x176a0
jnp 0x176b8
movq 0x8(%rsp), %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x95b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/imopv.c
// Function: vl_new_gaussian_fitler_f
static T*
VL_XCAT(_vl_new_gaussian_fitler_,SFX)(vl_size *size, double sigma)
{
  T* filter ;
  T mass = (T)1.0 ;
  vl_index i ;
  vl_size width = vl_ceil_d(sigma * 3.0) ;
  *size = 2 * width + 1 ;

  assert(size) ;

  filter = vl_malloc((*size) * sizeof(T)) ;
  filter[width] = 1.0 ;
  for (i = 1 ; i <= (signed)width ; ++i) {
    double x = (double)i / sigma ;
    double g = exp(-0.5 * x * x) ;
    mass += g + g ;
    filter[width-i] = g ;
    filter[width+i] = g ;
  }
  for (i = 0 ; i < (signed)(*size) ; ++i) {filter[i] /= mass ;}
  return filter ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movapd %xmm0, %xmm1
movq %rdi, %r14
movsd 0x15b04(%rip), %xmm0    # 0x2d1e8
movsd %xmm1, 0x10(%rsp)
mulsd %xmm1, %xmm0
callq 0x9a40
cvttsd2si %xmm0, %r13
leaq (,%r13,2), %rax
leaq 0x1(,%r13,2), %rcx
movq %rcx, (%r14)
leaq 0x4(,%rax,4), %rdi
callq 0x95e0
movq %rax, %rbx
leaq (%rax,%r13,4), %r15
addq $0x4, %r15
movl $0x3f800000, -0x4(%r15) # imm = 0x3F800000
movslq %r13d, %r12
leaq -0x4(%rax,%r13,4), %r13
movss 0x15be9(%rip), %xmm2    # 0x2d324
pushq $0x1
popq %rbp
cmpq %r12, %rbp
jg 0x17795
cvtsi2sd %rbp, %xmm1
divsd 0x10(%rsp), %xmm1
movapd %xmm1, %xmm0
mulsd 0x15a96(%rip), %xmm0    # 0x2d1f0
mulsd %xmm1, %xmm0
movss %xmm2, 0xc(%rsp)
callq 0x9ae0
cvtsd2ss %xmm0, %xmm1
addsd %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm2
addsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm1, (%r13)
movss %xmm1, -0x4(%r15,%rbp,4)
incq %rbp
addq $-0x4, %r13
jmp 0x1773e
movslq (%r14), %rax
xorl %ecx, %ecx
testq %rax, %rax
cmovleq %rcx, %rax
cmpq %rcx, %rax
je 0x177b9
movss (%rbx,%rcx,4), %xmm0
divss %xmm2, %xmm0
movss %xmm0, (%rbx,%rcx,4)
incq %rcx
jmp 0x177a1
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/mathop.h
// Function: vl_fast_atan2_f
VL_INLINE float
vl_fast_atan2_f (float y, float x)
{
  float angle, r ;
  float const c3 = 0.1821F ;
  float const c1 = 0.9675F ;
  float abs_y    = vl_abs_f (y) + VL_EPSILON_F ;

  if (x >= 0) {
    r = (x - abs_y) / (x + abs_y) ;
    angle = (float) (VL_PI / 4) ;
  } else {
    r = (x + abs_y) / (abs_y - x) ;
    angle = (float) (3 * VL_PI / 4) ;
  }
  angle += (c3*r*r - c1) * r ;
  return (y < 0) ? - angle : angle ;
}

// Assembly:
movaps 0x150ef(%rip), %xmm3    # 0x2d150
andps %xmm0, %xmm3
addss 0x152c0(%rip), %xmm3    # 0x2d32c
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jae 0x1808d
movaps %xmm3, %xmm2
addss %xmm1, %xmm2
subss %xmm1, %xmm3
divss %xmm3, %xmm2
movss 0x152a9(%rip), %xmm1    # 0x2d334
jmp 0x180a4
movaps %xmm1, %xmm2
subss %xmm3, %xmm2
addss %xmm1, %xmm3
divss %xmm3, %xmm2
movss 0x1528c(%rip), %xmm1    # 0x2d330
movss 0x1528c(%rip), %xmm3    # 0x2d338
mulss %xmm2, %xmm3
mulss %xmm2, %xmm3
addss 0x15280(%rip), %xmm3    # 0x2d33c
mulss %xmm2, %xmm3
addss %xmm1, %xmm3
movaps 0x152a5(%rip), %xmm1    # 0x2d370
xorps %xmm3, %xmm1
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm0
movaps %xmm0, %xmm2
andnps %xmm3, %xmm2
andps %xmm1, %xmm0
orps %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/imopv.c
// Function: vl_imintegral_f
VL_EXPORT void
VL_XCAT(vl_imintegral_, SFX)
(T * integral, vl_size integralStride,
 T const * image,
 vl_size imageWidth, vl_size imageHeight, vl_size imageStride)
{
  vl_uindex x, y ;
  T temp  = 0 ;

  if (imageHeight > 0) {
    for (x = 0 ; x < imageWidth ; ++ x) {
      temp += *image++ ;
      *integral++ = temp ;
    }
  }

  for (y = 1 ; y < imageHeight ; ++ y) {
    T * integralPrev ;
    integral += integralStride - imageWidth ;
    image += imageStride - imageWidth ;
    integralPrev = integral - integralStride ;

    temp = 0 ;
    for (x = 0 ; x < imageWidth ; ++ x) {
      temp += *image++ ;
      *integral++ = *integralPrev++ + temp ;
    }
  }
}

// Assembly:
testq %r8, %r8
je 0x18110
xorps %xmm0, %xmm0
xorl %eax, %eax
xorl %r10d, %r10d
cmpq %r10, %rcx
je 0x1810a
addss (%rdx,%r10,4), %xmm0
movss %xmm0, (%rdi,%r10,4)
incq %r10
addq $-0x4, %rax
jmp 0x180f0
subq %rax, %rdx
subq %rax, %rdi
pushq %rbx
leaq (,%rcx,4), %rax
negq %rax
shlq $0x2, %r9
shlq $0x2, %rsi
movabsq $0x1, %r10
cmpq %r8, %r10
jae 0x18176
addq %r9, %rdx
leaq (%rdi,%rsi), %r11
xorps %xmm0, %xmm0
movq %rcx, %rbx
subq $0x1, %rbx
jb 0x18168
addss (%rdx,%rax), %xmm0
movss (%rdi,%rax), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%r11,%rax)
addq $0x4, %rdx
addq $0x4, %r11
addq $0x4, %rdi
jmp 0x18140
incq %r10
addq %rax, %rdx
addq %rax, %r11
movq %r11, %rdi
jmp 0x1812e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdforest_new
VlKDForest *
vl_kdforest_new (vl_type dataType,
                 vl_size dimension, vl_size numTrees, VlVectorComparisonType distance)
{
  VlKDForest * self = vl_calloc (sizeof(VlKDForest), 1) ;

  assert(dataType == VL_TYPE_FLOAT || dataType == VL_TYPE_DOUBLE) ;
  assert(dimension >= 1) ;
  assert(numTrees >= 1) ;

  self -> rand = vl_get_rand () ;
  self -> dataType = dataType ;
  self -> numData = 0 ;
  self -> data = 0 ;
  self -> dimension = dimension ;
  self -> numTrees = numTrees ;
  self -> trees = 0 ;
  self -> thresholdingMethod = VL_KDTREE_MEDIAN ;
  self -> splitHeapSize = VL_MIN(numTrees, VL_KDTREE_SPLIT_HEAP_SIZE) ;
  self -> splitHeapNumNodes = 0 ;
  self -> distance = distance;
  self -> maxNumNodes = 0 ;
  self -> numSearchers = 0 ;
  self -> headSearcher = 0 ;

  switch (self->dataType) {
    case VL_TYPE_FLOAT:
      self -> distanceFunction = (void(*)(void))
      vl_get_vector_comparison_function_f (distance) ;
      break;
    case VL_TYPE_DOUBLE :
      self -> distanceFunction = (void(*)(void))
      vl_get_vector_comparison_function_d (distance) ;
      break ;
    default :
      abort() ;
  }

  return self ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r14d
pushq $0x1
popq %rsi
movl $0xf8, %edi
callq 0x9960
movq %rax, %rbx
callq 0x9910
movq %rax, 0x8(%rbx)
movl %r14d, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movq %r12, (%rbx)
movq %r15, 0x40(%rbx)
andq $0x0, 0x38(%rbx)
andl $0x0, 0x48(%rbx)
cmpq $0x5, %r15
pushq $0x5
popq %rax
cmovbq %r15, %rax
movq %rax, 0xd0(%rbx)
andq $0x0, 0xc8(%rbx)
movl %ebp, 0x28(%rbx)
andq $0x0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
cmpl $0x2, %r14d
je 0x19fbc
cmpl $0x1, %r14d
jne 0x19fd3
movl %ebp, %edi
callq 0x9830
jmp 0x19fc3
movl %ebp, %edi
callq 0x9860
movq %rax, 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x90b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdforest_new_searcher
VlKDForestSearcher *
vl_kdforest_new_searcher (VlKDForest * kdforest)
{
  VlKDForestSearcher * self = vl_calloc(sizeof(VlKDForestSearcher), 1);
  if(kdforest->numSearchers == 0) {
    kdforest->headSearcher = self;
    self->previous = NULL;
    self->next = NULL;
  } else {
    VlKDForestSearcher * lastSearcher = kdforest->headSearcher;
    while (1) {
      if(lastSearcher->next) {
        lastSearcher = lastSearcher->next;
      } else {
        lastSearcher->next = self;
        self->previous = lastSearcher;
        self->next = NULL;
        break;
      }
    }
  }

  kdforest->numSearchers++;

  self->forest = kdforest;
  self->searchHeapArray = vl_malloc (sizeof(VlKDForestSearchState) * kdforest->maxNumNodes) ;
  self->searchIdBook = vl_calloc (sizeof(vl_uindex), kdforest->numData) ;
  return self ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x50
popq %rdi
pushq $0x1
popq %rsi
callq 0x9960
movq %rax, %rbx
movq 0xe8(%r14), %rax
leaq 0xf0(%r14), %rcx
testq %rax, %rax
je 0x1a013
movq (%rcx), %rsi
movq %rsi, %rcx
movq (%rsi), %rsi
movq %rcx, %rdx
testq %rsi, %rsi
jne 0x1a003
jmp 0x1a015
xorl %edx, %edx
movq %rbx, (%rcx)
movq %rdx, 0x8(%rbx)
andq $0x0, (%rbx)
incq %rax
movq %rax, 0xe8(%r14)
movq %r14, 0x20(%rbx)
imulq $0x18, 0xd8(%r14), %rdi
callq 0x95e0
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rsi
pushq $0x8
popq %rdi
callq 0x9960
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdforestsearcher_delete
void
vl_kdforestsearcher_delete (VlKDForestSearcher * self)
{
  if (self->previous && self->next) {
    self->previous->next = self->next;
    self->next->previous = self->previous;
  } else if (self->previous && !self->next) {
    self->previous->next = NULL;
  } else if (!self->previous && self->next) {
    self->next->previous = NULL;
    self->forest->headSearcher = self->next;
  } else {
    self->forest->headSearcher = NULL;
  }
  self->forest->numSearchers -- ;
  vl_free(self->searchHeapArray) ;
  vl_free(self->searchIdBook) ;
  vl_free(self) ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1a07b
testq %rax, %rax
je 0x1a092
movq %rax, (%rcx)
movq (%rbx), %rax
movq %rcx, 0x8(%rax)
jmp 0x1a0a4
testq %rax, %rax
je 0x1a098
andq $0x0, 0x8(%rax)
movq 0x20(%rbx), %rcx
movq %rax, 0xf0(%rcx)
jmp 0x1a0a4
andq $0x0, (%rcx)
jmp 0x1a0a4
movq 0x20(%rbx), %rax
andq $0x0, 0xf0(%rax)
movq 0x20(%rbx), %rax
decq 0xe8(%rax)
movq 0x18(%rbx), %rdi
callq 0x95b0
movq 0x10(%rbx), %rdi
callq 0x95b0
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdforest_delete
void
vl_kdforest_delete (VlKDForest * self)
{
  vl_uindex ti ;
  VlKDForestSearcher * searcher ;

  while ((searcher = vl_kdforest_get_searcher(self, 0))) {
    vl_kdforestsearcher_delete(searcher) ;
  }

  if (self->trees) {
    for (ti = 0 ; ti < self->numTrees ; ++ ti) {
      if (self->trees[ti]) {
        if (self->trees[ti]->nodes) vl_free (self->trees[ti]->nodes) ;
        if (self->trees[ti]->dataIndex) vl_free (self->trees[ti]->dataIndex) ;
        vl_free (self->trees[ti]) ;
      }
    }
    vl_free (self->trees) ;
  }
  vl_free (self) ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9620
testq %rax, %rax
je 0x1a106
movq %rax, %rdi
callq 0x91d0
jmp 0x1a0ed
cmpq $0x0, 0x38(%rbx)
je 0x1a163
xorl %r14d, %r14d
movq 0x38(%rbx), %rdi
cmpq 0x40(%rbx), %r14
jae 0x1a15e
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x1a159
movq (%rdi), %rax
testq %rax, %rax
je 0x1a13b
movq %rax, %rdi
callq 0x95b0
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x1a154
movq %rax, %rdi
callq 0x95b0
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x95b0
incq %r14
jmp 0x1a110
callq 0x95b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x95b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdtree_calc_bounds_recursively
static void
vl_kdtree_calc_bounds_recursively (VlKDTree * tree,
                                   vl_uindex nodeIndex, double * searchBounds)
{
  VlKDTreeNode * node = tree->nodes + nodeIndex ;
  vl_uindex i = node->splitDimension ;
  double t = node->splitThreshold ;

  node->lowerBound = searchBounds [2 * i + 0] ;
  node->upperBound = searchBounds [2 * i + 1] ;

  //VL_PRINT("%f %f\n",node->lowerBound,node->upperBound);

  if (node->lowerChild > 0) {
    searchBounds [2 * i + 1] = t ;
    vl_kdtree_calc_bounds_recursively (tree, node->lowerChild, searchBounds) ;
    searchBounds [2 * i + 1] = node->upperBound ;
  }
  if (node->upperChild > 0) {
    searchBounds [2 * i + 0] = t ;
    vl_kdtree_calc_bounds_recursively (tree, node->upperChild, searchBounds) ;
    searchBounds [2 * i + 0] = node->lowerBound ;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
imulq $0x38, %rsi, %rdx
leaq (%rcx,%rdx), %r15
movl 0x18(%rcx,%rdx), %eax
movsd 0x20(%rcx,%rdx), %xmm1
leaq (%rax,%rax), %r12
movq %rax, %rsi
shlq $0x4, %rsi
movsd (%rbx,%rsi), %xmm0
movsd %xmm0, 0x28(%rcx,%rdx)
movsd 0x8(%rbx,%r12,8), %xmm0
movsd %xmm0, 0x30(%rcx,%rdx)
movq 0x8(%rcx,%rdx), %rsi
testq %rsi, %rsi
jle 0x1a892
leaq 0x1(,%rax,2), %r13
movsd %xmm1, (%rbx,%r13,8)
movq %r14, %rdi
movq %rbx, %rdx
movsd %xmm1, 0x8(%rsp)
callq 0x1a80c
movsd 0x8(%rsp), %xmm1
movsd 0x30(%r15), %xmm0
movsd %xmm0, (%rbx,%r13,8)
movq 0x10(%r15), %rsi
testq %rsi, %rsi
jle 0x1a8b8
movsd %xmm1, (%rbx,%r12,8)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1a80c
movsd 0x28(%r15), %xmm0
movsd %xmm0, (%rbx,%r12,8)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kdtree.c
// Function: vl_kdforest_query
vl_size
vl_kdforest_query (VlKDForest * self,
                   VlKDForestNeighbor * neighbors,
                   vl_size numNeighbors,
                   void const * query)
{
  VlKDForestSearcher * searcher = vl_kdforest_get_searcher(self, 0) ;
  if (searcher == NULL) {
    searcher = vl_kdforest_new_searcher(self) ;
  }
  return vl_kdforestsearcher_query(searcher,
                                   neighbors,
                                   numNeighbors,
                                   query) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %esi, %esi
callq 0x9620
testq %rax, %rax
jne 0x1abbc
movq %r12, %rdi
callq 0x9130
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x92f0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/heap-def.h
// Function: vl_kdtree_split_heap_down
VL_INLINE void
VL_HEAP_down
(VL_HEAP_array array, vl_uindex index)
{
  vl_uindex parentIndex ;

  if (index == 0) return  ;

  parentIndex = vl_heap_parent (index) ;

  if (VL_HEAP_cmp (array, index, parentIndex) < 0) {
    VL_HEAP_swap (array, index, parentIndex) ;
    VL_HEAP_down (array, parentIndex) ;
  }
}

// Assembly:
testq %rsi, %rsi
je 0x1b14b
leaq -0x1(%rsi), %rax
shrq %rax
imulq $0x18, %rsi, %rdx
imulq $0x18, %rax, %rcx
movsd 0x10(%rdi,%rcx), %xmm0
ucomisd 0x10(%rdi,%rdx), %xmm0
jbe 0x1b14b
movq 0x10(%rdi,%rdx), %rsi
movq %rsi, -0x8(%rsp)
movups (%rdi,%rdx), %xmm0
movaps %xmm0, -0x18(%rsp)
movq 0x10(%rdi,%rcx), %rsi
movq %rsi, 0x10(%rdi,%rdx)
movups (%rdi,%rcx), %xmm0
movups %xmm0, (%rdi,%rdx)
movq -0x8(%rsp), %rdx
movq %rdx, 0x10(%rdi,%rcx)
movaps -0x18(%rsp), %xmm0
movups %xmm0, (%rdi,%rcx)
movq %rax, %rsi
jmp 0x1b0ec
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_reset
VL_EXPORT void
vl_kmeans_reset (VlKMeans * self)
{
  self->numCenters = 0 ;
  self->dimension = 0 ;

  if (self->centers) vl_free(self->centers) ;
  if (self->centerDistances) vl_free(self->centerDistances) ;

  self->centers = NULL ;
  self->centerDistances = NULL ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq 0x58(%rdi), %rdi
testq %rdi, %rdi
je 0x1b281
callq 0x95b0
movq 0x60(%rbx), %rdi
addq $0x58, %rbx
testq %rdi, %rdi
je 0x1b293
callq 0x95b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_new
VL_EXPORT VlKMeans *
vl_kmeans_new (vl_type dataType,
               VlVectorComparisonType distance)
{
  VlKMeans * self = vl_calloc(1, sizeof(VlKMeans)) ;

  self->algorithm = VlKMeansLloyd ;
  self->distance = distance ;
  self->dataType = dataType ;
  self->verbosity = 0 ;
  self->maxNumIterations = 100 ;
  self->minEnergyVariation = 1e-4 ;
  self->numRepetitions = 1 ;
  self->centers = NULL ;
  self->centerDistances = NULL ;
  self->numTrees = 3;
  self->maxNumComparisons = 100;

  vl_kmeans_reset (self) ;
  return self ;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
pushq $0x1
popq %rdi
movl $0x80, %esi
callq 0x9960
movq %rax, %r14
andl $0x0, 0x2c(%rax)
movl %ebx, 0x30(%rax)
movl %ebp, (%rax)
andl $0x0, 0x50(%rax)
pushq $0x64
popq %rax
movq %rax, 0x38(%r14)
movabsq $0x3f1a36e2eb1c432d, %rcx # imm = 0x3F1A36E2EB1C432D
movq %rcx, 0x40(%r14)
movq $0x1, 0x48(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r14)
movq $0x3, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %r14, %rdi
callq 0x9570
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x80, %edi
callq 0x95e0
movq %rax, %rbx
movq 0x2c(%r14), %rax
movq %rax, 0x2c(%rbx)
movl (%r14), %edi
movl %edi, (%rbx)
movl 0x50(%r14), %eax
movl %eax, 0x50(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x38(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x48(%rbx)
movups 0x8(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x18(%rbx)
cmpq $0x0, 0x58(%r14)
je 0x1b387
callq 0x1b3c5
movq %rax, %r15
imulq 0x8(%rbx), %r15
imulq 0x10(%rbx), %r15
movq %r15, %rdi
callq 0x95e0
movq %rax, 0x58(%rbx)
movq 0x58(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x95d0
cmpq $0x0, 0x60(%r14)
je 0x1b3bc
movl (%rbx), %edi
callq 0x1b3c5
movq 0x10(%rbx), %r15
imulq %r15, %r15
imulq %rax, %r15
movq %r15, %rdi
callq 0x95e0
movq %rax, 0x60(%rbx)
movq 0x60(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x95d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_set_centers
VL_EXPORT void
vl_kmeans_set_centers
(VlKMeans * self,
 void const * centers,
 vl_size dimension,
 vl_size numCenters)
{
  vl_kmeans_reset (self) ;

  switch (self->dataType) {
    case VL_TYPE_FLOAT :
      _vl_kmeans_set_centers_f
      (self, (float const *)centers, dimension, numCenters) ;
      break ;
    case VL_TYPE_DOUBLE :
      _vl_kmeans_set_centers_d
      (self, (double const *)centers, dimension, numCenters) ;
      break ;
    default:
      abort() ;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x9570
movl (%r15), %eax
cmpl $0x2, %eax
je 0x1b42a
cmpl $0x1, %eax
jne 0x1b45f
movq %rbx, 0x8(%r15)
movq %r12, 0x10(%r15)
imulq %r12, %rbx
shlq $0x2, %rbx
jmp 0x1b43a
movq %rbx, 0x8(%r15)
movq %r12, 0x10(%r15)
imulq %r12, %rbx
shlq $0x3, %rbx
movq %rbx, %rdi
callq 0x95e0
movq %rax, 0x58(%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x95d0
callq 0x90b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_quantize_f
static void
VL_XCAT(_vl_kmeans_quantize_, SFX)
(VlKMeans * self,
 vl_uint32 * assignments,
 TYPE * distances,
 TYPE const * data,
 vl_size numData)
{
  vl_index i ;

#if (FLT == VL_TYPE_FLOAT)
  VlFloatVectorComparisonFunction distFn = vl_get_vector_comparison_function_f(self->distance) ;
#else
  VlDoubleVectorComparisonFunction distFn = vl_get_vector_comparison_function_d(self->distance) ;
#endif

#ifdef _OPENMP
#pragma omp parallel default(none) \
            shared(self, distances, assignments, numData, distFn, data) \
            num_threads(vl_get_max_threads())
#endif
  {
    /* vl_malloc cannot be used here if mapped to MATLAB malloc */
    TYPE * distanceToCenters = malloc(sizeof(TYPE) * self->numCenters) ;

#ifdef _OPENMP
#pragma omp for
#endif
    for (i = 0 ; i < (signed)numData ; ++i) {
      vl_uindex k ;
      TYPE bestDistance = (TYPE) VL_INFINITY_D ;
      VL_XCAT(vl_eval_vector_comparison_on_all_pairs_, SFX)(distanceToCenters,
                                                            self->dimension,
                                                            data + self->dimension * i, 1,
                                                            (TYPE*)self->centers, self->numCenters,
                                                            distFn) ;
      for (k = 0 ; k < self->numCenters ; ++k) {
        if (distanceToCenters[k] < bestDistance) {
          bestDistance = distanceToCenters[k] ;
          assignments[i] = (vl_uint32)k ;
        }
      }
      if (distances) distances[i] = bestDistance ;
    }

    free(distanceToCenters) ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, 0x18(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x30(%rdi), %edi
callq 0x9830
movq %rax, 0x10(%rsp)
movq 0x10(%r12), %rbp
leaq (,%rbp,4), %rdi
callq 0x9b58
movq %rax, %rbx
movslq %r13d, %rax
xorl %r13d, %r13d
testq %rax, %rax
cmovleq %r13, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %r13
je 0x1bb62
movq 0x8(%r12), %rsi
movq 0x58(%r12), %r8
movq %rsi, %rax
imulq %r13, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,4), %rdx
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
pushq $0x1
popq %rcx
movq %rbp, %r9
callq 0x9af0
movq 0x10(%r12), %rbp
xorl %eax, %eax
movss 0x11739(%rip), %xmm0    # 0x2d270
cmpq %rax, %rbp
je 0x1bb52
movss (%rbx,%rax,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1bb4d
movl %eax, (%r15,%r13,4)
movaps %xmm1, %xmm0
incq %rax
jmp 0x1bb37
testq %r14, %r14
je 0x1bb5d
movss %xmm0, (%r14,%r13,4)
incq %r13
jmp 0x1baf0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9b50
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/shuffle-def.h
// Function: vl_kmeans_shuffle
VL_INLINE void
VL_SHUFFLE_shuffle
(VL_SHUFFLE_array array, vl_size size, VlRand * rand)
{
  vl_uindex n = size ;
  while (n > 1) {
    vl_uindex k = vl_rand_uindex (rand, n) ;
    n -- ;
    VL_SHUFFLE_swap (array, n, k) ;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x2, %r15
jb 0x1f4cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f4d1
movq -0x8(%r14,%r15,8), %rcx
movq (%r14,%rax,8), %rdx
movq %rdx, -0x8(%r14,%r15,8)
decq %r15
movq %rcx, (%r14,%rax,8)
jmp 0x1f4a3
popq %rbx
popq %r14
popq %r15
retq