	.file	"extr_memattr.c_create_mem_region.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"invalid memory region: low >= high\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"overlapping memory region\n"
	.text
	.p2align 4
	.type	create_mem_region, @function
create_mem_region:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	cmp	rdi, rsi
	jl	.L2
	test	rsi, rsi
	jne	.L30
.L2:
	mov	rax, QWORD PTR mem_region_chain[rip]
	test	rax, rax
	jne	.L11
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L31:
	cmp	rbx, rdi
	jl	.L6
	test	rdi, rdi
	je	.L6
	cmp	rcx, rbp
	jge	.L7
	cmp	rbp, rdi
	jle	.L6
	cmp	rcx, rbx
	jge	.L6
.L9:
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	je	.L4
.L11:
	mov	rcx, QWORD PTR [rax]
	mov	rdi, QWORD PTR 8[rax]
	cmp	rcx, rbx
	jle	.L31
	cmp	rcx, rbp
	jge	.L12
.L6:
	lea	rdi, .LC1[rip]
	call	printf_unfiltered@PLT
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	cmp	rcx, rbx
	jne	.L9
.L12:
	test	rbp, rbp
	je	.L6
	cmp	rbp, rdi
	jge	.L6
	mov	rax, QWORD PTR 24[rax]
	test	rax, rax
	jne	.L11
.L4:
	mov	edi, 48
	call	xmalloc@PLT
	mov	rsi, QWORD PTR mem_number[rip]
	mov	QWORD PTR [rax], rbx
	lea	rdx, 1[rsi]
	mov	QWORD PTR 8[rax], rbp
	mov	QWORD PTR 40[rax], rdx
	mov	QWORD PTR mem_number[rip], rdx
	mov	edx, DWORD PTR [r12]
	mov	DWORD PTR 16[rax], 1
	mov	DWORD PTR 32[rax], edx
	mov	rdx, QWORD PTR mem_region_chain[rip]
	mov	QWORD PTR mem_region_chain[rip], rax
	mov	QWORD PTR 24[rax], rdx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	printf_unfiltered@PLT
	xor	eax, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	create_mem_region, .-create_mem_region
	.comm	mem_region_chain,8,8
	.comm	mem_number,8,8
	.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_memattr.c_create_mem_region.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid memory region: low >= high\012\000"
	.align	2
.LC1:
	.ascii	"overlapping memory region\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_mem_region, %function
create_mem_region:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, r1
	movlt	r3, #0
	movge	r3, #1
	cmp	r1, #0
	moveq	r3, #0
	cmp	r3, #0
	push	{r4, r5, r6, r7, r8, lr}
	bne	.L23
	ldr	r8, .L25
	mov	r6, r0
	ldr	r3, [r8]
	mov	r5, r1
	cmp	r3, #0
	mov	r7, r2
	bne	.L10
	b	.L4
.L24:
	clz	lr, r4
	lsr	lr, lr, #5
	cmp	r6, r4
	orrlt	lr, lr, #1
	cmp	lr, #0
	bne	.L6
	cmp	ip, r5
	bge	.L7
	cmp	r5, r4
	ble	.L6
	cmp	ip, r6
	bge	.L6
.L9:
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L4
.L10:
	ldr	ip, [r3]
	ldr	r4, [r3, #4]
	cmp	ip, r6
	ble	.L24
	cmp	ip, r5
	bge	.L11
.L6:
	ldr	r0, .L25+4
	bl	printf_unfiltered
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	cmp	ip, r6
	bne	.L9
.L11:
	cmp	r5, #0
	cmpne	r5, r4
	bge	.L6
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L10
.L4:
	mov	r0, #24
	bl	xmalloc
	mov	ip, #1
	ldr	r2, .L25+8
	ldr	r1, [r7]
	ldr	r3, [r2]
	str	r1, [r0, #16]
	ldr	r1, [r8]
	add	r3, r3, ip
	str	r6, [r0]
	str	r5, [r0, #4]
	str	ip, [r0, #8]
	str	r1, [r0, #12]
	str	r0, [r8]
	str	r3, [r2]
	str	r3, [r0, #20]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	ldr	r0, .L25+12
	bl	printf_unfiltered
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L26:
	.align	2
.L25:
	.word	mem_region_chain
	.word	.LC1
	.word	mem_number
	.word	.LC0
	.size	create_mem_region, .-create_mem_region
	.comm	mem_region_chain,4,4
	.comm	mem_number,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
