	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png_inflate_read
_png_inflate_read:                      ## @png_inflate_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	jne	LBB0_17
## %bb.1:
	movq	%r9, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, 48(%rbx)
	movq	$0, 16(%rbx)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 24(%rbx)
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_Z_FINISH@GOTPCREL(%rip), %rax
	cmpl	$0, 16(%rbp)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_Z_SYNC_FLUSH@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r15)
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_Z_NO_FLUSH@GOTPCREL(%rip), %rax
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_PNG_INFLATE
	movl	%eax, %r13d
	movq	_Z_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	testq	%rax, %rax
	jg	LBB0_2
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	jg	LBB0_2
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	cmpq	%rax, %r12
	cmovgeq	%rax, %r12
	subq	%r12, %rax
	movq	%rax, (%r15)
	testq	%r12, %r12
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_png_crc_read
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, 40(%rbx)
	movq	%r12, 24(%rbx)
	cmpq	$0, 16(%rbx)
	jne	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ZLIB_IO_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	cmovgeq	%rcx, %rax
	subq	%rax, %rcx
	movq	%rcx, (%r14)
	movq	%rax, 16(%rbx)
	jmp	LBB0_8
LBB0_17:
	leaq	L_.str(%rip), %rdi
	callq	_PNGZ_MSG_CAST
	movl	%eax, 32(%rbx)
	movq	_Z_STREAM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_18
LBB0_13:
	movq	16(%rbx), %rcx
	movq	(%r14), %rax
LBB0_16:
	addq	%rcx, %rax
	movq	%rax, (%r14)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_png_zstream_error
LBB0_18:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ZLIB_IO_MAX,8,3                ## @ZLIB_IO_MAX
	.comm	_Z_NO_FLUSH,4,2                 ## @Z_NO_FLUSH
	.comm	_Z_FINISH,4,2                   ## @Z_FINISH
	.comm	_Z_SYNC_FLUSH,4,2               ## @Z_SYNC_FLUSH
	.comm	_Z_OK,4,2                       ## @Z_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"zstream unclaimed"

	.comm	_Z_STREAM_ERROR,4,2             ## @Z_STREAM_ERROR
	.no_dead_strip	_png_inflate_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_inflate_read
_png_inflate_read:                      ; @png_inflate_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
	mov	x21, x6
	mov	x20, x5
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	str	x4, [x19, #48]
	str	xzr, [x19, #16]
Lloh0:
	adrp	x28, _Z_FINISH@GOTPAGE
Lloh1:
	ldr	x28, [x28, _Z_FINISH@GOTPAGEOFF]
Lloh2:
	adrp	x26, _Z_SYNC_FLUSH@GOTPAGE
Lloh3:
	ldr	x26, [x26, _Z_SYNC_FLUSH@GOTPAGEOFF]
Lloh4:
	adrp	x27, _Z_OK@GOTPAGE
Lloh5:
	ldr	x27, [x27, _Z_OK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	cmp	w21, #0
	csel	x9, x26, x28, eq
	cmp	x8, #0
Lloh6:
	adrp	x8, _Z_NO_FLUSH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Z_NO_FLUSH@GOTPAGEOFF]
	csel	x8, x8, x9, gt
	ldr	w1, [x8]
	mov	x0, x19
	bl	_PNG_INFLATE
	mov	x25, x0
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	cmp	x8, #0
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x19, #16]
	cmp	x9, #0
	b.gt	LBB0_2
	b	LBB0_13
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	cmp	x23, x8
	csel	x23, x23, x8, lt
	sub	x8, x8, x23
	str	x8, [x22]
	cmp	x23, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_png_crc_read
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	x24, [x19, #40]
	str	x23, [x19, #24]
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh8:
	adrp	x8, _ZLIB_IO_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ZLIB_IO_MAX@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x8, x9
	csel	x8, x8, x9, lt
	sub	x9, x9, x8
	str	x9, [x20]
	str	x8, [x19, #16]
	b	LBB0_4
LBB0_11:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PNGZ_MSG_CAST
	str	w0, [x19, #32]
Lloh13:
	adrp	x8, _Z_STREAM_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _Z_STREAM_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w25, [x8]
	b	LBB0_14
LBB0_12:
	ldr	x9, [x19, #16]
	ldr	x8, [x20]
LBB0_13:
	add	x8, x8, x9
	str	x8, [x20]
	str	xzr, [x19, #16]
	mov	x0, x19
	mov	x1, x25
	bl	_png_zstream_error
LBB0_14:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ZLIB_IO_MAX,8,3                ; @ZLIB_IO_MAX
	.comm	_Z_NO_FLUSH,4,2                 ; @Z_NO_FLUSH
	.comm	_Z_FINISH,4,2                   ; @Z_FINISH
	.comm	_Z_SYNC_FLUSH,4,2               ; @Z_SYNC_FLUSH
	.comm	_Z_OK,4,2                       ; @Z_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"zstream unclaimed"

	.comm	_Z_STREAM_ERROR,4,2             ; @Z_STREAM_ERROR
	.no_dead_strip	_png_inflate_read
.subsections_via_symbols
