	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl_ps_set_rf_state
_rtl_ps_set_rf_state:                   ## @rtl_ps_set_rf_state
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_spin_lock
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.1:
	xorl	%r13d, %r13d
	movq	_COMP_ERR@GOTPCREL(%rip), %r12
	movq	_DBG_WARNING@GOTPCREL(%rip), %r14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rcx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_RT_TRACE
	cmpl	$101, %r13d
	movl	$100, %r12d
	cmovgel	%r13d, %r12d
	incl	%r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rbx)
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	incl	%r13d
	movl	$1, %edi
	callq	_mdelay
	cmpl	%r13d, %r12d
	jne	LBB0_4
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_spin_lock
	cmpl	$0, (%rbx)
	movq	_COMP_ERR@GOTPCREL(%rip), %r12
	movq	_DBG_WARNING@GOTPCREL(%rip), %r14
	jne	LBB0_3
LBB0_7:
	movl	$1, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	cmpl	$128, %esi
	je	LBB0_20
## %bb.8:
	cmpl	$130, %esi
	je	LBB0_15
## %bb.9:
	cmpl	$129, %esi
	jne	LBB0_19
## %bb.10:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %eax
	notl	%eax
	andl	12(%rbx), %eax
	movl	%eax, 12(%rbx)
	movq	_RF_CHANGE_BY_HW@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	jne	LBB0_13
## %bb.11:
	cmpl	$0, 8(%rbx)
	je	LBB0_13
## %bb.12:
	movl	$0, 8(%rbx)
LBB0_13:
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.14:
	movl	$0, 12(%rbx)
	jmp	LBB0_21
LBB0_6:
	xorl	%r13d, %r13d
	jmp	LBB0_24
LBB0_20:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, 12(%rbx)
LBB0_21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_15:
	movq	_RF_CHANGE_BY_HW@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_18
## %bb.16:
	cmpl	$0, 8(%rbx)
	jne	LBB0_18
## %bb.17:
	movl	$1, 8(%rbx)
LBB0_18:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, 12(%rbx)
LBB0_22:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	callq	*(%rax)
	movl	$1, %r13d
	jmp	LBB0_23
LBB0_19:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	xorl	%r13d, %r13d
LBB0_23:
	movq	%r15, %rdi
	callq	_spin_lock
	movl	$0, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_24:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_ERR,4,2                   ## @COMP_ERR
	.comm	_DBG_WARNING,4,2                ## @DBG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RF Change in progress! Wait to set..state_toset(%d).\n"

	.comm	_RF_CHANGE_BY_HW,4,2            ## @RF_CHANGE_BY_HW
L_.str.1:                               ## @.str.1
	.asciz	"switch case %#x not processed\n"

	.no_dead_strip	_rtl_ps_set_rf_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl_ps_set_rf_state
_rtl_ps_set_rf_state:                   ; @rtl_ps_set_rf_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	x21, x1
	mov	x22, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x22
	bl	_rtl_priv
	bl	_rtl_psc
	mov	x20, x0
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.1:
	mov	w25, #0
Lloh0:
	adrp	x26, _COMP_ERR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _COMP_ERR@GOTPAGEOFF]
Lloh2:
	adrp	x27, _DBG_WARNING@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DBG_WARNING@GOTPAGEOFF]
	mov	w28, #100
Lloh4:
	adrp	x24, l_.str@PAGE
Lloh5:
	add	x24, x24, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x0, x19
	bl	_spin_unlock
	ldr	w1, [x26]
	ldr	w2, [x27]
	mov	x0, x19
	mov	x3, x24
	mov	x4, x21
	bl	_RT_TRACE
	cmp	w25, #100
	csel	w8, w25, w28, gt
	add	w23, w8, #1
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	add	w25, w25, #1
	mov	w0, #1
	bl	_mdelay
	cmp	w23, w25
	b.ne	LBB0_3
	b	LBB0_14
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
LBB0_6:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_spin_unlock
	cmp	w21, #128
	b.eq	LBB0_18
; %bb.7:
	cmp	w21, #130
	b.eq	LBB0_15
; %bb.8:
	cmp	w21, #129
	b.ne	LBB0_20
; %bb.9:
	ldr	w8, [x20, #12]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	bic	w8, w8, w10
	str	w8, [x20, #12]
Lloh6:
	adrp	x9, _RF_CHANGE_BY_HW@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RF_CHANGE_BY_HW@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.10:
	ldr	w9, [x20, #8]
	cbz	w9, LBB0_12
; %bb.11:
	str	wzr, [x20, #8]
LBB0_12:
	cbnz	w8, LBB0_21
; %bb.13:
	str	wzr, [x20, #12]
	b	LBB0_19
LBB0_14:
	mov	w21, #0
	b	LBB0_23
LBB0_15:
Lloh9:
	adrp	x8, _RF_CHANGE_BY_HW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RF_CHANGE_BY_HW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ne	LBB0_18
; %bb.16:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_18
; %bb.17:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_18:
	ldr	w8, [x20, #12]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	str	w8, [x20, #12]
LBB0_19:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	w21, #1
	b	LBB0_22
LBB0_20:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_pr_err
LBB0_21:
	mov	w21, #0
LBB0_22:
	mov	x0, x19
	bl	_spin_lock
	str	wzr, [x20]
	mov	x0, x19
	bl	_spin_unlock
LBB0_23:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_ERR,4,2                   ; @COMP_ERR
	.comm	_DBG_WARNING,4,2                ; @DBG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RF Change in progress! Wait to set..state_toset(%d).\n"

	.comm	_RF_CHANGE_BY_HW,4,2            ; @RF_CHANGE_BY_HW
l_.str.1:                               ; @.str.1
	.asciz	"switch case %#x not processed\n"

	.no_dead_strip	_rtl_ps_set_rf_state
.subsections_via_symbols
