	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function S_PaintChannelFrom16_scalar
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_S_PaintChannelFrom16_scalar:           ## @S_PaintChannelFrom16_scalar
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_26
## %bb.1:
	movl	%ecx, %eax
	movq	16(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	imull	(%rdi), %eax
LBB0_3:
	movq	_paintbuffer@GOTPCREL(%rip), %r11
	cmpl	$2, %r9d
	sete	%cl
	shll	%cl, %eax
	movq	8(%rsi), %r14
	movq	_SND_CHUNK_SIZE@GOTPCREL(%rip), %r10
	movl	(%r10), %ecx
	movq	%r14, %rsi
	cmpl	%ecx, %eax
	jl	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %rsi
	subl	%ecx, %eax
	testq	%rsi, %rsi
	cmoveq	%r14, %rsi
	cmpl	%ecx, %eax
	jge	LBB0_4
LBB0_6:
	movq	(%r11), %r15
	movslq	%r8d, %rcx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movss	4(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	ucomiss	LCPI0_0(%rip), %xmm0
	jne	LBB0_15
	jp	LBB0_15
LBB0_8:
	testl	%edx, %edx
	jle	LBB0_26
## %bb.9:
	movq	_snd_vol@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	movl	8(%rdi), %r11d
	imull	%r14d, %r11d
	imull	12(%rdi), %r14d
	movq	(%rsi), %r12
	movl	%edx, %r8d
	leaq	(%r15,%rcx,8), %r15
	addq	$4, %r15
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movl	%ecx, %eax
	cmpq	%rbx, %r8
	je	LBB0_26
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leal	1(%rax), %ecx
	movslq	%eax, %rdi
	movswl	(%r12,%rdi,2), %edi
	movl	%r11d, %edx
	imull	%edi, %edx
	sarl	$8, %edx
	addl	%edx, -4(%r15,%rbx,8)
	cmpl	$2, %r9d
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	addl	$2, %eax
	movslq	%ecx, %rcx
	movswl	(%r12,%rcx,2), %edi
	movl	%eax, %ecx
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	imull	%r14d, %edi
	sarl	$8, %edi
	addl	%edi, (%r15,%rbx,8)
	cmpl	(%r10), %ecx
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rsi), %rsi
	movq	(%rsi), %r12
	xorl	%ecx, %ecx
	jmp	LBB0_14
LBB0_15:
	testl	%edx, %edx
	jle	LBB0_26
## %bb.16:
	movq	_snd_vol@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	movl	8(%rdi), %ebx
	imull	%r8d, %ebx
	cvtsi2ss	%ebx, %xmm8
	imull	12(%rdi), %r8d
	cvtsi2ss	%r8d, %xmm2
	cvtsi2ss	%eax, %xmm3
	leaq	(%r15,%rcx,8), %r11
	cvtsi2ss	%r9d, %xmm1
	movq	(%rsi), %rbx
	movl	%edx, %r8d
	xorl	%r15d, %r15d
	mulss	%xmm1, %xmm0
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_17 Depth=1
	xorps	%xmm5, %xmm5
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	shll	$8, %eax
	cltd
	idivl	%r9d
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulss	%xmm8, %xmm5
	divss	%xmm1, %xmm5
	xorps	%xmm6, %xmm6
	cvtsi2ssl	(%r11,%r15,8), %xmm6
	addss	%xmm5, %xmm6
	cvttss2si	%xmm6, %eax
	movl	%eax, (%r11,%r15,8)
	mulss	%xmm2, %xmm4
	xorps	%xmm5, %xmm5
	cvtsi2ssl	4(%r11,%r15,8), %xmm5
	divss	%xmm1, %xmm4
	addss	%xmm4, %xmm5
	cvttss2si	%xmm5, %eax
	movl	%eax, 4(%r11,%r15,8)
	incq	%r15
	cmpq	%r8, %r15
	je	LBB0_26
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	cvttss2si	%xmm3, %edx
	addss	%xmm0, %xmm3
	cvttss2si	%xmm3, %r12d
	xorps	%xmm4, %xmm4
	movl	%r12d, %eax
	subl	%edx, %eax
	jle	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	(%r10), %r13d
	xorps	%xmm6, %xmm6
	cvtsi2ss	%r13d, %xmm6
	leal	-1(%r13), %edi
	xorps	%xmm5, %xmm5
	xorps	%xmm4, %xmm4
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=2
	addss	%xmm7, %xmm4
	addss	%xmm1, %xmm5
	addl	%r9d, %edx
	cmpl	%r12d, %edx
	jge	LBB0_25
LBB0_20:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%edx, %r13d
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	8(%rsi), %rsi
	testq	%rsi, %rsi
	cmoveq	%r14, %rsi
	movq	(%rsi), %rbx
	subss	%xmm6, %xmm3
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=2
	movl	%edi, %ecx
	andl	%edx, %ecx
	movslq	%ecx, %rcx
	movswl	(%rbx,%rcx,2), %ecx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ecx, %xmm1
	movaps	%xmm1, %xmm7
	cmpl	$2, %r9d
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=2
	leal	1(%rdx), %ecx
	andl	%edi, %ecx
	movslq	%ecx, %rcx
	movswl	(%rbx,%rcx,2), %ecx
	xorps	%xmm7, %xmm7
	cvtsi2ss	%ecx, %xmm7
	jmp	LBB0_24
LBB0_26:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_paintbuffer,8,3                ## @paintbuffer
	.comm	_SND_CHUNK_SIZE,4,2             ## @SND_CHUNK_SIZE
	.comm	_snd_vol,4,2                    ## @snd_vol
	.no_dead_strip	_S_PaintChannelFrom16_scalar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function S_PaintChannelFrom16_scalar
_S_PaintChannelFrom16_scalar:           ; @S_PaintChannelFrom16_scalar
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w4 killed $w4 def $x4
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.1:
	ldr	x13, [x0, #16]
	cbz	x13, LBB0_3
; %bb.2:
	ldr	w9, [x0]
	mul	w3, w9, w3
LBB0_3:
Lloh0:
	adrp	x14, _paintbuffer@GOTPAGE
Lloh1:
	ldr	x14, [x14, _paintbuffer@GOTPAGEOFF]
	cmp	w8, #2
	cset	w9, eq
	lsl	w12, w3, w9
	ldr	x11, [x1, #8]
Lloh2:
	adrp	x9, _SND_CHUNK_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SND_CHUNK_SIZE@GOTPAGEOFF]
	ldr	w15, [x9]
	mov	x10, x11
	cmp	w12, w15
	b.lt	LBB0_5
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x10, #8]
	cmp	x10, #0
	csel	x10, x11, x10, eq
	sub	w12, w12, w15
	cmp	w12, w15
	b.ge	LBB0_4
LBB0_5:
	ldr	x16, [x14]
	cbz	x13, LBB0_7
; %bb.6:
	ldr	s0, [x0, #4]
	fmov	s1, #1.00000000
	fcmp	s0, s1
	b.ne	LBB0_15
LBB0_7:
	cmp	w2, #1
	b.lt	LBB0_25
; %bb.8:
	sxtw	x17, w4
Lloh4:
	adrp	x11, _snd_vol@GOTPAGE
Lloh5:
	ldr	x11, [x11, _snd_vol@GOTPAGEOFF]
Lloh6:
	ldr	w13, [x11]
	ldp	w11, w14, [x0, #8]
	mul	w11, w13, w11
	mul	w13, w14, w13
	ldr	x15, [x10]
	mov	w14, w2
	add	x16, x16, x17, lsl #3
	add	x16, x16, #4
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x16, x16, #8
	subs	x14, x14, #1
	b.eq	LBB0_25
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sxtw	x0, w12
	ldrsh	w17, [x15, w12, sxtw #1]
	add	x0, x0, #1
	mul	w1, w11, w17
	ldur	w2, [x16, #-4]
	add	w1, w2, w1, asr #8
	stur	w1, [x16, #-4]
	cmp	w8, #2
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w12, w12, #2
	ldrsh	w17, [x15, x0, lsl #1]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x12, x0
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mul	w17, w13, w17
	ldr	w0, [x16]
	add	w17, w0, w17, asr #8
	str	w17, [x16]
	ldr	w17, [x9]
	cmp	w12, w17
	b.ne	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w12, #0
	ldr	x10, [x10, #8]
	ldr	x15, [x10]
	b	LBB0_9
LBB0_15:
	cmp	w2, #1
	b.lt	LBB0_25
; %bb.16:
	mov	x13, #0
Lloh7:
	adrp	x15, _snd_vol@GOTPAGE
Lloh8:
	ldr	x15, [x15, _snd_vol@GOTPAGEOFF]
	add	x14, x16, w4, sxtw #3
	ldr	d1, [x0, #8]
	ld1r.2s	{ v2 }, [x15]
	mul.2s	v1, v1, v2
	scvtf.2s	v1, v1
	ldr	x15, [x10]
	scvtf	s2, w12
	scvtf	s3, w8
	mov	w12, w2
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	lsl	w16, w16, #8
	sdiv	w16, w16, w8
	scvtf	s5, w16
	fmul.2s	v4, v4, v1
	lsl	x16, x13, #3
	dup.2s	v5, v5[0]
	fdiv.2s	v4, v4, v5
	ldr	d5, [x14, x16]
	scvtf.2s	v5, v5
	fadd.2s	v4, v4, v5
	fcvtzs.2s	v4, v4
	str	d4, [x14, x16]
	add	x13, x13, #1
	cmp	x13, x12
	b.eq	LBB0_25
LBB0_18:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	fcvtzs	w17, s2
	fmadd	s2, s0, s3, s2
	fcvtzs	w0, s2
	movi	d4, #0000000000000000
	subs	w16, w0, w17
	b.le	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x9]
	scvtf	s5, w1
	sub	w2, w1, #1
	movi	d4, #0000000000000000
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	mov.s	v6[1], v7[0]
	fadd.2s	v4, v4, v6
	add	w17, w17, w8
	cmp	w17, w0
	b.ge	LBB0_17
LBB0_21:                                ;   Parent Loop BB0_18 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w1, w17
	b.ne	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	ldr	x10, [x10, #8]
	cmp	x10, #0
	csel	x10, x11, x10, eq
	ldr	x15, [x10]
	fsub	s2, s2, s5
LBB0_23:                                ;   in Loop: Header=BB0_21 Depth=2
	and	w3, w2, w17
	ldr	h6, [x15, w3, sxtw #1]
	sshll.4s	v6, v6, #0
	scvtf	s6, s6
	fmov	s7, s6
	cmp	w8, #2
	b.ne	LBB0_20
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=2
	add	w3, w17, #1
	and	w3, w2, w3
	ldr	h7, [x15, w3, sxtw #1]
	sshll.4s	v7, v7, #0
	scvtf	s7, s7
	b	LBB0_20
LBB0_25:
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_paintbuffer,8,3                ; @paintbuffer
	.comm	_SND_CHUNK_SIZE,4,2             ; @SND_CHUNK_SIZE
	.comm	_snd_vol,4,2                    ; @snd_vol
	.no_dead_strip	_S_PaintChannelFrom16_scalar
.subsections_via_symbols
