	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __pmic8xxx_kp_scan_matrix
___pmic8xxx_kp_scan_matrix:             ## @__pmic8xxx_kp_scan_matrix
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%rdx,%r12,4), %ecx
	xorl	(%r15,%r12,4), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	testl	%edi, %edi
	jle	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_dev_dbg
	movq	_PM8XXX_ROW_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_MATRIX_SCAN_CODE
	movl	%eax, %r13d
	movl	8(%rbx), %edi
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %ecx
	callq	_input_event
	movl	8(%rbx), %edi
	movq	16(%rbx), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	(%r15,%r12,4), %eax
	xorl	%edx, %edx
	btl	%r14d, %eax
	setae	%dl
	callq	_input_report_key
	movl	8(%rbx), %edi
	callq	_input_sync
	movl	4(%rbx), %edi
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	incl	%r14d
	cmpl	%edi, %r14d
	jge	LBB0_10
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	btl	%r14d, %ecx
	jae	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	leaq	L_.str.1(%rip), %r8
	andl	(%r15,%r12,4), %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	leaq	L_.str.2(%rip), %r8
	jmp	LBB0_8
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"key [%d:%d] %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"pressed"

L_.str.2:                               ## @.str.2
	.asciz	"released"

	.comm	_PM8XXX_ROW_SHIFT,4,2           ## @PM8XXX_ROW_SHIFT
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.no_dead_strip	___pmic8xxx_kp_scan_matrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __pmic8xxx_kp_scan_matrix
___pmic8xxx_kp_scan_matrix:             ; @__pmic8xxx_kp_scan_matrix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	x22, #0
	mov	w26, #1
Lloh0:
	adrp	x28, _MSC_SCAN@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MSC_SCAN@GOTPAGEOFF]
Lloh2:
	adrp	x23, l_.str@PAGE
Lloh3:
	add	x23, x23, l_.str@PAGEOFF
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	lsl	x19, x22, #2
	ldr	w9, [x20, x19]
	ldr	w10, [x2, x19]
	eor	w27, w10, w9
	cbz	w27, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21, #4]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w24, w24, #1
	cmp	w24, w9
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w8, w26, w24
	tst	w8, w27
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w0, [x21, #24]
	ldr	w9, [x20, x19]
	tst	w9, w8
Lloh4:
	adrp	x8, l_.str.2@PAGE
Lloh5:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh6:
	adrp	x9, l_.str.1@PAGE
Lloh7:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x4, x9, x8, eq
	mov	x1, x23
	mov	x2, x22
	mov	x3, x24
	bl	_dev_dbg
Lloh8:
	adrp	x8, _PM8XXX_ROW_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PM8XXX_ROW_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_MATRIX_SCAN_CODE
	mov	x25, x0
	ldr	w0, [x21, #8]
Lloh11:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x28]
	mov	x3, x25
	bl	_input_event
	ldr	x8, [x21, #16]
	ldr	w1, [x8, w25, sxtw #2]
	ldr	w0, [x21, #8]
	ldr	w8, [x20, x19]
	mvn	w8, w8
	lsr	w8, w8, w24
	and	w2, w8, #0x1
	bl	_input_report_key
	ldr	w0, [x21, #8]
	bl	_input_sync
	ldr	w9, [x21, #4]
	b	LBB0_7
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key [%d:%d] %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"pressed"

l_.str.2:                               ; @.str.2
	.asciz	"released"

	.comm	_PM8XXX_ROW_SHIFT,4,2           ; @PM8XXX_ROW_SHIFT
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.no_dead_strip	___pmic8xxx_kp_scan_matrix
.subsections_via_symbols
