	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_read_imp
_store_read_imp:                        ## @store_read_imp
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	cmpq	$0, 24(%rdi)
	je	LBB0_2
## %bb.1:
	cmpq	$0, 16(%r13)
	jne	LBB0_3
LBB0_2:
	movl	8(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_png_error
LBB0_3:
	testq	%r15, %r15
	jle	LBB0_10
## %bb.4:
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r15, %rbx
	cmovaeq	%r15, %rbx
	movq	16(%r13), %rax
	addq	(%rax), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	subq	%rbx, %r15
	addq	%rbx, %r14
	addq	%rbx, (%r13)
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	testq	%r15, %r15
	jle	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_store_read_buffer_size
	movq	%rax, %rbx
	movq	(%r13), %rsi
	subq	%rsi, %rbx
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_store_read_buffer_next
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r13), %edi
	movq	%r12, %rsi
	callq	_png_error
	jmp	LBB0_9
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"store state damaged"

L_.str.1:                               ## @.str.1
	.asciz	"read beyond end of file"

	.no_dead_strip	_store_read_imp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_read_imp
_store_read_imp:                        ; @store_read_imp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_3
LBB0_2:
	ldr	w0, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_png_error
LBB0_3:
	cmp	x19, #1
	b.lt	LBB0_10
; %bb.4:
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	x9, x19
	csel	x23, x9, x19, lo
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	mov	x2, x23
	bl	_memcpy
	sub	x19, x19, x23
	add	x20, x23, x20
	ldr	x8, [x21]
	add	x8, x8, x23
	str	x8, [x21]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	x19, #0
	b.le	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_store_read_buffer_size
	ldr	x8, [x21]
	subs	x9, x0, x8
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_store_read_buffer_next
	cbnz	w0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21, #8]
	mov	x1, x22
	bl	_png_error
	b	LBB0_6
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"store state damaged"

l_.str.1:                               ; @.str.1
	.asciz	"read beyond end of file"

	.no_dead_strip	_store_read_imp
.subsections_via_symbols
