	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SNDMacMixAudio
_SNDMacMixAudio:                        ## @SNDMacMixAudio
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%r9), %rax
	movq	(%rax), %rbx
	movq	8(%rax), %r14
	movq	_mutex@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	movq	_muted@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_read_pos@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	(%rsi,%rbx), %rcx
	movq	_write_pos@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	jle	LBB0_4
## %bb.2:
	cmpq	%rsi, %rax
	jle	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_memset
	jmp	LBB0_5
LBB0_4:
	movq	_buffer@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	addq	(%r15), %rbx
	movq	_BUFFER_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	andq	%rbx, %rax
	movq	%rax, (%r15)
LBB0_5:
	movq	_mutex@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_unlock
	movq	_noErr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mutex,4,2                      ## @mutex
	.comm	_muted,8,3                      ## @muted
	.comm	_read_pos,8,3                   ## @read_pos
	.comm	_write_pos,8,3                  ## @write_pos
	.comm	_buffer,8,3                     ## @buffer
	.comm	_BUFFER_LEN,4,2                 ## @BUFFER_LEN
	.comm	_noErr,4,2                      ## @noErr
	.no_dead_strip	_SNDMacMixAudio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SNDMacMixAudio
_SNDMacMixAudio:                        ; @SNDMacMixAudio
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x5]
	ldp	x19, x20, [x8]
Lloh0:
	adrp	x0, _mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _mutex@GOTPAGEOFF]
	bl	_pthread_mutex_lock
Lloh2:
	adrp	x8, _muted@GOTPAGE
Lloh3:
	ldr	x8, [x8, _muted@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
; %bb.1:
Lloh5:
	adrp	x21, _read_pos@GOTPAGE
Lloh6:
	ldr	x21, [x21, _read_pos@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh7:
	adrp	x9, _write_pos@GOTPAGE
Lloh8:
	ldr	x9, [x9, _write_pos@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x10, x8, x19
	cmp	x10, x9
	ccmp	x9, x8, #4, gt
	b.gt	LBB0_3
; %bb.2:
Lloh10:
	adrp	x9, _buffer@GOTPAGE
Lloh11:
	ldr	x9, [x9, _buffer@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
Lloh13:
	adrp	x8, _BUFFER_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BUFFER_LEN@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh15:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	add	x9, x9, x19
	and	x8, x9, x8
	str	x8, [x21]
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_memset
LBB0_4:
Lloh16:
	adrp	x0, _mutex@GOTPAGE
Lloh17:
	ldr	x0, [x0, _mutex@GOTPAGEOFF]
	bl	_pthread_mutex_unlock
Lloh18:
	adrp	x8, _noErr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _noErr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_mutex,4,2                      ; @mutex
	.comm	_muted,8,3                      ; @muted
	.comm	_read_pos,8,3                   ; @read_pos
	.comm	_write_pos,8,3                  ; @write_pos
	.comm	_buffer,8,3                     ; @buffer
	.comm	_BUFFER_LEN,4,2                 ; @BUFFER_LEN
	.comm	_noErr,4,2                      ; @noErr
	.no_dead_strip	_SNDMacMixAudio
.subsections_via_symbols
