	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_agc_to_rssi
_rt2800_agc_to_rssi:                    ## @rt2800_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_RXWI_W2_RSSI0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_RXWI_W2_RSSI1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_RXWI_W2_RSSI2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field32
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_EEPROM_RSSI_A@GOTPCREL(%rip), %rax
	cmoveq	_EEPROM_RSSI_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EEPROM_RSSI_A_OFFSET0@GOTPCREL(%rip), %r15
	cmoveq	_EEPROM_RSSI_BG_OFFSET0@GOTPCREL(%rip), %r15
	movq	_EEPROM_RSSI_A_OFFSET1@GOTPCREL(%rip), %r12
	cmoveq	_EEPROM_RSSI_BG_OFFSET1@GOTPCREL(%rip), %r12
	movq	_EEPROM_RSSI_A2@GOTPCREL(%rip), %r13
	cmoveq	_EEPROM_RSSI_BG2@GOTPCREL(%rip), %r13
	movq	_EEPROM_RSSI_A2_OFFSET2@GOTPCREL(%rip), %r14
	cmoveq	_EEPROM_RSSI_BG2_OFFSET2@GOTPCREL(%rip), %r14
	callq	_rt2800_eeprom_read
	movl	%eax, %ebx
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %esi
	movl	%ebx, %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	callq	_rt2x00_get_field16
	movl	%eax, %r15d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_rt2800_eeprom_read
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	$-128, %esi
	movl	$-128, %edi
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	addl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	addl	8(%rbx), %ecx
	movl	$-12, %edi
	subl	%ecx, %edi
LBB0_2:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	addl	%r15d, %ecx
	addl	8(%rbx), %ecx
	movl	$-12, %esi
	subl	%ecx, %esi
LBB0_4:
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.6:
	addl	%eax, %ecx
	addl	8(%rbx), %ecx
	movl	$-12, %ebx
	subl	%ecx, %ebx
	jmp	LBB0_7
LBB0_5:
	movl	$-128, %ebx
LBB0_7:
	callq	_max
	movl	%eax, %edi
	movl	%ebx, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_max                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RXWI_W2_RSSI0,4,2              ## @RXWI_W2_RSSI0
	.comm	_RXWI_W2_RSSI1,4,2              ## @RXWI_W2_RSSI1
	.comm	_RXWI_W2_RSSI2,4,2              ## @RXWI_W2_RSSI2
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_EEPROM_RSSI_BG,4,2             ## @EEPROM_RSSI_BG
	.comm	_EEPROM_RSSI_BG_OFFSET0,4,2     ## @EEPROM_RSSI_BG_OFFSET0
	.comm	_EEPROM_RSSI_BG_OFFSET1,4,2     ## @EEPROM_RSSI_BG_OFFSET1
	.comm	_EEPROM_RSSI_BG2,4,2            ## @EEPROM_RSSI_BG2
	.comm	_EEPROM_RSSI_BG2_OFFSET2,4,2    ## @EEPROM_RSSI_BG2_OFFSET2
	.comm	_EEPROM_RSSI_A,4,2              ## @EEPROM_RSSI_A
	.comm	_EEPROM_RSSI_A_OFFSET0,4,2      ## @EEPROM_RSSI_A_OFFSET0
	.comm	_EEPROM_RSSI_A_OFFSET1,4,2      ## @EEPROM_RSSI_A_OFFSET1
	.comm	_EEPROM_RSSI_A2,4,2             ## @EEPROM_RSSI_A2
	.comm	_EEPROM_RSSI_A2_OFFSET2,4,2     ## @EEPROM_RSSI_A2_OFFSET2
	.no_dead_strip	_rt2800_agc_to_rssi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_agc_to_rssi
_rt2800_agc_to_rssi:                    ; @rt2800_agc_to_rssi
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RXWI_W2_RSSI0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RXWI_W2_RSSI0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field32
	mov	x22, x0
Lloh3:
	adrp	x8, _RXWI_W2_RSSI1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RXWI_W2_RSSI1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field32
	mov	x21, x0
Lloh6:
	adrp	x8, _RXWI_W2_RSSI2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RXWI_W2_RSSI2@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field32
	mov	x20, x0
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh11:
	adrp	x10, _EEPROM_RSSI_BG@GOTPAGE
Lloh12:
	ldr	x10, [x10, _EEPROM_RSSI_BG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x11, _EEPROM_RSSI_A@GOTPAGE
Lloh15:
	ldr	x11, [x11, _EEPROM_RSSI_A@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _EEPROM_RSSI_BG_OFFSET0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EEPROM_RSSI_BG_OFFSET0@GOTPAGEOFF]
Lloh18:
	adrp	x9, _EEPROM_RSSI_A_OFFSET0@GOTPAGE
Lloh19:
	ldr	x9, [x9, _EEPROM_RSSI_A_OFFSET0@GOTPAGEOFF]
	csel	x24, x8, x9, eq
Lloh20:
	adrp	x8, _EEPROM_RSSI_BG_OFFSET1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EEPROM_RSSI_BG_OFFSET1@GOTPAGEOFF]
Lloh22:
	adrp	x9, _EEPROM_RSSI_A_OFFSET1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EEPROM_RSSI_A_OFFSET1@GOTPAGEOFF]
	csel	x25, x8, x9, eq
Lloh24:
	adrp	x8, _EEPROM_RSSI_BG2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EEPROM_RSSI_BG2@GOTPAGEOFF]
Lloh26:
	adrp	x9, _EEPROM_RSSI_A2@GOTPAGE
Lloh27:
	ldr	x9, [x9, _EEPROM_RSSI_A2@GOTPAGEOFF]
Lloh28:
	adrp	x10, _EEPROM_RSSI_BG2_OFFSET2@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EEPROM_RSSI_BG2_OFFSET2@GOTPAGEOFF]
	csel	x26, x8, x9, eq
Lloh30:
	adrp	x8, _EEPROM_RSSI_A2_OFFSET2@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EEPROM_RSSI_A2_OFFSET2@GOTPAGEOFF]
	csel	x27, x10, x8, eq
	mov	x0, x19
	bl	_rt2800_eeprom_read
	mov	x23, x0
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	mov	x24, x0
	ldr	w1, [x25]
	mov	x0, x23
	bl	_rt2x00_get_field16
	mov	x23, x0
	ldr	w1, [x26]
	mov	x0, x19
	bl	_rt2800_eeprom_read
	ldr	w1, [x27]
	bl	_rt2x00_get_field16
	mov	x8, x0
	cbz	w22, LBB0_4
; %bb.1:
	ldr	w9, [x19, #8]
	add	w10, w22, w24
	add	w9, w10, w9
	mov	w10, #-12
	sub	w0, w10, w9
	cbz	w21, LBB0_5
LBB0_2:
	ldr	w9, [x19, #8]
	add	w10, w21, w23
	add	w9, w10, w9
	mov	w10, #-12
	sub	w1, w10, w9
	cbz	w20, LBB0_6
LBB0_3:
	ldr	w9, [x19, #8]
	add	w8, w20, w8
	add	w8, w8, w9
	mov	w9, #-12
	sub	w19, w9, w8
	b	LBB0_7
LBB0_4:
	mov	w0, #-128
	cbnz	w21, LBB0_2
LBB0_5:
	mov	w1, #-128
	cbnz	w20, LBB0_3
LBB0_6:
	mov	w19, #-128
LBB0_7:
	bl	_max
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_max
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RXWI_W2_RSSI0,4,2              ; @RXWI_W2_RSSI0
	.comm	_RXWI_W2_RSSI1,4,2              ; @RXWI_W2_RSSI1
	.comm	_RXWI_W2_RSSI2,4,2              ; @RXWI_W2_RSSI2
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_EEPROM_RSSI_BG,4,2             ; @EEPROM_RSSI_BG
	.comm	_EEPROM_RSSI_BG_OFFSET0,4,2     ; @EEPROM_RSSI_BG_OFFSET0
	.comm	_EEPROM_RSSI_BG_OFFSET1,4,2     ; @EEPROM_RSSI_BG_OFFSET1
	.comm	_EEPROM_RSSI_BG2,4,2            ; @EEPROM_RSSI_BG2
	.comm	_EEPROM_RSSI_BG2_OFFSET2,4,2    ; @EEPROM_RSSI_BG2_OFFSET2
	.comm	_EEPROM_RSSI_A,4,2              ; @EEPROM_RSSI_A
	.comm	_EEPROM_RSSI_A_OFFSET0,4,2      ; @EEPROM_RSSI_A_OFFSET0
	.comm	_EEPROM_RSSI_A_OFFSET1,4,2      ; @EEPROM_RSSI_A_OFFSET1
	.comm	_EEPROM_RSSI_A2,4,2             ; @EEPROM_RSSI_A2
	.comm	_EEPROM_RSSI_A2_OFFSET2,4,2     ; @EEPROM_RSSI_A2_OFFSET2
	.no_dead_strip	_rt2800_agc_to_rssi
.subsections_via_symbols
