	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_validate_eeprom
_rt2800_validate_eeprom:                ## @rt2800_validate_eeprom
	.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
	movq	%rdi, %r12
	movq	(%rdi), %r14
	callq	_rt2800_read_eeprom
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_45
## %bb.1:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	_EEPROM_MAC_ADDR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_addr
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_rt2x00lib_set_mac_address
	movq	_EEPROM_NIC_CONF0@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_3
## %bb.2:
	movq	_EEPROM_NIC_CONF0_RXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF0_TXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF0_RF_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF2820@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rt2x00_set_field16
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_rt2x00_eeprom_dbg
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	movq	_RT2860@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_RT2872@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_EEPROM_NIC_CONF0_RXPATH@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_rt2x00_get_field16
	cmpl	$3, %eax
	jl	LBB0_7
## %bb.6:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdi
	movl	$2, %edx
	callq	_rt2x00_set_field16
	movl	-44(%rbp), %ebx
LBB0_7:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_rt2800_eeprom_write
LBB0_8:
	movq	_EEPROM_NIC_CONF1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_10
## %bb.9:
	movq	_EEPROM_NIC_CONF1_HW_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_EXTERNAL_TX_ALC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_CARDBUS_ACCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BW40M_SB_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BW40M_SB_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_WPS_PBC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BW40M_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BW40M_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BROADBAND_EXT_LNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_INTERNAL_TX_ALC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_BT_COEXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movq	_EEPROM_NIC_CONF1_DAC_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movl	-44(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_rt2x00_eeprom_dbg
LBB0_10:
	movq	_EEPROM_FREQ@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	cmpb	$-1, %al
	jne	LBB0_12
## %bb.11:
	movq	_EEPROM_FREQ_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movl	-44(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_rt2x00_eeprom_dbg
	movl	-44(%rbp), %eax
LBB0_12:
	notl	%eax
	testl	$65280, %eax                    ## imm = 0xFF00
	jne	LBB0_14
## %bb.13:
	movq	_EEPROM_FREQ_LED_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LED_MODE_TXRX_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_rt2x00_set_field16
	movq	_EEPROM_FREQ_LED_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movq	_EEPROM_LED_AG_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$21845, %edx                    ## imm = 0x5555
	callq	_rt2800_eeprom_write
	movq	_EEPROM_LED_ACT_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$8737, %edx                     ## imm = 0x2221
	callq	_rt2800_eeprom_write
	movq	_EEPROM_LED_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$43512, %edx                    ## imm = 0xA9F8
	callq	_rt2800_eeprom_write
	movl	-44(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_rt2x00_eeprom_dbg
LBB0_14:
	movq	_EEPROM_LNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_LNA_A0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_EEPROM_RSSI_BG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_RSSI_BG_OFFSET0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_16
## %bb.15:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_16:
	movl	-44(%rbp), %edi
	movq	_EEPROM_RSSI_BG_OFFSET1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_18
## %bb.17:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_18:
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movq	%r12, %rdi
	callq	_rt2800_get_txmixer_gain_24g
	movq	%r14, %r13
	movl	%eax, 4(%r14)
	movq	_EEPROM_RSSI_BG2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_RSSI_BG2_OFFSET2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_20
## %bb.19:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_20:
	movq	_RT3593@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_25
## %bb.21:
	movq	_RT3883@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_25
## %bb.22:
	movl	-44(%rbp), %edi
	movq	_EEPROM_RSSI_BG2_LNA_A1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	-44(%rbp), %edi
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	cmpl	$255, %eax
	jne	LBB0_25
LBB0_24:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_rt2x00_set_field16
LBB0_25:
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movq	%r12, %rdi
	callq	_rt2800_get_txmixer_gain_5g
	movl	%eax, (%r13)
	movq	_EEPROM_RSSI_A@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_RSSI_A_OFFSET0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_27
## %bb.26:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_27:
	movl	-44(%rbp), %edi
	movq	_EEPROM_RSSI_A_OFFSET1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_29
## %bb.28:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_29:
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movq	_EEPROM_RSSI_A2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_RSSI_A2_OFFSET2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	$11, %ecx
	jb	LBB0_31
## %bb.30:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
LBB0_31:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_36
## %bb.32:
	movq	_RT3883@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_36
## %bb.33:
	movl	-44(%rbp), %edi
	movq	_EEPROM_RSSI_A2_LNA_A2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	testl	%eax, %eax
	je	LBB0_35
## %bb.34:
	movl	-44(%rbp), %edi
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	cmpl	$255, %eax
	jne	LBB0_36
LBB0_35:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_rt2x00_set_field16
LBB0_36:
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_38
## %bb.37:
	movq	_RT3883@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_45
LBB0_38:
	movq	_EEPROM_EXT_LNA2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, -44(%rbp)
	movq	_EEPROM_EXT_LNA2_A1@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	testl	%eax, %eax
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_40
## %bb.39:
	movl	-44(%rbp), %edi
	movl	(%r13), %esi
	callq	_rt2x00_get_field16
	cmpl	$255, %eax
	jne	LBB0_41
LBB0_40:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field16
LBB0_41:
	movl	-44(%rbp), %edi
	movq	_EEPROM_EXT_LNA2_A2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	testl	%eax, %eax
	je	LBB0_43
## %bb.42:
	movl	-44(%rbp), %edi
	movl	(%rbx), %esi
	callq	_rt2x00_get_field16
	cmpl	$255, %eax
	jne	LBB0_44
LBB0_43:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field16
LBB0_44:
	movl	(%r15), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_eeprom_write
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_45:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_MAC_ADDR_0,4,2          ## @EEPROM_MAC_ADDR_0
	.comm	_EEPROM_NIC_CONF0,4,2           ## @EEPROM_NIC_CONF0
	.comm	_EEPROM_NIC_CONF0_RXPATH,4,2    ## @EEPROM_NIC_CONF0_RXPATH
	.comm	_EEPROM_NIC_CONF0_TXPATH,4,2    ## @EEPROM_NIC_CONF0_TXPATH
	.comm	_EEPROM_NIC_CONF0_RF_TYPE,4,2   ## @EEPROM_NIC_CONF0_RF_TYPE
	.comm	_RF2820,4,2                     ## @RF2820
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Antenna: 0x%04x\n"

	.comm	_RT2860,4,2                     ## @RT2860
	.comm	_RT2872,4,2                     ## @RT2872
	.comm	_EEPROM_NIC_CONF1,4,2           ## @EEPROM_NIC_CONF1
	.comm	_EEPROM_NIC_CONF1_HW_RADIO,4,2  ## @EEPROM_NIC_CONF1_HW_RADIO
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX_ALC,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_TX_ALC
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_LNA_2G
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_LNA_5G
	.comm	_EEPROM_NIC_CONF1_CARDBUS_ACCEL,4,2 ## @EEPROM_NIC_CONF1_CARDBUS_ACCEL
	.comm	_EEPROM_NIC_CONF1_BW40M_SB_2G,4,2 ## @EEPROM_NIC_CONF1_BW40M_SB_2G
	.comm	_EEPROM_NIC_CONF1_BW40M_SB_5G,4,2 ## @EEPROM_NIC_CONF1_BW40M_SB_5G
	.comm	_EEPROM_NIC_CONF1_WPS_PBC,4,2   ## @EEPROM_NIC_CONF1_WPS_PBC
	.comm	_EEPROM_NIC_CONF1_BW40M_2G,4,2  ## @EEPROM_NIC_CONF1_BW40M_2G
	.comm	_EEPROM_NIC_CONF1_BW40M_5G,4,2  ## @EEPROM_NIC_CONF1_BW40M_5G
	.comm	_EEPROM_NIC_CONF1_BROADBAND_EXT_LNA,4,2 ## @EEPROM_NIC_CONF1_BROADBAND_EXT_LNA
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ## @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_EEPROM_NIC_CONF1_INTERNAL_TX_ALC,4,2 ## @EEPROM_NIC_CONF1_INTERNAL_TX_ALC
	.comm	_EEPROM_NIC_CONF1_BT_COEXIST,4,2 ## @EEPROM_NIC_CONF1_BT_COEXIST
	.comm	_EEPROM_NIC_CONF1_DAC_TEST,4,2  ## @EEPROM_NIC_CONF1_DAC_TEST
L_.str.1:                               ## @.str.1
	.asciz	"NIC: 0x%04x\n"

	.comm	_EEPROM_FREQ,4,2                ## @EEPROM_FREQ
	.comm	_EEPROM_FREQ_OFFSET,4,2         ## @EEPROM_FREQ_OFFSET
L_.str.2:                               ## @.str.2
	.asciz	"Freq: 0x%04x\n"

	.comm	_EEPROM_FREQ_LED_MODE,4,2       ## @EEPROM_FREQ_LED_MODE
	.comm	_LED_MODE_TXRX_ACTIVITY,4,2     ## @LED_MODE_TXRX_ACTIVITY
	.comm	_EEPROM_FREQ_LED_POLARITY,4,2   ## @EEPROM_FREQ_LED_POLARITY
	.comm	_EEPROM_LED_AG_CONF,4,2         ## @EEPROM_LED_AG_CONF
	.comm	_EEPROM_LED_ACT_CONF,4,2        ## @EEPROM_LED_ACT_CONF
	.comm	_EEPROM_LED_POLARITY,4,2        ## @EEPROM_LED_POLARITY
L_.str.3:                               ## @.str.3
	.asciz	"Led Mode: 0x%04x\n"

	.comm	_EEPROM_LNA,4,2                 ## @EEPROM_LNA
	.comm	_EEPROM_LNA_A0,4,2              ## @EEPROM_LNA_A0
	.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	_RT3593,4,2                     ## @RT3593
	.comm	_RT3883,4,2                     ## @RT3883
	.comm	_EEPROM_RSSI_BG2_LNA_A1,4,2     ## @EEPROM_RSSI_BG2_LNA_A1
	.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
	.comm	_EEPROM_RSSI_A2_LNA_A2,4,2      ## @EEPROM_RSSI_A2_LNA_A2
	.comm	_EEPROM_EXT_LNA2,4,2            ## @EEPROM_EXT_LNA2
	.comm	_EEPROM_EXT_LNA2_A1,4,2         ## @EEPROM_EXT_LNA2_A1
	.comm	_EEPROM_EXT_LNA2_A2,4,2         ## @EEPROM_EXT_LNA2_A2
	.no_dead_strip	_rt2800_validate_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_validate_eeprom
_rt2800_validate_eeprom:                ; @rt2800_validate_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
	ldr	x22, [x0]
	bl	_rt2800_read_eeprom
	mov	x19, x0
	cbnz	w0, LBB0_45
; %bb.1:
Lloh0:
	adrp	x8, _EEPROM_MAC_ADDR_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EEPROM_MAC_ADDR_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2800_eeprom_addr
	mov	x1, x0
	mov	x0, x20
	bl	_rt2x00lib_set_mac_address
Lloh3:
	adrp	x23, _EEPROM_NIC_CONF0@GOTPAGE
Lloh4:
	ldr	x23, [x23, _EEPROM_NIC_CONF0@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _EEPROM_NIC_CONF0_RXPATH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_RXPATH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #2
	bl	_rt2x00_set_field16
Lloh8:
	adrp	x8, _EEPROM_NIC_CONF0_TXPATH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_TXPATH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field16
Lloh11:
	adrp	x8, _EEPROM_NIC_CONF0_RF_TYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_RF_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _RF2820@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RF2820@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_rt2x00_set_field16
	ldr	w1, [x23]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	ldr	w2, [sp, #12]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_rt2x00_eeprom_dbg
	b	LBB0_8
LBB0_3:
	mov	x21, x0
Lloh19:
	adrp	x8, _RT2860@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RT2860@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_5
; %bb.4:
Lloh22:
	adrp	x8, _RT2872@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RT2872@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_rt
	cbz	x0, LBB0_8
LBB0_5:
Lloh25:
	adrp	x24, _EEPROM_NIC_CONF0_RXPATH@GOTPAGE
Lloh26:
	ldr	x24, [x24, _EEPROM_NIC_CONF0_RXPATH@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_rt2x00_get_field16
	cmp	w0, #3
	b.lt	LBB0_7
; %bb.6:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #2
	bl	_rt2x00_set_field16
	ldr	w21, [sp, #12]
LBB0_7:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_rt2800_eeprom_write
LBB0_8:
Lloh27:
	adrp	x21, _EEPROM_NIC_CONF1@GOTPAGE
Lloh28:
	ldr	x21, [x21, _EEPROM_NIC_CONF1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.9:
Lloh29:
	adrp	x8, _EEPROM_NIC_CONF1_HW_RADIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_HW_RADIO@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh32:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_TX_ALC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_TX_ALC@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh35:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh38:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh41:
	adrp	x8, _EEPROM_NIC_CONF1_CARDBUS_ACCEL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_CARDBUS_ACCEL@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh44:
	adrp	x8, _EEPROM_NIC_CONF1_BW40M_SB_2G@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BW40M_SB_2G@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh47:
	adrp	x8, _EEPROM_NIC_CONF1_BW40M_SB_5G@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BW40M_SB_5G@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh50:
	adrp	x8, _EEPROM_NIC_CONF1_WPS_PBC@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_WPS_PBC@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh53:
	adrp	x8, _EEPROM_NIC_CONF1_BW40M_2G@GOTPAGE
Lloh54:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BW40M_2G@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh56:
	adrp	x8, _EEPROM_NIC_CONF1_BW40M_5G@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BW40M_5G@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh59:
	adrp	x8, _EEPROM_NIC_CONF1_BROADBAND_EXT_LNA@GOTPAGE
Lloh60:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BROADBAND_EXT_LNA@GOTPAGEOFF]
Lloh61:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh62:
	adrp	x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGE
Lloh63:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGEOFF]
Lloh64:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh65:
	adrp	x8, _EEPROM_NIC_CONF1_INTERNAL_TX_ALC@GOTPAGE
Lloh66:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_INTERNAL_TX_ALC@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh68:
	adrp	x8, _EEPROM_NIC_CONF1_BT_COEXIST@GOTPAGE
Lloh69:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BT_COEXIST@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
Lloh71:
	adrp	x8, _EEPROM_NIC_CONF1_DAC_TEST@GOTPAGE
Lloh72:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_DAC_TEST@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	ldr	w2, [sp, #12]
Lloh74:
	adrp	x1, l_.str.1@PAGE
Lloh75:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_rt2x00_eeprom_dbg
LBB0_10:
Lloh76:
	adrp	x21, _EEPROM_FREQ@GOTPAGE
Lloh77:
	ldr	x21, [x21, _EEPROM_FREQ@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	mvn	w8, w0
	str	w0, [sp, #12]
	tst	w8, #0xff
	b.ne	LBB0_12
; %bb.11:
Lloh78:
	adrp	x8, _EEPROM_FREQ_OFFSET@GOTPAGE
Lloh79:
	ldr	x8, [x8, _EEPROM_FREQ_OFFSET@GOTPAGEOFF]
Lloh80:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	ldr	w2, [sp, #12]
Lloh81:
	adrp	x1, l_.str.2@PAGE
Lloh82:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_rt2x00_eeprom_dbg
	ldr	w0, [sp, #12]
LBB0_12:
	mvn	w8, w0
	tst	w8, #0xff00
	b.ne	LBB0_14
; %bb.13:
Lloh83:
	adrp	x8, _EEPROM_FREQ_LED_MODE@GOTPAGE
Lloh84:
	ldr	x8, [x8, _EEPROM_FREQ_LED_MODE@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
Lloh86:
	adrp	x8, _LED_MODE_TXRX_ACTIVITY@GOTPAGE
Lloh87:
	ldr	x8, [x8, _LED_MODE_TXRX_ACTIVITY@GOTPAGEOFF]
Lloh88:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_rt2x00_set_field16
Lloh89:
	adrp	x8, _EEPROM_FREQ_LED_POLARITY@GOTPAGE
Lloh90:
	ldr	x8, [x8, _EEPROM_FREQ_LED_POLARITY@GOTPAGEOFF]
Lloh91:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
Lloh92:
	adrp	x8, _EEPROM_LED_AG_CONF@GOTPAGE
Lloh93:
	ldr	x8, [x8, _EEPROM_LED_AG_CONF@GOTPAGEOFF]
Lloh94:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #21845
	bl	_rt2800_eeprom_write
Lloh95:
	adrp	x8, _EEPROM_LED_ACT_CONF@GOTPAGE
Lloh96:
	ldr	x8, [x8, _EEPROM_LED_ACT_CONF@GOTPAGEOFF]
Lloh97:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #8737
	bl	_rt2800_eeprom_write
Lloh98:
	adrp	x8, _EEPROM_LED_POLARITY@GOTPAGE
Lloh99:
	ldr	x8, [x8, _EEPROM_LED_POLARITY@GOTPAGEOFF]
Lloh100:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #43512
	bl	_rt2800_eeprom_write
	ldr	w2, [sp, #12]
Lloh101:
	adrp	x1, l_.str.3@PAGE
Lloh102:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_rt2x00_eeprom_dbg
LBB0_14:
Lloh103:
	adrp	x8, _EEPROM_LNA@GOTPAGE
Lloh104:
	ldr	x8, [x8, _EEPROM_LNA@GOTPAGEOFF]
Lloh105:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh106:
	adrp	x8, _EEPROM_LNA_A0@GOTPAGE
Lloh107:
	ldr	x8, [x8, _EEPROM_LNA_A0@GOTPAGEOFF]
Lloh108:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
	mov	x21, x0
Lloh109:
	adrp	x23, _EEPROM_RSSI_BG@GOTPAGE
Lloh110:
	ldr	x23, [x23, _EEPROM_RSSI_BG@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh111:
	adrp	x24, _EEPROM_RSSI_BG_OFFSET0@GOTPAGE
Lloh112:
	ldr	x24, [x24, _EEPROM_RSSI_BG_OFFSET0@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_16
; %bb.15:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_16:
	ldr	w0, [sp, #12]
Lloh113:
	adrp	x24, _EEPROM_RSSI_BG_OFFSET1@GOTPAGE
Lloh114:
	ldr	x24, [x24, _EEPROM_RSSI_BG_OFFSET1@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_18
; %bb.17:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_18:
	ldr	w1, [x23]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	mov	x0, x20
	bl	_rt2800_get_txmixer_gain_24g
	str	w0, [x22, #4]
Lloh115:
	adrp	x24, _EEPROM_RSSI_BG2@GOTPAGE
Lloh116:
	ldr	x24, [x24, _EEPROM_RSSI_BG2@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh117:
	adrp	x23, _EEPROM_RSSI_BG2_OFFSET2@GOTPAGE
Lloh118:
	ldr	x23, [x23, _EEPROM_RSSI_BG2_OFFSET2@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_20
; %bb.19:
	ldr	w1, [x23]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_20:
Lloh119:
	adrp	x23, _RT3593@GOTPAGE
Lloh120:
	ldr	x23, [x23, _RT3593@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_25
; %bb.21:
Lloh121:
	adrp	x8, _RT3883@GOTPAGE
Lloh122:
	ldr	x8, [x8, _RT3883@GOTPAGEOFF]
Lloh123:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_25
; %bb.22:
	ldr	w0, [sp, #12]
Lloh124:
	adrp	x25, _EEPROM_RSSI_BG2_LNA_A1@GOTPAGE
Lloh125:
	ldr	x25, [x25, _EEPROM_RSSI_BG2_LNA_A1@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_rt2x00_get_field16
	cbz	w0, LBB0_24
; %bb.23:
	ldr	w0, [sp, #12]
	ldr	w1, [x25]
	bl	_rt2x00_get_field16
	cmp	w0, #255
	b.ne	LBB0_25
LBB0_24:
	ldr	w1, [x25]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field16
LBB0_25:
	ldr	w1, [x24]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	mov	x0, x20
	bl	_rt2800_get_txmixer_gain_5g
	str	w0, [x22]
Lloh126:
	adrp	x22, _EEPROM_RSSI_A@GOTPAGE
Lloh127:
	ldr	x22, [x22, _EEPROM_RSSI_A@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh128:
	adrp	x24, _EEPROM_RSSI_A_OFFSET0@GOTPAGE
Lloh129:
	ldr	x24, [x24, _EEPROM_RSSI_A_OFFSET0@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_27
; %bb.26:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_27:
	ldr	w0, [sp, #12]
Lloh130:
	adrp	x24, _EEPROM_RSSI_A_OFFSET1@GOTPAGE
Lloh131:
	ldr	x24, [x24, _EEPROM_RSSI_A_OFFSET1@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_29
; %bb.28:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_29:
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
Lloh132:
	adrp	x22, _EEPROM_RSSI_A2@GOTPAGE
Lloh133:
	ldr	x22, [x22, _EEPROM_RSSI_A2@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh134:
	adrp	x24, _EEPROM_RSSI_A2_OFFSET2@GOTPAGE
Lloh135:
	ldr	x24, [x24, _EEPROM_RSSI_A2_OFFSET2@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #0
	cneg	w8, w0, mi
	cmp	w8, #11
	b.lo	LBB0_31
; %bb.30:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
LBB0_31:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_36
; %bb.32:
Lloh136:
	adrp	x8, _RT3883@GOTPAGE
Lloh137:
	ldr	x8, [x8, _RT3883@GOTPAGEOFF]
Lloh138:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_36
; %bb.33:
	ldr	w0, [sp, #12]
Lloh139:
	adrp	x24, _EEPROM_RSSI_A2_LNA_A2@GOTPAGE
Lloh140:
	ldr	x24, [x24, _EEPROM_RSSI_A2_LNA_A2@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cbz	w0, LBB0_35
; %bb.34:
	ldr	w0, [sp, #12]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #255
	b.ne	LBB0_36
LBB0_35:
	ldr	w1, [x24]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field16
LBB0_36:
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
	ldr	w1, [x23]
	mov	x0, x20
	bl	_rt2x00_rt
	cbnz	x0, LBB0_38
; %bb.37:
Lloh141:
	adrp	x8, _RT3883@GOTPAGE
Lloh142:
	ldr	x8, [x8, _RT3883@GOTPAGEOFF]
Lloh143:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_rt
	cbz	x0, LBB0_45
LBB0_38:
Lloh144:
	adrp	x22, _EEPROM_EXT_LNA2@GOTPAGE
Lloh145:
	ldr	x22, [x22, _EEPROM_EXT_LNA2@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_eeprom_read
	str	w0, [sp, #12]
Lloh146:
	adrp	x23, _EEPROM_EXT_LNA2_A1@GOTPAGE
Lloh147:
	ldr	x23, [x23, _EEPROM_EXT_LNA2_A1@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_rt2x00_get_field16
	cbz	w0, LBB0_40
; %bb.39:
	ldr	w0, [sp, #12]
	ldr	w1, [x23]
	bl	_rt2x00_get_field16
	cmp	w0, #255
	b.ne	LBB0_41
LBB0_40:
	ldr	w1, [x23]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field16
LBB0_41:
	ldr	w0, [sp, #12]
Lloh148:
	adrp	x24, _EEPROM_EXT_LNA2_A2@GOTPAGE
Lloh149:
	ldr	x24, [x24, _EEPROM_EXT_LNA2_A2@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cbz	w0, LBB0_43
; %bb.42:
	ldr	w0, [sp, #12]
	ldr	w1, [x24]
	bl	_rt2x00_get_field16
	cmp	w0, #255
	b.ne	LBB0_44
LBB0_43:
	ldr	w1, [x23]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field16
LBB0_44:
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_eeprom_write
LBB0_45:
	mov	x0, 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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh111, Lloh112
	.loh AdrpLdrGot	Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpLdrGot	Lloh113, Lloh114
	.loh AdrpLdrGot	Lloh117, Lloh118
	.loh AdrpLdrGot	Lloh115, Lloh116
	.loh AdrpLdrGot	Lloh119, Lloh120
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGot	Lloh124, Lloh125
	.loh AdrpLdrGot	Lloh128, Lloh129
	.loh AdrpLdrGot	Lloh126, Lloh127
	.loh AdrpLdrGot	Lloh130, Lloh131
	.loh AdrpLdrGot	Lloh134, Lloh135
	.loh AdrpLdrGot	Lloh132, Lloh133
	.loh AdrpLdrGotLdr	Lloh136, Lloh137, Lloh138
	.loh AdrpLdrGot	Lloh139, Lloh140
	.loh AdrpLdrGotLdr	Lloh141, Lloh142, Lloh143
	.loh AdrpLdrGot	Lloh146, Lloh147
	.loh AdrpLdrGot	Lloh144, Lloh145
	.loh AdrpLdrGot	Lloh148, Lloh149
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_MAC_ADDR_0,4,2          ; @EEPROM_MAC_ADDR_0
	.comm	_EEPROM_NIC_CONF0,4,2           ; @EEPROM_NIC_CONF0
	.comm	_EEPROM_NIC_CONF0_RXPATH,4,2    ; @EEPROM_NIC_CONF0_RXPATH
	.comm	_EEPROM_NIC_CONF0_TXPATH,4,2    ; @EEPROM_NIC_CONF0_TXPATH
	.comm	_EEPROM_NIC_CONF0_RF_TYPE,4,2   ; @EEPROM_NIC_CONF0_RF_TYPE
	.comm	_RF2820,4,2                     ; @RF2820
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Antenna: 0x%04x\n"

	.comm	_RT2860,4,2                     ; @RT2860
	.comm	_RT2872,4,2                     ; @RT2872
	.comm	_EEPROM_NIC_CONF1,4,2           ; @EEPROM_NIC_CONF1
	.comm	_EEPROM_NIC_CONF1_HW_RADIO,4,2  ; @EEPROM_NIC_CONF1_HW_RADIO
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX_ALC,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_TX_ALC
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_LNA_2G
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_LNA_5G
	.comm	_EEPROM_NIC_CONF1_CARDBUS_ACCEL,4,2 ; @EEPROM_NIC_CONF1_CARDBUS_ACCEL
	.comm	_EEPROM_NIC_CONF1_BW40M_SB_2G,4,2 ; @EEPROM_NIC_CONF1_BW40M_SB_2G
	.comm	_EEPROM_NIC_CONF1_BW40M_SB_5G,4,2 ; @EEPROM_NIC_CONF1_BW40M_SB_5G
	.comm	_EEPROM_NIC_CONF1_WPS_PBC,4,2   ; @EEPROM_NIC_CONF1_WPS_PBC
	.comm	_EEPROM_NIC_CONF1_BW40M_2G,4,2  ; @EEPROM_NIC_CONF1_BW40M_2G
	.comm	_EEPROM_NIC_CONF1_BW40M_5G,4,2  ; @EEPROM_NIC_CONF1_BW40M_5G
	.comm	_EEPROM_NIC_CONF1_BROADBAND_EXT_LNA,4,2 ; @EEPROM_NIC_CONF1_BROADBAND_EXT_LNA
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ; @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_EEPROM_NIC_CONF1_INTERNAL_TX_ALC,4,2 ; @EEPROM_NIC_CONF1_INTERNAL_TX_ALC
	.comm	_EEPROM_NIC_CONF1_BT_COEXIST,4,2 ; @EEPROM_NIC_CONF1_BT_COEXIST
	.comm	_EEPROM_NIC_CONF1_DAC_TEST,4,2  ; @EEPROM_NIC_CONF1_DAC_TEST
l_.str.1:                               ; @.str.1
	.asciz	"NIC: 0x%04x\n"

	.comm	_EEPROM_FREQ,4,2                ; @EEPROM_FREQ
	.comm	_EEPROM_FREQ_OFFSET,4,2         ; @EEPROM_FREQ_OFFSET
l_.str.2:                               ; @.str.2
	.asciz	"Freq: 0x%04x\n"

	.comm	_EEPROM_FREQ_LED_MODE,4,2       ; @EEPROM_FREQ_LED_MODE
	.comm	_LED_MODE_TXRX_ACTIVITY,4,2     ; @LED_MODE_TXRX_ACTIVITY
	.comm	_EEPROM_FREQ_LED_POLARITY,4,2   ; @EEPROM_FREQ_LED_POLARITY
	.comm	_EEPROM_LED_AG_CONF,4,2         ; @EEPROM_LED_AG_CONF
	.comm	_EEPROM_LED_ACT_CONF,4,2        ; @EEPROM_LED_ACT_CONF
	.comm	_EEPROM_LED_POLARITY,4,2        ; @EEPROM_LED_POLARITY
l_.str.3:                               ; @.str.3
	.asciz	"Led Mode: 0x%04x\n"

	.comm	_EEPROM_LNA,4,2                 ; @EEPROM_LNA
	.comm	_EEPROM_LNA_A0,4,2              ; @EEPROM_LNA_A0
	.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	_RT3593,4,2                     ; @RT3593
	.comm	_RT3883,4,2                     ; @RT3883
	.comm	_EEPROM_RSSI_BG2_LNA_A1,4,2     ; @EEPROM_RSSI_BG2_LNA_A1
	.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
	.comm	_EEPROM_RSSI_A2_LNA_A2,4,2      ; @EEPROM_RSSI_A2_LNA_A2
	.comm	_EEPROM_EXT_LNA2,4,2            ; @EEPROM_EXT_LNA2
	.comm	_EEPROM_EXT_LNA2_A1,4,2         ; @EEPROM_EXT_LNA2_A1
	.comm	_EEPROM_EXT_LNA2_A2,4,2         ; @EEPROM_EXT_LNA2_A2
	.no_dead_strip	_rt2800_validate_eeprom
.subsections_via_symbols
