	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_nvram_read_using_eeprom
_tg3_nvram_read_using_eeprom:           ## @tg3_nvram_read_using_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	testb	$3, %bl
	jne	LBB0_2
## %bb.1:
	movq	_EEPROM_ADDR_ADDR_MASK@GOTPCREL(%rip), %r12
	cmpl	%ebx, (%r12)
	jl	LBB0_2
## %bb.4:
	movq	%rdx, %r14
	movq	_GRC_EEPROM_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_tr32
	movl	(%r12), %r8d
	movq	_EEPROM_ADDR_DEVID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%r8d, %esi
	movq	_EEPROM_ADDR_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%edx, %esi
	notl	%esi
	movq	_EEPROM_ADDR_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	andl	%eax, %esi
	movl	(%r15), %edi
	andl	%r8d, %ebx
	movq	_EEPROM_ADDR_START@GOTPCREL(%rip), %rax
	orl	%edx, %esi
	orl	(%rax), %esi
	orl	%ebx, %esi
	callq	_tw32
	movl	$1000, %ebx                     ## imm = 0x3E8
	movq	_EEPROM_ADDR_COMPLETE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_tr32
	movl	%eax, %r13d
	movl	(%r12), %eax
	testl	%r13d, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_5
## %bb.7:
	movl	(%r12), %eax
LBB0_8:
	testl	%r13d, %eax
	je	LBB0_9
## %bb.10:
	movq	_GRC_EEPROM_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tr32
	movl	%eax, %edi
	callq	_swab32
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_9:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_ADDR_ADDR_MASK,4,2      ## @EEPROM_ADDR_ADDR_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GRC_EEPROM_ADDR,4,2            ## @GRC_EEPROM_ADDR
	.comm	_EEPROM_ADDR_DEVID_MASK,4,2     ## @EEPROM_ADDR_DEVID_MASK
	.comm	_EEPROM_ADDR_READ,4,2           ## @EEPROM_ADDR_READ
	.comm	_EEPROM_ADDR_DEVID_SHIFT,4,2    ## @EEPROM_ADDR_DEVID_SHIFT
	.comm	_EEPROM_ADDR_ADDR_SHIFT,4,2     ## @EEPROM_ADDR_ADDR_SHIFT
	.comm	_EEPROM_ADDR_START,4,2          ## @EEPROM_ADDR_START
	.comm	_EEPROM_ADDR_COMPLETE,4,2       ## @EEPROM_ADDR_COMPLETE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GRC_EEPROM_DATA,4,2            ## @GRC_EEPROM_DATA
	.no_dead_strip	_tg3_nvram_read_using_eeprom
.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_using_eeprom
_tg3_nvram_read_using_eeprom:           ; @tg3_nvram_read_using_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
	tst	w1, #0x3
	b.ne	LBB0_8
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x22, _EEPROM_ADDR_ADDR_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EEPROM_ADDR_ADDR_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w1
	b.lt	LBB0_8
; %bb.2:
	mov	x19, x2
Lloh2:
	adrp	x21, _GRC_EEPROM_ADDR@GOTPAGE
Lloh3:
	ldr	x21, [x21, _GRC_EEPROM_ADDR@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_tr32
	ldr	w8, [x22]
Lloh4:
	adrp	x9, _EEPROM_ADDR_DEVID_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EEPROM_ADDR_DEVID_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh7:
	adrp	x10, _EEPROM_ADDR_READ@GOTPAGE
Lloh8:
	ldr	x10, [x10, _EEPROM_ADDR_READ@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w9, w0, w9
	ldr	w0, [x21]
Lloh10:
	adrp	x11, _EEPROM_ADDR_ADDR_SHIFT@GOTPAGE
Lloh11:
	ldr	x11, [x11, _EEPROM_ADDR_ADDR_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	lsl	w11, w20, w11
	and	w8, w11, w8
Lloh13:
	adrp	x11, _EEPROM_ADDR_START@GOTPAGE
Lloh14:
	ldr	x11, [x11, _EEPROM_ADDR_START@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	orr	w9, w9, w10
	orr	w9, w9, w11
	orr	w1, w9, w8
	bl	_tw32
	mov	w22, #1000
Lloh16:
	adrp	x23, _EEPROM_ADDR_COMPLETE@GOTPAGE
Lloh17:
	ldr	x23, [x23, _EEPROM_ADDR_COMPLETE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_tr32
	mov	x20, x0
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_msleep
	subs	w22, w22, #1
	b.ne	LBB0_3
; %bb.5:
	ldr	w8, [x23]
LBB0_6:
	tst	w8, w20
	b.eq	LBB0_9
; %bb.7:
Lloh18:
	adrp	x8, _GRC_EEPROM_DATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GRC_EEPROM_DATA@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_tr32
	bl	_swab32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_11
LBB0_8:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_ADDR_ADDR_MASK,4,2      ; @EEPROM_ADDR_ADDR_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GRC_EEPROM_ADDR,4,2            ; @GRC_EEPROM_ADDR
	.comm	_EEPROM_ADDR_DEVID_MASK,4,2     ; @EEPROM_ADDR_DEVID_MASK
	.comm	_EEPROM_ADDR_READ,4,2           ; @EEPROM_ADDR_READ
	.comm	_EEPROM_ADDR_DEVID_SHIFT,4,2    ; @EEPROM_ADDR_DEVID_SHIFT
	.comm	_EEPROM_ADDR_ADDR_SHIFT,4,2     ; @EEPROM_ADDR_ADDR_SHIFT
	.comm	_EEPROM_ADDR_START,4,2          ; @EEPROM_ADDR_START
	.comm	_EEPROM_ADDR_COMPLETE,4,2       ; @EEPROM_ADDR_COMPLETE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GRC_EEPROM_DATA,4,2            ; @GRC_EEPROM_DATA
	.no_dead_strip	_tg3_nvram_read_using_eeprom
.subsections_via_symbols
