	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_pasid_free_delayed      ## -- Begin function amdgpu_pasid_free_delayed
	.p2align	4, 0x90
_amdgpu_pasid_free_delayed:             ## @amdgpu_pasid_free_delayed
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	-28(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	xorl	%esi, %esi
	callq	_dma_resv_get_fences_rcu
	testl	%eax, %eax
	je	LBB0_1
LBB0_11:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_dma_resv_wait_timeout_rcu
LBB0_12:
	movl	%r14d, %edi
	callq	_amdgpu_pasid_free
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	je	LBB0_5
## %bb.2:
	testl	%eax, %eax
	je	LBB0_12
## %bb.3:
	movl	$1, %edi
	callq	_dma_fence_context_alloc
	movl	-28(%rbp), %edi
	movq	-40(%rbp), %rsi
	movl	%eax, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_dma_fence_array_create
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r15
	jmp	LBB0_6
LBB0_5:
	movq	-40(%rbp), %rdi
	movq	(%rdi), %r15
	callq	_kfree
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movl	%r14d, (%rax)
	addq	$4, %rbx
	movq	_amdgpu_pasid_free_cb@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dma_fence_add_callback
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_pasid_free_cb
	jmp	LBB0_13
LBB0_7:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_dma_fence_wait
	movq	%r15, %rdi
	callq	_dma_fence_put
	jmp	LBB0_12
LBB0_10:
	movq	-40(%rbp), %rdi
	callq	_kfree
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_pasid_free_delayed      ; -- Begin function amdgpu_pasid_free_delayed
	.p2align	2
_amdgpu_pasid_free_delayed:             ; @amdgpu_pasid_free_delayed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	add	x2, sp, #4
	add	x3, sp, #8
	mov	x1, #0
	bl	_dma_resv_get_fences_rcu
	cbz	w0, LBB0_4
LBB0_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
LBB0_2:
	mov	x0, x19
	bl	_amdgpu_pasid_free
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w8, [sp, #4]
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.5:
	cbz	w8, LBB0_2
; %bb.6:
	mov	w0, #1
	bl	_dma_fence_context_alloc
	mov	x2, x0
	ldr	w0, [sp, #4]
	ldr	x1, [sp, #8]
	mov	w3, #1
	mov	w4, #0
	bl	_dma_fence_array_create
	cbz	x0, LBB0_13
; %bb.7:
	mov	x21, x0
	b	LBB0_9
LBB0_8:
	ldr	x0, [sp, #8]
	ldr	x21, [x0]
	bl	_kfree
LBB0_9:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kmalloc
	cbz	x0, LBB0_12
; %bb.10:
	mov	x20, x0
	str	w19, [x20], #4
Lloh6:
	adrp	x2, _amdgpu_pasid_free_cb@GOTPAGE
Lloh7:
	ldr	x2, [x2, _amdgpu_pasid_free_cb@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x20
	bl	_dma_fence_add_callback
	cbz	x0, LBB0_3
; %bb.11:
	mov	x0, x21
	mov	x1, x20
	bl	_amdgpu_pasid_free_cb
	b	LBB0_3
LBB0_12:
	mov	x0, x21
	mov	w1, #0
	bl	_dma_fence_wait
	mov	x0, x21
	bl	_dma_fence_put
	b	LBB0_2
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_kfree
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
.subsections_via_symbols
