	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt2032_optimize_vco
_mt2032_optimize_vco:                   ## @mt2032_optimize_vco
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movb	$15, -42(%rbp)
	leaq	-42(%rbp), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_tuner_i2c_xfer_send
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_tuner_i2c_xfer_recv
	movzbl	-42(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	callq	_tuner_dbg
	movb	-42(%rbp), %al
	andb	$7, %al
	cmpb	$2, %al
	jb	LBB0_5
## %bb.1:
	jne	LBB0_3
## %bb.2:
	movl	$-1, %r13d
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_4:
	addl	%r14d, %r13d
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	callq	_tuner_dbg
	movb	$15, -42(%rbp)
	movb	%r13b, -41(%rbp)
	leaq	-42(%rbp), %rsi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	movq	%rbx, %rdi
	callq	_mt2032_check_lo_lock
	movl	%eax, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$1, %r13d
	cmpl	$3, %r14d
	jle	LBB0_4
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mt2032 Reg.F=0x%02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"mt2032 optimize_vco: sel=%d\n"

	.no_dead_strip	_mt2032_optimize_vco
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt2032_optimize_vco
_mt2032_optimize_vco:                   ; @mt2032_optimize_vco
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0]
	mov	w8, #15
	strb	w8, [sp, #14]
	add	x1, sp, #14
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_i2c_xfer_send
	add	x1, sp, #14
	mov	x0, x20
	mov	w2, #1
	bl	_tuner_i2c_xfer_recv
	ldrb	w1, [sp, #14]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_dbg
	ldrb	w8, [sp, #14]
	and	w8, w8, #0x7
	cmp	w8, #2
	b.lo	LBB0_7
; %bb.1:
	b.ne	LBB0_4
; %bb.2:
	cbz	w21, LBB0_7
; %bb.3:
	mov	w8, #-1
	b	LBB0_6
LBB0_4:
	cmp	w21, #3
	b.gt	LBB0_7
; %bb.5:
	mov	w8, #1
LBB0_6:
	add	w21, w8, w21
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_tuner_dbg
	mov	w8, #15
	strb	w8, [sp, #14]
	strb	w21, [sp, #15]
	add	x1, sp, #14
	mov	x0, x20
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
	mov	x0, x19
	bl	_mt2032_check_lo_lock
	mov	x22, x0
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mt2032 Reg.F=0x%02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"mt2032 optimize_vco: sel=%d\n"

	.no_dead_strip	_mt2032_optimize_vco
.subsections_via_symbols
