	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_rfcsr_read
_rt2800_rfcsr_read:                     ## @rt2800_rfcsr_read
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_mutex_lock
	cmpl	$128, 4(%r12)
	jne	LBB0_3
## %bb.1:
	leaq	-36(%rbp), %rsi
	movq	%r12, %rdi
	callq	_WAIT_FOR_RFCSR_MT7620
	movq	_RF_CSR_CFG_DATA_MT7620@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movl	$0, -36(%rbp)
	movq	_RF_CSR_CFG_REGNUM_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_WRITE_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_BUSY_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_register_write_lock
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_WAIT_FOR_RFCSR_MT7620
	jmp	LBB0_5
LBB0_3:
	leaq	-36(%rbp), %rsi
	movq	%r12, %rdi
	callq	_WAIT_FOR_RFCSR
	movq	_RF_CSR_CFG_DATA@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	$0, -36(%rbp)
	movq	_RF_CSR_CFG_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_register_write_lock
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_WAIT_FOR_RFCSR
LBB0_5:
	movl	-36(%rbp), %edi
	movl	(%rbx), %esi
	callq	_rt2x00_get_field32
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_CSR_CFG_REGNUM_MT7620,4,2   ## @RF_CSR_CFG_REGNUM_MT7620
	.comm	_RF_CSR_CFG_WRITE_MT7620,4,2    ## @RF_CSR_CFG_WRITE_MT7620
	.comm	_RF_CSR_CFG_BUSY_MT7620,4,2     ## @RF_CSR_CFG_BUSY_MT7620
	.comm	_RF_CSR_CFG,4,2                 ## @RF_CSR_CFG
	.comm	_RF_CSR_CFG_DATA_MT7620,4,2     ## @RF_CSR_CFG_DATA_MT7620
	.comm	_RF_CSR_CFG_REGNUM,4,2          ## @RF_CSR_CFG_REGNUM
	.comm	_RF_CSR_CFG_WRITE,4,2           ## @RF_CSR_CFG_WRITE
	.comm	_RF_CSR_CFG_BUSY,4,2            ## @RF_CSR_CFG_BUSY
	.comm	_RF_CSR_CFG_DATA,4,2            ## @RF_CSR_CFG_DATA
	.no_dead_strip	_rt2800_rfcsr_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_rfcsr_read
_rt2800_rfcsr_read:                     ; @rt2800_rfcsr_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	ldr	w8, [x19, #4]
	add	x1, sp, #12
	mov	x0, x19
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	bl	_WAIT_FOR_RFCSR_MT7620
	cbz	w0, LBB0_3
; %bb.2:
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _RF_CSR_CFG_REGNUM_MT7620@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_CSR_CFG_REGNUM_MT7620@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh3:
	adrp	x8, _RF_CSR_CFG_WRITE_MT7620@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_CSR_CFG_WRITE_MT7620@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh6:
	adrp	x8, _RF_CSR_CFG_BUSY_MT7620@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RF_CSR_CFG_BUSY_MT7620@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh9:
	adrp	x8, _RF_CSR_CFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RF_CSR_CFG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write_lock
	add	x1, sp, #12
	mov	x0, x19
	bl	_WAIT_FOR_RFCSR_MT7620
LBB0_3:
Lloh12:
	adrp	x8, _RF_CSR_CFG_DATA_MT7620@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RF_CSR_CFG_DATA_MT7620@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	bl	_WAIT_FOR_RFCSR
	cbz	w0, LBB0_6
; %bb.5:
	str	wzr, [sp, #12]
Lloh14:
	adrp	x8, _RF_CSR_CFG_REGNUM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RF_CSR_CFG_REGNUM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh17:
	adrp	x8, _RF_CSR_CFG_WRITE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RF_CSR_CFG_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh20:
	adrp	x8, _RF_CSR_CFG_BUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RF_CSR_CFG_BUSY@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh23:
	adrp	x8, _RF_CSR_CFG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RF_CSR_CFG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write_lock
	add	x1, sp, #12
	mov	x0, x19
	bl	_WAIT_FOR_RFCSR
LBB0_6:
Lloh26:
	adrp	x8, _RF_CSR_CFG_DATA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RF_CSR_CFG_DATA@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [sp, #12]
	ldr	w1, [x8]
	bl	_rt2x00_get_field32
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_CSR_CFG_REGNUM_MT7620,4,2   ; @RF_CSR_CFG_REGNUM_MT7620
	.comm	_RF_CSR_CFG_WRITE_MT7620,4,2    ; @RF_CSR_CFG_WRITE_MT7620
	.comm	_RF_CSR_CFG_BUSY_MT7620,4,2     ; @RF_CSR_CFG_BUSY_MT7620
	.comm	_RF_CSR_CFG,4,2                 ; @RF_CSR_CFG
	.comm	_RF_CSR_CFG_DATA_MT7620,4,2     ; @RF_CSR_CFG_DATA_MT7620
	.comm	_RF_CSR_CFG_REGNUM,4,2          ; @RF_CSR_CFG_REGNUM
	.comm	_RF_CSR_CFG_WRITE,4,2           ; @RF_CSR_CFG_WRITE
	.comm	_RF_CSR_CFG_BUSY,4,2            ; @RF_CSR_CFG_BUSY
	.comm	_RF_CSR_CFG_DATA,4,2            ; @RF_CSR_CFG_DATA
	.no_dead_strip	_rt2800_rfcsr_read
.subsections_via_symbols
