	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_crc_finish                 ## -- Begin function png_crc_finish
	.p2align	4, 0x90
_png_crc_finish:                        ## @png_crc_finish
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rsi, %rsi
	jle	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	movq	_PNG_INFLATE_BUF_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, %r13
	movl	(%r12), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	cmpq	%r15, %rbx
	cmovaeq	%r15, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_png_crc_read
	subq	%rbx, %r15
	movq	%r13, %rsp
	jg	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_png_crc_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	4(%r14), %edi
	callq	_PNG_CHUNK_ANCILLARY
	movl	(%r14), %ecx
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_png_chunk_error
	jmp	LBB0_10
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_PNG_FLAG_CRC_CRITICAL_USE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_png_chunk_warning
LBB0_10:
	movl	$1, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_INFLATE_BUF_SIZE,4,2       ## @PNG_INFLATE_BUF_SIZE
	.comm	_PNG_FLAG_CRC_ANCILLARY_NOWARN,4,2 ## @PNG_FLAG_CRC_ANCILLARY_NOWARN
	.comm	_PNG_FLAG_CRC_CRITICAL_USE,4,2  ## @PNG_FLAG_CRC_CRITICAL_USE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CRC error"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_crc_finish                 ; -- Begin function png_crc_finish
	.p2align	2
_png_crc_finish:                        ; @png_crc_finish
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	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, #-40]
	cmp	x1, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, x1
Lloh3:
	adrp	x21, _PNG_INFLATE_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PNG_INFLATE_BUF_SIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, sp
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x7fffffff0
	sub	x1, x9, x10
	mov	sp, x1
	cmp	x8, x20
	csel	x2, x8, x20, lo
	sub	x20, x20, x2
	mov	x0, x19
	bl	_png_crc_read
	mov	sp, x22
	cmp	x20, #0
	b.gt	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_png_crc_error
	cbz	x0, LBB0_10
; %bb.4:
	ldr	w0, [x19, #4]
	bl	_PNG_CHUNK_ANCILLARY
	ldr	w8, [x19]
	cbz	x0, LBB0_7
; %bb.5:
Lloh7:
	adrp	x9, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_6:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_error
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x9, _PNG_FLAG_CRC_CRITICAL_USE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PNG_FLAG_CRC_CRITICAL_USE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_8:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_warning
LBB0_9:
	mov	w0, #1
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_INFLATE_BUF_SIZE,4,2       ; @PNG_INFLATE_BUF_SIZE
	.comm	_PNG_FLAG_CRC_ANCILLARY_NOWARN,4,2 ; @PNG_FLAG_CRC_ANCILLARY_NOWARN
	.comm	_PNG_FLAG_CRC_CRITICAL_USE,4,2  ; @PNG_FLAG_CRC_CRITICAL_USE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CRC error"

.subsections_via_symbols
