	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_init_kb                 ## -- Begin function matrix_init_kb
	.p2align	4, 0x90
_matrix_init_kb:                        ## @matrix_init_kb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%eax, %eax
	callq	_eeprom_is_valid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EEPROM_FRONTLED_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eeprom_read_byte
	movq	_fled_val@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_3
LBB0_2:
	movq	_FLED_RGB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_fled_mode@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_FLED_VAL_STEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movq	_fled_val@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_eeprom_update_conf
LBB0_3:
	movq	_fleds@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_setrgb
	movq	(%rbx), %rcx
	addq	$4, %rcx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_setrgb
	movq	_fled_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FLED_INDI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	xorl	%eax, %eax
	callq	_host_keyboard_leds
	movq	_USB_LED_CAPS_LOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_6
## %bb.5:
	movq	_FLED_CAPS_H@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_FLED_CAPS_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_fled_val@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rcx
	callq	_sethsv
LBB0_6:
	movq	_layer_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_biton32
	movq	_lc_size@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_9
## %bb.7:
	movq	_layer_colors@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	movl	8(%rcx,%rax), %esi
	movq	_fled_val@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rcx
	addq	$4, %rcx
	callq	_sethsv
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_matrix_init_user               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_FRONTLED_ADDR,4,2       ## @EEPROM_FRONTLED_ADDR
	.comm	_fled_mode,8,3                  ## @fled_mode
	.comm	_FLED_VAL_STEP,4,2              ## @FLED_VAL_STEP
	.comm	_fled_val,4,2                   ## @fled_val
	.comm	_FLED_RGB,8,3                   ## @FLED_RGB
	.comm	_fleds,8,3                      ## @fleds
	.comm	_FLED_INDI,8,3                  ## @FLED_INDI
	.comm	_USB_LED_CAPS_LOCK,4,2          ## @USB_LED_CAPS_LOCK
	.comm	_FLED_CAPS_H,8,3                ## @FLED_CAPS_H
	.comm	_FLED_CAPS_S,4,2                ## @FLED_CAPS_S
	.comm	_layer_state,4,2                ## @layer_state
	.comm	_lc_size,8,3                    ## @lc_size
	.comm	_layer_colors,8,3               ## @layer_colors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_init_kb                 ; -- Begin function matrix_init_kb
	.p2align	2
_matrix_init_kb:                        ; @matrix_init_kb
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_eeprom_is_valid
Lloh0:
	adrp	x20, _fled_mode@GOTPAGE
Lloh1:
	ldr	x20, [x20, _fled_mode@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EEPROM_FRONTLED_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEPROM_FRONTLED_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_eeprom_read_byte
Lloh5:
	adrp	x8, _fled_val@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fled_val@GOTPAGEOFF]
Lloh7:
	str	wzr, [x8]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _FLED_RGB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FLED_RGB@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x20]
Lloh11:
	adrp	x8, _FLED_VAL_STEP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FLED_VAL_STEP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
Lloh14:
	adrp	x9, _fled_val@GOTPAGE
Lloh15:
	ldr	x9, [x9, _fled_val@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
	bl	_eeprom_update_conf
LBB0_3:
Lloh17:
	adrp	x19, _fleds@GOTPAGE
Lloh18:
	ldr	x19, [x19, _fleds@GOTPAGEOFF]
	ldr	x3, [x19]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	bl	_setrgb
	ldr	x8, [x19]
	add	x3, x8, #4
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	bl	_setrgb
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _FLED_INDI@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FLED_INDI@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	bl	_host_keyboard_leds
Lloh22:
	adrp	x8, _USB_LED_CAPS_LOCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USB_LED_CAPS_LOCK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_6
; %bb.5:
Lloh25:
	adrp	x8, _FLED_CAPS_H@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FLED_CAPS_H@GOTPAGEOFF]
Lloh27:
	adrp	x9, _FLED_CAPS_S@GOTPAGE
Lloh28:
	ldr	x9, [x9, _FLED_CAPS_S@GOTPAGEOFF]
Lloh29:
	ldr	x0, [x8]
Lloh30:
	ldr	w1, [x9]
Lloh31:
	adrp	x8, _fled_val@GOTPAGE
Lloh32:
	ldr	x8, [x8, _fled_val@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	x3, [x19]
	bl	_sethsv
LBB0_6:
Lloh34:
	adrp	x8, _layer_state@GOTPAGE
Lloh35:
	ldr	x8, [x8, _layer_state@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_biton32
Lloh37:
	adrp	x8, _lc_size@GOTPAGE
Lloh38:
	ldr	x8, [x8, _lc_size@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	cmp	x0, x8
	b.hs	LBB0_9
; %bb.7:
Lloh40:
	adrp	x8, _layer_colors@GOTPAGE
Lloh41:
	ldr	x8, [x8, _layer_colors@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x8]
	lsl	x8, x0, #4
	ldr	x8, [x9, x8]
	cbz	x8, LBB0_9
; %bb.8:
	add	x9, x9, x0, lsl #4
	ldr	w1, [x9, #8]
Lloh43:
	adrp	x9, _fled_val@GOTPAGE
Lloh44:
	ldr	x9, [x9, _fled_val@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x9]
	ldr	x9, [x19]
	add	x3, x9, #4
	mov	x0, x8
	bl	_sethsv
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_matrix_init_user
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_FRONTLED_ADDR,4,2       ; @EEPROM_FRONTLED_ADDR
	.comm	_fled_mode,8,3                  ; @fled_mode
	.comm	_FLED_VAL_STEP,4,2              ; @FLED_VAL_STEP
	.comm	_fled_val,4,2                   ; @fled_val
	.comm	_FLED_RGB,8,3                   ; @FLED_RGB
	.comm	_fleds,8,3                      ; @fleds
	.comm	_FLED_INDI,8,3                  ; @FLED_INDI
	.comm	_USB_LED_CAPS_LOCK,4,2          ; @USB_LED_CAPS_LOCK
	.comm	_FLED_CAPS_H,8,3                ; @FLED_CAPS_H
	.comm	_FLED_CAPS_S,4,2                ; @FLED_CAPS_S
	.comm	_layer_state,4,2                ; @layer_state
	.comm	_lc_size,8,3                    ; @lc_size
	.comm	_layer_colors,8,3               ; @layer_colors
.subsections_via_symbols
