	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_lps_set_psmode             ## -- Begin function rtl_lps_set_psmode
	.p2align	4, 0x90
_rtl_lps_set_psmode:                    ## @rtl_lps_set_psmode
	.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	%rsi, %r15
	movq	%rdi, %r13
	callq	_rtl_priv
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.1:
	movq	8(%rbx), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.2:
	movq	_EACTIVE@GOTPCREL(%rip), %rbx
	cmpq	%r15, (%r12)
	jne	LBB0_4
## %bb.3:
	cmpq	%r15, (%rbx)
	je	LBB0_16
LBB0_4:
	movq	%r15, (%r12)
	cmpq	$0, 40(%r12)
	je	LBB0_16
## %bb.5:
	cmpq	$0, 32(%r12)
	je	LBB0_16
## %bb.6:
	cmpq	%r15, (%rbx)
	jne	LBB0_11
## %bb.7:
	movq	_COMP_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FW_PS_ACTIVE_MODE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_RT_TRACE
	movl	$0, -44(%rbp)
	movl	(%rbx), %eax
	movl	%eax, 16(%r12)
	movl	$0, 8(%r12)
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_HW_VAR_FW_LPS_ACTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	*(%rax)
	cmpq	$0, 24(%r12)
	je	LBB0_9
## %bb.8:
	movq	_P2P_PS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rtl_p2p_ps_cmd
LBB0_9:
	movq	(%r14), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	callq	*8(%rcx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	8(%r14), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	jmp	LBB0_16
LBB0_11:
	movq	%r13, %rdi
	callq	_rtl_get_fwlps_doze
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	_COMP_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%r12), %r8d
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_RT_TRACE
	movq	(%r14), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	callq	*8(%rcx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	8(%r14), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
LBB0_14:
	movl	$1, -44(%rbp)
	movl	12(%r12), %eax
	movl	%eax, 16(%r12)
	movl	$2, 8(%r12)
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_HW_VAR_FW_LPS_ACTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	*(%rax)
	jmp	LBB0_16
LBB0_15:
	movq	(%rbx), %rax
	movq	%rax, (%r12)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_EACTIVE,8,3                    ## @EACTIVE
	.comm	_COMP_RF,4,2                    ## @COMP_RF
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FW LPS leave ps_mode:%x\n"

	.comm	_FW_PS_ACTIVE_MODE,4,2          ## @FW_PS_ACTIVE_MODE
	.comm	_HW_VAR_FW_LPS_ACTION,4,2       ## @HW_VAR_FW_LPS_ACTION
	.comm	_P2P_PS_ENABLE,4,2              ## @P2P_PS_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"FW LPS enter ps_mode:%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_lps_set_psmode             ; -- Begin function rtl_lps_set_psmode
	.p2align	2
_rtl_lps_set_psmode:                    ; @rtl_lps_set_psmode
	.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	x20, x1
	mov	x21, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x23, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_psc
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.1:
	ldr	x8, [x23, #8]
Lloh3:
	adrp	x9, _MAC80211_LINKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAC80211_LINKED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.2:
	mov	x22, x0
	ldr	x8, [x0]
Lloh6:
	adrp	x23, _EACTIVE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _EACTIVE@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x20
	ccmp	x9, x20, #0, eq
	b.eq	LBB0_15
; %bb.3:
	str	x20, [x22]
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_15
; %bb.4:
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_15
; %bb.5:
	ldr	x8, [x23]
	cmp	x8, x20
	b.ne	LBB0_10
; %bb.6:
Lloh8:
	adrp	x8, _COMP_RF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COMP_RF@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x23, _FW_PS_ACTIVE_MODE@GOTPAGE
Lloh15:
	ldr	x23, [x23, _FW_PS_ACTIVE_MODE@GOTPAGEOFF]
	ldr	w4, [x23]
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	str	wzr, [sp, #12]
	ldr	w8, [x23]
	str	w8, [x22, #16]
	str	wzr, [x22, #8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _HW_VAR_FW_LPS_ACTION@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HW_VAR_FW_LPS_ACTION@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x21
	blr	x8
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _P2P_PS_ENABLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _P2P_PS_ENABLE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_rtl_p2p_ps_cmd
LBB0_8:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	blr	x8
	cbz	x0, LBB0_15
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	b	LBB0_15
LBB0_10:
	mov	x0, x21
	bl	_rtl_get_fwlps_doze
	cbz	x0, LBB0_14
; %bb.11:
Lloh24:
	adrp	x8, _COMP_RF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _COMP_RF@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	ldr	w4, [x22, #12]
Lloh30:
	adrp	x3, l_.str.1@PAGE
Lloh31:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	blr	x8
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_13:
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	w8, [x22, #12]
	str	w8, [x22, #16]
	mov	w8, #2
	str	w8, [x22, #8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh32:
	adrp	x9, _HW_VAR_FW_LPS_ACTION@GOTPAGE
Lloh33:
	ldr	x9, [x9, _HW_VAR_FW_LPS_ACTION@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x21
	blr	x8
	b	LBB0_15
LBB0_14:
	ldr	x8, [x23]
	str	x8, [x22]
LBB0_15:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_EACTIVE,8,3                    ; @EACTIVE
	.comm	_COMP_RF,4,2                    ; @COMP_RF
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FW LPS leave ps_mode:%x\n"

	.comm	_FW_PS_ACTIVE_MODE,4,2          ; @FW_PS_ACTIVE_MODE
	.comm	_HW_VAR_FW_LPS_ACTION,4,2       ; @HW_VAR_FW_LPS_ACTION
	.comm	_P2P_PS_ENABLE,4,2              ; @P2P_PS_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"FW LPS enter ps_mode:%x\n"

.subsections_via_symbols
