	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alsa_qsa_write
_alsa_qsa_write:                        ## @alsa_qsa_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
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	testq	%r15, %r15
	je	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	subq	8(%r12), %rdi
	movq	%r15, %rsi
	callq	_MIN
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	8(%r12), %rdi
	movq	16(%r12), %rax
	movq	24(%r12), %rcx
	addq	(%rax,%rcx,8), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	8(%r12), %rax
	addq	%rbx, %rax
	movq	%rax, 8(%r12)
	leaq	(%r14,%rbx,4), %r14
	subq	%rbx, %r15
	addq	%rbx, %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdx
	cmpq	%rdx, %rax
	jl	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	36(%r12), %edi
	movq	16(%r12), %rax
	movq	24(%r12), %rcx
	movq	(%rax,%rcx,8), %rsi
	callq	_snd_pcm_write
	movq	%rax, %rcx
	movq	24(%r12), %rax
	incq	%rax
	movslq	32(%r12), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, 24(%r12)
	movq	$0, 8(%r12)
	testq	%rcx, %rcx
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_SND_PCM_CHANNEL_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_check_pcm_status
	movl	%eax, %ecx
	movl	$-1, %eax
	movq	_EPROTO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_EBADF@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	jne	LBB0_14
	jmp	LBB0_16
LBB0_1:
	xorl	%r13d, %r13d
LBB0_15:
	movl	%r13d, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_SND_PCM_CHANNEL_PLAYBACK,4,2   ## @SND_PCM_CHANNEL_PLAYBACK
	.comm	_EPROTO,4,2                     ## @EPROTO
	.comm	_EBADF,4,2                      ## @EBADF
	.no_dead_strip	_alsa_qsa_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alsa_qsa_write
_alsa_qsa_write:                        ; @alsa_qsa_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
	cbz	x2, LBB0_12
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x19, #0
Lloh0:
	adrp	x24, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EAGAIN@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SND_PCM_CHANNEL_PLAYBACK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SND_PCM_CHANNEL_PLAYBACK@GOTPAGEOFF]
Lloh4:
	adrp	x26, _EPROTO@GOTPAGE
Lloh5:
	ldr	x26, [x26, _EPROTO@GOTPAGEOFF]
Lloh6:
	adrp	x27, _EBADF@GOTPAGE
Lloh7:
	ldr	x27, [x27, _EBADF@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x20, LBB0_13
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x22]
	sub	x0, x8, x9
	mov	x1, x20
	bl	_MIN
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	ldp	x9, x8, [x22, #16]
	ldr	x10, [x22, #8]
	ldr	x8, [x9, x8, lsl #3]
	add	x0, x10, x8
	mov	x1, x21
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [x22, #8]
	add	x8, x8, x23
	str	x8, [x22, #8]
	add	x21, x21, x23, lsl #2
	sub	x20, x20, x23
	add	x19, x23, x19
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x22]
	cmp	x8, x2
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22, #36]
	ldp	x8, x9, [x22, #16]
	ldr	x1, [x8, x9, lsl #3]
	bl	_snd_pcm_write
	ldr	x8, [x22, #24]
	add	x8, x8, #1
	ldrsw	x9, [x22, #32]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x22, #24]
	str	xzr, [x22, #8]
	cbnz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	cbz	x8, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x25]
	mov	x0, x22
	bl	_check_pcm_status
	ldr	w8, [x26]
	cmn	w0, w8
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	cmn	w0, w8
	b.ne	LBB0_2
LBB0_11:
	mov	w19, #-1
	b	LBB0_13
LBB0_12:
	mov	x19, #0
LBB0_13:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_SND_PCM_CHANNEL_PLAYBACK,4,2   ; @SND_PCM_CHANNEL_PLAYBACK
	.comm	_EPROTO,4,2                     ; @EPROTO
	.comm	_EBADF,4,2                      ; @EBADF
	.no_dead_strip	_alsa_qsa_write
.subsections_via_symbols
