	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_user               ## -- Begin function matrix_scan_user
	.p2align	4, 0x90
_matrix_scan_user:                      ## @matrix_scan_user
	.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	_rgb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.2:
	movq	_rc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_14
## %bb.3:
	movq	_speed@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	_t@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	imulq	$715827883, %rax, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	subl	%ecx, %eax
	imull	$42, %eax, %edi
	movq	_led@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	movl	(%r14), %eax
	movl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	imull	$42, %eax, %edi
	movq	(%rbx), %rcx
	addq	$4, %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	movl	(%r14), %eax
	movl	%eax, %ecx
	addl	$2, %ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$2, %eax
	imull	$42, %eax, %edi
	movq	(%rbx), %rcx
	addq	$8, %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	movl	(%r14), %eax
	movl	%eax, %ecx
	addl	$3, %ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$3, %eax
	imull	$42, %eax, %edi
	movq	(%rbx), %rcx
	addq	$12, %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	movl	(%r14), %eax
	movl	%eax, %ecx
	addl	$4, %ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$4, %eax
	imull	$42, %eax, %edi
	movq	(%rbx), %rcx
	addq	$16, %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	movl	(%r14), %eax
	movl	%eax, %ecx
	addl	$5, %ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$5, %eax
	imull	$42, %eax, %edi
	movq	(%rbx), %rcx
	addq	$20, %rcx
	movl	$255, %esi
	movl	$255, %edx
	callq	_sethsv
	xorl	%eax, %eax
	callq	_rgblight_set
	movl	(%r14), %eax
	movl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	jmp	LBB0_13
LBB0_4:
	cmpl	$2, %eax
	jne	LBB0_14
## %bb.5:
	movq	_rc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_14
## %bb.6:
	movq	_speed@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	_col@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	movl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	imulq	$954437177, %rcx, %rcx          ## imm = 0x38E38E39
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$35, %rcx
	addl	%edx, %ecx
	shll	$2, %ecx
	leal	(%rcx,%rcx,8), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%rsi)
	xorl	%ebx, %ebx
	movl	$5, %r13d
	movq	_t@GOTPCREL(%rip), %r12
	movq	_led@GOTPCREL(%rip), %r15
	movq	_right@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, (%r14)
	movl	%ebx, %ecx
	cmovel	%r13d, %ecx
	shlq	$2, %rcx
	addq	(%r15), %rcx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	callq	_sethsv
	incl	%ebx
	addl	$-1, %r13d
	jae	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%r12), %ebx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_col@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cltq
	imulq	$715827883, %rax, %rax          ## imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$32, %rax
	addl	%ecx, %eax
	cltq
	imulq	$715827883, %rax, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	subl	%ecx, %eax
	imull	$42, %eax, %edi
	cmpl	$0, (%r14)
	movl	%ebx, %eax
	cmovel	%r13d, %eax
	movslq	%eax, %rcx
	shlq	$2, %rcx
	addq	(%r15), %rcx
	movl	$255, %esi
	movl	$255, %edx
	jmp	LBB0_10
LBB0_11:
	xorl	%eax, %eax
	callq	_rgblight_set
	movl	(%r12), %eax
	incl	%eax
	cltq
	imulq	$715827883, %rax, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ecx
	subl	%ecx, %eax
	movl	%eax, (%r12)
	jne	LBB0_14
## %bb.12:
	xorl	%eax, %eax
	cmpl	$0, (%r14)
	sete	%al
LBB0_13:
	movl	%eax, (%r14)
LBB0_14:
	movq	_rc@GOTPCREL(%rip), %rax
	decq	(%rax)
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rgb,4,2                        ## @rgb
	.comm	_rc,8,3                         ## @rc
	.comm	_speed,8,3                      ## @speed
	.comm	_t,4,2                          ## @t
	.comm	_led,8,3                        ## @led
	.comm	_col,4,2                        ## @col
	.comm	_right,4,2                      ## @right
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_user               ; -- Begin function matrix_scan_user
	.p2align	2
_matrix_scan_user:                      ; @matrix_scan_user
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _rgb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rgb@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_13
; %bb.1:
Lloh3:
	adrp	x19, _rc@GOTPAGE
Lloh4:
	ldr	x19, [x19, _rc@GOTPAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19]
	cbnz	x8, LBB0_12
; %bb.3:
Lloh5:
	adrp	x8, _speed@GOTPAGE
Lloh6:
	ldr	x8, [x8, _speed@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh8:
	adrp	x20, _t@GOTPAGE
Lloh9:
	ldr	x20, [x20, _t@GOTPAGEOFF]
	ldrsw	x8, [x20]
	mov	w21, #43691
	movk	w21, #10922, lsl #16
	mul	x9, x8, x21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	mov	w22, #6
	msub	w8, w9, w22, w8
	mov	w23, #42
	mul	w0, w8, w23
Lloh10:
	adrp	x24, _led@GOTPAGE
Lloh11:
	ldr	x24, [x24, _led@GOTPAGEOFF]
	ldr	x3, [x24]
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	ldr	w8, [x20]
	add	w8, w8, #1
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	mul	w0, w8, w23
	ldr	x8, [x24]
	add	x3, x8, #4
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	ldr	w8, [x20]
	add	w8, w8, #2
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	mul	w0, w8, w23
	ldr	x8, [x24]
	add	x3, x8, #8
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	ldr	w8, [x20]
	add	w8, w8, #3
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	mul	w0, w8, w23
	ldr	x8, [x24]
	add	x3, x8, #12
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	ldr	w8, [x20]
	add	w8, w8, #4
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	mul	w0, w8, w23
	ldr	x8, [x24]
	add	x3, x8, #16
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	ldr	w8, [x20]
	add	w8, w8, #5
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	mul	w0, w8, w23
	ldr	x8, [x24]
	add	x3, x8, #20
	mov	w1, #255
	mov	w2, #255
	bl	_sethsv
	bl	_rgblight_set
	ldr	w8, [x20]
	add	w8, w8, #1
	smull	x9, w8, w21
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w22, w8
	str	w8, [x20]
	b	LBB0_12
LBB0_4:
	ldr	x9, [x19]
	cmp	w8, #2
	ccmp	x9, #0, #0, eq
	b.ne	LBB0_12
; %bb.5:
	mov	w20, #0
Lloh12:
	adrp	x8, _speed@GOTPAGE
Lloh13:
	ldr	x8, [x8, _speed@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh15:
	adrp	x22, _col@GOTPAGE
Lloh16:
	ldr	x22, [x22, _col@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w8, w8, #1
	mov	w9, #36409
	movk	w9, #14563, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	asr	x9, x9, #35
	add	w9, w9, w10
	mov	w10, #36
	msub	w8, w9, w10, w8
	str	w8, [x22]
	mov	w24, #5
Lloh17:
	adrp	x23, _t@GOTPAGE
Lloh18:
	ldr	x23, [x23, _t@GOTPAGEOFF]
	mov	w25, #43691
	movk	w25, #10922, lsl #16
	mov	w26, #6
	mov	w27, #42
Lloh19:
	adrp	x28, _led@GOTPAGE
Lloh20:
	ldr	x28, [x28, _led@GOTPAGEOFF]
Lloh21:
	adrp	x21, _right@GOTPAGE
Lloh22:
	ldr	x21, [x21, _right@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x28]
	ldr	w9, [x21]
	cmp	w9, #0
	csel	w9, w24, w20, eq
	add	x3, x8, w9, uxtw #2
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_sethsv
	add	w20, w20, #1
	sub	w24, w24, #1
	cmn	w24, #1
	b.eq	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w20, w8
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	sub	w8, w8, #1
	smull	x8, w8, w25
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	smull	x9, w8, w25
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	msub	w8, w9, w26, w8
	mul	w0, w8, w27
	ldr	x8, [x28]
	ldr	w9, [x21]
	cmp	w9, #0
	csel	w9, w24, w20, eq
	add	x3, x8, w9, sxtw #2
	mov	w1, #255
	mov	w2, #255
	b	LBB0_7
LBB0_10:
	bl	_rgblight_set
	ldr	w8, [x23]
	add	w8, w8, #1
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	lsr	x9, x9, #32
	add	w9, w9, w10
	mov	w10, #6
	msub	w8, w9, w10, w8
	str	w8, [x23]
	cbnz	w8, LBB0_12
; %bb.11:
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x21]
LBB0_12:
	ldr	x8, [x19]
	sub	x8, x8, #1
	str	x8, [x19]
LBB0_13:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_rgb,4,2                        ; @rgb
	.comm	_rc,8,3                         ; @rc
	.comm	_speed,8,3                      ; @speed
	.comm	_t,4,2                          ; @t
	.comm	_led,8,3                        ; @led
	.comm	_col,4,2                        ; @col
	.comm	_right,4,2                      ; @right
.subsections_via_symbols
