	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_pcm_update_state           ## -- Begin function snd_pcm_update_state
	.p2align	4, 0x90
_snd_pcm_update_state:                  ## @snd_pcm_update_state
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_snd_pcm_playback_avail
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_snd_pcm_capture_avail
LBB0_3:
	movq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jle	LBB0_5
## %bb.4:
	movq	%rax, (%rbx)
	movq	%rax, %rcx
LBB0_5:
	movq	48(%rbx), %rdx
	movq	(%rdx), %rdx
	movq	_SNDRV_PCM_STATE_DRAINING@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_9
## %bb.6:
	cmpq	8(%rbx), %rax
	jl	LBB0_11
## %bb.7:
	movq	%r14, %rdi
	callq	_snd_pcm_drain_done
	jmp	LBB0_8
LBB0_9:
	cmpq	16(%rbx), %rax
	jge	LBB0_10
LBB0_11:
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.12:
	xorl	%r14d, %r14d
	cmpq	%rcx, %rax
	jl	LBB0_17
## %bb.13:
	addq	$40, %rbx
	jmp	LBB0_16
LBB0_10:
	movq	%r14, %rdi
	callq	_xrun
LBB0_8:
	movq	_EPIPE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_14:
	movq	32(%rbx), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jl	LBB0_17
## %bb.15:
	addq	$24, %rbx
LBB0_16:
	movq	%rbx, %rdi
	callq	_wake_up
LBB0_17:
	movl	%r14d, %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	_EPIPE,4,2                      ## @EPIPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_pcm_update_state           ; -- Begin function snd_pcm_update_state
	.p2align	2
_snd_pcm_update_state:                  ; @snd_pcm_update_state
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	x0, x1
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_snd_pcm_playback_avail
	b	LBB0_3
LBB0_2:
	bl	_snd_pcm_capture_avail
LBB0_3:
	ldr	x8, [x19]
	cmp	x0, x8
	b.le	LBB0_5
; %bb.4:
	str	x0, [x19]
	mov	x8, x0
LBB0_5:
	ldr	x9, [x19, #48]
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _SNDRV_PCM_STATE_DRAINING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SNDRV_PCM_STATE_DRAINING@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.6:
	ldr	x9, [x19, #8]
	cmp	x0, x9
	b.lt	LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_snd_pcm_drain_done
	b	LBB0_13
LBB0_8:
	ldr	x9, [x19, #16]
	cmp	x0, x9
	b.ge	LBB0_12
LBB0_9:
	cbz	x8, LBB0_14
; %bb.10:
	cmp	x0, x8
	b.lt	LBB0_17
; %bb.11:
	add	x0, x19, #40
	b	LBB0_16
LBB0_12:
	mov	x0, x20
	bl	_xrun
LBB0_13:
Lloh6:
	adrp	x8, _EPIPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_14:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_17
; %bb.15:
	add	x0, x19, #24
LBB0_16:
	bl	_wake_up
LBB0_17:
	mov	w0, #0
LBB0_18:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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	_EPIPE,4,2                      ; @EPIPE
.subsections_via_symbols
