	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_pcm_do_drain_init
_snd_pcm_do_drain_init:                 ## @snd_pcm_do_drain_init
	.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
	movq	(%rdi), %rdx
	movq	8(%rdi), %rdi
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rsi
	movq	(%rdi), %rax
	movl	(%rax), %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.1:
	cmpl	$128, %ecx
	je	LBB0_5
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_11
## %bb.3:
	movq	%rbx, %rdi
	callq	_snd_pcm_playback_empty
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	_SNDRV_PCM_STATE_DRAINING@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_snd_pcm_do_start
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_snd_pcm_post_start
	jmp	LBB0_11
LBB0_6:
	cmpl	$128, %ecx
	jne	LBB0_11
## %bb.7:
	callq	_snd_pcm_capture_avail
	testq	%rax, %rax
	jle	LBB0_8
## %bb.9:
	movq	_SNDRV_PCM_STATE_DRAINING@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	movq	_SNDRV_PCM_STATE_DRAINING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	jmp	LBB0_11
LBB0_8:
	movq	_SNDRV_PCM_STATE_SETUP@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_snd_pcm_do_stop
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_snd_pcm_post_stop
LBB0_11:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SNDRV_PCM_STATE_DRAINING,8,3   ## @SNDRV_PCM_STATE_DRAINING
	.comm	_SNDRV_PCM_STATE_SETUP,8,3      ## @SNDRV_PCM_STATE_SETUP
	.no_dead_strip	_snd_pcm_do_drain_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_pcm_do_drain_init
_snd_pcm_do_drain_init:                 ; @snd_pcm_do_drain_init
	.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	x19, x0
	ldr	x0, [x0, #8]
	ldr	x10, [x19]
Lloh0:
	adrp	x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x8]
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.1:
	cmp	w9, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w9, #129
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_snd_pcm_playback_empty
	cbnz	w0, LBB0_8
; %bb.4:
Lloh3:
	adrp	x20, _SNDRV_PCM_STATE_DRAINING@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SNDRV_PCM_STATE_DRAINING@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	bl	_snd_pcm_do_start
	ldr	x1, [x20]
	mov	x0, x19
	bl	_snd_pcm_post_start
	b	LBB0_8
LBB0_5:
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.6:
	bl	_snd_pcm_capture_avail
Lloh5:
	adrp	x8, _SNDRV_PCM_STATE_DRAINING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SNDRV_PCM_STATE_DRAINING@GOTPAGEOFF]
Lloh7:
	adrp	x9, _SNDRV_PCM_STATE_SETUP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SNDRV_PCM_STATE_SETUP@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, gt
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_pcm_do_stop
	mov	x0, x19
	mov	x1, x20
	bl	_snd_pcm_post_stop
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x9, _SNDRV_PCM_STATE_DRAINING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SNDRV_PCM_STATE_DRAINING@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	str	w9, [x8]
LBB0_8:
	mov	w0, #0
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SNDRV_PCM_STATE_DRAINING,8,3   ; @SNDRV_PCM_STATE_DRAINING
	.comm	_SNDRV_PCM_STATE_SETUP,8,3      ; @SNDRV_PCM_STATE_SETUP
	.no_dead_strip	_snd_pcm_do_drain_init
.subsections_via_symbols
