	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_resource_reserve           ## -- Begin function vmw_resource_reserve
	.p2align	4, 0x90
_vmw_resource_reserve:                  ## @vmw_resource_reserve
	.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
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	32(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	leaq	24(%r13), %rdi
	callq	_list_del_init
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	16(%r13), %rax
	xorl	%r14d, %r14d
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.2:
	cmpq	$0, 8(%r13)
	jne	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_vmw_resource_buf_alloc
	movl	%eax, %r15d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r13), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	%r15d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate a backup buffer of size %lu. bytes\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_resource_reserve           ; -- Begin function vmw_resource_reserve
	.p2align	2
_vmw_resource_reserve:                  ; @vmw_resource_reserve
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #32]
	mov	x0, x20
	bl	_spin_lock
	add	x0, x19, #24
	bl	_list_del_init
	mov	x0, x20
	bl	_spin_unlock
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	w20, #0
	cbnz	w22, LBB0_6
; %bb.2:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_vmw_resource_buf_alloc
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x1, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate a backup buffer of size %lu. bytes\n"

.subsections_via_symbols
