	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_local_fifo_commit
_vmw_local_fifo_commit:                 ## @vmw_local_fifo_commit
	.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
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	_SVGA_FIFO_NEXT_CMD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rdi
	callq	_vmw_mmio_read
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_SVGA_FIFO_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rdi
	callq	_vmw_mmio_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SVGA_FIFO_MIN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rax,4), %rdi
	callq	_vmw_mmio_read
	movl	%eax, %ebx
	movq	_SVGA_FIFO_CAP_RESERVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	8(%r15), %r14d
	leal	4(%r13), %r12d
	cmpl	$0, 12(%r15)
	cmovel	%r13d, %r12d
	movl	$0, 12(%r15)
	xorl	%edi, %edi
	testb	$3, %r12b
	setne	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	16(%r15), %r12d
	setg	%dil
	callq	_BUG_ON
	movl	$0, 16(%r15)
	cmpq	$0, 32(%r15)
	je	LBB0_6
## %bb.1:
	leaq	8(%r15), %rdi
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_vmw_fifo_res_copy
	jmp	LBB0_4
LBB0_3:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	callq	_vmw_fifo_slow_copy
LBB0_4:
	movq	40(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_vfree
	movq	$0, 40(%r15)
LBB0_6:
	leaq	24(%r15), %r13
	movq	%r13, %rdi
	callq	_down_write
	cmpq	$0, 32(%r15)
	jne	LBB0_8
## %bb.7:
	testl	%r14d, %r14d
	je	LBB0_9
LBB0_8:
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %ebx
	xorl	%eax, %eax
	cmpl	%ecx, %r12d
	cmovll	%eax, %ebx
	addl	%r12d, %ebx
	xorl	%eax, %eax
	callq	_mb
	movq	_SVGA_FIFO_NEXT_CMD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movl	%ebx, %edi
	callq	_vmw_mmio_write
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	movq	_SVGA_FIFO_RESERVED@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	xorl	%edi, %edi
	callq	_vmw_mmio_write
LBB0_11:
	xorl	%eax, %eax
	callq	_mb
	movq	%r13, %rdi
	callq	_up_write
	movq	_SVGA_SYNC_GENERIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_vmw_fifo_ping_host
	addq	$20, %r15
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SVGA_FIFO_NEXT_CMD,4,2         ## @SVGA_FIFO_NEXT_CMD
	.comm	_SVGA_FIFO_MAX,4,2              ## @SVGA_FIFO_MAX
	.comm	_SVGA_FIFO_MIN,4,2              ## @SVGA_FIFO_MIN
	.comm	_SVGA_FIFO_CAP_RESERVE,4,2      ## @SVGA_FIFO_CAP_RESERVE
	.comm	_SVGA_FIFO_RESERVED,4,2         ## @SVGA_FIFO_RESERVED
	.comm	_SVGA_SYNC_GENERIC,4,2          ## @SVGA_SYNC_GENERIC
	.no_dead_strip	_vmw_local_fifo_commit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_local_fifo_commit
_vmw_local_fifo_commit:                 ; @vmw_local_fifo_commit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x1
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x26, _SVGA_FIFO_NEXT_CMD@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SVGA_FIFO_NEXT_CMD@GOTPAGEOFF]
	ldrsw	x8, [x26]
	add	x0, x20, x8, lsl #2
	bl	_vmw_mmio_read
	mov	x21, x0
Lloh2:
	adrp	x8, _SVGA_FIFO_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SVGA_FIFO_MAX@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	add	x0, x20, x8, lsl #2
	bl	_vmw_mmio_read
	mov	x22, x0
Lloh5:
	adrp	x8, _SVGA_FIFO_MIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SVGA_FIFO_MIN@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
	add	x0, x20, x8, lsl #2
	bl	_vmw_mmio_read
	mov	x23, x0
	mov	x25, x19
	ldr	w8, [x25, #8]!
Lloh8:
	adrp	x9, _SVGA_FIFO_CAP_RESERVE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SVGA_FIFO_CAP_RESERVE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w27, w9, w8
	ldr	w8, [x25, #4]
	add	w9, w24, #4
	cmp	w8, #0
	csel	w24, w24, w9, eq
	str	wzr, [x25, #4]
	tst	w24, #0x3
	cset	w0, ne
	bl	_BUG_ON
	ldr	w8, [x25, #8]
	cmp	w24, w8
	cset	w0, gt
	bl	_BUG_ON
	str	wzr, [x25, #8]
	ldr	x8, [x25, #24]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x0, x25
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	cbz	w27, LBB0_10
; %bb.2:
	bl	_vmw_fifo_res_copy
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_4
LBB0_3:
	bl	_vfree
	str	xzr, [x19, #40]
LBB0_4:
	add	x25, x19, #24
	mov	x0, x25
	bl	_down_write
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_6
; %bb.5:
	cbz	w27, LBB0_7
LBB0_6:
	sub	w8, w23, w22
	add	w9, w24, w21
	cmp	w9, w22
	csel	w8, wzr, w8, lt
	add	w21, w8, w9
	bl	_mb
	ldrsw	x8, [x26]
	add	x1, x20, x8, lsl #2
	mov	x0, x21
	bl	_vmw_mmio_write
LBB0_7:
	cbz	w27, LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _SVGA_FIFO_RESERVED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SVGA_FIFO_RESERVED@GOTPAGEOFF]
Lloh13:
	ldrsw	x8, [x8]
	add	x1, x20, x8, lsl #2
	mov	w0, #0
	bl	_vmw_mmio_write
LBB0_9:
	bl	_mb
	mov	x0, x25
	bl	_up_write
Lloh14:
	adrp	x8, _SVGA_SYNC_GENERIC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SVGA_SYNC_GENERIC@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vmw_fifo_ping_host
	add	x0, x19, #20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_10:
	bl	_vmw_fifo_slow_copy
	ldr	x0, [x19, #40]
	cbnz	x0, LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SVGA_FIFO_NEXT_CMD,4,2         ; @SVGA_FIFO_NEXT_CMD
	.comm	_SVGA_FIFO_MAX,4,2              ; @SVGA_FIFO_MAX
	.comm	_SVGA_FIFO_MIN,4,2              ; @SVGA_FIFO_MIN
	.comm	_SVGA_FIFO_CAP_RESERVE,4,2      ; @SVGA_FIFO_CAP_RESERVE
	.comm	_SVGA_FIFO_RESERVED,4,2         ; @SVGA_FIFO_RESERVED
	.comm	_SVGA_SYNC_GENERIC,4,2          ; @SVGA_SYNC_GENERIC
	.no_dead_strip	_vmw_local_fifo_commit
.subsections_via_symbols
