	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function enhance_picture
LCPI0_0:
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
	.short	32897                           ## 0x8081
LCPI0_1:
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
LCPI0_2:
	.byte	0                               ## 0x0
	.byte	2                               ## 0x2
	.byte	4                               ## 0x4
	.byte	6                               ## 0x6
	.byte	8                               ## 0x8
	.byte	10                              ## 0xa
	.byte	12                              ## 0xc
	.byte	14                              ## 0xe
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_enhance_picture:                       ## @enhance_picture
	.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 $esi killed $esi def $rsi
	testl	%esi, %esi
	je	LBB0_19
## %bb.1:
	leal	-1(%rsi), %eax
	cmpl	$7, %eax
	jae	LBB0_2
LBB0_16:
	movq	%rdi, %rax
	jmp	LBB0_17
LBB0_2:
	leaq	1(%rax), %r8
	movabsq	$8589934576, %r10               ## imm = 0x1FFFFFFF0
	cmpl	$15, %eax
	jae	LBB0_7
## %bb.3:
	xorl	%edx, %edx
	jmp	LBB0_4
LBB0_7:
	movq	%r8, %rdx
	andq	%r10, %rdx
	leaq	-16(%rdx), %rax
	movq	%rax, %r9
	shrq	$4, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r9, %rcx
	andq	$-2, %rcx
	xorl	%eax, %eax
	pcmpeqd	%xmm0, %xmm0
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [32897,32897,32897,32897,32897,32897,32897,32897]
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0]
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rax), %xmm4
	movdqu	16(%rdi,%rax), %xmm3
	pxor	%xmm0, %xmm4
	pshufd	$238, %xmm4, %xmm5              ## xmm5 = xmm4[2,3,2,3]
	pmovzxbd	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero
	pshufd	$255, %xmm4, %xmm6              ## xmm6 = xmm4[3,3,3,3]
	pmovzxbd	%xmm6, %xmm6                    ## xmm6 = xmm6[0],zero,zero,zero,xmm6[1],zero,zero,zero,xmm6[2],zero,zero,zero,xmm6[3],zero,zero,zero
	pshufd	$85, %xmm4, %xmm7               ## xmm7 = xmm4[1,1,1,1]
	pmovzxbd	%xmm7, %xmm7                    ## xmm7 = xmm7[0],zero,zero,zero,xmm7[1],zero,zero,zero,xmm7[2],zero,zero,zero,xmm7[3],zero,zero,zero
	pmovzxbd	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero
	pmaddwd	%xmm4, %xmm4
	pmaddwd	%xmm7, %xmm7
	packusdw	%xmm7, %xmm4
	pmaddwd	%xmm6, %xmm6
	pmaddwd	%xmm5, %xmm5
	packusdw	%xmm6, %xmm5
	pmulhuw	%xmm1, %xmm4
	psrlw	$7, %xmm4
	pmulhuw	%xmm1, %xmm5
	psrlw	$7, %xmm5
	pand	%xmm2, %xmm5
	pand	%xmm2, %xmm4
	packuswb	%xmm5, %xmm4
	pxor	%xmm0, %xmm4
	movdqu	%xmm4, (%rdi,%rax)
	pxor	%xmm0, %xmm3
	pshufd	$238, %xmm3, %xmm4              ## xmm4 = xmm3[2,3,2,3]
	pmovzxbd	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero
	pshufd	$255, %xmm3, %xmm5              ## xmm5 = xmm3[3,3,3,3]
	pmovzxbd	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,zero,zero,xmm5[1],zero,zero,zero,xmm5[2],zero,zero,zero,xmm5[3],zero,zero,zero
	pshufd	$85, %xmm3, %xmm6               ## xmm6 = xmm3[1,1,1,1]
	pmovzxbd	%xmm6, %xmm6                    ## xmm6 = xmm6[0],zero,zero,zero,xmm6[1],zero,zero,zero,xmm6[2],zero,zero,zero,xmm6[3],zero,zero,zero
	pmovzxbd	%xmm3, %xmm3                    ## xmm3 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero
	pmaddwd	%xmm3, %xmm3
	pmaddwd	%xmm6, %xmm6
	packusdw	%xmm6, %xmm3
	pmaddwd	%xmm5, %xmm5
	pmaddwd	%xmm4, %xmm4
	packusdw	%xmm5, %xmm4
	pmulhuw	%xmm1, %xmm3
	psrlw	$7, %xmm3
	pmulhuw	%xmm1, %xmm4
	psrlw	$7, %xmm4
	pand	%xmm2, %xmm4
	pand	%xmm2, %xmm3
	packuswb	%xmm4, %xmm3
	pxor	%xmm0, %xmm3
	movdqu	%xmm3, 16(%rdi,%rax)
	addq	$32, %rax
	addq	$-2, %rcx
	jne	LBB0_10
## %bb.11:
	testb	$1, %r9b
	je	LBB0_13
LBB0_12:
	movdqu	(%rdi,%rax), %xmm2
	pcmpeqd	%xmm0, %xmm0
	pxor	%xmm0, %xmm2
	pshufd	$238, %xmm2, %xmm1              ## xmm1 = xmm2[2,3,2,3]
	pmovzxbd	%xmm1, %xmm1                    ## xmm1 = xmm1[0],zero,zero,zero,xmm1[1],zero,zero,zero,xmm1[2],zero,zero,zero,xmm1[3],zero,zero,zero
	pshufd	$255, %xmm2, %xmm3              ## xmm3 = xmm2[3,3,3,3]
	pmovzxbd	%xmm3, %xmm3                    ## xmm3 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero
	pshufd	$85, %xmm2, %xmm4               ## xmm4 = xmm2[1,1,1,1]
	pmovzxbd	%xmm4, %xmm4                    ## xmm4 = xmm4[0],zero,zero,zero,xmm4[1],zero,zero,zero,xmm4[2],zero,zero,zero,xmm4[3],zero,zero,zero
	pmovzxbd	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,zero,zero,xmm2[1],zero,zero,zero,xmm2[2],zero,zero,zero,xmm2[3],zero,zero,zero
	pmaddwd	%xmm2, %xmm2
	pmaddwd	%xmm4, %xmm4
	packusdw	%xmm4, %xmm2
	pmaddwd	%xmm3, %xmm3
	pmaddwd	%xmm1, %xmm1
	packusdw	%xmm3, %xmm1
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [32897,32897,32897,32897,32897,32897,32897,32897]
	pmulhuw	%xmm3, %xmm2
	psrlw	$7, %xmm2
	pmulhuw	%xmm3, %xmm1
	psrlw	$7, %xmm1
	movdqa	LCPI0_1(%rip), %xmm3            ## xmm3 = [255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0]
	pand	%xmm3, %xmm1
	pand	%xmm3, %xmm2
	packuswb	%xmm1, %xmm2
	pxor	%xmm0, %xmm2
	movdqu	%xmm2, (%rdi,%rax)
LBB0_13:
	cmpq	%rdx, %r8
	je	LBB0_19
## %bb.14:
	testb	$8, %r8b
	jne	LBB0_4
## %bb.15:
	addq	%rdx, %rdi
	subl	%edx, %esi
	jmp	LBB0_16
LBB0_4:
	addq	$8, %r10
	andq	%r8, %r10
	subl	%r10d, %esi
	leaq	(%rdi,%r10), %rax
	pcmpeqd	%xmm0, %xmm0
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [32897,32897,32897,32897,32897,32897,32897,32897]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = <0,2,4,6,8,10,12,14,u,u,u,u,u,u,u,u>
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rdx), %xmm3              ## xmm3 = mem[0],zero
	pxor	%xmm0, %xmm3
	pmovzxbw	%xmm3, %xmm3                    ## xmm3 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero,xmm3[4],zero,xmm3[5],zero,xmm3[6],zero,xmm3[7],zero
	pmullw	%xmm3, %xmm3
	pmulhuw	%xmm1, %xmm3
	psrlw	$7, %xmm3
	pshufb	%xmm2, %xmm3
	pxor	%xmm0, %xmm3
	movq	%xmm3, (%rdi,%rdx)
	addq	$8, %rdx
	cmpq	%rdx, %r10
	jne	LBB0_5
## %bb.6:
	cmpq	%r10, %r8
	je	LBB0_19
LBB0_17:
	movl	%esi, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rax,%rdx), %esi
	xorl	$255, %esi
	imull	%esi, %esi
	imull	$32897, %esi, %esi              ## imm = 0x8081
	shrl	$23, %esi
	notb	%sil
	movb	%sil, (%rax,%rdx)
	incq	%rdx
	cmpl	%edx, %ecx
	jne	LBB0_18
LBB0_19:
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	testb	$1, %r9b
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_enhance_picture
.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 enhance_picture
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
_enhance_picture:                       ; @enhance_picture
	.cfi_startproc
; %bb.0:
	cbz	w1, LBB0_8
; %bb.1:
	sub	w8, w1, #1
	cmp	w8, #7
	b.hs	LBB0_3
; %bb.2:
	mov	x8, x0
	b	LBB0_6
LBB0_3:
	add	x9, x8, #1
	and	x10, x9, #0x1fffffff8
	sub	w1, w1, w10
	add	x8, x0, x10
Lloh0:
	adrp	x11, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x11, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x11, lCPI0_1@PAGE
Lloh3:
	ldr	q1, [x11, lCPI0_1@PAGEOFF]
	mov	w11, #32897
	dup.8h	v2, w11
	mov	x11, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d3, [x0]
	mvn.8b	v3, v3
	tbl.16b	v4, { v3 }, v0
	tbl.16b	v3, { v3 }, v1
	mul.4s	v3, v3, v3
	mul.4s	v4, v4, v4
	uzp1.8h	v3, v4, v3
	umull2.4s	v4, v3, v2
	umull.4s	v3, v3, v2
	uzp2.8h	v3, v3, v4
	shrn.8b	v3, v3, #7
	mvn.8b	v3, v3
	str	d3, [x0], #8
	subs	x11, x11, #8
	b.ne	LBB0_4
; %bb.5:
	cmp	x9, x10
	b.eq	LBB0_8
LBB0_6:
	mov	w9, #32897
	mov	w10, #-1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x8]
	eor	w11, w11, #0xff
	mul	w11, w11, w11
	mul	w11, w11, w9
	eor	w11, w10, w11, lsr #23
	strb	w11, [x8], #1
	subs	w1, w1, #1
	b.ne	LBB0_7
LBB0_8:
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_enhance_picture
.subsections_via_symbols
