	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_shift_candidate
_try_shift_candidate:                   ## @try_shift_candidate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	%r15, -96(%rbp)
	movslq	8(%rdi), %rax
	leaq	(%r15,%rax,4), %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rcx, -88(%rbp)
	leaq	(%r15,%rax,8), %r12
	movq	%r12, -80(%rbp)
	movq	32(%rdi), %rcx
	movslq	(%rsi), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movslq	4(%rsi), %rdx
	movl	(%rcx,%rdx,8), %edx
	movl	%edx, -104(%rbp)                ## 4-byte Spill
	movslq	8(%rsi), %rdx
	movl	(%rcx,%rdx,8), %ecx
	movl	%ecx, -100(%rbp)                ## 4-byte Spill
	leal	(,%rax,4), %edx
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	16(%r14), %r8
	movslq	(%rbx), %rcx
	movq	(%r8,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	movl	8(%r14), %edx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%edx, %edx
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r14), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rcx), %rax
	movslq	%edx, %rdx
	imulq	%rax, %rdx
	addq	%rdi, %rdx
	movl	(%rsi,%rdx,8), %eax
	addl	%eax, (%r12,%rdi,4)
	incq	%rdi
	movslq	8(%r14), %rdx
	cmpq	%rdx, %rdi
	jl	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movslq	8(%rbx), %rax
	movq	(%r8,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	-80(%rbp), %rdx
	movl	8(%r14), %ecx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r13d
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r14), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rax), %rbx
	movslq	%ecx, %rcx
	imulq	%rbx, %rcx
	addq	%rdi, %rcx
	movl	(%rsi,%rcx,8), %ecx
	addl	%ecx, (%rdx,%rdi,4)
	incq	%rdi
	movslq	8(%r14), %rcx
	cmpq	%rcx, %rdi
	jl	LBB0_11
	jmp	LBB0_12
LBB0_7:
	movl	8(%r14), %ecx
LBB0_13:
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	addl	-104(%rbp), %ebx                ## 4-byte Folded Reload
	addl	-100(%rbp), %ebx                ## 4-byte Folded Reload
	movq	-80(%rbp), %r12
	movq	%r12, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_vect_division
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movl	4(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	callq	_get_new_centroids
	movq	16(%r14), %rax
	movslq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_eval_error_cell
	movl	%eax, %r15d
	movq	16(%r14), %rax
	movslq	8(%r13), %rcx
	movq	(%rax,%rcx,8), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_eval_error_cell
	movl	%eax, %r12d
	addl	%r15d, %r12d
	movl	%r12d, -52(%rbp)
	movl	8(%r14), %esi
	movq	24(%r14), %r8
	movq	16(%r14), %rax
	movslq	4(%r13), %rcx
	movq	(%rax,%rcx,8), %r9
	leaq	-96(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r14, %rdi
	callq	_simple_lbg
	movq	%rax, %r15
	addl	%r12d, %r15d
	subl	%ebx, %r15d
	jge	LBB0_15
## %bb.14:
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_shift_codebook
	addl	%r15d, 12(%r14)
	movl	(%r13), %esi
	movl	-60(%rbp), %edx
	movq	%r14, %rdi
	callq	_update_utility_and_n_cb
	movl	4(%r13), %esi
	movl	-56(%rbp), %edx
	movq	%r14, %rdi
	callq	_update_utility_and_n_cb
	movl	8(%r13), %esi
	movl	-52(%rbp), %edx
	movq	%r14, %rdi
	callq	_update_utility_and_n_cb
	movq	%r14, %rdi
	callq	_evaluate_utility_inc
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_try_shift_candidate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_shift_candidate
_try_shift_candidate:                   ; @try_shift_candidate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x21, [x0]
	ldrsw	x8, [x0, #8]
	add	x22, x21, x8, lsl #2
	stp	x21, x22, [sp]
	add	x23, x21, x8, lsl #3
	str	x23, [sp, #16]
	ldr	x9, [x0, #32]
	ldpsw	x10, x11, [x1]
	ldr	x24, [x9, x10, lsl #3]
	ldr	x25, [x9, x11, lsl #3]
	ldrsw	x10, [x1, #8]
	ldr	x26, [x9, x10, lsl #3]
	lsl	w2, w8, #2
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19, #16]
	ldrsw	x9, [x20]
	ldr	x9, [x8, x9, lsl #3]
	cbz	x9, LBB0_7
; %bb.1:
	mov	w2, #0
	ldr	w10, [x19, #8]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x13, x10
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w2, w2, #1
	ldr	x9, [x9, #8]
	mov	x10, x13
	cbz	x9, LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w10, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x11, #0
	ldr	x12, [x19, #24]
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x13, [x9]
	sxtw	x10, w10
	madd	x10, x13, x10, x11
	ldr	x10, [x12, x10, lsl #3]
	lsl	x13, x11, #2
	ldr	w14, [x23, x13]
	add	w10, w14, w10
	str	w10, [x23, x13]
	add	x11, x11, #1
	ldrsw	x13, [x19, #8]
	mov	x10, x13
	cmp	x11, x13
	b.lt	LBB0_6
	b	LBB0_3
LBB0_7:
	mov	w2, #0
LBB0_8:
	ldrsw	x9, [x20, #8]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_15
; %bb.9:
	ldr	x9, [sp, #16]
	ldr	w10, [x19, #8]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x3, x10
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w2, w2, #1
	ldr	x8, [x8, #8]
	mov	x10, x3
	cbz	x8, LBB0_16
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	cmp	w10, #1
	b.lt	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x11, #0
	ldr	x12, [x19, #24]
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x13, [x8]
	sxtw	x10, w10
	madd	x10, x13, x10, x11
	ldr	x10, [x12, x10, lsl #3]
	lsl	x13, x11, #2
	ldr	w14, [x9, x13]
	add	w10, w14, w10
	str	w10, [x9, x13]
	add	x11, x11, #1
	ldrsw	x3, [x19, #8]
	mov	x10, x3
	cmp	x11, x3
	b.lt	LBB0_14
	b	LBB0_11
LBB0_15:
	ldr	w3, [x19, #8]
LBB0_16:
	add	w8, w24, w25
	add	w24, w8, w26
	ldr	x23, [sp, #16]
	mov	x0, x23
	mov	x1, x23
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_vect_division
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	bl	_get_new_centroids
	ldr	x8, [x19, #16]
	ldrsw	x9, [x20]
	ldr	x2, [x8, x9, lsl #3]
	mov	x0, x19
	mov	x1, x23
	bl	_eval_error_cell
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldrsw	x9, [x20, #8]
	ldr	x2, [x8, x9, lsl #3]
	mov	x0, x19
	mov	x1, x23
	bl	_eval_error_cell
	add	w21, w21, w0
	str	w21, [sp, #36]
	ldr	w1, [x19, #8]
	ldp	x8, x4, [x19, #16]
	ldrsw	x9, [x20, #4]
	ldr	x5, [x8, x9, lsl #3]
	mov	x2, sp
	add	x3, sp, #28
	mov	x0, x19
	bl	_simple_lbg
	add	w8, w21, w0
	subs	w21, w8, w24
	b.ge	LBB0_18
; %bb.17:
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_shift_codebook
	ldr	w8, [x19, #12]
	add	w8, w21, w8
	str	w8, [x19, #12]
	ldr	w1, [x20]
	ldr	w2, [sp, #28]
	mov	x0, x19
	bl	_update_utility_and_n_cb
	ldr	w1, [x20, #4]
	ldr	w2, [sp, #32]
	mov	x0, x19
	bl	_update_utility_and_n_cb
	ldr	w1, [x20, #8]
	ldr	w2, [sp, #36]
	mov	x0, x19
	bl	_update_utility_and_n_cb
	mov	x0, x19
	bl	_evaluate_utility_inc
LBB0_18:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_try_shift_candidate
.subsections_via_symbols
