	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmw_resource_check_buffer
_vmw_resource_check_buffer:             ## @vmw_resource_check_buffer
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	$1, -72(%rbp)
	xorl	%edi, %edi
	cmpq	$0, 8(%rsi)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_vmw_resource_buf_alloc
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
LBB0_2:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	leaq	8(%r13), %r14
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	movq	(%r14), %rdi
	callq	_ttm_bo_get
	movq	(%r14), %rax
	movq	%rax, (%r12)
	movq	$0, 16(%r12)
	leaq	8(%r12), %rdi
	movq	%rbx, %rsi
	callq	_list_add_tail
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_ttm_eu_reserve_buffers
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%r12), %rdi
	callq	_ttm_bo_put
	movq	$0, (%r12)
	jmp	LBB0_4
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	16(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	callq	_vmw_resource_mob_attached
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movq	16(%r13), %rax
LBB0_8:
	movl	(%r13), %r14d
	movq	8(%r13), %rdi
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	callq	_ttm_bo_validate
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ttm_eu_backoff_reservation
	movq	(%r12), %rdi
	callq	_ttm_bo_put
	movq	$0, (%r12)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vmw_bo_unreference
	jmp	LBB0_4
LBB0_12:
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vmw_resource_check_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmw_resource_check_buffer
_vmw_resource_check_buffer:             ; @vmw_resource_check_buffer
	.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, x3
	mov	x24, x2
	mov	x22, x1
	mov	x21, x0
	mov	w8, #1
	str	x8, [sp, #8]
	mov	x20, x1
	ldr	x8, [x20, #8]!
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x24
	bl	_vmw_resource_buf_alloc
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_11
LBB0_2:
	mov	x0, sp
	bl	_INIT_LIST_HEAD
	ldr	x0, [x20]
	bl	_ttm_bo_get
	ldr	x8, [x20]
	str	x8, [x19]
	str	xzr, [x19, #16]
	add	x0, x19, #8
	mov	x1, sp
	bl	_list_add_tail
	mov	x1, sp
	mov	x0, x21
	mov	x2, x24
	mov	x3, #0
	mov	w4, #1
	bl	_ttm_eu_reserve_buffers
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	bl	_ttm_bo_put
	str	xzr, [x19]
	b	LBB0_11
LBB0_4:
	ldr	x8, [x22, #16]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.5:
	mov	x0, x22
	bl	_vmw_resource_mob_attached
	cbz	w0, LBB0_10
; %bb.6:
	ldr	x8, [x22, #16]
LBB0_7:
	ldr	w24, [x22]
	ldr	x0, [x22, #8]
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ttm_bo_validate
	mov	x23, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.8:
	mov	x1, sp
	mov	x0, x21
	bl	_ttm_eu_backoff_reservation
	ldr	x0, [x19]
	bl	_ttm_bo_put
	str	xzr, [x19]
	cbz	w24, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_vmw_bo_unreference
	b	LBB0_11
LBB0_10:
	mov	w23, #0
LBB0_11:
	mov	x0, x23
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vmw_resource_check_buffer
.subsections_via_symbols
