	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_resv_copy_fences           ## -- Begin function dma_resv_copy_fences
	.p2align	4, 0x90
_dma_resv_copy_fences:                  ## @dma_resv_copy_fences
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_dma_resv_assert_held
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movl	4(%r12), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_18
## %bb.1:
	movq	%rax, %rbx
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %r15
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	(%rbx), %r14d
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movl	%r14d, %edi
	callq	_dma_resv_list_alloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movl	4(%r12), %edi
	callq	_rcu_dereference
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, (%rbx)
	jbe	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_kfree
	testq	%rbx, %rbx
	jne	LBB0_2
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%r13)
	cmpl	$0, (%rbx)
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	8(%r13), %rax
	movl	(%r13), %ecx
	leal	1(%rcx), %edx
	movl	%edx, (%r13)
	movl	(%rax,%rcx,4), %edi
	movq	%r14, %rsi
	callq	_rcu_assign_pointer
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	incq	%r12
	movl	(%rbx), %eax
	cmpq	%rax, %r12
	jae	LBB0_15
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	callq	_rcu_dereference
	movq	%rax, %r14
	movl	(%r15), %edi
	leaq	16(%rax), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r14, %rdi
	callq	_dma_fence_get_rcu
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r14, %rdi
	callq	_dma_fence_is_signaled
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r14, %rdi
	callq	_dma_fence_put
	jmp	LBB0_14
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_dma_resv_list_free
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	4(%r12), %edi
	callq	_rcu_dereference
	movq	%rax, %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_18:
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_15:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_19:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_dma_fence_get_rcu_safe
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_dma_resv_get_list
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_dma_resv_get_excl
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_preempt_disable
	movq	%r15, %rdi
	callq	_write_seqcount_begin
	movl	8(%r15), %edi
	movq	%rbx, %rsi
	callq	_RCU_INIT_POINTER
	movl	4(%r15), %edi
	movq	%r13, %rsi
	callq	_RCU_INIT_POINTER
	movq	%r15, %rdi
	callq	_write_seqcount_end
	xorl	%eax, %eax
	callq	_preempt_enable
	movq	%r14, %rdi
	callq	_dma_resv_list_free
	movq	%r12, %rdi
	callq	_dma_fence_put
	xorl	%eax, %eax
LBB0_20:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ## @DMA_FENCE_FLAG_SIGNALED_BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_resv_copy_fences           ; -- Begin function dma_resv_copy_fences
	.p2align	2
_dma_resv_copy_fences:                  ; @dma_resv_copy_fences
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_dma_resv_assert_held
	bl	_rcu_read_lock
	ldr	w0, [x20, #4]
	bl	_rcu_dereference
	cbz	x0, LBB0_15
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x24, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w23, [x22]
	bl	_rcu_read_unlock
	mov	x0, x23
	bl	_dma_resv_list_alloc
	cbz	x0, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	bl	_rcu_read_lock
	ldr	w0, [x20, #4]
	bl	_rcu_dereference
	mov	x22, x0
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x22]
	cmp	w8, w23
	b.ls	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_kfree
	cbnz	x22, LBB0_2
	b	LBB0_15
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	wzr, [x21]
	ldr	w8, [x22]
	cbz	w8, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, #0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x21, #8]
	ldr	w9, [x21]
	add	w10, w9, #1
	str	w10, [x21]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x23
	bl	_rcu_assign_pointer
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x25, x25, #1
	ldr	w8, [x22]
	cmp	x25, x8
	b.hs	LBB0_16
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	w0, [x8, x25, lsl #2]
	bl	_rcu_dereference
	mov	x23, x0
	ldr	w0, [x24]
	add	x1, x23, #16
	bl	_test_bit
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x23
	bl	_dma_fence_get_rcu
	cbz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x23
	bl	_dma_fence_is_signaled
	cbz	x0, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x23
	bl	_dma_fence_put
	b	LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_dma_resv_list_free
	ldr	w0, [x20, #4]
	bl	_rcu_dereference
	mov	x22, x0
	cbnz	x22, LBB0_2
LBB0_15:
	mov	x21, #0
LBB0_16:
	add	x0, x20, #8
	bl	_dma_fence_get_rcu_safe
	mov	x20, x0
	bl	_rcu_read_unlock
	mov	x0, x19
	bl	_dma_resv_get_list
	mov	x22, x0
	mov	x0, x19
	bl	_dma_resv_get_excl
	mov	x23, x0
	bl	_preempt_disable
	mov	x0, x19
	bl	_write_seqcount_begin
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_RCU_INIT_POINTER
	ldr	w0, [x19, #4]
	mov	x1, x21
	bl	_RCU_INIT_POINTER
	mov	x0, x19
	bl	_write_seqcount_end
	bl	_preempt_enable
	mov	x0, x22
	bl	_dma_resv_list_free
	mov	x0, x23
	bl	_dma_fence_put
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ; @DMA_FENCE_FLAG_SIGNALED_BIT
.subsections_via_symbols
