	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2400pci_validate_eeprom
_rt2400pci_validate_eeprom:             ## @rt2400pci_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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CSR21@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rt2x00mmio_register_read
	movq	%rbx, -16(%rbp)
	movq	_rt2400pci_eepromregister_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -24(%rbp)
	movq	_rt2400pci_eepromregister_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -28(%rbp)
	movq	_CSR21_TYPE_93C46@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field32
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_PCI_EEPROM_WIDTH_93C66@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PCI_EEPROM_WIDTH_93C46@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -48(%rbp)
	movq	_EEPROM_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	_EEPROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	sarl	$2, %ecx
	leaq	-64(%rbp), %rdi
	callq	_eeprom_93cx6_multiread
	movq	_EEPROM_MAC_ADDR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_addr
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_rt2x00lib_set_mac_address
	movq	_EEPROM_ANTENNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_read
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_rt2x00_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR21,4,2                      ## @CSR21
	.comm	_rt2400pci_eepromregister_read,4,2 ## @rt2400pci_eepromregister_read
	.comm	_rt2400pci_eepromregister_write,4,2 ## @rt2400pci_eepromregister_write
	.comm	_CSR21_TYPE_93C46,4,2           ## @CSR21_TYPE_93C46
	.comm	_PCI_EEPROM_WIDTH_93C46,4,2     ## @PCI_EEPROM_WIDTH_93C46
	.comm	_PCI_EEPROM_WIDTH_93C66,4,2     ## @PCI_EEPROM_WIDTH_93C66
	.comm	_EEPROM_BASE,4,2                ## @EEPROM_BASE
	.comm	_EEPROM_SIZE,4,2                ## @EEPROM_SIZE
	.comm	_EEPROM_MAC_ADDR_0,4,2          ## @EEPROM_MAC_ADDR_0
	.comm	_EEPROM_ANTENNA,4,2             ## @EEPROM_ANTENNA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid EEPROM data detected\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rt2400pci_validate_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2400pci_validate_eeprom
_rt2400pci_validate_eeprom:             ; @rt2400pci_validate_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _CSR21@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSR21@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_rt2x00mmio_register_read
	str	x19, [sp, #48]
Lloh3:
	adrp	x8, _rt2400pci_eepromregister_read@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rt2400pci_eepromregister_read@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _rt2400pci_eepromregister_write@GOTPAGE
Lloh7:
	ldr	x9, [x9, _rt2400pci_eepromregister_write@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #36]
Lloh9:
	adrp	x8, _CSR21_TYPE_93C46@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CSR21_TYPE_93C46@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_rt2x00_get_field32
Lloh12:
	adrp	x8, _PCI_EEPROM_WIDTH_93C46@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_EEPROM_WIDTH_93C46@GOTPAGEOFF]
Lloh14:
	adrp	x9, _PCI_EEPROM_WIDTH_93C66@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_EEPROM_WIDTH_93C66@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
Lloh16:
	adrp	x8, _EEPROM_BASE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EEPROM_BASE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh19:
	adrp	x8, _EEPROM_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EEPROM_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	asr	w3, w8, #2
	mov	x0, sp
	bl	_eeprom_93cx6_multiread
Lloh22:
	adrp	x8, _EEPROM_MAC_ADDR_0@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EEPROM_MAC_ADDR_0@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_addr
	mov	x1, x0
	mov	x0, x19
	bl	_rt2x00lib_set_mac_address
Lloh25:
	adrp	x8, _EEPROM_ANTENNA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EEPROM_ANTENNA@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_read
	mov	w8, #65535
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rt2x00_err
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR21,4,2                      ; @CSR21
	.comm	_rt2400pci_eepromregister_read,4,2 ; @rt2400pci_eepromregister_read
	.comm	_rt2400pci_eepromregister_write,4,2 ; @rt2400pci_eepromregister_write
	.comm	_CSR21_TYPE_93C46,4,2           ; @CSR21_TYPE_93C46
	.comm	_PCI_EEPROM_WIDTH_93C46,4,2     ; @PCI_EEPROM_WIDTH_93C46
	.comm	_PCI_EEPROM_WIDTH_93C66,4,2     ; @PCI_EEPROM_WIDTH_93C66
	.comm	_EEPROM_BASE,4,2                ; @EEPROM_BASE
	.comm	_EEPROM_SIZE,4,2                ; @EEPROM_SIZE
	.comm	_EEPROM_MAC_ADDR_0,4,2          ; @EEPROM_MAC_ADDR_0
	.comm	_EEPROM_ANTENNA,4,2             ; @EEPROM_ANTENNA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid EEPROM data detected\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rt2400pci_validate_eeprom
.subsections_via_symbols
