	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function best_codebook_path_cost
_best_codebook_path_cost:               ## @best_codebook_path_cost
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdx), %ebx
	movq	8(%rdx), %rax
	cmpb	$0, 1(%rax)
	je	LBB0_8
## %bb.1:
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, 2(%rax,%rdx)
	leaq	1(%rdx), %rdx
	jne	LBB0_2
## %bb.3:
	movq	(%rdi), %r9
	movl	%esi, %esi
	leaq	(,%rsi,8), %r8
	addq	-8(%r9,%rdx,8), %r8
	jmp	LBB0_4
LBB0_8:
	movq	(%rdi), %r9
	movl	%esi, %esi
	xorl	%edx, %edx
	movq	_restart_best_offset@GOTPCREL(%rip), %r8
LBB0_4:
	movl	%edx, %edi
	movslq	%edx, %rdx
	movsbl	(%rax,%rdx), %edx
	movq	_ZERO_PATH@GOTPCREL(%rip), %rax
	movsbl	(%rax), %eax
	subl	%eax, %edx
	movq	(%r9,%rdi,8), %rax
	movq	(%rax,%rsi,8), %rax
	movslq	%ecx, %rdi
	addl	(%rax,%rdi,4), %ebx
	cmpl	%edi, %edx
	jne	LBB0_6
## %bb.5:
	leaq	(%rax,%rdi,4), %rsi
	shlq	$2, %rdi
	addq	(%r8), %rdi
	callq	_compare_best_offset
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_CODEBOOK_CHANGE_BITS@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_restart_best_offset,8,3        ## @restart_best_offset
	.comm	_ZERO_PATH,1,0                  ## @ZERO_PATH
	.comm	_CODEBOOK_CHANGE_BITS,8,3       ## @CODEBOOK_CHANGE_BITS
	.no_dead_strip	_best_codebook_path_cost
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function best_codebook_path_cost
_best_codebook_path_cost:               ; @best_codebook_path_cost
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w3 killed $w3 def $x3
	ldr	w8, [x2]
	ldr	x9, [x2, #8]
	ldrb	w10, [x9, #1]
	cbz	w10, LBB0_4
; %bb.1:
	mov	x10, #0
	add	x11, x9, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x11, x10]
	add	x10, x10, #1
	cbnz	w12, LBB0_2
; %bb.3:
	ldr	x11, [x0]
	add	x12, x11, x10, lsl #3
	ldur	x12, [x12, #-8]
	mov	w13, w1
	add	x12, x12, w1, uxtw #3
	b	LBB0_5
LBB0_4:
	ldr	x11, [x0]
	mov	w13, w1
Lloh0:
	adrp	x12, _restart_best_offset@GOTPAGE
Lloh1:
	ldr	x12, [x12, _restart_best_offset@GOTPAGEOFF]
LBB0_5:
	ldrsb	w9, [x9, w10, sxtw]
Lloh2:
	adrp	x14, _ZERO_PATH@GOTPAGE
Lloh3:
	ldr	x14, [x14, _ZERO_PATH@GOTPAGEOFF]
	ldr	x10, [x11, w10, uxtw #3]
	ldr	x10, [x10, x13, lsl #3]
Lloh4:
	ldrsb	w11, [x14]
	add	x1, x10, w3, sxtw #2
	ldr	w10, [x1]
	add	w19, w10, w8
	sub	w8, w9, w11
	cmp	w8, w3
	b.ne	LBB0_7
; %bb.6:
	sxtw	x8, w3
	ldr	x9, [x12]
	add	x0, x9, x8, lsl #2
	bl	_compare_best_offset
	cbz	x0, LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _CODEBOOK_CHANGE_BITS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CODEBOOK_CHANGE_BITS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	add	w19, w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_restart_best_offset,8,3        ; @restart_best_offset
	.comm	_ZERO_PATH,1,0                  ; @ZERO_PATH
	.comm	_CODEBOOK_CHANGE_BITS,8,3       ; @CODEBOOK_CHANGE_BITS
	.no_dead_strip	_best_codebook_path_cost
.subsections_via_symbols
