	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_rx_filter_calibration
_rt2800_rx_filter_calibration:          ## @rt2800_rx_filter_calibration
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_RT3070@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rt2x00_rt
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leal	(%rcx,%rcx,2), %edx
	addl	$19, %edx
	leal	21(,%rcx,4), %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rt2800_init_rx_filter
	movq	%rax, 24(%r15)
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_rt2800_init_rx_filter
	movq	%rax, 16(%r15)
	movq	%rbx, %rdi
	movl	$25, %esi
	callq	_rt2800_bbp_read
	movq	%rax, 8(%r15)
	movq	%rbx, %rdi
	movl	$26, %esi
	callq	_rt2800_bbp_read
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	movl	$24, %esi
	xorl	%edx, %edx
	callq	_rt2800_bbp_write
	movq	%rbx, %rdi
	movl	$22, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -32(%rbp)
	movq	_RFCSR22_BASEBAND_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movl	-32(%rbp), %edx
	movq	%rbx, %rdi
	movl	$22, %esi
	callq	_rt2800_rfcsr_write
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_rt2800_bbp_read
	movl	%eax, -28(%rbp)
	movq	_BBP4_BANDWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_rt2800_bbp_write
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT3070,4,2                     ## @RT3070
	.comm	_RFCSR22_BASEBAND_LOOPBACK,4,2  ## @RFCSR22_BASEBAND_LOOPBACK
	.comm	_BBP4_BANDWIDTH,4,2             ## @BBP4_BANDWIDTH
	.no_dead_strip	_rt2800_rx_filter_calibration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_rx_filter_calibration
_rt2800_rx_filter_calibration:          ; @rt2800_rx_filter_calibration
	.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	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _RT3070@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT3070@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_rt2x00_rt
	cmp	x0, #0
	mov	w8, #22
	mov	w9, #19
	csel	w2, w9, w8, eq
	mov	w8, #25
	mov	w9, #21
	csel	w20, w9, w8, eq
	mov	x0, x19
	mov	w1, #0
	bl	_rt2800_init_rx_filter
	str	x0, [x21, #24]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_rt2800_init_rx_filter
	str	x0, [x21, #16]
	mov	x0, x19
	mov	w1, #25
	bl	_rt2800_bbp_read
	str	x0, [x21, #8]
	mov	x0, x19
	mov	w1, #26
	bl	_rt2800_bbp_read
	str	x0, [x21]
	mov	x0, x19
	mov	w1, #24
	mov	w2, #0
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #22
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #12]
Lloh3:
	adrp	x8, _RFCSR22_BASEBAND_LOOPBACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RFCSR22_BASEBAND_LOOPBACK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #22
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #4
	bl	_rt2800_bbp_read
	str	w0, [sp, #8]
Lloh6:
	adrp	x8, _BBP4_BANDWIDTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BBP4_BANDWIDTH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #0
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #8]
	mov	x0, x19
	mov	w1, #4
	bl	_rt2800_bbp_write
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RT3070,4,2                     ; @RT3070
	.comm	_RFCSR22_BASEBAND_LOOPBACK,4,2  ; @RFCSR22_BASEBAND_LOOPBACK
	.comm	_BBP4_BANDWIDTH,4,2             ; @BBP4_BANDWIDTH
	.no_dead_strip	_rt2800_rx_filter_calibration
.subsections_via_symbols
