	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgb_matrix_task                ## -- Begin function rgb_matrix_task
	.p2align	4, 0x90
_rgb_matrix_task:                       ## @rgb_matrix_task
	.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	_rgb_task_timers
	movq	_g_suspend_state@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_RGB_DISABLE_WHEN_USB_SUSPENDED@GOTPCREL(%rip), %rax
	movb	$1, %bl
	cmpq	$0, (%rax)
	jne	LBB0_5
LBB0_2:
	movq	_RGB_DISABLE_AFTER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	movq	_g_rgb_counters@GOTPCREL(%rip), %rcx
	imull	$1200, %eax, %eax               ## imm = 0x4B0
	cmpl	%eax, (%rcx)
	setg	%bl
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_rgb_matrix_config@GOTPCREL(%rip), %rcx
	movl	4(%rcx), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	(%rcx), %eax
LBB0_7:
	xorl	%edi, %edi
	testb	%bl, %bl
	cmovel	%eax, %edi
	movq	_rgb_task_state@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_13
## %bb.8:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	xorl	%eax, %eax
	callq	_rgb_task_sync
	testb	%bl, %bl
	jne	LBB0_14
	jmp	LBB0_15
LBB0_9:
	xorl	%eax, %eax
	callq	_rgb_task_start
	testb	%bl, %bl
	jne	LBB0_14
	jmp	LBB0_15
LBB0_10:
	callq	_rgb_task_render
LBB0_13:
	testb	%bl, %bl
	je	LBB0_15
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	callq	_rgb_task_flush
	testb	%bl, %bl
	jne	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_rgb_matrix_indicators          ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_g_suspend_state,8,3            ## @g_suspend_state
	.comm	_RGB_DISABLE_WHEN_USB_SUSPENDED,8,3 ## @RGB_DISABLE_WHEN_USB_SUSPENDED
	.comm	_RGB_DISABLE_AFTER_TIMEOUT,4,2  ## @RGB_DISABLE_AFTER_TIMEOUT
	.comm	_g_rgb_counters,4,2             ## @g_rgb_counters
	.comm	_rgb_matrix_config,8,2          ## @rgb_matrix_config
	.comm	_rgb_task_state,4,2             ## @rgb_task_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgb_matrix_task                ; -- Begin function rgb_matrix_task
	.p2align	2
_rgb_matrix_task:                       ; @rgb_matrix_task
	.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	_rgb_task_timers
Lloh0:
	adrp	x8, _g_suspend_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_suspend_state@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _RGB_DISABLE_WHEN_USB_SUSPENDED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RGB_DISABLE_WHEN_USB_SUSPENDED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _RGB_DISABLE_AFTER_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RGB_DISABLE_AFTER_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
Lloh9:
	adrp	x9, _g_rgb_counters@GOTPAGE
Lloh10:
	ldr	x9, [x9, _g_rgb_counters@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	w10, #1200
	mul	w8, w8, w10
	cmp	w9, w8
	cset	w19, gt
	b	LBB0_5
LBB0_3:
	mov	w19, #1
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
Lloh12:
	adrp	x8, _rgb_matrix_config@GOTPAGE
Lloh13:
	ldr	x8, [x8, _rgb_matrix_config@GOTPAGEOFF]
	ldp	w8, w9, [x8]
	cmp	w9, #0
	cset	w9, ne
	bics	wzr, w9, w19
	csel	w0, w8, wzr, ne
Lloh14:
	adrp	x8, _rgb_task_state@GOTPAGE
Lloh15:
	ldr	x8, [x8, _rgb_task_state@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.6:
Lloh17:
	adrp	x9, lJTI0_0@PAGE
Lloh18:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	bl	_rgb_task_sync
	tbnz	w19, #0, LBB0_11
	b	LBB0_13
LBB0_8:
	bl	_rgb_task_start
	tbnz	w19, #0, LBB0_11
	b	LBB0_13
LBB0_9:
	bl	_rgb_task_render
LBB0_10:
	tbz	w19, #0, LBB0_13
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	_rgb_task_flush
	tbnz	w19, #0, LBB0_11
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rgb_matrix_indicators
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_12-LBB0_7)>>2
                                        ; -- End function
	.comm	_g_suspend_state,8,3            ; @g_suspend_state
	.comm	_RGB_DISABLE_WHEN_USB_SUSPENDED,8,3 ; @RGB_DISABLE_WHEN_USB_SUSPENDED
	.comm	_RGB_DISABLE_AFTER_TIMEOUT,4,2  ; @RGB_DISABLE_AFTER_TIMEOUT
	.comm	_g_rgb_counters,4,2             ; @g_rgb_counters
	.comm	_rgb_matrix_config,8,2          ; @rgb_matrix_config
	.comm	_rgb_task_state,4,2             ; @rgb_task_state
.subsections_via_symbols
