	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_fifo_send_fence            ## -- Begin function vmw_fifo_send_fence
	.p2align	4, 0x90
_vmw_fifo_send_fence:                   ## @vmw_fifo_send_fence
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$8, %esi
	callq	_VMW_FIFO_RESERVE
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	%r14, %rdi
	callq	_atomic_read
	movl	%eax, (%rbx)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	movq	_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rcx,2), %r9d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_vmw_fallback_wait
	jmp	LBB0_6
LBB0_1:
	leaq	4(%r14), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_atomic_add_return
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_SVGA_FIFO_CAP_FENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.5:
	movq	_SVGA_CMD_FENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movl	(%rbx), %eax
	movl	%eax, 4(%r12)
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_vmw_fifo_commit_flush
	leaq	8(%r14), %rdi
	movl	(%rbx), %esi
	callq	_vmw_marker_push
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_vmw_update_seqno
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vmw_fifo_commit
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HZ,4,2                         ## @HZ
	.comm	_SVGA_FIFO_CAP_FENCE,4,2        ## @SVGA_FIFO_CAP_FENCE
	.comm	_SVGA_CMD_FENCE,4,2             ## @SVGA_CMD_FENCE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_fifo_send_fence            ; -- Begin function vmw_fifo_send_fence
	.p2align	2
_vmw_fifo_send_fence:                   ; @vmw_fifo_send_fence
	.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	x20, x1
	mov	x19, x0
	mov	w1, #8
	bl	_VMW_FIFO_RESERVE
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_atomic_read
	mov	x3, x0
	str	w0, [x20]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w5, w8, w8, lsl #1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	w4, #0
	bl	_vmw_fallback_wait
	b	LBB0_8
LBB0_2:
	add	x21, x19, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	mov	x1, x19
	bl	_atomic_add_return
	str	w0, [x20]
	cbz	w0, LBB0_3
; %bb.4:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _SVGA_FIFO_CAP_FENCE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SVGA_FIFO_CAP_FENCE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _SVGA_CMD_FENCE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SVGA_CMD_FENCE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w8, [x20]
	str	w8, [x22, #4]
	mov	x0, x19
	mov	w1, #8
	bl	_vmw_fifo_commit_flush
	add	x0, x19, #8
	ldr	w1, [x20]
	bl	_vmw_marker_push
	mov	x0, x19
	mov	x1, x21
	bl	_vmw_update_seqno
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_vmw_fifo_commit
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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HZ,4,2                         ; @HZ
	.comm	_SVGA_FIFO_CAP_FENCE,4,2        ; @SVGA_FIFO_CAP_FENCE
	.comm	_SVGA_CMD_FENCE,4,2             ; @SVGA_CMD_FENCE
.subsections_via_symbols
