	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_overlay_claim              ## -- Begin function vmw_overlay_claim
	.p2align	4, 0x90
_vmw_overlay_claim:                     ## @vmw_overlay_claim
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_VMW_MAX_NUM_STREAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	movq	8(%rbx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rcx,4)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_4
LBB0_7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_ESRCH@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movl	$1, (%rdx,%rcx,4)
	movl	%ecx, (%r14)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_VMW_MAX_NUM_STREAMS,4,2        ## @VMW_MAX_NUM_STREAMS
	.comm	_ESRCH,4,2                      ## @ESRCH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_overlay_claim              ; -- Begin function vmw_overlay_claim
	.p2align	2
_vmw_overlay_claim:                     ; @vmw_overlay_claim
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	cbz	x19, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _VMW_MAX_NUM_STREAMS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMW_MAX_NUM_STREAMS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x9, #0
	ldr	x10, [x19, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cbz	w11, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _ESRCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w8, #1
	str	w8, [x10, x9, lsl #2]
	str	w9, [x20]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_VMW_MAX_NUM_STREAMS,4,2        ; @VMW_MAX_NUM_STREAMS
	.comm	_ESRCH,4,2                      ; @ESRCH
.subsections_via_symbols
