	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readChunk_tEXt
_readChunk_tEXt:                        ## @readChunk_tEXt
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	testq	%rdx, %rdx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%rbx,%r14)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	cmpq	%r12, %r14
	jb	LBB0_3
LBB0_5:
	movl	%r14d, %r13d
	leal	-80(%r14), %eax
	cmpl	$-80, %eax
	jbe	LBB0_6
	jmp	LBB0_7
LBB0_1:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
LBB0_6:
	xorl	%edi, %edi
	movl	$89, %esi
	callq	_CERROR_BREAK
LBB0_7:
	leal	1(%r14), %edi
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	callq	_lodepng_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	xorl	%edi, %edi
	movl	$83, %esi
	callq	_CERROR_BREAK
LBB0_9:
	movb	$0, (%r15,%r13)
	testl	%r14d, %r14d
	je	LBB0_30
## %bb.10:
	xorl	%eax, %eax
	cmpl	$8, %r13d
	jb	LBB0_26
## %bb.11:
	movq	%r15, %rcx
	subq	%rbx, %rcx
	cmpq	$32, %rcx
	jb	LBB0_26
## %bb.12:
	cmpl	$32, %r13d
	jae	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_14:
	movl	%r13d, %eax
	andl	$-32, %eax
	leaq	-32(%rax), %rsi
	movq	%rsi, %rdx
	shrq	$5, %rdx
	incq	%rdx
	movl	%edx, %ecx
	andl	$3, %ecx
	cmpq	$96, %rsi
	jae	LBB0_16
## %bb.15:
	xorl	%esi, %esi
	jmp	LBB0_18
LBB0_16:
	andq	$-4, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rbx,%rsi), %xmm0
	movups	16(%rbx,%rsi), %xmm1
	movups	%xmm0, (%r15,%rsi)
	movups	%xmm1, 16(%r15,%rsi)
	movups	32(%rbx,%rsi), %xmm0
	movups	48(%rbx,%rsi), %xmm1
	movups	%xmm0, 32(%r15,%rsi)
	movups	%xmm1, 48(%r15,%rsi)
	movups	64(%rbx,%rsi), %xmm0
	movups	80(%rbx,%rsi), %xmm1
	movups	%xmm0, 64(%r15,%rsi)
	movups	%xmm1, 80(%r15,%rsi)
	movups	96(%rbx,%rsi), %xmm0
	movups	112(%rbx,%rsi), %xmm1
	movups	%xmm0, 96(%r15,%rsi)
	movups	%xmm1, 112(%r15,%rsi)
	subq	$-128, %rsi
	addq	$-4, %rdx
	jne	LBB0_17
LBB0_18:
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.19:
	leaq	(%r15,%rsi), %rdx
	addq	$16, %rdx
	addq	%rbx, %rsi
	addq	$16, %rsi
	shlq	$5, %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rsi,%rdi), %xmm0
	movups	(%rsi,%rdi), %xmm1
	movups	%xmm0, -16(%rdx,%rdi)
	movups	%xmm1, (%rdx,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %rcx
	jne	LBB0_20
LBB0_21:
	cmpq	%rax, %r13
	je	LBB0_30
## %bb.22:
	testb	$24, %r13b
	je	LBB0_26
LBB0_23:
	movq	%rax, %rcx
	movl	%r13d, %eax
	andl	$-8, %eax
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rcx), %rdx
	movq	%rdx, (%r15,%rcx)
	addq	$8, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_24
## %bb.25:
	cmpq	%rax, %r13
	je	LBB0_30
LBB0_26:
	movq	%rax, %rsi
	notq	%rsi
	addq	%r13, %rsi
	movq	%r13, %rdx
	andq	$3, %rdx
	je	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx,%rax), %ecx
	movb	%cl, (%r15,%rax)
	incq	%rax
	decq	%rdx
	jne	LBB0_27
LBB0_28:
	cmpq	$3, %rsi
	jb	LBB0_30
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx,%rax), %ecx
	movb	%cl, (%r15,%rax)
	movzbl	1(%rbx,%rax), %ecx
	movb	%cl, 1(%r15,%rax)
	movzbl	2(%rbx,%rax), %ecx
	movb	%cl, 2(%r15,%rax)
	movzbl	3(%rbx,%rax), %ecx
	movb	%cl, 3(%r15,%rax)
	addq	$4, %rax
	cmpq	%rax, %r13
	jne	LBB0_29
LBB0_30:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	xorl	%r13d, %r13d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	subq	%rax, %r12
	cmovaeq	%r12, %r13
	leal	1(%r13), %edi
	callq	_lodepng_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_32
## %bb.31:
	xorl	%edi, %edi
	movl	$83, %esi
	callq	_CERROR_BREAK
LBB0_32:
	movl	%r13d, %r9d
	movb	$0, (%r12,%r9)
	testl	%r13d, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_49
## %bb.33:
	cmpl	$8, %r9d
	jae	LBB0_35
## %bb.34:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_48:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rcx), %edx
	movzbl	(%rbx,%rdx), %edx
	movb	%dl, (%r12,%rcx)
	incq	%rcx
	cmpq	%r9, %rcx
	jb	LBB0_48
LBB0_49:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_lodepng_add_text
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_lodepng_free
	movq	%r12, %rdi
	callq	_lodepng_free
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	leaq	-1(%r9), %rdx
	movl	$-2, %esi
	subl	%r14d, %esi
	xorl	%ecx, %ecx
	cmpl	%edx, %esi
	jb	LBB0_48
## %bb.36:
	shrq	$32, %rdx
	jne	LBB0_48
## %bb.37:
	movq	%r12, %rdx
	subq	%rbx, %rdx
	subq	%rax, %rdx
	cmpq	$32, %rdx
	jae	LBB0_39
## %bb.38:
	xorl	%ecx, %ecx
	jmp	LBB0_48
LBB0_39:
	cmpl	$32, %r9d
	jae	LBB0_41
## %bb.40:
	xorl	%ecx, %ecx
	jmp	LBB0_45
LBB0_41:
	movl	%r13d, %edx
	andl	$31, %edx
	movq	%r9, %rcx
	subq	%rdx, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rsi), %edi
	movups	(%rbx,%rdi), %xmm0
	movups	16(%rbx,%rdi), %xmm1
	movups	%xmm0, (%r12,%rsi)
	movups	%xmm1, 16(%r12,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_42
## %bb.43:
	testq	%rdx, %rdx
	je	LBB0_49
## %bb.44:
	cmpl	$8, %edx
	jb	LBB0_48
LBB0_45:
	movq	%rcx, %rdx
	andl	$7, %r13d
	movq	%r9, %rcx
	subq	%r13, %rcx
	.p2align	4, 0x90
LBB0_46:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rdx), %esi
	movq	(%rbx,%rsi), %rsi
	movq	%rsi, (%r12,%rdx)
	addq	$8, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_46
## %bb.47:
	testq	%r13, %r13
	jne	LBB0_48
	jmp	LBB0_49
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_readChunk_tEXt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readChunk_tEXt
_readChunk_tEXt:                        ; @readChunk_tEXt
	.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	x23, x2
	mov	x20, x1
	mov	x19, x0
	cbz	x2, LBB0_5
; %bb.1:
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x20, x24]
	cbz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #1
	cmp	x24, x23
	b.lo	LBB0_2
LBB0_4:
	mov	w25, w24
	sub	w8, w24, #80
	cmn	w8, #80
	b.ls	LBB0_6
	b	LBB0_7
LBB0_5:
	mov	x25, #0
	mov	w24, #0
LBB0_6:
	mov	w0, #0
	mov	w1, #89
	bl	_CERROR_BREAK
LBB0_7:
	add	w22, w24, #1
	mov	x0, x22
	bl	_lodepng_malloc
	mov	x21, x0
	cbnz	x0, LBB0_9
; %bb.8:
	mov	w1, #83
	bl	_CERROR_BREAK
LBB0_9:
	strb	wzr, [x21, x25]
	cbz	w24, LBB0_23
; %bb.10:
	mov	x8, #0
	cmp	x25, #8
	b.lo	LBB0_21
; %bb.11:
	sub	x9, x21, x20
	cmp	x9, #64
	b.lo	LBB0_21
; %bb.12:
	cmp	x25, #64
	b.hs	LBB0_14
; %bb.13:
	mov	x8, #0
	b	LBB0_18
LBB0_14:
	and	x8, x25, #0xffffffc0
	add	x9, x20, #32
	add	x10, x21, #32
	mov	x11, x8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x9, #-32]
	ldp	q2, q3, [x9], #64
	stp	q0, q1, [x10, #-32]
	stp	q2, q3, [x10], #64
	subs	x11, x11, #64
	b.ne	LBB0_15
; %bb.16:
	cmp	x25, x8
	b.eq	LBB0_23
; %bb.17:
	tst	x25, #0x38
	b.eq	LBB0_21
LBB0_18:
	mov	x11, x8
	and	x8, x25, #0xfffffff8
	add	x9, x20, x11
	add	x10, x21, x11
	sub	x11, x11, x8
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x9], #8
	str	d0, [x10], #8
	adds	x11, x11, #8
	b.ne	LBB0_19
; %bb.20:
	cmp	x25, x8
	b.eq	LBB0_23
LBB0_21:
	add	x9, x20, x8
	add	x10, x21, x8
	sub	x8, x25, x8
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x9], #1
	strb	w11, [x10], #1
	subs	x8, x8, #1
	b.ne	LBB0_22
LBB0_23:
	subs	x8, x23, x22
	csel	x25, xzr, x8, lo
	add	w0, w25, #1
	bl	_lodepng_malloc
	mov	x23, x0
	cbnz	x0, LBB0_25
; %bb.24:
	mov	w1, #83
	bl	_CERROR_BREAK
LBB0_25:
	and	x8, x25, #0xffffffff
	strb	wzr, [x23, x8]
	cbz	w25, LBB0_29
; %bb.26:
	cmp	x8, #8
	b.hs	LBB0_30
; %bb.27:
	mov	x9, #0
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w22, w9
	ldrb	w10, [x20, w10, uxtw]
	strb	w10, [x23, x9]
	add	x9, x9, #1
	cmp	x9, x8
	b.lo	LBB0_28
LBB0_29:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_lodepng_add_text
	mov	x19, x0
	mov	x0, x21
	bl	_lodepng_free
	mov	x0, x23
	bl	_lodepng_free
	mov	x0, x19
	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
LBB0_30:
	mov	x9, #0
	sub	x10, x8, #1
	mov	w11, #-2
	sub	w11, w11, w24
	cmp	w11, w10
	b.lo	LBB0_28
; %bb.31:
	lsr	x10, x10, #32
	cbnz	x10, LBB0_28
; %bb.32:
	add	x9, x20, x22
	sub	x9, x23, x9
	cmp	x9, #64
	b.hs	LBB0_34
; %bb.33:
	mov	x9, #0
	b	LBB0_28
LBB0_34:
	cmp	x8, #64
	b.hs	LBB0_36
; %bb.35:
	mov	x9, #0
	b	LBB0_40
LBB0_36:
	and	x10, x25, #0x3f
	sub	x9, x8, x10
	add	x11, x23, #32
	mov	x12, x22
	mov	x13, x9
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x20, w12, uxtw
	ldp	q0, q1, [x14]
	ldp	q2, q3, [x14, #32]
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	add	w12, w12, #64
	subs	x13, x13, #64
	b.ne	LBB0_37
; %bb.38:
	cbz	x10, LBB0_29
; %bb.39:
	cmp	x10, #8
	b.lo	LBB0_28
LBB0_40:
	mov	x12, x9
	and	x10, x25, #0x7
	add	x11, x23, x9
	add	w13, w24, w12
	sub	x9, x8, x10
	add	x12, x12, x10
	sub	x12, x12, x8
	add	w13, w13, #1
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x20, w13, uxtw]
	str	d0, [x11], #8
	add	w13, w13, #8
	adds	x12, x12, #8
	b.ne	LBB0_41
; %bb.42:
	cbnz	x10, LBB0_28
	b	LBB0_29
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_readChunk_tEXt
.subsections_via_symbols
