	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_validation_prepare         ## -- Begin function vmw_validation_prepare
	.p2align	4, 0x90
_vmw_validation_prepare:                ## @vmw_validation_prepare
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%r12, %rdi
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_4:
	callq	_mutex_lock
LBB0_5:
	movq	%r12, (%r14)
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_vmw_validation_res_reserve
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.12:
	testq	%r12, %r12
	jne	LBB0_13
	jmp	LBB0_14
LBB0_6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_vmw_validation_bo_reserve
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_vmw_validation_bo_validate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_vmw_validation_res_validate
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_vmw_validation_bo_backoff
LBB0_11:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_vmw_validation_res_unreserve
	testq	%r12, %r12
	je	LBB0_14
LBB0_13:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_validation_prepare         ; -- Begin function vmw_validation_prepare
	.p2align	2
_vmw_validation_prepare:                ; @vmw_validation_prepare
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	cbz	x1, LBB0_5
; %bb.1:
	mov	x0, x19
	cbz	w21, LBB0_4
; %bb.2:
	bl	_mutex_lock_interruptible
	cbz	w0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_4:
	bl	_mutex_lock
LBB0_5:
	str	x19, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_vmw_validation_res_reserve
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.6:
	cbnz	x19, LBB0_12
	b	LBB0_13
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_vmw_validation_bo_reserve
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.8:
	mov	x0, x20
	mov	x1, x21
	bl	_vmw_validation_bo_validate
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x21
	bl	_vmw_validation_res_validate
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_10:
	mov	x0, x20
	bl	_vmw_validation_bo_backoff
LBB0_11:
	mov	x0, x20
	mov	w1, #1
	bl	_vmw_validation_res_unreserve
	cbz	x19, LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
.subsections_via_symbols
