	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8192eu_active_to_lps
_rtl8192eu_active_to_lps:               ## @rtl8192eu_active_to_lps
	.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, %r13
	movq	(%rdi), %r15
	movq	_REG_TXPAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$255, %edx
	callq	_rtl8xxxu_write8
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	$101, %ebx
	movq	_REG_SCH_TX_CMD@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read32
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	decl	%ebx
	jne	LBB0_1
	jmp	LBB0_3
LBB0_4:
	xorl	%r14d, %r14d
	cmpl	$1, %ebx
	jne	LBB0_3
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	xorl	%r14d, %r14d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_3:
	movq	_REG_SYS_FUNC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read8
	movq	_SYS_FUNC_BBRSTB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_write8
	movl	$2, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read8
	movq	_SYS_FUNC_BB_GLB_RSTN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_write8
	movq	_REG_CR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read16
	andl	$65280, %eax                    ## imm = 0xFF00
	movq	_CR_HCI_TXDMA_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_CR_HCI_RXDMA_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write16
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read16
	movq	_CR_SECURITY_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_write16
	movq	_REG_DUAL_TSF_RST@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_rtl8xxxu_read8
	movq	_DUAL_TSF_TX_OK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write8
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TXPAUSE,4,2                ## @REG_TXPAUSE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_REG_SCH_TX_CMD,4,2             ## @REG_SCH_TX_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to flush TX queue\n"

	.comm	_REG_SYS_FUNC,4,2               ## @REG_SYS_FUNC
	.comm	_SYS_FUNC_BBRSTB,4,2            ## @SYS_FUNC_BBRSTB
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ## @SYS_FUNC_BB_GLB_RSTN
	.comm	_REG_CR,4,2                     ## @REG_CR
	.comm	_CR_HCI_TXDMA_ENABLE,4,2        ## @CR_HCI_TXDMA_ENABLE
	.comm	_CR_HCI_RXDMA_ENABLE,4,2        ## @CR_HCI_RXDMA_ENABLE
	.comm	_CR_SECURITY_ENABLE,4,2         ## @CR_SECURITY_ENABLE
	.comm	_REG_DUAL_TSF_RST,4,2           ## @REG_DUAL_TSF_RST
	.comm	_DUAL_TSF_TX_OK,4,2             ## @DUAL_TSF_TX_OK
	.no_dead_strip	_rtl8192eu_active_to_lps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8192eu_active_to_lps
_rtl8192eu_active_to_lps:               ; @rtl8192eu_active_to_lps
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _REG_TXPAUSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TXPAUSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #255
	bl	_rtl8xxxu_write8
Lloh3:
	adrp	x22, _EBUSY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EBUSY@GOTPAGEOFF]
	ldr	w8, [x22]
	neg	w20, w8
	mov	w23, #101
Lloh5:
	adrp	x24, _REG_SCH_TX_CMD@GOTPAGE
Lloh6:
	ldr	x24, [x24, _REG_SCH_TX_CMD@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rtl8xxxu_read32
	cbz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w23, w23, #1
	b.ne	LBB0_1
	b	LBB0_6
LBB0_3:
	cmp	w23, #1
	b.ne	LBB0_5
; %bb.4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	ldr	w8, [x22]
	neg	w20, w8
	b	LBB0_7
LBB0_5:
	mov	w20, #0
LBB0_6:
Lloh9:
	adrp	x21, _REG_SYS_FUNC@GOTPAGE
Lloh10:
	ldr	x21, [x21, _REG_SYS_FUNC@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read8
Lloh11:
	adrp	x8, _SYS_FUNC_BBRSTB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SYS_FUNC_BBRSTB@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write8
	mov	w0, #2
	bl	_udelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read8
Lloh14:
	adrp	x8, _SYS_FUNC_BB_GLB_RSTN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SYS_FUNC_BB_GLB_RSTN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write8
Lloh17:
	adrp	x21, _REG_CR@GOTPAGE
Lloh18:
	ldr	x21, [x21, _REG_CR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read16
	and	w8, w0, #0xff00
Lloh19:
	adrp	x9, _CR_HCI_TXDMA_ENABLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CR_HCI_TXDMA_ENABLE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _CR_HCI_RXDMA_ENABLE@GOTPAGE
Lloh23:
	ldr	x10, [x10, _CR_HCI_RXDMA_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write16
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read16
Lloh25:
	adrp	x8, _CR_SECURITY_ENABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CR_SECURITY_ENABLE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write16
Lloh28:
	adrp	x21, _REG_DUAL_TSF_RST@GOTPAGE
Lloh29:
	ldr	x21, [x21, _REG_DUAL_TSF_RST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read8
Lloh30:
	adrp	x8, _DUAL_TSF_TX_OK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DUAL_TSF_TX_OK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write8
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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TXPAUSE,4,2                ; @REG_TXPAUSE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_REG_SCH_TX_CMD,4,2             ; @REG_SCH_TX_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to flush TX queue\n"

	.comm	_REG_SYS_FUNC,4,2               ; @REG_SYS_FUNC
	.comm	_SYS_FUNC_BBRSTB,4,2            ; @SYS_FUNC_BBRSTB
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ; @SYS_FUNC_BB_GLB_RSTN
	.comm	_REG_CR,4,2                     ; @REG_CR
	.comm	_CR_HCI_TXDMA_ENABLE,4,2        ; @CR_HCI_TXDMA_ENABLE
	.comm	_CR_HCI_RXDMA_ENABLE,4,2        ; @CR_HCI_RXDMA_ENABLE
	.comm	_CR_SECURITY_ENABLE,4,2         ; @CR_SECURITY_ENABLE
	.comm	_REG_DUAL_TSF_RST,4,2           ; @REG_DUAL_TSF_RST
	.comm	_DUAL_TSF_TX_OK,4,2             ; @DUAL_TSF_TX_OK
	.no_dead_strip	_rtl8192eu_active_to_lps
.subsections_via_symbols
