	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function rt2800_config_channel_rf3853
LCPI0_0:
	.long	48                              ## 0x30
	.long	48                              ## 0x30
	.space	4
	.space	4
LCPI0_1:
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.space	4
	.space	4
LCPI0_2:
	.long	72                              ## 0x48
	.long	72                              ## 0x48
	.space	4
	.space	4
LCPI0_3:
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rt2800_config_channel_rf3853:          ## @rt2800_config_channel_rf3853
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	(%rdx), %eax
	xorl	%ecx, %ecx
	cmpl	$132, %eax
	setb	%cl
	shll	$6, %ecx
	addl	$64, %ecx
	cmpl	$15, %eax
	movl	$64, %edx
	cmovgel	%ecx, %edx
	movl	$6, %esi
	callq	_rt2800_rfcsr_write
	movl	4(%r14), %edx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_rt2800_rfcsr_write
	movl	8(%r14), %edx
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_rt2800_rfcsr_write
	xorl	%eax, %eax
	cmpl	$15, (%r14)
	setge	%al
	leal	(%rax,%rax), %edx
	addl	$70, %edx
	movq	%r13, %rdi
	movl	$11, %esi
	callq	_rt2800_rfcsr_write
	cmpl	$15, (%r14)
	movl	$26, %eax
	movl	$82, %edx
	cmovll	%eax, %edx
	movq	%r13, %rdi
	movl	$12, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$13, %esi
	movl	$18, %edx
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	movq	_RFCSR1_RX0_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_TX0_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_RX1_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_TX1_PD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_RX2_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_TX2_PD@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_RF_BLOCK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
	movq	_RFCSR1_PLL_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
	movl	(%r13), %eax
	cmpl	$1, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$2, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$3, %eax
	jne	LBB0_6
## %bb.3:
	movl	(%r15), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_4:
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_5:
	movq	_RFCSR1_TX0_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_6:
	movl	4(%r13), %eax
	cmpl	$1, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$2, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$3, %eax
	jne	LBB0_12
## %bb.9:
	movq	_RFCSR1_RX2_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_10:
	movq	_RFCSR1_RX1_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_11:
	movq	_RFCSR1_RX0_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
LBB0_12:
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	callq	_rt2800_freq_cal_mode1
	movq	%r13, %rdi
	movl	$30, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_conf_is_ht40
	movl	-44(%rbp), %ecx
	andl	$-7, %ecx
	xorl	%esi, %esi
	testq	%rax, %rax
	movl	$6, %edx
	cmovel	%esi, %edx
	orl	%ecx, %edx
	movl	%edx, -44(%rbp)
	movq	%r13, %rdi
	movl	$30, %esi
	callq	_rt2800_rfcsr_write
	xorl	%edx, %edx
	cmpl	$15, (%r14)
	setl	%dl
	orl	$4, %edx
	shll	$5, %edx
	movq	%r13, %rdi
	movl	$31, %esi
	callq	_rt2800_rfcsr_write
	movq	%rbx, %rdi
	callq	_conf_is_ht40
	testq	%rax, %rax
	movl	$216, %eax
	movl	$128, %edx
	cmovel	%eax, %edx
	movl	$32, %ebx
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_rt2800_rfcsr_write
	cmpl	$15, (%r14)
	movl	$60, %edx
	cmovgel	%ebx, %edx
	movq	%r13, %rdi
	movl	$34, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$36, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	xorl	%edx, %edx
	cmpl	$15, (%r14)
	setl	%dl
	movq	_RFCSR36_RF_BS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	callq	_rt2x00_set_field8
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movl	$36, %esi
	callq	_rt2800_rfcsr_write
	movl	(%r14), %eax
	cmpl	$14, %eax
	jg	LBB0_14
## %bb.13:
	movl	$35, -44(%rbp)
	movl	$35, %edx
	jmp	LBB0_19
LBB0_14:
	cmpl	$99, %eax
	ja	LBB0_16
## %bb.15:
	movl	$54, -44(%rbp)
	movl	$54, %edx
	jmp	LBB0_19
LBB0_16:
	cmpl	$131, %eax
	ja	LBB0_18
## %bb.17:
	movl	$50, -44(%rbp)
	movl	$50, %edx
	jmp	LBB0_19
LBB0_18:
	movl	$48, -44(%rbp)
	movl	$48, %edx
LBB0_19:
	movq	%r13, %rdi
	movl	$39, %esi
	callq	_rt2800_rfcsr_write
	xorl	%eax, %eax
	cmpl	$15, (%r14)
	setge	%al
	leal	147(,%rax,8), %edx
	movq	%r13, %rdi
	movl	$44, %esi
	callq	_rt2800_rfcsr_write
	movl	(%r14), %eax
	cmpl	$14, %eax
	jg	LBB0_21
## %bb.20:
	movl	$187, -44(%rbp)
	movl	$187, %edx
	jmp	LBB0_26
LBB0_21:
	cmpl	$99, %eax
	ja	LBB0_23
## %bb.22:
	movl	$235, -44(%rbp)
	movl	$235, %edx
	jmp	LBB0_26
LBB0_23:
	cmpl	$131, %eax
	ja	LBB0_25
## %bb.24:
	movl	$179, -44(%rbp)
	movl	$179, %edx
	jmp	LBB0_26
LBB0_25:
	movl	$155, -44(%rbp)
	movl	$155, %edx
LBB0_26:
	movq	%r13, %rdi
	movl	$45, %esi
	callq	_rt2800_rfcsr_write
	xorl	%eax, %eax
	cmpl	$15, (%r14)
	setl	%al
	leal	138(,%rax,4), %edx
	movl	%edx, -44(%rbp)
	movq	%r13, %rdi
	movl	$49, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$50, %esi
	movl	$134, %edx
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$51, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	cmpl	$15, (%r14)
	movl	$117, %eax
	movl	$81, %edx
	cmovll	%eax, %edx
	movq	%r13, %rdi
	movl	$51, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$52, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	xorl	%edx, %edx
	cmpl	$15, (%r14)
	setl	%dl
	shll	$6, %edx
	orl	$5, %edx
	movq	%r13, %rdi
	movl	$52, %esi
	callq	_rt2800_rfcsr_write
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	cmpl	$14, (%r14)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %ebx
	jg	LBB0_28
## %bb.27:
	andl	$31, %ebx
	movq	4(%r14), %xmm0                  ## xmm0 = mem[0],zero
	pand	LCPI0_3(%rip), %xmm0
	movdqa	%xmm0, -80(%rbp)                ## 16-byte Spill
	jmp	LBB0_29
LBB0_28:
	movl	%ebx, %eax
	andl	$24, %eax
	andl	$7, %ebx
	movq	4(%r14), %xmm1                  ## xmm1 = mem[0],zero
	movdqa	%xmm1, %xmm0
	paddd	%xmm1, %xmm0
	pand	LCPI0_0(%rip), %xmm0
	pand	LCPI0_1(%rip), %xmm1
	leal	(%rbx,%rax,2), %ebx
	addl	$72, %ebx
	por	%xmm0, %xmm1
	por	LCPI0_2(%rip), %xmm1
	movdqa	%xmm1, -80(%rbp)                ## 16-byte Spill
LBB0_29:
	movq	%r13, %rdi
	movl	$53, %esi
	movl	%ebx, %edx
	callq	_rt2800_rfcsr_write
	movdqa	-80(%rbp), %xmm0                ## 16-byte Reload
	movd	%xmm0, %r12d
	movq	%r13, %rdi
	movl	$54, %esi
	movl	%r12d, %edx
	callq	_rt2800_rfcsr_write
	movaps	-80(%rbp), %xmm0                ## 16-byte Reload
	extractps	$1, %xmm0, %r15d
	movq	%r13, %rdi
	movl	$55, %esi
	movl	%r15d, %edx
	callq	_rt2800_rfcsr_write
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_rt2x00_dbg
	movl	(%r14), %eax
	movl	4(%r14), %edx
	sarl	$5, %eax
	shrl	%edx
	andl	$112, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	movl	$109, %esi
	callq	_rt2800_bbp_write
	movl	$110, %ebx
	movq	%r13, %rdi
	movl	$110, %esi
	callq	_rt2800_bbp_read
	andl	$15, %eax
	movl	8(%r14), %edx
	shrl	%edx
	andl	$112, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	movl	$110, %esi
	callq	_rt2800_bbp_write
	movq	%r13, %rdi
	movl	$57, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$15, (%rax)
	movl	$62, %edx
	cmovll	%ebx, %edx
	movq	%r13, %rdi
	movl	$57, %esi
	callq	_rt2800_rfcsr_write
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_rt2800_rfcsr_read
	movl	%eax, -44(%rbp)
	movq	_RFCSR3_VCOCAL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field8
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_rt2800_rfcsr_write
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_udelay
	movq	%r13, %rdi
	movl	$49, %esi
	callq	_rt2800_bbp_read
	movl	%eax, %ebx
	movl	%eax, %edx
	andl	$254, %edx
	movq	%r13, %rdi
	movl	$49, %esi
	callq	_rt2800_bbp_write
	movq	%r13, %rdi
	movl	$49, %esi
	movl	%ebx, %edx
	callq	_rt2800_bbp_write
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RFCSR1_RX0_PD,4,2              ## @RFCSR1_RX0_PD
	.comm	_RFCSR1_TX0_PD,4,2              ## @RFCSR1_TX0_PD
	.comm	_RFCSR1_RX1_PD,4,2              ## @RFCSR1_RX1_PD
	.comm	_RFCSR1_TX1_PD,4,2              ## @RFCSR1_TX1_PD
	.comm	_RFCSR1_RX2_PD,4,2              ## @RFCSR1_RX2_PD
	.comm	_RFCSR1_TX2_PD,4,2              ## @RFCSR1_TX2_PD
	.comm	_RFCSR1_RF_BLOCK_EN,4,2         ## @RFCSR1_RF_BLOCK_EN
	.comm	_RFCSR1_PLL_PD,4,2              ## @RFCSR1_PLL_PD
	.comm	_RFCSR36_RF_BS,4,2              ## @RFCSR36_RF_BS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel:%d, pwr1:%02x, pwr2:%02x, pwr3:%02x\n"

	.comm	_RFCSR3_VCOCAL_EN,4,2           ## @RFCSR3_VCOCAL_EN
	.no_dead_strip	_rt2800_config_channel_rf3853
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_config_channel_rf3853
_rt2800_config_channel_rf3853:          ; @rt2800_config_channel_rf3853
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x2]
	mov	w9, #64
	mov	w10, #128
	cmp	w8, #132
	csel	w10, w10, w9, lo
	cmp	w8, #15
	csel	w2, w9, w10, lt
	mov	w1, #6
	bl	_rt2800_rfcsr_write
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #8
	bl	_rt2800_rfcsr_write
	ldr	w2, [x20, #8]
	mov	x0, x19
	mov	w1, #9
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w9, #72
	mov	w10, #70
	cmp	w8, #15
	csel	w2, w10, w9, lt
	mov	x0, x19
	mov	w1, #11
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w9, #82
	mov	w10, #26
	cmp	w8, #15
	csel	w2, w10, w9, lt
	mov	x0, x19
	mov	w1, #12
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #13
	mov	w2, #18
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #1
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
Lloh0:
	adrp	x23, _RFCSR1_RX0_PD@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RFCSR1_RX0_PD@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh2:
	adrp	x25, _RFCSR1_TX0_PD@GOTPAGE
Lloh3:
	ldr	x25, [x25, _RFCSR1_TX0_PD@GOTPAGEOFF]
	ldr	w1, [x25]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh4:
	adrp	x24, _RFCSR1_RX1_PD@GOTPAGE
Lloh5:
	ldr	x24, [x24, _RFCSR1_RX1_PD@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh6:
	adrp	x27, _RFCSR1_TX1_PD@GOTPAGE
Lloh7:
	ldr	x27, [x27, _RFCSR1_TX1_PD@GOTPAGEOFF]
	ldr	w1, [x27]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh8:
	adrp	x26, _RFCSR1_RX2_PD@GOTPAGE
Lloh9:
	ldr	x26, [x26, _RFCSR1_RX2_PD@GOTPAGEOFF]
	ldr	w1, [x26]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh10:
	adrp	x28, _RFCSR1_TX2_PD@GOTPAGE
Lloh11:
	ldr	x28, [x28, _RFCSR1_TX2_PD@GOTPAGEOFF]
	ldr	w1, [x28]
	add	x0, sp, #28
	mov	w2, #0
	bl	_rt2x00_set_field8
Lloh12:
	adrp	x8, _RFCSR1_RF_BLOCK_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RFCSR1_RF_BLOCK_EN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
Lloh15:
	adrp	x8, _RFCSR1_PLL_PD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RFCSR1_PLL_PD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #2
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #3
	b.ne	LBB0_6
; %bb.3:
	ldr	w1, [x28]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_4:
	ldr	w1, [x27]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_5:
	ldr	w1, [x25]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_6:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #2
	b.eq	LBB0_10
; %bb.8:
	cmp	w8, #3
	b.ne	LBB0_12
; %bb.9:
	ldr	w1, [x26]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_10:
	ldr	w1, [x24]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_11:
	ldr	w1, [x23]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
LBB0_12:
	ldr	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #1
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	bl	_rt2800_freq_cal_mode1
	mov	x0, x19
	mov	w1, #30
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
	mov	x0, x22
	bl	_conf_is_ht40
	ldr	w8, [sp, #28]
	and	w8, w8, #0xfffffff9
	cmp	x0, #0
	mov	w9, #6
	csel	w9, wzr, w9, eq
	orr	w2, w8, w9
	str	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #30
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w23, #128
	mov	w9, #160
	cmp	w8, #15
	csel	w2, w9, w23, lt
	mov	x0, x19
	mov	w1, #31
	bl	_rt2800_rfcsr_write
	mov	x0, x22
	bl	_conf_is_ht40
	cmp	x0, #0
	mov	w8, #216
	csel	w2, w8, w23, eq
	mov	w22, #32
	mov	x0, x19
	mov	w1, #32
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w9, #60
	cmp	w8, #15
	csel	w2, w9, w22, lt
	mov	x0, x19
	mov	w1, #34
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #36
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
	ldr	w8, [x20]
	cmp	w8, #15
	cset	w2, lt
Lloh18:
	adrp	x8, _RFCSR36_RF_BS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RFCSR36_RF_BS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x0, sp, #28
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #36
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	cmp	w8, #14
	b.gt	LBB0_14
; %bb.13:
	mov	w2, #35
	b	LBB0_19
LBB0_14:
	cmp	w8, #99
	b.hi	LBB0_16
; %bb.15:
	mov	w2, #54
	b	LBB0_19
LBB0_16:
	cmp	w8, #131
	b.hi	LBB0_18
; %bb.17:
	mov	w2, #50
	b	LBB0_19
LBB0_18:
	mov	w2, #48
LBB0_19:
	str	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #39
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w9, #155
	mov	w10, #147
	cmp	w8, #15
	csel	w2, w10, w9, lt
	mov	x0, x19
	mov	w1, #44
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	cmp	w8, #14
	b.gt	LBB0_21
; %bb.20:
	mov	w2, #187
	b	LBB0_26
LBB0_21:
	cmp	w8, #99
	b.hi	LBB0_23
; %bb.22:
	mov	w2, #235
	b	LBB0_26
LBB0_23:
	cmp	w8, #131
	b.hi	LBB0_25
; %bb.24:
	mov	w2, #179
	b	LBB0_26
LBB0_25:
	mov	w2, #155
LBB0_26:
	str	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #45
	bl	_rt2800_rfcsr_write
	ldr	w8, [x20]
	mov	w9, #138
	mov	w10, #142
	cmp	w8, #15
	csel	w2, w10, w9, lt
	str	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #49
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #50
	mov	w2, #134
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #51
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
	ldr	w8, [x20]
	mov	w9, #81
	mov	w10, #117
	cmp	w8, #15
	csel	w2, w10, w9, lt
	mov	x0, x19
	mov	w1, #51
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #52
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
	ldr	w8, [x20]
	mov	w9, #5
	mov	w10, #69
	cmp	w8, #15
	csel	w2, w10, w9, lt
	mov	x0, x19
	mov	w1, #52
	bl	_rt2800_rfcsr_write
	ldr	w9, [x20]
	ldr	w8, [x21]
	cmp	w9, #14
	b.gt	LBB0_28
; %bb.27:
	and	w22, w8, #0x1f
	ldur	d0, [x21, #4]
	movi.2s	v1, #31
	and.8b	v0, v0, v1
	b	LBB0_29
LBB0_28:
	lsl	w9, w8, #1
	and	w9, w9, #0x30
	bfxil	w9, w8, #0, #3
	mov	w8, #72
	orr	w22, w9, w8
	ldur	d0, [x21, #4]
	shl.2s	v1, v0, #1
	movi.2s	v2, #48
	and.8b	v1, v1, v2
	movi.2s	v2, #7
	and.8b	v0, v0, v2
	orr.8b	v0, v0, v1
	orr.2s	v0, #72
LBB0_29:
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov	x0, x19
	mov	w1, #53
	mov	x2, x22
	bl	_rt2800_rfcsr_write
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	fmov	w23, s0
	mov	x0, x19
	mov	w1, #54
	mov	x2, x23
	bl	_rt2800_rfcsr_write
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	mov.s	w24, v0[1]
	mov	x0, x19
	mov	w1, #55
	mov	x2, x24
	bl	_rt2800_rfcsr_write
	ldr	w2, [x20]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_rt2x00_dbg
	ldp	w8, w9, [x21]
	lsr	w9, w9, #1
	and	w9, w9, #0x70
	orr	w2, w9, w8, asr #5
	mov	x0, x19
	mov	w1, #109
	bl	_rt2800_bbp_write
	mov	w22, #110
	mov	x0, x19
	mov	w1, #110
	bl	_rt2800_bbp_read
	ldr	w8, [x21, #8]
	lsr	w8, w8, #1
	and	w2, w8, #0x70
	bfxil	w2, w0, #0, #4
	mov	x0, x19
	mov	w1, #110
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #57
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
	ldr	w8, [x20]
	mov	w9, #62
	cmp	w8, #15
	csel	w2, w22, w9, lt
	mov	x0, x19
	mov	w1, #57
	bl	_rt2800_rfcsr_write
	mov	x0, x19
	mov	w1, #3
	bl	_rt2800_rfcsr_read
	str	w0, [sp, #28]
Lloh23:
	adrp	x8, _RFCSR3_VCOCAL_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RFCSR3_VCOCAL_EN@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x0, sp, #28
	mov	w2, #1
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #28]
	mov	x0, x19
	mov	w1, #3
	bl	_rt2800_rfcsr_write
	mov	w0, #2000
	bl	_udelay
	mov	x0, x19
	mov	w1, #49
	bl	_rt2800_bbp_read
	mov	x20, x0
	and	w2, w0, #0xfe
	mov	x0, x19
	mov	w1, #49
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #49
	mov	x2, x20
	bl	_rt2800_bbp_write
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_RFCSR1_RX0_PD,4,2              ; @RFCSR1_RX0_PD
	.comm	_RFCSR1_TX0_PD,4,2              ; @RFCSR1_TX0_PD
	.comm	_RFCSR1_RX1_PD,4,2              ; @RFCSR1_RX1_PD
	.comm	_RFCSR1_TX1_PD,4,2              ; @RFCSR1_TX1_PD
	.comm	_RFCSR1_RX2_PD,4,2              ; @RFCSR1_RX2_PD
	.comm	_RFCSR1_TX2_PD,4,2              ; @RFCSR1_TX2_PD
	.comm	_RFCSR1_RF_BLOCK_EN,4,2         ; @RFCSR1_RF_BLOCK_EN
	.comm	_RFCSR1_PLL_PD,4,2              ; @RFCSR1_PLL_PD
	.comm	_RFCSR36_RF_BS,4,2              ; @RFCSR36_RF_BS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel:%d, pwr1:%02x, pwr2:%02x, pwr3:%02x\n"

	.comm	_RFCSR3_VCOCAL_EN,4,2           ; @RFCSR3_VCOCAL_EN
	.no_dead_strip	_rt2800_config_channel_rf3853
.subsections_via_symbols
