	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_user_bo_synccpu_grab
_vmw_user_bo_synccpu_grab:              ## @vmw_user_bo_synccpu_grab
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_drm_vmw_synccpu_allow_cs@GOTPCREL(%rip), %rcx
	movq	_drm_vmw_synccpu_dontblock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.1:
	xorl	%ecx, %ecx
	movl	(%r14), %edi
	testl	%edx, %eax
	jne	LBB0_3
## %bb.2:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_3:
	movl	$1, %esi
	movl	$1, %edx
	callq	_dma_resv_wait_timeout_rcu
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	sarq	$63, %rbx
	andl	%eax, %ebx
	jmp	LBB0_9
LBB0_6:
	movq	%rsi, %r15
	xorl	%esi, %esi
	testl	%edx, %eax
	setne	%sil
	movq	%r14, %rdi
	callq	_ttm_bo_synccpu_write_grab
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	leaq	4(%r14), %rsi
	movq	_TTM_REF_SYNCCPU_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	callq	_ttm_ref_object_add
	movl	%eax, %r15d
	movl	-28(%rbp), %eax
	orl	%r15d, %eax
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_ttm_bo_synccpu_write_release
	movl	%r15d, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_vmw_synccpu_allow_cs,4,2   ## @drm_vmw_synccpu_allow_cs
	.comm	_drm_vmw_synccpu_dontblock,4,2  ## @drm_vmw_synccpu_dontblock
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TTM_REF_SYNCCPU_WRITE,4,2      ## @TTM_REF_SYNCCPU_WRITE
	.no_dead_strip	_vmw_user_bo_synccpu_grab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_user_bo_synccpu_grab
_vmw_user_bo_synccpu_grab:              ; @vmw_user_bo_synccpu_grab
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _drm_vmw_synccpu_allow_cs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drm_vmw_synccpu_allow_cs@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _drm_vmw_synccpu_dontblock@GOTPAGE
Lloh4:
	ldr	x8, [x8, _drm_vmw_synccpu_dontblock@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w2
	tst	w9, w2
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x19]
Lloh6:
	adrp	x9, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w3, w9, wzr, eq
	mov	w1, #1
	mov	w2, #1
	bl	_dma_resv_wait_timeout_rcu
	cbz	x0, LBB0_6
; %bb.2:
	cmp	x0, #0
	csel	x21, x0, xzr, lt
	b	LBB0_7
LBB0_3:
	mov	x20, x1
	cmp	w8, #0
	cset	w1, ne
	mov	x0, x19
	bl	_ttm_bo_synccpu_write_grab
	mov	x21, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.4:
	add	x1, x19, #4
Lloh9:
	adrp	x8, _TTM_REF_SYNCCPU_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTM_REF_SYNCCPU_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	w4, #0
	bl	_ttm_ref_object_add
	mov	w21, #0
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	cbz	w8, LBB0_7
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_ttm_bo_synccpu_write_release
	mov	x21, x20
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_vmw_synccpu_allow_cs,4,2   ; @drm_vmw_synccpu_allow_cs
	.comm	_drm_vmw_synccpu_dontblock,4,2  ; @drm_vmw_synccpu_dontblock
	.comm	_MAX_SCHEDULE_TIMEOUT,4,2       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TTM_REF_SYNCCPU_WRITE,4,2      ; @TTM_REF_SYNCCPU_WRITE
	.no_dead_strip	_vmw_user_bo_synccpu_grab
.subsections_via_symbols
