	.file	"extr_pmap.c_pmap_remove_kernel_pde.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"pmap_remove_kernel_pde: Missing pt page."
	.text
	.p2align 4
	.type	pmap_remove_kernel_pde, @function
pmap_remove_kernel_pde:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	cmp	QWORD PTR kernel_pmap[rip], rdi
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sete	dil
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movzx	edi, dil
	mov	rsi, rbp
	call	KASSERT@PLT
	mov	esi, DWORD PTR MA_OWNED[rip]
	mov	rdi, rbp
	call	PMAP_LOCK_ASSERT@PLT
	mov	esi, r13d
	mov	rdi, rbp
	call	pmap_remove_pt_page@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L8
.L2:
	mov	rdi, rbx
	call	VM_PAGE_TO_PHYS@PLT
	mov	r12d, DWORD PTR X86_PG_M[rip]
	or	r12d, DWORD PTR X86_PG_A[rip]
	or	r12d, DWORD PTR X86_PG_RW[rip]
	or	r12d, DWORD PTR X86_PG_V[rip]
	or	r12d, eax
	cmp	QWORD PTR [rbx], 0
	jne	.L9
.L3:
	cmp	QWORD PTR workaround_erratum383[rip], 0
	je	.L4
	mov	ecx, r12d
	mov	rdx, r14
	mov	esi, r13d
	mov	rdi, rbp
	call	pmap_update_pde@PLT
.L5:
	mov	edi, r13d
	call	vtopte@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	rsi, rax
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	pmap_invalidate_page@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	esi, r12d
	mov	rdi, r14
	call	pde_store@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, eax
	call	PHYS_TO_DMAP@PLT
	mov	rdi, rax
	call	pagezero@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	pmap_remove_kernel_pde, .-pmap_remove_kernel_pde
	.comm	workaround_erratum383,8,8
	.comm	kernel_pmap,8,8
	.comm	X86_PG_V,4,4
	.comm	X86_PG_RW,4,4
	.comm	X86_PG_M,4,4
	.comm	X86_PG_A,4,4
	.comm	MA_OWNED,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_remove_kernel_pde.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pmap_remove_kernel_pde: Missing pt page.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmap_remove_kernel_pde, %function
pmap_remove_kernel_pde:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r3, .L13
	mov	r7, r1
	mov	r1, r0
	ldr	r0, [r3]
	mov	r6, r2
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, .L13+4
	mov	r0, r5
	ldr	r1, [r3]
	bl	PMAP_LOCK_ASSERT
	mov	r1, r6
	mov	r0, r5
	bl	pmap_remove_pt_page
	subs	r8, r0, #0
	beq	.L11
.L2:
	mov	r0, r8
	bl	VM_PAGE_TO_PHYS
	ldr	r3, .L13+8
	ldr	r2, .L13+12
	ldr	r1, [r3]
	ldr	r3, .L13+16
	ldr	r4, [r2]
	ldr	r3, [r3]
	orr	r4, r4, r1
	orr	r4, r4, r3
	ldr	r3, .L13+20
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, #0
	orr	r4, r4, r3
	orr	r4, r4, r0
	bne	.L12
.L3:
	ldr	r3, .L13+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	mov	r3, r4
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	bl	pmap_update_pde
.L5:
	mov	r0, r6
	bl	vtopte
	mov	r1, r0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmap_invalidate_page
.L4:
	mov	r1, r4
	mov	r0, r7
	bl	pde_store
	b	.L5
.L12:
	bl	PHYS_TO_DMAP
	bl	pagezero
	b	.L3
.L11:
	ldr	r0, .L13+28
	bl	panic
	b	.L2
.L14:
	.align	2
.L13:
	.word	kernel_pmap
	.word	MA_OWNED
	.word	X86_PG_A
	.word	X86_PG_M
	.word	X86_PG_RW
	.word	X86_PG_V
	.word	workaround_erratum383
	.word	.LC0
	.size	pmap_remove_kernel_pde, .-pmap_remove_kernel_pde
	.comm	workaround_erratum383,4,4
	.comm	kernel_pmap,4,4
	.comm	X86_PG_V,4,4
	.comm	X86_PG_RW,4,4
	.comm	X86_PG_M,4,4
	.comm	X86_PG_A,4,4
	.comm	MA_OWNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
