	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt2032_set_if_freq
_mt2032_set_if_freq:                    ## @mt2032_set_if_freq
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -96(%rbp)                 ## 4-byte Spill
	movl	%r8d, -92(%rbp)                 ## 4-byte Spill
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	movb	$0, -80(%rbp)
	leaq	4(%r12), %rbx
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_tuner_i2c_xfer_send
	movq	%rbx, %rdi
	leaq	-80(%rbp), %rsi
	movl	$21, %edx
	callq	_tuner_i2c_xfer_recv
	movb	$0, -80(%rbp)
	leaq	-79(%rbp), %r10
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movl	(%r12), %eax
	subq	$8, %rsp
	leaq	-84(%rbp), %r11
	movq	%r13, %r12
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	movl	-92(%rbp), %r8d                 ## 4-byte Reload
	movl	-96(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_mt2032_compute_freq
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movb	$0, -80(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_tuner_i2c_xfer_send
	leaq	-75(%rbp), %rsi
	movb	$5, -75(%rbp)
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_tuner_i2c_xfer_send
	leaq	-69(%rbp), %rsi
	movb	$11, -69(%rbp)
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_tuner_i2c_xfer_send
	cmpl	$3, %eax
	movq	%rbx, %r13
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_tuner_warn
LBB0_3:
	movq	%r12, %rdi
	callq	_mt2032_check_lo_lock
	movq	_optimize_vco@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movl	-84(%rbp), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_mt2032_optimize_vco
LBB0_5:
	cmpl	$6, %eax
	je	LBB0_10
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	movb	$7, -80(%rbp)
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movb	(%rbx), %al
	addb	$-120, %al
	movb	%al, -79(%rbp)
	leaq	-80(%rbp), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	movl	$10, %edi
	callq	_mdelay
	movb	(%rbx), %al
	addb	$8, %al
	movb	%al, -79(%rbp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	movq	%r12, %rdi
	callq	_mt2032_check_lo_lock
	cmpq	$0, (%r14)
	je	LBB0_8
## %bb.7:
	movl	-84(%rbp), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_mt2032_optimize_vco
LBB0_8:
	cmpl	$6, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	movb	$7, -80(%rbp)
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movb	(%rbx), %al
	addb	$-120, %al
	movb	%al, -79(%rbp)
	leaq	-80(%rbp), %r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	movl	$10, %edi
	callq	_mdelay
	movb	(%rbx), %al
	addb	$8, %al
	movb	%al, -79(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_warn
LBB0_10:
	movw	$8194, -80(%rbp)                ## imm = 0x2002
	leaq	-80(%rbp), %rsi
	movq	%r13, %rdi
	movl	$2, %edx
	callq	_tuner_i2c_xfer_send
	cmpl	$2, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_tuner_warn
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mt2032_set_if_freq rfin=%d if1=%d if2=%d from=%d to=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"i2c i/o error: rc == %d (should be 3)\n"

	.comm	_optimize_vco,8,3               ## @optimize_vco
L_.str.2:                               ## @.str.2
	.asciz	"mt2032: re-init PLLs by LINT\n"

L_.str.3:                               ## @.str.3
	.asciz	"MT2032 Fatal Error: PLLs didn't lock.\n"

L_.str.4:                               ## @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 2)\n"

	.no_dead_strip	_mt2032_set_if_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt2032_set_if_freq
_mt2032_set_if_freq:                    ; @mt2032_set_if_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldr	x26, [x0]
	stp	x22, x21, [sp, #24]
	stp	x24, x23, [sp, #8]
	str	x25, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_dbg
	strb	wzr, [sp, #51]
	add	x19, x26, #4
	add	x27, sp, #51
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #1
	bl	_tuner_i2c_xfer_send
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #21
	bl	_tuner_i2c_xfer_recv
	strb	wzr, [sp, #51]
	add	x6, x27, #1
	ldr	w8, [x26]
	str	w8, [sp]
	add	x7, sp, #44
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	bl	_mt2032_compute_freq
	tbnz	w0, #31, LBB0_12
; %bb.1:
	strb	wzr, [sp, #51]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #4
	bl	_tuner_i2c_xfer_send
	add	x1, x27, #5
	mov	w8, #5
	strb	w8, [sp, #56]
	mov	x0, x19
	mov	w2, #4
	bl	_tuner_i2c_xfer_send
	add	x1, x27, #11
	mov	w8, #11
	strb	w8, [sp, #62]
	mov	x0, x19
	mov	w2, #3
	bl	_tuner_i2c_xfer_send
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #3
	b.eq	LBB0_3
; %bb.2:
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tuner_warn
LBB0_3:
	mov	x0, x20
	bl	_mt2032_check_lo_lock
	mov	x2, x0
Lloh7:
	adrp	x21, _optimize_vco@GOTPAGE
Lloh8:
	ldr	x21, [x21, _optimize_vco@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w1, [sp, #44]
	mov	x0, x20
	bl	_mt2032_optimize_vco
	mov	x2, x0
LBB0_5:
	cmp	w2, #6
	b.eq	LBB0_10
; %bb.6:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tuner_dbg
	mov	w8, #7
	strb	w8, [sp, #51]
	ldrb	w8, [x26]
	sub	w8, w8, #120
	strb	w8, [sp, #52]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
	mov	w0, #10
	bl	_mdelay
	ldrb	w8, [x26]
	add	w8, w8, #8
	strb	w8, [sp, #52]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
	mov	x0, x20
	bl	_mt2032_check_lo_lock
	mov	x2, x0
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w1, [sp, #44]
	mov	x0, x20
	bl	_mt2032_optimize_vco
	mov	x2, x0
LBB0_8:
	cmp	w2, #6
	b.eq	LBB0_10
; %bb.9:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tuner_dbg
	mov	w8, #7
	strb	w8, [sp, #51]
	ldrb	w8, [x26]
	sub	w8, w8, #120
	strb	w8, [sp, #52]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
	mov	w0, #10
	bl	_mdelay
	ldrb	w8, [x26]
	add	w8, w8, #8
	strb	w8, [sp, #52]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tuner_warn
LBB0_10:
	mov	w8, #8194
	sturh	w8, [sp, #51]
	add	x1, sp, #51
	mov	x0, x19
	mov	w2, #2
	bl	_tuner_i2c_xfer_send
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #2
	b.eq	LBB0_12
; %bb.11:
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tuner_warn
LBB0_12:
	ldr	x8, [sp, #72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mt2032_set_if_freq rfin=%d if1=%d if2=%d from=%d to=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"i2c i/o error: rc == %d (should be 3)\n"

	.comm	_optimize_vco,8,3               ; @optimize_vco
l_.str.2:                               ; @.str.2
	.asciz	"mt2032: re-init PLLs by LINT\n"

l_.str.3:                               ; @.str.3
	.asciz	"MT2032 Fatal Error: PLLs didn't lock.\n"

l_.str.4:                               ; @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 2)\n"

	.no_dead_strip	_mt2032_set_if_freq
.subsections_via_symbols
