	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amd_iommu_unbind_pasid         ## -- Begin function amd_iommu_unbind_pasid
	.p2align	4, 0x90
_amd_iommu_unbind_pasid:                ## @amd_iommu_unbind_pasid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_might_sleep
	xorl	%eax, %eax
	callq	_amd_iommu_v2_supported
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_device_id
	movl	%eax, %edi
	callq	_get_device_state
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.3:
	cmpl	%r14d, (%rbx)
	jle	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_get_pasid_state
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_put_pasid_state
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_clear_pasid_state
	movq	%r14, %rdi
	addq	$4, %rdi
	movl	(%r14), %esi
	callq	_mmu_notifier_unregister
	movq	%r14, %rdi
	callq	_put_pasid_state_wait
LBB0_6:
	movq	%rbx, %rdi
	callq	_put_device_state
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_put_device_state               ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amd_iommu_unbind_pasid         ; -- Begin function amd_iommu_unbind_pasid
	.p2align	2
_amd_iommu_unbind_pasid:                ; @amd_iommu_unbind_pasid
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_might_sleep
	bl	_amd_iommu_v2_supported
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_device_id
	bl	_get_device_state
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
	tbnz	w20, #31, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, w20
	b.le	LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_get_pasid_state
	cbz	x0, LBB0_6
; %bb.5:
	mov	x20, x0
	bl	_put_pasid_state
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_clear_pasid_state
	add	x0, x20, #4
	ldr	w1, [x20]
	bl	_mmu_notifier_unregister
	mov	x0, x20
	bl	_put_pasid_state_wait
LBB0_6:
	mov	x0, x19
	bl	_put_device_state
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_put_device_state
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
