	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function samsung_keypad_report
_samsung_keypad_report:                 ## @samsung_keypad_report
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	24(%rbx), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rbx), %rdi
	callq	_input_sync
	movl	(%rbx), %eax
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	orl	%edx, %r14d
	incq	%r12
	movl	%eax, %ecx
	cmpq	%rcx, %r12
	jae	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%r12,4), %edx
	movq	8(%rbx), %rcx
	movl	(%rcx,%r12,4), %ecx
	xorl	%edx, %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	16(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_dev_dbg
	movl	40(%rbx), %edx
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_MATRIX_SCAN_CODE
	movl	%eax, %r12d
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r12d, %ecx
	callq	_input_event
	movq	32(%rbx), %rax
	movl	%r12d, %ecx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_input_report_key
	movl	16(%rbx), %eax
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	incl	%r15d
	cmpl	%eax, %r15d
	jae	LBB0_11
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$1, %r14d
	movl	%r15d, %ecx
	shll	%cl, %r14d
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	btl	%r15d, %ecx
	jae	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	andl	(%rax,%r12,4), %r14d
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_9
LBB0_1:
	xorl	%r14d, %r14d
LBB0_13:
	movq	8(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_memcpy
	movl	%r14d, %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	"key %s, row: %d, col: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"pressed"

L_.str.2:                               ## @.str.2
	.asciz	"released"

	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.no_dead_strip	_samsung_keypad_report
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function samsung_keypad_report
_samsung_keypad_report:                 ; @samsung_keypad_report
	.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, x1
	mov	x21, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x22, #0
	mov	w20, #0
	ldr	x23, [x21, #24]
	mov	w28, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x21, #24]
	bl	_input_sync
	ldr	w8, [x21]
	ldr	w11, [sp, #12]                  ; 4-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	orr	w20, w11, w20
	add	x22, x22, #1
	cmp	x22, w8, uxtw
	b.hs	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	lsl	x9, x22, #2
	ldr	w11, [x19, x9]
	ldr	x10, [x21, #8]
	ldr	w9, [x10, x9]
	eor	w24, w9, w11
	cbz	w24, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w11, [sp, #12]                  ; 4-byte Folded Spill
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w25, w25, #1
	cmp	w25, w8
	b.hs	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w9, w28, w25
	tst	w9, w24
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w8, [x19, x22, lsl #2]
	ldr	x0, [x21, #24]
	ands	w26, w8, w9
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x2, x9, x8, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x25
	mov	x4, x22
	bl	_dev_dbg
	ldr	w2, [x21, #40]
	mov	x0, x25
	mov	x1, x22
	bl	_MATRIX_SCAN_CODE
	mov	x27, x0
Lloh6:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x3, x27
	bl	_input_event
	ldr	x8, [x21, #32]
	ldr	w1, [x8, w27, uxtw #2]
	mov	x0, x23
	mov	x2, x26
	bl	_input_report_key
	ldr	w8, [x21, #16]
	b	LBB0_7
LBB0_10:
	mov	w20, #0
LBB0_11:
	ldr	x0, [x21, #8]
	mov	x1, x19
	mov	w2, #8
	bl	_memcpy
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key %s, row: %d, col: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"pressed"

l_.str.2:                               ; @.str.2
	.asciz	"released"

	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.no_dead_strip	_samsung_keypad_report
.subsections_via_symbols
