	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_evict_userptr    ## -- Begin function amdgpu_amdkfd_evict_userptr
	.p2align	4, 0x90
_amdgpu_amdkfd_evict_userptr:           ## @amdgpu_amdkfd_evict_userptr
	.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	%rsi, %r15
	movq	8(%rdi), %r14
	callq	_atomic_inc_return
	leaq	4(%r14), %rdi
	callq	_atomic_inc_return
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_kgd2kfd_quiesce_mm
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_3:
	movq	_AMDGPU_USERPTR_RESTORE_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to quiesce KFD\n"

	.comm	_AMDGPU_USERPTR_RESTORE_DELAY_MS,4,2 ## @AMDGPU_USERPTR_RESTORE_DELAY_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_amdkfd_evict_userptr    ; -- Begin function amdgpu_amdkfd_evict_userptr
	.p2align	2
_amdgpu_amdkfd_evict_userptr:           ; @amdgpu_amdkfd_evict_userptr
	.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
	ldr	x19, [x0, #8]
	bl	_atomic_inc_return
	add	x0, x19, #4
	bl	_atomic_inc_return
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_kgd2kfd_quiesce_mm
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
Lloh2:
	adrp	x8, _AMDGPU_USERPTR_RESTORE_DELAY_MS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AMDGPU_USERPTR_RESTORE_DELAY_MS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_schedule_delayed_work
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to quiesce KFD\n"

	.comm	_AMDGPU_USERPTR_RESTORE_DELAY_MS,4,2 ; @AMDGPU_USERPTR_RESTORE_DELAY_MS
.subsections_via_symbols
