	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda10021_get_frontend
_tda10021_get_frontend:                 ## @tda10021_get_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$17, %esi
	callq	_tda10021_readreg
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$25, %esi
	callq	_tda10021_readreg
	movl	%eax, %r14d
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	testb	$2, %r15b
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	8(%r12), %ecx
	imull	%r14d, %ecx
	negl	%ecx
	sarl	$10, %ecx
	movl	%r14d, %edx
	callq	_printk
LBB0_2:
	movl	(%rbx), %eax
	movq	8(%rbx), %rcx
	cmpq	$0, (%rcx)
	sete	%cl
	movl	%eax, %edx
	andl	$32, %edx
	shrl	$5, %edx
	xorb	%cl, %dl
	je	LBB0_3
## %bb.4:
	movq	_INVERSION_OFF@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_INVERSION_ON@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r12)
	shrl	$2, %eax
	andl	$7, %eax
	movq	_QAM_16@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 24(%r12)
	movq	_FEC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	$31250, %eax                    ## imm = 0x7A12
	addl	(%r12), %eax
	cltq
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$46, %rax
	addl	%ecx, %eax
	imull	$62500, %eax, %eax              ## imm = 0xF424
	movl	%eax, (%r12)
	testb	$2, %r15b
	je	LBB0_7
## %bb.6:
	imull	8(%r12), %r14d
	sarl	$10, %r14d
	subl	%r14d, %eax
	movl	%eax, (%r12)
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbose,8,3                    ## @verbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DVB: TDA10021(%d): AFC (%d) %dHz\n"

L_.str.1:                               ## @.str.1
	.asciz	"DVB: TDA10021(%d): [AFC (%d) %dHz]\n"

	.comm	_INVERSION_ON,4,2               ## @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ## @INVERSION_OFF
	.comm	_QAM_16,8,3                     ## @QAM_16
	.comm	_FEC_NONE,4,2                   ## @FEC_NONE
	.no_dead_strip	_tda10021_get_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda10021_get_frontend
_tda10021_get_frontend:                 ; @tda10021_get_frontend
	.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	x22, [x0]
	mov	x0, x22
	mov	w1, #17
	bl	_tda10021_readreg
	mov	x20, x0
	mov	x0, x22
	mov	w1, #25
	bl	_tda10021_readreg
	mov	x21, x0
Lloh0:
	adrp	x8, _verbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	tst	w20, #0x2
	csel	x0, x9, x8, eq
	ldr	x8, [x22, #16]
	ldr	w1, [x8]
	ldr	w8, [x19, #8]
	mneg	w8, w21, w8
	asr	w3, w8, #10
	mov	x2, x21
	bl	_printk
LBB0_2:
	ldr	w8, [x22]
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
	cmp	x9, #0
	cset	w9, eq
	and	w10, w8, #0x20
	eor	w9, w9, w10, lsr #5
Lloh7:
	adrp	x10, _INVERSION_ON@GOTPAGE
Lloh8:
	ldr	x10, [x10, _INVERSION_ON@GOTPAGEOFF]
Lloh9:
	adrp	x11, _INVERSION_OFF@GOTPAGE
Lloh10:
	ldr	x11, [x11, _INVERSION_OFF@GOTPAGEOFF]
	cmp	w9, #0
	csel	x9, x11, x10, ne
	ldr	w9, [x9]
	str	w9, [x19, #32]
	ubfx	x8, x8, #2, #3
Lloh11:
	adrp	x9, _QAM_16@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QAM_16@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19, #24]
Lloh14:
	adrp	x8, _FEC_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FEC_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w8, [x19]
	mov	w9, #31250
	add	w8, w8, w9
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #14
	mov	w9, #62500
	mul	w8, w8, w9
	str	w8, [x19]
	tbz	w20, #1, LBB0_4
; %bb.3:
	ldr	w9, [x19, #8]
	mul	w9, w21, w9
	sub	w8, w8, w9, asr #10
	str	w8, [x19]
LBB0_4:
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_verbose,8,3                    ; @verbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DVB: TDA10021(%d): AFC (%d) %dHz\n"

l_.str.1:                               ; @.str.1
	.asciz	"DVB: TDA10021(%d): [AFC (%d) %dHz]\n"

	.comm	_INVERSION_ON,4,2               ; @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ; @INVERSION_OFF
	.comm	_QAM_16,8,3                     ; @QAM_16
	.comm	_FEC_NONE,4,2                   ; @FEC_NONE
	.no_dead_strip	_tda10021_get_frontend
.subsections_via_symbols
