	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_layer_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_biton32
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ergodox_board_led_off
	movl	_matrix_scan_user.leds.0(%rip), %eax
	xorl	%ecx, %ecx
	cmpl	$255, %eax
	setl	%cl
	xorl	%edx, %edx
	testl	%eax, %eax
	setg	%dl
	negl	%edx
	cmpl	$1, %ebx
	cmovnel	%edx, %ecx
	addl	%eax, %ecx
	movl	%ecx, _matrix_scan_user.leds.0(%rip)
	movl	$1, %edi
	je	LBB0_2
## %bb.1:
	callq	_ergodox_right_led_on
	movl	_matrix_scan_user.leds.0(%rip), %esi
	movl	$1, %edi
	callq	_ergodox_right_led_set
	jmp	LBB0_3
LBB0_2:
	callq	_ergodox_right_led_off
LBB0_3:
	movl	_matrix_scan_user.leds.1(%rip), %eax
	xorl	%ecx, %ecx
	cmpl	$255, %eax
	setl	%cl
	xorl	%edx, %edx
	testl	%eax, %eax
	setg	%dl
	negl	%edx
	cmpl	$2, %ebx
	cmovnel	%edx, %ecx
	addl	%eax, %ecx
	movl	%ecx, _matrix_scan_user.leds.1(%rip)
	movl	$2, %edi
	je	LBB0_5
## %bb.4:
	callq	_ergodox_right_led_on
	movl	_matrix_scan_user.leds.1(%rip), %esi
	movl	$2, %edi
	callq	_ergodox_right_led_set
	jmp	LBB0_6
LBB0_5:
	callq	_ergodox_right_led_off
LBB0_6:
	movl	_matrix_scan_user.leds.2(%rip), %eax
	xorl	%ecx, %ecx
	cmpl	$255, %eax
	setl	%cl
	xorl	%edx, %edx
	testl	%eax, %eax
	setg	%dl
	negl	%edx
	cmpl	$3, %ebx
	cmovnel	%edx, %ecx
	addl	%eax, %ecx
	movl	%ecx, _matrix_scan_user.leds.2(%rip)
	movl	$3, %edi
	je	LBB0_8
## %bb.7:
	callq	_ergodox_right_led_on
	movl	_matrix_scan_user.leds.2(%rip), %esi
	movl	$3, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ergodox_right_led_set          ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ergodox_right_led_off          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_matrix_scan_user.leds.0,4,4 ## @matrix_scan_user.leds.0
.zerofill __DATA,__bss,_matrix_scan_user.leds.1,4,3 ## @matrix_scan_user.leds.1
.zerofill __DATA,__bss,_matrix_scan_user.leds.2,4,4 ## @matrix_scan_user.leds.2
	.comm	_layer_state,4,2                ## @layer_state
.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	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	x8, _layer_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _layer_state@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_biton32
	mov	x19, x0
	bl	_ergodox_board_led_off
	adrp	x20, _matrix_scan_user.leds.0@PAGE
	ldr	w8, [x20, _matrix_scan_user.leds.0@PAGEOFF]
	cmp	w8, #255
	cset	w9, lt
	cmp	w8, #0
	csetm	w10, gt
	cmp	w19, #1
	csel	w9, w9, w10, eq
	adds	w8, w8, w9
	str	w8, [x20, _matrix_scan_user.leds.0@PAGEOFF]
	mov	w0, #1
	b.eq	LBB0_2
; %bb.1:
	bl	_ergodox_right_led_on
	ldr	w1, [x20, _matrix_scan_user.leds.0@PAGEOFF]
	mov	w0, #1
	bl	_ergodox_right_led_set
	b	LBB0_3
LBB0_2:
	bl	_ergodox_right_led_off
LBB0_3:
	adrp	x20, _matrix_scan_user.leds.1@PAGE
	ldr	w8, [x20, _matrix_scan_user.leds.1@PAGEOFF]
	cmp	w8, #255
	cset	w9, lt
	cmp	w8, #0
	csetm	w10, gt
	cmp	w19, #2
	csel	w9, w9, w10, eq
	adds	w8, w8, w9
	str	w8, [x20, _matrix_scan_user.leds.1@PAGEOFF]
	mov	w0, #2
	b.eq	LBB0_5
; %bb.4:
	bl	_ergodox_right_led_on
	ldr	w1, [x20, _matrix_scan_user.leds.1@PAGEOFF]
	mov	w0, #2
	bl	_ergodox_right_led_set
	b	LBB0_6
LBB0_5:
	bl	_ergodox_right_led_off
LBB0_6:
	adrp	x20, _matrix_scan_user.leds.2@PAGE
	ldr	w8, [x20, _matrix_scan_user.leds.2@PAGEOFF]
	cmp	w8, #255
	cset	w9, lt
	cmp	w8, #0
	csetm	w10, gt
	cmp	w19, #3
	csel	w9, w9, w10, eq
	adds	w8, w8, w9
	str	w8, [x20, _matrix_scan_user.leds.2@PAGEOFF]
	mov	w0, #3
	b.eq	LBB0_8
; %bb.7:
	bl	_ergodox_right_led_on
	ldr	w1, [x20, _matrix_scan_user.leds.2@PAGEOFF]
	mov	w0, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ergodox_right_led_set
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ergodox_right_led_off
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_matrix_scan_user.leds.0,4,2 ; @matrix_scan_user.leds.0
.zerofill __DATA,__bss,_matrix_scan_user.leds.1,4,2 ; @matrix_scan_user.leds.1
.zerofill __DATA,__bss,_matrix_scan_user.leds.2,4,2 ; @matrix_scan_user.leds.2
	.comm	_layer_state,4,2                ; @layer_state
.subsections_via_symbols
