	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png_decode_idat
_png_decode_idat:                       ## @png_decode_idat
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	leaq	56(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FFMIN
	movq	%rax, 16(%r12)
	movq	56(%r12), %rax
	movq	%rax, 24(%r12)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_bytestream2_skip
	xorl	%eax, %eax
	cmpq	$0, 16(%r12)
	jle	LBB0_14
## %bb.1:
	leaq	16(%r12), %r15
	movq	_Z_OK@GOTPCREL(%rip), %r14
	movq	_Z_STREAM_END@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_Z_PARTIAL_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_inflate
	movl	%eax, %ebx
	movl	(%r13), %eax
	cmpl	(%r14), %ebx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %ebx
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 32(%r12)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PNG_ALLIMAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_png_handle_row
	movl	(%r13), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rcx
	movq	%rcx, 32(%r12)
	movl	52(%r12), %ecx
	movl	%ecx, 40(%r12)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rcx
	cmpl	%eax, %ebx
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	testq	%rcx, %rcx
	jg	LBB0_2
	jmp	LBB0_13
LBB0_4:
	movl	48(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_10:
	testq	%rcx, %rcx
	jle	LBB0_13
## %bb.11:
	movl	48(%r12), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_av_log
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Z_PARTIAL_FLUSH,4,2            ## @Z_PARTIAL_FLUSH
	.comm	_Z_OK,4,2                       ## @Z_OK
	.comm	_Z_STREAM_END,4,2               ## @Z_STREAM_END
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inflate returned error %d\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.comm	_PNG_ALLIMAGE,4,2               ## @PNG_ALLIMAGE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"%d undecompressed bytes left in buffer\n"

	.no_dead_strip	_png_decode_idat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_decode_idat
_png_decode_idat:                       ; @png_decode_idat
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	add	x22, x0, #56
	mov	x0, x22
	bl	_bytestream2_get_bytes_left
	mov	x1, x0
	mov	x0, x21
	bl	_FFMIN
	mov	x20, x19
	ldr	x8, [x19, #56]
	stp	x0, x8, [x20, #16]!
	mov	x0, x22
	mov	x1, x21
	bl	_bytestream2_skip
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.1:
Lloh0:
	adrp	x22, _Z_PARTIAL_FLUSH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _Z_PARTIAL_FLUSH@GOTPAGEOFF]
Lloh2:
	adrp	x23, _Z_OK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _Z_OK@GOTPAGEOFF]
Lloh4:
	adrp	x24, _Z_STREAM_END@GOTPAGE
Lloh5:
	ldr	x24, [x24, _Z_STREAM_END@GOTPAGEOFF]
Lloh6:
	adrp	x25, _PNG_ALLIMAGE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PNG_ALLIMAGE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_inflate
	mov	x21, x0
	ldr	w9, [x23]
	ldr	w8, [x24]
	cmp	w0, w9
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x19, #32]
	cbnz	x9, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x19]
	ldr	w10, [x25]
	tst	w10, w9
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_png_handle_row
	ldr	w8, [x24]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x19, #8]
	str	x9, [x19, #32]
	ldr	w9, [x19, #52]
	str	w9, [x19, #40]
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x3, [x20]
	cmp	w21, w8
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x3, #0
	b.gt	LBB0_2
	b	LBB0_12
LBB0_9:
	ldr	w0, [x19, #48]
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x21
	bl	_av_log
Lloh13:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_10:
	cmp	x3, #1
	b.lt	LBB0_12
; %bb.11:
	ldr	w0, [x19, #48]
Lloh16:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_av_log
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_Z_PARTIAL_FLUSH,4,2            ; @Z_PARTIAL_FLUSH
	.comm	_Z_OK,4,2                       ; @Z_OK
	.comm	_Z_STREAM_END,4,2               ; @Z_STREAM_END
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inflate returned error %d\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.comm	_PNG_ALLIMAGE,4,2               ; @PNG_ALLIMAGE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"%d undecompressed bytes left in buffer\n"

	.no_dead_strip	_png_decode_idat
.subsections_via_symbols
