	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function standard_palette_validate
_standard_palette_validate:             ## @standard_palette_validate
	.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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-116(%rbp), %rsi
	movl	%r12d, %edx
	callq	_read_palette
	cmpq	(%r14), %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	callq	_png_error
LBB0_2:
	movl	-116(%rbp), %ebx
	cmpl	8(%r14), %ebx
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rcx
	leaq	-112(%rbp), %r15
	movq	%r15, %rdi
	movl	$64, %esi
	xorl	%edx, %edx
	callq	_safecat
	movl	8(%r14), %ecx
	movq	%r15, %rdi
	movl	$64, %esi
	movq	%rax, %rdx
	callq	_safecatn
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	movl	$64, %esi
	movq	%rax, %rdx
	callq	_safecat
	movl	-116(%rbp), %ecx
	movq	%r15, %rdi
	movl	$64, %esi
	movq	%rax, %rdx
	callq	_safecatn
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_png_error
	movl	-116(%rbp), %ebx
LBB0_4:
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.5:
	incl	%ebx
	leaq	L_.str.3(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r14, %rsi
	callq	_png_error
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_6
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"validate: palette transparency changed"

L_.str.1:                               ## @.str.1
	.asciz	"validate: palette size changed: "

L_.str.2:                               ## @.str.2
	.asciz	" -> "

L_.str.3:                               ## @.str.3
	.asciz	"validate: PLTE or tRNS chunk changed"

	.no_dead_strip	_standard_palette_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function standard_palette_validate
_standard_palette_validate:             ; @standard_palette_validate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x3, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x1, sp, #4
	mov	x2, x19
	bl	_read_palette
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_error
LBB0_2:
	ldr	w8, [sp, #4]
	ldr	w9, [x20, #8]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x3, l_.str.1@PAGE
Lloh6:
	add	x3, x3, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w1, #64
	mov	x2, #0
	bl	_safecat
	mov	x2, x0
	ldr	w3, [x20, #8]
	add	x0, sp, #8
	mov	w1, #64
	bl	_safecatn
	mov	x2, x0
Lloh7:
	adrp	x3, l_.str.2@PAGE
Lloh8:
	add	x3, x3, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	w1, #64
	bl	_safecat
	mov	x2, x0
	ldr	w3, [sp, #4]
	add	x0, sp, #8
	mov	w1, #64
	bl	_safecatn
	add	x1, sp, #8
	mov	x0, x19
	bl	_png_error
	ldr	w8, [sp, #4]
LBB0_4:
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	add	w21, w8, #1
Lloh9:
	adrp	x20, l_.str.3@PAGE
Lloh10:
	add	x20, x20, l_.str.3@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_png_error
	sub	w21, w21, #1
	cmp	w21, #1
	b.hi	LBB0_6
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"validate: palette transparency changed"

l_.str.1:                               ; @.str.1
	.asciz	"validate: palette size changed: "

l_.str.2:                               ; @.str.2
	.asciz	" -> "

l_.str.3:                               ; @.str.3
	.asciz	"validate: PLTE or tRNS chunk changed"

	.no_dead_strip	_standard_palette_validate
.subsections_via_symbols
