	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2832_set_if
_rtl2832_set_if:                        ## @rtl2832_set_if
	.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	%esi, %r14d
	movq	(%rdi), %r12
	movq	(%r12), %rax
	movq	8(%r12), %r15
	xorl	%r13d, %r13d
	testl	%esi, %esi
	sete	%r13b
	movl	(%rax), %esi
	movl	%r14d, %eax
	cltd
	idivl	%esi
	movl	%edx, %edi
	shll	$22, %edi
	callq	_div_u64
	movl	%eax, %ebx
	negl	%ebx
	andl	$4194303, %ebx                  ## imm = 0x3FFFFF
	leaq	L_.str(%rip), %rsi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%r15d, %r15d
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_DVBT_EN_BBIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_DVBT_PSET_IFFREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_rtl2832_wr_demod_reg
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r14d, %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"if_frequency=%d pset_iffreq=%08x\n"

	.comm	_DVBT_EN_BBIN,4,2               ## @DVBT_EN_BBIN
	.comm	_DVBT_PSET_IFFREQ,4,2           ## @DVBT_PSET_IFFREQ
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832_set_if
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2832_set_if
_rtl2832_set_if:                        ; @rtl2832_set_if
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	ldr	x20, [x0]
	cmp	w1, #0
	cset	w23, eq
	ldp	x8, x19, [x20]
	ldr	w1, [x8]
	sdiv	w8, w22, w1
	msub	w8, w8, w1, w22
	lsl	w0, w8, #22
	bl	_div_u64
	neg	w8, w0
	and	w21, w8, #0x3fffff
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
Lloh2:
	adrp	x8, _DVBT_EN_BBIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DVBT_EN_BBIN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _DVBT_PSET_IFFREQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DVBT_PSET_IFFREQ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_rtl2832_wr_demod_reg
	mov	x22, x0
	cbz	w0, LBB0_3
LBB0_2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_dbg
LBB0_3:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"if_frequency=%d pset_iffreq=%08x\n"

	.comm	_DVBT_EN_BBIN,4,2               ; @DVBT_EN_BBIN
	.comm	_DVBT_PSET_IFFREQ,4,2           ; @DVBT_PSET_IFFREQ
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832_set_if
.subsections_via_symbols
