	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_keypad_build_keymap     ## -- Begin function matrix_keypad_build_keymap
	.p2align	4, 0x90
_matrix_keypad_build_keymap:            ## @matrix_keypad_build_keymap
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, %edi
	callq	_get_count_order
	movl	%eax, %r12d
	movl	%r13d, %r14d
	movl	%r12d, %ecx
	shll	%cl, %r14d
	xorl	%edi, %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, 32(%r15)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, (%r12)
	movl	$2, 8(%r12)
	movq	%r14, 16(%r12)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%r12), %esi
	callq	___set_bit
	testq	%r15, %r15
	je	LBB0_11
## %bb.5:
	cmpl	$0, (%r15)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	jle	LBB0_12
## %bb.6:
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %r8d
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_matrix_keypad_map_key
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	jl	LBB0_8
	jmp	LBB0_12
LBB0_11:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_matrix_keypad_parse_keymap
	testl	%eax, %eax
	jne	LBB0_13
LBB0_12:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r12), %esi
	callq	___clear_bit
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate memory for keymap"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_keypad_build_keymap     ; -- Begin function matrix_keypad_build_keymap
	.p2align	2
_matrix_keypad_build_keymap:            ; @matrix_keypad_build_keymap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x5
	mov	x25, x4
	mov	x20, x3
	mov	x21, x2
	mov	x24, x1
	mov	x22, x0
	mov	x0, x3
	bl	_get_count_order
	mov	x23, x0
	ldr	w8, [x19, #32]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	lsl	w26, w21, w23
	cbnz	x25, LBB0_6
; %bb.5:
	ldr	w0, [x19, #32]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x1, x26
	mov	w2, #2
	bl	_devm_kcalloc
	mov	x25, x0
	cbz	x0, LBB0_13
LBB0_6:
	str	x25, [x19]
	mov	w8, #2
	str	w8, [x19, #8]
	str	x26, [x19, #16]
Lloh5:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19, #28]
	bl	___set_bit
	cbz	x22, LBB0_11
; %bb.7:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x24, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w4, [x8, x24, lsl #2]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x23
	bl	_matrix_keypad_map_key
	cbz	w0, LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.lt	LBB0_9
	b	LBB0_12
LBB0_11:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_matrix_keypad_parse_keymap
	cbnz	w0, LBB0_3
LBB0_12:
Lloh8:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x19, #24]
	bl	___clear_bit
	mov	w0, #0
	b	LBB0_3
LBB0_13:
	ldr	w0, [x19, #32]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate memory for keymap"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
.subsections_via_symbols
