	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_disable_protect_mem_regions
_iommu_disable_protect_mem_regions:     ## @iommu_disable_protect_mem_regions
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_cap_plmr
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	16(%r15), %edi
	callq	_cap_phmr
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%r15, %rdi
	callq	_raw_spin_lock_irqsave
	movq	_DMAR_PMEN_REG@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	_readl@GOTPCREL(%rip), %r14
	movq	_DMA_PMEN_EPM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	(%r12), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	(%r12), %rsi
	movq	_DMA_PMEN_PRS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%ebx, %eax
	sete	%cl
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	%ebx, %r8d
	callq	_IOMMU_WAIT_OP
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_raw_spin_unlock_irqrestore     ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_PMEN_REG,8,3              ## @DMAR_PMEN_REG
	.comm	_DMA_PMEN_EPM,4,2               ## @DMA_PMEN_EPM
	.comm	_DMA_PMEN_PRS,4,2               ## @DMA_PMEN_PRS
	.no_dead_strip	_iommu_disable_protect_mem_regions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_disable_protect_mem_regions
_iommu_disable_protect_mem_regions:     ; @iommu_disable_protect_mem_regions
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_cap_plmr
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	bl	_cap_phmr
	cbz	w0, LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_raw_spin_lock_irqsave
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x22, _DMAR_PMEN_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DMAR_PMEN_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x20, _readl@GOTPAGE
Lloh3:
	ldr	x20, [x20, _readl@GOTPAGEOFF]
Lloh4:
	adrp	x8, _DMA_PMEN_EPM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_PMEN_EPM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w21, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x1, [x22]
Lloh7:
	adrp	x8, _DMA_PMEN_PRS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_PMEN_PRS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w21
	cset	w3, eq
	mov	x0, x19
	mov	x2, x20
	mov	x4, x21
	bl	_IOMMU_WAIT_OP
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_raw_spin_unlock_irqrestore
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_PMEN_REG,8,3              ; @DMAR_PMEN_REG
	.comm	_DMA_PMEN_EPM,4,2               ; @DMA_PMEN_EPM
	.comm	_DMA_PMEN_PRS,4,2               ; @DMA_PMEN_PRS
	.no_dead_strip	_iommu_disable_protect_mem_regions
.subsections_via_symbols
