	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ElDeleteCaptureDevice          ## -- Begin function ElDeleteCaptureDevice
	.p2align	4, 0x90
_ElDeleteCaptureDevice:                 ## @ElDeleteCaptureDevice
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_LockList
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_Zero
	movl	-28(%rbp), %edi
	movl	$4, %esi
	movq	%r15, %rdx
	callq	_StrCpy
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_Search
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movl	$1, (%rax)
	movl	8(%rax), %edi
	callq	_Cancel
	movl	4(%rbx), %edi
	movq	_INFINITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WaitThread
	movl	4(%rbx), %edi
	callq	_ReleaseThread
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_Delete
	movq	%rbx, %rdi
	callq	_Free
	movl	$1, %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movl	(%r14), %edi
	callq	_UnlockList
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INFINITE,4,2                   ## @INFINITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ElDeleteCaptureDevice          ; -- Begin function ElDeleteCaptureDevice
	.p2align	2
_ElDeleteCaptureDevice:                 ; @ElDeleteCaptureDevice
	.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	w20, #0
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x19, x0
	ldr	w0, [x0]
	bl	_LockList
	mov	x0, sp
	mov	w1, #16
	bl	_Zero
	ldr	w0, [sp, #12]
	mov	w1, #4
	mov	x2, x21
	bl	_StrCpy
	ldr	w0, [x19]
	mov	x1, sp
	bl	_Search
	cbz	x0, LBB0_4
; %bb.3:
	mov	x21, x0
	mov	w20, #1
	str	w20, [x0]
	ldr	w0, [x0, #8]
	bl	_Cancel
	ldr	w0, [x21, #4]
Lloh0:
	adrp	x8, _INFINITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INFINITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_WaitThread
	ldr	w0, [x21, #4]
	bl	_ReleaseThread
	ldr	w0, [x19]
	mov	x1, x21
	bl	_Delete
	mov	x0, x21
	bl	_Free
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	ldr	w0, [x19]
	bl	_UnlockList
LBB0_6:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INFINITE,4,2                   ; @INFINITE
.subsections_via_symbols
