	.file	"extr_kaslr.c_mem_avoid_overlap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mem_avoid_overlap, @function
mem_avoid_overlap:
.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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r12, QWORD PTR 8[rdi]
	add	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR MEM_AVOID_MAX[rip]
	test	eax, eax
	jle	.L9
	xor	ebx, ebx
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, QWORD PTR mem_avoid[rip]
	mov	r15, rbx
	mov	rdi, rbp
	sal	r15, 4
	add	rsi, r15
	call	mem_overlaps@PLT
	test	rax, rax
	je	.L3
	add	r15, QWORD PTR mem_avoid[rip]
	mov	rax, QWORD PTR [r15]
	cmp	rax, r12
	jnb	.L3
	movdqu	xmm0, XMMWORD PTR [r15]
	mov	r12, rax
	mov	r14d, 1
	movups	XMMWORD PTR 0[r13], xmm0
.L3:
	add	rbx, 1
	cmp	DWORD PTR MEM_AVOID_MAX[rip], ebx
	jg	.L4
.L2:
	mov	rax, QWORD PTR boot_params[rip]
	mov	rbx, QWORD PTR [rax]
	test	rbx, rbx
	je	.L1
	mov	r15, rsp
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR [rbx]
	mov	rsi, r15
	mov	rdi, rbp
	mov	QWORD PTR [rsp], rbx
	add	rax, 16
	mov	QWORD PTR 8[rsp], rax
	call	mem_overlaps@PLT
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR [rsp]
	cmp	rax, r12
	jnb	.L6
	movdqa	xmm1, XMMWORD PTR [rsp]
	mov	r12, rax
	mov	r14d, 1
	movups	XMMWORD PTR 0[r13], xmm1
.L6:
	mov	rbx, QWORD PTR 8[rbx]
	test	rbx, rbx
	jne	.L7
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	xor	r14d, r14d
	jmp	.L2
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mem_avoid_overlap, .-mem_avoid_overlap
	.comm	mem_avoid,8,8
	.comm	boot_params,8,8
	.comm	MEM_AVOID_MAX,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_kaslr.c_mem_avoid_overlap.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mem_avoid_overlap, %function
mem_avoid_overlap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r10, .L24
	ldr	r6, [r0]
	ldr	r2, [r10]
	ldr	r3, [r0, #4]
	cmp	r2, #0
	ldr	r2, .L24+4
	sub	sp, sp, #16
	mov	r5, r0
	mov	r8, #0
	mov	r7, r1
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	add	r6, r6, r3
	ble	.L2
	mov	r4, r8
	ldr	r9, .L24+8
.L4:
	ldr	r1, [r9]
	mov	r0, r5
	add	r1, r1, r4, lsl #3
	bl	mem_overlaps
	cmp	r0, #0
	lsl	r2, r4, #3
	beq	.L3
	ldr	r3, [r9]
	ldr	ip, [r3, r4, lsl #3]
	add	r3, r3, r2
	cmp	ip, r6
	movcc	r6, ip
	ldmcc	r3, {r0, r1}
	movcc	r8, #1
	stmcc	r7, {r0, r1}
.L3:
	ldr	r3, [r10]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L4
.L2:
	ldr	r3, .L24+12
	ldr	r3, [r3]
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L1
	add	r9, sp, #4
.L7:
	ldr	r3, [r4]
	mov	r1, r9
	add	r3, r3, #8
	mov	r0, r5
	str	r4, [sp, #4]
	str	r3, [sp, #8]
	bl	mem_overlaps
	cmp	r0, #0
	beq	.L6
	ldr	r3, [sp, #4]
	cmp	r3, r6
	movcc	r6, r3
	ldmcc	r9, {r0, r1}
	movcc	r8, #1
	stmcc	r7, {r0, r1}
.L6:
	ldr	r4, [r4, #4]
	cmp	r4, #0
	bne	.L7
.L1:
	ldr	r3, .L24+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r8
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	MEM_AVOID_MAX
	.word	.LC0
	.word	mem_avoid
	.word	boot_params
	.size	mem_avoid_overlap, .-mem_avoid_overlap
	.comm	mem_avoid,4,4
	.comm	boot_params,4,4
	.comm	MEM_AVOID_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
