	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_PaintChannelFromMuLaw        ## -- Begin function S_PaintChannelFromMuLaw
	.p2align	4, 0x90
_S_PaintChannelFromMuLaw:               ## @S_PaintChannelFromMuLaw
	.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
	movq	_snd_vol@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_paintbuffer@GOTPCREL(%rip), %r14
	movq	(%rsi), %r12
	movq	_SND_CHUNK_SIZE@GOTPCREL(%rip), %r9
	movl	(%r9), %ebx
	addl	%ebx, %ebx
	movq	%r12, %rsi
	cmpl	%ecx, %ebx
	jg	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %rsi
	subl	%ebx, %ecx
	testq	%rsi, %rsi
	cmoveq	%r12, %rsi
	cmpl	%ebx, %ecx
	jge	LBB0_1
LBB0_2:
	movl	(%rdi), %r11d
	imull	%r10d, %r11d
	imull	4(%rdi), %r10d
	movq	(%r14), %r14
	movslq	%r8d, %r13
	cmpl	$0, 12(%rdi)
	je	LBB0_3
## %bb.8:
	testl	%edx, %edx
	jle	LBB0_13
## %bb.9:
	cvtsi2ss	%ecx, %xmm1
	movq	(%rsi), %rcx
	movq	_mulawToShort@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r8
	movss	8(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movl	%edx, %r15d
	leaq	(%r14,%r13,8), %rdi
	addq	$4, %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cvttss2si	%xmm1, %edx
	movslq	%edx, %rdx
	movq	(%rcx,%rdx,8), %rdx
	movl	(%r8,%rdx,4), %eax
	movl	%eax, %edx
	imull	%r11d, %edx
	sarl	$8, %edx
	addl	%edx, -4(%rdi,%rbx,8)
	imull	%r10d, %eax
	sarl	$8, %eax
	addl	%eax, (%rdi,%rbx,8)
	movl	(%r9), %eax
	addl	%eax, %eax
	xorps	%xmm2, %xmm2
	cvtsi2ss	%eax, %xmm2
	addss	%xmm0, %xmm1
	ucomiss	%xmm2, %xmm1
	jb	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rsi), %rsi
	testq	%rsi, %rsi
	cmoveq	%r12, %rsi
	movq	(%rsi), %rcx
	xorps	%xmm1, %xmm1
	jmp	LBB0_12
LBB0_3:
	testl	%edx, %edx
	jle	LBB0_13
## %bb.4:
	movq	(%rsi), %r8
	movslq	%ecx, %rax
	leaq	(%r8,%rax,8), %rax
	movq	_mulawToShort@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movl	%edx, %r12d
	leaq	(%r14,%r13,8), %rdi
	addq	$4, %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	movl	(%r15,%rcx,4), %edx
	movl	%edx, %ecx
	imull	%r11d, %ecx
	sarl	$8, %ecx
	addl	%ecx, -4(%rdi,%rbx,8)
	imull	%r10d, %edx
	sarl	$8, %edx
	addl	%edx, (%rdi,%rbx,8)
	addq	$8, %rax
	movslq	(%r9), %rcx
	shlq	$4, %rcx
	addq	%r8, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rsi), %rsi
	movq	(%rsi), %r8
	movq	%r8, %rax
	jmp	LBB0_7
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_snd_vol,4,2                    ## @snd_vol
	.comm	_paintbuffer,8,3                ## @paintbuffer
	.comm	_SND_CHUNK_SIZE,4,2             ## @SND_CHUNK_SIZE
	.comm	_mulawToShort,8,3               ## @mulawToShort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_PaintChannelFromMuLaw        ; -- Begin function S_PaintChannelFromMuLaw
	.p2align	2
_S_PaintChannelFromMuLaw:               ; @S_PaintChannelFromMuLaw
	.cfi_startproc
; %bb.0:
	ldr	d0, [x0]
Lloh0:
	adrp	x8, _snd_vol@GOTPAGE
Lloh1:
	ldr	x8, [x8, _snd_vol@GOTPAGEOFF]
	ld1r.2s	{ v1 }, [x8]
Lloh2:
	adrp	x8, _paintbuffer@GOTPAGE
Lloh3:
	ldr	x8, [x8, _paintbuffer@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x8, w4, sxtw #3
	ldr	x11, [x1]
Lloh5:
	adrp	x9, _SND_CHUNK_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SND_CHUNK_SIZE@GOTPAGEOFF]
	ldr	w10, [x9]
	lsl	w12, w10, #1
	mov	x10, x11
	cmp	w12, w3
	b.gt	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x10, #8]
	cmp	x10, #0
	csel	x10, x11, x10, eq
	sub	w3, w3, w12
	cmp	w3, w12
	b.ge	LBB0_1
LBB0_2:
	mul.2s	v0, v0, v1
	ldr	w12, [x0, #12]
	cbz	w12, LBB0_8
; %bb.3:
	cmp	w2, #1
	b.lt	LBB0_13
; %bb.4:
	scvtf	s2, w3
	ldr	x14, [x10]
Lloh7:
	adrp	x12, _mulawToShort@GOTPAGE
Lloh8:
	ldr	x12, [x12, _mulawToShort@GOTPAGEOFF]
Lloh9:
	ldr	x12, [x12]
	ldr	s1, [x0, #8]
	mov	w13, w2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #8
	subs	x13, x13, #1
	b.eq	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	fcvtzs	w15, s2
	ldr	x15, [x14, w15, sxtw #3]
	add	x15, x12, x15, lsl #2
	fadd	s2, s2, s1
	ld1r.2s	{ v3 }, [x15]
	mul.2s	v3, v3, v0
	ldr	d4, [x8]
	ssra.2s	v4, v3, #8
	str	d4, [x8]
	ldr	w15, [x9]
	lsl	w15, w15, #1
	scvtf	s3, w15
	fcmp	s2, s3
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x10, #8]
	cmp	x10, #0
	csel	x10, x11, x10, eq
	ldr	x14, [x10]
	movi	d2, #0000000000000000
	b	LBB0_5
LBB0_8:
	cmp	w2, #1
	b.lt	LBB0_13
; %bb.9:
	ldr	x11, [x10]
	add	x14, x11, w3, sxtw #3
Lloh10:
	adrp	x12, _mulawToShort@GOTPAGE
Lloh11:
	ldr	x12, [x12, _mulawToShort@GOTPAGEOFF]
Lloh12:
	ldr	x12, [x12]
	mov	w13, w2
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, #8
	subs	x13, x13, #1
	b.eq	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x14], #8
	add	x15, x12, x15, lsl #2
	ld1r.2s	{ v1 }, [x15]
	mul.2s	v1, v1, v0
	ldr	d2, [x8]
	ssra.2s	v2, v1, #8
	str	d2, [x8]
	ldrsw	x15, [x9]
	add	x15, x11, x15, lsl #4
	cmp	x14, x15
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x10, [x10, #8]
	ldr	x11, [x10]
	mov	x14, x11
	b	LBB0_10
LBB0_13:
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_snd_vol,4,2                    ; @snd_vol
	.comm	_paintbuffer,8,3                ; @paintbuffer
	.comm	_SND_CHUNK_SIZE,4,2             ; @SND_CHUNK_SIZE
	.comm	_mulawToShort,8,3               ; @mulawToShort
.subsections_via_symbols
