	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function color_profile_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_color_profile_init:                    ## @color_profile_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	cmpl	$16, (%rsi)
	setne	%al
	movl	%eax, (%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%rdi)
	movq	%rsi, %rdi
	callq	_lodepng_is_greyscale_type
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 4(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	movq	%r14, %rdi
	callq	_lodepng_can_have_alpha
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, 8(%rbx)
	movq	$0, 56(%rbx)
	leaq	48(%rbx), %rdi
	callq	_color_tree_init
	movl	$1024, %edi                     ## imm = 0x400
	callq	_lodepng_malloc
	movq	%rax, 16(%rbx)
	movl	$257, 24(%rbx)                  ## imm = 0x101
	movq	%r14, %rdi
	callq	_lodepng_get_bpp
	cmpl	$8, %eax
	jg	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	callq	_lodepng_get_bpp
	cmpl	$1, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$2, %eax
	jne	LBB0_4
## %bb.5:
	movl	$4, %eax
	jmp	LBB0_6
LBB0_2:
	movl	$2, %eax
	jmp	LBB0_6
LBB0_4:
	cmpl	$4, %eax
	movl	$16, %ecx
	movl	$256, %eax                      ## imm = 0x100
	cmovel	%ecx, %eax
LBB0_6:
	movl	%eax, 24(%rbx)
LBB0_7:
	movq	$0, 40(%rbx)
	movl	$1, 28(%rbx)
	movq	%r14, %rdi
	callq	_lodepng_get_bpp
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	sete	%cl
	movl	%ecx, 32(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_color_profile_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function color_profile_init
_color_profile_init:                    ; @color_profile_init
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #16
	cset	w8, ne
	str	w8, [x0]
	movi.2d	v0, #0000000000000000
	str	q0, [x0, #80]
	mov	x0, x1
	bl	_lodepng_is_greyscale_type
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x19, #4]
	movi.2d	v0, #0000000000000000
	str	q0, [x19, #64]
	mov	x0, x20
	bl	_lodepng_can_have_alpha
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x19, #8]
	str	xzr, [x19, #56]
	add	x0, x19, #48
	bl	_color_tree_init
	mov	w0, #1024
	bl	_lodepng_malloc
	str	x0, [x19, #16]
	mov	w8, #257
	str	w8, [x19, #24]
	mov	x0, x20
	bl	_lodepng_get_bpp
	cmp	w0, #8
	b.gt	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_lodepng_get_bpp
	mov	w8, #2
	mov	w9, #4
	mov	w10, #256
	mov	w11, #16
	cmp	w0, #4
	csel	w10, w11, w10, eq
	cmp	w0, #2
	csel	w9, w9, w10, eq
	cmp	w0, #1
	csel	w8, w8, w9, eq
	str	w8, [x19, #24]
LBB0_2:
	str	xzr, [x19, #40]
	mov	w8, #1
	str	w8, [x19, #28]
	mov	x0, x20
	bl	_lodepng_get_bpp
	cmp	w0, #1
	cset	w8, eq
	str	w8, [x19, #32]
	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	_color_profile_init
.subsections_via_symbols
