	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DirectSoundCaptureDevice_Release
_DirectSoundCaptureDevice_Release:      ## @DirectSoundCaptureDevice_Release
	.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
	addq	$40, %rdi
	callq	_InterlockedDecrement
	movq	%rax, %r14
	leaq	1(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	testq	%r14, %r14
	jne	LBB0_6
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_IDirectSoundCaptureBufferImpl_Release
LBB0_3:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_IDsCaptureDriver_Close
	movq	24(%rbx), %rdi
	callq	_IDsCaptureDriver_Release
LBB0_5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	leaq	8(%rbx), %rdi
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	callq	_DeleteCriticalSection
	movq	_DSOUND_capture@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
LBB0_6:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p) ref was %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"deleting object\n"

	.comm	_DSOUND_capture,8,3             ## @DSOUND_capture
L_.str.2:                               ## @.str.2
	.asciz	"(%p) released\n"

	.no_dead_strip	_DirectSoundCaptureDevice_Release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DirectSoundCaptureDevice_Release
_DirectSoundCaptureDevice_Release:      ; @DirectSoundCaptureDevice_Release
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	add	x0, x0, #40
	bl	_InterlockedDecrement
	mov	x19, x0
	add	x8, x0, #1
	stp	x20, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cbnz	x19, LBB0_6
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x0, [x20, #32]
	cbz	x0, LBB0_3
; %bb.2:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_IDirectSoundCaptureBufferImpl_Release
LBB0_3:
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_IDsCaptureDriver_Close
	ldr	x0, [x20, #24]
	bl	_IDsCaptureDriver_Release
LBB0_5:
	bl	_GetProcessHeap
	ldr	x2, [x20, #16]
	mov	w1, #0
	bl	_HeapFree
	mov	x0, x20
	ldr	x8, [x0, #8]!
	ldr	x8, [x8]
	str	xzr, [x8]
	bl	_DeleteCriticalSection
Lloh4:
	adrp	x8, _DSOUND_capture@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DSOUND_capture@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x20]
	str	xzr, [x8, x9, lsl #3]
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapFree
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p) ref was %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"deleting object\n"

	.comm	_DSOUND_capture,8,3             ; @DSOUND_capture
l_.str.2:                               ; @.str.2
	.asciz	"(%p) released\n"

	.no_dead_strip	_DirectSoundCaptureDevice_Release
.subsections_via_symbols
