	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_swlps_rf_sleep             ## -- Begin function rtl_swlps_rf_sleep
	.p2align	4, 0x90
_rtl_swlps_rf_sleep:                    ## @rtl_swlps_rf_sleep
	.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, %rbx
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	cmpl	$0, 24(%r15)
	je	LBB0_13
## %bb.1:
	cmpq	$0, 56(%r15)
	jne	LBB0_13
## %bb.2:
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.3:
	movq	8(%r14), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.4:
	cmpl	$5, 16(%r14)
	jl	LBB0_13
## %bb.5:
	cmpq	$0, 48(%r15)
	jne	LBB0_13
## %bb.6:
	leaq	44(%r15), %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movq	16(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_spin_unlock
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %r13
	addq	$40, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_ERFSLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_CHANGE_BY_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtl_ps_set_rf_state
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_RT_RF_OFF_LEVL_ASPM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.8:
	movq	_RT_PS_LEVEL_ASPM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_RT_IN_PS_LEVEL
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	32(%r15), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_RT_SET_PS_LEVEL
LBB0_10:
	movl	8(%r15), %r8d
	movl	%r8d, %eax
	testl	%r8d, %r8d
	jne	LBB0_12
## %bb.11:
	movl	(%rbx), %ecx
	cmpl	$1, %ecx
	movl	$2, %eax
	cmovnel	%ecx, %eax
LBB0_12:
	movq	_MAX_SW_LPS_SLEEP_INTV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	_COMP_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movl	%ebx, %r9d
	callq	_RT_TRACE
	movl	4(%r15), %r12d
	movq	24(%r14), %rax
	imull	(%rax), %ebx
	addl	$-40, %ebx
	movl	%ebx, %edi
	callq	_MSECS
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_delayed_work             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_ERFSLEEP,4,2                   ## @ERFSLEEP
	.comm	_RF_CHANGE_BY_PS,4,2            ## @RF_CHANGE_BY_PS
	.comm	_RT_RF_OFF_LEVL_ASPM,4,2        ## @RT_RF_OFF_LEVL_ASPM
	.comm	_RT_PS_LEVEL_ASPM,4,2           ## @RT_PS_LEVEL_ASPM
	.comm	_MAX_SW_LPS_SLEEP_INTV,4,2      ## @MAX_SW_LPS_SLEEP_INTV
	.comm	_COMP_POWER,4,2                 ## @COMP_POWER
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dtim_counter:%x will sleep :%d beacon_intv\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_swlps_rf_sleep             ; -- Begin function rtl_swlps_rf_sleep
	.p2align	2
_rtl_swlps_rf_sleep:                    ; @rtl_swlps_rf_sleep
	.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	x21, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x20, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_psc
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_7
; %bb.2:
	ldr	x8, [x20]
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_7
; %bb.3:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _MAC80211_LINKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAC80211_LINKED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x20, #16]
	cmp	w8, #5
	b.lt	LBB0_7
; %bb.5:
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_7
; %bb.6:
	mov	x22, x0
	add	x23, x19, #44
	mov	x0, x23
	bl	_spin_lock
	ldr	x24, [x19, #16]
	mov	x0, x23
	bl	_spin_unlock
	cbz	x24, LBB0_8
LBB0_7:
	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
LBB0_8:
	add	x23, x19, #40
	mov	x0, x23
	bl	_mutex_lock
Lloh6:
	adrp	x8, _ERFSLEEP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERFSLEEP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _RF_CHANGE_BY_PS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RF_CHANGE_BY_PS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_rtl_ps_set_rf_state
	mov	x0, x23
	bl	_mutex_unlock
	ldr	w8, [x22]
Lloh12:
	adrp	x9, _RT_RF_OFF_LEVL_ASPM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RT_RF_OFF_LEVL_ASPM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
Lloh15:
	adrp	x23, _RT_PS_LEVEL_ASPM@GOTPAGE
Lloh16:
	ldr	x23, [x23, _RT_PS_LEVEL_ASPM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_RT_IN_PS_LEVEL
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	ldr	w1, [x23]
	mov	x0, x22
	bl	_RT_SET_PS_LEVEL
LBB0_11:
	ldr	w4, [x19, #8]
	mov	x8, x4
	cbnz	w4, LBB0_13
; %bb.12:
	ldr	w8, [x21]
	mov	w9, #2
	cmp	w8, #1
	csel	w8, w9, w8, eq
LBB0_13:
Lloh17:
	adrp	x9, _MAX_SW_LPS_SLEEP_INTV@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MAX_SW_LPS_SLEEP_INTV@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w21, w8, w9, lt
Lloh20:
	adrp	x8, _COMP_POWER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COMP_POWER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x3, l_.str@PAGE
Lloh27:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x5, x21
	bl	_RT_TRACE
	ldr	w22, [x19, #4]
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	mul	w8, w8, w21
	sub	w0, w8, #40
	bl	_MSECS
	mov	x2, x0
	mov	x0, x22
	mov	x1, x19
	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
	b	_queue_delayed_work
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_ERFSLEEP,4,2                   ; @ERFSLEEP
	.comm	_RF_CHANGE_BY_PS,4,2            ; @RF_CHANGE_BY_PS
	.comm	_RT_RF_OFF_LEVL_ASPM,4,2        ; @RT_RF_OFF_LEVL_ASPM
	.comm	_RT_PS_LEVEL_ASPM,4,2           ; @RT_PS_LEVEL_ASPM
	.comm	_MAX_SW_LPS_SLEEP_INTV,4,2      ; @MAX_SW_LPS_SLEEP_INTV
	.comm	_COMP_POWER,4,2                 ; @COMP_POWER
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dtim_counter:%x will sleep :%d beacon_intv\n"

.subsections_via_symbols
