	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function finish_pri_tag
_finish_pri_tag:                        ## @finish_pri_tag
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	leaq	(%r14,%r14,2), %r12
	leaq	(%rax,%r12,4), %rdi
	addq	$8, %rdi
	callq	_atomic_dec_and_test
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	cmpl	$0, (%rax,%r12,4)
	je	LBB0_3
## %bb.2:
	movl	(%r15), %edi
	movl	16(%rbx), %esi
	leaq	(,%r14,4), %rcx
	leaq	(%rcx,%rcx,2), %r15
	movl	4(%rax,%r15), %edx
	movq	%r14, %rcx
	callq	_amd_iommu_complete_ppr
	movq	8(%rbx), %rax
	movl	$0, (%rax,%r15)
	movq	_PPR_SUCCESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax,%r15)
LBB0_3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PPR_SUCCESS,4,2                ## @PPR_SUCCESS
	.no_dead_strip	_finish_pri_tag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function finish_pri_tag
_finish_pri_tag:                        ; @finish_pri_tag
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	mov	w9, #12
	madd	x8, x20, x9, x8
	add	x0, x8, #8
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	mov	w9, #12
	mul	x9, x20, x9
	ldr	w9, [x8, x9]
	cbz	w9, LBB0_3
; %bb.2:
	ldr	w0, [x21]
	ldr	w1, [x19, #16]
	add	x9, x20, x20, lsl #1
	lsl	x21, x9, #2
	add	x8, x8, x21
	ldr	w2, [x8, #4]
	mov	x3, x20
	bl	_amd_iommu_complete_ppr
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	str	wzr, [x8]
Lloh0:
	adrp	x9, _PPR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PPR_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8, #4]
LBB0_3:
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PPR_SUCCESS,4,2                ; @PPR_SUCCESS
	.no_dead_strip	_finish_pri_tag
.subsections_via_symbols
