// File: /workspace/github_c_makefile_star2_O3/zpole[P]IICV/vl/kmeans.c
// Function: vl_kmeans_init_centers_with_rand_data
VL_EXPORT void
vl_kmeans_init_centers_with_rand_data
(VlKMeans * self,
 void const * data,
 vl_size dimension,
 vl_size numData,
 vl_size numCenters)
{
  vl_kmeans_reset (self) ;

  switch (self->dataType) {
    case VL_TYPE_FLOAT :
      _vl_kmeans_init_centers_with_rand_data_f
      (self, (float const *)data, dimension, numData, numCenters) ;
      break ;
    case VL_TYPE_DOUBLE :
      _vl_kmeans_init_centers_with_rand_data_d
      (self, (double const *)data, dimension, numData, numCenters) ;
      break ;
    default:
      abort() ;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
callq 0x9540
movl (%r14), %eax
cmpl $0x2, %eax
movq %r12, 0x8(%rsp)
movq %rbx, 0x40(%rsp)
movq %r14, 0x10(%rsp)
movq %r15, 0x20(%rsp)
je 0x1e845
cmpl $0x1, %eax
jne 0x1ea9e
callq 0x98a0
movq %rax, %r15
movq 0x20(%rsp), %rax
movq %rax, 0x8(%r14)
movq %rbx, 0x10(%r14)
leaq (,%rax,4), %rdi
movq %rdi, 0x38(%rsp)
imulq %rbx, %rdi
callq 0x95b0
movq %rax, 0x58(%r14)
leaq (,%r12,8), %rdi
callq 0x95b0
movq %rax, %rbp
movl 0x30(%r14), %edi
callq 0x97d0
movq %rax, 0x30(%rsp)
leaq (,%rbx,4), %rdi
callq 0x95b0
movq %rax, %r14
testq %r12, %r12
je 0x1e771
movq 0x8(%rsp), %rsi
leaq 0x1(%rsi), %rax
andq $-0x2, %rax
leaq -0x1(%rsi), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x13972(%rip), %xmm1    # 0x32000
xorl %ecx, %ecx
movdqa 0x13978(%rip), %xmm2    # 0x32010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x13978(%rip), %xmm4    # 0x32020
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x1e6de
movq %rcx, (%rbp,%rcx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1e6f5
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp,%rcx,8)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x1e6a8
cmpq $0x1, %rsi
je 0x1e771
movq 0x8(%rsp), %rbx
movq %r15, 0x28(%rsp)
movq %rbx, %r13
shrq $0x20, %r13
movq %r15, %rdi
callq 0x9340
movl %eax, %r12d
testq %r13, %r13
jne 0x1e732
movl %r12d, %eax
xorl %edx, %edx
divl %ebx
jmp 0x1e74b
movq %r15, %rdi
callq 0x9340
movl %eax, %eax
shlq $0x20, %r12
orq %rax, %r12
movq %r12, %rax
xorl %edx, %edx
divq %rbx
movq -0x8(%rbp,%rbx,8), %rax
movq (%rbp,%rdx,8), %rcx
movq %rcx, -0x8(%rbp,%rbx,8)
leaq -0x1(%rbx), %rcx
movq %rax, (%rbp,%rdx,8)
movq %rcx, %rbx
cmpq $0x1, %rcx
movq 0x28(%rsp), %r15
ja 0x1e712
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x1ea80
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x20(%rsp), %r15
movq %rbx, %rax
subq %r12, %rax
movq 0x8(%rsp), %rcx
subq %r13, %rcx
cmpq %rcx, %rax
jae 0x1e801
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,4), %rdx
movq 0x10(%rsp), %rax
movq 0x58(%rax), %r8
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r9
callq 0x9a70
pxor %xmm1, %xmm1
testq %r12, %r12
je 0x1e801
xorl %eax, %eax
xorl %ecx, %ecx
movss (%r14,%rcx,4), %xmm0
cmpeqss %xmm1, %xmm0
movd %xmm0, %edx
andl $0x1, %edx
orl %edx, %eax
incq %rcx
cmpq %rcx, %r12
jne 0x1e7e1
testl %eax, %eax
jne 0x1e834
movq %r12, %rdi
imulq %r15, %rdi
shlq $0x2, %rdi
movq 0x10(%rsp), %rax
addq 0x58(%rax), %rdi
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq 0x38(%rsp), %rdx
callq 0x95a0
incq %r12
incq %r13
cmpq %rbx, %r12
jb 0x1e78a
jmp 0x1ea80
callq 0x98a0
movq %r15, %rcx
movq %rax, %r15
movq %rcx, 0x8(%r14)
movq %rbx, 0x10(%r14)
leaq (,%rcx,8), %rdi
movq %rdi, 0x38(%rsp)
imulq %rbx, %rdi
callq 0x95b0
movq %rax, 0x58(%r14)
leaq (,%r12,8), %rdi
callq 0x95b0
movq %rax, %rbp
movl 0x30(%r14), %edi
callq 0x9800
movq %rax, 0x30(%rsp)
leaq (,%rbx,8), %rdi
callq 0x95b0
movq %rax, %r14
testq %r12, %r12
je 0x1e9b0
movq 0x8(%rsp), %rsi
leaq 0x1(%rsi), %rax
andq $-0x2, %rax
leaq -0x1(%rsi), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x13734(%rip), %xmm1    # 0x32000
xorl %ecx, %ecx
movdqa 0x1373a(%rip), %xmm2    # 0x32010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1373a(%rip), %xmm4    # 0x32020
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x1e91c
movq %rcx, (%rbp,%rcx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1e933
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp,%rcx,8)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x1e8e6
cmpq $0x1, %rsi
je 0x1e9b0
movq 0x8(%rsp), %r13
movq %r15, 0x28(%rsp)
movq %r13, %rbx
shrq $0x20, %rbx
movq %r15, %rdi
callq 0x9340
movl %eax, %r12d
testq %rbx, %rbx
jne 0x1e971
movl %r12d, %eax
xorl %edx, %edx
divl %r13d
jmp 0x1e98a
movq %r15, %rdi
callq 0x9340
movl %eax, %eax
shlq $0x20, %r12
orq %rax, %r12
movq %r12, %rax
xorl %edx, %edx
divq %r13
movq -0x8(%rbp,%r13,8), %rax
movq (%rbp,%rdx,8), %rcx
movq %rcx, -0x8(%rbp,%r13,8)
leaq -0x1(%r13), %rcx
movq %rax, (%rbp,%rdx,8)
movq %rcx, %r13
cmpq $0x1, %rcx
movq 0x28(%rsp), %r15
ja 0x1e950
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x1ea80
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x20(%rsp), %r15
movq %rbx, %rax
subq %r12, %rax
movq 0x8(%rsp), %rcx
subq %r13, %rcx
cmpq %rcx, %rax
jae 0x1ea41
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,8), %rdx
movq 0x10(%rsp), %rax
movq 0x58(%rax), %r8
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r9
callq 0x9a80
pxor %xmm1, %xmm1
testq %r12, %r12
je 0x1ea41
xorl %eax, %eax
xorl %ecx, %ecx
movsd (%r14,%rcx,8), %xmm0
cmpeqsd %xmm1, %xmm0
movq %xmm0, %rdx
andl $0x1, %edx
orl %edx, %eax
incq %rcx
cmpq %rcx, %r12
jne 0x1ea20
testl %eax, %eax
jne 0x1ea74
movq %r12, %rdi
imulq %r15, %rdi
shlq $0x3, %rdi
movq 0x10(%rsp), %rax
addq 0x58(%rax), %rdi
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
movq 0x38(%rsp), %rdx
callq 0x95a0
incq %r12
incq %r13
cmpq %rbx, %r12
jb 0x1e9c9
movq %r14, %rdi
callq 0x9580
movq %rbp, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9580
callq 0x90b0