	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fence_sync             ## -- Begin function nouveau_fence_sync
	.p2align	4, 0x90
_nouveau_fence_sync:                    ## @nouveau_fence_sync
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_6
## %bb.2:
	movq	%rsi, %r15
	movq	(%rsi), %r13
	xorl	%r14d, %r14d
	movl	$0, %edi
	cmpq	%rsi, %r12
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_nouveau_fence_done
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
LBB0_4:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	*(%r13)
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nouveau_fence_wait             ## TAILCALL
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fence_sync             ; -- Begin function nouveau_fence_sync
	.p2align	2
_nouveau_fence_sync:                    ; @nouveau_fence_sync
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0]
	cbz	x21, LBB0_7
; %bb.2:
	mov	x20, x1
	ldr	x22, [x1]
	cmp	x21, x1
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_nouveau_fence_done
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
LBB0_4:
	ldr	x8, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	blr	x8
	mov	x20, x0
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	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	_nouveau_fence_wait
LBB0_6:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_4
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
