	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92se_gpio_radio_on_off_checking ## -- Begin function rtl92se_gpio_radio_on_off_checking
	.p2align	4, 0x90
_rtl92se_gpio_radio_on_off_checking:    ## @rtl92se_gpio_radio_on_off_checking
	.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, %r14
	movq	%rdi, %r13
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_rtl_pcipriv
	movl	%eax, %edi
	callq	_rtl_pcidev
	xorl	%ebx, %ebx
	cmpl	$1, (%rax)
	je	LBB0_17
## %bb.1:
	cmpq	$0, 8(%rax)
	jne	LBB0_17
## %bb.2:
	cmpq	$0, 16(%r12)
	jne	LBB0_17
## %bb.3:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_17
LBB0_5:
	movl	$1, (%r12)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movq	_RT_RF_OFF_LEVL_HALT_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_RT_IN_PS_LEVEL
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	callq	__rtl92se_power_domain_init
LBB0_7:
	testq	%rbx, %rbx
	setne	%bl
	movq	%r13, %rdi
	callq	__rtl92se_rf_onoff_detect
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.8:
	movq	_ERFON@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_10:
	testl	%ecx, %ecx
	jne	LBB0_14
## %bb.11:
	movq	_ERFOFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.12:
	movl	$1, %ebx
	leaq	L_.str.1(%rip), %rcx
LBB0_13:
	movq	_COMP_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_RT_TRACE
	movl	%ebx, 4(%r12)
LBB0_16:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movl	$0, (%r12)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	cmpl	$0, 4(%r12)
	sete	%bl
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_RT_RF_OFF_LEVL_HALT_NIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	testl	%eax, 8(%r12)
	setne	%al
	andb	%bl, %al
	cmpb	$1, %al
	jne	LBB0_16
## %bb.15:
	movq	%r13, %rdi
	movq	%rcx, %rbx
	callq	__rtl92s_phy_set_rfhalt
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_RT_SET_PS_LEVEL
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_RF_OFF_LEVL_HALT_NIC,4,2    ## @RT_RF_OFF_LEVL_HALT_NIC
	.comm	_ERFON,4,2                      ## @ERFON
	.comm	_COMP_RF,4,2                    ## @COMP_RF
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RFKILL-HW Radio ON, RF ON\n"

	.comm	_ERFOFF,4,2                     ## @ERFOFF
L_.str.1:                               ## @.str.1
	.asciz	"RFKILL-HW Radio OFF, RF OFF\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92se_gpio_radio_on_off_checking ; -- Begin function rtl92se_gpio_radio_on_off_checking
	.p2align	2
_rtl92se_gpio_radio_on_off_checking:    ; @rtl92se_gpio_radio_on_off_checking
	.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, x1
	mov	x22, x0
	bl	_rtl_priv
	mov	x20, x0
	mov	x0, x22
	bl	_rtl_priv
	bl	_rtl_psc
	mov	x21, x0
	mov	x0, x22
	bl	_rtl_pcipriv
	bl	_rtl_pcidev
	ldr	w8, [x0]
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	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_5:
	mov	x0, x20
	mov	x1, #0
	bl	_spin_lock_irqsave
	ldr	w8, [x21]
	cbz	w8, LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_4
LBB0_7:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x20
	mov	x1, #0
	bl	_spin_unlock_irqrestore
Lloh0:
	adrp	x24, _RT_RF_OFF_LEVL_HALT_NIC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RT_RF_OFF_LEVL_HALT_NIC@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_RT_IN_PS_LEVEL
	mov	x23, x0
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	__rtl92se_power_domain_init
LBB0_9:
	cmp	x23, #0
	cset	w23, ne
	mov	x0, x22
	bl	__rtl92se_rf_onoff_detect
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_12
; %bb.10:
Lloh2:
	adrp	x9, _ERFON@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ERFON@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w0, w9
	b.ne	LBB0_12
; %bb.11:
	mov	w22, #0
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_15
LBB0_12:
	cbnz	w8, LBB0_17
; %bb.13:
Lloh7:
	adrp	x8, _ERFOFF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERFOFF@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.14:
	mov	w22, #1
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_15:
Lloh12:
	adrp	x8, _COMP_RF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _COMP_RF@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_RT_TRACE
	str	w22, [x21, #4]
LBB0_16:
	mov	x0, x20
	mov	x1, #0
	bl	_spin_lock_irqsave
	str	wzr, [x21]
	mov	x0, x20
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21, #4]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_4
LBB0_17:
	ldr	w8, [x21, #8]
	ldr	w9, [x24]
	tst	w9, w8
	cset	w8, ne
	and	w8, w8, w23
	cmp	w8, #1
	b.ne	LBB0_16
; %bb.18:
	mov	x0, x22
	bl	__rtl92s_phy_set_rfhalt
	ldr	w1, [x24]
	mov	x0, x21
	bl	_RT_SET_PS_LEVEL
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_RF_OFF_LEVL_HALT_NIC,4,2    ; @RT_RF_OFF_LEVL_HALT_NIC
	.comm	_ERFON,4,2                      ; @ERFON
	.comm	_COMP_RF,4,2                    ; @COMP_RF
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RFKILL-HW Radio ON, RF ON\n"

	.comm	_ERFOFF,4,2                     ; @ERFOFF
l_.str.1:                               ; @.str.1
	.asciz	"RFKILL-HW Radio OFF, RF OFF\n"

.subsections_via_symbols
