	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_init_eeprom
_rt2800_init_eeprom:                    ## @rt2800_init_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_EEPROM_NIC_CONF0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rt2800_eeprom_read
	movl	%eax, %r14d
	movq	_RT3290@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	_RT5390@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	_RT5392@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_RT6352@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_EEPROM_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2800_eeprom_read
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	leal	-128(%rax), %ecx
	cmpl	$24, %ecx
	jae	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_rt2x00_set_rf
	movq	_EEPROM_NIC_CONF0_TXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	movq	%rax, 56(%r15)
	movq	_EEPROM_NIC_CONF0_RXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	movq	%rax, 48(%r15)
	movq	_EEPROM_NIC_CONF1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, %r14d
	movq	_RT3070@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_15
## %bb.12:
	movq	_RT3090@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	_RT3352@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movq	_RT3390@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_18
LBB0_15:
	movq	_EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	cmpl	$3, %eax
	jae	LBB0_16
LBB0_18:
	movq	_ANTENNA_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	jmp	LBB0_19
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_rt2x00_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_39
LBB0_16:
	jne	LBB0_20
## %bb.17:
	movq	_ANTENNA_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	movq	_ANTENNA_B@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_19:
	movq	%rax, 32(%r15)
LBB0_20:
	movq	_RT5390@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_REV_RT5390R@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_rt2x00_rt_rev_gte
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:
	movl	(%rbx), %esi
	movq	_REV_RT5370G@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_rt2x00_rt_rev_gte
	testq	%rax, %rax
	je	LBB0_23
LBB0_22:
	movq	_ANTENNA_HW_DIVERSITY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	movq	%rax, 32(%r15)
LBB0_23:
	movq	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	_CAPABILITY_EXTERNAL_LNA_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_25:
	movq	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	_CAPABILITY_EXTERNAL_LNA_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_27:
	movq	_EEPROM_NIC_CONF1_HW_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	_CAPABILITY_HW_BUTTON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_29:
	movq	_RT3352@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	jne	LBB0_32
## %bb.30:
	movq	_EEPROM_NIC_CONF1_BT_COEXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:
	movq	_CAPABILITY_BT_COEXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_32:
	movq	_EEPROM_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2800_eeprom_read
	movq	_EEPROM_FREQ_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movq	%rax, 24(%r15)
	movq	_EEPROM_EIRP_MAX_TX_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2800_eeprom_read
	movq	_EEPROM_EIRP_MAX_TX_POWER_2GHZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movq	_EIRP_MAX_TX_POWER_LIMIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_34
## %bb.33:
	movq	_CAPABILITY_POWER_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_34:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_rt2800_eeprom_read
	movl	%eax, %r14d
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_39
## %bb.35:
	movq	_EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	_CAPABILITY_EXTERNAL_PA_TX0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r15), %rsi
	callq	___set_bit
LBB0_37:
	movq	_EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	testq	%rax, %rax
	je	LBB0_39
## %bb.38:
	movq	_CAPABILITY_EXTERNAL_PA_TX1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r15
	movq	%r15, %rsi
	callq	___set_bit
LBB0_39:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_RT3352@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	movq	%rax, %rcx
	movl	$138, %eax
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.6:
	movq	_RT3883@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	movq	%rax, %rcx
	movl	$137, %eax
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.7:
	movq	_RT5350@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_rt
	movq	%rax, %rcx
	movl	$136, %eax
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.8:
	movq	_EEPROM_NIC_CONF0_RF_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_rt2x00_get_field16
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_NIC_CONF0,4,2           ## @EEPROM_NIC_CONF0
	.comm	_RT3290,4,2                     ## @RT3290
	.comm	_RT5390,4,2                     ## @RT5390
	.comm	_RT5392,4,2                     ## @RT5392
	.comm	_RT6352,4,2                     ## @RT6352
	.comm	_EEPROM_CHIP_ID,4,2             ## @EEPROM_CHIP_ID
	.comm	_RT3352,4,2                     ## @RT3352
	.comm	_RT3883,4,2                     ## @RT3883
	.comm	_RT5350,4,2                     ## @RT5350
	.comm	_EEPROM_NIC_CONF0_RF_TYPE,4,2   ## @EEPROM_NIC_CONF0_RF_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid RF chipset 0x%04x detected\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EEPROM_NIC_CONF0_TXPATH,4,2    ## @EEPROM_NIC_CONF0_TXPATH
	.comm	_EEPROM_NIC_CONF0_RXPATH,4,2    ## @EEPROM_NIC_CONF0_RXPATH
	.comm	_EEPROM_NIC_CONF1,4,2           ## @EEPROM_NIC_CONF1
	.comm	_RT3070,4,2                     ## @RT3070
	.comm	_RT3090,4,2                     ## @RT3090
	.comm	_RT3390,4,2                     ## @RT3390
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ## @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_ANTENNA_A,8,3                  ## @ANTENNA_A
	.comm	_ANTENNA_B,8,3                  ## @ANTENNA_B
	.comm	_REV_RT5390R,4,2                ## @REV_RT5390R
	.comm	_REV_RT5370G,4,2                ## @REV_RT5370G
	.comm	_ANTENNA_HW_DIVERSITY,8,3       ## @ANTENNA_HW_DIVERSITY
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_LNA_5G
	.comm	_CAPABILITY_EXTERNAL_LNA_A,4,2  ## @CAPABILITY_EXTERNAL_LNA_A
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_LNA_2G
	.comm	_CAPABILITY_EXTERNAL_LNA_BG,4,2 ## @CAPABILITY_EXTERNAL_LNA_BG
	.comm	_EEPROM_NIC_CONF1_HW_RADIO,4,2  ## @EEPROM_NIC_CONF1_HW_RADIO
	.comm	_CAPABILITY_HW_BUTTON,4,2       ## @CAPABILITY_HW_BUTTON
	.comm	_EEPROM_NIC_CONF1_BT_COEXIST,4,2 ## @EEPROM_NIC_CONF1_BT_COEXIST
	.comm	_CAPABILITY_BT_COEXIST,4,2      ## @CAPABILITY_BT_COEXIST
	.comm	_EEPROM_FREQ,4,2                ## @EEPROM_FREQ
	.comm	_EEPROM_FREQ_OFFSET,4,2         ## @EEPROM_FREQ_OFFSET
	.comm	_EEPROM_EIRP_MAX_TX_POWER,4,2   ## @EEPROM_EIRP_MAX_TX_POWER
	.comm	_EEPROM_EIRP_MAX_TX_POWER_2GHZ,4,2 ## @EEPROM_EIRP_MAX_TX_POWER_2GHZ
	.comm	_EIRP_MAX_TX_POWER_LIMIT,8,3    ## @EIRP_MAX_TX_POWER_LIMIT
	.comm	_CAPABILITY_POWER_LIMIT,4,2     ## @CAPABILITY_POWER_LIMIT
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352
	.comm	_CAPABILITY_EXTERNAL_PA_TX0,4,2 ## @CAPABILITY_EXTERNAL_PA_TX0
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352,4,2 ## @EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352
	.comm	_CAPABILITY_EXTERNAL_PA_TX1,4,2 ## @CAPABILITY_EXTERNAL_PA_TX1
	.comm	_LED_TYPE_ASSOC,4,2             ## @LED_TYPE_ASSOC
	.comm	_LED_TYPE_QUALITY,4,2           ## @LED_TYPE_QUALITY
	.comm	_LED_TYPE_RADIO,4,2             ## @LED_TYPE_RADIO
	.no_dead_strip	_rt2800_init_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_init_eeprom
_rt2800_init_eeprom:                    ; @rt2800_init_eeprom
	.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	x19, x0
Lloh0:
	adrp	x8, _EEPROM_NIC_CONF0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EEPROM_NIC_CONF0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_rt2800_eeprom_read
	mov	x20, x0
Lloh3:
	adrp	x8, _RT3290@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RT3290@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _RT5390@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RT5390@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _RT5392@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RT5392@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _RT6352@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RT6352@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_36
LBB0_4:
Lloh15:
	adrp	x8, _EEPROM_CHIP_ID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EEPROM_CHIP_ID@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_eeprom_read
	mov	x2, x0
LBB0_5:
	sub	w8, w2, #128
	cmp	w8, #24
	b.hs	LBB0_12
LBB0_6:
	mov	x0, x19
	mov	x1, x2
	bl	_rt2x00_set_rf
Lloh18:
	adrp	x8, _EEPROM_NIC_CONF0_TXPATH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_TXPATH@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	str	x0, [x19, #56]
Lloh21:
	adrp	x8, _EEPROM_NIC_CONF0_RXPATH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_RXPATH@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	str	x0, [x19, #48]
Lloh24:
	adrp	x21, _EEPROM_NIC_CONF1@GOTPAGE
Lloh25:
	ldr	x21, [x21, _EEPROM_NIC_CONF1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2800_eeprom_read
	mov	x20, x0
Lloh26:
	adrp	x8, _RT3070@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RT3070@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
Lloh29:
	adrp	x22, _RT3352@GOTPAGE
Lloh30:
	ldr	x22, [x22, _RT3352@GOTPAGEOFF]
	cbnz	x0, LBB0_10
; %bb.7:
Lloh31:
	adrp	x8, _RT3090@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RT3090@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_10
; %bb.8:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_10
; %bb.9:
Lloh34:
	adrp	x8, _RT3390@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RT3390@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_11
LBB0_10:
Lloh37:
	adrp	x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cmp	w0, #3
	b.hs	LBB0_13
LBB0_11:
Lloh40:
	adrp	x8, _ANTENNA_A@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ANTENNA_A@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	str	x8, [x19, #40]
	b	LBB0_15
LBB0_12:
Lloh43:
	adrp	x1, l_.str@PAGE
Lloh44:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_rt2x00_err
Lloh45:
	adrp	x8, _ENODEV@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_35
LBB0_13:
	b.ne	LBB0_16
; %bb.14:
Lloh48:
	adrp	x8, _ANTENNA_A@GOTPAGE
Lloh49:
	ldr	x8, [x8, _ANTENNA_A@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	str	x8, [x19, #40]
Lloh51:
	adrp	x8, _ANTENNA_B@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ANTENNA_B@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
LBB0_15:
	str	x8, [x19, #32]
LBB0_16:
Lloh54:
	adrp	x23, _RT5390@GOTPAGE
Lloh55:
	ldr	x23, [x23, _RT5390@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh56:
	adrp	x8, _REV_RT5390R@GOTPAGE
Lloh57:
	ldr	x8, [x8, _REV_RT5390R@GOTPAGEOFF]
Lloh58:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rt2x00_rt_rev_gte
	cbnz	x0, LBB0_18
; %bb.17:
	ldr	w1, [x23]
Lloh59:
	adrp	x8, _REV_RT5370G@GOTPAGE
Lloh60:
	ldr	x8, [x8, _REV_RT5370G@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rt2x00_rt_rev_gte
	cbz	x0, LBB0_19
LBB0_18:
Lloh62:
	adrp	x8, _ANTENNA_HW_DIVERSITY@GOTPAGE
Lloh63:
	ldr	x8, [x8, _ANTENNA_HW_DIVERSITY@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #32]
LBB0_19:
Lloh65:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPAGE
Lloh66:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_5G@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_21
; %bb.20:
Lloh68:
	adrp	x8, _CAPABILITY_EXTERNAL_LNA_A@GOTPAGE
Lloh69:
	ldr	x8, [x8, _CAPABILITY_EXTERNAL_LNA_A@GOTPAGEOFF]
Lloh70:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_21:
Lloh71:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPAGE
Lloh72:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_LNA_2G@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_23
; %bb.22:
Lloh74:
	adrp	x8, _CAPABILITY_EXTERNAL_LNA_BG@GOTPAGE
Lloh75:
	ldr	x8, [x8, _CAPABILITY_EXTERNAL_LNA_BG@GOTPAGEOFF]
Lloh76:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_23:
Lloh77:
	adrp	x8, _EEPROM_NIC_CONF1_HW_RADIO@GOTPAGE
Lloh78:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_HW_RADIO@GOTPAGEOFF]
Lloh79:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_25
; %bb.24:
Lloh80:
	adrp	x8, _CAPABILITY_HW_BUTTON@GOTPAGE
Lloh81:
	ldr	x8, [x8, _CAPABILITY_HW_BUTTON@GOTPAGEOFF]
Lloh82:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_25:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00_rt
	cbnz	x0, LBB0_28
; %bb.26:
Lloh83:
	adrp	x8, _EEPROM_NIC_CONF1_BT_COEXIST@GOTPAGE
Lloh84:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_BT_COEXIST@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_28
; %bb.27:
Lloh86:
	adrp	x8, _CAPABILITY_BT_COEXIST@GOTPAGE
Lloh87:
	ldr	x8, [x8, _CAPABILITY_BT_COEXIST@GOTPAGEOFF]
Lloh88:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_28:
Lloh89:
	adrp	x8, _EEPROM_FREQ@GOTPAGE
Lloh90:
	ldr	x8, [x8, _EEPROM_FREQ@GOTPAGEOFF]
Lloh91:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_eeprom_read
Lloh92:
	adrp	x8, _EEPROM_FREQ_OFFSET@GOTPAGE
Lloh93:
	ldr	x8, [x8, _EEPROM_FREQ_OFFSET@GOTPAGEOFF]
Lloh94:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
	str	x0, [x19, #24]
Lloh95:
	adrp	x8, _EEPROM_EIRP_MAX_TX_POWER@GOTPAGE
Lloh96:
	ldr	x8, [x8, _EEPROM_EIRP_MAX_TX_POWER@GOTPAGEOFF]
Lloh97:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_eeprom_read
Lloh98:
	adrp	x8, _EEPROM_EIRP_MAX_TX_POWER_2GHZ@GOTPAGE
Lloh99:
	ldr	x8, [x8, _EEPROM_EIRP_MAX_TX_POWER_2GHZ@GOTPAGEOFF]
Lloh100:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
Lloh101:
	adrp	x8, _EIRP_MAX_TX_POWER_LIMIT@GOTPAGE
Lloh102:
	ldr	x8, [x8, _EIRP_MAX_TX_POWER_LIMIT@GOTPAGEOFF]
Lloh103:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_30
; %bb.29:
Lloh104:
	adrp	x8, _CAPABILITY_POWER_LIMIT@GOTPAGE
Lloh105:
	ldr	x8, [x8, _CAPABILITY_POWER_LIMIT@GOTPAGEOFF]
Lloh106:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_30:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2800_eeprom_read
	mov	x20, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_35
; %bb.31:
Lloh107:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352@GOTPAGE
Lloh108:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352@GOTPAGEOFF]
Lloh109:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_33
; %bb.32:
Lloh110:
	adrp	x8, _CAPABILITY_EXTERNAL_PA_TX0@GOTPAGE
Lloh111:
	ldr	x8, [x8, _CAPABILITY_EXTERNAL_PA_TX0@GOTPAGEOFF]
Lloh112:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
LBB0_33:
Lloh113:
	adrp	x8, _EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352@GOTPAGE
Lloh114:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352@GOTPAGEOFF]
Lloh115:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	cbz	x0, LBB0_35
; %bb.34:
Lloh116:
	adrp	x8, _CAPABILITY_EXTERNAL_PA_TX1@GOTPAGE
Lloh117:
	ldr	x8, [x8, _CAPABILITY_EXTERNAL_PA_TX1@GOTPAGEOFF]
Lloh118:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	___set_bit
	mov	w0, #0
LBB0_35:
	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
LBB0_36:
Lloh119:
	adrp	x8, _RT3352@GOTPAGE
Lloh120:
	ldr	x8, [x8, _RT3352@GOTPAGEOFF]
Lloh121:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_38
; %bb.37:
	mov	w2, #138
	b	LBB0_6
LBB0_38:
Lloh122:
	adrp	x8, _RT3883@GOTPAGE
Lloh123:
	ldr	x8, [x8, _RT3883@GOTPAGEOFF]
Lloh124:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_40
; %bb.39:
	mov	w2, #137
	b	LBB0_6
LBB0_40:
Lloh125:
	adrp	x8, _RT5350@GOTPAGE
Lloh126:
	ldr	x8, [x8, _RT5350@GOTPAGEOFF]
Lloh127:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_42
; %bb.41:
	mov	w2, #136
	b	LBB0_6
LBB0_42:
Lloh128:
	adrp	x8, _EEPROM_NIC_CONF0_RF_TYPE@GOTPAGE
Lloh129:
	ldr	x8, [x8, _EEPROM_NIC_CONF0_RF_TYPE@GOTPAGEOFF]
Lloh130:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rt2x00_get_field16
	mov	x2, x0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh119, Lloh120, Lloh121
	.loh AdrpLdrGotLdr	Lloh122, Lloh123, Lloh124
	.loh AdrpLdrGotLdr	Lloh125, Lloh126, Lloh127
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh130
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_NIC_CONF0,4,2           ; @EEPROM_NIC_CONF0
	.comm	_RT3290,4,2                     ; @RT3290
	.comm	_RT5390,4,2                     ; @RT5390
	.comm	_RT5392,4,2                     ; @RT5392
	.comm	_RT6352,4,2                     ; @RT6352
	.comm	_EEPROM_CHIP_ID,4,2             ; @EEPROM_CHIP_ID
	.comm	_RT3352,4,2                     ; @RT3352
	.comm	_RT3883,4,2                     ; @RT3883
	.comm	_RT5350,4,2                     ; @RT5350
	.comm	_EEPROM_NIC_CONF0_RF_TYPE,4,2   ; @EEPROM_NIC_CONF0_RF_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid RF chipset 0x%04x detected\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EEPROM_NIC_CONF0_TXPATH,4,2    ; @EEPROM_NIC_CONF0_TXPATH
	.comm	_EEPROM_NIC_CONF0_RXPATH,4,2    ; @EEPROM_NIC_CONF0_RXPATH
	.comm	_EEPROM_NIC_CONF1,4,2           ; @EEPROM_NIC_CONF1
	.comm	_RT3070,4,2                     ; @RT3070
	.comm	_RT3090,4,2                     ; @RT3090
	.comm	_RT3390,4,2                     ; @RT3390
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ; @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_ANTENNA_A,8,3                  ; @ANTENNA_A
	.comm	_ANTENNA_B,8,3                  ; @ANTENNA_B
	.comm	_REV_RT5390R,4,2                ; @REV_RT5390R
	.comm	_REV_RT5370G,4,2                ; @REV_RT5370G
	.comm	_ANTENNA_HW_DIVERSITY,8,3       ; @ANTENNA_HW_DIVERSITY
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_5G,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_LNA_5G
	.comm	_CAPABILITY_EXTERNAL_LNA_A,4,2  ; @CAPABILITY_EXTERNAL_LNA_A
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_LNA_2G,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_LNA_2G
	.comm	_CAPABILITY_EXTERNAL_LNA_BG,4,2 ; @CAPABILITY_EXTERNAL_LNA_BG
	.comm	_EEPROM_NIC_CONF1_HW_RADIO,4,2  ; @EEPROM_NIC_CONF1_HW_RADIO
	.comm	_CAPABILITY_HW_BUTTON,4,2       ; @CAPABILITY_HW_BUTTON
	.comm	_EEPROM_NIC_CONF1_BT_COEXIST,4,2 ; @EEPROM_NIC_CONF1_BT_COEXIST
	.comm	_CAPABILITY_BT_COEXIST,4,2      ; @CAPABILITY_BT_COEXIST
	.comm	_EEPROM_FREQ,4,2                ; @EEPROM_FREQ
	.comm	_EEPROM_FREQ_OFFSET,4,2         ; @EEPROM_FREQ_OFFSET
	.comm	_EEPROM_EIRP_MAX_TX_POWER,4,2   ; @EEPROM_EIRP_MAX_TX_POWER
	.comm	_EEPROM_EIRP_MAX_TX_POWER_2GHZ,4,2 ; @EEPROM_EIRP_MAX_TX_POWER_2GHZ
	.comm	_EIRP_MAX_TX_POWER_LIMIT,8,3    ; @EIRP_MAX_TX_POWER_LIMIT
	.comm	_CAPABILITY_POWER_LIMIT,4,2     ; @CAPABILITY_POWER_LIMIT
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352
	.comm	_CAPABILITY_EXTERNAL_PA_TX0,4,2 ; @CAPABILITY_EXTERNAL_PA_TX0
	.comm	_EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352,4,2 ; @EEPROM_NIC_CONF1_EXTERNAL_TX1_PA_3352
	.comm	_CAPABILITY_EXTERNAL_PA_TX1,4,2 ; @CAPABILITY_EXTERNAL_PA_TX1
	.comm	_LED_TYPE_ASSOC,4,2             ; @LED_TYPE_ASSOC
	.comm	_LED_TYPE_QUALITY,4,2           ; @LED_TYPE_QUALITY
	.comm	_LED_TYPE_RADIO,4,2             ; @LED_TYPE_RADIO
	.no_dead_strip	_rt2800_init_eeprom
.subsections_via_symbols
