	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_progressive_read
_store_progressive_read:                ## @store_progressive_read
	.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
	subq	$2056, %rsp                     ## imm = 0x808
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	%rsi, (%rdi)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 16(%r13)
	je	LBB0_3
## %bb.2:
	cmpq	$0, 8(%r13)
	jne	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_png_error
LBB0_4:
	movq	%r13, %rdi
	callq	_store_read_buffer_avail
	testq	%rax, %rax
	jle	LBB0_7
## %bb.5:
	leaq	-2096(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	_store_progressive_read.noise(%rip), %eax
	movl	%eax, %ebx
	shrl	$4, %ebx
	xorl	%eax, %ebx
	shll	$9, %eax
	andl	$511, %ebx                      ## imm = 0x1FF
	orl	%ebx, %eax
	movl	%eax, _store_progressive_read.noise(%rip)
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movl	$1, %ecx
	callq	_store_read_chunk
	subl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_png_process_data
	movq	%r13, %rdi
	callq	_store_read_buffer_avail
	testq	%rax, %rax
	jg	LBB0_6
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$2056, %rsp                     ## imm = 0x808
	popq	%rbx
	popq	%r12
	popq	%r13
	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	"store state damaged (progressive)"

	.section	__DATA,__data
	.p2align	2                               ## @store_progressive_read.noise
_store_progressive_read.noise:
	.long	2                               ## 0x2

	.no_dead_strip	_store_progressive_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_progressive_read
_store_progressive_read:                ; @store_progressive_read
	.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
	sub	sp, sp, #2064
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0]
	cmp	x8, x1
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_4
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_png_error
LBB0_4:
	mov	x0, x21
	bl	_store_read_buffer_avail
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.5:
	adrp	x23, _store_progressive_read.noise@PAGE
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23, _store_progressive_read.noise@PAGEOFF]
	eor	w9, w8, w8, lsr #4
	and	w22, w9, #0x1ff
	bfi	w9, w8, #9, #23
	str	w9, [x23, _store_progressive_read.noise@PAGEOFF]
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x22
	mov	w3, #1
	bl	_store_read_chunk
	sub	w3, w22, w0
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_png_process_data
	mov	x0, x21
	bl	_store_read_buffer_avail
	cmp	x0, #0
	b.gt	LBB0_6
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	add	sp, sp, #2064
	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
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"store state damaged (progressive)"

	.section	__DATA,__data
	.p2align	2                               ; @store_progressive_read.noise
_store_progressive_read.noise:
	.long	2                               ; 0x2

	.no_dead_strip	_store_progressive_read
.subsections_via_symbols
