	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function audio_mixer_mix
LCPI0_0:
	.long	0xbf800000                      ## float -1
LCPI0_1:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_audio_mixer_mix
	.p2align	4, 0x90
_audio_mixer_mix:                       ## @audio_mixer_mix
	.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, %r14
	movq	%rdi, %r12
	movq	_AUDIO_MIXER_MAX_VOICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	%edx, %r15d
	movaps	%xmm0, %xmm1
	movq	_s_voices@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	xorl	%r13d, %r13d
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	addq	$8, %rbx
	cmpl	%eax, %r13d
	jae	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movaps	%xmm1, %xmm0
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, 4(%rbx)
	jne	LBB0_6
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	cmpl	$128, 4(%rbx)
	jne	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_audio_mixer_mix_wav
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movq	_AUDIO_MIXER_MAX_VOICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_7:
	testq	%r14, %r14
	je	LBB0_21
## %bb.8:
	cmpq	$1, %r14
	jne	LBB0_9
LBB0_17:
	testb	$1, %r14b
	je	LBB0_21
## %bb.18:
	movss	(%r12), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	ja	LBB0_20
## %bb.19:
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_21
LBB0_20:
	movss	%xmm0, (%r12)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rax
	andq	$-2, %rax
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movss	%xmm2, 4(%r12)
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$8, %r12
	addq	$-2, %rax
	je	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r12), %xmm3                   ## xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm0
	movaps	%xmm0, %xmm2
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	ucomiss	%xmm1, %xmm3
	movaps	%xmm1, %xmm2
	jbe	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movss	%xmm2, (%r12)
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movss	4(%r12), %xmm3                  ## xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm3, %xmm0
	movaps	%xmm0, %xmm2
	ja	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	ucomiss	%xmm1, %xmm3
	movaps	%xmm1, %xmm2
	ja	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_s_voices,8,3                   ## @s_voices
	.comm	_AUDIO_MIXER_MAX_VOICES,4,2     ## @AUDIO_MIXER_MAX_VOICES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audio_mixer_mix                ; -- Begin function audio_mixer_mix
	.p2align	2
_audio_mixer_mix:                       ; @audio_mixer_mix
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _AUDIO_MIXER_MAX_VOICES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AUDIO_MIXER_MAX_VOICES@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x21, x2
	fmov	s8, s0
	mov	w24, #0
Lloh2:
	adrp	x9, _s_voices@GOTPAGE
Lloh3:
	ldr	x9, [x9, _s_voices@GOTPAGEOFF]
Lloh4:
	ldr	x22, [x9]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	add	x22, x22, #8
	cmp	w24, w8
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	fmov	s0, s8
	cbnz	w21, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	s0, [x22]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x22, #4]
	cmp	w9, #128
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_audio_mixer_mix_wav
	ldr	w8, [x23]
	b	LBB0_2
LBB0_7:
	cbnz	x19, LBB0_11
LBB0_8:
	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
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	str	s0, [x20]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x20, x20, #4
	subs	x19, x19, #1
	b.eq	LBB0_8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x20]
	fmov	s0, #-1.00000000
	fcmp	s1, s0
	b.mi	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	fmov	s0, #1.00000000
	fcmp	s1, s0
	b.gt	LBB0_9
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_s_voices,8,3                   ; @s_voices
	.comm	_AUDIO_MIXER_MAX_VOICES,4,2     ; @AUDIO_MIXER_MAX_VOICES
.subsections_via_symbols
