	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CC_RGBtoHSL
_CC_RGBtoHSL:                           ## @CC_RGBtoHSL
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	%edi, %r13d
	movl	%esi, %edi
	callq	_GetRValue
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_GetGValue
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_GetBValue
	movl	%eax, %r12d
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_max
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_max
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_min
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_min
	movl	%eax, %ecx
	movl	%ebx, %esi
	subl	%eax, %esi
	cmpl	$72, %r13d
	je	LBB0_8
## %bb.1:
	leal	(%rcx,%rbx), %edx
	movl	$0, %eax
	cmpl	$83, %r13d
	je	LBB0_4
## %bb.2:
	cmpl	$76, %r13d
	jne	LBB0_15
## %bb.3:
	imull	$120, %edx, %eax
	cltq
	imulq	$-2139062143, %rax, %rcx        ## imm = 0x80808081
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$7, %eax
	addl	%ecx, %eax
	jmp	LBB0_15
LBB0_4:
	testl	%edx, %edx
	je	LBB0_15
## %bb.5:
	movl	$240, %eax
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.6:
	cmpl	$255, %ebx
	je	LBB0_15
## %bb.7:
	imull	$240, %esi, %eax
	movl	$510, %ecx                      ## imm = 0x1FE
	subl	%edx, %ecx
	cmpl	$256, %edx                      ## imm = 0x100
	cmovll	%edx, %ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_15
LBB0_8:
	movl	$160, %eax
	cmpl	%ecx, %ebx
	je	LBB0_15
## %bb.9:
	cmpl	%r14d, %ebx
	jne	LBB0_11
## %bb.10:
	subl	%r12d, %r15d
	shll	$3, %r15d
	leal	(%r15,%r15,4), %eax
	cltd
	idivl	%esi
	movl	%eax, %ecx
	leal	240(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	jmp	LBB0_15
LBB0_11:
	cmpl	%r15d, %ebx
	jne	LBB0_13
## %bb.12:
	subl	%r14d, %r12d
	shll	$3, %r12d
	leal	(%r12,%r12,4), %eax
	cltd
	idivl	%esi
                                        ## kill: def $eax killed $eax def $rax
	addl	$80, %eax
	jmp	LBB0_15
LBB0_13:
	movl	$0, %eax
	cmpl	%r12d, %ebx
	jne	LBB0_15
## %bb.14:
	subl	%r15d, %r14d
	shll	$3, %r14d
	leal	(%r14,%r14,4), %eax
	cltd
	idivl	%esi
                                        ## kill: def $eax killed $eax def $rax
	addl	$160, %eax
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_CC_RGBtoHSL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CC_RGBtoHSL
_CC_RGBtoHSL:                           ; @CC_RGBtoHSL
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	mov	x21, x0
	mov	x0, x1
	bl	_GetRValue
	mov	x19, x0
	mov	x0, x22
	bl	_GetGValue
	mov	x20, x0
	mov	x0, x22
	bl	_GetBValue
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_max
	mov	x1, x20
	bl	_max
	mov	x23, x0
	mov	x0, x19
	mov	x1, x22
	bl	_min
	mov	x1, x20
	bl	_min
	mov	x8, x0
	sub	w9, w23, w0
	cmp	w21, #72
	b.eq	LBB0_8
; %bb.1:
	add	w10, w8, w23
	cmp	w21, #83
	b.eq	LBB0_4
; %bb.2:
	cmp	w21, #76
	b.ne	LBB0_16
; %bb.3:
	mov	w8, #120
	mul	w8, w10, w8
	mov	w9, #32897
	movk	w9, #32896, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #7
	add	w0, w9, w8, lsr #31
	b	LBB0_17
LBB0_4:
	cbz	w10, LBB0_16
; %bb.5:
	mov	w0, #240
	cbz	w8, LBB0_17
; %bb.6:
	cmp	w23, #255
	b.eq	LBB0_17
; %bb.7:
	mov	w8, #240
	mul	w8, w9, w8
	mov	w9, #510
	sub	w9, w9, w10
	cmp	w10, #255
	csel	w9, w9, w10, gt
	sdiv	w0, w8, w9
	b	LBB0_17
LBB0_8:
	cmp	w23, w8
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #160
	b	LBB0_17
LBB0_10:
	cmp	w23, w19
	b.ne	LBB0_12
; %bb.11:
	sub	w8, w20, w22
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #3
	sdiv	w8, w8, w9
	add	w9, w8, #240
	cmp	w8, #0
	csel	w0, w9, w8, lt
	b	LBB0_17
LBB0_12:
	cmp	w23, w20
	b.ne	LBB0_14
; %bb.13:
	sub	w8, w22, w19
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #3
	sdiv	w8, w8, w9
	add	w0, w8, #80
	b	LBB0_17
LBB0_14:
	cmp	w23, w22
	b.ne	LBB0_16
; %bb.15:
	sub	w8, w19, w20
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #3
	sdiv	w8, w8, w9
	add	w0, w8, #160
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_CC_RGBtoHSL
.subsections_via_symbols
