	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function playback_pcm_prepare
_playback_pcm_prepare:                  ## @playback_pcm_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
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	leaq	24(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_start_usb_capture
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_start_usb_playback
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.3:
	movl	20(%r12), %ebx
	movq	_PLAYBACK_URB_COMPLETED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r12), %r15
	movq	%r15, %rsi
	callq	_test_bit
	movl	$1, %esi
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_USB_PLAYBACK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
LBB0_5:
	movl	%ebx, %edi
	callq	_wait_event
	movq	_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
LBB0_8:
	movq	_USB_PLAYBACK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	(%r14), %rax
	movq	$0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PLAYBACK_URB_COMPLETED,4,2     ## @PLAYBACK_URB_COMPLETED
	.comm	_USB_PLAYBACK_RUNNING,4,2       ## @USB_PLAYBACK_RUNNING
	.comm	_DISCONNECTED,4,2               ## @DISCONNECTED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_playback_pcm_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function playback_pcm_prepare
_playback_pcm_prepare:                  ; @playback_pcm_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	x20, x0
	ldr	x19, [x0, #8]
	add	x22, x19, #24
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x19
	bl	_start_usb_capture
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_start_usb_playback
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	tbnz	w21, #31, LBB0_11
; %bb.2:
	ldr	w22, [x19, #20]
Lloh0:
	adrp	x8, _PLAYBACK_URB_COMPLETED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLAYBACK_URB_COMPLETED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x21, x19, #16
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_5
; %bb.3:
	mov	w1, #1
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_11
LBB0_5:
Lloh3:
	adrp	x8, _USB_PLAYBACK_RUNNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_PLAYBACK_RUNNING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cmp	x0, #0
	cset	w1, eq
LBB0_6:
	mov	x0, x22
	bl	_wait_event
Lloh6:
	adrp	x8, _DISCONNECTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DISCONNECTED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.7:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _USB_PLAYBACK_RUNNING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _USB_PLAYBACK_RUNNING@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_12
; %bb.10:
	mov	w21, #0
	ldr	x8, [x20]
	str	xzr, [x8]
	stp	xzr, xzr, [x19]
LBB0_11:
	mov	x0, x21
	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
LBB0_12:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PLAYBACK_URB_COMPLETED,4,2     ; @PLAYBACK_URB_COMPLETED
	.comm	_USB_PLAYBACK_RUNNING,4,2       ; @USB_PLAYBACK_RUNNING
	.comm	_DISCONNECTED,4,2               ; @DISCONNECTED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_playback_pcm_prepare
.subsections_via_symbols
