	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_vm_prt_fini
_amdgpu_vm_prt_fini:                    ## @amdgpu_vm_prt_fini
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	(%rax), %r14
	leaq	-48(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r14, %rdi
	callq	_dma_resv_get_fences_rcu
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_dma_resv_wait_timeout_rcu
	jmp	LBB0_6
LBB0_2:
	movq	%r15, %rdi
	callq	_amdgpu_vm_prt_get
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_amdgpu_vm_add_prt_cb
	cmpl	$0, -28(%rbp)
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_amdgpu_vm_prt_get
	movq	-40(%rbp), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%r15, %rdi
	callq	_amdgpu_vm_add_prt_cb
	incq	%rbx
	movl	-28(%rbp), %eax
	cmpq	%rax, %rbx
	jb	LBB0_4
LBB0_5:
	movq	-40(%rbp), %rdi
	callq	_kfree
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
	.no_dead_strip	_amdgpu_vm_prt_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_vm_prt_fini
_amdgpu_vm_prt_fini:                    ; @amdgpu_vm_prt_fini
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	ldr	x8, [x1]
	ldr	x20, [x8]
	add	x1, sp, #24
	add	x2, sp, #12
	add	x3, sp, #16
	mov	x0, x20
	bl	_dma_resv_get_fences_rcu
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_dma_resv_wait_timeout_rcu
	b	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_amdgpu_vm_prt_get
	ldr	x1, [sp, #24]
	mov	x0, x19
	bl	_amdgpu_vm_add_prt_cb
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x20, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_amdgpu_vm_prt_get
	ldr	x8, [sp, #16]
	ldr	x1, [x8, x20, lsl #3]
	mov	x0, x19
	bl	_amdgpu_vm_add_prt_cb
	add	x20, x20, #1
	ldr	w8, [sp, #12]
	cmp	x20, x8
	b.lo	LBB0_4
LBB0_5:
	ldr	x0, [sp, #16]
	bl	_kfree
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
	.no_dead_strip	_amdgpu_vm_prt_fini
.subsections_via_symbols
