	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_gb_surface_unbind
_vmw_gb_surface_unbind:                 ## @vmw_gb_surface_unbind
	.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
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	(%rdx), %rax
	movq	(%rax), %rax
	movq	_VMW_PL_MOB@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_BUG_ON
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_VMW_FIFO_RESERVE
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	testl	%r13d, %r13d
	jne	LBB0_3
## %bb.4:
	movq	_SVGA_3D_CMD_INVALIDATE_GB_SURFACE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_SVGA_3D_CMD_READBACK_GB_SURFACE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	$8, (%rbx)
	movl	(%r12), %eax
	movl	%eax, 12(%rbx)
	movq	_SVGA_3D_CMD_BIND_GB_SURFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	$8, 16(%rbx)
	movl	(%r12), %eax
	movl	%eax, 28(%rbx)
	movq	_SVGA3D_INVALID_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_vmw_fifo_commit
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rdx
	xorl	%edi, %edi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_vmw_execbuf_fence_commands
	movq	(%r14), %rdi
	movq	-48(%rbp), %rsi
	callq	_vmw_bo_fence_single
	xorl	%edi, %edi
	cmpq	$0, -48(%rbp)
	setne	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	-48(%rbp), %rdi
	callq	_vmw_fence_obj_unreference
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMW_PL_MOB,8,3                 ## @VMW_PL_MOB
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SVGA_3D_CMD_READBACK_GB_SURFACE,4,2 ## @SVGA_3D_CMD_READBACK_GB_SURFACE
	.comm	_SVGA_3D_CMD_INVALIDATE_GB_SURFACE,4,2 ## @SVGA_3D_CMD_INVALIDATE_GB_SURFACE
	.comm	_SVGA_3D_CMD_BIND_GB_SURFACE,4,2 ## @SVGA_3D_CMD_BIND_GB_SURFACE
	.comm	_SVGA3D_INVALID_ID,4,2          ## @SVGA3D_INVALID_ID
	.no_dead_strip	_vmw_gb_surface_unbind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_gb_surface_unbind
_vmw_gb_surface_unbind:                 ; @vmw_gb_surface_unbind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	ldr	x8, [x2]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _VMW_PL_MOB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VMW_PL_MOB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x20
	mov	w1, #32
	bl	_VMW_FIFO_RESERVE
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _SVGA_3D_CMD_INVALIDATE_GB_SURFACE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SVGA_3D_CMD_INVALIDATE_GB_SURFACE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _SVGA_3D_CMD_READBACK_GB_SURFACE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SVGA_3D_CMD_READBACK_GB_SURFACE@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	mov	w9, #8
	stp	w9, w8, [x23]
	ldr	w8, [x21]
Lloh10:
	adrp	x10, _SVGA_3D_CMD_BIND_GB_SURFACE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _SVGA_3D_CMD_BIND_GB_SURFACE@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	stp	w8, w9, [x23, #12]
	ldr	w8, [x21]
	str	w8, [x23, #28]
Lloh13:
	adrp	x8, _SVGA3D_INVALID_ID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SVGA3D_INVALID_ID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	stp	w10, w8, [x23, #20]
	mov	x0, x20
	mov	w1, #32
	bl	_vmw_fifo_commit
	add	x2, sp, #8
	mov	x0, #0
	mov	x1, x20
	mov	x3, #0
	bl	_vmw_execbuf_fence_commands
	ldr	x0, [x19]
	ldr	x1, [sp, #8]
	bl	_vmw_bo_fence_single
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_4
; %bb.3:
	add	x0, sp, #8
	bl	_vmw_fence_obj_unreference
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VMW_PL_MOB,8,3                 ; @VMW_PL_MOB
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SVGA_3D_CMD_READBACK_GB_SURFACE,4,2 ; @SVGA_3D_CMD_READBACK_GB_SURFACE
	.comm	_SVGA_3D_CMD_INVALIDATE_GB_SURFACE,4,2 ; @SVGA_3D_CMD_INVALIDATE_GB_SURFACE
	.comm	_SVGA_3D_CMD_BIND_GB_SURFACE,4,2 ; @SVGA_3D_CMD_BIND_GB_SURFACE
	.comm	_SVGA3D_INVALID_ID,4,2          ; @SVGA3D_INVALID_ID
	.no_dead_strip	_vmw_gb_surface_unbind
.subsections_via_symbols
