	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgblight_sethsv_eeprom_helper  ## -- Begin function rgblight_sethsv_eeprom_helper
	.p2align	4, 0x90
_rgblight_sethsv_eeprom_helper:         ## @rgblight_sethsv_eeprom_helper
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_rgblight_config@GOTPCREL(%rip), %rbx
	cmpq	$0, 24(%rbx)
	je	LBB0_16
## %bb.1:
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %r12d
	movl	(%rbx), %edi
	cmpl	$1, %edi
	jne	LBB0_3
## %bb.2:
	leaq	-88(%rbp), %rcx
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_sethsv
	movq	_fled_hs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r12d, 8(%rax)
	movl	%r12d, (%rax)
	movl	%r15d, 12(%rax)
	movl	%r15d, 4(%rax)
	movl	-80(%rbp), %edi
	movl	-88(%rbp), %edx
	movl	-84(%rbp), %esi
	callq	_rgblight_setrgb
	jmp	LBB0_12
LBB0_3:
	leal	-2(%rdi), %eax
	cmpl	$3, %eax
	ja	LBB0_5
## %bb.4:
	movl	4(%rbx), %r14d
	jmp	LBB0_12
LBB0_5:
	leal	-6(%rdi), %eax
	cmpl	$8, %eax
	ja	LBB0_7
## %bb.6:
	movl	8(%rbx), %r12d
	jmp	LBB0_12
LBB0_7:
	addl	$-25, %edi
	cmpl	$9, %edi
	ja	LBB0_12
## %bb.8:
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%edi, %eax
	andl	$1, %eax
	xorl	%ebx, %ebx
	negl	%eax
	movl	$0, %eax
	sbbl	%eax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_RGBLED_GRADIENT_RANGES@GOTPCREL(%rip), %rax
	shrl	%edi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	callq	_pgm_read_word
	movl	%eax, %r13d
	movq	_RGBLED_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	jle	LBB0_11
## %bb.9:
	orl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addl	$360, %eax                      ## imm = 0x168
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	imull	%ebx, %eax
	addl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %r14
	imulq	$-1240768329, %r14, %rax        ## imm = 0xB60B60B7
	shrq	$32, %rax
	addl	%r14d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$8, %eax
	addl	%ecx, %eax
	imull	$360, %eax, %eax                ## imm = 0x168
	subl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_dprintf
	movq	_led@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%r12, %rcx
	movl	%r14d, %edi
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_sethsv
	movq	_RGBLED_NUM@GOTPCREL(%rip), %rax
	incq	%r15
	movslq	(%rax), %rcx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	addq	$4, %r12
	cmpq	%rcx, %r15
	jl	LBB0_10
LBB0_11:
	xorl	%eax, %eax
	callq	_rgblight_set
	movq	_rgblight_config@GOTPCREL(%rip), %rbx
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
LBB0_12:
	movl	%r12d, 8(%rbx)
	movl	%r15d, 12(%rbx)
	movl	%r14d, 4(%rbx)
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.13:
	movl	16(%rbx), %edi
	callq	_eeconfig_update_rgblight
	movl	4(%rbx), %ecx
	movl	8(%rbx), %esi
	movl	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
LBB0_15:
	callq	_xprintf
LBB0_16:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rgblight_config,32,3           ## @rgblight_config
	.comm	_fled_hs,8,3                    ## @fled_hs
	.comm	_RGBLED_GRADIENT_RANGES,8,3     ## @RGBLED_GRADIENT_RANGES
	.comm	_RGBLED_NUM,4,2                 ## @RGBLED_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rgblight rainbow set hsv: %u,%u,%d,%u\n"

	.comm	_led,8,3                        ## @led
L_.str.1:                               ## @.str.1
	.asciz	"rgblight set hsv [EEPROM]: %u,%u,%u\n"

L_.str.2:                               ## @.str.2
	.asciz	"rgblight set hsv [NOEEPROM]: %u,%u,%u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgblight_sethsv_eeprom_helper  ; -- Begin function rgblight_sethsv_eeprom_helper
	.p2align	2
_rgblight_sethsv_eeprom_helper:         ; @rgblight_sethsv_eeprom_helper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x28, _rgblight_config@GOTPAGE
Lloh1:
	ldr	x28, [x28, _rgblight_config@GOTPAGEOFF]
	ldr	x8, [x28, #24]
	cbz	x8, LBB0_16
; %bb.1:
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x28]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
	add	x3, sp, #16
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_sethsv
Lloh2:
	adrp	x8, _fled_hs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fled_hs@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	w21, w20, [x8, #8]
	stp	w21, w20, [x8]
	ldp	w1, w0, [sp, #20]
	ldr	w2, [sp, #16]
	bl	_rgblight_setrgb
	b	LBB0_12
LBB0_3:
	sub	w9, w8, #2
	cmp	w9, #3
	b.hi	LBB0_5
; %bb.4:
	ldr	w19, [x28, #4]
	b	LBB0_12
LBB0_5:
	sub	w9, w8, #6
	cmp	w9, #8
	b.hi	LBB0_7
; %bb.6:
	ldr	w21, [x28, #8]
	b	LBB0_12
LBB0_7:
	sub	w8, w8, #25
	cmp	w8, #9
	b.hi	LBB0_12
; %bb.8:
	stp	w22, w21, [sp, #4]              ; 8-byte Folded Spill
	tst	w8, #0x1
	mov	w9, #1
	cneg	w23, w9, ne
Lloh5:
	adrp	x9, _RGBLED_GRADIENT_RANGES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RGBLED_GRADIENT_RANGES@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	lsr	w8, w8, #1
	add	x0, x9, w8, uxtw #2
	bl	_pgm_read_word
Lloh8:
	adrp	x21, _RGBLED_NUM@GOTPAGE
Lloh9:
	ldr	x21, [x21, _RGBLED_NUM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x24, x0
	mov	x26, #0
	mov	w22, #0
	mov	x25, #0
	ldr	w10, [sp, #8]                   ; 4-byte Folded Reload
	add	w10, w10, #360
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sdiv	w8, w24, w8
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	madd	w8, w22, w8, w10
	mov	w9, #24759
	movk	w9, #46603, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w9, w9, w8
	asr	w10, w9, #8
	add	w9, w10, w9, lsr #31
	mov	w10, #360
	msub	w27, w9, w10, w8
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	mov	x2, x27
	mov	x3, x23
	mov	x4, x24
	bl	_dprintf
Lloh12:
	adrp	x8, _led@GOTPAGE
Lloh13:
	ldr	x8, [x8, _led@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x3, x8, x26
	mov	x0, x27
	mov	x1, x20
	mov	x2, x19
	bl	_sethsv
	add	x25, x25, #1
	ldrsw	x8, [x21]
	add	w22, w22, w23
	add	x26, x26, #4
	cmp	x25, x8
	b.lt	LBB0_10
LBB0_11:
	bl	_rgblight_set
	ldp	w22, w21, [sp, #4]              ; 8-byte Folded Reload
LBB0_12:
	stp	w21, w20, [x28, #8]
	str	w19, [x28, #4]
	cbz	w22, LBB0_14
; %bb.13:
	ldr	w0, [x28, #16]
	bl	_eeconfig_update_rgblight
	ldp	w1, w2, [x28, #8]
	ldr	w3, [x28, #4]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
LBB0_15:
	bl	_xprintf
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_rgblight_config,32,3           ; @rgblight_config
	.comm	_fled_hs,8,3                    ; @fled_hs
	.comm	_RGBLED_GRADIENT_RANGES,8,3     ; @RGBLED_GRADIENT_RANGES
	.comm	_RGBLED_NUM,4,2                 ; @RGBLED_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rgblight rainbow set hsv: %u,%u,%d,%u\n"

	.comm	_led,8,3                        ; @led
l_.str.1:                               ; @.str.1
	.asciz	"rgblight set hsv [EEPROM]: %u,%u,%u\n"

l_.str.2:                               ; @.str.2
	.asciz	"rgblight set hsv [NOEEPROM]: %u,%u,%u\n"

.subsections_via_symbols
