	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_pasid_states
_free_pasid_states:                     ## @free_pasid_states
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_get_pasid_state
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_put_pasid_state
	movq	%r15, %rdi
	addq	$4, %rdi
	movl	(%r15), %esi
	callq	_mmu_notifier_unregister
	movq	%r15, %rdi
	callq	_put_pasid_state_wait
	movq	%r14, %rdi
	callq	_put_device_state
	jmp	LBB0_4
LBB0_5:
	movl	4(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.7:
	movq	8(%r14), %rdi
	callq	_free_pasid_states_level2
	jmp	LBB0_10
LBB0_8:
	movq	8(%r14), %rdi
	callq	_free_pasid_states_level1
	jmp	LBB0_10
LBB0_9:
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_BUG_ON
LBB0_10:
	movq	8(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_page                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_free_pasid_states
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_pasid_states
_free_pasid_states:                     ; @free_pasid_states
	.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	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_get_pasid_state
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x0
	bl	_put_pasid_state
	mov	x0, x21
	ldr	w1, [x0], #4
	bl	_mmu_notifier_unregister
	mov	x0, x21
	bl	_put_pasid_state_wait
	mov	x0, x19
	bl	_put_device_state
	b	LBB0_2
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.6:
	cmp	w8, #2
	b.ne	LBB0_9
; %bb.7:
	ldr	x0, [x19, #8]
	bl	_free_pasid_states_level2
	b	LBB0_10
LBB0_8:
	ldr	x0, [x19, #8]
	bl	_free_pasid_states_level1
	b	LBB0_10
LBB0_9:
	cmp	w8, #0
	cset	w0, ne
	bl	_BUG_ON
LBB0_10:
	ldr	x0, [x19, #8]
	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	_free_page
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_free_pasid_states
.subsections_via_symbols
