	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backlight_effect_cycle_up_down ## -- Begin function backlight_effect_cycle_up_down
	.p2align	4, 0x90
_backlight_effect_cycle_up_down:        ## @backlight_effect_cycle_up_down
	.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	_g_tick@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_g_config@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_BACKLIGHT_LED_COUNT@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_8
## %bb.1:
	movzbl	%al, %r12d
	movq	_g_config@GOTPCREL(%rip), %rax
	movl	16(%rax), %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_g_key_hit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$144, %ecx
	addq	%rcx, %rax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %eax
	shll	$2, %eax
	movl	$63, %r13d
	subl	%eax, %r13d
	cmpl	$64, %eax
	movl	$0, %eax
	cmovgel	%eax, %r13d
	movl	%ebx, %edi
	leaq	-48(%rbp), %rsi
	callq	_map_led_to_point
	movl	-48(%rbp), %edi
	addl	%r12d, %edi
	addl	%r13d, %edi
	movabsq	$1095216660480, %rax            ## imm = 0xFF00000000
	orq	%rax, %rdi
	movl	%r15d, %esi
	callq	_hsv_to_rgb
	movq	%rax, %rcx
	shrq	$32, %rcx
	movl	%ebx, %edi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_backlight_set_color
	incq	%rbx
	movq	_BACKLIGHT_LED_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$42, %ebx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$67, %ebx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_g_key_hit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r14, %rax
	movq	_g_config@GOTPCREL(%rip), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$68, %rbx
	je	LBB0_6
	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	_g_tick,4,2                     ## @g_tick
	.comm	_g_config,24,3                  ## @g_config
	.comm	_BACKLIGHT_LED_COUNT,4,2        ## @BACKLIGHT_LED_COUNT
	.comm	_g_key_hit,8,3                  ## @g_key_hit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backlight_effect_cycle_up_down ; -- Begin function backlight_effect_cycle_up_down
	.p2align	2
_backlight_effect_cycle_up_down:        ; @backlight_effect_cycle_up_down
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, _BACKLIGHT_LED_COUNT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BACKLIGHT_LED_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, #0
	mov	x19, #0
Lloh2:
	adrp	x8, _g_tick@GOTPAGE
Lloh3:
	ldr	x8, [x8, _g_tick@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x23, _g_config@GOTPAGE
Lloh6:
	ldr	x23, [x23, _g_config@GOTPAGEOFF]
	ldr	w9, [x23]
	lsl	w8, w8, w9
	and	w24, w8, #0xff
	ldr	w25, [x23, #16]
Lloh7:
	adrp	x26, _g_key_hit@GOTPAGE
Lloh8:
	ldr	x26, [x26, _g_key_hit@GOTPAGEOFF]
	mov	w27, #63
                                        ; implicit-def: $x20
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	add	x8, x8, #144
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x8]
	lsl	w8, w8, #2
	sub	w9, w27, w8
	cmp	w8, #64
	csel	w28, w9, wzr, lt
	add	x1, sp, #8
	mov	x0, x19
	bl	_map_led_to_point
	ldr	w8, [sp, #8]
	add	w8, w8, w24
	add	w8, w8, w28
	orr	x0, x8, #0xff00000000
	and	x8, x20, #0xffffffff00000000
	orr	x20, x8, x25
	mov	x1, x20
	bl	_hsv_to_rgb
	mov	x3, x0
	lsr	x2, x0, #32
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_backlight_set_color
	add	x19, x19, #1
	ldrsw	x8, [x21]
	add	x22, x22, #4
	cmp	x19, x8
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w19, #42
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, #67
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	add	x8, x8, x22
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x19, #68
	b.eq	LBB0_2
	b	LBB0_3
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_g_tick,4,2                     ; @g_tick
	.comm	_g_config,24,3                  ; @g_config
	.comm	_BACKLIGHT_LED_COUNT,4,2        ; @BACKLIGHT_LED_COUNT
	.comm	_g_key_hit,8,3                  ; @g_key_hit
.subsections_via_symbols
