	.file	"extr_pmap.c_pmap_pkru_clear.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pmap_pkru_clear
	.type	pmap_pkru_clear, @function
pmap_pkru_clear:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edi
	mov	edi, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	trunc_page@PLT
	mov	edi, r12d
	mov	ebp, eax
	call	round_page@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	mov	esi, ebp
	mov	edx, eax
	mov	edi, ebx
	mov	r13d, eax
	call	pmap_pkru_check_uargs@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebx
	call	PMAP_UNLOCK@PLT
	cmp	DWORD PTR ENOMEM[rip], r12d
	jne	.L1
.L8:
	xor	edi, edi
	call	vm_wait@PLT
.L4:
	mov	edi, ebx
	call	PMAP_LOCK@PLT
	mov	edx, r13d
	mov	esi, ebp
	mov	edi, ebx
	call	pmap_pkru_deassign@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	xor	ecx, ecx
	mov	edx, r13d
	mov	esi, ebp
	mov	edi, ebx
	call	pmap_pkru_update_range@PLT
	mov	edi, ebx
	call	PMAP_UNLOCK@PLT
	cmp	DWORD PTR ENOMEM[rip], r12d
	je	.L8
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pmap_pkru_clear, .-pmap_pkru_clear
	.comm	ENOMEM,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_pmap.c_pmap_pkru_clear.c"
	.text
	.align	2
	.global	pmap_pkru_clear
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmap_pkru_clear, %function
pmap_pkru_clear:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	sub	sp, sp, #8
	mov	r0, r1
	mov	r4, r2
	bl	trunc_page
	mov	r6, r0
	mov	r0, r4
	bl	round_page
	mov	r3, #0
	mov	r2, r0
	mov	r7, r0
	mov	r1, r6
	mov	r0, r5
	str	r3, [sp]
	bl	pmap_pkru_check_uargs
	subs	r4, r0, #0
	bne	.L1
	ldr	r8, .L7
	b	.L4
.L3:
	mov	r0, r5
	bl	PMAP_UNLOCK
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L1
	mov	r0, #0
	bl	vm_wait
.L4:
	mov	r0, r5
	bl	PMAP_LOCK
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	bl	pmap_pkru_deassign
	subs	r4, r0, #0
	bne	.L3
	mov	r3, r4
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	bl	pmap_pkru_update_range
	b	.L3
.L1:
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	ENOMEM
	.size	pmap_pkru_clear, .-pmap_pkru_clear
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
