	.file	"extr_intel_idpgtbl.c_domain_alloc_pgtbl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	domain_alloc_pgtbl
	.type	domain_alloc_pgtbl, @function
domain_alloc_pgtbl:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	xor	edi, edi
	cmp	QWORD PTR 8[rbx], 0
	mov	rsi, rbx
	sete	dil
	call	KASSERT@PLT
	mov	edi, DWORD PTR 16[rbx]
	call	pglvl_max_pages@PLT
	mov	edi, eax
	call	IDX_TO_OFF@PLT
	mov	edi, DWORD PTR OBJT_PHYS[rip]
	xor	r9d, r9d
	xor	ecx, ecx
	xor	r8d, r8d
	mov	edx, eax
	xor	esi, esi
	call	vm_pager_allocate@PLT
	mov	rdi, rbx
	mov	QWORD PTR 8[rbx], rax
	call	DMAR_DOMAIN_PGLOCK@PLT
	mov	rdi, QWORD PTR 8[rbx]
	xor	esi, esi
	mov	edx, DWORD PTR DMAR_PGF_WAITOK[rip]
	or	edx, DWORD PTR DMAR_PGF_ZERO[rip]
	or	edx, DWORD PTR DMAR_PGF_OBJL[rip]
	call	dmar_pgalloc@PLT
	mov	rdi, rbx
	mov	DWORD PTR [rax], 1
	call	DMAR_DOMAIN_PGUNLOCK@PLT
	mov	edi, DWORD PTR [rbx]
	call	DMAR_LOCK@PLT
	mov	eax, DWORD PTR DMAR_DOMAIN_PGTBL_INITED[rip]
	or	DWORD PTR 4[rbx], eax
	mov	edi, DWORD PTR [rbx]
	call	DMAR_UNLOCK@PLT
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	domain_alloc_pgtbl, .-domain_alloc_pgtbl
	.comm	OBJT_PHYS,4,4
	.comm	DMAR_PGF_ZERO,4,4
	.comm	DMAR_PGF_WAITOK,4,4
	.comm	DMAR_PGF_OBJL,4,4
	.comm	DMAR_DOMAIN_PGTBL_INITED,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_intel_idpgtbl.c_domain_alloc_pgtbl.c"
	.text
	.align	2
	.global	domain_alloc_pgtbl
	.syntax unified
	.arm
	.fpu softvfp
	.type	domain_alloc_pgtbl, %function
domain_alloc_pgtbl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r0, #8]
	sub	sp, sp, #8
	clz	r0, r0
	mov	r1, r4
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, .L4
	ldr	r0, [r4, #12]
	ldr	r6, [r3]
	bl	pglvl_max_pages
	bl	IDX_TO_OFF
	mov	r5, #0
	mov	r2, r0
	mov	r1, r5
	mov	r3, r5
	mov	r0, r6
	str	r5, [sp, #4]
	str	r5, [sp]
	bl	vm_pager_allocate
	mov	r3, r0
	mov	r0, r4
	str	r3, [r4, #8]
	bl	DMAR_DOMAIN_PGLOCK
	ldr	r3, .L4+4
	ldr	r1, .L4+8
	ldr	r2, .L4+12
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r3, r2
	mov	r1, r5
	ldr	r0, [r4, #8]
	bl	dmar_pgalloc
	mov	r2, #1
	mov	r3, r0
	mov	r0, r4
	str	r2, [r3]
	bl	DMAR_DOMAIN_PGUNLOCK
	ldr	r0, [r4]
	bl	DMAR_LOCK
	ldr	r2, .L4+16
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	ldr	r0, [r4]
	orr	r3, r3, r2
	str	r3, [r4, #4]
	bl	DMAR_UNLOCK
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	OBJT_PHYS
	.word	DMAR_PGF_WAITOK
	.word	DMAR_PGF_ZERO
	.word	DMAR_PGF_OBJL
	.word	DMAR_DOMAIN_PGTBL_INITED
	.size	domain_alloc_pgtbl, .-domain_alloc_pgtbl
	.comm	OBJT_PHYS,4,4
	.comm	DMAR_PGF_ZERO,4,4
	.comm	DMAR_PGF_WAITOK,4,4
	.comm	DMAR_PGF_OBJL,4,4
	.comm	DMAR_DOMAIN_PGTBL_INITED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
