	.file	"extr_main.c_wl18xx_get_mac.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"MAC address from fuse not available, using random locally administered addresses."
	.text
	.p2align 4
	.type	wl18xx_get_mac, @function
wl18xx_get_mac:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -40
	mov	rdx, QWORD PTR PART_TOP_PRCM_ELP_SOC[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	lea	rsi, [rax+rdx*4]
	call	wlcore_set_partition@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR WL18XX_REG_FUSE_BD_ADDR_1[rip]
	lea	rdx, -48[rbp]
	mov	rdi, r12
	call	wlcore_read32@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR WL18XX_REG_FUSE_BD_ADDR_2[rip]
	lea	rdx, -44[rbp]
	mov	rdi, r12
	call	wlcore_read32@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	ecx, edx
	sal	eax, 8
	and	edx, 16777215
	and	eax, 16776960
	shr	ecx, 24
	mov	DWORD PTR 4[r12], edx
	add	eax, ecx
	mov	DWORD PTR [r12], eax
	cmp	QWORD PTR [r12], 0
	je	.L13
.L3:
	mov	rax, QWORD PTR 8[r12]
	mov	rdx, QWORD PTR PART_DOWN[rip]
	mov	rdi, r12
	lea	rsi, [rax+rdx*4]
	call	wlcore_set_partition@PLT
.L2:
	endbr64
.L1:
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L14
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movsx	rax, DWORD PTR ETH_ALEN[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L5
.L15:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L15
.L5:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L6
	or	QWORD PTR -8[rsp+rdx], 0
.L6:
	lea	rdi, 3[rsp]
	mov	r13, rdi
	and	rdi, -4
	call	eth_random_addr@PLT
	shr	r13, 2
	lea	rdi, .LC0[rip]
	mov	eax, DWORD PTR 0[0+r13*4]
	mov	edx, DWORD PTR 4[0+r13*4]
	sal	eax, 16
	sal	edx, 8
	add	eax, edx
	add	eax, DWORD PTR 8[0+r13*4]
	mov	edx, DWORD PTR 16[0+r13*4]
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR 12[0+r13*4]
	sal	edx, 8
	sal	eax, 16
	add	eax, edx
	add	eax, DWORD PTR 20[0+r13*4]
	mov	DWORD PTR 4[r12], eax
	call	wl1271_warning@PLT
	mov	rsp, rbx
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wl18xx_get_mac, .-wl18xx_get_mac
	.comm	WL18XX_REG_FUSE_BD_ADDR_2,4,4
	.comm	WL18XX_REG_FUSE_BD_ADDR_1,4,4
	.comm	PART_TOP_PRCM_ELP_SOC,8,8
	.comm	PART_DOWN,8,8
	.comm	ETH_ALEN,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_main.c_wl18xx_get_mac.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MAC address from fuse not available, using random l"
	.ascii	"ocally administered addresses.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wl18xx_get_mac, %function
wl18xx_get_mac:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #20
	ldr	r2, .L9
	ldr	r3, [r0, #8]
	ldr	r1, [r2]
	ldr	r2, .L9+4
	add	r1, r3, r1, lsl #2
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [fp, #-24]
	mov	r2,#0
	bl	wlcore_set_partition
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L9+8
	mov	r0, r4
	ldr	r1, [r3]
	sub	r2, fp, #32
	bl	wlcore_read32
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L9+12
	mov	r0, r4
	ldr	r1, [r3]
	sub	r2, fp, #28
	bl	wlcore_read32
	cmp	r0, #0
	blt	.L1
	ldr	r1, [fp, #-28]
	ldr	r3, .L9+16
	ldr	r2, [fp, #-32]
	and	r3, r3, r1, lsl #8
	add	r3, r3, r2, lsr #24
	bic	r2, r2, #-16777216
	orrs	r1, r3, r2
	str	r3, [r4]
	str	r2, [r4, #4]
	beq	.L7
.L3:
	ldr	r2, .L9+20
	ldr	r3, [r4, #8]
	ldr	r1, [r2]
	mov	r0, r4
	add	r1, r3, r1, lsl #2
	bl	wlcore_set_partition
.L2:
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L7:
	ldr	r3, .L9+24
	mov	r5, sp
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r6, sp
	mov	r0, r6
	bl	eth_random_addr
	ldr	r2, [r6, #4]
	ldr	r1, [r6]
	ldr	r3, [r6, #16]
	ldr	ip, [r6, #12]
	lsl	r2, r2, #8
	ldr	r0, [r6, #8]
	add	r2, r2, r1, lsl #16
	lsl	r3, r3, #8
	ldr	r1, [r6, #20]
	add	r3, r3, ip, lsl #16
	add	r2, r2, r0
	add	r3, r3, r1
	stm	r4, {r2, r3}
	ldr	r0, .L9+28
	bl	wl1271_warning
	mov	sp, r5
	b	.L3
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	PART_TOP_PRCM_ELP_SOC
	.word	.LC1
	.word	WL18XX_REG_FUSE_BD_ADDR_1
	.word	WL18XX_REG_FUSE_BD_ADDR_2
	.word	16776960
	.word	PART_DOWN
	.word	ETH_ALEN
	.word	.LC0
	.size	wl18xx_get_mac, .-wl18xx_get_mac
	.comm	WL18XX_REG_FUSE_BD_ADDR_2,4,4
	.comm	WL18XX_REG_FUSE_BD_ADDR_1,4,4
	.comm	PART_TOP_PRCM_ELP_SOC,4,4
	.comm	PART_DOWN,4,4
	.comm	ETH_ALEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
