// File: /workspace/github_c_makefile_star2_O1/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, 0x20(%rsp)
movq %rdi, %r14
callq 0x9540
movl (%r14), %eax
cmpl $0x2, %eax
movq %rbx, 0x40(%rsp)
movq %r12, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r15, 0x38(%rsp)
je 0x1e87d
cmpl $0x1, %eax
jne 0x1eacd
callq 0x98a0
movq %rax, %r13
movq %r15, 0x8(%r14)
movq %rbx, 0x10(%r14)
leaq (,%r15,4), %rdi
movq %rdi, 0x30(%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, 0x28(%rsp)
leaq (,%rbx,4), %rdi
callq 0x95b0
movq %rax, %r14
testq %r12, %r12
je 0x1e73e
leaq 0x1(%r12), %rax
andq $-0x2, %rax
leaq -0x1(%r12), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x14936(%rip), %xmm1    # 0x33000
xorl %ecx, %ecx
movdqa 0x1493c(%rip), %xmm2    # 0x33010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1493c(%rip), %xmm4    # 0x33020
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 0x1e71a
movq %rcx, (%rbp,%rcx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1e731
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp,%rcx,8)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x1e6e4
cmpq $0x2, %r12
jb 0x1e7a9
movq 0x10(%rsp), %rbx
movq %r13, %r15
movq %rbx, %r12
shrq $0x20, %r12
movq %r13, %rdi
callq 0x9340
movq %r13, %rdi
movl %eax, %r13d
testq %r12, %r12
jne 0x1e76f
movl %r13d, %eax
xorl %edx, %edx
divl %ebx
jmp 0x1e785
callq 0x9340
movl %eax, %eax
shlq $0x20, %r13
orq %rax, %r13
movq %r13, %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 %r15, %r13
ja 0x1e74c
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x1eaaf
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x38(%rsp), %r15
movq %rbx, %rax
subq %r12, %rax
movq 0x10(%rsp), %rcx
subq %r13, %rcx
cmpq %rcx, %rax
jae 0x1e839
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,4), %rdx
movq 0x18(%rsp), %rax
movq 0x58(%rax), %r8
movq 0x28(%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 0x1e839
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 0x1e819
testl %eax, %eax
jne 0x1e86c
movq %r12, %rdi
imulq %r15, %rdi
shlq $0x2, %rdi
movq 0x18(%rsp), %rax
addq 0x58(%rax), %rdi
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq 0x30(%rsp), %rdx
callq 0x95a0
incq %r12
incq %r13
cmpq %rbx, %r12
jb 0x1e7c2
jmp 0x1eaaf
callq 0x98a0
movq %rax, %r13
movq %r15, 0x8(%r14)
movq %rbx, 0x10(%r14)
leaq (,%r15,8), %rdi
movq %rdi, 0x30(%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, 0x28(%rsp)
leaq (,%rbx,8), %rdi
callq 0x95b0
movq %rax, %r14
testq %r12, %r12
je 0x1e972
leaq 0x1(%r12), %rax
andq $-0x2, %rax
leaq -0x1(%r12), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x14702(%rip), %xmm1    # 0x33000
xorl %ecx, %ecx
movdqa 0x14708(%rip), %xmm2    # 0x33010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x14708(%rip), %xmm4    # 0x33020
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 0x1e94e
movq %rcx, (%rbp,%rcx,8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1e965
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbp,%rcx,8)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x1e918
cmpq $0x2, %r12
jb 0x1e9df
movq 0x10(%rsp), %r12
movq %r13, %r15
movq %r12, %rbx
shrq $0x20, %rbx
movq %r13, %rdi
callq 0x9340
movq %r13, %rdi
movl %eax, %r13d
testq %rbx, %rbx
jne 0x1e9a4
movl %r13d, %eax
xorl %edx, %edx
divl %r12d
jmp 0x1e9ba
callq 0x9340
movl %eax, %eax
shlq $0x20, %r13
orq %rax, %r13
movq %r13, %rax
xorl %edx, %edx
divq %r12
movq -0x8(%rbp,%r12,8), %rax
movq (%rbp,%rdx,8), %rcx
movq %rcx, -0x8(%rbp,%r12,8)
leaq -0x1(%r12), %rcx
movq %rax, (%rbp,%rdx,8)
movq %rcx, %r12
cmpq $0x1, %rcx
movq %r15, %r13
ja 0x1e980
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
je 0x1eaaf
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x38(%rsp), %r15
movq %rbx, %rax
subq %r12, %rax
movq 0x10(%rsp), %rcx
subq %r13, %rcx
cmpq %rcx, %rax
jae 0x1ea70
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rdx
movq 0x18(%rsp), %rax
movq 0x58(%rax), %r8
movq 0x28(%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 0x1ea70
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 0x1ea4f
testl %eax, %eax
jne 0x1eaa3
movq %r12, %rdi
imulq %r15, %rdi
shlq $0x3, %rdi
movq 0x18(%rsp), %rax
addq 0x58(%rax), %rdi
movq (%rbp,%r13,8), %rax
imulq %r15, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rsi
movq 0x30(%rsp), %rdx
callq 0x95a0
incq %r12
incq %r13
cmpq %rbx, %r12
jb 0x1e9f8
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