	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_nvram_write_block_using_eeprom
_tg3_nvram_write_block_using_eeprom:    ## @tg3_nvram_write_block_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jle	LBB0_9
## %bb.1:
	xorl	%r14d, %r14d
	movq	_GRC_EEPROM_ADDR@GOTPCREL(%rip), %r15
	movq	_EEPROM_ADDR_COMPLETE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%r14,%rax), %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,4), %rsi
	leaq	-48(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	_GRC_EEPROM_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	-48(%rbp), %edi
	callq	_be32_to_cpu
	movl	%eax, %edi
	callq	_swab32
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_tw32
	movl	(%r15), %edi
	callq	_tr32
	movl	%eax, %r12d
	movl	(%r15), %edi
	movl	(%r13), %esi
	orl	%eax, %esi
	callq	_tw32
	movq	_EEPROM_ADDR_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EEPROM_ADDR_DEVID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	movq	_EEPROM_ADDR_READ@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%r12d, %ecx
	movl	(%r15), %edi
	andl	%eax, %ebx
	orl	%ecx, %ebx
	movq	_EEPROM_ADDR_START@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_EEPROM_ADDR_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_tw32
	movl	$1000, %ebx                     ## imm = 0x3E8
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	callq	_tr32
	movl	%eax, %r12d
	movl	(%r13), %eax
	testl	%r12d, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	$1, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$4, %r14
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jl	LBB0_2
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	negl	%eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRC_EEPROM_DATA,4,2            ## @GRC_EEPROM_DATA
	.comm	_GRC_EEPROM_ADDR,4,2            ## @GRC_EEPROM_ADDR
	.comm	_EEPROM_ADDR_COMPLETE,4,2       ## @EEPROM_ADDR_COMPLETE
	.comm	_EEPROM_ADDR_ADDR_MASK,4,2      ## @EEPROM_ADDR_ADDR_MASK
	.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_START,4,2          ## @EEPROM_ADDR_START
	.comm	_EEPROM_ADDR_WRITE,4,2          ## @EEPROM_ADDR_WRITE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_tg3_nvram_write_block_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_write_block_using_eeprom
_tg3_nvram_write_block_using_eeprom:    ; @tg3_nvram_write_block_using_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w2, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, #0
Lloh0:
	adrp	x25, _GRC_EEPROM_ADDR@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GRC_EEPROM_ADDR@GOTPAGEOFF]
Lloh2:
	adrp	x26, _EEPROM_ADDR_COMPLETE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EEPROM_ADDR_COMPLETE@GOTPAGEOFF]
Lloh4:
	adrp	x27, _EEPROM_ADDR_START@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EEPROM_ADDR_START@GOTPAGEOFF]
Lloh6:
	adrp	x28, _EEPROM_ADDR_WRITE@GOTPAGE
Lloh7:
	ldr	x28, [x28, _EEPROM_ADDR_WRITE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	add	w24, w23, w21
	add	x1, x19, x23, lsl #2
	add	x0, sp, #12
	mov	w2, #4
	bl	_memcpy
Lloh8:
	adrp	x8, _GRC_EEPROM_DATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GRC_EEPROM_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	ldr	w0, [sp, #12]
	bl	_be32_to_cpu
	bl	_swab32
	mov	x1, x0
	mov	x0, x22
	bl	_tw32
	ldr	w0, [x25]
	bl	_tr32
	mov	x22, x0
	ldr	w0, [x25]
	ldr	w8, [x26]
	orr	w1, w8, w22
	bl	_tw32
Lloh11:
	adrp	x8, _EEPROM_ADDR_ADDR_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EEPROM_ADDR_ADDR_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _EEPROM_ADDR_DEVID_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EEPROM_ADDR_DEVID_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh17:
	adrp	x10, _EEPROM_ADDR_READ@GOTPAGE
Lloh18:
	ldr	x10, [x10, _EEPROM_ADDR_READ@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w9, w22, w9
	ldr	w0, [x25]
	and	w8, w8, w24
	orr	w8, w9, w8
	ldr	w9, [x27]
	orr	w8, w8, w9
	ldr	w9, [x28]
	orr	w1, w8, w9
	bl	_tw32
	mov	w24, #1000
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25]
	bl	_tr32
	mov	x22, x0
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	w0, #1
	bl	_msleep
	subs	w24, w24, #1
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	tst	w8, w22
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #4
	cmp	w23, w20
	b.lt	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GRC_EEPROM_DATA,4,2            ; @GRC_EEPROM_DATA
	.comm	_GRC_EEPROM_ADDR,4,2            ; @GRC_EEPROM_ADDR
	.comm	_EEPROM_ADDR_COMPLETE,4,2       ; @EEPROM_ADDR_COMPLETE
	.comm	_EEPROM_ADDR_ADDR_MASK,4,2      ; @EEPROM_ADDR_ADDR_MASK
	.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_START,4,2          ; @EEPROM_ADDR_START
	.comm	_EEPROM_ADDR_WRITE,4,2          ; @EEPROM_ADDR_WRITE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_tg3_nvram_write_block_using_eeprom
.subsections_via_symbols
