	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_dte_entry
_set_dte_entry:                         ## @set_dte_entry
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r8
	movq	%rdi, %r12
	movq	(%rsi), %rbx
	movq	_PAGE_MODE_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_2:
	movl	36(%r8), %edi
	callq	_iommu_virt_to_phys
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	(%r8), %rbx
LBB0_3:
	movq	_DEV_ENTRY_MODE_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rbx
	movq	_DEV_ENTRY_MODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rbx
	orq	%rax, %rbx
	movq	_DTE_FLAG_IR@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_DTE_FLAG_IW@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_DTE_FLAG_V@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_DTE_FLAG_TV@GOTPCREL(%rip), %rax
	movq	_amd_iommu_dev_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r12,8), %rcx
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.5:
	movq	_DTE_FLAG_IOTLB@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r14
	jmp	LBB0_6
LBB0_4:
	xorl	%r14d, %r14d
LBB0_6:
	orq	8(%rcx), %r14
	orq	(%rax), %rbx
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.7:
	movq	_amd_iommu_rlookup_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rdi
	movq	_FEATURE_EPHSUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_iommu_feature
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	_DEV_ENTRY_PPR@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shlq	%cl, %rdx
	testq	%rax, %rax
	cmoveq	%rax, %rdx
	orq	%rdx, %rbx
LBB0_8:
	movq	_PD_IOMMUV2_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r8)
	je	LBB0_10
## %bb.9:
	movl	32(%r8), %edi
	callq	_iommu_virt_to_phys
	movq	%rax, %r15
	movq	_DTE_FLAG_GV@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_DTE_GLX_MASK@GOTPCREL(%rip), %rax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	andq	16(%rax), %r12
	movq	_DTE_GLX_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r12
	movq	$-1, %rdi
	callq	_DTE_GCR3_VAL_B
	movq	%rax, %r13
	movq	_DTE_GCR3_SHIFT_B@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r13
	movq	$-1, %rdi
	callq	_DTE_GCR3_VAL_C
	movq	_DTE_GCR3_SHIFT_C@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	%r13, %rax
	notq	%rax
	andq	%rax, %r14
	movq	%r15, %rdi
	callq	_DTE_GCR3_VAL_A
	movq	_DTE_GCR3_SHIFT_A@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	%r12, %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	orq	%rax, %rbx
	movq	%r15, %rdi
	callq	_DTE_GCR3_VAL_B
	movq	%rax, %r13
	movq	_DTE_GCR3_SHIFT_B@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r13
	movq	%r15, %rdi
	callq	_DTE_GCR3_VAL_C
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	_DTE_GCR3_SHIFT_C@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	%r13, %rax
	orq	%rax, %r14
LBB0_10:
	movq	_DEV_DOMID_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, %rax
	notq	%rax
	andq	%r14, %rax
	orq	24(%r8), %rax
	movq	_amd_iommu_dev_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r12,8), %rcx
	andl	8(%rcx), %esi
	movq	%rax, 8(%rcx)
	movq	%rbx, (%rcx)
	je	LBB0_11
## %bb.12:
	movq	_amd_iommu_rlookup_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amd_iommu_flush_tlb_domid      ## TAILCALL
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MODE_NONE,8,3             ## @PAGE_MODE_NONE
	.comm	_DEV_ENTRY_MODE_MASK,8,3        ## @DEV_ENTRY_MODE_MASK
	.comm	_DEV_ENTRY_MODE_SHIFT,8,3       ## @DEV_ENTRY_MODE_SHIFT
	.comm	_DTE_FLAG_IR,8,3                ## @DTE_FLAG_IR
	.comm	_DTE_FLAG_IW,8,3                ## @DTE_FLAG_IW
	.comm	_DTE_FLAG_V,8,3                 ## @DTE_FLAG_V
	.comm	_DTE_FLAG_TV,8,3                ## @DTE_FLAG_TV
	.comm	_amd_iommu_dev_table,8,3        ## @amd_iommu_dev_table
	.comm	_DTE_FLAG_IOTLB,8,3             ## @DTE_FLAG_IOTLB
	.comm	_amd_iommu_rlookup_table,8,3    ## @amd_iommu_rlookup_table
	.comm	_FEATURE_EPHSUP,4,2             ## @FEATURE_EPHSUP
	.comm	_DEV_ENTRY_PPR,8,3              ## @DEV_ENTRY_PPR
	.comm	_PD_IOMMUV2_MASK,4,2            ## @PD_IOMMUV2_MASK
	.comm	_DTE_FLAG_GV,8,3                ## @DTE_FLAG_GV
	.comm	_DTE_GLX_MASK,8,3               ## @DTE_GLX_MASK
	.comm	_DTE_GLX_SHIFT,8,3              ## @DTE_GLX_SHIFT
	.comm	_DTE_GCR3_SHIFT_B,8,3           ## @DTE_GCR3_SHIFT_B
	.comm	_DTE_GCR3_SHIFT_C,8,3           ## @DTE_GCR3_SHIFT_C
	.comm	_DTE_GCR3_SHIFT_A,8,3           ## @DTE_GCR3_SHIFT_A
	.comm	_DEV_DOMID_MASK,8,3             ## @DEV_DOMID_MASK
	.no_dead_strip	_set_dte_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_dte_entry
_set_dte_entry:                         ; @set_dte_entry
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _PAGE_MODE_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_MODE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20, #36]
	bl	_iommu_virt_to_phys
	ldr	x8, [x20]
LBB0_3:
Lloh3:
	adrp	x9, _DEV_ENTRY_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEV_ENTRY_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	and	x8, x9, x8
Lloh6:
	adrp	x9, _DEV_ENTRY_MODE_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DEV_ENTRY_MODE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsl	x8, x8, x9
Lloh9:
	adrp	x9, _DTE_FLAG_IR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DTE_FLAG_IR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _DTE_FLAG_IW@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DTE_FLAG_IW@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
Lloh15:
	adrp	x11, _DTE_FLAG_V@GOTPAGE
Lloh16:
	ldr	x11, [x11, _DTE_FLAG_V@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
Lloh18:
	adrp	x12, _DTE_FLAG_TV@GOTPAGE
Lloh19:
	ldr	x12, [x12, _DTE_FLAG_TV@GOTPAGEOFF]
Lloh20:
	ldr	x12, [x12]
	orr	x8, x8, x0
	orr	x8, x8, x9
	orr	x8, x8, x10
	orr	x8, x8, x11
Lloh21:
	adrp	x23, _amd_iommu_dev_table@GOTPAGE
Lloh22:
	ldr	x23, [x23, _amd_iommu_dev_table@GOTPAGEOFF]
	orr	x24, x8, x12
	ldr	x8, [x23]
	ldr	x8, [x8, x19, lsl #3]
Lloh23:
	adrp	x9, _DTE_FLAG_IOTLB@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DTE_FLAG_IOTLB@GOTPAGEOFF]
	ldr	x25, [x8, #8]
Lloh25:
	ldr	x8, [x9]
	cmp	w22, #0
	csel	x26, xzr, x8, eq
Lloh26:
	adrp	x22, _amd_iommu_rlookup_table@GOTPAGE
Lloh27:
	ldr	x22, [x22, _amd_iommu_rlookup_table@GOTPAGEOFF]
	cbz	w21, LBB0_5
; %bb.4:
	ldr	x8, [x22]
	ldr	x0, [x8, x19, lsl #3]
Lloh28:
	adrp	x8, _FEATURE_EPHSUP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FEATURE_EPHSUP@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_iommu_feature
Lloh31:
	adrp	x8, _DEV_ENTRY_PPR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DEV_ENTRY_PPR@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	mov	w9, #1
	lsl	x8, x9, x8
	cmp	x0, #0
	csel	x8, xzr, x8, eq
	orr	x24, x8, x24
LBB0_5:
	orr	x25, x26, x25
	ldr	w8, [x20, #8]
Lloh34:
	adrp	x9, _PD_IOMMUV2_MASK@GOTPAGE
Lloh35:
	ldr	x9, [x9, _PD_IOMMUV2_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x20, #32]
	bl	_iommu_virt_to_phys
	mov	x21, x0
Lloh37:
	adrp	x8, _DTE_FLAG_GV@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DTE_FLAG_GV@GOTPAGEOFF]
	ldr	x9, [x20, #16]
Lloh39:
	ldr	x8, [x8]
	orr	x8, x8, x24
Lloh40:
	adrp	x10, _DTE_GLX_MASK@GOTPAGE
Lloh41:
	ldr	x10, [x10, _DTE_GLX_MASK@GOTPAGEOFF]
Lloh42:
	ldr	x10, [x10]
	and	x9, x10, x9
Lloh43:
	adrp	x10, _DTE_GLX_SHIFT@GOTPAGE
Lloh44:
	ldr	x10, [x10, _DTE_GLX_SHIFT@GOTPAGEOFF]
Lloh45:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x24, x8, x9
	mov	x0, #-1
	bl	_DTE_GCR3_VAL_B
Lloh46:
	adrp	x26, _DTE_GCR3_SHIFT_B@GOTPAGE
Lloh47:
	ldr	x26, [x26, _DTE_GCR3_SHIFT_B@GOTPAGEOFF]
	ldr	x8, [x26]
	lsl	x27, x0, x8
	mov	x0, #-1
	bl	_DTE_GCR3_VAL_C
Lloh48:
	adrp	x28, _DTE_GCR3_SHIFT_C@GOTPAGE
Lloh49:
	ldr	x28, [x28, _DTE_GCR3_SHIFT_C@GOTPAGEOFF]
	ldr	x8, [x28]
	lsl	x8, x0, x8
	orr	x8, x8, x27
	bic	x25, x25, x8
	mov	x0, x21
	bl	_DTE_GCR3_VAL_A
Lloh50:
	adrp	x8, _DTE_GCR3_SHIFT_A@GOTPAGE
Lloh51:
	ldr	x8, [x8, _DTE_GCR3_SHIFT_A@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
	lsl	x8, x0, x8
	orr	x24, x24, x8
	mov	x0, x21
	bl	_DTE_GCR3_VAL_B
	ldr	x8, [x26]
	lsl	x8, x0, x8
	orr	x25, x8, x25
	mov	x0, x21
	bl	_DTE_GCR3_VAL_C
	ldr	x8, [x28]
	lsl	x8, x0, x8
	orr	x25, x25, x8
LBB0_7:
Lloh53:
	adrp	x8, _DEV_DOMID_MASK@GOTPAGE
Lloh54:
	ldr	x8, [x8, _DEV_DOMID_MASK@GOTPAGEOFF]
Lloh55:
	ldr	x8, [x8]
	bic	x9, x25, x8
	ldr	x10, [x20, #24]
	orr	x9, x9, x10
	ldr	x10, [x23]
	ldr	x10, [x10, x19, lsl #3]
	ldr	w11, [x10, #8]
	stp	x24, x9, [x10]
	ands	w1, w11, w8
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x22]
	ldr	x0, [x8, x19, lsl #3]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_amd_iommu_flush_tlb_domid
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MODE_NONE,8,3             ; @PAGE_MODE_NONE
	.comm	_DEV_ENTRY_MODE_MASK,8,3        ; @DEV_ENTRY_MODE_MASK
	.comm	_DEV_ENTRY_MODE_SHIFT,8,3       ; @DEV_ENTRY_MODE_SHIFT
	.comm	_DTE_FLAG_IR,8,3                ; @DTE_FLAG_IR
	.comm	_DTE_FLAG_IW,8,3                ; @DTE_FLAG_IW
	.comm	_DTE_FLAG_V,8,3                 ; @DTE_FLAG_V
	.comm	_DTE_FLAG_TV,8,3                ; @DTE_FLAG_TV
	.comm	_amd_iommu_dev_table,8,3        ; @amd_iommu_dev_table
	.comm	_DTE_FLAG_IOTLB,8,3             ; @DTE_FLAG_IOTLB
	.comm	_amd_iommu_rlookup_table,8,3    ; @amd_iommu_rlookup_table
	.comm	_FEATURE_EPHSUP,4,2             ; @FEATURE_EPHSUP
	.comm	_DEV_ENTRY_PPR,8,3              ; @DEV_ENTRY_PPR
	.comm	_PD_IOMMUV2_MASK,4,2            ; @PD_IOMMUV2_MASK
	.comm	_DTE_FLAG_GV,8,3                ; @DTE_FLAG_GV
	.comm	_DTE_GLX_MASK,8,3               ; @DTE_GLX_MASK
	.comm	_DTE_GLX_SHIFT,8,3              ; @DTE_GLX_SHIFT
	.comm	_DTE_GCR3_SHIFT_B,8,3           ; @DTE_GCR3_SHIFT_B
	.comm	_DTE_GCR3_SHIFT_C,8,3           ; @DTE_GCR3_SHIFT_C
	.comm	_DTE_GCR3_SHIFT_A,8,3           ; @DTE_GCR3_SHIFT_A
	.comm	_DEV_DOMID_MASK,8,3             ; @DEV_DOMID_MASK
	.no_dead_strip	_set_dte_entry
.subsections_via_symbols
