	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_keypad_fire_events
_imx_keypad_fire_events:                ## @imx_keypad_fire_events
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_MAX_MATRIX_KEY_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_MATRIX_KEY_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	(%rbx), %ecx
	btl	%r14d, %ecx
	jae	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movzwl	(%rcx,%r14,2), %ecx
	xorw	(%rdx,%r14,2), %cx
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_MATRIX_KEY_ROWS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movzwl	%cx, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	incl	%r13d
	cmpl	%edx, %r13d
	jge	LBB0_10
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%rbx), %eax
	movl	$1, %r15d
	movl	%r13d, %ecx
	shll	%cl, %r15d
	btl	%r13d, %eax
	jae	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	%r15d, %eax
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_MATRIX_ROW_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_MATRIX_SCAN_CODE
	movl	%eax, %r14d
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %ecx
	callq	_input_event
	movq	24(%rbx), %rax
	movslq	%r14d, %r14
	movl	(%rax,%r14,4), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movzwl	(%rbx,%rax,2), %eax
	andw	%r15w, %ax
	movzwl	%ax, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	movl	(%rax,%r14,4), %edx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	andw	(%rbx,%r14,2), %r15w
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movzwl	%r15w, %ecx
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_MAX_MATRIX_KEY_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_9
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MATRIX_KEY_COLS,4,2        ## @MAX_MATRIX_KEY_COLS
	.comm	_MAX_MATRIX_KEY_ROWS,4,2        ## @MAX_MATRIX_KEY_ROWS
	.comm	_MATRIX_ROW_SHIFT,4,2           ## @MATRIX_ROW_SHIFT
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Event code: %d, val: %d"

	.no_dead_strip	_imx_keypad_fire_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_keypad_fire_events
_imx_keypad_fire_events:                ; @imx_keypad_fire_events
	.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
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x8, _MAX_MATRIX_KEY_COLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_MATRIX_KEY_COLS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x21, x0
	mov	x22, #0
	mov	w28, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh3:
	adrp	x8, _MAX_MATRIX_KEY_COLS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_MATRIX_KEY_COLS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
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
	ldr	w9, [x21]
	lsr	w9, w9, w22
	tbz	w9, #0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #8]
	lsl	x26, x22, #1
	ldrh	w9, [x9, x26]
	ldrh	w10, [x19, x26]
	eor	w23, w10, w9
Lloh6:
	adrp	x9, _MAX_MATRIX_KEY_ROWS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_MATRIX_KEY_ROWS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w23, #0
	ccmp	w9, #1, #8, ne
	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
	ldr	w8, [x21, #16]
	lsl	w27, w28, w24
	and	w8, w8, w27
	and	w10, w27, w23
	cmp	w8, #0
	ccmp	w10, #0, #4, ne
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
Lloh9:
	adrp	x8, _MATRIX_ROW_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MATRIX_ROW_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x1, x22
	bl	_MATRIX_SCAN_CODE
	mov	x25, x0
Lloh12:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x25
	bl	_input_event
	ldr	x8, [x21, #24]
	sbfiz	x25, x25, #2, #32
	ldr	w1, [x8, x25]
	ldrh	w8, [x19, x26]
	and	w8, w8, w27
	and	w2, w8, #0xffff
	mov	x0, x20
	bl	_input_report_key
	ldr	x8, [x21, #24]
	ldr	w2, [x8, x25]
	ldrh	w8, [x19, x26]
	and	w8, w8, w27
	and	w3, w8, #0xffff
	mov	x0, x20
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh20:
	adrp	x8, _MAX_MATRIX_KEY_ROWS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAX_MATRIX_KEY_ROWS@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x8]
	b	LBB0_7
LBB0_10:
	mov	x0, x20
	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
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MATRIX_KEY_COLS,4,2        ; @MAX_MATRIX_KEY_COLS
	.comm	_MAX_MATRIX_KEY_ROWS,4,2        ; @MAX_MATRIX_KEY_ROWS
	.comm	_MATRIX_ROW_SHIFT,4,2           ; @MATRIX_ROW_SHIFT
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Event code: %d, val: %d"

	.no_dead_strip	_imx_keypad_fire_events
.subsections_via_symbols
