	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png_cache_unknown_chunk
_png_cache_unknown_chunk:               ## @png_cache_unknown_chunk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_PNG_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_png_free
	movq	$0, 8(%rbx)
LBB0_2:
	cmpq	%r14, %r15
	jge	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	testq	%r14, %r14
	jg	LBB0_8
	jmp	LBB0_10
LBB0_4:
	movl	32(%rbx), %edi
	movl	48(%rbx), %esi
	callq	_PNG_CSTRING_FROM_CHUNK
	movq	%r14, 24(%rbx)
	movq	40(%rbx), %rax
	movq	%rax, 16(%rbx)
	testq	%r14, %r14
	je	LBB0_5
## %bb.6:
	movq	_png_bytep@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_png_malloc_warn
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_png_voidcast
	movq	%rax, 8(%rbx)
	testq	%r14, %r14
	jle	LBB0_10
LBB0_8:
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_png_crc_finish
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_chunk_benign_error
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_10:
	testq	%r14, %r14
	jle	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_png_crc_read
	jmp	LBB0_12
LBB0_5:
	movq	$0, 8(%rbx)
LBB0_12:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	movl	$1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_SIZE_MAX,8,3               ## @PNG_SIZE_MAX
	.comm	_png_bytep,4,2                  ## @png_bytep
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown chunk exceeds memory limits"

	.comm	_PNG_USER_CHUNK_MALLOC_MAX,8,3  ## @PNG_USER_CHUNK_MALLOC_MAX
	.no_dead_strip	_png_cache_unknown_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_cache_unknown_chunk
_png_cache_unknown_chunk:               ; @png_cache_unknown_chunk
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PNG_SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	ldr	x1, [x0, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_png_free
	str	xzr, [x19, #8]
LBB0_2:
	cmp	x21, x20
	b.ge	LBB0_4
; %bb.3:
	mov	x1, #0
	cmp	x20, #1
	b.ge	LBB0_6
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19, #32]
	ldr	w1, [x19, #48]
	bl	_PNG_CSTRING_FROM_CHUNK
	ldr	x8, [x19, #40]
	stp	x8, x20, [x19, #16]
	cbz	x20, LBB0_10
; %bb.5:
Lloh3:
	adrp	x8, _png_bytep@GOTPAGE
Lloh4:
	ldr	x8, [x8, _png_bytep@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_png_malloc_warn
	mov	x1, x0
	mov	x0, x21
	bl	_png_voidcast
	mov	x1, x0
	str	x0, [x19, #8]
	cmp	x20, #1
	b.lt	LBB0_8
LBB0_6:
	cbnz	x1, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_png_crc_finish
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_benign_error
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	cmp	x20, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x0, x19
	mov	x2, x20
	bl	_png_crc_read
	b	LBB0_11
LBB0_10:
	str	xzr, [x19, #8]
LBB0_11:
	mov	x0, x19
	mov	x1, #0
	bl	_png_crc_finish
	mov	w0, #1
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_SIZE_MAX,8,3               ; @PNG_SIZE_MAX
	.comm	_png_bytep,4,2                  ; @png_bytep
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown chunk exceeds memory limits"

	.comm	_PNG_USER_CHUNK_MALLOC_MAX,8,3  ; @PNG_USER_CHUNK_MALLOC_MAX
	.no_dead_strip	_png_cache_unknown_chunk
.subsections_via_symbols
