	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xx_fill_sprom_ethernet
_bcm47xx_fill_sprom_ethernet:           ## @bcm47xx_fill_sprom_ethernet
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	48(%rdi), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_nvram_read_macaddr
	leaq	44(%r14), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	leaq	40(%r14), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	movq	32(%r14), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_nvram_read_macaddr
	leaq	28(%r14), %rcx
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	leaq	24(%r14), %rcx
	leaq	L_.str.5(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	movq	16(%r14), %rdx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_nvram_read_macaddr
	leaq	12(%r14), %rcx
	leaq	L_.str.7(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	leaq	8(%r14), %rcx
	leaq	L_.str.8(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_nvram_read_u8
	movq	(%r14), %rdx
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_nvram_read_macaddr
	movq	(%r14), %rdx
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_nvram_read_macaddr
	movq	(%r14), %rdi
	callq	_bcm47xx_is_valid_mac
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rbx
	xorl	%edi, %edi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_nvram_read_macaddr
	movq	%rbx, %rdi
	callq	_bcm47xx_is_valid_mac
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_mac_addr_used@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-64(%rbp), %rdi
	callq	_bcm47xx_increase_mac_addr
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	leaq	-64(%rbp), %rsi
	callq	_ether_addr_copy
	incl	(%rbx)
	jmp	LBB0_4
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"et0macaddr"

L_.str.1:                               ## @.str.1
	.asciz	"et0mdcport"

L_.str.2:                               ## @.str.2
	.asciz	"et0phyaddr"

L_.str.3:                               ## @.str.3
	.asciz	"et1macaddr"

L_.str.4:                               ## @.str.4
	.asciz	"et1mdcport"

L_.str.5:                               ## @.str.5
	.asciz	"et1phyaddr"

L_.str.6:                               ## @.str.6
	.asciz	"et2macaddr"

L_.str.7:                               ## @.str.7
	.asciz	"et2mdcport"

L_.str.8:                               ## @.str.8
	.asciz	"et2phyaddr"

L_.str.9:                               ## @.str.9
	.asciz	"macaddr"

L_.str.10:                              ## @.str.10
	.asciz	"il0macaddr"

	.comm	_mac_addr_used,4,2              ## @mac_addr_used
	.no_dead_strip	_bcm47xx_fill_sprom_ethernet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xx_fill_sprom_ethernet
_bcm47xx_fill_sprom_ethernet:           ; @bcm47xx_fill_sprom_ethernet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x2, [x0, #48]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_nvram_read_macaddr
	add	x3, x19, #44
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	add	x3, x19, #40
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	ldr	x2, [x19, #32]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_nvram_read_macaddr
	add	x3, x19, #28
Lloh11:
	adrp	x2, l_.str.4@PAGE
Lloh12:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	add	x3, x19, #24
Lloh13:
	adrp	x2, l_.str.5@PAGE
Lloh14:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	ldr	x2, [x19, #16]
Lloh15:
	adrp	x1, l_.str.6@PAGE
Lloh16:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_nvram_read_macaddr
	add	x3, x19, #12
Lloh17:
	adrp	x2, l_.str.7@PAGE
Lloh18:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	add	x3, x19, #8
Lloh19:
	adrp	x2, l_.str.8@PAGE
Lloh20:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x21
	mov	x1, #0
	mov	w4, #0
	mov	x5, x20
	bl	_nvram_read_u8
	ldr	x2, [x19]
Lloh21:
	adrp	x1, l_.str.9@PAGE
Lloh22:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_nvram_read_macaddr
	ldr	x2, [x19]
Lloh23:
	adrp	x1, l_.str.10@PAGE
Lloh24:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_nvram_read_macaddr
	ldr	x0, [x19]
	bl	_bcm47xx_is_valid_mac
	cbz	x0, LBB0_3
LBB0_1:
	ldr	x8, [sp, #24]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, sp
	mov	w3, #0
	bl	_nvram_read_macaddr
	mov	x0, sp
	bl	_bcm47xx_is_valid_mac
	cbz	x0, LBB0_1
; %bb.4:
Lloh30:
	adrp	x20, _mac_addr_used@GOTPAGE
Lloh31:
	ldr	x20, [x20, _mac_addr_used@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, sp
	bl	_bcm47xx_increase_mac_addr
	cbnz	w0, LBB0_1
; %bb.5:
	ldr	x0, [x19]
	mov	x1, sp
	bl	_ether_addr_copy
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	b	LBB0_1
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"et0macaddr"

l_.str.1:                               ; @.str.1
	.asciz	"et0mdcport"

l_.str.2:                               ; @.str.2
	.asciz	"et0phyaddr"

l_.str.3:                               ; @.str.3
	.asciz	"et1macaddr"

l_.str.4:                               ; @.str.4
	.asciz	"et1mdcport"

l_.str.5:                               ; @.str.5
	.asciz	"et1phyaddr"

l_.str.6:                               ; @.str.6
	.asciz	"et2macaddr"

l_.str.7:                               ; @.str.7
	.asciz	"et2mdcport"

l_.str.8:                               ; @.str.8
	.asciz	"et2phyaddr"

l_.str.9:                               ; @.str.9
	.asciz	"macaddr"

l_.str.10:                              ; @.str.10
	.asciz	"il0macaddr"

	.comm	_mac_addr_used,4,2              ; @mac_addr_used
	.no_dead_strip	_bcm47xx_fill_sprom_ethernet
.subsections_via_symbols
