	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __dma_resv_make_exclusive
___dma_resv_make_exclusive:             ## @__dma_resv_make_exclusive
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_dma_resv_get_list
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	leaq	-36(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dma_resv_get_fences_rcu
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	-36(%rbp), %r15d
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.3:
	cmpl	$1, %r15d
	jne	LBB0_8
## %bb.4:
	movq	-48(%rbp), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_dma_resv_add_excl_fence
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_dma_fence_put
	movq	-48(%rbp), %rdi
	callq	_kfree
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r15d, %ebx
	jmp	LBB0_6
LBB0_8:
	movq	-48(%rbp), %r12
	movl	$1, %edi
	callq	_dma_fence_context_alloc
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_dma_fence_array_create
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_dma_resv_add_excl_fence
	movq	%r15, %rdi
	callq	_dma_fence_put
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %rdi
	callq	_dma_fence_put
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	jae	LBB0_10
## %bb.12:
	movq	-48(%rbp), %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	___dma_resv_make_exclusive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __dma_resv_make_exclusive
___dma_resv_make_exclusive:             ; @__dma_resv_make_exclusive
	.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, x0
	bl	_dma_resv_get_list
	cbz	w0, LBB0_7
; %bb.1:
	add	x2, sp, #4
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, #0
	bl	_dma_resv_get_fences_rcu
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w20, [sp, #4]
	cbz	w20, LBB0_8
; %bb.3:
	cmp	w20, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [sp, #8]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_dma_resv_add_excl_fence
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
	bl	_dma_fence_put
	ldr	x0, [sp, #8]
	bl	_kfree
	b	LBB0_7
LBB0_5:
	ldr	x21, [sp, #8]
	mov	w0, #1
	bl	_dma_fence_context_alloc
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #0
	bl	_dma_fence_array_create
	cbz	x0, LBB0_10
; %bb.6:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_dma_resv_add_excl_fence
	mov	x0, x20
	bl	_dma_fence_put
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	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_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [sp, #8]
	ldr	x0, [x9, w8, uxtw #3]
	bl	_dma_fence_put
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #4]
	sub	w8, w9, #1
	str	w8, [sp, #4]
	cbnz	w9, LBB0_9
; %bb.11:
	ldr	x0, [sp, #8]
	bl	_kfree
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	___dma_resv_make_exclusive
.subsections_via_symbols
