	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa27x_keypad_build_keycode
_pxa27x_keypad_build_keycode:           ## @pxa27x_keypad_build_keycode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	movq	(%rdi), %r8
	movq	16(%rdi), %r14
	movl	56(%r12), %edi
	movl	48(%r12), %ecx
	movl	52(%r12), %edx
	xorl	%esi, %esi
	movq	%r14, %r9
	callq	_matrix_keypad_build_keymap
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, 8(%r14)
	cmpl	$0, (%r12)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_MAX_MATRIX_KEY_NUM@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movzwl	(%rax,%rbx,2), %edi
	movq	(%r15), %rax
	movslq	(%r13), %rcx
	addq	%rbx, %rcx
	movw	%di, (%rax,%rcx,2)
	movl	(%r14), %esi
	callq	___set_bit
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	cmpq	$0, 40(%r12)
	je	LBB0_9
## %bb.5:
	movzwl	16(%r12), %eax
	testw	%ax, %ax
	je	LBB0_8
## %bb.6:
	cmpw	$0, 18(%r12)
	je	LBB0_8
## %bb.7:
	movq	(%r15), %rcx
	movq	_MAX_MATRIX_KEY_NUM@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rdx
	movw	%ax, (%rcx,%rdx,2)
	movl	(%r14), %esi
	movzwl	%ax, %edi
	callq	___set_bit
	movzwl	18(%r12), %edi
	movq	(%r15), %rax
	movslq	(%rbx), %rcx
	movw	%di, 2(%rax,%rcx,2)
	movl	(%r14), %esi
	callq	___set_bit
	movq	8(%r15), %rax
	movl	$-1, (%rax)
	jmp	LBB0_9
LBB0_8:
	movzwl	20(%r12), %edi
	movq	8(%r15), %rax
	movl	%edi, (%rax)
	movl	4(%r14), %esi
	callq	___set_bit
LBB0_9:
	cmpq	$0, 32(%r12)
	je	LBB0_14
## %bb.10:
	movzwl	22(%r12), %eax
	testw	%ax, %ax
	je	LBB0_13
## %bb.11:
	cmpw	$0, 24(%r12)
	je	LBB0_13
## %bb.12:
	movq	(%r15), %rcx
	movq	_MAX_MATRIX_KEY_NUM@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rdx
	movw	%ax, 4(%rcx,%rdx,2)
	movl	(%r14), %esi
	movzwl	%ax, %edi
	callq	___set_bit
	movzwl	24(%r12), %edi
	movq	(%r15), %rax
	movslq	(%rbx), %rcx
	movw	%di, 6(%rax,%rcx,2)
	movl	(%r14), %esi
	callq	___set_bit
	movq	8(%r15), %rax
	movl	$-1, 4(%rax)
	jmp	LBB0_14
LBB0_13:
	movzwl	26(%r12), %edi
	movq	8(%r15), %rax
	movl	%edi, 4(%rax)
	movl	4(%r14), %esi
	callq	___set_bit
LBB0_14:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	___clear_bit
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ## @MAX_MATRIX_KEY_NUM
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.no_dead_strip	_pxa27x_keypad_build_keycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa27x_keypad_build_keycode
_pxa27x_keypad_build_keycode:           ; @pxa27x_keypad_build_keycode
	.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
	mov	x20, x0
	ldp	x19, x21, [x0, #16]
	ldp	w2, w0, [x21, #52]
	ldr	w3, [x21, #48]
	ldr	x4, [x20]
	mov	x1, #0
	mov	x5, x19
	bl	_matrix_keypad_build_keymap
	cbnz	w0, LBB0_15
; %bb.1:
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	str	w0, [x19, #8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x22, #0
Lloh0:
	adrp	x23, _MAX_MATRIX_KEY_NUM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX_MATRIX_KEY_NUM@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldrh	w0, [x8, x22, lsl #1]
	ldr	x8, [x20]
	ldrsw	x9, [x23]
	add	x9, x22, x9
	strh	w0, [x8, x9, lsl #1]
	ldr	w1, [x19]
	bl	___set_bit
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_9
; %bb.5:
	ldrh	w0, [x21, #16]
	cbz	w0, LBB0_8
; %bb.6:
	ldrh	w8, [x21, #18]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	x8, [x20]
Lloh2:
	adrp	x22, _MAX_MATRIX_KEY_NUM@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MAX_MATRIX_KEY_NUM@GOTPAGEOFF]
	ldrsw	x9, [x22]
	strh	w0, [x8, x9, lsl #1]
	ldr	w1, [x19]
	bl	___set_bit
	ldrh	w0, [x21, #18]
	ldr	x8, [x20]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #1
	strh	w0, [x8, #2]
	ldr	w1, [x19]
	bl	___set_bit
	ldr	x8, [x20, #8]
	mov	w9, #-1
	str	w9, [x8]
	b	LBB0_9
LBB0_8:
	ldrh	w0, [x21, #20]
	ldr	x8, [x20, #8]
	str	w0, [x8]
	ldr	w1, [x19, #4]
	bl	___set_bit
LBB0_9:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_14
; %bb.10:
	ldrh	w0, [x21, #22]
	cbz	w0, LBB0_13
; %bb.11:
	ldrh	w8, [x21, #24]
	cbz	w8, LBB0_13
; %bb.12:
	ldr	x8, [x20]
Lloh4:
	adrp	x22, _MAX_MATRIX_KEY_NUM@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MAX_MATRIX_KEY_NUM@GOTPAGEOFF]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #1
	strh	w0, [x8, #4]
	ldr	w1, [x19]
	bl	___set_bit
	ldrh	w0, [x21, #24]
	ldr	x8, [x20]
	ldrsw	x9, [x22]
	add	x8, x8, x9, lsl #1
	strh	w0, [x8, #6]
	ldr	w1, [x19]
	bl	___set_bit
	ldr	x8, [x20, #8]
	mov	w9, #-1
	str	w9, [x8, #4]
	b	LBB0_14
LBB0_13:
	ldrh	w0, [x21, #26]
	ldr	x8, [x20, #8]
	str	w0, [x8, #4]
	ldr	w1, [x19, #4]
	bl	___set_bit
LBB0_14:
Lloh6:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	___clear_bit
	mov	w0, #0
LBB0_15:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ; @MAX_MATRIX_KEY_NUM
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.no_dead_strip	_pxa27x_keypad_build_keycode
.subsections_via_symbols
