	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt73usb_config_lna_gain
_rt73usb_config_lna_gain:               ## @rt73usb_config_lna_gain
	.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	%rdi, %rbx
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_rt2x00_has_cap_external_lna_bg
	movq	%rax, %r14
	movq	_EEPROM_RSSI_OFFSET_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_read
	movq	_EEPROM_RSSI_OFFSET_BG_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movq	%rax, %rcx
	xorl	%edx, %edx
	testq	%r14, %r14
	movl	$14, %eax
	cmovel	%edx, %eax
	subl	%ecx, %eax
	jmp	LBB0_3
LBB0_2:
	movq	_EEPROM_RSSI_OFFSET_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_read
	movq	_EEPROM_RSSI_OFFSET_A_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	negl	%eax
LBB0_3:
	movw	%ax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_EEPROM_RSSI_OFFSET_BG,4,2      ## @EEPROM_RSSI_OFFSET_BG
	.comm	_EEPROM_RSSI_OFFSET_BG_1,4,2    ## @EEPROM_RSSI_OFFSET_BG_1
	.comm	_EEPROM_RSSI_OFFSET_A,4,2       ## @EEPROM_RSSI_OFFSET_A
	.comm	_EEPROM_RSSI_OFFSET_A_1,4,2     ## @EEPROM_RSSI_OFFSET_A_1
	.no_dead_strip	_rt73usb_config_lna_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt73usb_config_lna_gain
_rt73usb_config_lna_gain:               ; @rt73usb_config_lna_gain
	.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, x0
	ldr	x8, [x1]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_rt2x00_has_cap_external_lna_bg
	mov	x20, x0
Lloh3:
	adrp	x8, _EEPROM_RSSI_OFFSET_BG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EEPROM_RSSI_OFFSET_BG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_read
Lloh6:
	adrp	x8, _EEPROM_RSSI_OFFSET_BG_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEPROM_RSSI_OFFSET_BG_1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
	cmp	x20, #0
	mov	w8, #14
	csel	w8, wzr, w8, eq
	sub	w8, w8, w0
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _EEPROM_RSSI_OFFSET_A@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EEPROM_RSSI_OFFSET_A@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_read
Lloh12:
	adrp	x8, _EEPROM_RSSI_OFFSET_A_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EEPROM_RSSI_OFFSET_A_1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
	neg	w8, w0
LBB0_3:
	strh	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_EEPROM_RSSI_OFFSET_BG,4,2      ; @EEPROM_RSSI_OFFSET_BG
	.comm	_EEPROM_RSSI_OFFSET_BG_1,4,2    ; @EEPROM_RSSI_OFFSET_BG_1
	.comm	_EEPROM_RSSI_OFFSET_A,4,2       ; @EEPROM_RSSI_OFFSET_A
	.comm	_EEPROM_RSSI_OFFSET_A_1,4,2     ; @EEPROM_RSSI_OFFSET_A_1
	.no_dead_strip	_rt73usb_config_lna_gain
.subsections_via_symbols
