	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgbsps_sethsv                  ## -- Begin function rgbsps_sethsv
	.p2align	4, 0x90
_rgbsps_sethsv:                         ## @rgbsps_sethsv
	.cfi_startproc
## %bb.0:
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movslq	%esi, %rax
	imulq	$-2004318071, %rax, %rax        ## imm = 0x88888889
	shrq	$32, %rax
	addl	%esi, %eax
	movl	%eax, %r8d
	shrl	$31, %r8d
	sarl	$5, %eax
	addl	%r8d, %eax
	cmpl	$5, %eax
	ja	LBB0_3
## %bb.4:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$255, %r9d
	subl	%edx, %r9d
	imull	%ecx, %r9d
	sarl	$8, %r9d
	movl	%ecx, %r8d
	subl	%r9d, %r8d
	imull	$60, %eax, %edx
	subl	%edx, %esi
	imull	%r8d, %esi
	movslq	%esi, %rdx
	imulq	$-2004318071, %rdx, %rsi        ## imm = 0x88888889
	shrq	$32, %rsi
	addl	%esi, %edx
	movl	%edx, %esi
	shrl	$31, %esi
	sarl	$5, %edx
	addl	%esi, %edx
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rax,4), %rax
	addq	%rsi, %rax
	popq	%rbp
	jmpq	*%rax
LBB0_5:
	addl	%r9d, %edx
	movl	%r9d, %r8d
	jmp	LBB0_13
LBB0_1:
	movl	%ecx, %r8d
	movl	%ecx, %edx
	jmp	LBB0_13
LBB0_6:
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%r9d, %r8d
	movl	%ecx, %edx
	movl	%eax, %ecx
	jmp	LBB0_13
LBB0_7:
	addl	%r9d, %edx
	movl	%edx, %r8d
	jmp	LBB0_8
LBB0_9:
	movl	%ecx, %r8d
	subl	%edx, %ecx
LBB0_8:
	movl	%ecx, %edx
	movl	%r9d, %ecx
	jmp	LBB0_13
LBB0_10:
	movl	%ecx, %r8d
	movl	%edx, %ecx
	addl	%r9d, %ecx
	jmp	LBB0_12
LBB0_11:
	movl	%ecx, %r8d
	subl	%edx, %r8d
LBB0_12:
	movl	%r9d, %edx
	jmp	LBB0_13
LBB0_3:
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
LBB0_13:
	movl	%ecx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r8d, %ecx
	jmp	_rgbsps_set                     ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-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_5
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgbsps_sethsv                  ; -- Begin function rgbsps_sethsv
	.p2align	2
_rgbsps_sethsv:                         ; @rgbsps_sethsv
	.cfi_startproc
; %bb.0:
	mov	x8, x3
	cbz	w2, LBB0_4
; %bb.1:
	mov	w11, #34953
	movk	w11, #34952, lsl #16
	smull	x9, w1, w11
	lsr	x9, x9, #32
	add	w9, w9, w1
	asr	w10, w9, #5
	add	w10, w10, w9, lsr #31
	cmp	w10, #5
	b.hi	LBB0_11
; %bb.2:
	mov	w9, #255
	sub	w9, w9, w2
	mul	w9, w9, w8
	asr	w9, w9, #8
	sub	w12, w8, w9
	mov	w13, #60
	msub	w13, w10, w13, w1
	mul	w12, w12, w13
	smull	x11, w12, w11
	lsr	x11, x11, #32
	add	w11, w11, w12
	asr	w12, w11, #5
	add	w11, w12, w11, lsr #31
Lloh0:
	adrp	x12, lJTI0_0@PAGE
Lloh1:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_3
	ldrb	w14, [x12, x10]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_3:
	add	w2, w11, w9
	mov	x3, x9
	mov	x1, x8
	b	_rgbsps_set
LBB0_4:
	mov	x3, x8
	mov	x2, x8
	mov	x1, x8
	b	_rgbsps_set
LBB0_5:
	mov	x2, x8
	sub	w1, w8, w11
	mov	x3, x9
	b	_rgbsps_set
LBB0_6:
	add	w3, w11, w9
	mov	x2, x8
	mov	x1, x9
	b	_rgbsps_set
LBB0_7:
	sub	w2, w8, w11
	mov	x3, x8
	mov	x1, x9
	b	_rgbsps_set
LBB0_8:
	mov	x3, x8
	add	w8, w11, w9
	b	LBB0_10
LBB0_9:
	sub	w3, w8, w11
LBB0_10:
	mov	x2, x9
	mov	x1, x8
	b	_rgbsps_set
LBB0_11:
	mov	w3, #0
	mov	w2, #0
	mov	w1, #0
	b	_rgbsps_set
	.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_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
.subsections_via_symbols
