	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_pgalloc                   ## -- Begin function dmar_pgalloc
	.p2align	4, 0x90
_dmar_pgalloc:                          ## @dmar_pgalloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_DMAR_PGF_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%edx, %ecx
	je	LBB0_2
## %bb.1:
	movq	_VM_ALLOC_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_2:
	movq	_VM_ALLOC_NOBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	orl	%ecx, %r12d
	movq	_VM_ALLOC_SYSTEM@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_VM_ALLOC_NODUMP@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
## %bb.4:
	movq	_VM_ALLOC_NOWAIT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_VM_ALLOC_WAITFAIL@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	callq	_VM_OBJECT_WLOCK
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_vm_page_lookup
	movq	%rax, %rbx
	movq	_DMAR_PGF_NOALLOC@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_dmar_high@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VM_MEMATTR_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subq	$8, %rsp
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	pushq	%rbx
	pushq	$0
	pushq	%rax
	callq	_vm_page_alloc_contig
	addq	$32, %rsp
	movq	%rax, %rbx
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	callq	_VM_OBJECT_WUNLOCK
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_15
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_6
## %bb.20:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_10:
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	jne	LBB0_21
## %bb.11:
	movl	%r14d, %edi
	callq	_VM_OBJECT_WUNLOCK
	jmp	LBB0_21
LBB0_15:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
## %bb.16:
	movq	_PG_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	callq	_pmap_zero_page
LBB0_18:
	movq	_dmar_tbl_pagecnt@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_add_int
LBB0_21:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_PGF_ZERO,4,2              ## @DMAR_PGF_ZERO
	.comm	_VM_ALLOC_ZERO,4,2              ## @VM_ALLOC_ZERO
	.comm	_VM_ALLOC_NOBUSY,4,2            ## @VM_ALLOC_NOBUSY
	.comm	_VM_ALLOC_SYSTEM,4,2            ## @VM_ALLOC_SYSTEM
	.comm	_VM_ALLOC_NODUMP,4,2            ## @VM_ALLOC_NODUMP
	.comm	_DMAR_PGF_WAITOK,4,2            ## @DMAR_PGF_WAITOK
	.comm	_VM_ALLOC_WAITFAIL,4,2          ## @VM_ALLOC_WAITFAIL
	.comm	_VM_ALLOC_NOWAIT,4,2            ## @VM_ALLOC_NOWAIT
	.comm	_DMAR_PGF_OBJL,4,2              ## @DMAR_PGF_OBJL
	.comm	_DMAR_PGF_NOALLOC,4,2           ## @DMAR_PGF_NOALLOC
	.comm	_dmar_high,4,2                  ## @dmar_high
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_VM_MEMATTR_DEFAULT,4,2         ## @VM_MEMATTR_DEFAULT
	.comm	_PG_ZERO,4,2                    ## @PG_ZERO
	.comm	_dmar_tbl_pagecnt,4,2           ## @dmar_tbl_pagecnt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_pgalloc                   ; -- Begin function dmar_pgalloc
	.p2align	2
_dmar_pgalloc:                          ; @dmar_pgalloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DMAR_PGF_ZERO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_PGF_ZERO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _VM_ALLOC_ZERO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VM_ALLOC_ZERO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w8, w2
	csel	w9, wzr, w9, eq
Lloh6:
	adrp	x8, _VM_ALLOC_NOBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VM_ALLOC_NOBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _VM_ALLOC_SYSTEM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VM_ALLOC_SYSTEM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _VM_ALLOC_NODUMP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _VM_ALLOC_NODUMP@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh14:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _DMAR_PGF_WAITOK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMAR_PGF_WAITOK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _VM_ALLOC_WAITFAIL@GOTPAGE
Lloh19:
	ldr	x10, [x10, _VM_ALLOC_WAITFAIL@GOTPAGEOFF]
Lloh20:
	adrp	x11, _VM_ALLOC_NOWAIT@GOTPAGE
Lloh21:
	ldr	x11, [x11, _VM_ALLOC_NOWAIT@GOTPAGEOFF]
	tst	w9, w2
	csel	x9, x11, x10, eq
	ldr	w9, [x9]
	orr	w22, w8, w9
Lloh22:
	adrp	x26, _DMAR_PGF_OBJL@GOTPAGE
Lloh23:
	ldr	x26, [x26, _DMAR_PGF_OBJL@GOTPAGEOFF]
Lloh24:
	adrp	x27, _DMAR_PGF_NOALLOC@GOTPAGE
Lloh25:
	ldr	x27, [x27, _DMAR_PGF_NOALLOC@GOTPAGEOFF]
Lloh26:
	adrp	x28, _dmar_high@GOTPAGE
Lloh27:
	ldr	x28, [x28, _dmar_high@GOTPAGEOFF]
Lloh28:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh29:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
Lloh30:
	adrp	x25, _VM_MEMATTR_DEFAULT@GOTPAGE
Lloh31:
	ldr	x25, [x25, _VM_MEMATTR_DEFAULT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	tst	w8, w20
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_VM_OBJECT_WLOCK
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vm_page_lookup
	ldr	w8, [x27]
	and	w8, w8, w20
	cmp	w8, #0
	ccmp	x0, #0, #0, eq
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w5, [x28]
	ldr	w6, [x24]
	ldr	w8, [x25]
	str	w8, [sp]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	w3, #1
	mov	w4, #0
	mov	w7, #0
	bl	_vm_page_alloc_contig
	mov	x23, x0
	ldr	w8, [x26]
	tst	w8, w20
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbnz	x23, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh32:
	adrp	x8, _DMAR_PGF_WAITOK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DMAR_PGF_WAITOK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_1
; %bb.8:
	mov	x23, #0
	b	LBB0_15
LBB0_9:
	mov	x23, x0
	ldr	w8, [x26]
	tst	w8, w20
	b.ne	LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
	b	LBB0_15
LBB0_11:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.12:
	ldr	w8, [x23]
Lloh35:
	adrp	x9, _PG_ZERO@GOTPAGE
Lloh36:
	ldr	x9, [x9, _PG_ZERO@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x23
	bl	_pmap_zero_page
LBB0_14:
Lloh38:
	adrp	x0, _dmar_tbl_pagecnt@GOTPAGE
Lloh39:
	ldr	x0, [x0, _dmar_tbl_pagecnt@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_add_int
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_PGF_ZERO,4,2              ; @DMAR_PGF_ZERO
	.comm	_VM_ALLOC_ZERO,4,2              ; @VM_ALLOC_ZERO
	.comm	_VM_ALLOC_NOBUSY,4,2            ; @VM_ALLOC_NOBUSY
	.comm	_VM_ALLOC_SYSTEM,4,2            ; @VM_ALLOC_SYSTEM
	.comm	_VM_ALLOC_NODUMP,4,2            ; @VM_ALLOC_NODUMP
	.comm	_DMAR_PGF_WAITOK,4,2            ; @DMAR_PGF_WAITOK
	.comm	_VM_ALLOC_WAITFAIL,4,2          ; @VM_ALLOC_WAITFAIL
	.comm	_VM_ALLOC_NOWAIT,4,2            ; @VM_ALLOC_NOWAIT
	.comm	_DMAR_PGF_OBJL,4,2              ; @DMAR_PGF_OBJL
	.comm	_DMAR_PGF_NOALLOC,4,2           ; @DMAR_PGF_NOALLOC
	.comm	_dmar_high,4,2                  ; @dmar_high
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_VM_MEMATTR_DEFAULT,4,2         ; @VM_MEMATTR_DEFAULT
	.comm	_PG_ZERO,4,2                    ; @PG_ZERO
	.comm	_dmar_tbl_pagecnt,4,2           ; @dmar_tbl_pagecnt
.subsections_via_symbols
