	.file	"extr_platform_chrp.c_chrp_mem_regions.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	chrp_mem_regions
	.type	chrp_mem_regions, @function
chrp_mem_regions:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rcx
	mov	rcx, r8
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	mov	rdx, rbp
	mov	rsi, r13
	mov	rdi, rbx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	ofw_mem_regions@PLT
	mov	rcx, r12
	mov	rdx, rbp
	mov	rsi, r13
	mov	rdi, rbx
	call	parse_drconf_memory@PLT
	mov	eax, DWORD PTR 0[r13]
	test	eax, eax
	jle	.L7
	sub	eax, 1
	mov	rsi, rbx
	xor	edx, edx
	sal	rax, 4
	lea	rcx, 16[rbx+rax]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rsi]
	add	rax, QWORD PTR [rsi]
	cmp	rdx, rax
	cmovl	rdx, rax
	add	rsi, 16
	cmp	rsi, rcx
	jne	.L3
.L2:
	mov	ecx, DWORD PTR [r12]
	test	ecx, ecx
	jle	.L1
	sub	ecx, 1
	lea	rax, 8[rbp]
	sal	rcx, 4
	lea	rdi, 24[rbp+rcx]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, QWORD PTR -8[rax]
	mov	rsi, QWORD PTR [rax]
	add	rsi, rcx
	cmp	rsi, rdx
	jle	.L5
	mov	rbx, rdx
	sub	rbx, rcx
	mov	QWORD PTR [rax], rbx
.L5:
	add	rax, 16
	cmp	rdi, rax
	jne	.L6
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	edx, edx
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	chrp_mem_regions, .-chrp_mem_regions
	.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_platform_chrp.c_chrp_mem_regions.c"
	.text
	.align	2
	.global	chrp_mem_regions
	.syntax unified
	.arm
	.fpu softvfp
	.type	chrp_mem_regions, %function
chrp_mem_regions:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r2
	mov	r5, r1
	mov	r4, r3
	ldr	r6, [sp, #24]
	mov	r2, r3
	mov	r1, r7
	mov	r3, r6
	mov	r0, r5
	bl	ofw_mem_regions
	mov	r3, r6
	mov	r2, r4
	mov	r1, r7
	mov	r0, r5
	bl	parse_drconf_memory
	ldr	lr, [r7]
	cmp	lr, #0
	ble	.L7
	mov	r1, r5
	mov	r0, #0
	add	lr, r5, lr, lsl #3
.L3:
	ldm	r1, {r2, ip}
	add	r2, r2, ip
	cmp	r0, r2
	add	r1, r1, #8
	movlt	r0, r2
	cmp	r1, lr
	bne	.L3
.L2:
	ldr	lr, [r6]
	cmp	lr, #0
	pople	{r4, r5, r6, r7, r8, pc}
	mov	r2, r4
	add	lr, r4, lr, lsl #3
.L6:
	ldr	r3, [r2]
	ldr	r1, [r2, #4]
	sub	ip, r0, r3
	add	r3, r3, r1
	cmp	r3, r0
	strgt	ip, [r2, #4]
	add	r2, r2, #8
	cmp	lr, r2
	bne	.L6
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r0, #0
	b	.L2
	.size	chrp_mem_regions, .-chrp_mem_regions
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
