	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_calculate_crc              ## -- Begin function png_calculate_crc
	.p2align	4, 0x90
_png_calculate_crc:                     ## @png_calculate_crc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testb	$32, (%rax)
	movl	8(%rdi), %eax
	jne	LBB0_1
## %bb.2:
	movq	_PNG_FLAG_CRC_CRITICAL_IGNORE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
	jmp	LBB0_3
LBB0_1:
	movq	_PNG_FLAG_CRC_ANCILLARY_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_PNG_FLAG_CRC_ANCILLARY_USE@GOTPCREL(%rip), %rcx
	movq	_PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	(%rcx), %edi
	cmpl	%edi, %eax
	je	LBB0_4
LBB0_3:
	movl	12(%rbx), %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_crc32
	movl	%eax, 12(%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_FLAG_CRC_ANCILLARY_MASK,4,2 ## @PNG_FLAG_CRC_ANCILLARY_MASK
	.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
	.comm	_PNG_FLAG_CRC_CRITICAL_IGNORE,4,2 ## @PNG_FLAG_CRC_CRITICAL_IGNORE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_calculate_crc              ; -- Begin function png_calculate_crc
	.p2align	2
_png_calculate_crc:                     ; @png_calculate_crc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x9, [x0]
	ldr	w8, [x0, #8]
	ldrb	w9, [x9]
	tbnz	w9, #5, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _PNG_FLAG_CRC_CRITICAL_IGNORE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNG_FLAG_CRC_CRITICAL_IGNORE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x9, _PNG_FLAG_CRC_ANCILLARY_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PNG_FLAG_CRC_ANCILLARY_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _PNG_FLAG_CRC_ANCILLARY_USE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PNG_FLAG_CRC_ANCILLARY_USE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PNG_FLAG_CRC_ANCILLARY_NOWARN@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	cmp	w8, w9
	b.eq	LBB0_4
LBB0_3:
	ldr	w0, [x19, #12]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_crc32
	str	w0, [x19, #12]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_FLAG_CRC_ANCILLARY_MASK,4,2 ; @PNG_FLAG_CRC_ANCILLARY_MASK
	.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
	.comm	_PNG_FLAG_CRC_CRITICAL_IGNORE,4,2 ; @PNG_FLAG_CRC_CRITICAL_IGNORE
.subsections_via_symbols
