	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_nvram_read
_tg3_nvram_read:                        ## @tg3_nvram_read
	.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	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_tg3_nvram_phys_addr
	movl	%eax, %r12d
	movq	_NVRAM_ADDR_MSK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tg3_nvram_read_using_eeprom    ## TAILCALL
LBB0_3:
	movq	%r15, %rdi
	callq	_tg3_nvram_lock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	callq	_tg3_enable_nvram_access
	movq	_NVRAM_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_tw32
	movq	_NVRAM_CMD_RD@GOTPCREL(%rip), %rax
	movq	_NVRAM_CMD_GO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_NVRAM_CMD_FIRST@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_NVRAM_CMD_LAST@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_NVRAM_CMD_DONE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_tg3_nvram_exec_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_NVRAM_RDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tr32
	movl	%eax, (%r14)
LBB0_6:
	movq	%r15, %rdi
	callq	_tg3_disable_nvram_access
	movq	%r15, %rdi
	callq	_tg3_nvram_unlock
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVRAM,4,2                      ## @NVRAM
	.comm	_NVRAM_ADDR_MSK,4,2             ## @NVRAM_ADDR_MSK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVRAM_ADDR,4,2                 ## @NVRAM_ADDR
	.comm	_NVRAM_CMD_RD,4,2               ## @NVRAM_CMD_RD
	.comm	_NVRAM_CMD_GO,4,2               ## @NVRAM_CMD_GO
	.comm	_NVRAM_CMD_FIRST,4,2            ## @NVRAM_CMD_FIRST
	.comm	_NVRAM_CMD_LAST,4,2             ## @NVRAM_CMD_LAST
	.comm	_NVRAM_CMD_DONE,4,2             ## @NVRAM_CMD_DONE
	.comm	_NVRAM_RDDATA,4,2               ## @NVRAM_RDDATA
	.no_dead_strip	_tg3_nvram_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_nvram_read
_tg3_nvram_read:                        ; @tg3_nvram_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _NVRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_tg3_nvram_phys_addr
Lloh3:
	adrp	x8, _NVRAM_ADDR_MSK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVRAM_ADDR_MSK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_tg3_nvram_read_using_eeprom
LBB0_4:
	mov	x22, x0
	mov	x0, x19
	bl	_tg3_nvram_lock
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_tg3_enable_nvram_access
Lloh9:
	adrp	x8, _NVRAM_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVRAM_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_tw32
Lloh12:
	adrp	x8, _NVRAM_CMD_RD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NVRAM_CMD_RD@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _NVRAM_CMD_GO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NVRAM_CMD_GO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _NVRAM_CMD_FIRST@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NVRAM_CMD_FIRST@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _NVRAM_CMD_LAST@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NVRAM_CMD_LAST@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _NVRAM_CMD_DONE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _NVRAM_CMD_DONE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_tg3_nvram_exec_cmd
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.6:
Lloh27:
	adrp	x8, _NVRAM_RDDATA@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NVRAM_RDDATA@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_tr32
	str	w0, [x20]
LBB0_7:
	mov	x0, x19
	bl	_tg3_disable_nvram_access
	mov	x0, x19
	bl	_tg3_nvram_unlock
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_NVRAM,4,2                      ; @NVRAM
	.comm	_NVRAM_ADDR_MSK,4,2             ; @NVRAM_ADDR_MSK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVRAM_ADDR,4,2                 ; @NVRAM_ADDR
	.comm	_NVRAM_CMD_RD,4,2               ; @NVRAM_CMD_RD
	.comm	_NVRAM_CMD_GO,4,2               ; @NVRAM_CMD_GO
	.comm	_NVRAM_CMD_FIRST,4,2            ; @NVRAM_CMD_FIRST
	.comm	_NVRAM_CMD_LAST,4,2             ; @NVRAM_CMD_LAST
	.comm	_NVRAM_CMD_DONE,4,2             ; @NVRAM_CMD_DONE
	.comm	_NVRAM_RDDATA,4,2               ; @NVRAM_RDDATA
	.no_dead_strip	_tg3_nvram_read
.subsections_via_symbols
