	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2832u_power_ctrl
_rtl2832u_power_ctrl:                   ## @rtl2832u_power_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	_SYS_GPIO_OUT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	movl	$8, %edx
	movl	$24, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	_SYS_DEMOD_CTL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$16, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	_SYS_DEMOD_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$128, %edx
	movl	$128, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$32, %edx
	movl	$32, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_USB_EPA_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	l_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	_rtl28xxu_wr_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movl	8(%r14), %ebx
	movl	%ebx, %edi
	movl	$129, %esi
	callq	_usb_rcvbulkpipe
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_usb_clear_halt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_8:
	movl	$16, %edx
	movl	$16, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	_SYS_DEMOD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$128, %ecx
	callq	_rtl28xxu_wr_reg_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_USB_EPA_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	_rtl28xxu_wr_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_12
LBB0_11:
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	movl	%ebx, %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"onoff=%d\n"

	.comm	_SYS_GPIO_OUT_VAL,4,2           ## @SYS_GPIO_OUT_VAL
	.comm	_SYS_DEMOD_CTL1,4,2             ## @SYS_DEMOD_CTL1
	.comm	_SYS_DEMOD_CTL,4,2              ## @SYS_DEMOD_CTL
	.comm	_USB_EPA_CTL,4,2                ## @USB_EPA_CTL
	.section	__TEXT,__const
l_.str.1:                               ## @.str.1
	.space	3

	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"\020\002"

L_.str.3:                               ## @.str.3
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832u_power_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2832u_power_ctrl
_rtl2832u_power_ctrl:                   ; @rtl2832u_power_ctrl
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh2:
	adrp	x8, _SYS_GPIO_OUT_VAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SYS_GPIO_OUT_VAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	cbz	w20, LBB0_7
; %bb.1:
	mov	w2, #8
	mov	w3, #24
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.2:
Lloh5:
	adrp	x8, _SYS_DEMOD_CTL1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_DEMOD_CTL1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #16
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.3:
Lloh8:
	adrp	x21, _SYS_DEMOD_CTL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SYS_DEMOD_CTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #128
	mov	w3, #128
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.4:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #32
	mov	w3, #32
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.5:
Lloh10:
	adrp	x8, _USB_EPA_CTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _USB_EPA_CTL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w3, #2
	bl	_rtl28xxu_wr_regs
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.6:
	ldr	w20, [x19, #8]
	mov	x0, x20
	mov	w1, #129
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x20
	bl	_usb_clear_halt
	b	LBB0_10
LBB0_7:
	mov	w2, #16
	mov	w3, #16
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.8:
Lloh15:
	adrp	x8, _SYS_DEMOD_CTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SYS_DEMOD_CTL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #128
	bl	_rtl28xxu_wr_reg_mask
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.9:
Lloh18:
	adrp	x8, _USB_EPA_CTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _USB_EPA_CTL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w3, #2
	bl	_rtl28xxu_wr_regs
LBB0_10:
	mov	x20, x0
	cbz	w0, LBB0_12
LBB0_11:
	ldr	x0, [x19]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
LBB0_12:
	mov	x0, x20
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"onoff=%d\n"

	.comm	_SYS_GPIO_OUT_VAL,4,2           ; @SYS_GPIO_OUT_VAL
	.comm	_SYS_DEMOD_CTL1,4,2             ; @SYS_DEMOD_CTL1
	.comm	_SYS_DEMOD_CTL,4,2              ; @SYS_DEMOD_CTL
	.comm	_USB_EPA_CTL,4,2                ; @USB_EPA_CTL
	.section	__TEXT,__const
l_.str.1:                               ; @.str.1
	.space	3

	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"\020\002"

l_.str.3:                               ; @.str.3
	.asciz	"failed=%d\n"

	.no_dead_strip	_rtl2832u_power_ctrl
.subsections_via_symbols
