	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LodePNGUnknownChunks_copy
_LodePNGUnknownChunks_copy:             ## @LodePNGUnknownChunks_copy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_LodePNGUnknownChunks_cleanup
	movq	(%r15), %rax
	movq	(%rax), %rcx
	movq	(%r14), %rdx
	movq	%rcx, (%rdx)
	movq	(%rax), %rdi
	callq	_lodepng_malloc
	movq	8(%r14), %rcx
	movq	%rax, (%rcx)
	movq	8(%r14), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
LBB0_2:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.3:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movb	(%rax), %al
	movb	%al, (%rcx)
	movq	(%r15), %rax
	cmpq	$2, (%rax)
	jb	LBB0_6
## %bb.4:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rdx
	movq	(%rdx), %rdx
	movzbl	(%rdx,%rcx), %edx
	movb	%dl, (%rax,%rcx)
	incq	%rcx
	movq	(%r15), %rax
	cmpq	(%rax), %rcx
	jb	LBB0_5
LBB0_6:
	movq	8(%rax), %rcx
	movq	(%r14), %rdx
	movq	%rcx, 8(%rdx)
	movq	8(%rax), %rdi
	callq	_lodepng_malloc
	movq	8(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	8(%r14), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
LBB0_8:
	movq	(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_12
## %bb.9:
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movb	(%rax), %al
	movb	%al, (%rcx)
	movq	(%r15), %rax
	cmpq	$2, 8(%rax)
	jb	LBB0_12
## %bb.10:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	8(%rax), %rax
	movq	8(%r15), %rdx
	movq	8(%rdx), %rdx
	movzbl	(%rdx,%rcx), %edx
	movb	%dl, (%rax,%rcx)
	incq	%rcx
	movq	(%r15), %rax
	cmpq	8(%rax), %rcx
	jb	LBB0_11
LBB0_12:
	movq	16(%rax), %rcx
	movq	(%r14), %rdx
	movq	%rcx, 16(%rdx)
	movq	16(%rax), %rdi
	callq	_lodepng_malloc
	movq	8(%r14), %rcx
	movq	%rax, 16(%rcx)
	movq	8(%r14), %rax
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
LBB0_14:
	movq	(%r15), %rdx
	xorl	%eax, %eax
	cmpq	$0, 16(%rdx)
	je	LBB0_18
## %bb.15:
	movq	8(%r15), %rdx
	movq	16(%rdx), %rdx
	movb	(%rdx), %dl
	movb	%dl, (%rcx)
	movq	(%r15), %rcx
	cmpq	$2, 16(%rcx)
	jb	LBB0_18
## %bb.16:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdx
	movq	16(%rdx), %rdx
	movq	8(%r15), %rsi
	movq	16(%rsi), %rsi
	movzbl	(%rsi,%rcx), %ebx
	movb	%bl, (%rdx,%rcx)
	incq	%rcx
	movq	(%r15), %rdx
	cmpq	16(%rdx), %rcx
	jb	LBB0_17
	jmp	LBB0_18
LBB0_1:
	movq	(%r14), %rdx
	movl	$83, %eax
	cmpq	$0, (%rdx)
	jne	LBB0_18
	jmp	LBB0_2
LBB0_7:
	movq	(%r14), %rdx
	movl	$83, %eax
	cmpq	$0, 8(%rdx)
	jne	LBB0_18
	jmp	LBB0_8
LBB0_13:
	movq	(%r14), %rdx
	movl	$83, %eax
	cmpq	$0, 16(%rdx)
	je	LBB0_14
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_LodePNGUnknownChunks_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LodePNGUnknownChunks_copy
_LodePNGUnknownChunks_copy:             ; @LodePNGUnknownChunks_copy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_LodePNGUnknownChunks_cleanup
	ldr	x8, [x19]
	ldr	x9, [x8]
	ldr	x10, [x20]
	str	x9, [x10]
	ldr	x0, [x8]
	bl	_lodepng_malloc
	ldr	x8, [x20, #8]
	str	x0, [x8]
	ldr	x8, [x20, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_16
LBB0_1:
	ldr	x8, [x19]
	ldr	x10, [x8]
	cbz	x10, LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldrb	w8, [x8]
	strb	w8, [x9]
	ldr	x8, [x19]
	ldr	x9, [x8]
	cmp	x9, #2
	b.lo	LBB0_5
; %bb.3:
	mov	w9, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x10, [x19, #8]
	ldr	x10, [x10]
	ldrb	w10, [x10, x9]
	strb	w10, [x8, x9]
	add	x9, x9, #1
	ldr	x8, [x19]
	ldr	x10, [x8]
	cmp	x9, x10
	b.lo	LBB0_4
LBB0_5:
	ldr	x9, [x8, #8]
	ldr	x10, [x20]
	str	x9, [x10, #8]
	ldr	x0, [x8, #8]
	bl	_lodepng_malloc
	ldr	x8, [x20, #8]
	str	x0, [x8, #8]
	ldr	x8, [x20, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_17
LBB0_6:
	ldr	x8, [x19]
	ldr	x10, [x8, #8]
	cbz	x10, LBB0_10
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldrb	w8, [x8]
	strb	w8, [x9]
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cmp	x9, #2
	b.lo	LBB0_10
; %bb.8:
	mov	w9, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	ldr	x10, [x19, #8]
	ldr	x10, [x10, #8]
	ldrb	w10, [x10, x9]
	strb	w10, [x8, x9]
	add	x9, x9, #1
	ldr	x8, [x19]
	ldr	x10, [x8, #8]
	cmp	x9, x10
	b.lo	LBB0_9
LBB0_10:
	ldr	x9, [x8, #16]
	ldr	x10, [x20]
	str	x9, [x10, #16]
	ldr	x0, [x8, #16]
	bl	_lodepng_malloc
	ldr	x8, [x20, #8]
	str	x0, [x8, #16]
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_18
LBB0_11:
	ldr	x9, [x19]
	ldr	x9, [x9, #16]
	cbz	x9, LBB0_15
; %bb.12:
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #16]
	ldrb	w9, [x9]
	strb	w9, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	cmp	x8, #2
	b.lo	LBB0_15
; %bb.13:
	mov	w8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x9, [x9, #16]
	ldr	x10, [x19, #8]
	ldr	x10, [x10, #16]
	ldrb	w10, [x10, x8]
	strb	w10, [x9, x8]
	add	x8, x8, #1
	ldr	x9, [x19]
	ldr	x9, [x9, #16]
	cmp	x8, x9
	b.lo	LBB0_14
LBB0_15:
	mov	w0, #0
	b	LBB0_20
LBB0_16:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
	b	LBB0_1
LBB0_17:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_19
	b	LBB0_6
LBB0_18:
	ldr	x9, [x20]
	ldr	x9, [x9, #16]
	cbz	x9, LBB0_11
LBB0_19:
	mov	w0, #83
LBB0_20:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_LodePNGUnknownChunks_copy
.subsections_via_symbols
