	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_layer_led                  ## -- Begin function set_layer_led
	.p2align	4, 0x90
_set_layer_led:                         ## @set_layer_led
	.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	%rdi, %r15
	cmpq	%rdi, _set_layer_led.p_lyr(%rip)
	jne	LBB0_3
## %bb.1:
	movq	_set_layer_led.p_dim(%rip), %rax
	movq	_led_dim@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_is_first_run
	testl	%eax, %eax
	je	LBB0_7
LBB0_3:
	movq	%r15, _set_layer_led.p_lyr(%rip)
	movq	_led_dim@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, _set_layer_led.p_dim(%rip)
	movq	__VL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorq	%r15, %rcx
	orq	%rax, %rcx
	movl	$1, %ecx
	cmovneq	%rax, %rcx
	movq	_RGBLED_NUM@GOTPCREL(%rip), %r12
	movl	$1, %ebx
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.4:
	movq	__LC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r13
	movq	16(%rax), %rbx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r15
	movq	%r14, %r8
	callq	_SET_LED_RGB
	movq	%r15, %rcx
	incq	%r14
	cmpq	(%r12), %r14
	jb	LBB0_5
## %bb.6:
	movl	$1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_set_layer_led.p_lyr,8,3 ## @set_layer_led.p_lyr
.zerofill __DATA,__bss,_set_layer_led.p_dim,8,3 ## @set_layer_led.p_dim
	.comm	_led_dim,8,3                    ## @led_dim
	.comm	__LC,8,3                        ## @_LC
	.comm	__VL,8,3                        ## @_VL
	.comm	_RGBLED_NUM,8,3                 ## @RGBLED_NUM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_layer_led                  ; -- Begin function set_layer_led
	.p2align	2
_set_layer_led:                         ; @set_layer_led
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	adrp	x20, _set_layer_led.p_lyr@PAGE
	ldr	x8, [x20, _set_layer_led.p_lyr@PAGEOFF]
	adrp	x21, _set_layer_led.p_dim@PAGE
Lloh0:
	adrp	x22, _led_dim@GOTPAGE
Lloh1:
	ldr	x22, [x22, _led_dim@GOTPAGEOFF]
	cmp	x8, x0
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x21, _set_layer_led.p_dim@PAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	bl	_is_first_run
	cbz	w0, LBB0_7
LBB0_3:
	str	x19, [x20, _set_layer_led.p_lyr@PAGEOFF]
	ldr	x8, [x22]
	str	x8, [x21, _set_layer_led.p_dim@PAGEOFF]
Lloh2:
	adrp	x9, __VL@GOTPAGE
Lloh3:
	ldr	x9, [x9, __VL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, x19, #0, eq
	csinc	x20, x8, xzr, ne
Lloh5:
	adrp	x24, _RGBLED_NUM@GOTPAGE
Lloh6:
	ldr	x24, [x24, _RGBLED_NUM@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x21, #0
Lloh7:
	adrp	x8, __LC@GOTPAGE
Lloh8:
	ldr	x8, [x8, __LC@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x8, [x8, x19, lsl #3]
	ldp	x19, x22, [x8]
	ldr	x23, [x8, #16]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x20
	mov	x4, x21
	bl	_SET_LED_RGB
	add	x21, x21, #1
	ldr	x8, [x24]
	cmp	x21, x8
	b.lo	LBB0_5
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_set_layer_led.p_lyr,8,3 ; @set_layer_led.p_lyr
.zerofill __DATA,__bss,_set_layer_led.p_dim,8,3 ; @set_layer_led.p_dim
	.comm	_led_dim,8,3                    ; @led_dim
	.comm	__LC,8,3                        ; @_LC
	.comm	__VL,8,3                        ; @_VL
	.comm	_RGBLED_NUM,8,3                 ; @RGBLED_NUM
.subsections_via_symbols
