	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl88ee_gpio_radio_on_off_checking ## -- Begin function rtl88ee_gpio_radio_on_off_checking
	.p2align	4, 0x90
_rtl88ee_gpio_radio_on_off_checking:    ## @rtl88ee_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r12)
	jne	LBB0_14
## %bb.1:
	movq	%rax, %r15
	cmpq	$0, 16(%rax)
	jne	LBB0_14
## %bb.2:
	movq	%r12, %rdi
	callq	_spin_lock
	cmpl	$0, (%r15)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_spin_unlock
	jmp	LBB0_14
LBB0_4:
	movl	$1, (%r15)
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	_REG_GPIO_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movl	%eax, %ebx
	movl	$31, %edi
	callq	_BIT
	testl	%ebx, %eax
	movq	_ERFON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ERFOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	cmovel	%eax, %ecx
	movl	4(%r15), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.5:
	cmpl	%edx, %ecx
	jne	LBB0_7
## %bb.6:
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_10
LBB0_7:
	testl	%esi, %esi
	jne	LBB0_11
## %bb.8:
	cmpl	%eax, %ecx
	jne	LBB0_11
## %bb.9:
	movl	$1, %ebx
	leaq	L_.str.1(%rip), %rcx
LBB0_10:
	movq	_COMP_RF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_RT_TRACE
	movl	%ebx, 4(%r15)
LBB0_13:
	movq	%r12, %rdi
	callq	_spin_lock
	movl	$0, (%r15)
	movq	%r12, %rdi
	callq	_spin_unlock
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	cmpl	$0, 4(%r15)
	sete	%bl
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_RT_RF_OFF_LEVL_HALT_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, 8(%r15)
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_RT_SET_PS_LEVEL
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_GPIO_OUTPUT,4,2            ## @REG_GPIO_OUTPUT
	.comm	_ERFON,4,2                      ## @ERFON
	.comm	_ERFOFF,4,2                     ## @ERFOFF
	.comm	_COMP_RF,4,2                    ## @COMP_RF
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIOChangeRF  - HW Radio ON, RF ON\n"

L_.str.1:                               ## @.str.1
	.asciz	"GPIOChangeRF  - HW Radio OFF, RF OFF\n"

	.comm	_RT_RF_OFF_LEVL_HALT_NIC,4,2    ## @RT_RF_OFF_LEVL_HALT_NIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl88ee_gpio_radio_on_off_checking ; -- Begin function rtl88ee_gpio_radio_on_off_checking
	.p2align	2
_rtl88ee_gpio_radio_on_off_checking:    ; @rtl88ee_gpio_radio_on_off_checking
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_rtl_priv
	mov	x20, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_psc
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_6:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x20
	bl	_spin_unlock
Lloh0:
	adrp	x8, _REG_GPIO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_GPIO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rtl_read_dword
	mov	x22, x0
	mov	w0, #31
	bl	_BIT
Lloh3:
	adrp	x8, _ERFON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERFON@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
Lloh6:
	adrp	x8, _ERFOFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERFOFF@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w0, w22
	csel	w9, w8, w10, eq
	ldr	w11, [x21, #4]
	cbz	w11, LBB0_9
; %bb.7:
	cmp	w9, w10
	b.ne	LBB0_9
; %bb.8:
	mov	w22, #0
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_12
LBB0_9:
	cbnz	w11, LBB0_14
; %bb.10:
	cmp	w9, w8
	b.ne	LBB0_14
; %bb.11:
	mov	w22, #1
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_12:
Lloh13:
	adrp	x8, _COMP_RF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _COMP_RF@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_RT_TRACE
	str	w22, [x21, #4]
LBB0_13:
	mov	x0, x20
	bl	_spin_lock
	str	wzr, [x21]
	mov	x0, x20
	bl	_spin_unlock
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21, #4]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_14:
	ldr	w8, [x21, #8]
Lloh19:
	adrp	x9, _RT_RF_OFF_LEVL_HALT_NIC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _RT_RF_OFF_LEVL_HALT_NIC@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	tst	w1, w8
	b.eq	LBB0_13
; %bb.15:
	mov	x0, x21
	bl	_RT_SET_PS_LEVEL
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_GPIO_OUTPUT,4,2            ; @REG_GPIO_OUTPUT
	.comm	_ERFON,4,2                      ; @ERFON
	.comm	_ERFOFF,4,2                     ; @ERFOFF
	.comm	_COMP_RF,4,2                    ; @COMP_RF
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIOChangeRF  - HW Radio ON, RF ON\n"

l_.str.1:                               ; @.str.1
	.asciz	"GPIOChangeRF  - HW Radio OFF, RF OFF\n"

	.comm	_RT_RF_OFF_LEVL_HALT_NIC,4,2    ; @RT_RF_OFF_LEVL_HALT_NIC
.subsections_via_symbols
