	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_layer_color                ## -- Begin function set_layer_color
	.p2align	4, 0x90
_set_layer_color:                       ## @set_layer_color
	.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
	movq	_DRIVER_LED_TOTAL@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.1:
	movslq	%edi, %r13
	xorl	%ebx, %ebx
	movq	_ledmap@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	shlq	$32, %r15
	movl	%r14d, %edi
	orq	%r15, %rdi
	movl	%eax, %esi
	callq	_hsv_to_rgb
	movq	_rgb_matrix_config@GOTPCREL(%rip), %rax
	xorps	%xmm2, %xmm2
	cvtsi2ssq	(%rax), %xmm2
	movq	_UINT8_MAX@GOTPCREL(%rip), %rax
	divss	(%rax), %xmm2
	movshdup	%xmm0, %xmm3                    ## xmm3 = xmm0[1,1,3,3]
	mulss	%xmm2, %xmm0
	mulss	%xmm2, %xmm3
	mulss	%xmm1, %xmm2
	movl	%ebx, %edi
	movaps	%xmm3, %xmm1
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_rgb_matrix_set_color
	incq	%rbx
	movq	_DRIVER_LED_TOTAL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$8, %rdi
	callq	_pgm_read_byte
	movl	%eax, %r14d
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$4, %rdi
	callq	_pgm_read_byte
	movl	%eax, %r15d
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_pgm_read_byte
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	xorps	%xmm2, %xmm2
	movl	%ebx, %edi
	jmp	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_LED_TOTAL,4,2           ## @DRIVER_LED_TOTAL
	.comm	_ledmap,8,3                     ## @ledmap
	.comm	_rgb_matrix_config,8,3          ## @rgb_matrix_config
	.comm	_UINT8_MAX,4,2                  ## @UINT8_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_layer_color                ; -- Begin function set_layer_color
	.p2align	2
_set_layer_color:                       ; @set_layer_color
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x23, _DRIVER_LED_TOTAL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DRIVER_LED_TOTAL@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, #0
Lloh2:
	adrp	x24, _ledmap@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ledmap@GOTPAGEOFF]
	sxtw	x8, w0
	lsl	x25, x8, #3
Lloh4:
	adrp	x26, _rgb_matrix_config@GOTPAGE
Lloh5:
	ldr	x26, [x26, _rgb_matrix_config@GOTPAGEOFF]
Lloh6:
	adrp	x27, _UINT8_MAX@GOTPAGE
Lloh7:
	ldr	x27, [x27, _UINT8_MAX@GOTPAGEOFF]
                                        ; implicit-def: $x20
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, w21
	bfi	x8, x22, #32, #32
	mov	w9, w0
	and	x10, x20, #0xffffffff00000000
	orr	x20, x10, x9
	mov	x0, x8
	mov	x1, x20
	bl	_hsv_to_rgb
	ldr	x8, [x26]
	scvtf	s3, x8
	ldr	s4, [x27]
	fdiv	s3, s3, s4
	fmul	s0, s0, s3
	fmul	s1, s1, s3
	fmul	s2, s2, s3
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_rgb_matrix_set_color
	add	x19, x19, #1
	ldrsw	x8, [x23]
	cmp	x19, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x8, [x8, x25]
	lsl	x28, x19, #3
	ldr	x8, [x8, x28]
	add	x0, x8, #8
	bl	_pgm_read_byte
	mov	x21, x0
	ldr	x8, [x24]
	ldr	x8, [x8, x25]
	ldr	x8, [x8, x28]
	add	x0, x8, #4
	bl	_pgm_read_byte
	mov	x22, x0
	ldr	x8, [x24]
	ldr	x8, [x8, x25]
	ldr	x0, [x8, x28]
	bl	_pgm_read_byte
	cmp	w0, #0
	ccmp	w22, #0, #0, eq
	ccmp	w21, #0, #0, eq
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	movi	d0, #0000000000000000
	movi	d1, #0000000000000000
	movi	d2, #0000000000000000
	b	LBB0_3
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_LED_TOTAL,4,2           ; @DRIVER_LED_TOTAL
	.comm	_ledmap,8,3                     ; @ledmap
	.comm	_rgb_matrix_config,8,3          ; @rgb_matrix_config
	.comm	_UINT8_MAX,4,2                  ; @UINT8_MAX
.subsections_via_symbols
