	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_map_pgtbl                 ## -- Begin function dmar_map_pgtbl
	.p2align	4, 0x90
_dmar_map_pgtbl:                        ## @dmar_map_pgtbl
	.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
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_VM_OBJECT_WLOCK
LBB0_2:
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_vm_page_lookup
	movq	%rax, %r12
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_10
LBB0_3:
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_VM_OBJECT_WUNLOCK
LBB0_5:
	movl	%ebx, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_sched_pin
	movq	_SFB_CPUPRIVATE@GOTPCREL(%rip), %rax
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r14d, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_SFB_NOWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_7:
	orl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_sf_buf_alloc
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	andl	%eax, %r14d
	cmpl	%eax, %r14d
	jne	LBB0_18
## %bb.9:
	movl	%r15d, %edi
	callq	_VM_OBJECT_WLOCK
	jmp	LBB0_20
LBB0_10:
	movq	_DMAR_PGF_ALLOC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r14d, %edx
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_dmar_pgalloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_3
LBB0_12:
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_24
## %bb.22:
	movl	%ebx, %edi
	jmp	LBB0_23
LBB0_14:
	xorl	%eax, %eax
	callq	_sched_unpin
	testq	%r12, %r12
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %edi
	callq	_VM_OBJECT_ASSERT_WLOCKED
	movl	(%r13), %esi
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r14d, %edx
	movl	%r15d, %edi
	callq	_dmar_pgfree
LBB0_16:
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_24
## %bb.21:
	movl	%r15d, %edi
LBB0_23:
	callq	_VM_OBJECT_WUNLOCK
LBB0_24:
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_18:
	testl	%r14d, %r14d
	jne	LBB0_20
## %bb.19:
	movl	%r15d, %edi
	callq	_VM_OBJECT_WUNLOCK
LBB0_20:
	movq	(%rbx), %rdi
	callq	_sf_buf_kva
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_PGF_OBJL,4,2              ## @DMAR_PGF_OBJL
	.comm	_DMAR_PGF_ALLOC,4,2             ## @DMAR_PGF_ALLOC
	.comm	_DMAR_PGF_WAITOK,4,2            ## @DMAR_PGF_WAITOK
	.comm	_SFB_CPUPRIVATE,4,2             ## @SFB_CPUPRIVATE
	.comm	_SFB_NOWAIT,4,2                 ## @SFB_NOWAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_map_pgtbl                 ; -- Begin function dmar_map_pgtbl
	.p2align	2
_dmar_map_pgtbl:                        ; @dmar_map_pgtbl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _DMAR_PGF_OBJL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DMAR_PGF_OBJL@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w2
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_VM_OBJECT_WLOCK
LBB0_2:
	mov	x0, x19
	mov	x1, x24
	bl	_vm_page_lookup
	mov	x22, x0
	mov	x23, x0
	cbz	x0, LBB0_8
LBB0_3:
Lloh2:
	adrp	x24, _DMAR_PGF_WAITOK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMAR_PGF_WAITOK@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
LBB0_5:
	bl	_sched_pin
Lloh4:
	adrp	x8, _SFB_CPUPRIVATE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SFB_CPUPRIVATE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x24]
Lloh7:
	adrp	x10, _SFB_NOWAIT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _SFB_NOWAIT@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, w10, wzr, eq
	orr	w1, w9, w8
	mov	x0, x23
	bl	_sf_buf_alloc
	str	x0, [x21]
	cbz	x0, LBB0_10
; %bb.6:
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w9, w9, w8
	and	w8, w9, w20
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.7:
	mov	x0, x19
	bl	_VM_OBJECT_WLOCK
	b	LBB0_17
LBB0_8:
Lloh10:
	adrp	x8, _DMAR_PGF_ALLOC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMAR_PGF_ALLOC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.9:
	ldr	w8, [x25]
	orr	w2, w8, w20
	mov	x0, x19
	mov	x1, x24
	bl	_dmar_pgalloc
	mov	x23, x0
	cbnz	x0, LBB0_3
	b	LBB0_12
LBB0_10:
	bl	_sched_unpin
	cbnz	x22, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_VM_OBJECT_ASSERT_WLOCKED
	ldr	w1, [x23]
	ldr	w8, [x25]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_dmar_pgfree
LBB0_12:
	ldr	w8, [x25]
	tst	w8, w20
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
LBB0_14:
	mov	x0, #0
	b	LBB0_18
LBB0_15:
	cbnz	w8, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
LBB0_17:
	ldr	x0, [x21]
	bl	_sf_buf_kva
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_PGF_OBJL,4,2              ; @DMAR_PGF_OBJL
	.comm	_DMAR_PGF_ALLOC,4,2             ; @DMAR_PGF_ALLOC
	.comm	_DMAR_PGF_WAITOK,4,2            ; @DMAR_PGF_WAITOK
	.comm	_SFB_CPUPRIVATE,4,2             ; @SFB_CPUPRIVATE
	.comm	_SFB_NOWAIT,4,2                 ; @SFB_NOWAIT
.subsections_via_symbols
