	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function macConvert32uto16s
LCPI0_0:
	.long	1374389535                      ## 0x51eb851f
	.long	1374389535                      ## 0x51eb851f
	.long	1374389535                      ## 0x51eb851f
	.long	1374389535                      ## 0x51eb851f
LCPI0_1:
	.long	3276799                         ## 0x31ffff
	.long	3276799                         ## 0x31ffff
	.long	3276799                         ## 0x31ffff
	.long	3276799                         ## 0x31ffff
LCPI0_2:
	.long	4291690397                      ## 0xffcdff9d
	.long	4291690397                      ## 0xffcdff9d
	.long	4291690397                      ## 0xffcdff9d
	.long	4291690397                      ## 0xffcdff9d
LCPI0_3:
	.long	4294934528                      ## 0xffff8000
	.long	4294934528                      ## 0xffff8000
	.long	4294934528                      ## 0xffff8000
	.long	4294934528                      ## 0xffff8000
LCPI0_4:
	.long	32767                           ## 0x7fff
	.long	32767                           ## 0x7fff
	.long	32767                           ## 0x7fff
	.long	32767                           ## 0x7fff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_macConvert32uto16s:                    ## @macConvert32uto16s
	.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
	testq	%rcx, %rcx
	jle	LBB0_15
## %bb.1:
	cmpq	$4, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%r10d, %r10d
	jmp	LBB0_4
LBB0_3:
	leaq	(%rdx,%rcx,8), %r10
	cmpq	%rdi, %r10
	seta	-45(%rbp)                       ## 1-byte Folded Spill
	leaq	(%rdi,%rcx,4), %rbx
	cmpq	%rdx, %rbx
	seta	-44(%rbp)                       ## 1-byte Folded Spill
	leaq	(%rsi,%rcx,4), %rax
	cmpq	%rdi, %rax
	seta	%r8b
	cmpq	%rsi, %rbx
	seta	-43(%rbp)                       ## 1-byte Folded Spill
	movq	_soundvolume@GOTPCREL(%rip), %r11
	leaq	4(%r11), %r14
	cmpq	%r14, %rdi
	setb	%r13b
	cmpq	%r11, %rbx
	seta	%r12b
	cmpq	%rdx, %rax
	seta	%r15b
	cmpq	%rsi, %r10
	seta	%bl
	cmpq	%r14, %rdx
	setb	%r9b
	cmpq	%r11, %r10
	seta	-42(%rbp)                       ## 1-byte Folded Spill
	cmpq	%r14, %rsi
	setb	%r14b
	cmpq	%r11, %rax
	seta	-41(%rbp)                       ## 1-byte Folded Spill
	xorl	%r10d, %r10d
	movb	-44(%rbp), %al                  ## 1-byte Reload
	testb	%al, -45(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_4
## %bb.5:
	andb	-43(%rbp), %r8b                 ## 1-byte Folded Reload
	jne	LBB0_4
## %bb.6:
	andb	%r12b, %r13b
	jne	LBB0_4
## %bb.7:
	andb	%bl, %r15b
	jne	LBB0_4
## %bb.8:
	andb	-42(%rbp), %r9b                 ## 1-byte Folded Reload
	jne	LBB0_4
## %bb.9:
	andb	-41(%rbp), %r14b                ## 1-byte Folded Reload
	jne	LBB0_4
## %bb.10:
	movq	%rcx, %r10
	andq	$-4, %r10
	leaq	(%rdi,%r10,4), %r8
	leaq	(%rdx,%r10,8), %r9
	leaq	(%rsi,%r10,4), %r14
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [1374389535,1374389535,1374389535,1374389535]
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [3276799,3276799,3276799,3276799]
	movdqa	LCPI0_2(%rip), %xmm4            ## xmm4 = [4291690397,4291690397,4291690397,4291690397]
	movaps	LCPI0_3(%rip), %xmm5            ## xmm5 = [4294934528,4294934528,4294934528,4294934528]
	movaps	LCPI0_4(%rip), %xmm6            ## xmm6 = [32767,32767,32767,32767]
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rbx,4), %xmm0
	movd	(%r11), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	pmulld	%xmm0, %xmm1
	pshufd	$245, %xmm1, %xmm0              ## xmm0 = xmm1[1,1,3,3]
	pmuldq	%xmm2, %xmm0
	movdqa	%xmm1, %xmm7
	pmuldq	%xmm2, %xmm7
	pshufd	$245, %xmm7, %xmm7              ## xmm7 = xmm7[1,1,3,3]
	pblendw	$204, %xmm0, %xmm7              ## xmm7 = xmm7[0,1],xmm0[2,3],xmm7[4,5],xmm0[6,7]
	movdqa	%xmm7, %xmm0
	psrld	$31, %xmm0
	psrad	$5, %xmm7
	paddd	%xmm0, %xmm7
	movdqu	%xmm7, (%rdi,%rbx,4)
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	blendvps	%xmm0, %xmm5, %xmm7
	pcmpgtd	%xmm8, %xmm1
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm6, %xmm7
	movdqu	(%rsi,%rbx,4), %xmm0
	movd	(%r11), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	pshufd	$0, %xmm1, %xmm3                ## xmm3 = xmm1[0,0,0,0]
	pmulld	%xmm0, %xmm3
	pshufd	$245, %xmm3, %xmm0              ## xmm0 = xmm3[1,1,3,3]
	pmuldq	%xmm2, %xmm0
	movdqa	%xmm3, %xmm1
	pmuldq	%xmm2, %xmm1
	pshufd	$245, %xmm1, %xmm1              ## xmm1 = xmm1[1,1,3,3]
	pblendw	$204, %xmm0, %xmm1              ## xmm1 = xmm1[0,1],xmm0[2,3],xmm1[4,5],xmm0[6,7]
	movdqa	%xmm1, %xmm0
	psrld	$31, %xmm0
	psrad	$5, %xmm1
	paddd	%xmm0, %xmm1
	movdqu	%xmm1, (%rsi,%rbx,4)
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm3, %xmm0
	pcmpgtd	%xmm8, %xmm3
	blendvps	%xmm0, %xmm5, %xmm1
	movdqa	%xmm3, %xmm0
	blendvps	%xmm0, %xmm6, %xmm1
	movaps	%xmm7, %xmm0
	unpcklps	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
	unpckhps	%xmm1, %xmm7                    ## xmm7 = xmm7[2],xmm1[2],xmm7[3],xmm1[3]
	movups	%xmm7, 16(%rdx,%rbx,8)
	movups	%xmm0, (%rdx,%rbx,8)
	addq	$4, %rbx
	cmpq	%rbx, %r10
	jne	LBB0_11
## %bb.12:
	cmpq	%rcx, %r10
	jne	LBB0_13
	jmp	LBB0_15
LBB0_4:
	movq	%rdi, %r8
	movq	%rdx, %r9
	movq	%rsi, %r14
LBB0_13:
	subq	%r10, %rcx
	xorl	%edx, %edx
	movq	_soundvolume@GOTPCREL(%rip), %r10
	movl	$-32768, %r11d                  ## imm = 0x8000
	movl	$32767, %ebx                    ## imm = 0x7FFF
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r10), %eax
	imull	(%r8,%rdx,4), %eax
	cltq
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rdi
	shrq	$63, %rdi
	sarq	$37, %rsi
	addl	%edi, %esi
	movl	%esi, (%r8,%rdx,4)
	cmpl	$-3276899, %eax                 ## imm = 0xFFCDFF9D
	cmovll	%r11d, %esi
	cmpl	$3276800, %eax                  ## imm = 0x320000
	cmovgel	%ebx, %esi
	movl	%esi, (%r9,%rdx,8)
	movl	(%r10), %eax
	imull	(%r14,%rdx,4), %eax
	cltq
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rdi
	shrq	$63, %rdi
	sarq	$37, %rsi
	addl	%edi, %esi
	movl	%esi, (%r14,%rdx,4)
	cmpl	$-3276899, %eax                 ## imm = 0xFFCDFF9D
	cmovll	%r11d, %esi
	cmpl	$3276800, %eax                  ## imm = 0x320000
	cmovgel	%ebx, %esi
	movl	%esi, 4(%r9,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_14
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_soundvolume,4,2                ## @soundvolume
	.no_dead_strip	_macConvert32uto16s
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macConvert32uto16s
_macConvert32uto16s:                    ; @macConvert32uto16s
	.cfi_startproc
; %bb.0:
	cmp	x3, #1
	b.lt	LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _soundvolume@GOTPAGE
Lloh1:
	ldr	x8, [x8, _soundvolume@GOTPAGEOFF]
	cmp	x3, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_12
LBB0_3:
	mov	x10, #0
	lsl	x9, x3, #2
	add	x15, x2, x3, lsl #3
	add	x14, x1, x9
	cmp	x14, x0
	add	x16, x0, x9
	ccmp	x16, x1, #0, hi
	cset	w9, hi
	add	x17, x8, #4
	cmp	x0, x17
	ccmp	x16, x8, #0, lo
	cset	w11, hi
	cmp	x14, x2
	ccmp	x15, x1, #0, hi
	cset	w12, hi
	cmp	x2, x17
	ccmp	x15, x8, #0, lo
	cset	w13, hi
	cmp	x1, x17
	ccmp	x14, x8, #0, lo
	cset	w14, hi
	cmp	x16, x2
	ccmp	x15, x0, #0, hi
	b.hi	LBB0_12
; %bb.4:
	tbnz	w9, #0, LBB0_12
; %bb.5:
	tbnz	w11, #0, LBB0_12
; %bb.6:
	tbnz	w12, #0, LBB0_12
; %bb.7:
	tbnz	w13, #0, LBB0_12
; %bb.8:
	tbnz	w14, #0, LBB0_12
; %bb.9:
	and	x10, x3, #0xfffffffffffffffc
	lsl	x12, x10, #2
	add	x9, x0, x12
	add	x11, x2, x10, lsl #3
	add	x12, x1, x12
	mov	w13, #34079
	movk	w13, #20971, lsl #16
	dup.4s	v0, w13
	movi.4s	v1, #49, msl #16
	mov	w13, #65437
	movk	w13, #65485, lsl #16
	dup.4s	v2, w13
	mvni.4s	v3, #127, msl #8
	movi.4s	v4, #127, msl #8
	mov	x13, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	q5, [x0]
	ld1r.4s	{ v6 }, [x8]
	mul.4s	v5, v6, v5
	smull2.2d	v7, v5, v0
	smull.2d	v16, v5, v0
	uzp2.4s	v7, v16, v7
	sshr.4s	v16, v7, #5
	usra.4s	v16, v7, #31
	str	q16, [x0], #16
	cmgt.4s	v7, v5, v1
	cmgt.4s	v5, v2, v5
	bsl.16b	v5, v3, v16
	mov.16b	v16, v7
	bsl.16b	v16, v4, v5
	ldr	q5, [x1]
	mul.4s	v5, v6, v5
	smull2.2d	v6, v5, v0
	smull.2d	v7, v5, v0
	uzp2.4s	v6, v7, v6
	sshr.4s	v7, v6, #5
	usra.4s	v7, v6, #31
	cmgt.4s	v6, v5, v1
	cmgt.4s	v5, v2, v5
	bsl.16b	v5, v3, v7
	mov.16b	v17, v6
	bsl.16b	v17, v4, v5
	str	q7, [x1], #16
	st2.4s	{ v16, v17 }, [x2], #32
	subs	x13, x13, #4
	b.ne	LBB0_10
; %bb.11:
	cmp	x10, x3
	b.ne	LBB0_13
	b	LBB0_15
LBB0_12:
	mov	x9, x0
	mov	x11, x2
	mov	x12, x1
LBB0_13:
	mov	w13, #65437
	movk	w13, #65485, lsl #16
	mov	w14, #3276799
	sub	x10, x3, x10
	mov	w15, #34079
	movk	w15, #20971, lsl #16
	mov	w16, #-32768
	mov	w17, #32767
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x9]
	ldr	w1, [x8]
	mul	w0, w1, w0
	smull	x1, w0, w15
	lsr	x2, x1, #63
	asr	x1, x1, #37
	add	w1, w1, w2
	str	w1, [x9], #4
	cmp	w0, w13
	csel	w1, w16, w1, lt
	cmp	w0, w14
	csel	w0, w17, w1, gt
	str	w0, [x11]
	ldr	w0, [x12]
	ldr	w1, [x8]
	mul	w0, w1, w0
	smull	x1, w0, w15
	lsr	x2, x1, #63
	asr	x1, x1, #37
	add	w1, w1, w2
	str	w1, [x12], #4
	cmp	w0, w13
	csel	w1, w16, w1, lt
	cmp	w0, w14
	csel	w0, w17, w1, gt
	str	w0, [x11, #4]
	add	x11, x11, #8
	subs	x10, x10, #1
	b.ne	LBB0_14
LBB0_15:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_soundvolume,4,2                ; @soundvolume
	.no_dead_strip	_macConvert32uto16s
.subsections_via_symbols
