	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alsa_write
_alsa_write:                            ## @alsa_write
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	32(%rdi), %esi
	movq	%rdx, %rdi
	callq	_BYTES_TO_FRAMES
	movl	%eax, %ebx
	cmpq	$0, 16(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_alsa_start
	testl	%eax, %eax
	je	LBB0_27
LBB0_2:
	cmpq	$0, 8(%r15)
	je	LBB0_11
## %bb.3:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_28
## %bb.4:
	movq	_EPIPE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_snd_pcm_writei
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r13), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_ESTRPIPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_28
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, %eax
	js	LBB0_27
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	addl	%eax, %r14d
	leal	(%rax,%rax), %ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	addq	%rcx, %r12
	subl	%eax, %ebx
	jne	LBB0_5
	jmp	LBB0_28
LBB0_11:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_28
## %bb.12:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_EPIPE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	$-1, %esi
	callq	_snd_pcm_wait
	movl	%eax, %ecx
	addl	(%r13), %ecx
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_ESTRPIPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r15), %edi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_snd_pcm_recover
	testq	%rax, %rax
	js	LBB0_27
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_13
	jmp	LBB0_28
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_snd_pcm_writei
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r13), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_ESTRPIPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	je	LBB0_26
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jne	LBB0_17
	jmp	LBB0_28
LBB0_23:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%eax, %eax
	js	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	%eax, %r14d
	leal	(%rax,%rax), %ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	addq	%rcx, %r12
	subl	%eax, %ebx
	jmp	LBB0_17
LBB0_26:
	movl	(%r15), %edi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_snd_pcm_recover
	testq	%rax, %rax
	jns	LBB0_28
LBB0_27:
	movl	$-1, %r14d
LBB0_28:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPIPE,4,2                      ## @EPIPE
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ESTRPIPE,4,2                   ## @ESTRPIPE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_alsa_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alsa_write
_alsa_write:                            ; @alsa_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	ldr	w1, [x0, #32]
	mov	x0, x2
	bl	_BYTES_TO_FRAMES
	mov	x22, x0
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_alsa_start
	cbz	w0, LBB0_28
LBB0_2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.3:
	mov	w19, #0
	cbz	w22, LBB0_29
; %bb.4:
Lloh0:
	adrp	x23, _EPIPE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EPIPE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _EINTR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EINTR@GOTPAGEOFF]
Lloh4:
	adrp	x25, _ESTRPIPE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ESTRPIPE@GOTPAGEOFF]
Lloh6:
	adrp	x26, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EAGAIN@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x21
	mov	x2, x22
	bl	_snd_pcm_writei
	mov	x1, x0
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_26
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	cmn	w1, w8
	b.eq	LBB0_26
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	cmn	w1, w8
	b.eq	LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	cmn	w1, w8
	b.eq	LBB0_29
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w1, #31, LBB0_28
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w1, w19
	lsl	w8, w1, #1
	add	x21, x21, w8, sxtw #4
	subs	w22, w22, w1
	b.ne	LBB0_5
	b	LBB0_29
LBB0_11:
	mov	w19, #0
	cbz	w22, LBB0_29
; %bb.12:
	mov	w25, #1
Lloh8:
	adrp	x23, _EPIPE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _EPIPE@GOTPAGEOFF]
Lloh10:
	adrp	x24, _ESTRPIPE@GOTPAGE
Lloh11:
	ldr	x24, [x24, _ESTRPIPE@GOTPAGEOFF]
Lloh12:
	adrp	x26, _EINTR@GOTPAGE
Lloh13:
	ldr	x26, [x26, _EINTR@GOTPAGEOFF]
Lloh14:
	adrp	x27, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x27, [x27, _EAGAIN@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	w1, #-1
	bl	_snd_pcm_wait
	mov	x1, x0
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x24]
	cmn	w1, w8
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x26]
	cmn	w1, w8
	b.ne	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x20]
	mov	w2, #1
	bl	_snd_pcm_recover
	tbnz	x0, #63, LBB0_28
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	cbnz	w22, LBB0_13
	b	LBB0_29
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x20]
	mov	x1, x21
	mov	x2, x22
	bl	_snd_pcm_writei
	mov	x1, x0
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_27
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x26]
	cmn	w1, w8
	b.eq	LBB0_27
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x24]
	cmn	w1, w8
	b.eq	LBB0_27
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x27]
	cmn	w1, w8
	b.ne	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_13 Depth=1
	cbz	w25, LBB0_29
; %bb.23:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w25, #0
	b	LBB0_17
LBB0_24:                                ;   in Loop: Header=BB0_13 Depth=1
	tbnz	w1, #31, LBB0_28
; %bb.25:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w19, w1, w19
	lsl	w8, w1, #1
	add	x21, x21, w8, sxtw #4
	sub	w22, w22, w1
	b	LBB0_17
LBB0_26:
	ldr	w0, [x20]
	mov	w2, #1
	bl	_snd_pcm_recover
	mov	w8, #-1
	tst	x0, #0x8000000000000000
	csel	w19, w8, w19, ne
	b	LBB0_29
LBB0_27:
	ldr	w0, [x20]
	mov	w2, #1
	bl	_snd_pcm_recover
	tbz	x0, #63, LBB0_29
LBB0_28:
	mov	w19, #-1
LBB0_29:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EPIPE,4,2                      ; @EPIPE
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ESTRPIPE,4,2                   ; @ESTRPIPE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_alsa_write
.subsections_via_symbols
