	.file	"extr_mem.c_mmap_mem.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mmap_mem, @function
mmap_mem:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	mov	ecx, DWORD PTR PAGE_SHIFT[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	edi, DWORD PTR 16[rsi]
	mov	eax, edi
	sal	eax, cl
	sar	eax, cl
	cmp	edi, eax
	jne	.L13
	mov	r12, QWORD PTR [rsi]
	sub	r12, QWORD PTR 8[rsi]
	mov	rbp, rsi
	test	r12d, r12d
	jle	.L13
	mov	rsi, r12
	call	valid_mmap_phys_addr_range@PLT
	test	eax, eax
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	pop	rbp
	.cfi_remember_state
	.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
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	call	private_mapping_ok@PLT
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR ENOSYS[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR 16[rbp]
	mov	rsi, r12
	call	range_is_allowed@PLT
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR EPERM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR 16[rbp]
	lea	rcx, 20[rbp]
	mov	rdx, r12
	mov	rdi, r13
	call	phys_mem_access_prot_allowed@PLT
	test	eax, eax
	je	.L13
	mov	ecx, DWORD PTR 20[rbp]
	mov	esi, DWORD PTR 16[rbp]
	mov	rdx, r12
	mov	rdi, r13
	call	phys_mem_access_prot@PLT
	mov	edx, DWORD PTR 16[rbp]
	mov	rsi, QWORD PTR 8[rbp]
	mov	rcx, r12
	mov	r8d, eax
	mov	DWORD PTR 20[rbp], eax
	lea	rax, mmap_mem_ops[rip]
	mov	rdi, rbp
	mov	QWORD PTR 24[rbp], rax
	call	remap_pfn_range@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	je	.L1
	mov	eax, DWORD PTR EAGAIN[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mmap_mem, .-mmap_mem
	.comm	mmap_mem_ops,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	EPERM,4,4
	.comm	ENOSYS,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,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_mem.c_mmap_mem.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmap_mem, %function
mmap_mem:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L16
	push	{r4, r5, r6, lr}
	ldr	r3, [r1, #8]
	ldr	r2, [r2]
	mov	r4, r1
	lsl	r1, r3, r2
	cmp	r3, r1, asr r2
	sub	sp, sp, #8
	bne	.L14
	ldr	r5, [r4]
	ldr	r2, [r4, #4]
	sub	r5, r5, r2
	cmp	r5, #0
	ble	.L14
	mov	r6, r0
	mov	r1, r5
	mov	r0, r3
	bl	valid_mmap_phys_addr_range
	cmp	r0, #0
	bne	.L5
.L14:
	ldr	r3, .L16+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r4
	bl	private_mapping_ok
	cmp	r0, #0
	ldreq	r3, .L16+8
	ldreq	r0, [r3]
	rsbeq	r0, r0, #0
	beq	.L1
.L6:
	mov	r1, r5
	ldr	r0, [r4, #8]
	bl	range_is_allowed
	cmp	r0, #0
	ldreq	r3, .L16+12
	ldreq	r0, [r3]
	rsbeq	r0, r0, #0
	beq	.L1
.L7:
	mov	r2, r5
	mov	r0, r6
	ldr	r1, [r4, #8]
	add	r3, r4, #12
	bl	phys_mem_access_prot_allowed
	cmp	r0, #0
	beq	.L14
	mov	r2, r5
	ldr	r3, [r4, #12]
	ldr	r1, [r4, #8]
	mov	r0, r6
	bl	phys_mem_access_prot
	ldr	r2, .L16+16
	str	r0, [r4, #12]
	str	r0, [sp]
	mov	r3, r5
	str	r2, [r4, #16]
	mov	r0, r4
	ldmib	r4, {r1, r2}
	bl	remap_pfn_range
	cmp	r0, #0
	ldrne	r3, .L16+20
	ldrne	r0, [r3]
	rsbne	r0, r0, #0
	b	.L1
.L17:
	.align	2
.L16:
	.word	PAGE_SHIFT
	.word	EINVAL
	.word	ENOSYS
	.word	EPERM
	.word	mmap_mem_ops
	.word	EAGAIN
	.size	mmap_mem, .-mmap_mem
	.comm	mmap_mem_ops,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	EPERM,4,4
	.comm	ENOSYS,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
