	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matrix_keypad_parse_keymap
_matrix_keypad_parse_keymap:            ## @matrix_keypad_parse_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rcx), %r12
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, %edi
	callq	_get_count_order
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	shll	%cl, %r14d
	testq	%rbx, %rbx
	leaq	L_.str(%rip), %r15
	cmovneq	%rbx, %r15
	movq	%r12, %rbx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_device_property_count_u32
	movl	%eax, %r12d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	cmpl	%r14d, %r12d
	jbe	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_15
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	testl	%r12d, %r12d
	cmovnel	%r12d, %r13d
	jmp	LBB0_15
LBB0_4:
	movq	%rbx, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$4, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	callq	_device_property_read_u32_array
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_15
LBB0_7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	xorl	%ebx, %ebx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %r8d
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_matrix_keypad_map_key
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_8
## %bb.12:
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_13:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_14:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_15:
	movl	%r13d, %eax
	addq	$40, %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	"linux,keymap"

L_.str.1:                               ## @.str.1
	.asciz	"missing or malformed property %s: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"%s size overflow (%d vs max %u)\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"failed to read %s property: %d\n"

	.no_dead_strip	_matrix_keypad_parse_keymap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matrix_keypad_parse_keymap
_matrix_keypad_parse_keymap:            ; @matrix_keypad_parse_keymap
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x24, [x3]
	mov	x0, x2
	bl	_get_count_order
	mov	x22, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x23, #0
	csel	x25, x8, x23, eq
	mov	x0, x24
	mov	x1, x25
	bl	_device_property_count_u32
	mov	x26, x0
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	lsl	w8, w21, w22
	cmp	w26, w8
	b.ls	LBB0_4
; %bb.2:
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	mov	x3, x26
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	mov	x3, x26
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w26, #0
	csneg	w27, w26, w8, ne
	b	LBB0_15
LBB0_4:
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x26
	mov	w1, #4
	bl	_kmalloc_array
	cbz	x0, LBB0_7
; %bb.5:
	mov	x23, x0
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x3, x26
	bl	_device_property_read_u32_array
	cbz	w0, LBB0_9
; %bb.6:
	mov	x27, x0
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	mov	x3, x27
	bl	_dev_err
	b	LBB0_14
LBB0_7:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_15
LBB0_9:
	mov	w24, w26
	mov	x25, x23
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w4, [x25]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_matrix_keypad_map_key
	cbz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x25, x25, #4
	subs	x24, x24, #1
	b.ne	LBB0_10
; %bb.12:
	mov	w27, #0
	b	LBB0_14
LBB0_13:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w27, w8
LBB0_14:
	mov	x0, x23
	bl	_kfree
LBB0_15:
	mov	x0, x27
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"linux,keymap"

l_.str.1:                               ; @.str.1
	.asciz	"missing or malformed property %s: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"%s size overflow (%d vs max %u)\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"failed to read %s property: %d\n"

	.no_dead_strip	_matrix_keypad_parse_keymap
.subsections_via_symbols
