	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pasid_get_entry          ## -- Begin function intel_pasid_get_entry
	.p2align	4, 0x90
_intel_pasid_get_entry:                 ## @intel_pasid_get_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_intel_pasid_get_table
	movq	%rax, %r14
	movl	$1, %edi
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.1:
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_intel_pasid_get_dev_max_id
	xorl	%edi, %edi
	cmpl	%r15d, %eax
	setle	%dil
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_5:
	movq	_PASID_PDE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r15d, %eax
	sarl	%cl, %eax
	movq	(%rbx), %r12
	movq	_PASID_PTE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r15d
	movslq	%eax, %rbx
	shlq	$2, %rbx
	addq	(%r14), %rbx
	movq	_pasid_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_get_pasid_table_from_pde
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_alloc_pgtable_page
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r14
	movl	(%rbx), %ebx
	movq	%rax, %rdi
	callq	_virt_to_phys
	movq	_PASID_PTE_PRESENT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
LBB0_9:
	movslq	%r15d, %rbx
	movq	_pasid_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	leaq	(%r14,%rbx,4), %rax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_pasid_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PASID_PDE_SHIFT,4,2            ## @PASID_PDE_SHIFT
	.comm	_PASID_PTE_MASK,4,2             ## @PASID_PTE_MASK
	.comm	_pasid_lock,4,2                 ## @pasid_lock
	.comm	_PASID_PTE_PRESENT,4,2          ## @PASID_PTE_PRESENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_pasid_get_entry          ; -- Begin function intel_pasid_get_entry
	.p2align	2
_intel_pasid_get_entry:                 ; @intel_pasid_get_entry
	.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	x19, x1
	mov	x20, x0
	bl	_intel_pasid_get_table
	mov	x21, x0
	mov	w0, #1
	tbnz	w19, #31, LBB0_3
; %bb.1:
	cbz	x21, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_intel_pasid_get_dev_max_id
	cmp	w0, w19
	cset	w0, le
LBB0_3:
	bl	_WARN_ON
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, #0
	b	LBB0_9
LBB0_5:
	ldr	x21, [x21]
Lloh0:
	adrp	x8, _PASID_PDE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PASID_PDE_SHIFT@GOTPAGEOFF]
	ldr	x23, [x20]
Lloh2:
	ldr	w8, [x8]
	asr	w20, w19, w8
Lloh3:
	adrp	x8, _PASID_PTE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PASID_PTE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x0, _pasid_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _pasid_lock@GOTPAGEOFF]
	bl	_spin_lock
	add	x21, x21, w20, sxtw #2
	mov	x0, x21
	bl	_get_pasid_table_from_pde
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_alloc_pgtable_page
	cbz	x0, LBB0_10
; %bb.7:
	mov	x20, x0
	ldr	w21, [x21]
	bl	_virt_to_phys
Lloh8:
	adrp	x8, _PASID_PTE_PRESENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PASID_PTE_PRESENT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x21
	bl	_WRITE_ONCE
LBB0_8:
	and	w19, w22, w19
Lloh11:
	adrp	x0, _pasid_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _pasid_lock@GOTPAGEOFF]
	bl	_spin_unlock
	add	x0, x20, w19, sxtw #2
LBB0_9:
	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_10:
Lloh13:
	adrp	x0, _pasid_lock@GOTPAGE
Lloh14:
	ldr	x0, [x0, _pasid_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PASID_PDE_SHIFT,4,2            ; @PASID_PDE_SHIFT
	.comm	_PASID_PTE_MASK,4,2             ; @PASID_PTE_MASK
	.comm	_pasid_lock,4,2                 ; @pasid_lock
	.comm	_PASID_PTE_PRESENT,4,2          ; @PASID_PTE_PRESENT
.subsections_via_symbols
