	.file	"extr_bootloader_utility.c_unpack_load_app.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DROM"
.LC1:
	.string	"Mapping segment %d as %s"
.LC2:
	.string	"IROM"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"calling set_cache_and_start_app"
	.text
	.p2align 4
	.type	unpack_load_app, @function
unpack_load_app:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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, 40
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR 8[r15]
	mov	edi, DWORD PTR TAG[rip]
	test	eax, eax
	jle	.L10
	xor	ebx, ebx
	xor	r14d, r14d
	xor	r13d, r13d
	xor	r12d, r12d
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], 0
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L14:
	mov	esi, DWORD PTR MAP_ERR_MSG[rip]
	lea	rdx, .LC0[rip]
	call	ESP_LOGE@PLT
	mov	r9d, DWORD PTR 8[rsp]
.L5:
	mov	rax, QWORD PTR [r15]
	mov	r13, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR TAG[rip]
	mov	r12, QWORD PTR [rax+rbx*8]
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, r13
.L3:
	cmp	QWORD PTR SOC_IROM_LOW[rip], rax
	jg	.L6
	cmp	QWORD PTR SOC_IROM_HIGH[rip], rax
	jle	.L6
	test	r14, r14
	je	.L7
	mov	esi, DWORD PTR MAP_ERR_MSG[rip]
	lea	rdx, .LC2[rip]
	call	ESP_LOGE@PLT
.L8:
	mov	rax, QWORD PTR [r15]
	mov	edi, DWORD PTR TAG[rip]
	mov	r14, QWORD PTR [rax+rbx*8]
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR 24[rsp], rax
.L6:
	add	rbx, 1
	cmp	DWORD PTR 8[r15], ebx
	jle	.L2
.L9:
	mov	rbp, rbx
	mov	r9d, ebx
	sal	rbp, 4
	add	rbp, QWORD PTR 16[r15]
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR SOC_DROM_LOW[rip]
	jl	.L3
	cmp	rax, QWORD PTR SOC_DROM_HIGH[rip]
	jge	.L3
	mov	DWORD PTR 8[rsp], ebx
	test	r12, r12
	jne	.L14
	lea	rcx, .LC0[rip]
	mov	edx, ebx
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ESP_LOGD@PLT
	mov	r9d, DWORD PTR 8[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rcx, .LC2[rip]
	mov	edx, r9d
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	ESP_LOGD@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	QWORD PTR 24[rsp], 0
	xor	r14d, r14d
	xor	r13d, r13d
	xor	r12d, r12d
	mov	QWORD PTR 16[rsp], 0
	mov	QWORD PTR 8[rsp], 0
.L2:
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	ESP_LOGD@PLT
	mov	eax, DWORD PTR 12[r15]
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	rcx, r14
	mov	rsi, r13
	mov	rdi, r12
	push	rax
	.cfi_def_cfa_offset 112
	mov	r9, QWORD PTR 40[rsp]
	mov	r8, QWORD PTR 32[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	call	set_cache_and_start_app@PLT
	add	rsp, 56
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	unpack_load_app, .-unpack_load_app
	.comm	TAG,4,4
	.comm	SOC_IROM_LOW,8,8
	.comm	SOC_IROM_HIGH,8,8
	.comm	SOC_DROM_LOW,8,8
	.comm	SOC_DROM_HIGH,8,8
	.comm	MAP_ERR_MSG,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_bootloader_utility.c_unpack_load_app.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"DROM\000"
	.align	2
.LC1:
	.ascii	"Mapping segment %d as %s\000"
	.align	2
.LC2:
	.ascii	"IROM\000"
	.align	2
.LC3:
	.ascii	"calling set_cache_and_start_app\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	unpack_load_app, %function
unpack_load_app:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #4]
	mov	r6, r0
	cmp	r3, #0
	ldr	r3, .L15
	sub	sp, sp, #44
	ldr	r0, [r3]
	ble	.L10
	mov	r4, #0
	ldr	r10, .L15+4
	ldr	r9, .L15+8
	ldr	fp, .L15+12
	str	r4, [sp, #36]
	str	r4, [sp, #32]
	str	r4, [sp, #20]
	str	r4, [sp, #28]
	str	r4, [sp, #24]
	str	r4, [sp, #16]
	b	.L9
.L14:
	ldr	r3, .L15+16
	ldr	r2, .L15+20
	ldr	r1, [r3]
	bl	ESP_LOGE
.L5:
	ldr	r2, [r6]
	ldr	r3, [r5, r8]
	ldr	r2, [r2, r4, lsl #2]
	str	r3, [sp, #24]
	str	r2, [sp, #16]
	ldr	r2, [r7, #4]
	str	r2, [sp, #28]
	ldr	r2, .L15
	ldr	r0, [r2]
.L3:
	ldr	r2, [r9]
	cmp	r2, r3
	bgt	.L6
	ldr	r2, [fp]
	cmp	r2, r3
	ble	.L6
	ldr	r3, [sp, #20]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L15+16
	ldr	r2, .L15+24
	ldr	r1, [r3]
	bl	ESP_LOGE
.L8:
	ldr	r3, [r6]
	ldr	r2, [r5, r8]
	ldr	r3, [r3, r4, lsl #2]
	str	r2, [sp, #32]
	str	r3, [sp, #20]
	ldr	r3, .L15
	ldr	r2, [r7, #4]
	ldr	r0, [r3]
	str	r2, [sp, #36]
.L6:
	ldr	r3, [r6, #4]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L9:
	ldr	r5, [r6, #12]
	ldr	r2, [r10]
	ldr	r3, [r5, r4, lsl #3]
	add	r7, r5, r4, lsl #3
	cmp	r3, r2
	lsl	r8, r4, #3
	blt	.L3
	ldr	r2, .L15+28
	ldr	r2, [r2]
	cmp	r3, r2
	bge	.L3
	ldr	r3, [sp, #16]
	cmp	r3, #0
	bne	.L14
	mov	r2, r4
	ldr	r3, .L15+20
	ldr	r1, .L15+32
	bl	ESP_LOGD
	b	.L5
.L7:
	mov	r2, r4
	ldr	r3, .L15+24
	ldr	r1, .L15+32
	bl	ESP_LOGD
	b	.L8
.L10:
	mov	r3, #0
	str	r3, [sp, #36]
	str	r3, [sp, #32]
	str	r3, [sp, #20]
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #16]
.L2:
	ldr	r1, .L15+36
	bl	ESP_LOGD
	ldr	r3, [r6, #8]
	ldr	r2, [sp, #36]
	ldr	r1, [sp, #24]
	stmib	sp, {r2, r3}
	ldr	r3, [sp, #32]
	ldr	r2, [sp, #28]
	str	r3, [sp]
	ldr	r0, [sp, #16]
	ldr	r3, [sp, #20]
	bl	set_cache_and_start_app
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	TAG
	.word	SOC_DROM_LOW
	.word	SOC_IROM_LOW
	.word	SOC_IROM_HIGH
	.word	MAP_ERR_MSG
	.word	.LC0
	.word	.LC2
	.word	SOC_DROM_HIGH
	.word	.LC1
	.word	.LC3
	.size	unpack_load_app, .-unpack_load_app
	.comm	TAG,4,4
	.comm	SOC_IROM_LOW,4,4
	.comm	SOC_IROM_HIGH,4,4
	.comm	SOC_DROM_LOW,4,4
	.comm	SOC_DROM_HIGH,4,4
	.comm	MAP_ERR_MSG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
