	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alsa_worker_thread
_alsa_worker_thread:                    ## @alsa_worker_thread
	.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	%rdi, %r12
	movq	24(%rdi), %rsi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	cmpl	$0, (%r12)
	jne	LBB0_12
## %bb.2:
	movq	_EPIPE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	32(%r12), %edi
	callq	_slock_lock
	movl	36(%r12), %edi
	callq	_fifo_read_avail
	movq	24(%r12), %rdi
	movq	%rax, %rsi
	callq	_MIN
	movq	%rax, %rbx
	movl	36(%r12), %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_fifo_read
	movl	8(%r12), %edi
	callq	_scond_signal
	movl	32(%r12), %edi
	callq	_slock_unlock
	leaq	(%r14,%rbx,4), %rdi
	movq	24(%r12), %rdx
	subq	%rbx, %rdx
	xorl	%esi, %esi
	callq	_memset
	movl	12(%r12), %edi
	movl	16(%r12), %edx
	movq	%r14, %rsi
	callq	_snd_pcm_writei
	movl	%eax, %r15d
	movl	(%r13), %eax
	addl	%r15d, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_ESTRPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	12(%r12), %edi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_snd_pcm_recover
	testq	%rax, %rax
	js	LBB0_7
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r12)
	je	LBB0_3
	jmp	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	jns	LBB0_11
## %bb.10:
	movl	%r15d, %edi
	callq	_snd_strerror
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_13:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_RARCH_ERR
	jmp	LBB0_12
LBB0_7:
	movl	%r15d, %edi
	callq	_snd_strerror
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_ERR
LBB0_12:
	movl	4(%r12), %edi
	callq	_slock_lock
	movl	$1, (%r12)
	movl	8(%r12), %edi
	callq	_scond_signal
	movl	4(%r12), %edi
	callq	_slock_unlock
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate audio buffer"

	.comm	_EPIPE,4,2                      ## @EPIPE
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ESTRPIPE,4,2                   ## @ESTRPIPE
L_.str.1:                               ## @.str.1
	.asciz	"[ALSA]: (#2) Failed to recover from error (%s)\n"

L_.str.2:                               ## @.str.2
	.asciz	"[ALSA]: Unknown error occurred (%s).\n"

	.no_dead_strip	_alsa_worker_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alsa_worker_thread
_alsa_worker_thread:                    ; @alsa_worker_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x1, [x0, #24]
	mov	w0, #1
	bl	_calloc
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
; %bb.2:
Lloh0:
	adrp	x22, _EPIPE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EPIPE@GOTPAGEOFF]
Lloh2:
	adrp	x23, _EINTR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
Lloh4:
	adrp	x24, _ESTRPIPE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ESTRPIPE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #32]
	bl	_slock_lock
	ldr	w0, [x19, #36]
	bl	_fifo_read_avail
	mov	x1, x0
	ldr	x0, [x19, #24]
	bl	_MIN
	mov	x21, x0
	ldr	w0, [x19, #36]
	mov	x1, x20
	mov	x2, x21
	bl	_fifo_read
	ldr	w0, [x19, #8]
	bl	_scond_signal
	ldr	w0, [x19, #32]
	bl	_slock_unlock
	add	x0, x20, x21, lsl #2
	ldr	x8, [x19, #24]
	sub	x2, x8, x21
	mov	w1, #0
	bl	_memset
	ldp	w0, w2, [x19, #12]
	mov	x1, x20
	bl	_snd_pcm_writei
	mov	x21, x0
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	cmn	w21, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	cmn	w21, w8
	b.ne	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #12]
	mov	x1, x21
	mov	w2, #1
	bl	_snd_pcm_recover
	tbnz	x0, #63, LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	cbz	w8, LBB0_3
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	tbz	w21, #31, LBB0_7
; %bb.9:
	mov	x0, x21
	bl	_snd_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x0, x21
	bl	_snd_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_RARCH_ERR
LBB0_13:
	ldr	w0, [x19, #4]
	bl	_slock_lock
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #8]
	bl	_scond_signal
	ldr	w0, [x19, #4]
	bl	_slock_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_free
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate audio buffer"

	.comm	_EPIPE,4,2                      ; @EPIPE
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ESTRPIPE,4,2                   ; @ESTRPIPE
l_.str.1:                               ; @.str.1
	.asciz	"[ALSA]: (#2) Failed to recover from error (%s)\n"

l_.str.2:                               ; @.str.2
	.asciz	"[ALSA]: Unknown error occurred (%s).\n"

	.no_dead_strip	_alsa_worker_thread
.subsections_via_symbols
