	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt61pci_agc_to_rssi
_rt61pci_agc_to_rssi:                   ## @rt61pci_agc_to_rssi
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %r15d
	movq	_RXD_W1_RSSI_LNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field32
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	xorl	%ecx, %ecx
	cmpl	$2, %edx
	ja	LBB0_2
## %bb.1:
	movslq	%edx, %rcx
	leaq	l_switch.table.rt61pci_agc_to_rssi(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	leal	(%r15,%rcx), %edx
	movq	8(%rbx), %rsi
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdi
	andl	$-2, %eax
	cmpl	$2, %eax
	leal	10(%r15,%rcx), %ebx
	cmovnel	%edx, %ebx
	cmpq	(%rdi), %rsi
	cmovnel	%edx, %ebx
	movq	_RXD_W1_RSSI_AGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field32
	movl	%eax, %ecx
	addl	%eax, %ecx
	subl	%ebx, %ecx
LBB0_2:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RXD_W1_RSSI_LNA,4,2            ## @RXD_W1_RSSI_LNA
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_RXD_W1_RSSI_AGC,4,2            ## @RXD_W1_RSSI_AGC
	.no_dead_strip	_rt61pci_agc_to_rssi
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.rt61pci_agc_to_rssi
l_switch.table.rt61pci_agc_to_rssi:
	.long	64                              ## 0x40
	.long	74                              ## 0x4a
	.long	90                              ## 0x5a

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt61pci_agc_to_rssi
_rt61pci_agc_to_rssi:                   ; @rt61pci_agc_to_rssi
	.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	x19, x1
	mov	x20, x0
	ldr	w21, [x0]
Lloh0:
	adrp	x8, _RXD_W1_RSSI_LNA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RXD_W1_RSSI_LNA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_get_field32
	sub	w8, w0, #1
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, l_switch.table.rt61pci_agc_to_rssi@PAGE
Lloh4:
	add	x9, x9, l_switch.table.rt61pci_agc_to_rssi@PAGEOFF
	ldr	w8, [x9, w8, sxtw #2]
	add	w8, w21, w8
	ldr	x9, [x20, #8]
Lloh5:
	adrp	x10, _NL80211_BAND_5GHZ@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	and	w11, w0, #0xfffffffe
	cmp	w11, #2
	ccmp	x9, x10, #0, eq
	add	w9, w8, #10
	csel	w20, w9, w8, eq
Lloh8:
	adrp	x8, _RXD_W1_RSSI_AGC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RXD_W1_RSSI_AGC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_get_field32
	lsl	w8, w0, #1
	sub	w0, w8, w20
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RXD_W1_RSSI_LNA,4,2            ; @RXD_W1_RSSI_LNA
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_RXD_W1_RSSI_AGC,4,2            ; @RXD_W1_RSSI_AGC
	.no_dead_strip	_rt61pci_agc_to_rssi
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.rt61pci_agc_to_rssi
l_switch.table.rt61pci_agc_to_rssi:
	.long	64                              ; 0x40
	.long	74                              ; 0x4a
	.long	90                              ; 0x5a

.subsections_via_symbols
