	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgblight_mode_eeprom_helper    ## -- Begin function rgblight_mode_eeprom_helper
	.p2align	4, 0x90
_rgblight_mode_eeprom_helper:           ## @rgblight_mode_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_rgblight_config@GOTPCREL(%rip), %rbx
	cmpl	$0, 20(%rbx)
	je	LBB0_5
## %bb.1:
	movq	_RGBLIGHT_MODES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%edi, %ecx
	cmovgel	%edi, %ecx
	testl	%edi, %edi
	movl	$1, %eax
	cmovgl	%ecx, %eax
	movl	%eax, (%rbx)
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movl	16(%rbx), %edi
	callq	_eeconfig_update_rgblight
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
LBB0_4:
	callq	_xprintf
	movl	12(%rbx), %edi
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_rgblight_sethsv_noeeprom       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_rgblight_config,24,2           ## @rgblight_config
	.comm	_RGBLIGHT_MODES,4,2             ## @RGBLIGHT_MODES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rgblight mode [EEPROM]: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"rgblight mode [NOEEPROM]: %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgblight_mode_eeprom_helper    ; -- Begin function rgblight_mode_eeprom_helper
	.p2align	2
_rgblight_mode_eeprom_helper:           ; @rgblight_mode_eeprom_helper
	.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
Lloh0:
	adrp	x19, _rgblight_config@GOTPAGE
Lloh1:
	ldr	x19, [x19, _rgblight_config@GOTPAGEOFF]
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _RGBLIGHT_MODES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RGBLIGHT_MODES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w0
	csel	w8, w8, w0, lt
	cmp	w0, #1
	csinc	w8, w8, wzr, ge
	str	w8, [x19]
	cbz	w1, LBB0_4
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_eeconfig_update_rgblight
	ldr	w1, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x8
LBB0_5:
	bl	_xprintf
	ldp	w1, w0, [x19, #8]
	ldr	w2, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rgblight_sethsv_noeeprom
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_rgblight_config,24,2           ; @rgblight_config
	.comm	_RGBLIGHT_MODES,4,2             ; @RGBLIGHT_MODES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rgblight mode [EEPROM]: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"rgblight mode [NOEEPROM]: %u\n"

.subsections_via_symbols
