	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_find_nearest_q_idx          ## -- Begin function av_find_nearest_q_idx
	.p2align	4, 0x90
_av_find_nearest_q_idx:                 ## @av_find_nearest_q_idx
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rdx
	xorl	%r15d, %r15d
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rdx, %rsi
	callq	_av_nearer_q
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	xorl	%r15d, %r15d
	movl	$2, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12,%rbx,8), %rsi
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %rax
	movq	(%r12,%rax,8), %rdx
	movq	%r14, %rdi
	callq	_av_nearer_q
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rbx), %r15d
	jmp	LBB0_5
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_find_nearest_q_idx          ; -- Begin function av_find_nearest_q_idx
	.p2align	2
_av_find_nearest_q_idx:                 ; @av_find_nearest_q_idx
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x1, [x1]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x2, x1
	bl	_av_nearer_q
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_4
; %bb.2:
	mov	w21, #0
	mov	w22, #2
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x19, w21, sxtw #3]
	mov	x0, x20
	bl	_av_nearer_q
	sub	w8, w22, #1
	cmp	x0, #0
	csel	w21, w8, w21, gt
	ldr	x1, [x19, x22, lsl #3]
	add	x22, x22, #1
	cbnz	x1, LBB0_3
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
