	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_link_tuner              ## -- Begin function rt2800_link_tuner
	.p2align	4, 0x90
_rt2800_link_tuner:                     ## @rt2800_link_tuner
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_RT2860@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REV_RT2860C@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_rt2x00_rt_rev
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_rt2800_get_default_vgc
                                        ## kill: def $eax killed $eax def $rax
	movl	4(%rbx), %ecx
	leal	-130(%rcx), %edx
	cmpl	$2, %edx
	jb	LBB0_6
## %bb.2:
	cmpl	$128, %ecx
	je	LBB0_10
## %bb.3:
	cmpl	$129, %ecx
	jne	LBB0_11
## %bb.4:
	leal	16(%rax), %ecx
	cmpl	$-64, (%r14)
	jmp	LBB0_12
LBB0_6:
	cmpl	$-64, (%r14)
	jl	LBB0_13
## %bb.7:
	movl	(%rbx), %ecx
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_9
## %bb.8:
	addl	$32, %eax
	jmp	LBB0_13
LBB0_10:
	leal	32(%rax), %ecx
	cmpl	$-64, (%r14)
	jmp	LBB0_12
LBB0_11:
	leal	16(%rax), %ecx
	cmpl	$-79, (%r14)
LBB0_12:
	cmovll	%eax, %ecx
	movl	%ecx, %eax
LBB0_13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rt2800_set_vgc                 ## TAILCALL
LBB0_9:
	addl	$16, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_RT2860,4,2                     ## @RT2860
	.comm	_REV_RT2860C,4,2                ## @REV_RT2860C
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_link_tuner              ; -- Begin function rt2800_link_tuner
	.p2align	2
_rt2800_link_tuner:                     ; @rt2800_link_tuner
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _RT2860@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT2860@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _REV_RT2860C@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REV_RT2860C@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_rt2x00_rt_rev
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x20
	bl	_rt2800_get_default_vgc
	mov	x2, x0
	ldr	w8, [x20, #4]
	sub	w9, w8, #130
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.3:
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [x19]
	add	w9, w2, #16
	cmn	w8, #65
	b	LBB0_11
LBB0_6:
	ldr	w8, [x19]
	cmn	w8, #64
	b.lt	LBB0_12
; %bb.7:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.8:
	add	w2, w2, #32
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19]
	add	w9, w2, #32
	cmn	w8, #65
	b	LBB0_11
LBB0_10:
	ldr	w8, [x19]
	add	w9, w2, #16
	cmn	w8, #80
LBB0_11:
	csel	w2, w9, w2, gt
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rt2800_set_vgc
LBB0_13:
	add	w2, w2, #16
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RT2860,4,2                     ; @RT2860
	.comm	_REV_RT2860C,4,2                ; @REV_RT2860C
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
.subsections_via_symbols
