	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wasapi_free
_wasapi_free:                           ## @wasapi_free
	.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
	movl	32(%rdi), %r14d
	movq	24(%rdi), %rdi
	callq	_IFACE_RELEASE
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	callq	__IAudioClient_Stop
	movq	16(%rbx), %rdi
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_IFACE_RELEASE
	movq	8(%rbx), %rdi
	callq	_IFACE_RELEASE
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_fifo_free
LBB0_5:
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %edi
	movl	$20, %esi
	callq	_WaitForSingleObject
	movq	%rax, %rbx
	movq	_WAIT_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_ERR
LBB0_7:
	movq	_WAIT_OBJECT_0@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_8
## %bb.9:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_CloseHandle                    ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WAIT_FAILED,8,3                ## @WAIT_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[WASAPI]: WaitForSingleObject failed with error %d.\n"

	.comm	_WAIT_OBJECT_0,8,3              ## @WAIT_OBJECT_0
	.no_dead_strip	_wasapi_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wasapi_free
_wasapi_free:                           ; @wasapi_free
	.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
	mov	x20, x0
	ldr	w19, [x0, #32]
	ldr	x0, [x0, #24]
	bl	_IFACE_RELEASE
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_2
; %bb.1:
	bl	__IAudioClient_Stop
	ldr	x0, [x20, #16]
LBB0_2:
	bl	_IFACE_RELEASE
	ldr	x0, [x20, #8]
	bl	_IFACE_RELEASE
	ldr	x0, [x20]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_fifo_free
LBB0_4:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	mov	w1, #20
	bl	_WaitForSingleObject
	mov	x20, x0
Lloh0:
	adrp	x8, _WAIT_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WAIT_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	bl	_GetLastError
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_6:
Lloh5:
	adrp	x8, _WAIT_OBJECT_0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WAIT_OBJECT_0@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CloseHandle
LBB0_8:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WAIT_FAILED,8,3                ; @WAIT_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[WASAPI]: WaitForSingleObject failed with error %d.\n"

	.comm	_WAIT_OBJECT_0,8,3              ; @WAIT_OBJECT_0
	.no_dead_strip	_wasapi_free
.subsections_via_symbols
