	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500pci_link_tuner
_rt2500pci_link_tuner:                  ## @rt2500pci_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_rt2x00_rev
	movq	_RT2560_VERSION_D@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jge	LBB0_3
## %bb.1:
	cmpl	$21, %r15d
	jl	LBB0_3
## %bb.2:
	cmpq	$0, (%rbx)
	jne	LBB0_23
LBB0_3:
	movq	%rbx, %rdi
	callq	_rt2x00_rev
	cmpq	(%r12), %rax
	jl	LBB0_14
## %bb.4:
	cmpq	$0, (%rbx)
	je	LBB0_14
## %bb.5:
	movl	(%r14), %eax
	cmpl	$21, %r15d
	jl	LBB0_9
## %bb.6:
	cmpl	$-81, %eax
	jg	LBB0_9
## %bb.7:
	cmpl	$65, 4(%r14)
	jl	LBB0_23
LBB0_8:
	movl	8(%r14), %edx
	jmp	LBB0_21
LBB0_9:
	cmpl	$-58, %eax
	jl	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$80, %edx
	jmp	LBB0_22
LBB0_11:
	cmpl	$-74, %eax
	jb	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$65, %edx
	jmp	LBB0_22
LBB0_13:
	cmpl	$65, 4(%r14)
	jge	LBB0_8
LBB0_14:
	movl	12(%r14), %eax
	cmpl	$513, %eax                      ## imm = 0x201
	jl	LBB0_17
## %bb.15:
	movl	4(%r14), %edx
	cmpl	$63, %edx
	jg	LBB0_23
## %bb.16:
	incl	%edx
	jmp	LBB0_20
LBB0_17:
	cmpl	$99, %eax
	jg	LBB0_23
## %bb.18:
	movl	4(%r14), %edx
	cmpl	$51, %edx
	jl	LBB0_23
## %bb.19:
	decl	%edx
LBB0_20:
	movl	%edx, 4(%r14)
LBB0_21:
	movq	%rbx, %rdi
	movq	%r14, %rsi
LBB0_22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rt2500pci_set_vgc              ## TAILCALL
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT2560_VERSION_D,8,3           ## @RT2560_VERSION_D
	.no_dead_strip	_rt2500pci_link_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500pci_link_tuner
_rt2500pci_link_tuner:                  ; @rt2500pci_link_tuner
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_rt2x00_rev
Lloh0:
	adrp	x22, _RT2560_VERSION_D@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RT2560_VERSION_D@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ge	LBB0_3
; %bb.1:
	cmp	w21, #21
	b.lt	LBB0_3
; %bb.2:
	ldr	x8, [x20]
	cbnz	x8, LBB0_23
LBB0_3:
	mov	x0, x20
	bl	_rt2x00_rev
	ldr	x8, [x22]
	cmp	x0, x8
	b.lt	LBB0_14
; %bb.4:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.5:
	ldr	w8, [x19]
	cmp	w21, #21
	b.lt	LBB0_9
; %bb.6:
	cmn	w8, #81
	b.gt	LBB0_9
; %bb.7:
	ldr	w8, [x19, #4]
	cmp	w8, #65
	b.lt	LBB0_23
LBB0_8:
	ldr	w2, [x19, #8]
	b	LBB0_21
LBB0_9:
	cmn	w8, #58
	b.lt	LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #80
	b	LBB0_22
LBB0_11:
	cmn	w8, #74
	b.lo	LBB0_13
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #65
	b	LBB0_22
LBB0_13:
	ldr	w8, [x19, #4]
	cmp	w8, #65
	b.ge	LBB0_8
LBB0_14:
	ldr	w8, [x19, #12]
	cmp	w8, #513
	b.lt	LBB0_17
; %bb.15:
	ldr	w8, [x19, #4]
	cmp	w8, #63
	b.gt	LBB0_23
; %bb.16:
	add	w2, w8, #1
	b	LBB0_20
LBB0_17:
	cmp	w8, #99
	b.gt	LBB0_23
; %bb.18:
	ldr	w8, [x19, #4]
	cmp	w8, #51
	b.lt	LBB0_23
; %bb.19:
	sub	w2, w8, #1
LBB0_20:
	str	w2, [x19, #4]
LBB0_21:
	mov	x0, x20
	mov	x1, x19
LBB0_22:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_rt2500pci_set_vgc
LBB0_23:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RT2560_VERSION_D,8,3           ; @RT2560_VERSION_D
	.no_dead_strip	_rt2500pci_link_tuner
.subsections_via_symbols
