	.file	"extr_boot.c_wl1251_boot_upload_nvs.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"nvs burst write 0x%x: 0x%x"
.LC1:
	.string	"nvs write table 0x%x: 0x%x"
	.text
	.p2align 4
	.type	wl1251_boot_upload_nvs, @function
wl1251_boot_upload_nvs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR [rdi]
	mov	QWORD PTR 32[rsp], rax
	test	rax, rax
	je	.L18
	mov	rax, QWORD PTR 8[rdi]
	mov	rbx, QWORD PTR 32[rsp]
	mov	rbp, rdi
	mov	QWORD PTR 40[rsp], rax
	mov	eax, DWORD PTR 16[rdi]
	mov	DWORD PTR 12[rsp], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	je	.L9
	lea	r13, .LC0[rip]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r10, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 16[rbx]
	add	rbx, 24
	mov	QWORD PTR 24[rsp], rbx
	sal	rax, 8
	and	r10d, 254
	or	r10, rax
	mov	rax, QWORD PTR 16[rsp]
	mov	r14, r10
	lea	r12, [r10+rax*4]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	edx, r14d
	mov	rsi, r13
	mov	edi, DWORD PTR DEBUG_BOOT[rip]
	add	rbx, 32
	sal	rax, 16
	sal	r8, 8
	or	r8, rax
	mov	rax, QWORD PTR -8[rbx]
	or	r8, QWORD PTR -32[rbx]
	mov	r15, r8
	sal	rax, 24
	or	r15, rax
	mov	rcx, r15
	call	wl1251_debug@PLT
	mov	esi, r14d
	mov	rdx, r15
	mov	rdi, rbp
	call	wl1251_mem_write32@PLT
	add	r14, 4
	cmp	r14, r12
	jne	.L5
	mov	r14, QWORD PTR 16[rsp]
	mov	rbx, QWORD PTR 24[rsp]
	sal	r14, 5
	add	rbx, r14
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	jne	.L6
.L4:
	add	rbx, 56
	mov	rdi, QWORD PTR 40[rsp]
	mov	esi, 4
	mov	rax, rbx
	sub	rax, QWORD PTR 32[rsp]
	sar	rax, 3
	sub	rdi, rax
	call	ALIGN@PLT
	mov	r14d, DWORD PTR 12[rsp]
	mov	rdi, rbp
	mov	r8d, DWORD PTR WL1251_PART_DOWN_REG_SIZE[rip]
	mov	ecx, DWORD PTR WL1251_PART_DOWN_REG_START[rip]
	mov	edx, DWORD PTR WL1251_PART_DOWN_MEM_SIZE[rip]
	mov	r12, rax
	mov	esi, r14d
	call	wl1251_set_partition@PLT
	test	r12, r12
	je	.L7
	sub	r12, 1
	add	r14d, 4
	lea	r13, .LC1[rip]
	shr	r12, 2
	lea	r15d, [r14+r12*4]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	add	r14d, 4
.L8:
	mov	r12, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r13
	add	rbx, 32
	mov	edx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR DEBUG_BOOT[rip]
	sal	rax, 16
	sal	r12, 8
	or	r12, rax
	mov	rax, QWORD PTR -8[rbx]
	or	r12, QWORD PTR -32[rbx]
	sal	rax, 24
	or	r12, rax
	mov	rcx, r12
	call	wl1251_debug@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	rdx, r12
	mov	rdi, rbp
	call	wl1251_mem_write32@PLT
	mov	DWORD PTR 12[rsp], r14d
	cmp	r14d, r15d
	jne	.L19
.L7:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	mov	eax, DWORD PTR ENODEV[rip]
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	mov	rbx, QWORD PTR 32[rsp]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	wl1251_boot_upload_nvs, .-wl1251_boot_upload_nvs
	.comm	WL1251_PART_DOWN_REG_START,4,4
	.comm	WL1251_PART_DOWN_REG_SIZE,4,4
	.comm	WL1251_PART_DOWN_MEM_SIZE,4,4
	.comm	ENODEV,4,4
	.comm	DEBUG_BOOT,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_boot.c_wl1251_boot_upload_nvs.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"nvs burst write 0x%x: 0x%x\000"
	.align	2
.LC1:
	.ascii	"nvs write table 0x%x: 0x%x\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wl1251_boot_upload_nvs, %function
wl1251_boot_upload_nvs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	sub	sp, sp, #28
	cmp	r3, #0
	str	r3, [sp, #16]
	beq	.L18
	ldr	r3, [sp, #16]
	ldr	r2, [r0, #4]
	ldr	r7, [r3]
	str	r2, [sp, #20]
	ldr	r2, [r0, #8]
	cmp	r7, #0
	mov	r9, r0
	str	r2, [sp, #12]
	beq	.L9
	ldr	r10, .L19
	ldr	fp, .L19+4
	str	r3, [sp, #8]
.L6:
	mov	r6, #0
	ldr	r2, [sp, #8]
	ldr	r5, [r2, #4]
	ldr	r3, [r2, #8]
	and	r5, r5, #254
	orr	r5, r5, r3, lsl #8
	add	r4, r2, #28
.L5:
	ldr	r8, [r4, #-8]
	ldr	r3, [r4, #-12]
	ldr	r2, [r4, #-16]
	lsl	r8, r8, #16
	orr	r8, r8, r3, lsl #8
	ldr	r3, [r4, #-4]
	orr	r8, r8, r2
	orr	r8, r8, r3, lsl #24
	mov	r2, r5
	mov	r3, r8
	mov	r1, fp
	ldr	r0, [r10]
	bl	wl1251_debug
	add	r6, r6, #1
	mov	r1, r5
	mov	r2, r8
	mov	r0, r9
	bl	wl1251_mem_write32
	cmp	r6, r7
	add	r4, r4, #16
	add	r5, r5, #4
	bne	.L5
	ldr	r3, [sp, #8]
	lsl	r7, r7, #4
	add	r7, r7, #12
	ldr	r7, [r3, r7]!
	cmp	r7, #0
	str	r3, [sp, #8]
	bne	.L6
.L4:
	ldr	r7, [sp, #8]
	ldr	r3, [sp, #16]
	add	r0, r7, #28
	sub	r0, r0, r3
	ldr	r3, [sp, #20]
	mov	r1, #4
	sub	r0, r3, r0, asr #2
	bl	ALIGN
	mov	r5, r0
	ldr	r2, .L19+8
	ldr	r3, .L19+12
	ldr	r1, [r2]
	ldr	r2, .L19+16
	str	r1, [sp]
	mov	r0, r9
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [sp, #12]
	bl	wl1251_set_partition
	cmp	r5, #0
	beq	.L7
	mov	r4, #0
	ldr	r10, .L19
	ldr	r6, .L19+20
	add	r8, r7, #44
.L8:
	ldr	r3, [r8, #-8]
	ldr	r2, [r8, #-12]
	ldr	r1, [r8, #-16]
	lsl	r3, r3, #16
	orr	r3, r3, r2, lsl #8
	ldr	r2, [r8, #-4]
	orr	r3, r3, r1
	orr	fp, r3, r2, lsl #24
	ldr	r3, [sp, #12]
	mov	r1, r6
	add	r7, r3, r4
	mov	r2, r7
	mov	r3, fp
	ldr	r0, [r10]
	bl	wl1251_debug
	add	r4, r4, #4
	mov	r2, fp
	mov	r1, r7
	mov	r0, r9
	bl	wl1251_mem_write32
	cmp	r5, r4
	add	r8, r8, #16
	bhi	.L8
.L7:
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r3, .L19+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r3, [sp, #16]
	str	r3, [sp, #8]
	b	.L4
.L20:
	.align	2
.L19:
	.word	DEBUG_BOOT
	.word	.LC0
	.word	WL1251_PART_DOWN_REG_SIZE
	.word	WL1251_PART_DOWN_REG_START
	.word	WL1251_PART_DOWN_MEM_SIZE
	.word	.LC1
	.word	ENODEV
	.size	wl1251_boot_upload_nvs, .-wl1251_boot_upload_nvs
	.comm	WL1251_PART_DOWN_REG_START,4,4
	.comm	WL1251_PART_DOWN_REG_SIZE,4,4
	.comm	WL1251_PART_DOWN_MEM_SIZE,4,4
	.comm	ENODEV,4,4
	.comm	DEBUG_BOOT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
