	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl28xxu_frontend_ctrl
_rtl28xxu_frontend_ctrl:                ## @rtl28xxu_frontend_ctrl
	.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, %r12d
	movq	%rdi, %rbx
	callq	_fe_to_d
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_fe_to_priv
	movq	%rax, %r13
	movq	(%r15), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r13), %rax
	movq	_CHIP_ID_RTL2831U@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.1:
	movl	(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_4
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	testl	%r12d, %r12d
	movl	$72, %eax
	cmovnel	%eax, %r12d
	movq	_SYS_DEMOD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	$72, %ecx
	callq	_rtl28xxu_wr_reg_mask
	jmp	LBB0_5
LBB0_4:
	movl	8(%r13), %edi
	movl	%r12d, %esi
	callq	*16(%r13)
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %r14d
LBB0_7:
	movl	%r14d, %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	"fe=%d onoff=%d\n"

	.comm	_CHIP_ID_RTL2831U,8,3           ## @CHIP_ID_RTL2831U
	.comm	_SYS_DEMOD_CTL,4,2              ## @SYS_DEMOD_CTL
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl28xxu_frontend_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl28xxu_frontend_ctrl
_rtl28xxu_frontend_ctrl:                ; @rtl28xxu_frontend_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x21, x0
	bl	_fe_to_d
	mov	x19, x0
	mov	x0, x21
	bl	_fe_to_priv
	mov	x22, x0
	ldr	x0, [x19]
	ldr	w2, [x21]
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _CHIP_ID_RTL2831U@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CHIP_ID_RTL2831U@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.2:
	cbnz	w8, LBB0_4
; %bb.3:
	mov	w8, #72
	cmp	w20, #0
	csel	w2, wzr, w8, eq
Lloh5:
	adrp	x8, _SYS_DEMOD_CTL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_DEMOD_CTL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #72
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_6
	b	LBB0_7
LBB0_4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
	ldr	x8, [x22, #16]
	ldr	w0, [x22, #8]
	mov	x1, x20
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_6:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	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	"fe=%d onoff=%d\n"

	.comm	_CHIP_ID_RTL2831U,8,3           ; @CHIP_ID_RTL2831U
	.comm	_SYS_DEMOD_CTL,4,2              ; @SYS_DEMOD_CTL
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl28xxu_frontend_ctrl
.subsections_via_symbols
