	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv17_fence_sync                ## -- Begin function nv17_fence_sync
	.p2align	4, 0x90
_nv17_fence_sync:                       ## @nv17_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
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	8(%rdx), %rax
	movq	(%rax), %r15
	movq	(%rsi), %rdi
	callq	_mutex_trylock
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	(%r15), %r12d
	leal	2(%r12), %eax
	movl	%eax, (%r15)
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r13, %rdi
	movl	$5, %esi
	callq	_RING_SPACE
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_NV11_SUBCHAN_DMA_SEMAPHORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %ecx
	callq	_BEGIN_NV04
	movq	_NvSema@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_OUT_RING
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_OUT_RING
	incl	%r12d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_OUT_RING
	movq	%r13, %rdi
	callq	_FIRE_RING
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_RING_SPACE
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_NV11_SUBCHAN_DMA_SEMAPHORE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %ecx
	callq	_BEGIN_NV04
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_OUT_RING
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_OUT_RING
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_OUT_RING
	movq	%r14, %rdi
	callq	_FIRE_RING
LBB0_5:
	movq	(%r13), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_NV11_SUBCHAN_DMA_SEMAPHORE,4,2 ## @NV11_SUBCHAN_DMA_SEMAPHORE
	.comm	_NvSema,4,2                     ## @NvSema
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv17_fence_sync                ; -- Begin function nv17_fence_sync
	.p2align	2
_nv17_fence_sync:                       ; @nv17_fence_sync
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	ldr	x8, [x2, #8]
	ldr	x24, [x8]
	ldr	x0, [x1]
	bl	_mutex_trylock
	cbz	w0, LBB0_5
; %bb.1:
	add	x23, x24, #4
	mov	x0, x23
	bl	_spin_lock
	ldr	w22, [x24]
	add	w21, w22, #2
	str	w21, [x24]
	mov	x0, x23
	bl	_spin_unlock
	mov	x0, x19
	mov	w1, #5
	bl	_RING_SPACE
	cbnz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x23, _NV11_SUBCHAN_DMA_SEMAPHORE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NV11_SUBCHAN_DMA_SEMAPHORE@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w1, #0
	mov	w3, #4
	bl	_BEGIN_NV04
Lloh2:
	adrp	x24, _NvSema@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NvSema@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x22
	bl	_OUT_RING
	add	w22, w22, #1
	mov	x0, x19
	mov	x1, x22
	bl	_OUT_RING
	mov	x0, x19
	bl	_FIRE_RING
	mov	x0, x20
	mov	w1, #5
	bl	_RING_SPACE
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #0
	mov	w3, #4
	bl	_BEGIN_NV04
	ldr	w1, [x24]
	mov	x0, x20
	bl	_OUT_RING
	mov	x0, x20
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x20
	mov	x1, x22
	bl	_OUT_RING
	mov	x0, x20
	mov	x1, x21
	bl	_OUT_RING
	mov	x0, x20
	bl	_FIRE_RING
LBB0_4:
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_NV11_SUBCHAN_DMA_SEMAPHORE,4,2 ; @NV11_SUBCHAN_DMA_SEMAPHORE
	.comm	_NvSema,4,2                     ; @NvSema
.subsections_via_symbols
