	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function data_sam_s8
LCPI0_0:
	.long	32512                           ## 0x7f00
	.long	32512                           ## 0x7f00
	.long	32512                           ## 0x7f00
	.long	32512                           ## 0x7f00
LCPI0_1:
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.long	32768                           ## 0x8000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_data_sam_s8:                           ## @data_sam_s8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %r8d
	cmpl	%esi, %r8d
	cmovll	%r8d, %esi
	leal	(%rsi,%rdx), %r9d
	movl	%r8d, %eax
	subl	%esi, %eax
	cmpl	%r8d, %r9d
	cmovlel	%edx, %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.1:
	movq	8(%rdi), %r11
	movslq	%esi, %r8
	movl	%eax, %r10d
	cmpl	$8, %eax
	jb	LBB0_2
## %bb.3:
	leaq	(%r8,%r10), %rax
	addq	%r11, %rax
	cmpq	%rcx, %rax
	jbe	LBB0_6
## %bb.4:
	leaq	(%rcx,%r10,2), %rax
	leaq	(%r11,%r8), %rdx
	cmpq	%rax, %rdx
	jae	LBB0_6
LBB0_2:
	xorl	%edi, %edi
LBB0_12:
	addq	%r8, %r11
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r11,%rdi), %eax
	shll	$8, %eax
	movl	%eax, %edx
	andl	$32512, %edx                    ## imm = 0x7F00
	andl	$32768, %eax                    ## imm = 0x8000
	subl	%eax, %edx
	movw	%dx, (%rcx,%rdi,2)
	incq	%rdi
	cmpq	%r10, %rdi
	jb	LBB0_13
LBB0_14:
	popq	%rbp
	retq
LBB0_6:
	movl	%r10d, %edi
	andl	$-8, %edi
	leaq	-8(%rdi), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	movq	%r9, %rdx
	andq	$-2, %rdx
	leaq	(%r8,%r11), %rax
	addq	$8, %rax
	xorl	%esi, %esi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [32512,32512,32512,32512]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [32768,32768,32768,32768]
	pxor	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	pmovzxbd	-4(%rax,%rsi), %xmm3            ## xmm3 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pmovzxbd	-8(%rax,%rsi), %xmm4            ## xmm4 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pslld	$8, %xmm4
	pslld	$8, %xmm3
	movdqa	%xmm3, %xmm5
	pand	%xmm0, %xmm5
	movdqa	%xmm4, %xmm6
	pand	%xmm0, %xmm6
	pand	%xmm1, %xmm3
	psubd	%xmm3, %xmm5
	pand	%xmm1, %xmm4
	psubd	%xmm4, %xmm6
	pblendw	$170, %xmm2, %xmm5              ## xmm5 = xmm5[0],xmm2[1],xmm5[2],xmm2[3],xmm5[4],xmm2[5],xmm5[6],xmm2[7]
	pblendw	$170, %xmm2, %xmm6              ## xmm6 = xmm6[0],xmm2[1],xmm6[2],xmm2[3],xmm6[4],xmm2[5],xmm6[6],xmm2[7]
	packusdw	%xmm5, %xmm6
	movdqu	%xmm6, (%rcx,%rsi,2)
	pmovzxbd	4(%rax,%rsi), %xmm3             ## xmm3 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pmovzxbd	(%rax,%rsi), %xmm4              ## xmm4 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pslld	$8, %xmm4
	pslld	$8, %xmm3
	movdqa	%xmm3, %xmm5
	pand	%xmm0, %xmm5
	movdqa	%xmm4, %xmm6
	pand	%xmm0, %xmm6
	pand	%xmm1, %xmm3
	psubd	%xmm3, %xmm5
	pand	%xmm1, %xmm4
	psubd	%xmm4, %xmm6
	pblendw	$170, %xmm2, %xmm5              ## xmm5 = xmm5[0],xmm2[1],xmm5[2],xmm2[3],xmm5[4],xmm2[5],xmm5[6],xmm2[7]
	pblendw	$170, %xmm2, %xmm6              ## xmm6 = xmm6[0],xmm2[1],xmm6[2],xmm2[3],xmm6[4],xmm2[5],xmm6[6],xmm2[7]
	packusdw	%xmm5, %xmm6
	movdqu	%xmm6, 16(%rcx,%rsi,2)
	addq	$16, %rsi
	addq	$-2, %rdx
	jne	LBB0_8
## %bb.9:
	testb	$1, %r9b
	je	LBB0_11
LBB0_10:
	leaq	(%rsi,%r8), %rax
	pmovzxbd	4(%r11,%rax), %xmm0             ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pmovzxbd	(%r11,%rax), %xmm1              ## xmm1 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pslld	$8, %xmm1
	pslld	$8, %xmm0
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [32512,32512,32512,32512]
	movdqa	%xmm0, %xmm3
	pand	%xmm2, %xmm3
	pand	%xmm1, %xmm2
	movdqa	LCPI0_1(%rip), %xmm4            ## xmm4 = [32768,32768,32768,32768]
	pand	%xmm4, %xmm0
	psubd	%xmm0, %xmm3
	pand	%xmm4, %xmm1
	psubd	%xmm1, %xmm2
	pxor	%xmm0, %xmm0
	pblendw	$170, %xmm0, %xmm3              ## xmm3 = xmm3[0],xmm0[1],xmm3[2],xmm0[3],xmm3[4],xmm0[5],xmm3[6],xmm0[7]
	pblendw	$170, %xmm0, %xmm2              ## xmm2 = xmm2[0],xmm0[1],xmm2[2],xmm0[3],xmm2[4],xmm0[5],xmm2[6],xmm0[7]
	packusdw	%xmm3, %xmm2
	movdqu	%xmm2, (%rcx,%rsi,2)
LBB0_11:
	cmpq	%r10, %rdi
	je	LBB0_14
	jmp	LBB0_12
LBB0_15:
	xorl	%esi, %esi
	testb	$1, %r9b
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_data_sam_s8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function data_sam_s8
lCPI0_0:
	.byte	0                               ; 0x0
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	1                               ; 0x1
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	2                               ; 0x2
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	3                               ; 0x3
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_1:
	.byte	4                               ; 0x4
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	5                               ; 0x5
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	6                               ; 0x6
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	7                               ; 0x7
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_data_sam_s8:                           ; @data_sam_s8
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, w1
	csel	w10, w8, w1, lt
	sub	w9, w8, w10
	add	w11, w10, w2
	cmp	w11, w8
	csel	w8, w9, w2, gt
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	ldr	x9, [x0, #8]
	sxtw	x10, w10
	cmp	w8, #32
	b.lo	LBB0_6
; %bb.2:
	add	x11, x3, x8, lsl #1
	add	x12, x9, x10
	add	x13, x10, x8
	add	x13, x9, x13
	cmp	x13, x3
	ccmp	x12, x11, #2, hi
	b.lo	LBB0_6
; %bb.3:
	and	x11, x8, #0xffffffe0
	add	x12, x3, #32
	add	x13, x10, x9
	add	x13, x13, #16
Lloh0:
	adrp	x14, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x14, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x14, lCPI0_1@PAGE
Lloh3:
	ldr	q1, [x14, lCPI0_1@PAGEOFF]
	movi.4s	v2, #127, lsl #8
	movi.4s	v3, #128, lsl #8
	mov	x14, x11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	d4, d5, [x13, #-16]
	tbl.16b	v6, { v4 }, v0
	tbl.16b	v4, { v4 }, v1
	tbl.16b	v7, { v5 }, v0
	tbl.16b	v5, { v5 }, v1
	ldp	d16, d17, [x13], #32
	tbl.16b	v18, { v16 }, v0
	tbl.16b	v16, { v16 }, v1
	tbl.16b	v19, { v17 }, v0
	tbl.16b	v17, { v17 }, v1
	shl.4s	v4, v4, #8
	shl.4s	v6, v6, #8
	shl.4s	v5, v5, #8
	shl.4s	v7, v7, #8
	shl.4s	v16, v16, #8
	shl.4s	v18, v18, #8
	shl.4s	v17, v17, #8
	shl.4s	v19, v19, #8
	and.16b	v20, v6, v2
	and.16b	v21, v4, v2
	and.16b	v22, v7, v2
	and.16b	v23, v5, v2
	and.16b	v24, v18, v2
	and.16b	v25, v16, v2
	and.16b	v26, v19, v2
	and.16b	v27, v17, v2
	and.16b	v6, v6, v3
	and.16b	v4, v4, v3
	and.16b	v7, v7, v3
	and.16b	v5, v5, v3
	and.16b	v18, v18, v3
	and.16b	v16, v16, v3
	and.16b	v19, v19, v3
	and.16b	v17, v17, v3
	sub.4s	v4, v21, v4
	sub.4s	v6, v20, v6
	sub.4s	v5, v23, v5
	sub.4s	v7, v22, v7
	sub.4s	v16, v25, v16
	sub.4s	v18, v24, v18
	sub.4s	v17, v27, v17
	sub.4s	v19, v26, v19
	uzp1.8h	v4, v6, v4
	uzp1.8h	v5, v7, v5
	uzp1.8h	v6, v18, v16
	stp	q4, q5, [x12, #-32]
	uzp1.8h	v4, v19, v17
	stp	q6, q4, [x12], #64
	subs	x14, x14, #32
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x8
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x11, #0
LBB0_7:
	add	x9, x9, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x9, x11]
	lsl	w10, w10, #8
	and	w12, w10, #0x7f00
	and	w10, w10, #0x8000
	sub	w10, w12, w10
	strh	w10, [x3, x11, lsl #1]
	add	x11, x11, #1
	cmp	x11, x8
	b.lo	LBB0_8
LBB0_9:
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_data_sam_s8
.subsections_via_symbols
