	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_color_mode_copy        ## -- Begin function lodepng_color_mode_copy
	.p2align	4, 0x90
_lodepng_color_mode_copy:               ## @lodepng_color_mode_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, %rbx
	movq	%rdi, %r15
	callq	_lodepng_color_mode_cleanup
	movups	(%rbx), %xmm0
	movups	%xmm0, (%r15)
	xorl	%r14d, %r14d
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.1:
	movl	$1024, %edi                     ## imm = 0x400
	callq	_lodepng_malloc
	movq	%rax, (%r15)
	movl	8(%rbx), %ecx
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.4:
	movq	(%rbx), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%rax)
	cmpl	$0, 8(%rbx)
	je	LBB0_7
## %bb.5:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	movq	(%rbx), %rdx
	movzbl	(%rdx,%rax), %edx
	movb	%dl, (%rcx,%rax)
	incq	%rax
	movslq	8(%rbx), %rcx
	shlq	$2, %rcx
	cmpq	%rcx, %rax
	jb	LBB0_6
	jmp	LBB0_7
LBB0_2:
	testl	%ecx, %ecx
	movl	$83, %r14d
	cmovel	%ecx, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lodepng_color_mode_copy        ; -- Begin function lodepng_color_mode_copy
	.p2align	2
_lodepng_color_mode_copy:               ; @lodepng_color_mode_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	_lodepng_color_mode_cleanup
	ldr	q0, [x19]
	str	q0, [x20]
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.1:
	mov	w0, #1024
	bl	_lodepng_malloc
	str	x0, [x20]
	ldr	w8, [x19, #8]
	cbz	x0, LBB0_7
; %bb.2:
	cbz	w8, LBB0_6
; %bb.3:
	ldr	x8, [x19]
	ldrb	w8, [x8]
	strb	w8, [x0]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
; %bb.4:
	mov	w8, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldrb	w9, [x9, x8]
	ldr	x10, [x20]
	strb	w9, [x10, x8]
	add	x8, x8, #1
	ldrsw	x9, [x19, #8]
	cmp	x8, x9, lsl #2
	b.lo	LBB0_5
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w9, #83
	cmp	w8, #0
	csel	w0, wzr, w9, eq
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
