	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsv_to_rgb                     ## -- Begin function hsv_to_rgb
	.p2align	4, 0x90
_hsv_to_rgb:                            ## @hsv_to_rgb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %rax
	leaq	16(%rbp), %rcx
	movq	16(%rbp), %r9
	testq	%r9, %r9
	je	LBB0_1
## %bb.2:
	movl	16(%rcx), %edx
	movq	8(%rcx), %r8
	leal	(%rdx,%rdx), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movslq	%ecx, %rdi
	imulq	$-2139062143, %rdi, %rcx        ## imm = 0x80808081
	shrq	$32, %rcx
	addl	%ecx, %edi
	movl	%edi, %ecx
	shrl	$31, %ecx
	sarl	$7, %edi
	addl	%ecx, %edi
	imull	$-85, %edi, %ecx
	leal	(%rcx,%rdx,2), %ecx
	leal	(%rcx,%rcx,2), %r10d
	movl	$255, %ecx
	movl	$255, %r11d
	subl	%r9d, %r11d
	imull	%r8d, %r11d
	sarl	$8, %r11d
	movl	%r10d, %edx
	imull	%r9d, %edx
	sarl	$8, %edx
	movl	$255, %esi
	subl	%edx, %esi
	imull	%r8d, %esi
	sarl	$8, %esi
	cmpl	$6, %edi
	ja	LBB0_11
## %bb.3:
	movl	$255, %edx
	subl	%r10d, %edx
	imull	%r9d, %edx
	sarl	$8, %edx
	subl	%edx, %ecx
	imull	%r8d, %ecx
	sarl	$8, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rdi,4), %rdi
	addq	%rdx, %rdi
	jmpq	*%rdi
LBB0_4:
	movslq	%r8d, %rdx
	movq	%rdx, (%rax)
	movslq	%ecx, %rcx
	jmp	LBB0_5
LBB0_1:
	movq	8(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	%rcx, 8(%rax)
	jmp	LBB0_12
LBB0_6:
	movslq	%esi, %rcx
	movq	%rcx, (%rax)
	movslq	%r8d, %rcx
LBB0_5:
	movq	%rcx, 8(%rax)
	movslq	%r11d, %rcx
	jmp	LBB0_12
LBB0_7:
	movslq	%r11d, %rdx
	movq	%rdx, (%rax)
	movslq	%r8d, %rdx
	movq	%rdx, 8(%rax)
	movslq	%ecx, %rcx
	jmp	LBB0_12
LBB0_8:
	movslq	%r11d, %rcx
	movq	%rcx, (%rax)
	movslq	%esi, %rcx
	jmp	LBB0_9
LBB0_10:
	movslq	%ecx, %rcx
	movq	%rcx, (%rax)
	movslq	%r11d, %rcx
LBB0_9:
	movq	%rcx, 8(%rax)
	movslq	%r8d, %rcx
	jmp	LBB0_12
LBB0_11:
	movslq	%r8d, %rcx
	movq	%rcx, (%rax)
	movslq	%r11d, %rcx
	movq	%rcx, 8(%rax)
	movslq	%esi, %rcx
LBB0_12:
	movq	%rcx, 16(%rax)
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_CIE1931_CURVE,8,3              ## @CIE1931_CURVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsv_to_rgb                     ; -- Begin function hsv_to_rgb
	.p2align	2
_hsv_to_rgb:                            ; @hsv_to_rgb
	.cfi_startproc
; %bb.0:
	ldr	x11, [x0]
	cbz	x11, LBB0_4
; %bb.1:
	ldr	w10, [x0, #16]
	ldr	x9, [x0, #8]
	lsl	w12, w10, #1
	add	w10, w12, w10
	lsl	w10, w10, #1
	mov	w13, #32897
	movk	w13, #32896, lsl #16
	smull	x13, w10, w13
	lsr	x13, x13, #32
	add	w10, w13, w10
	asr	w13, w10, #7
	add	w13, w13, w10, lsr #31
	mov	w10, #-85
	madd	w10, w13, w10, w12
	add	w15, w10, w10, lsl #1
	mov	w14, #255
	sub	w10, w14, w11
	mul	w10, w10, w9
	asr	w10, w10, #8
	mul	w12, w15, w11
	sub	w12, w14, w12, asr #8
	mul	w12, w12, w9
	asr	w12, w12, #8
	cmp	w13, #6
	b.hi	LBB0_11
; %bb.2:
	sub	w15, w14, w15
	mul	w11, w15, w11
	sub	w11, w14, w11, asr #8
	mul	w11, w11, w9
	asr	w11, w11, #8
Lloh0:
	adrp	x14, lJTI0_0@PAGE
Lloh1:
	add	x14, x14, lJTI0_0@PAGEOFF
	adr	x15, LBB0_3
	ldrb	w16, [x14, x13]
	add	x15, x15, x16, lsl #2
	br	x15
LBB0_3:
	sxtw	x9, w9
	sxtw	x11, w11
	stp	x9, x11, [x8]
	b	LBB0_6
LBB0_4:
	ldr	x9, [x0, #8]
	stp	x9, x9, [x8]
	str	x9, [x8, #16]
	ret
LBB0_5:
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	sxtw	x11, w12
	sxtw	x9, w9
	stp	x11, x9, [x8]
LBB0_6:
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	sxtw	x9, w10
	str	x9, [x8, #16]
	ret
LBB0_7:
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	sxtw	x10, w10
	sxtw	x9, w9
	stp	x10, x9, [x8]
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x9, w11
	str	x9, [x8, #16]
	ret
LBB0_8:
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	sxtw	x10, w10
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	sxtw	x11, w12
	stp	x10, x11, [x8]
	b	LBB0_10
LBB0_9:
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x11, w11
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	sxtw	x10, w10
	stp	x11, x10, [x8]
LBB0_10:
	sxtw	x9, w9
	str	x9, [x8, #16]
	ret
LBB0_11:
	sxtw	x9, w9
	sxtw	x10, w10
	stp	x9, x10, [x8]
	sxtw	x9, w12
	str	x9, [x8, #16]
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	_CIE1931_CURVE,8,3              ; @CIE1931_CURVE
.subsections_via_symbols
