	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pasid_setup_first_level  ## -- Begin function intel_pasid_setup_first_level
	.p2align	4, 0x90
_intel_pasid_setup_first_level:         ## @intel_pasid_setup_first_level
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r13d
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_ecap_flts
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_intel_pasid_get_entry
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:
	movq	%rbx, %rdi
	callq	_pasid_clear_entry
	movq	%r14, %rdi
	callq	___pa
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pasid_set_flptr
	movq	_PASID_FLAG_SUPERVISOR_MODE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.3:
	movl	4(%r12), %edi
	callq	_ecap_srs
	testl	%eax, %eax
	je	LBB0_15
## %bb.4:
	movq	%rbx, %rdi
	callq	_pasid_set_sre
LBB0_5:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_pasid_set_domain_id
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_pasid_set_address_width
	movl	4(%r12), %edi
	callq	_ecap_smpwc
	xorl	%esi, %esi
	testl	%eax, %eax
	setne	%sil
	movq	%rbx, %rdi
	callq	_pasid_set_page_snoop
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pasid_set_translation_type
	movq	%rbx, %rdi
	callq	_pasid_set_present
	movl	4(%r12), %edi
	callq	_ecap_coherent
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_clflush_cache_range
LBB0_7:
	movl	(%r12), %edi
	callq	_cap_caching_mode
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_pasid_cache_invalidation_with_pasid
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_iotlb_invalidation_with_pasid
	jmp	LBB0_14
LBB0_9:
	movl	12(%r12), %esi
	leaq	L_.str(%rip), %rdi
LBB0_10:
	callq	_pr_err
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r12, %rdi
	callq	_iommu_flush_write_buffer
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_15:
	movl	12(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No first level translation support on %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PASID_FLAG_SUPERVISOR_MODE,4,2 ## @PASID_FLAG_SUPERVISOR_MODE
L_.str.1:                               ## @.str.1
	.asciz	"No supervisor request support on %s\n"

	.comm	_X86_FEATURE_LA57,4,2           ## @X86_FEATURE_LA57
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pasid_setup_first_level  ; -- Begin function intel_pasid_setup_first_level
	.p2align	2
_intel_pasid_setup_first_level:         ; @intel_pasid_setup_first_level
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x5
	mov	x20, x4
	mov	x19, x3
	mov	x24, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_ecap_flts
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x22
	mov	x1, x19
	bl	_intel_pasid_get_entry
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_11
; %bb.2:
	mov	x0, x22
	bl	_pasid_clear_entry
	mov	x0, x24
	bl	___pa
	mov	x1, x0
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pasid_set_flptr
Lloh0:
	adrp	x8, _PASID_FLAG_SUPERVISOR_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PASID_FLAG_SUPERVISOR_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_5
; %bb.3:
	ldr	w0, [x21, #4]
	bl	_ecap_srs
	cbz	w0, LBB0_15
; %bb.4:
	mov	x0, x22
	bl	_pasid_set_sre
LBB0_5:
	mov	x0, x22
	mov	x1, x20
	bl	_pasid_set_domain_id
	ldr	w1, [x21, #8]
	mov	x0, x22
	bl	_pasid_set_address_width
	ldr	w0, [x21, #4]
	bl	_ecap_smpwc
	cmp	w0, #0
	cset	w1, ne
	mov	x0, x22
	bl	_pasid_set_page_snoop
	mov	x0, x22
	mov	w1, #1
	bl	_pasid_set_translation_type
	mov	x0, x22
	bl	_pasid_set_present
	ldr	w0, [x21, #4]
	bl	_ecap_coherent
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x22
	mov	w1, #4
	bl	_clflush_cache_range
LBB0_7:
	ldr	w0, [x21]
	bl	_cap_caching_mode
	cbz	x0, LBB0_13
; %bb.8:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_pasid_cache_invalidation_with_pasid
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_iotlb_invalidation_with_pasid
	b	LBB0_14
LBB0_9:
	ldr	w1, [x21, #12]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_pr_err
LBB0_11:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x21
	bl	_iommu_flush_write_buffer
LBB0_14:
	mov	w0, #0
	b	LBB0_12
LBB0_15:
	ldr	w1, [x21, #12]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No first level translation support on %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PASID_FLAG_SUPERVISOR_MODE,4,2 ; @PASID_FLAG_SUPERVISOR_MODE
l_.str.1:                               ; @.str.1
	.asciz	"No supervisor request support on %s\n"

	.comm	_X86_FEATURE_LA57,4,2           ; @X86_FEATURE_LA57
.subsections_via_symbols
