	.file	"extr_bcm47xx_sprom.c_bcm47xx_fill_sprom_ethernet.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"et0macaddr"
.LC1:
	.string	"et0mdcport"
.LC2:
	.string	"et0phyaddr"
.LC3:
	.string	"et1macaddr"
.LC4:
	.string	"et1mdcport"
.LC5:
	.string	"et1phyaddr"
.LC6:
	.string	"et2macaddr"
.LC7:
	.string	"et2mdcport"
.LC8:
	.string	"et2phyaddr"
.LC9:
	.string	"macaddr"
.LC10:
	.string	"il0macaddr"
	.text
	.p2align 4
	.type	bcm47xx_fill_sprom_ethernet, @function
bcm47xx_fill_sprom_ethernet:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	mov	ecx, r12d
	lea	rsi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rdx, QWORD PTR 48[rdi]
	mov	rdi, rbp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	nvram_read_macaddr@PLT
	xor	r8d, r8d
	xor	esi, esi
	lea	rcx, 44[rbx]
	mov	r9d, r12d
	lea	rdx, .LC1[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	xor	r8d, r8d
	mov	r9d, r12d
	xor	esi, esi
	lea	rcx, 40[rbx]
	lea	rdx, .LC2[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	mov	rdx, QWORD PTR 32[rbx]
	mov	ecx, r12d
	mov	rdi, rbp
	lea	rsi, .LC3[rip]
	call	nvram_read_macaddr@PLT
	xor	r8d, r8d
	xor	esi, esi
	lea	rcx, 28[rbx]
	mov	r9d, r12d
	lea	rdx, .LC4[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	xor	r8d, r8d
	mov	r9d, r12d
	xor	esi, esi
	lea	rcx, 24[rbx]
	lea	rdx, .LC5[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	mov	rdx, QWORD PTR 16[rbx]
	mov	ecx, r12d
	mov	rdi, rbp
	lea	rsi, .LC6[rip]
	call	nvram_read_macaddr@PLT
	xor	r8d, r8d
	xor	esi, esi
	lea	rcx, 12[rbx]
	mov	r9d, r12d
	lea	rdx, .LC7[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	xor	r8d, r8d
	mov	r9d, r12d
	xor	esi, esi
	lea	rcx, 8[rbx]
	lea	rdx, .LC8[rip]
	mov	rdi, rbp
	call	nvram_read_u8@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	ecx, r12d
	mov	rdi, rbp
	lea	rsi, .LC9[rip]
	call	nvram_read_macaddr@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rdi, rbp
	mov	ecx, r12d
	lea	rsi, .LC10[rip]
	call	nvram_read_macaddr@PLT
	mov	rdi, QWORD PTR [rbx]
	call	bcm47xx_is_valid_mac@PLT
	test	rax, rax
	je	.L9
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rbp, rsp
	xor	edi, edi
	lea	rsi, .LC0[rip]
	xor	ecx, ecx
	mov	rdx, rbp
	call	nvram_read_macaddr@PLT
	mov	rdi, rbp
	call	bcm47xx_is_valid_mac@PLT
	test	rax, rax
	je	.L1
	mov	esi, DWORD PTR mac_addr_used[rip]
	mov	rdi, rbp
	call	bcm47xx_increase_mac_addr@PLT
	test	eax, eax
	jne	.L1
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, rbp
	call	ether_addr_copy@PLT
	add	DWORD PTR mac_addr_used[rip], 1
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bcm47xx_fill_sprom_ethernet, .-bcm47xx_fill_sprom_ethernet
	.comm	mac_addr_used,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bcm47xx_sprom.c_bcm47xx_fill_sprom_ethernet.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"et0macaddr\000"
	.align	2
.LC1:
	.ascii	"et0mdcport\000"
	.align	2
.LC2:
	.ascii	"et0phyaddr\000"
	.align	2
.LC3:
	.ascii	"et1macaddr\000"
	.align	2
.LC4:
	.ascii	"et1mdcport\000"
	.align	2
.LC5:
	.ascii	"et1phyaddr\000"
	.align	2
.LC6:
	.ascii	"et2macaddr\000"
	.align	2
.LC7:
	.ascii	"et2mdcport\000"
	.align	2
.LC8:
	.ascii	"et2phyaddr\000"
	.align	2
.LC9:
	.ascii	"macaddr\000"
	.align	2
.LC10:
	.ascii	"il0macaddr\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm47xx_fill_sprom_ethernet, %function
bcm47xx_fill_sprom_ethernet:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	mov	r7, #0
	mov	r5, r1
	mov	r6, r2
	ldr	ip, .L11
	sub	sp, sp, #44
	mov	r3, r2
	ldr	r2, [r0, #36]
	mov	r0, r1
	ldr	r1, .L11+4
	ldr	ip, [ip]
	str	ip, [sp, #36]
	mov	ip,#0
	bl	nvram_read_macaddr
	mov	r1, r7
	ldr	r2, .L11+8
	add	r3, r4, #32
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r1, r7
	ldr	r2, .L11+12
	add	r3, r4, #28
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r3, r6
	ldr	r2, [r4, #24]
	ldr	r1, .L11+16
	mov	r0, r5
	bl	nvram_read_macaddr
	mov	r1, r7
	ldr	r2, .L11+20
	add	r3, r4, #20
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r1, r7
	ldr	r2, .L11+24
	add	r3, r4, #16
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r3, r6
	ldr	r2, [r4, #12]
	ldr	r1, .L11+28
	mov	r0, r5
	bl	nvram_read_macaddr
	mov	r1, r7
	ldr	r2, .L11+32
	add	r3, r4, #8
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r1, r7
	ldr	r2, .L11+36
	add	r3, r4, #4
	mov	r0, r5
	str	r6, [sp, #4]
	str	r7, [sp]
	bl	nvram_read_u8
	mov	r3, r6
	ldr	r2, [r4]
	ldr	r1, .L11+40
	mov	r0, r5
	bl	nvram_read_macaddr
	mov	r3, r6
	ldr	r2, [r4]
	ldr	r1, .L11+44
	mov	r0, r5
	bl	nvram_read_macaddr
	ldr	r0, [r4]
	bl	bcm47xx_is_valid_mac
	subs	r3, r0, #0
	beq	.L9
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L9:
	ldr	r1, .L11+4
	add	r2, sp, #12
	bl	nvram_read_macaddr
	add	r0, sp, #12
	bl	bcm47xx_is_valid_mac
	cmp	r0, r7
	beq	.L1
	ldr	r5, .L11+48
	add	r0, sp, #12
	ldr	r1, [r5]
	bl	bcm47xx_increase_mac_addr
	cmp	r0, r7
	bne	.L1
	ldr	r0, [r4]
	add	r1, sp, #12
	bl	ether_addr_copy
	ldr	r3, [r5]
	add	r3, r3, #1
	str	r3, [r5]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	mac_addr_used
	.size	bcm47xx_fill_sprom_ethernet, .-bcm47xx_fill_sprom_ethernet
	.comm	mac_addr_used,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
