	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_kb                 ## -- Begin function matrix_scan_kb
	.p2align	4, 0x90
_matrix_scan_kb:                        ## @matrix_scan_kb
	.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	_RTCD1@GOTPCREL(%rip), %rdi
	movq	_last_timespec@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	callq	_rtcGetTime
	movslq	(%rbx), %rax
	imulq	$1172812403, %rax, %rax         ## imm = 0x45E7B273
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$46, %rax
	addl	%ecx, %eax
	cltq
	movq	_last_minute@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	%rax, (%rcx)
	movq	_oled_sleeping@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_queue_for_send@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTCD1,4,2                      ## @RTCD1
	.comm	_last_timespec,4,2              ## @last_timespec
	.comm	_last_minute,8,3                ## @last_minute
	.comm	_oled_sleeping,4,2              ## @oled_sleeping
	.comm	_queue_for_send,4,2             ## @queue_for_send
	.comm	_DISPLAYOFF,4,2                 ## @DISPLAYOFF
	.comm	_OLED_OFF,8,3                   ## @OLED_OFF
	.comm	_ScreenOffInterval,8,3          ## @ScreenOffInterval
	.comm	_last_flush,4,2                 ## @last_flush
	.comm	_oled_mode,8,3                  ## @oled_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_kb                 ; -- Begin function matrix_scan_kb
	.p2align	2
_matrix_scan_kb:                        ; @matrix_scan_kb
	.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	x0, _RTCD1@GOTPAGE
Lloh1:
	ldr	x0, [x0, _RTCD1@GOTPAGEOFF]
Lloh2:
	adrp	x19, _last_timespec@GOTPAGE
Lloh3:
	ldr	x19, [x19, _last_timespec@GOTPAGEOFF]
	mov	x1, x19
	bl	_rtcGetTime
	ldrsw	x8, [x19]
	mov	w9, #45683
	movk	w9, #17895, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #46
	add	w8, w8, w9
	sxtw	x8, w8
Lloh4:
	adrp	x9, _last_minute@GOTPAGE
Lloh5:
	ldr	x9, [x9, _last_minute@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	x10, x8
	b.eq	LBB0_3
; %bb.1:
	str	x8, [x9]
Lloh6:
	adrp	x8, _oled_sleeping@GOTPAGE
Lloh7:
	ldr	x8, [x8, _oled_sleeping@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbnz	w8, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _queue_for_send@GOTPAGE
Lloh10:
	ldr	x8, [x8, _queue_for_send@GOTPAGEOFF]
	mov	w9, #1
Lloh11:
	str	w9, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RTCD1,4,2                      ; @RTCD1
	.comm	_last_timespec,4,2              ; @last_timespec
	.comm	_last_minute,8,3                ; @last_minute
	.comm	_oled_sleeping,4,2              ; @oled_sleeping
	.comm	_queue_for_send,4,2             ; @queue_for_send
	.comm	_DISPLAYOFF,4,2                 ; @DISPLAYOFF
	.comm	_OLED_OFF,8,3                   ; @OLED_OFF
	.comm	_ScreenOffInterval,8,3          ; @ScreenOffInterval
	.comm	_last_flush,4,2                 ; @last_flush
	.comm	_oled_mode,8,3                  ; @oled_mode
.subsections_via_symbols
