	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function RGB_to_HWB
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_2:
	.long	0x40400000                      ## float 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	2
LCPI0_1:
	.long	0x3f800000                      ## float 1
	.long	0x40a00000                      ## float 5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_RGB_to_HWB:                            ## @RGB_to_HWB
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	movaps	%xmm1, %xmm2
	movss	%xmm1, -4(%rbp)                 ## 4-byte Spill
	movaps	%xmm0, -48(%rbp)                ## 16-byte Spill
	movshdup	%xmm0, %xmm1                    ## xmm1 = xmm0[1,1,3,3]
	movaps	%xmm1, -32(%rbp)                ## 16-byte Spill
	callq	_MIN3
	movss	%xmm0, -8(%rbp)                 ## 4-byte Spill
	movaps	-48(%rbp), %xmm0                ## 16-byte Reload
	movaps	-32(%rbp), %xmm1                ## 16-byte Reload
	movss	-4(%rbp), %xmm2                 ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_MAX3
	movss	-8(%rbp), %xmm3                 ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm6
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	ucomiss	%xmm3, %xmm0
	jne	LBB0_2
	jp	LBB0_2
## %bb.1:
	movq	_HWB_UNDEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movaps	%xmm3, %xmm0
	movss	%xmm1, -16(%rbp)                ## 4-byte Spill
	movss	%xmm6, -12(%rbp)                ## 4-byte Spill
	callq	_RETURN_HWB
	movss	-12(%rbp), %xmm6                ## 4-byte Reload
                                        ## xmm6 = mem[0],zero,zero,zero
	movss	-16(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-8(%rbp), %xmm3                 ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
LBB0_2:
	movaps	-48(%rbp), %xmm4                ## 16-byte Reload
	ucomiss	%xmm3, %xmm4
	jne	LBB0_4
	jp	LBB0_4
## %bb.3:
	movaps	-32(%rbp), %xmm2                ## 16-byte Reload
	movaps	%xmm2, %xmm0
	subss	-4(%rbp), %xmm0                 ## 4-byte Folded Reload
	jmp	LBB0_7
LBB0_4:
	movaps	-32(%rbp), %xmm2                ## 16-byte Reload
	ucomiss	%xmm3, %xmm2
	jne	LBB0_6
	jp	LBB0_6
## %bb.5:
	movss	-4(%rbp), %xmm0                 ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	subss	%xmm4, %xmm0
	jmp	LBB0_7
LBB0_6:
	movaps	%xmm4, %xmm0
	subss	%xmm2, %xmm0
LBB0_7:
	cmpeqss	%xmm3, %xmm2
	movd	%xmm2, %eax
	andl	$1, %eax
	leaq	LCPI0_1(%rip), %rcx
	movss	(%rcx,%rax,4), %xmm5            ## xmm5 = mem[0],zero,zero,zero
	cmpeqss	%xmm3, %xmm4
	movaps	%xmm4, %xmm2
	andnps	%xmm5, %xmm2
	movss	LCPI0_2(%rip), %xmm5            ## xmm5 = mem[0],zero,zero,zero
	andps	%xmm4, %xmm5
	orps	%xmm2, %xmm5
	subss	%xmm3, %xmm6
	divss	%xmm6, %xmm0
	subss	%xmm0, %xmm5
	cvttss2si	%xmm5, %edi
	movaps	%xmm3, %xmm0
	addq	$48, %rsp
	popq	%rbp
	jmp	_RETURN_HWB                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HWB_UNDEFINED,4,2              ## @HWB_UNDEFINED
	.no_dead_strip	_RGB_to_HWB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RGB_to_HWB
_RGB_to_HWB:                            ; @RGB_to_HWB
	.cfi_startproc
; %bb.0:
	stp	d15, d14, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	d13, d12, [sp, #16]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [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 b8, -24
	.cfi_offset b9, -32
	.cfi_offset b10, -40
	.cfi_offset b11, -48
	.cfi_offset b12, -56
	.cfi_offset b13, -64
	.cfi_offset b14, -72
	.cfi_offset b15, -80
	fmov	s11, s2
	fmov	s10, s1
	fmov	s9, s0
	bl	_MIN3
	fmov	s8, s0
	fmov	s0, s9
	fmov	s1, s10
	fmov	s2, s11
	bl	_MAX3
	fmov	s13, s0
	fmov	s14, #1.00000000
	fsub	s12, s14, s0
	fcmp	s0, s8
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _HWB_UNDEFINED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HWB_UNDEFINED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	fmov	s0, s8
	fmov	s1, s12
	bl	_RETURN_HWB
LBB0_2:
	fcmp	s10, s8
	fsub	s0, s9, s10
	fsub	s1, s11, s9
	fcsel	s0, s0, s1, ne
	fsub	s1, s10, s11
	fcmp	s9, s8
	fcsel	s0, s0, s1, ne
	fcmp	s10, s8
	fmov	s1, #5.00000000
	fcsel	s1, s1, s14, eq
	fcmp	s9, s8
	fmov	s2, #3.00000000
	fcsel	s1, s2, s1, eq
	fsub	s2, s13, s8
	fdiv	s0, s0, s2
	fsub	s0, s1, s0
	fcvtzs	w0, s0
	fmov	s0, s8
	fmov	s1, s12
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp], #80             ; 16-byte Folded Reload
	b	_RETURN_HWB
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HWB_UNDEFINED,4,2              ; @HWB_UNDEFINED
	.no_dead_strip	_RGB_to_HWB
.subsections_via_symbols
