	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_PLTE                ## -- Begin function png_handle_PLTE
	.p2align	4, 0x90
_png_handle_PLTE:                       ## @png_handle_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PNG_MAX_PALETTE_LENGTH@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movl	(%r15), %eax
	movq	_PNG_HAVE_IHDR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
LBB0_9:
	movq	%r15, %rdi
	callq	_png_error
LBB0_10:
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movl	4(%r15), %eax
	movq	_PNG_COLOR_MASK_COLOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.12:
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.13:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movslq	%r12d, %rax
	imulq	$1431655766, %rax, %rcx         ## imm = 0x55555556
	movq	%rcx, %r13
	shrq	$63, %r13
	shrq	$32, %rcx
	imull	$-1431655765, %r12d, %eax       ## imm = 0xAAAAAAAB
	addl	$715827882, %eax                ## imm = 0x2AAAAAAA
	cmpl	$1431655764, %eax               ## imm = 0x55555554
	ja	LBB0_15
## %bb.14:
	movl	(%r14), %eax
	leal	(%rax,%rax,2), %eax
	cmpl	%r12d, %eax
	jge	LBB0_16
LBB0_15:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movq	%rcx, %r14
	callq	_png_error
	movq	%r14, %rcx
LBB0_16:
	addl	%r13d, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	cmpl	$3, %r12d
	movq	%rbx, %r13
	jl	LBB0_19
## %bb.17:
	leaq	16(%r13), %rbx
	leaq	-80(%rbp), %r12
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$3, %edx
	callq	_png_crc_read
	movq	-80(%rbp), %rax
	movq	%rax, (%rbx)
	movdqu	-72(%rbp), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, -16(%rbx)
	addq	$24, %rbx
	decl	%r14d
	jne	LBB0_18
LBB0_19:
	movl	4(%r15), %eax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_28
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	callq	_png_warning
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.6:
	movq	%r15, %rdi
	movl	%r12d, %esi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_crc_finish                 ## TAILCALL
LBB0_21:
	movq	%r15, %rdi
	callq	_png_crc_error
	testq	%rax, %rax
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_28
## %bb.22:
	movl	8(%r15), %eax
	movq	_PNG_FLAG_CRC_ANCILLARY_USE@GOTPCREL(%rip), %rdx
	movq	_PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, (%rdx)
	je	LBB0_23
## %bb.26:
	testl	%eax, %ecx
	jne	LBB0_28
## %bb.27:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_png_chunk_warning
	jmp	LBB0_28
LBB0_23:
	leaq	L_.str.6(%rip), %rsi
	testl	%eax, %ecx
	je	LBB0_25
## %bb.24:
	movq	%r15, %rdi
	callq	_png_chunk_error
LBB0_28:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_png_set_PLTE
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	%r15, %rdi
	callq	_png_chunk_warning
	jmp	LBB0_29
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_MAX_PALETTE_LENGTH,4,2     ## @PNG_MAX_PALETTE_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_handle_PLTE\n"

	.comm	_PNG_HAVE_IHDR,4,2              ## @PNG_HAVE_IHDR
L_.str.1:                               ## @.str.1
	.asciz	"Missing IHDR before PLTE"

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
L_.str.2:                               ## @.str.2
	.asciz	"Invalid PLTE after IDAT"

	.comm	_PNG_HAVE_PLTE,4,2              ## @PNG_HAVE_PLTE
L_.str.3:                               ## @.str.3
	.asciz	"Duplicate PLTE chunk"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ## @PNG_COLOR_MASK_COLOR
L_.str.4:                               ## @.str.4
	.asciz	"Ignoring PLTE chunk in grayscale PNG"

	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ## @PNG_COLOR_TYPE_PALETTE
L_.str.5:                               ## @.str.5
	.asciz	"Invalid palette chunk"

	.comm	_PNG_FLAG_CRC_ANCILLARY_USE,4,2 ## @PNG_FLAG_CRC_ANCILLARY_USE
	.comm	_PNG_FLAG_CRC_ANCILLARY_NOWARN,4,2 ## @PNG_FLAG_CRC_ANCILLARY_NOWARN
L_.str.6:                               ## @.str.6
	.asciz	"CRC error"

	.comm	_PNG_INFO_tRNS,4,2              ## @PNG_INFO_tRNS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_PLTE                ; -- Begin function png_handle_PLTE
	.p2align	2
_png_handle_PLTE:                       ; @png_handle_PLTE
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x24, _PNG_MAX_PALETTE_LENGTH@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PNG_MAX_PALETTE_LENGTH@GOTPAGEOFF]
	ldr	w8, [x24]
	add	x8, x8, x8, lsl #1
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x3ffffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _PNG_HAVE_IHDR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PNG_HAVE_IHDR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh12:
	adrp	x9, _PNG_HAVE_IDAT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PNG_HAVE_IDAT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh19:
	adrp	x9, _PNG_HAVE_PLTE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_png_error
LBB0_7:
Lloh24:
	adrp	x8, _PNG_HAVE_PLTE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x8]
	ldp	w10, w8, [x19]
	orr	w9, w10, w9
	str	w9, [x19]
Lloh27:
	adrp	x9, _PNG_COLOR_MASK_COLOR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PNG_COLOR_MASK_COLOR@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.8:
Lloh30:
	adrp	x25, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh31:
	ldr	x25, [x25, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.9:
	mov	w8, #21846
	movk	w8, #21845, lsl #16
	smull	x8, w22, w8
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w23, w8, w9
	add	w8, w23, w23, lsl #1
	cmp	w22, w8
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x24]
	add	w8, w8, w8, lsl #1
	cmp	w8, w22
	b.ge	LBB0_12
LBB0_11:
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_png_error
LBB0_12:
	cmp	w22, #3
	b.lt	LBB0_15
; %bb.13:
	add	x22, x21, #16
	mov	x24, x23
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	sub	x1, x29, #96
	mov	x0, x19
	mov	w2, #3
	bl	_png_crc_read
	ldp	x8, x9, [x29, #-96]
	stp	x9, x8, [x22, #-8]
	ldur	x8, [x29, #-80]
	stur	x8, [x22, #-16]
	add	x22, x22, #24
	subs	w24, w24, #1
	b.ne	LBB0_14
LBB0_15:
	ldr	w8, [x19, #4]
	ldr	w9, [x25]
	mov	x0, x19
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.16:
	mov	w1, #0
	bl	_png_crc_finish
	b	LBB0_27
LBB0_17:
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_png_warning
LBB0_19:
	ldur	x8, [x29, #-72]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.20:
	mov	x0, x19
	mov	x1, x22
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_png_crc_finish
LBB0_21:
	bl	_png_crc_error
	cbz	x0, LBB0_27
; %bb.22:
	ldr	w9, [x19, #8]
Lloh39:
	adrp	x8, _PNG_FLAG_CRC_ANCILLARY_USE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PNG_FLAG_CRC_ANCILLARY_USE@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x8]
Lloh42:
	adrp	x8, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGE
Lloh43:
	ldr	x8, [x8, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	and	w8, w8, w9
	tst	w10, w9
	b.eq	LBB0_25
; %bb.23:
	cbnz	w8, LBB0_27
; %bb.24:
Lloh45:
	adrp	x1, l_.str.6@PAGE
Lloh46:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_warning
	b	LBB0_27
LBB0_25:
Lloh47:
	adrp	x1, l_.str.6@PAGE
Lloh48:
	add	x1, x1, l_.str.6@PAGEOFF
	cbz	w8, LBB0_30
; %bb.26:
	mov	x0, x19
	bl	_png_chunk_error
LBB0_27:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	bl	_png_set_PLTE
LBB0_28:
	ldur	x8, [x29, #-72]
Lloh49:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh50:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.29:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_30:
	mov	x0, x19
	bl	_png_chunk_warning
	b	LBB0_28
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_MAX_PALETTE_LENGTH,4,2     ; @PNG_MAX_PALETTE_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_PLTE\n"

	.comm	_PNG_HAVE_IHDR,4,2              ; @PNG_HAVE_IHDR
l_.str.1:                               ; @.str.1
	.asciz	"Missing IHDR before PLTE"

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
l_.str.2:                               ; @.str.2
	.asciz	"Invalid PLTE after IDAT"

	.comm	_PNG_HAVE_PLTE,4,2              ; @PNG_HAVE_PLTE
l_.str.3:                               ; @.str.3
	.asciz	"Duplicate PLTE chunk"

	.comm	_PNG_COLOR_MASK_COLOR,4,2       ; @PNG_COLOR_MASK_COLOR
l_.str.4:                               ; @.str.4
	.asciz	"Ignoring PLTE chunk in grayscale PNG"

	.comm	_PNG_COLOR_TYPE_PALETTE,4,2     ; @PNG_COLOR_TYPE_PALETTE
l_.str.5:                               ; @.str.5
	.asciz	"Invalid palette chunk"

	.comm	_PNG_FLAG_CRC_ANCILLARY_USE,4,2 ; @PNG_FLAG_CRC_ANCILLARY_USE
	.comm	_PNG_FLAG_CRC_ANCILLARY_NOWARN,4,2 ; @PNG_FLAG_CRC_ANCILLARY_NOWARN
l_.str.6:                               ; @.str.6
	.asciz	"CRC error"

	.comm	_PNG_INFO_tRNS,4,2              ; @PNG_INFO_tRNS
.subsections_via_symbols
