	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_lockedBLLevel@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_12
## %bb.1:
	movq	_rlocked@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_llocked@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_12
## %bb.2:
	movq	_counter@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	_breathPulse@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_3
## %bb.11:
	incl	%eax
	movl	%eax, (%r15)
	jmp	LBB0_19
LBB0_12:
	movq	_resetBL@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_19
## %bb.13:
	xorl	%eax, %eax
	callq	_get_backlight_level
	cmpq	(%r15), %rax
	je	LBB0_18
## %bb.14:
	movq	_BACKLIGHT_LEVELS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	js	LBB0_18
## %bb.15:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_backlight_step
	xorl	%eax, %eax
	callq	_get_backlight_level
	cmpq	(%r15), %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	1(%rbx), %eax
	cmpl	(%r12), %ebx
	movl	%eax, %ebx
	jl	LBB0_16
LBB0_18:
	movl	$0, (%r14)
	jmp	LBB0_19
LBB0_3:
	movl	$0, (%r15)
	movq	_breathUp@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_backlight_increase
	jmp	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	callq	_backlight_decrease
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_get_backlight_level
	movq	_currentBL@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_BACKLIGHT_LEVELS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%eax, %ecx
	jle	LBB0_9
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	$1, %ebx
LBB0_9:
	movl	%ebx, (%r14)
	movq	_breathPulseStall@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	negl	%ecx
	movl	%ecx, (%r15)
LBB0_10:
	movq	_resetBL@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_19:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lockedBLLevel,8,3              ## @lockedBLLevel
	.comm	_rlocked,8,3                    ## @rlocked
	.comm	_llocked,8,3                    ## @llocked
	.comm	_counter,4,2                    ## @counter
	.comm	_breathPulse,4,2                ## @breathPulse
	.comm	_breathUp,4,2                   ## @breathUp
	.comm	_currentBL,4,2                  ## @currentBL
	.comm	_BACKLIGHT_LEVELS,4,2           ## @BACKLIGHT_LEVELS
	.comm	_breathPulseStall,4,2           ## @breathPulseStall
	.comm	_resetBL,4,2                    ## @resetBL
.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x19, _lockedBLLevel@GOTPAGE
Lloh1:
	ldr	x19, [x19, _lockedBLLevel@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _rlocked@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rlocked@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _llocked@GOTPAGE
Lloh6:
	ldr	x9, [x9, _llocked@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_4
; %bb.2:
Lloh8:
	adrp	x19, _counter@GOTPAGE
Lloh9:
	ldr	x19, [x19, _counter@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _breathPulse@GOTPAGE
Lloh11:
	ldr	x9, [x9, _breathPulse@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.3:
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_19
LBB0_4:
Lloh13:
	adrp	x20, _resetBL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _resetBL@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_19
; %bb.5:
	bl	_get_backlight_level
	ldr	x8, [x19]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.6:
Lloh15:
	adrp	x21, _BACKLIGHT_LEVELS@GOTPAGE
Lloh16:
	ldr	x21, [x21, _BACKLIGHT_LEVELS@GOTPAGEOFF]
	ldr	w8, [x21]
	tbnz	w8, #31, LBB0_9
; %bb.7:
	mov	w22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	bl	_backlight_step
	add	w23, w22, #1
	bl	_get_backlight_level
	ldr	x8, [x19]
	ldr	w9, [x21]
	cmp	x0, x8
	ccmp	w22, w9, #0, ne
	mov	x22, x23
	b.lt	LBB0_8
LBB0_9:
	str	wzr, [x20]
	b	LBB0_19
LBB0_10:
	str	wzr, [x19]
Lloh17:
	adrp	x20, _breathUp@GOTPAGE
Lloh18:
	ldr	x20, [x20, _breathUp@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_12
; %bb.11:
	bl	_backlight_increase
	b	LBB0_13
LBB0_12:
	bl	_backlight_decrease
LBB0_13:
	bl	_get_backlight_level
Lloh19:
	adrp	x8, _currentBL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _currentBL@GOTPAGEOFF]
Lloh21:
	str	w0, [x8]
Lloh22:
	adrp	x8, _BACKLIGHT_LEVELS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BACKLIGHT_LEVELS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_16
; %bb.14:
	cbnz	w0, LBB0_18
; %bb.15:
	mov	w9, #1
	b	LBB0_17
LBB0_16:
	mov	w9, #0
LBB0_17:
	str	w9, [x20]
Lloh25:
	adrp	x9, _breathPulseStall@GOTPAGE
Lloh26:
	ldr	x9, [x9, _breathPulseStall@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mneg	w8, w8, w9
	str	w8, [x19]
LBB0_18:
Lloh28:
	adrp	x8, _resetBL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _resetBL@GOTPAGEOFF]
	mov	w9, #1
Lloh30:
	str	w9, [x8]
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_lockedBLLevel,8,3              ; @lockedBLLevel
	.comm	_rlocked,8,3                    ; @rlocked
	.comm	_llocked,8,3                    ; @llocked
	.comm	_counter,4,2                    ; @counter
	.comm	_breathPulse,4,2                ; @breathPulse
	.comm	_breathUp,4,2                   ; @breathUp
	.comm	_currentBL,4,2                  ; @currentBL
	.comm	_BACKLIGHT_LEVELS,4,2           ; @BACKLIGHT_LEVELS
	.comm	_breathPulseStall,4,2           ; @breathPulseStall
	.comm	_resetBL,4,2                    ; @resetBL
.subsections_via_symbols
