	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa27x_keypad_scan_direct
_pxa27x_keypad_scan_direct:             ## @pxa27x_keypad_scan_direct
	.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
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	24(%rdi), %r15
	movq	_KPDK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_readl
	movl	%eax, %r14d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%r15)
	jne	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	je	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_pxa27x_keypad_scan_rotary
LBB0_3:
	movl	%r14d, %edi
	callq	_KPDK_DK
	andl	(%rbx), %eax
	movl	4(%rbx), %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %r15d
	je	LBB0_10
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpl	%eax, %ebx
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	btl	%ebx, %r15d
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_MAX_MATRIX_KEY_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %r14
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	%rbx, %r14
	movq	%r12, %rdi
	movl	%r14d, %ecx
	callq	_input_event
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r14,4), %esi
	andl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_input_report_key
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_9:
	movq	%r12, %rdi
	callq	_input_sync
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 4(%rax)
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KPDK,4,2                       ## @KPDK
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ## @MAX_MATRIX_KEY_NUM
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.no_dead_strip	_pxa27x_keypad_scan_direct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa27x_keypad_scan_direct
_pxa27x_keypad_scan_direct:             ; @pxa27x_keypad_scan_direct
	.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
	mov	x19, x0
	ldp	x20, x22, [x0, #16]
Lloh0:
	adrp	x8, _KPDK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KPDK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_keypad_readl
	mov	x21, x0
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_pxa27x_keypad_scan_rotary
LBB0_3:
	mov	x0, x21
	bl	_KPDK_DK
	ldp	w8, w9, [x19]
	and	w23, w8, w0
	eor	w24, w9, w23
	cbz	w24, LBB0_10
; %bb.4:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	mov	x25, #0
	mov	w26, #1
Lloh3:
	adrp	x27, _MSC_SCAN@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MSC_SCAN@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x25, x25, #1
	cmp	w25, w8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w28, w26, w25
	tst	w28, w24
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh5:
	adrp	x8, _MAX_MATRIX_KEY_NUM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_MATRIX_KEY_NUM@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
Lloh8:
	adrp	x9, _EV_MSC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EV_MSC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	ldr	w2, [x27]
	add	x21, x25, x8
	mov	x0, x20
	mov	x3, x21
	bl	_input_event
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	and	w2, w28, w23
	mov	x0, x20
	bl	_input_report_key
	ldr	w8, [x22]
	b	LBB0_6
LBB0_9:
	mov	x0, x20
	bl	_input_sync
	str	w23, [x19, #4]
LBB0_10:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_KPDK,4,2                       ; @KPDK
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ; @MAX_MATRIX_KEY_NUM
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.no_dead_strip	_pxa27x_keypad_scan_direct
.subsections_via_symbols
