	.file	"extr_linux_misc.c_linux_mremap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	linux_mremap
	.type	linux_mremap, @function
linux_mremap:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR LINUX_MREMAP_FIXED[rip]
	or	eax, DWORD PTR LINUX_MREMAP_MAYMOVE[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	not	eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	test	DWORD PTR [rsi], eax
	jne	.L10
	mov	r12d, DWORD PTR 4[rsi]
	mov	rbx, rsi
	and	r12d, DWORD PTR PAGE_MASK[rip]
	je	.L4
.L10:
	mov	rax, QWORD PTR 0[rbp]
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	QWORD PTR [rax], 0
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rsi]
	call	round_page@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	QWORD PTR 8[rbx], rax
	call	round_page@PLT
	mov	rsi, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rbx], rax
	cmp	rax, rsi
	jb	.L12
	movsx	rcx, DWORD PTR 4[rbx]
	ja	.L13
.L7:
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR [rax], rcx
	mov	eax, r12d
	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
.L13:
	.cfi_restore_state
	sub	rax, rsi
	mov	rdi, rbp
	add	rsi, rcx
	mov	rdx, rax
	call	kern_munmap@PLT
	test	eax, eax
	jne	.L8
	movsx	rcx, DWORD PTR 4[rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 0[rbp]
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	QWORD PTR [rax], 0
	mov	eax, r12d
	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
.L8:
	.cfi_restore_state
	mov	r12d, eax
	xor	ecx, ecx
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	linux_mremap, .-linux_mremap
	.comm	PAGE_MASK,4,4
	.comm	LINUX_MREMAP_MAYMOVE,4,4
	.comm	LINUX_MREMAP_FIXED,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_linux_misc.c_linux_mremap.c"
	.text
	.align	2
	.global	linux_mremap
	.syntax unified
	.arm
	.fpu softvfp
	.type	linux_mremap, %function
linux_mremap:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	ldr	r2, .L14
	ldr	r3, .L14+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4]
	orr	r3, r3, r1
	bics	r6, r2, r3
	mov	r7, r0
	bne	.L11
	ldr	r3, .L14+8
	ldr	r5, [r4, #4]
	ldr	r2, [r3]
	ands	r5, r5, r2
	beq	.L4
	ldr	r3, .L14+12
	ldr	r2, [r0]
	ldr	r5, [r3]
	str	r6, [r2]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r0, [r4, #8]
	bl	round_page
	mov	r3, r0
	ldr	r0, [r4, #12]
	str	r3, [r4, #8]
	bl	round_page
	ldr	r3, [r4, #8]
	str	r0, [r4, #12]
	cmp	r0, r3
	bcc	.L12
	ldr	r1, [r4, #4]
	bhi	.L13
.L7:
	ldr	r3, [r7]
	mov	r0, r5
	str	r1, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	mov	r1, #0
	ldr	r3, .L14+12
	ldr	r2, [r0]
	ldr	r5, [r3]
	str	r1, [r2]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	add	r1, r3, r1
	sub	r2, r0, r3
	mov	r0, r7
	bl	kern_munmap
	cmp	r0, #0
	movne	r5, r0
	movne	r1, r6
	ldreq	r1, [r4, #4]
	b	.L7
.L12:
	ldr	r2, [r7]
	ldr	r3, .L14+16
	str	r5, [r2]
	ldr	r5, [r3]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	LINUX_MREMAP_MAYMOVE
	.word	LINUX_MREMAP_FIXED
	.word	PAGE_MASK
	.word	EINVAL
	.word	ENOMEM
	.size	linux_mremap, .-linux_mremap
	.comm	PAGE_MASK,4,4
	.comm	LINUX_MREMAP_MAYMOVE,4,4
	.comm	LINUX_MREMAP_FIXED,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
