	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function png_read_plte
LCPI0_0:
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_png_read_plte:                         ## @png_read_plte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	movl	%edx, %r9d
	cmpl	$4, %edx
	jae	LBB0_6
LBB0_2:
	xorl	%r14d, %r14d
LBB0_3:
	leal	(%r14,%r14,2), %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	movl	(%rdi,%rcx,4), %ecx
	leal	1(%rax), %edx
	movl	(%rdi,%rdx,4), %edx
	leal	2(%rax), %ebx
	shll	$16, %ecx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	(%rdi,%rbx,4), %edx
	orl	$-16777216, %edx                ## imm = 0xFF000000
	movl	%edx, (%rsi,%r14,4)
	incq	%r14
	addl	$3, %eax
	cmpq	%r14, %r9
	jne	LBB0_4
LBB0_5:
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	leaq	-1(%r9), %r8
	movl	$3, %ecx
	movl	%r8d, %eax
	mull	%ecx
	seto	%cl
	xorl	%r14d, %r14d
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.7:
	testb	%cl, %cl
	jne	LBB0_3
## %bb.8:
	shrq	$32, %r8
	jne	LBB0_3
## %bb.9:
	cmpl	$-3, %eax
	ja	LBB0_3
## %bb.10:
	testb	%cl, %cl
	jne	LBB0_3
## %bb.11:
	testq	%r8, %r8
	jne	LBB0_3
## %bb.12:
	leaq	(%r9,%r9,2), %rax
	leaq	(%rdi,%rax,4), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_15
## %bb.13:
	leaq	(%rsi,%r9,4), %rax
	cmpq	%rdi, %rax
	ja	LBB0_2
LBB0_15:
	movl	%r9d, %r14d
	andl	$-4, %r14d
	leaq	-4(%r14), %rax
	movq	%rax, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_21
## %bb.16:
	movq	%r8, %r11
	andq	$-2, %r11
	movl	$12, %eax
	xorl	%r10d, %r10d
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [4278190080,4278190080,4278190080,4278190080]
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leal	-12(%rax), %ecx
	andl	$-8, %ecx
	movdqu	(%rdi,%rcx,4), %xmm1
	movdqu	16(%rdi,%rcx,4), %xmm2
	movups	32(%rdi,%rcx,4), %xmm3
	movdqa	%xmm2, %xmm4
	pblendw	$12, %xmm1, %xmm4               ## xmm4 = xmm4[0,1],xmm1[2,3],xmm4[4,5,6,7]
	pshufd	$238, %xmm1, %xmm5              ## xmm5 = xmm1[2,3,2,3]
	shufps	$236, %xmm2, %xmm1              ## xmm1 = xmm1[0,3],xmm2[2,3]
	insertps	$112, %xmm3, %xmm1              ## xmm1 = xmm1[0,1,2],xmm3[1]
	pshufd	$170, %xmm3, %xmm6              ## xmm6 = xmm3[2,2,2,2]
	pshufd	$241, %xmm4, %xmm4              ## xmm4 = xmm4[1,0,3,3]
	pblendw	$192, %xmm6, %xmm4              ## xmm4 = xmm4[0,1,2,3,4,5],xmm6[6,7]
	pblendw	$12, %xmm2, %xmm5               ## xmm5 = xmm5[0,1],xmm2[2,3],xmm5[4,5,6,7]
	shufps	$196, %xmm3, %xmm5              ## xmm5 = xmm5[0,1],xmm3[0,3]
	pslld	$16, %xmm1
	por	%xmm5, %xmm1
	pslld	$8, %xmm4
	por	%xmm1, %xmm4
	por	%xmm0, %xmm4
	movdqu	%xmm4, (%rsi,%r10,4)
	movl	%eax, %ecx
	andl	$-4, %ecx
	movdqu	(%rdi,%rcx,4), %xmm1
	movdqu	16(%rdi,%rcx,4), %xmm2
	movups	32(%rdi,%rcx,4), %xmm3
	movdqa	%xmm2, %xmm4
	pblendw	$12, %xmm1, %xmm4               ## xmm4 = xmm4[0,1],xmm1[2,3],xmm4[4,5,6,7]
	pshufd	$238, %xmm1, %xmm5              ## xmm5 = xmm1[2,3,2,3]
	shufps	$236, %xmm2, %xmm1              ## xmm1 = xmm1[0,3],xmm2[2,3]
	insertps	$112, %xmm3, %xmm1              ## xmm1 = xmm1[0,1,2],xmm3[1]
	pshufd	$170, %xmm3, %xmm6              ## xmm6 = xmm3[2,2,2,2]
	pshufd	$241, %xmm4, %xmm4              ## xmm4 = xmm4[1,0,3,3]
	pblendw	$192, %xmm6, %xmm4              ## xmm4 = xmm4[0,1,2,3,4,5],xmm6[6,7]
	pblendw	$12, %xmm2, %xmm5               ## xmm5 = xmm5[0,1],xmm2[2,3],xmm5[4,5,6,7]
	shufps	$196, %xmm3, %xmm5              ## xmm5 = xmm5[0,1],xmm3[0,3]
	pslld	$16, %xmm1
	por	%xmm5, %xmm1
	pslld	$8, %xmm4
	por	%xmm1, %xmm4
	por	%xmm0, %xmm4
	movdqu	%xmm4, 16(%rsi,%r10,4)
	addq	$8, %r10
	addq	$24, %rax
	addq	$-2, %r11
	jne	LBB0_17
## %bb.18:
	testb	$1, %r8b
	je	LBB0_20
LBB0_19:
	leal	(%r10,%r10,2), %eax
	andl	$-4, %eax
	movdqu	(%rdi,%rax,4), %xmm0
	movdqu	16(%rdi,%rax,4), %xmm1
	movups	32(%rdi,%rax,4), %xmm2
	movdqa	%xmm1, %xmm3
	pblendw	$12, %xmm0, %xmm3               ## xmm3 = xmm3[0,1],xmm0[2,3],xmm3[4,5,6,7]
	pshufd	$238, %xmm0, %xmm4              ## xmm4 = xmm0[2,3,2,3]
	shufps	$236, %xmm1, %xmm0              ## xmm0 = xmm0[0,3],xmm1[2,3]
	insertps	$112, %xmm2, %xmm0              ## xmm0 = xmm0[0,1,2],xmm2[1]
	pshufd	$170, %xmm2, %xmm5              ## xmm5 = xmm2[2,2,2,2]
	pshufd	$241, %xmm3, %xmm3              ## xmm3 = xmm3[1,0,3,3]
	pblendw	$192, %xmm5, %xmm3              ## xmm3 = xmm3[0,1,2,3,4,5],xmm5[6,7]
	pblendw	$12, %xmm1, %xmm4               ## xmm4 = xmm4[0,1],xmm1[2,3],xmm4[4,5,6,7]
	shufps	$196, %xmm2, %xmm4              ## xmm4 = xmm4[0,1],xmm2[0,3]
	pslld	$16, %xmm0
	por	%xmm4, %xmm0
	pslld	$8, %xmm3
	por	%xmm0, %xmm3
	por	LCPI0_0(%rip), %xmm3
	movdqu	%xmm3, (%rsi,%r10,4)
LBB0_20:
	cmpq	%r9, %r14
	jne	LBB0_3
	jmp	LBB0_5
LBB0_21:
	xorl	%r10d, %r10d
	testb	$1, %r8b
	jne	LBB0_19
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_png_read_plte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_read_plte
_png_read_plte:                         ; @png_read_plte
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_5
; %bb.1:
	mov	w8, w2
	cmp	w2, #16
	b.hs	LBB0_6
LBB0_2:
	mov	x9, #0
LBB0_3:
	add	x10, x1, x9, lsl #2
	sub	x8, x8, x9
	add	w9, w9, w9, lsl #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x0, w9, uxtw #2]
	add	w12, w9, #1
	ldr	w12, [x0, w12, uxtw #2]
	add	w13, w9, #2
	ldr	w13, [x0, w13, uxtw #2]
	lsl	w11, w11, #16
	orr	w11, w11, w12, lsl #8
	orr	w11, w11, w13
	orr	w11, w11, #0xff000000
	str	w11, [x10], #4
	add	w9, w9, #3
	subs	x8, x8, #1
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #1
	ret
LBB0_6:
	mov	x9, #0
	sub	x11, x8, #1
	and	x10, x11, #0xffffffff
	add	x12, x10, w11, uxtw #1
	tst	x12, #0xffffffff00000000
	cset	w10, ne
	cmn	w12, #1
	b.eq	LBB0_3
; %bb.7:
	tbnz	w10, #0, LBB0_3
; %bb.8:
	lsr	x11, x11, #32
	cbnz	x11, LBB0_3
; %bb.9:
	cmn	w12, #3
	b.hi	LBB0_3
; %bb.10:
	tbnz	w10, #0, LBB0_3
; %bb.11:
	cbnz	x11, LBB0_3
; %bb.12:
	mov	w9, #12
	madd	x9, x8, x9, x0
	cmp	x9, x1
	b.ls	LBB0_14
; %bb.13:
	add	x9, x1, x8, lsl #2
	cmp	x9, x0
	b.hi	LBB0_2
LBB0_14:
	mov	x10, #0
	and	x9, x8, #0xfffffff0
	lsr	x11, x8, #4
	add	x11, x11, x11, lsl #1
	lsl	x11, x11, #4
	add	x12, x1, #32
	mov	w13, #-12
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w14, w10, #12
	add	w15, w10, #24
	add	w16, w10, #36
	and	x17, x10, #0xfffffff0
	and	x14, x14, #0xfffffffc
	and	x15, x15, #0xfffffff8
	and	x16, x16, x13
	add	x17, x0, x17, lsl #2
	add	x14, x0, x14, lsl #2
	add	x15, x0, x15, lsl #2
	add	x16, x0, x16, lsl #2
	ld3.4s	{ v0, v1, v2 }, [x17]
	ld3.4s	{ v3, v4, v5 }, [x14]
	ld3.4s	{ v16, v17, v18 }, [x15]
	ld3.4s	{ v19, v20, v21 }, [x16]
	shl.4s	v6, v0, #16
	shl.4s	v7, v3, #16
	shl.4s	v22, v16, #16
	shl.4s	v23, v19, #16
	shl.4s	v24, v1, #8
	shl.4s	v25, v4, #8
	shl.4s	v26, v17, #8
	shl.4s	v27, v20, #8
	orr.16b	v6, v6, v24
	orr.16b	v7, v7, v25
	orr.16b	v22, v22, v26
	orr.16b	v23, v23, v27
	orr.16b	v0, v6, v2
	orr.16b	v1, v7, v5
	orr.16b	v2, v22, v18
	orr.16b	v3, v23, v21
	orr.4s	v0, #255, lsl #24
	orr.4s	v1, #255, lsl #24
	orr.4s	v2, #255, lsl #24
	orr.4s	v3, #255, lsl #24
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	add	x10, x10, #48
	cmp	x11, x10
	b.ne	LBB0_15
; %bb.16:
	cmp	x9, x8
	b.eq	LBB0_5
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_png_read_plte
.subsections_via_symbols
