	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fence_done             ## -- Begin function nouveau_fence_done
	.p2align	4, 0x90
_nouveau_fence_done:                    ## @nouveau_fence_done
	.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	%rdi, %rbx
	movq	8(%rdi), %rax
	cmpq	_nouveau_fence_ops_legacy@GOTPCREL(%rip), %rax
	je	LBB0_2
## %bb.1:
	cmpq	_nouveau_fence_ops_uevent@GOTPCREL(%rip), %rax
	jne	LBB0_7
LBB0_2:
	movq	%rbx, %rdi
	callq	_nouveau_fctx
	movq	%rax, %r14
	movq	_DMA_FENCE_FLAG_SIGNALED_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	16(%rbx), %r15d
	movq	%r14, %rdi
	callq	_lockdep_is_held
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_rcu_dereference_protected
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_nouveau_fence_update
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_nvif_notify_put
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_fence_is_signaled          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nouveau_fence_ops_legacy,4,2   ## @nouveau_fence_ops_legacy
	.comm	_nouveau_fence_ops_uevent,4,2   ## @nouveau_fence_ops_uevent
	.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	_nouveau_fence_done             ; -- Begin function nouveau_fence_done
	.p2align	2
_nouveau_fence_done:                    ; @nouveau_fence_done
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _nouveau_fence_ops_legacy@GOTPAGE
Lloh1:
	ldr	x9, [x9, _nouveau_fence_ops_legacy@GOTPAGEOFF]
	cmp	x8, x9
Lloh2:
	adrp	x9, _nouveau_fence_ops_uevent@GOTPAGE
Lloh3:
	ldr	x9, [x9, _nouveau_fence_ops_uevent@GOTPAGEOFF]
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_nouveau_fctx
	mov	x20, x0
Lloh4:
	adrp	x8, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_FENCE_FLAG_SIGNALED_BIT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w21, [x19, #16]
	mov	x0, x20
	bl	_lockdep_is_held
	mov	x1, x0
	mov	x0, x21
	bl	_rcu_dereference_protected
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x20
	bl	_nouveau_fence_update
	cbz	x0, LBB0_6
; %bb.5:
	add	x0, x20, #4
	bl	_nvif_notify_put
LBB0_6:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dma_fence_is_signaled
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_nouveau_fence_ops_legacy,4,2   ; @nouveau_fence_ops_legacy
	.comm	_nouveau_fence_ops_uevent,4,2   ; @nouveau_fence_ops_uevent
	.comm	_DMA_FENCE_FLAG_SIGNALED_BIT,4,2 ; @DMA_FENCE_FLAG_SIGNALED_BIT
.subsections_via_symbols
