	.file	"extr_geom_flashmap.c_g_flashmap_load.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	g_flashmap_load, @function
g_flashmap_load:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rcx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR M_FLASHMAP[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR FLASH_SLICES_MAX_NUM[rip]
	or	edx, DWORD PTR M_ZERO[rip]
	mov	DWORD PTR 4[rsp], 0
	lea	edi, [rax+rax*2]
	sal	edi, 3
	call	malloc@PLT
	mov	esi, DWORD PTR [r14]
	lea	rcx, 4[rsp]
	mov	edi, r13d
	mov	rbp, rax
	mov	rdx, rax
	call	r12
	test	rax, rax
	jne	.L2
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jle	.L2
	mov	r12, rbp
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	esi, DWORD PTR M_FLASHMAP[rip]
	add	r13d, 1
	add	r12, 24
	mov	edi, 24
	call	malloc@PLT
	mov	edx, DWORD PTR sl_link[rip]
	mov	rdi, rbx
	mov	rsi, rax
	mov	eax, DWORD PTR -8[r12]
	mov	DWORD PTR 16[rsi], eax
	mov	rax, QWORD PTR -16[r12]
	mov	QWORD PTR 8[rsi], rax
	add	rax, QWORD PTR -24[r12]
	sub	rax, 1
	mov	QWORD PTR [rsi], rax
	call	STAILQ_INSERT_TAIL@PLT
	cmp	DWORD PTR 4[rsp], r13d
	jg	.L3
.L2:
	mov	esi, DWORD PTR M_FLASHMAP[rip]
	mov	rdi, rbp
	call	free@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	g_flashmap_load, .-g_flashmap_load
	.comm	sl_link,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_FLASHMAP,4,4
	.comm	FLASH_SLICES_MAX_NUM,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_geom_flashmap.c_g_flashmap_load.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	g_flashmap_load, %function
g_flashmap_load:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r10, r1
	ldr	r1, .L9
	mov	r4, r2
	ldr	r7, .L9+4
	ldr	r2, .L9+8
	ldr	r1, [r1]
	ldr	lr, [r7]
	ldr	r2, [r2]
	ldr	r5, .L9+12
	add	r1, r1, r1, lsl #1
	mov	r6, r3
	ldr	r3, .L9+16
	sub	sp, sp, #8
	orr	r2, lr, r2
	mov	r9, r0
	lsl	r0, r1, #2
	ldr	r1, [r5]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	str	ip, [sp]
	bl	malloc
	mov	r8, r0
	ldr	r1, [r10]
	mov	r0, r9
	mov	r2, r8
	mov	r3, sp
	blx	r4
	subs	r10, r0, #0
	bne	.L2
	ldr	r3, [sp]
	cmp	r3, #0
	ble	.L2
	mov	r4, r8
	ldr	r9, .L9+20
.L3:
	ldr	r2, [r7]
	ldr	r1, [r5]
	mov	r0, #12
	bl	malloc
	mov	r1, r0
	ldr	r3, [r4, #4]
	ldr	r0, [r4, #8]
	str	r3, [r1, #4]
	ldr	r2, [r4], #12
	str	r0, [r1, #8]
	add	r3, r3, r2
	sub	r3, r3, #1
	str	r3, [r1]
	mov	r0, r6
	ldr	r2, [r9]
	bl	STAILQ_INSERT_TAIL
	ldr	r3, [sp]
	add	r10, r10, #1
	cmp	r3, r10
	bgt	.L3
.L2:
	mov	r0, r8
	ldr	r1, [r5]
	bl	free
	ldr	r3, .L9+16
	ldr	r0, [sp]
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	FLASH_SLICES_MAX_NUM
	.word	M_WAITOK
	.word	M_ZERO
	.word	M_FLASHMAP
	.word	.LC0
	.word	sl_link
	.size	g_flashmap_load, .-g_flashmap_load
	.comm	sl_link,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_FLASHMAP,4,4
	.comm	FLASH_SLICES_MAX_NUM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
