	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7601u_rf_rr
_mt7601u_rf_rr:                         ## @mt7601u_rf_rr
	.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, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	xorl	%ebx, %ebx
	movq	_MT7601U_STATE_WLAN_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r12), %r14
	movq	%r14, %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	$64, %r15d
	setge	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_MT7601U_STATE_REMOVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	movl	$255, %ebx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_MT_RF_CSR_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MT_RF_CSR_CFG_KICK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	movl	$100, %r8d
	callq	_mt76_poll
	testl	%eax, %eax
	je	LBB0_12
## %bb.6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ebx
	movq	_MT_RF_CSR_CFG_REG_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_RF_CSR_CFG_REG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_PREP
	orl	%eax, %r14d
	movq	_MT_RF_CSR_CFG_KICK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movq	_MT_RF_CSR_CFG@GOTPCREL(%rip), %rbx
	callq	_mt7601u_wr
	movl	(%rbx), %esi
	movq	_MT_RF_CSR_CFG_KICK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	movl	$100, %r8d
	callq	_mt76_poll
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_mt7601u_rr
	movl	%eax, %r14d
	movq	_MT_RF_CSR_CFG_REG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_GET
	cmpl	%r15d, %eax
	jne	LBB0_11
## %bb.8:
	movq	_MT_RF_CSR_CFG_REG_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_GET
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_12
## %bb.9:
	movq	_MT_RF_CSR_CFG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_GET
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_trace_rf_read
	jmp	LBB0_12
LBB0_11:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_12:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r13d, %r13d
	jns	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	%r13d, %r8d
	callq	_dev_err
LBB0_14:
	movl	%r13d, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MT7601U_STATE_WLAN_RUNNING,4,2 ## @MT7601U_STATE_WLAN_RUNNING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MT7601U_STATE_REMOVED,4,2      ## @MT7601U_STATE_REMOVED
	.comm	_MT_RF_CSR_CFG,4,2              ## @MT_RF_CSR_CFG
	.comm	_MT_RF_CSR_CFG_KICK,4,2         ## @MT_RF_CSR_CFG_KICK
	.comm	_MT_RF_CSR_CFG_REG_BANK,4,2     ## @MT_RF_CSR_CFG_REG_BANK
	.comm	_MT_RF_CSR_CFG_REG_ID,4,2       ## @MT_RF_CSR_CFG_REG_ID
	.comm	_MT_RF_CSR_CFG_DATA,4,2         ## @MT_RF_CSR_CFG_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: RF read %02hhx:%02hhx failed:%d!!\n"

	.no_dead_strip	_mt7601u_rf_rr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7601u_rf_rr
_mt7601u_rf_rr:                         ; @mt7601u_rf_rr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _MT7601U_STATE_WLAN_RUNNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT7601U_STATE_WLAN_RUNNING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x22, x21, #8
	mov	x1, x22
	bl	_test_bit
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_2
; %bb.1:
	cmp	w19, #63
	cset	w0, gt
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh9:
	adrp	x8, _MT7601U_STATE_REMOVED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT7601U_STATE_REMOVED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.5:
	mov	w22, #255
	b	LBB0_3
LBB0_6:
	neg	w22, w23
	add	x23, x21, #4
	mov	x0, x23
	bl	_mutex_lock
Lloh12:
	adrp	x26, _MT_RF_CSR_CFG@GOTPAGE
Lloh13:
	ldr	x26, [x26, _MT_RF_CSR_CFG@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh14:
	adrp	x28, _MT_RF_CSR_CFG_KICK@GOTPAGE
Lloh15:
	ldr	x28, [x28, _MT_RF_CSR_CFG_KICK@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x21
	mov	w3, #0
	mov	w4, #100
	bl	_mt76_poll
	cbz	w0, LBB0_11
; %bb.7:
	ldr	w24, [x26]
Lloh16:
	adrp	x8, _MT_RF_CSR_CFG_REG_BANK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT_RF_CSR_CFG_REG_BANK@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_PREP
	mov	x25, x0
Lloh19:
	adrp	x27, _MT_RF_CSR_CFG_REG_ID@GOTPAGE
Lloh20:
	ldr	x27, [x27, _MT_RF_CSR_CFG_REG_ID@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	x1, x19
	bl	_FIELD_PREP
	orr	w8, w0, w25
	ldr	w9, [x28]
	orr	w2, w8, w9
	mov	x0, x21
	mov	x1, x24
	bl	_mt7601u_wr
	ldr	w1, [x26]
	ldr	w2, [x28]
	mov	x0, x21
	mov	w3, #0
	mov	w4, #100
	bl	_mt76_poll
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w1, [x26]
	mov	x0, x21
	bl	_mt7601u_rr
	mov	x24, x0
	ldr	w0, [x27]
	mov	x1, x24
	bl	_FIELD_GET
	cmp	w0, w19
	b.ne	LBB0_11
; %bb.9:
Lloh21:
	adrp	x8, _MT_RF_CSR_CFG_REG_BANK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MT_RF_CSR_CFG_REG_BANK@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_FIELD_GET
	cmp	w0, w20
	b.ne	LBB0_11
; %bb.10:
Lloh24:
	adrp	x8, _MT_RF_CSR_CFG_DATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MT_RF_CSR_CFG_DATA@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_FIELD_GET
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_trace_rf_read
LBB0_11:
	mov	x0, x23
	bl	_mutex_unlock
	tbz	w22, #31, LBB0_3
; %bb.12:
	ldr	w0, [x21]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_dev_err
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MT7601U_STATE_WLAN_RUNNING,4,2 ; @MT7601U_STATE_WLAN_RUNNING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MT7601U_STATE_REMOVED,4,2      ; @MT7601U_STATE_REMOVED
	.comm	_MT_RF_CSR_CFG,4,2              ; @MT_RF_CSR_CFG
	.comm	_MT_RF_CSR_CFG_KICK,4,2         ; @MT_RF_CSR_CFG_KICK
	.comm	_MT_RF_CSR_CFG_REG_BANK,4,2     ; @MT_RF_CSR_CFG_REG_BANK
	.comm	_MT_RF_CSR_CFG_REG_ID,4,2       ; @MT_RF_CSR_CFG_REG_ID
	.comm	_MT_RF_CSR_CFG_DATA,4,2         ; @MT_RF_CSR_CFG_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: RF read %02hhx:%02hhx failed:%d!!\n"

	.no_dead_strip	_mt7601u_rf_rr
.subsections_via_symbols
