	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zlib_check
_zlib_check:                            ## @zlib_check
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	-44(%rbp), %rsi
	callq	_file_getpos
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	leaq	-96(%rbp), %rdi
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	callq	_zlib_init
	testq	%rax, %rax
	je	LBB0_27
## %bb.1:
	leaq	-96(%rbp), %rdi
	callq	_zlib_run
	cmpl	$130, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_27
## %bb.4:
	movq	_TOO_FAR_BACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movl	-60(%rbp), %r12d
	incl	%r12d
	movl	$15, %r13d
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_PNGZ_MSG_CAST
	movq	%rax, -88(%rbp)
LBB0_8:
	leaq	-96(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_zlib_message
	jmp	LBB0_28
LBB0_9:
	movq	-56(%rbp), %rax
	cmpl	$0, (%rax)
	je	LBB0_24
LBB0_10:
	movl	-72(%rbp), %esi
	movl	-68(%rbp), %edi
	callq	_max_window_bits
	movl	%eax, %r13d
	movl	-96(%rbp), %eax
	cmpl	%r13d, %eax
	cmovll	%eax, %r13d
	movl	$8, %r12d
	cmpl	$0, -76(%rbp)
	je	LBB0_12
## %bb.11:
	movl	-80(%rbp), %edi
	leaq	L_.str(%rip), %rsi
	callq	_chunk_message
LBB0_12:
	cmpl	%r13d, %r12d
	jl	LBB0_14
## %bb.13:
	movl	-96(%rbp), %eax
	cmpl	%eax, %r13d
	jl	LBB0_14
LBB0_22:
	xorl	%edi, %edi
	cmpl	%r13d, %eax
	sete	%dil
	callq	_assert
	movl	$1, %ebx
	jmp	LBB0_28
LBB0_14:
	leaq	-96(%rbp), %r15
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	%ebx, %r13d
	cmpl	%r13d, %r12d
	jl	LBB0_15
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	-96(%rbp), %eax
	cmpl	%eax, %r13d
	jge	LBB0_22
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%r13), %ebx
	sarl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_zlib_reset
	testq	%rax, %rax
	je	LBB0_27
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r14, %rdi
	leaq	-44(%rbp), %rsi
	callq	_file_setpos
	movq	%r15, %rdi
	callq	_zlib_run
	cmpl	$129, %eax
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$128, %eax
	jne	LBB0_27
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	%r13d, %ebx
	jge	LBB0_29
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	incl	%ebx
	movl	%ebx, %r12d
	cmpl	%r13d, %r12d
	jge	LBB0_21
	jmp	LBB0_15
LBB0_27:
	xorl	%ebx, %ebx
LBB0_28:
	leaq	-96(%rbp), %rdi
	callq	_zlib_end
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	-60(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jne	LBB0_10
## %bb.25:
	movl	$1, %ebx
	cmpl	$0, -76(%rbp)
	je	LBB0_28
	jmp	LBB0_10
LBB0_29:
	xorl	%edi, %edi
	cmpl	$15, %ebx
	sete	%dil
	callq	_assert
	cmpq	$0, -88(%rbp)
	jne	LBB0_8
## %bb.30:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_TOO_FAR_BACK,4,2               ## @TOO_FAR_BACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"zlib checkum"

L_.str.1:                               ## @.str.1
	.asciz	"[truncated]"

L_.str.2:                               ## @.str.2
	.asciz	"invalid distance too far back"

	.no_dead_strip	_zlib_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zlib_check
_zlib_check:                            ; @zlib_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
	sub	x1, x29, #36
	bl	_file_getpos
	ldp	w2, w1, [x19, #4]
	add	x0, sp, #8
	mov	w3, #0
	mov	x4, x20
	bl	_zlib_init
	cbz	x0, LBB0_23
; %bb.1:
	add	x0, sp, #8
	bl	_zlib_run
	cmp	w0, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w0, #129
	b.eq	LBB0_8
; %bb.3:
	cmp	w0, #128
	b.ne	LBB0_23
; %bb.4:
Lloh0:
	adrp	x8, _TOO_FAR_BACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TOO_FAR_BACK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w8, [sp, #44]
	add	w22, w8, #1
	mov	w21, #15
	cmp	w22, w21
	b.ge	LBB0_12
	b	LBB0_22
LBB0_5:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_PNGZ_MSG_CAST
	str	x0, [sp, #16]
LBB0_7:
	add	x0, sp, #8
	mov	w1, #0
	bl	_zlib_message
	b	LBB0_23
LBB0_8:
	ldr	x8, [sp, #48]
	ldr	w8, [x8]
	cbz	w8, LBB0_25
LBB0_9:
	ldp	w1, w0, [sp, #32]
	bl	_max_window_bits
	ldr	w8, [sp, #8]
	ldr	w9, [sp, #28]
	cmp	w8, w0
	csel	w21, w8, w0, lt
	cbz	w9, LBB0_11
; %bb.10:
	ldr	w0, [sp, #24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_chunk_message
LBB0_11:
	mov	w22, #8
	cmp	w22, w21
	b.lt	LBB0_22
LBB0_12:
	ldr	w8, [sp, #8]
	cmp	w21, w8
	b.lt	LBB0_22
; %bb.13:
	mov	x20, x21
LBB0_14:
	cmp	w8, w20
	cset	w0, eq
	bl	_assert
LBB0_15:
	mov	w19, #1
	b	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_22 Depth=1
	sub	x1, x29, #36
	mov	x0, x19
	bl	_file_setpos
	add	x0, sp, #8
	bl	_zlib_run
	cmp	w0, #129
	b.eq	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	w0, #128
	b.ne	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	w20, w21
	b.ge	LBB0_27
; %bb.19:                               ;   in Loop: Header=BB0_22 Depth=1
	add	w22, w20, #1
	mov	x20, x21
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	x21, x20
	cmp	w22, w20
	b.lt	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w8, [sp, #8]
	mov	x21, x20
	cmp	w20, w8
	b.ge	LBB0_14
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	add	w8, w21, w22
	asr	w20, w8, #1
	add	x0, sp, #8
	mov	x1, x20
	bl	_zlib_reset
	cbnz	x0, LBB0_16
LBB0_23:
	mov	w19, #0
LBB0_24:
	add	x0, sp, #8
	bl	_zlib_end
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
	ldp	w9, w8, [sp, #40]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.26:
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_15
	b	LBB0_9
LBB0_27:
	cmp	w20, #15
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_7
; %bb.28:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TOO_FAR_BACK,4,2               ; @TOO_FAR_BACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"zlib checkum"

l_.str.1:                               ; @.str.1
	.asciz	"[truncated]"

l_.str.2:                               ; @.str.2
	.asciz	"invalid distance too far back"

	.no_dead_strip	_zlib_check
.subsections_via_symbols
