	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2832_set_frontend
_rtl2832_set_frontend:                  ## @rtl2832_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	%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
	movq	%rdi, %r15
	movq	32(%rdi), %r12
	movq	16(%r12), %r14
	movl	24(%rdi), %edx
	movl	16(%rdi), %ecx
	movl	20(%rdi), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	*%rax
LBB0_2:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	*%rax
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.4:
	movl	-48(%rbp), %esi
	movq	%r15, %rdi
	callq	_rtl2832_set_if
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
LBB0_5:
	movl	16(%r15), %edx
	cmpl	$6000000, %edx                  ## imm = 0x5B8D80
	je	LBB0_6
## %bb.7:
	cmpl	$8000000, %edx                  ## imm = 0x7A1200
	je	LBB0_11
## %bb.8:
	cmpl	$7000000, %edx                  ## imm = 0x6ACFC0
	jne	LBB0_10
## %bb.9:
	movl	$1, %eax
	movl	$56000000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x3567E00
	jmp	LBB0_12
LBB0_6:
	movl	$48000000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x2DC6C00
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_11:
	movl	$2, %eax
	movl	$64000000, -44(%rbp)            ## 4-byte Folded Spill
                                        ## imm = 0x3D09000
LBB0_12:
	shlq	$12, %rax
	leaq	_rtl2832_set_frontend.bw_params(%rip), %rbx
	addq	%rax, %rbx
	movq	$-4096, %r15                    ## imm = 0xF000
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %edi
	leal	4380(%r15), %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_regmap_bulk_write
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_14 Depth=1
	subq	$-128, %rbx
	incq	%r15
	jne	LBB0_14
## %bb.16:
	movq	(%r12), %rax
	imull	$29360128, (%rax), %edi         ## imm = 0x1C00000
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_div_u64
	andl	$67108863, %eax                 ## imm = 0x3FFFFFF
	movq	_DVBT_RSAMP_RATIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:
	shll	$20, %ebx
	movq	(%r12), %rax
	movl	(%rax), %eax
	leal	(,%rax,8), %esi
	subl	%eax, %esi
	movl	%ebx, %edi
	callq	_div_u64
	negl	%eax
	andl	$1048575, %eax                  ## imm = 0xFFFFF
	movq	_DVBT_CFREQ_OFF_RATIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.18:
	movq	_DVBT_SOFT_RST@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movl	(%rbx), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_21
LBB0_15:
	movl	%eax, %r13d
	jmp	LBB0_20
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_20:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r13d, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @rtl2832_set_frontend.bw_params
_rtl2832_set_frontend.bw_params:
	.long	245                             ## 0xf5
	.long	255                             ## 0xff
	.long	21                              ## 0x15
	.long	56                              ## 0x38
	.long	93                              ## 0x5d
	.long	109                             ## 0x6d
	.long	82                              ## 0x52
	.long	7                               ## 0x7
	.long	250                             ## 0xfa
	.long	47                              ## 0x2f
	.long	83                              ## 0x53
	.long	245                             ## 0xf5
	.long	63                              ## 0x3f
	.long	202                             ## 0xca
	.long	11                              ## 0xb
	.long	145                             ## 0x91
	.long	234                             ## 0xea
	.long	48                              ## 0x30
	.long	99                              ## 0x63
	.long	178                             ## 0xb2
	.long	19                              ## 0x13
	.long	218                             ## 0xda
	.long	11                              ## 0xb
	.long	196                             ## 0xc4
	.long	24                              ## 0x18
	.long	126                             ## 0x7e
	.long	22                              ## 0x16
	.long	102                             ## 0x66
	.long	8                               ## 0x8
	.long	103                             ## 0x67
	.long	25                              ## 0x19
	.long	224                             ## 0xe0
	.space	3968
	.long	231                             ## 0xe7
	.long	204                             ## 0xcc
	.long	181                             ## 0xb5
	.long	186                             ## 0xba
	.long	232                             ## 0xe8
	.long	47                              ## 0x2f
	.long	103                             ## 0x67
	.long	97                              ## 0x61
	.long	0                               ## 0x0
	.long	175                             ## 0xaf
	.long	134                             ## 0x86
	.long	242                             ## 0xf2
	.long	191                             ## 0xbf
	.long	89                              ## 0x59
	.long	4                               ## 0x4
	.long	17                              ## 0x11
	.long	182                             ## 0xb6
	.long	51                              ## 0x33
	.long	164                             ## 0xa4
	.long	48                              ## 0x30
	.long	21                              ## 0x15
	.long	16                              ## 0x10
	.long	10                              ## 0xa
	.long	66                              ## 0x42
	.long	24                              ## 0x18
	.long	248                             ## 0xf8
	.long	23                              ## 0x17
	.long	217                             ## 0xd9
	.long	7                               ## 0x7
	.long	34                              ## 0x22
	.long	25                              ## 0x19
	.long	16                              ## 0x10
	.space	3968
	.long	9                               ## 0x9
	.long	246                             ## 0xf6
	.long	210                             ## 0xd2
	.long	167                             ## 0xa7
	.long	154                             ## 0x9a
	.long	201                             ## 0xc9
	.long	39                              ## 0x27
	.long	119                             ## 0x77
	.long	6                               ## 0x6
	.long	191                             ## 0xbf
	.long	236                             ## 0xec
	.long	244                             ## 0xf4
	.long	79                              ## 0x4f
	.long	11                              ## 0xb
	.long	252                             ## 0xfc
	.long	1                               ## 0x1
	.long	99                              ## 0x63
	.long	53                              ## 0x35
	.long	84                              ## 0x54
	.long	167                             ## 0xa7
	.long	22                              ## 0x16
	.long	102                             ## 0x66
	.long	8                               ## 0x8
	.long	180                             ## 0xb4
	.long	25                              ## 0x19
	.long	110                             ## 0x6e
	.long	25                              ## 0x19
	.long	101                             ## 0x65
	.long	5                               ## 0x5
	.long	200                             ## 0xc8
	.long	25                              ## 0x19
	.long	224                             ## 0xe0
	.space	3968

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"frequency=%u bandwidth_hz=%u inversion=%u\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid bandwidth_hz %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DVBT_RSAMP_RATIO,4,2           ## @DVBT_RSAMP_RATIO
	.comm	_DVBT_CFREQ_OFF_RATIO,4,2       ## @DVBT_CFREQ_OFF_RATIO
	.comm	_DVBT_SOFT_RST,4,2              ## @DVBT_SOFT_RST
L_.str.2:                               ## @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2832_set_frontend
_rtl2832_set_frontend:                  ; @rtl2832_set_frontend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x0
	ldr	x20, [x0, #32]
	ldr	x19, [x20, #16]
	ldp	w9, w2, [x0, #20]
	ldr	w8, [x0, #16]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	blr	x8
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.3:
	add	x1, sp, #28
	mov	x0, x21
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.4:
	ldr	w1, [sp, #28]
	mov	x0, x21
	bl	_rtl2832_set_if
	mov	x22, x0
	cbnz	w0, LBB0_20
LBB0_5:
	ldr	w2, [x21, #16]
	sub	w8, w2, #1464, lsl #12          ; =5996544
	cmp	w8, #3456
	b.eq	LBB0_9
; %bb.6:
	mov	w8, #4608
	movk	w8, #122, lsl #16
	cmp	w2, w8
	b.eq	LBB0_10
; %bb.7:
	mov	w8, #53184
	movk	w8, #106, lsl #16
	cmp	w2, w8
	b.ne	LBB0_19
; %bb.8:
	mov	w21, #32256
	movk	w21, #854, lsl #16
	mov	w8, #1
	b	LBB0_11
LBB0_9:
	mov	x8, #0
	mov	w21, #27648
	movk	w21, #732, lsl #16
	b	LBB0_11
LBB0_10:
	mov	w21, #36864
	movk	w21, #976, lsl #16
	mov	w8, #2
LBB0_11:
	mov	x24, #0
Lloh2:
	adrp	x9, _rtl2832_set_frontend.bw_params@PAGE
Lloh3:
	add	x9, x9, _rtl2832_set_frontend.bw_params@PAGEOFF
	add	x23, x9, x8, lsl #12
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #8]
	add	w1, w24, #284
	mov	x2, x23
	mov	w3, #1
	bl	_regmap_bulk_write
	cbnz	w0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #1
	add	x23, x23, #128
	cmp	x24, #1, lsl #12                ; =4096
	b.ne	LBB0_12
; %bb.14:
	ldr	x8, [x20]
	ldr	w8, [x8]
	mov	w9, #29360128
	mul	w0, w8, w9
	mov	x1, x21
	bl	_div_u64
	and	w2, w0, #0x3ffffff
Lloh4:
	adrp	x8, _DVBT_RSAMP_RATIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DVBT_RSAMP_RATIO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.15:
	lsl	w0, w21, #20
	ldr	x8, [x20]
	ldr	w8, [x8]
	lsl	w9, w8, #3
	sub	w1, w9, w8
	bl	_div_u64
	neg	w8, w0
	and	w2, w8, #0xfffff
Lloh7:
	adrp	x8, _DVBT_CFREQ_OFF_RATIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DVBT_CFREQ_OFF_RATIO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.16:
Lloh10:
	adrp	x21, _DVBT_SOFT_RST@GOTPAGE
Lloh11:
	ldr	x21, [x21, _DVBT_SOFT_RST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #1
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.17:
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #0
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbnz	w0, LBB0_20
	b	LBB0_21
LBB0_18:
	mov	x22, x0
	b	LBB0_20
LBB0_19:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_20:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @rtl2832_set_frontend.bw_params
_rtl2832_set_frontend.bw_params:
	.long	245                             ; 0xf5
	.long	255                             ; 0xff
	.long	21                              ; 0x15
	.long	56                              ; 0x38
	.long	93                              ; 0x5d
	.long	109                             ; 0x6d
	.long	82                              ; 0x52
	.long	7                               ; 0x7
	.long	250                             ; 0xfa
	.long	47                              ; 0x2f
	.long	83                              ; 0x53
	.long	245                             ; 0xf5
	.long	63                              ; 0x3f
	.long	202                             ; 0xca
	.long	11                              ; 0xb
	.long	145                             ; 0x91
	.long	234                             ; 0xea
	.long	48                              ; 0x30
	.long	99                              ; 0x63
	.long	178                             ; 0xb2
	.long	19                              ; 0x13
	.long	218                             ; 0xda
	.long	11                              ; 0xb
	.long	196                             ; 0xc4
	.long	24                              ; 0x18
	.long	126                             ; 0x7e
	.long	22                              ; 0x16
	.long	102                             ; 0x66
	.long	8                               ; 0x8
	.long	103                             ; 0x67
	.long	25                              ; 0x19
	.long	224                             ; 0xe0
	.space	3968
	.long	231                             ; 0xe7
	.long	204                             ; 0xcc
	.long	181                             ; 0xb5
	.long	186                             ; 0xba
	.long	232                             ; 0xe8
	.long	47                              ; 0x2f
	.long	103                             ; 0x67
	.long	97                              ; 0x61
	.long	0                               ; 0x0
	.long	175                             ; 0xaf
	.long	134                             ; 0x86
	.long	242                             ; 0xf2
	.long	191                             ; 0xbf
	.long	89                              ; 0x59
	.long	4                               ; 0x4
	.long	17                              ; 0x11
	.long	182                             ; 0xb6
	.long	51                              ; 0x33
	.long	164                             ; 0xa4
	.long	48                              ; 0x30
	.long	21                              ; 0x15
	.long	16                              ; 0x10
	.long	10                              ; 0xa
	.long	66                              ; 0x42
	.long	24                              ; 0x18
	.long	248                             ; 0xf8
	.long	23                              ; 0x17
	.long	217                             ; 0xd9
	.long	7                               ; 0x7
	.long	34                              ; 0x22
	.long	25                              ; 0x19
	.long	16                              ; 0x10
	.space	3968
	.long	9                               ; 0x9
	.long	246                             ; 0xf6
	.long	210                             ; 0xd2
	.long	167                             ; 0xa7
	.long	154                             ; 0x9a
	.long	201                             ; 0xc9
	.long	39                              ; 0x27
	.long	119                             ; 0x77
	.long	6                               ; 0x6
	.long	191                             ; 0xbf
	.long	236                             ; 0xec
	.long	244                             ; 0xf4
	.long	79                              ; 0x4f
	.long	11                              ; 0xb
	.long	252                             ; 0xfc
	.long	1                               ; 0x1
	.long	99                              ; 0x63
	.long	53                              ; 0x35
	.long	84                              ; 0x54
	.long	167                             ; 0xa7
	.long	22                              ; 0x16
	.long	102                             ; 0x66
	.long	8                               ; 0x8
	.long	180                             ; 0xb4
	.long	25                              ; 0x19
	.long	110                             ; 0x6e
	.long	25                              ; 0x19
	.long	101                             ; 0x65
	.long	5                               ; 0x5
	.long	200                             ; 0xc8
	.long	25                              ; 0x19
	.long	224                             ; 0xe0
	.space	3968

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"frequency=%u bandwidth_hz=%u inversion=%u\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid bandwidth_hz %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DVBT_RSAMP_RATIO,4,2           ; @DVBT_RSAMP_RATIO
	.comm	_DVBT_CFREQ_OFF_RATIO,4,2       ; @DVBT_CFREQ_OFF_RATIO
	.comm	_DVBT_SOFT_RST,4,2              ; @DVBT_SOFT_RST
l_.str.2:                               ; @.str.2
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832_set_frontend
.subsections_via_symbols
