	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_config_channel_rf2xxx
_rt2800_config_channel_rf2xxx:          ## @rt2800_config_channel_rf2xxx
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_RF4_FREQ_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	movq	%rbx, %rdi
	callq	_rt2x00_set_field32
	cmpl	$1, 4(%r14)
	jne	LBB0_2
## %bb.1:
	leaq	4(%rbx), %rdi
	movq	_RF2_ANTENNA_TX1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_rt2x00_set_field32
LBB0_2:
	movl	8(%r14), %eax
	cmpl	$2, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.4:
	leaq	4(%rbx), %r13
	movq	_RF2_ANTENNA_RX1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	jmp	LBB0_6
LBB0_5:
	leaq	4(%rbx), %r13
LBB0_6:
	movq	_RF2_ANTENNA_RX2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
LBB0_7:
	leaq	12(%rbx), %r13
	cmpl	$15, 8(%rbx)
	jl	LBB0_12
## %bb.8:
	movq	_RF3_TXPOWER_A_7DBM_BOOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	notl	%edx
	shrl	$31, %edx
	movq	%r13, %rdi
	callq	_rt2x00_set_field32
	movl	(%r12), %edx
	testl	%edx, %edx
	jns	LBB0_10
## %bb.9:
	addl	$7, %edx
	movl	%edx, (%r12)
LBB0_10:
	movq	_RF3_TXPOWER_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rt2x00_set_field32
	movq	_RF4_TXPOWER_A_7DBM_BOOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	notl	%edx
	shrl	$31, %edx
	movq	%rbx, %rdi
	callq	_rt2x00_set_field32
	movl	4(%r12), %edx
	movq	_RF4_TXPOWER_A@GOTPCREL(%rip), %rax
	testl	%edx, %edx
	jns	LBB0_13
## %bb.11:
	addl	$7, %edx
	movl	%edx, 4(%r12)
	jmp	LBB0_13
LBB0_12:
	movq	_RF3_TXPOWER_G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_rt2x00_set_field32
	movl	4(%r12), %edx
	movq	_RF4_TXPOWER_G@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_set_field32
	movq	_RF4_HT40@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_conf_is_ht40
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_rt2x00_set_field32
	movl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rt2800_rf_write
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_rt2800_rf_write
	movl	12(%rbx), %edx
	andl	$-5, %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_rt2800_rf_write
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_rt2800_rf_write
	movl	$200, %edi
	callq	_udelay
	movl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rt2800_rf_write
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_rt2800_rf_write
	movl	12(%rbx), %edx
	orl	$4, %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_rt2800_rf_write
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_rt2800_rf_write
	movl	$200, %edi
	callq	_udelay
	movl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rt2800_rf_write
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_rt2800_rf_write
	movl	12(%rbx), %edx
	andl	$-5, %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_rt2800_rf_write
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rt2800_rf_write                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RF4_FREQ_OFFSET,4,2            ## @RF4_FREQ_OFFSET
	.comm	_RF2_ANTENNA_TX1,4,2            ## @RF2_ANTENNA_TX1
	.comm	_RF2_ANTENNA_RX1,4,2            ## @RF2_ANTENNA_RX1
	.comm	_RF2_ANTENNA_RX2,4,2            ## @RF2_ANTENNA_RX2
	.comm	_RF3_TXPOWER_A_7DBM_BOOST,4,2   ## @RF3_TXPOWER_A_7DBM_BOOST
	.comm	_RF3_TXPOWER_A,4,2              ## @RF3_TXPOWER_A
	.comm	_RF4_TXPOWER_A_7DBM_BOOST,4,2   ## @RF4_TXPOWER_A_7DBM_BOOST
	.comm	_RF4_TXPOWER_A,4,2              ## @RF4_TXPOWER_A
	.comm	_RF3_TXPOWER_G,4,2              ## @RF3_TXPOWER_G
	.comm	_RF4_TXPOWER_G,4,2              ## @RF4_TXPOWER_G
	.comm	_RF4_HT40,4,2                   ## @RF4_HT40
	.no_dead_strip	_rt2800_config_channel_rf2xxx
.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_rf2xxx
_rt2800_config_channel_rf2xxx:          ; @rt2800_config_channel_rf2xxx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _RF4_FREQ_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF4_FREQ_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x0]
	mov	x0, x19
	bl	_rt2x00_set_field32
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	add	x0, x19, #4
Lloh3:
	adrp	x8, _RF2_ANTENNA_TX1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF2_ANTENNA_TX1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_rt2x00_set_field32
LBB0_2:
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.4:
	add	x23, x19, #4
Lloh6:
	adrp	x8, _RF2_ANTENNA_RX1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RF2_ANTENNA_RX1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #1
	bl	_rt2x00_set_field32
	b	LBB0_6
LBB0_5:
	add	x23, x19, #4
LBB0_6:
Lloh9:
	adrp	x8, _RF2_ANTENNA_RX2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RF2_ANTENNA_RX2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #1
	bl	_rt2x00_set_field32
LBB0_7:
	ldr	w8, [x19, #8]
	add	x23, x19, #12
	cmp	w8, #15
	b.lt	LBB0_13
; %bb.8:
Lloh12:
	adrp	x8, _RF3_TXPOWER_A_7DBM_BOOST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RF3_TXPOWER_A_7DBM_BOOST@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x22]
	mvn	w8, w8
	lsr	w2, w8, #31
	mov	x0, x23
	bl	_rt2x00_set_field32
	ldr	w2, [x22]
	tbz	w2, #31, LBB0_10
; %bb.9:
	add	w2, w2, #7
	str	w2, [x22]
LBB0_10:
Lloh15:
	adrp	x8, _RF3_TXPOWER_A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RF3_TXPOWER_A@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_rt2x00_set_field32
Lloh18:
	adrp	x8, _RF4_TXPOWER_A_7DBM_BOOST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RF4_TXPOWER_A_7DBM_BOOST@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [x22, #4]
	mvn	w8, w8
	lsr	w2, w8, #31
	mov	x0, x19
	bl	_rt2x00_set_field32
	ldr	w2, [x22, #4]
	tbz	w2, #31, LBB0_12
; %bb.11:
	add	w2, w2, #7
	str	w2, [x22, #4]
LBB0_12:
Lloh21:
	adrp	x8, _RF4_TXPOWER_A@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RF4_TXPOWER_A@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh23:
	adrp	x8, _RF3_TXPOWER_G@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RF3_TXPOWER_G@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x23
	bl	_rt2x00_set_field32
	ldr	w2, [x22, #4]
Lloh26:
	adrp	x8, _RF4_TXPOWER_G@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RF4_TXPOWER_G@GOTPAGEOFF]
LBB0_14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_set_field32
Lloh28:
	adrp	x8, _RF4_HT40@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RF4_HT40@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_conf_is_ht40
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_rt2x00_set_field32
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	w1, #1
	bl	_rt2800_rf_write
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	w1, #2
	bl	_rt2800_rf_write
	ldr	w8, [x19, #12]
	and	w2, w8, #0xfffffffb
	mov	x0, x20
	mov	w1, #3
	bl	_rt2800_rf_write
	ldr	w2, [x19]
	mov	x0, x20
	mov	w1, #4
	bl	_rt2800_rf_write
	mov	w0, #200
	bl	_udelay
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	w1, #1
	bl	_rt2800_rf_write
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	w1, #2
	bl	_rt2800_rf_write
	ldr	w8, [x19, #12]
	orr	w2, w8, #0x4
	mov	x0, x20
	mov	w1, #3
	bl	_rt2800_rf_write
	ldr	w2, [x19]
	mov	x0, x20
	mov	w1, #4
	bl	_rt2800_rf_write
	mov	w0, #200
	bl	_udelay
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	w1, #1
	bl	_rt2800_rf_write
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	w1, #2
	bl	_rt2800_rf_write
	ldr	w8, [x19, #12]
	and	w2, w8, #0xfffffffb
	mov	x0, x20
	mov	w1, #3
	bl	_rt2800_rf_write
	ldr	w2, [x19]
	mov	x0, x20
	mov	w1, #4
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rt2800_rf_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_RF4_FREQ_OFFSET,4,2            ; @RF4_FREQ_OFFSET
	.comm	_RF2_ANTENNA_TX1,4,2            ; @RF2_ANTENNA_TX1
	.comm	_RF2_ANTENNA_RX1,4,2            ; @RF2_ANTENNA_RX1
	.comm	_RF2_ANTENNA_RX2,4,2            ; @RF2_ANTENNA_RX2
	.comm	_RF3_TXPOWER_A_7DBM_BOOST,4,2   ; @RF3_TXPOWER_A_7DBM_BOOST
	.comm	_RF3_TXPOWER_A,4,2              ; @RF3_TXPOWER_A
	.comm	_RF4_TXPOWER_A_7DBM_BOOST,4,2   ; @RF4_TXPOWER_A_7DBM_BOOST
	.comm	_RF4_TXPOWER_A,4,2              ; @RF4_TXPOWER_A
	.comm	_RF3_TXPOWER_G,4,2              ; @RF3_TXPOWER_G
	.comm	_RF4_TXPOWER_G,4,2              ; @RF4_TXPOWER_G
	.comm	_RF4_HT40,4,2                   ; @RF4_HT40
	.no_dead_strip	_rt2800_config_channel_rf2xxx
.subsections_via_symbols
