	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png_inflate
_png_inflate:                           ## @png_inflate
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	%rsi, (%rdi)
	jne	LBB0_18
## %bb.1:
	movq	%r9, %rbx
	movq	16(%rbp), %rax
	movq	(%rax), %r12
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	(%r8), %r14
	movl	%ecx, %edi
	callq	_PNGZ_INPUT_CAST
	movl	%eax, 40(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r13)
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	%rbx, 32(%r13)
LBB0_3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	subq	%rax, %r14
	movl	(%rdx), %esi
	movq	%r13, %rdi
	callq	_PNG_INFLATE
	movl	%eax, %ebx
	movq	%r15, %rsp
	movq	_Z_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, %r15
	movq	_PNG_INFLATE_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	addq	8(%r13), %r14
	movq	_ZLIB_IO_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %r14
	movq	%rcx, %rax
	cmovlq	%r14, %rax
	addq	16(%r13), %r12
	movq	%rax, 8(%r13)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdx, 32(%r13)
	cmpq	%rcx, %rbx
	cmovbq	%rbx, %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rcx, %r12
	cmovlq	%r12, %rcx
	movq	%rcx, 16(%r13)
	movq	_Z_FINISH@GOTPCREL(%rip), %rdx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_Z_SYNC_FLUSH@GOTPCREL(%rip), %rdx
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	subq	%rcx, %r12
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_Z_NO_FLUSH@GOTPCREL(%rip), %rdx
	jmp	LBB0_10
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	_PNGZ_MSG_CAST
	movl	%eax, 24(%r13)
	movq	_Z_STREAM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_11:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_13
## %bb.12:
	movq	$0, 32(%r13)
LBB0_13:
	addq	8(%r13), %r14
	addq	16(%r13), %r12
	jle	LBB0_15
## %bb.14:
	movq	16(%rbp), %rax
	subq	%r12, (%rax)
LBB0_15:
	testq	%r14, %r14
	jle	LBB0_17
## %bb.16:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subq	%r14, (%rax)
LBB0_17:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_png_zstream_error
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_INFLATE_BUF_SIZE,4,2       ## @PNG_INFLATE_BUF_SIZE
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_inflate
_png_inflate:                           ; @png_inflate
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0]
	cmp	x8, x1
	b.ne	LBB0_7
; %bb.1:
	mov	x22, x5
	mov	x23, x2
	stp	x6, x4, [x29, #-104]            ; 16-byte Folded Spill
	ldr	x25, [x6]
	ldr	x26, [x4]
	mov	x0, x3
	bl	_PNGZ_INPUT_CAST
	str	w0, [x19, #40]
	stp	xzr, xzr, [x19, #8]
	cbz	x22, LBB0_3
; %bb.2:
	str	x22, [x19, #32]
LBB0_3:
Lloh3:
	adrp	x21, _Z_FINISH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _Z_FINISH@GOTPAGEOFF]
Lloh5:
	adrp	x27, _Z_SYNC_FLUSH@GOTPAGE
Lloh6:
	ldr	x27, [x27, _Z_SYNC_FLUSH@GOTPAGEOFF]
Lloh7:
	adrp	x28, _Z_OK@GOTPAGE
Lloh8:
	ldr	x28, [x28, _Z_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, x25
	cmp	x8, x9
	csel	x9, x8, x9, lt
	str	x9, [x19, #16]
	sub	x25, x8, x9
	cmp	w23, #0
	csel	x8, x27, x21, eq
	cmp	x25, #0
Lloh9:
	adrp	x9, _Z_NO_FLUSH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _Z_NO_FLUSH@GOTPAGEOFF]
	csel	x8, x9, x8, gt
	ldr	w1, [x8]
	mov	x0, x19
	bl	_PNG_INFLATE
	mov	sp, x20
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, sp
Lloh11:
	adrp	x8, _PNG_INFLATE_BUF_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PNG_INFLATE_BUF_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x7fffffff0
	sub	x10, x9, x10
	mov	sp, x10
	ldr	x11, [x19, #8]
Lloh16:
	adrp	x9, _ZLIB_IO_MAX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ZLIB_IO_MAX@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x11, x11, x26
	cmp	x11, x9
	csel	x12, x11, x9, lt
	sub	x26, x11, x12
	str	x12, [x19, #8]
	cbnz	x22, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x10, [x19, #32]
	cmp	x8, x9
	csel	x9, x8, x9, lo
	b	LBB0_4
LBB0_7:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PNGZ_MSG_CAST
	str	w0, [x19, #24]
Lloh21:
	adrp	x8, _Z_STREAM_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Z_STREAM_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w24, [x8]
	b	LBB0_15
LBB0_8:
	mov	x24, x0
	cbnz	x22, LBB0_10
; %bb.9:
	str	xzr, [x19, #32]
LBB0_10:
	ldp	x8, x9, [x19, #8]
	add	x8, x8, x26
	add	x9, x9, x25
	cmp	x9, #1
	b.lt	LBB0_12
; %bb.11:
	ldur	x11, [x29, #-104]               ; 8-byte Folded Reload
	ldr	x10, [x11]
	sub	x9, x10, x9
	str	x9, [x11]
LBB0_12:
	cmp	x8, #1
	b.lt	LBB0_14
; %bb.13:
	ldur	x10, [x29, #-96]                ; 8-byte Folded Reload
	ldr	x9, [x10]
	sub	x8, x9, x8
	str	x8, [x10]
LBB0_14:
	mov	x0, x19
	mov	x1, x24
	bl	_png_zstream_error
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x24
	sub	sp, x29, #80
	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
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_INFLATE_BUF_SIZE,4,2       ; @PNG_INFLATE_BUF_SIZE
	.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
.subsections_via_symbols
