	.file	"extr_memory.c_remap_pfn_range.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	remap_pfn_range
	.type	remap_pfn_range, @function
remap_pfn_range:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	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
	mov	rdi, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 16[rsp], rdx
	mov	DWORD PTR 28[rsp], r8d
	call	PAGE_ALIGN@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	r14, QWORD PTR 32[rbp]
	lea	rbx, [rax+r15]
	call	is_cow_mapping@PLT
	test	rax, rax
	je	.L2
	cmp	QWORD PTR 8[rbp], r15
	je	.L16
.L14:
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L16:
	.cfi_restore_state
	cmp	QWORD PTR 16[rbp], rbx
	jne	.L14
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 24[rbp], rax
.L2:
	mov	rdi, r13
	call	PAGE_ALIGN@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	rcx, r15
	mov	rdi, rbp
	mov	r8, rax
	lea	rsi, 28[rsp]
	call	track_pfn_remap@PLT
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR VM_IO[rip]
	or	eax, DWORD PTR VM_PFNMAP[rip]
	xor	edi, edi
	or	eax, DWORD PTR VM_DONTEXPAND[rip]
	or	eax, DWORD PTR VM_DONTDUMP[rip]
	or	DWORD PTR 0[rbp], eax
	cmp	r15, rbx
	setnb	dil
	call	BUG_ON@PLT
	mov	rax, r15
	mov	rsi, r15
	mov	rdi, r14
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	shr	rax, cl
	mov	rcx, QWORD PTR 16[rsp]
	sub	rcx, rax
	mov	QWORD PTR 8[rsp], rcx
	call	pgd_offset@PLT
	mov	rdx, rbx
	mov	rsi, r15
	mov	rdi, rbp
	mov	r12, rax
	call	flush_cache_range@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	add	r12, 4
	cmp	rbx, r15
	je	.L1
.L8:
	mov	rdi, r15
	mov	rsi, rbx
	mov	QWORD PTR [rsp], r15
	call	pgd_addr_end@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r14
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	r15, rax
	mov	r9d, DWORD PTR 28[rsp]
	mov	rax, rdx
	shr	rax, cl
	mov	rcx, r15
	lea	r8, [rax+rsi]
	mov	rsi, r12
	call	remap_p4d_range@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L17
	mov	rdi, r13
	mov	DWORD PTR [rsp], eax
	call	PAGE_ALIGN@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, rbp
	mov	rdx, rax
	call	untrack_pfn@PLT
	mov	r8d, DWORD PTR [rsp]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	remap_pfn_range, .-remap_pfn_range
	.comm	VM_PFNMAP,4,4
	.comm	VM_IO,4,4
	.comm	VM_DONTEXPAND,4,4
	.comm	VM_DONTDUMP,4,4
	.comm	PAGE_SHIFT,8,8
	.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_memory.c_remap_pfn_range.c"
	.text
	.align	2
	.global	remap_pfn_range
	.syntax unified
	.arm
	.fpu softvfp
	.type	remap_pfn_range, %function
remap_pfn_range:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	sub	sp, sp, #20
	mov	r0, r3
	mov	r4, r1
	mov	r8, r3
	str	r2, [sp, #8]
	bl	PAGE_ALIGN
	mov	r5, r0
	ldr	r0, [r6]
	ldr	r9, [r6, #16]
	bl	is_cow_mapping
	cmp	r0, #0
	add	r5, r5, r4
	beq	.L2
	ldr	r3, [r6, #4]
	cmp	r3, r4
	beq	.L16
.L14:
	ldr	r3, .L19
	ldr	r3, [r3]
	rsb	r3, r3, #0
.L1:
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, [r6, #8]
	cmp	r3, r5
	bne	.L14
	ldr	r3, [sp, #8]
	str	r3, [r6, #12]
.L2:
	mov	r0, r8
	bl	PAGE_ALIGN
	mov	r3, r4
	str	r0, [sp]
	ldr	r2, [sp, #8]
	mov	r0, r6
	add	r1, sp, #56
	bl	track_pfn_remap
	cmp	r0, #0
	bne	.L14
	ldr	r1, .L19+4
	ldr	r3, .L19+8
	ldr	r2, .L19+12
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, .L19+16
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r2
	ldr	r2, [r6]
	orr	r3, r3, r1
	orr	r3, r2, r3
	cmp	r4, r5
	ldr	fp, .L19+20
	movcc	r0, #0
	movcs	r0, #1
	str	r3, [r6]
	bl	BUG_ON
	ldr	r10, [fp]
	ldr	r3, [sp, #8]
	mov	r1, r4
	mov	r0, r9
	sub	r10, r3, r4, lsr r10
	bl	pgd_offset
	mov	r2, r5
	mov	r7, r0
	mov	r1, r4
	mov	r0, r6
	bl	flush_cache_range
	b	.L8
.L18:
	cmp	r5, r4
	add	r7, r7, #4
	beq	.L17
.L8:
	mov	r1, r5
	mov	r0, r4
	bl	pgd_addr_end
	mov	r2, r4
	mov	r4, r0
	ldr	r1, [fp]
	ldr	r0, [sp, #56]
	add	r1, r10, r2, lsr r1
	str	r1, [sp]
	str	r0, [sp, #4]
	mov	r3, r4
	mov	r1, r7
	mov	r0, r9
	bl	remap_p4d_range
	cmp	r0, #0
	beq	.L18
	str	r0, [sp, #12]
	mov	r0, r8
	bl	PAGE_ALIGN
	ldr	r1, [sp, #8]
	mov	r2, r0
	mov	r0, r6
	bl	untrack_pfn
	ldr	r3, [sp, #12]
	b	.L1
.L17:
	mov	r3, r0
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	EINVAL
	.word	VM_PFNMAP
	.word	VM_IO
	.word	VM_DONTEXPAND
	.word	VM_DONTDUMP
	.word	PAGE_SHIFT
	.size	remap_pfn_range, .-remap_pfn_range
	.comm	VM_PFNMAP,4,4
	.comm	VM_IO,4,4
	.comm	VM_DONTEXPAND,4,4
	.comm	VM_DONTDUMP,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
