	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_get_rx_gain            ## -- Begin function mt76x02_get_rx_gain
	.p2align	4, 0x90
_mt76x02_get_rx_gain:                   ## @mt76x02_get_rx_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_MT_EE_LNA_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mt76x02_eeprom_get
	movzbl	%al, %ecx
	movl	%ecx, (%r13)
	sarl	$8, %eax
	movl	%eax, (%rbx)
	movq	_MT_EE_RSSI_OFFSET_2G_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mt76x02_eeprom_get
	sarl	$8, %eax
	movl	%eax, 4(%rbx)
	movq	_MT_EE_RSSI_OFFSET_5G_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mt76x02_eeprom_get
	sarl	$8, %eax
	movl	%eax, 8(%rbx)
	movl	4(%rbx), %edi
	callq	_mt76x02_field_valid
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	movl	%eax, 4(%rbx)
LBB0_2:
	movl	8(%rbx), %edi
	callq	_mt76x02_field_valid
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%rbx), %eax
	movl	%eax, 8(%rbx)
LBB0_4:
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_MT_EE_RSSI_OFFSET_2G_0@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MT_EE_RSSI_OFFSET_5G_0@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mt76x02_eeprom_get
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_EE_LNA_GAIN,4,2             ## @MT_EE_LNA_GAIN
	.comm	_MT_EE_RSSI_OFFSET_2G_1,4,2     ## @MT_EE_RSSI_OFFSET_2G_1
	.comm	_MT_EE_RSSI_OFFSET_5G_1,4,2     ## @MT_EE_RSSI_OFFSET_5G_1
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
	.comm	_MT_EE_RSSI_OFFSET_2G_0,4,2     ## @MT_EE_RSSI_OFFSET_2G_0
	.comm	_MT_EE_RSSI_OFFSET_5G_0,4,2     ## @MT_EE_RSSI_OFFSET_5G_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_get_rx_gain            ; -- Begin function mt76x02_get_rx_gain
	.p2align	2
_mt76x02_get_rx_gain:                   ; @mt76x02_get_rx_gain
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x4
	mov	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MT_EE_LNA_GAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_EE_LNA_GAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mt76x02_eeprom_get
	and	w8, w0, #0xff
	str	w8, [x23]
	asr	w8, w0, #8
	str	w8, [x22]
Lloh3:
	adrp	x8, _MT_EE_RSSI_OFFSET_2G_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_EE_RSSI_OFFSET_2G_1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt76x02_eeprom_get
	asr	w8, w0, #8
	str	w8, [x22, #4]
Lloh6:
	adrp	x8, _MT_EE_RSSI_OFFSET_5G_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_EE_RSSI_OFFSET_5G_1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt76x02_eeprom_get
	asr	w8, w0, #8
	str	w8, [x22, #8]
	ldr	w0, [x22, #4]
	bl	_mt76x02_field_valid
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	str	w8, [x22, #4]
LBB0_2:
	ldr	w0, [x22, #8]
	bl	_mt76x02_field_valid
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w8, [x22]
	str	w8, [x22, #8]
LBB0_4:
Lloh9:
	adrp	x8, _NL80211_BAND_2GHZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh11:
	adrp	x9, _MT_EE_RSSI_OFFSET_2G_0@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MT_EE_RSSI_OFFSET_2G_0@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x10, _MT_EE_RSSI_OFFSET_5G_0@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MT_EE_RSSI_OFFSET_5G_0@GOTPAGEOFF]
	cmp	w8, w21
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mt76x02_eeprom_get
	str	w0, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_EE_LNA_GAIN,4,2             ; @MT_EE_LNA_GAIN
	.comm	_MT_EE_RSSI_OFFSET_2G_1,4,2     ; @MT_EE_RSSI_OFFSET_2G_1
	.comm	_MT_EE_RSSI_OFFSET_5G_1,4,2     ; @MT_EE_RSSI_OFFSET_5G_1
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
	.comm	_MT_EE_RSSI_OFFSET_2G_0,4,2     ; @MT_EE_RSSI_OFFSET_2G_0
	.comm	_MT_EE_RSSI_OFFSET_5G_0,4,2     ; @MT_EE_RSSI_OFFSET_5G_0
.subsections_via_symbols
