	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_rfcsr_write
_rt2800_rfcsr_write:                    ## @rt2800_rfcsr_write
	.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	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mutex_lock
	cmpl	$128, 4(%rbx)
	jne	LBB0_3
## %bb.1:
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_WAIT_FOR_RFCSR_MT7620
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	$0, -36(%rbp)
	movq	_RF_CSR_CFG_DATA_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %r12
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_REGNUM_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_WRITE_MT7620@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_BUSY_MT7620@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_WAIT_FOR_RFCSR
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	$0, -36(%rbp)
	movq	_RF_CSR_CFG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %r12
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG_BUSY@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_RF_CSR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write_lock
LBB0_6:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_CSR_CFG_DATA_MT7620,4,2     ## @RF_CSR_CFG_DATA_MT7620
	.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,4,2            ## @RF_CSR_CFG_DATA
	.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
	.no_dead_strip	_rt2800_rfcsr_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_rfcsr_write
_rt2800_rfcsr_write:                    ; @rt2800_rfcsr_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	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_3
; %bb.1:
	bl	_WAIT_FOR_RFCSR_MT7620
	cbz	w0, LBB0_6
; %bb.2:
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _RF_CSR_CFG_DATA_MT7620@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_CSR_CFG_DATA_MT7620@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh3:
	adrp	x8, _RF_CSR_CFG_REGNUM_MT7620@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_CSR_CFG_REGNUM_MT7620@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh6:
	adrp	x8, _RF_CSR_CFG_WRITE_MT7620@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RF_CSR_CFG_WRITE_MT7620@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh9:
	adrp	x8, _RF_CSR_CFG_BUSY_MT7620@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RF_CSR_CFG_BUSY_MT7620@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	bl	_WAIT_FOR_RFCSR
	cbz	w0, LBB0_6
; %bb.4:
	str	wzr, [sp, #12]
Lloh11:
	adrp	x8, _RF_CSR_CFG_DATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RF_CSR_CFG_DATA@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
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, #1
	bl	_rt2x00_set_field32
Lloh20:
	adrp	x8, _RF_CSR_CFG_BUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RF_CSR_CFG_BUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh22:
	adrp	x8, _RF_CSR_CFG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RF_CSR_CFG@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write_lock
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_CSR_CFG_DATA_MT7620,4,2     ; @RF_CSR_CFG_DATA_MT7620
	.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,4,2            ; @RF_CSR_CFG_DATA
	.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
	.no_dead_strip	_rt2800_rfcsr_write
.subsections_via_symbols
