	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9005_fe_set_frontend
_af9005_fe_set_frontend:                ## @af9005_fe_set_frontend
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movl	24(%rdi), %edx
	movl	28(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_deb_info
	cmpq	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	56(%r15), %edi
	xorl	%esi, %esi
	callq	_af9005_led_control
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.3:
	movl	56(%r15), %edi
	movq	_XD_MP2IF_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_af9005_write_register_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	(%r15), %eax
	movl	56(%r15), %edi
	movq	%rax, %r12
	movzbl	%al, %edx
	movl	$44570, %esi                    ## imm = 0xAE1A
	callq	_af9005_write_ofdm_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.5:
	movq	%r12, %rax
	movzbl	%ah, %edx
	movl	56(%r15), %edi
	movl	$44569, %esi                    ## imm = 0xAE19
	callq	_af9005_write_ofdm_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.6:
	shrl	$16, %r12d
	movzbl	%r12b, %edx
	movl	56(%r15), %edi
	movl	$44568, %esi                    ## imm = 0xAE18
	callq	_af9005_write_ofdm_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movq	_xd_p_reg_aagc_rf_top_numerator_9_8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_xd_p_reg_aagc_rf_top_numerator_7_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	56(%r15), %edi
	movl	84(%r15), %r9d
	xorl	%ecx, %ecx
	movl	$2, %r8d
	callq	_af9005_write_word_agc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.8:
	movq	_xd_p_reg_aagc_if_top_numerator_9_8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_xd_p_reg_aagc_if_top_numerator_7_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	56(%r15), %edi
	movl	80(%r15), %r9d
	xorl	%ecx, %ecx
	movl	$2, %r8d
	callq	_af9005_write_word_agc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:
	movl	56(%r15), %edi
	movl	76(%r15), %r9d
	movl	$42510, %esi                    ## imm = 0xA60E
	movl	$42506, %edx                    ## imm = 0xA60A
	movl	$4, %ecx
	movl	$2, %r8d
	callq	_af9005_write_word_agc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.10:
	movl	56(%r15), %edi
	movl	72(%r15), %r9d
	movl	$42510, %esi                    ## imm = 0xA60E
	movl	$42507, %edx                    ## imm = 0xA60B
	movl	$6, %ecx
	movl	$2, %r8d
	callq	_af9005_write_word_agc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.11:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	56(%r15), %edi
	movl	24(%r14), %esi
	callq	_af9005_fe_select_bw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.12:
	movl	56(%r15), %edi
	movl	24(%r14), %esi
	callq	_af9005_fe_program_cfoe
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.13:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	56(%r15), %edi
	movl	$44797, %esi                    ## imm = 0xAEFD
	xorl	%edx, %edx
	callq	_af9005_write_ofdm_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.14:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	56(%r15), %edi
	movq	_xd_p_reg_unplug_th@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	64(%r15), %rdx
	callq	_af9005_write_ofdm_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.15:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movq	%r14, %rdi
	callq	*(%r14)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.16:
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movq	$0, -40(%rbp)
	movl	56(%r15), %edi
	leaq	-40(%rbp), %rdx
	movl	$65535, %esi                    ## imm = 0xFFFF
	movl	$1, %ecx
	callq	_af9005_write_tuner_registers
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movl	56(%r15), %edi
	movq	_xd_p_reg_api_retrain_request@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_reg_api_retrain_request_pos@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$2, %ecx
	xorl	%r8d, %r8d
	callq	_af9005_write_register_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_af9005_reset_pre_viterbi
	movq	%r14, %rdi
	callq	_af9005_reset_post_viterbi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	movups	%xmm0, 32(%r15)
	movq	$0, 48(%r15)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	$-1, 4(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"af9005_fe_set_frontend freq %d bw %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Tuner not attached"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"turn off led\n"

	.comm	_XD_MP2IF_MISC,4,2              ## @XD_MP2IF_MISC
L_.str.3:                               ## @.str.3
	.asciz	"set FCW to default value\n"

L_.str.4:                               ## @.str.4
	.asciz	"restore original TOPs\n"

	.comm	_xd_p_reg_aagc_rf_top_numerator_9_8,4,2 ## @xd_p_reg_aagc_rf_top_numerator_9_8
	.comm	_xd_p_reg_aagc_rf_top_numerator_7_0,4,2 ## @xd_p_reg_aagc_rf_top_numerator_7_0
	.comm	_xd_p_reg_aagc_if_top_numerator_9_8,4,2 ## @xd_p_reg_aagc_if_top_numerator_9_8
	.comm	_xd_p_reg_aagc_if_top_numerator_7_0,4,2 ## @xd_p_reg_aagc_if_top_numerator_7_0
L_.str.5:                               ## @.str.5
	.asciz	"select bandwidth"

L_.str.6:                               ## @.str.6
	.asciz	"clear easy mode flag\n"

L_.str.7:                               ## @.str.7
	.asciz	"set unplug threshold to original value\n"

	.comm	_xd_p_reg_unplug_th,4,2         ## @xd_p_reg_unplug_th
L_.str.8:                               ## @.str.8
	.asciz	"set tuner\n"

L_.str.9:                               ## @.str.9
	.asciz	"trigger ofsm\n"

L_.str.10:                              ## @.str.10
	.asciz	"clear retrain and freeze flag\n"

	.comm	_xd_p_reg_api_retrain_request,4,2 ## @xd_p_reg_api_retrain_request
	.comm	_reg_api_retrain_request_pos,4,2 ## @reg_api_retrain_request_pos
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_af9005_fe_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9005_fe_set_frontend
_af9005_fe_set_frontend:                ; @af9005_fe_set_frontend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	x20, [x0, #16]
	ldp	w9, w8, [x0, #24]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_18
; %bb.1:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_deb_info
	ldr	w0, [x20, #56]
	mov	w1, #0
	bl	_af9005_led_control
	cbnz	w0, LBB0_19
; %bb.2:
	ldr	w0, [x20, #56]
Lloh4:
	adrp	x8, _XD_MP2IF_MISC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _XD_MP2IF_MISC@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #2
	mov	w3, #1
	mov	w4, #0
	bl	_af9005_write_register_bits
	cbnz	w0, LBB0_19
; %bb.3:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_info
	ldr	w21, [x20]
	and	x2, x21, #0xff
	ldr	w0, [x20, #56]
	mov	w1, #44570
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_19
; %bb.4:
	ubfx	x2, x21, #8, #8
	ldr	w0, [x20, #56]
	mov	w1, #44569
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_19
; %bb.5:
	ubfx	x2, x21, #16, #8
	ldr	w0, [x20, #56]
	mov	w1, #44568
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_19
; %bb.6:
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_deb_info
Lloh11:
	adrp	x8, _xd_p_reg_aagc_rf_top_numerator_9_8@GOTPAGE
Lloh12:
	ldr	x8, [x8, _xd_p_reg_aagc_rf_top_numerator_9_8@GOTPAGEOFF]
	ldr	w0, [x20, #56]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _xd_p_reg_aagc_rf_top_numerator_7_0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _xd_p_reg_aagc_rf_top_numerator_7_0@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	w5, [x20, #84]
	mov	w3, #0
	mov	w4, #2
	bl	_af9005_write_word_agc
	cbnz	w0, LBB0_19
; %bb.7:
Lloh17:
	adrp	x8, _xd_p_reg_aagc_if_top_numerator_9_8@GOTPAGE
Lloh18:
	ldr	x8, [x8, _xd_p_reg_aagc_if_top_numerator_9_8@GOTPAGEOFF]
	ldr	w0, [x20, #56]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _xd_p_reg_aagc_if_top_numerator_7_0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _xd_p_reg_aagc_if_top_numerator_7_0@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	ldr	w5, [x20, #80]
	mov	w3, #0
	mov	w4, #2
	bl	_af9005_write_word_agc
	cbnz	w0, LBB0_19
; %bb.8:
	ldr	w0, [x20, #56]
	ldr	w5, [x20, #76]
	mov	w1, #42510
	mov	w2, #42506
	mov	w3, #4
	mov	w4, #2
	bl	_af9005_write_word_agc
	cbnz	w0, LBB0_19
; %bb.9:
	ldr	w0, [x20, #56]
	ldr	w5, [x20, #72]
	mov	w1, #42510
	mov	w2, #42507
	mov	w3, #6
	mov	w4, #2
	bl	_af9005_write_word_agc
	cbnz	w0, LBB0_19
; %bb.10:
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_deb_info
	ldr	w0, [x20, #56]
	ldr	w1, [x19, #24]
	bl	_af9005_fe_select_bw
	cbnz	w0, LBB0_19
; %bb.11:
	ldr	w0, [x20, #56]
	ldr	w1, [x19, #24]
	bl	_af9005_fe_program_cfoe
	cbnz	w0, LBB0_19
; %bb.12:
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_deb_info
	ldr	w0, [x20, #56]
	mov	w1, #44797
	mov	x2, #0
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_19
; %bb.13:
Lloh27:
	adrp	x0, l_.str.7@PAGE
Lloh28:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_deb_info
	ldr	w0, [x20, #56]
Lloh29:
	adrp	x8, _xd_p_reg_unplug_th@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xd_p_reg_unplug_th@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	x2, [x20, #64]
	bl	_af9005_write_ofdm_register
	cbnz	w0, LBB0_19
; %bb.14:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_deb_info
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_19
; %bb.15:
Lloh34:
	adrp	x0, l_.str.9@PAGE
Lloh35:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_deb_info
	str	xzr, [sp, #24]
	ldr	w0, [x20, #56]
	add	x2, sp, #24
	mov	w1, #65535
	mov	w3, #1
	bl	_af9005_write_tuner_registers
	cbnz	w0, LBB0_19
; %bb.16:
Lloh36:
	adrp	x0, l_.str.10@PAGE
Lloh37:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_deb_info
	ldr	w0, [x20, #56]
Lloh38:
	adrp	x8, _xd_p_reg_api_retrain_request@GOTPAGE
Lloh39:
	ldr	x8, [x8, _xd_p_reg_api_retrain_request@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x8, _reg_api_retrain_request_pos@GOTPAGE
Lloh42:
	ldr	x8, [x8, _reg_api_retrain_request_pos@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	w3, #2
	mov	w4, #0
	bl	_af9005_write_register_bits
	cbnz	w0, LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_af9005_reset_pre_viterbi
	mov	x0, x19
	bl	_af9005_reset_post_viterbi
	mov	w0, #0
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x20, #16]
	str	xzr, [x20, #48]
Lloh44:
	adrp	x8, _jiffies@GOTPAGE
Lloh45:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	mov	w9, #-1
	stp	w9, w8, [x20, #4]
	b	LBB0_19
LBB0_18:
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_err
Lloh49:
	adrp	x8, _ENODEV@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"af9005_fe_set_frontend freq %d bw %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Tuner not attached"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"turn off led\n"

	.comm	_XD_MP2IF_MISC,4,2              ; @XD_MP2IF_MISC
l_.str.3:                               ; @.str.3
	.asciz	"set FCW to default value\n"

l_.str.4:                               ; @.str.4
	.asciz	"restore original TOPs\n"

	.comm	_xd_p_reg_aagc_rf_top_numerator_9_8,4,2 ; @xd_p_reg_aagc_rf_top_numerator_9_8
	.comm	_xd_p_reg_aagc_rf_top_numerator_7_0,4,2 ; @xd_p_reg_aagc_rf_top_numerator_7_0
	.comm	_xd_p_reg_aagc_if_top_numerator_9_8,4,2 ; @xd_p_reg_aagc_if_top_numerator_9_8
	.comm	_xd_p_reg_aagc_if_top_numerator_7_0,4,2 ; @xd_p_reg_aagc_if_top_numerator_7_0
l_.str.5:                               ; @.str.5
	.asciz	"select bandwidth"

l_.str.6:                               ; @.str.6
	.asciz	"clear easy mode flag\n"

l_.str.7:                               ; @.str.7
	.asciz	"set unplug threshold to original value\n"

	.comm	_xd_p_reg_unplug_th,4,2         ; @xd_p_reg_unplug_th
l_.str.8:                               ; @.str.8
	.asciz	"set tuner\n"

l_.str.9:                               ; @.str.9
	.asciz	"trigger ofsm\n"

l_.str.10:                              ; @.str.10
	.asciz	"clear retrain and freeze flag\n"

	.comm	_xd_p_reg_api_retrain_request,4,2 ; @xd_p_reg_api_retrain_request
	.comm	_reg_api_retrain_request_pos,4,2 ; @reg_api_retrain_request_pos
	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_af9005_fe_set_frontend
.subsections_via_symbols
