	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backlight_effect_gradient_up_down ## -- Begin function backlight_effect_gradient_up_down
	.p2align	4, 0x90
_backlight_effect_gradient_up_down:     ## @backlight_effect_gradient_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_config@GOTPCREL(%rip), %rsi
	movl	12(%rsi), %eax
	subl	(%rsi), %eax
	leal	256(%rax), %ecx
	cmpl	$-127, %eax
	cmovgel	%eax, %ecx
	leal	-256(%rax), %edx
	cmpl	$127, %eax
	cmovgl	%edx, %ecx
	leal	3(%rcx), %r13d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r13d
	movl	16(%rsi), %eax
	subl	4(%rsi), %eax
	leal	3(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	movq	_BACKLIGHT_LED_COUNT@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.1:
	movq	_g_config@GOTPCREL(%rip), %rax
	movl	8(%rax), %r14d
	sarl	$2, %r13d
	sarl	$2, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	leaq	-48(%rbp), %rsi
	callq	_map_led_to_point
	movl	-48(%rbp), %eax
	sarl	$4, %eax
	movl	%eax, %edi
	imull	%r13d, %edi
	movq	_g_config@GOTPCREL(%rip), %rcx
	addl	(%rcx), %edi
	imull	%r15d, %eax
	addl	4(%rcx), %eax
	shlq	$32, %rax
	orq	%rax, %rdi
	movl	%r14d, %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
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_config,20,2                  ## @g_config
	.comm	_BACKLIGHT_LED_COUNT,4,2        ## @BACKLIGHT_LED_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_backlight_effect_gradient_up_down ; -- Begin function backlight_effect_gradient_up_down
	.p2align	2
_backlight_effect_gradient_up_down:     ; @backlight_effect_gradient_up_down
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
Lloh0:
	adrp	x21, _g_config@GOTPAGE
Lloh1:
	ldr	x21, [x21, _g_config@GOTPAGEOFF]
	ldp	w8, w9, [x21]
	ldp	w10, w11, [x21, #12]
	sub	w8, w10, w8
	sub	w10, w8, #256
	add	w12, w8, #256
	cmn	w8, #127
	csel	w12, w12, w8, lt
	cmp	w8, #127
	csel	w8, w10, w12, gt
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	sub	w9, w11, w9
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
Lloh2:
	adrp	x22, _BACKLIGHT_LED_COUNT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _BACKLIGHT_LED_COUNT@GOTPAGEOFF]
	ldr	w10, [x22]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w19, #0
	asr	w23, w8, #2
	asr	w24, w9, #2
	ldr	w25, [x21, #8]
                                        ; implicit-def: $x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_map_led_to_point
	ldr	w8, [sp, #8]
	asr	w8, w8, #4
	ldp	w9, w10, [x21]
	madd	w0, w8, w23, w9
	madd	w8, w8, w24, w10
	bfi	x0, x8, #32, #32
	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	w19, w19, #1
	ldr	w8, [x22]
	cmp	w19, w8
	b.lt	LBB0_2
LBB0_3:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_g_config,20,2                  ; @g_config
	.comm	_BACKLIGHT_LED_COUNT,4,2        ; @BACKLIGHT_LED_COUNT
.subsections_via_symbols
