	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm355evm_keys_irq
_dm355evm_keys_irq:                     ## @dm355evm_keys_irq
	.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	%rsi, %r15
	movq	_DM355EVM_MSP_INPUT_HIGH@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_dm355evm_msp_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_DM355EVM_MSP_INPUT_LOW@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, _dm355evm_keys_irq.last_event(%rip)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	callq	_dm355evm_msp_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_4
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_dm355evm_msp_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	shll	$8, %r12d
	orl	%r12d, %ebx
	cmpl	$57005, %ebx                    ## imm = 0xDEAD
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	_dm355evm_keys_irq.last_event(%rip), %ebx
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, _dm355evm_keys_irq.last_event(%rip)
	andl	$-2049, %ebx                    ## imm = 0xF7FF
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_sparse_keymap_entry_from_scancode
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_KEY_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %r12d
	movl	4(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r15), %edi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_input_report_key
	movl	(%r15), %edi
	callq	_input_sync
	movl	(%r15), %edi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movl	(%r15), %edi
	callq	_input_sync
	jmp	LBB0_10
LBB0_4:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	jmp	LBB0_5
LBB0_3:
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
LBB0_5:
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_6:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_dm355evm_keys_irq.last_event,4,2 ## @dm355evm_keys_irq.last_event
	.comm	_DM355EVM_MSP_INPUT_HIGH,4,2    ## @DM355EVM_MSP_INPUT_HIGH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input high err %d\n"

	.comm	_DM355EVM_MSP_INPUT_LOW,4,2     ## @DM355EVM_MSP_INPUT_LOW
L_.str.1:                               ## @.str.1
	.asciz	"input low err %d\n"

	.comm	_KEY_UNKNOWN,4,2                ## @KEY_UNKNOWN
L_.str.2:                               ## @.str.2
	.asciz	"input event 0x%04x--> keycode %d\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_dm355evm_keys_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm355evm_keys_irq
_dm355evm_keys_irq:                     ; @dm355evm_keys_irq
	.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
Lloh0:
	adrp	x23, _DM355EVM_MSP_INPUT_HIGH@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DM355EVM_MSP_INPUT_HIGH@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_dm355evm_msp_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.1:
Lloh2:
	adrp	x24, _DM355EVM_MSP_INPUT_LOW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DM355EVM_MSP_INPUT_LOW@GOTPAGEOFF]
	mov	w25, #57005
	adrp	x26, _dm355evm_keys_irq.last_event@PAGE
Lloh4:
	adrp	x27, _KEY_UNKNOWN@GOTPAGE
Lloh5:
	ldr	x27, [x27, _KEY_UNKNOWN@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str.2@PAGE
Lloh7:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x26, _dm355evm_keys_irq.last_event@PAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	bl	_dm355evm_msp_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_dm355evm_msp_read
	mov	x2, x0
	tbnz	w0, #31, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	orr	w8, w2, w21, lsl #8
	cmp	w8, w25
	b.eq	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26, _dm355evm_keys_irq.last_event@PAGEOFF]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x26, _dm355evm_keys_irq.last_event@PAGEOFF]
	and	w21, w8, #0xfffff7ff
	ldr	w0, [x19]
	mov	x1, x21
	bl	_sparse_keymap_entry_from_scancode
	cmp	x0, #0
	csel	x8, x27, x0, eq
	ldr	w22, [x8]
	ldr	w0, [x19, #4]
	str	x22, [sp]
	mov	x1, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w0, [x19]
	mov	x1, x22
	mov	w2, #1
	bl	_input_report_key
	ldr	w0, [x19]
	bl	_input_sync
	ldr	w0, [x19]
	mov	x1, x22
	mov	w2, #0
	bl	_input_report_key
	ldr	w0, [x19]
	bl	_input_sync
	b	LBB0_3
LBB0_8:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	bl	_dev_dbg
LBB0_11:
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_dm355evm_keys_irq.last_event,4,2 ; @dm355evm_keys_irq.last_event
	.comm	_DM355EVM_MSP_INPUT_HIGH,4,2    ; @DM355EVM_MSP_INPUT_HIGH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input high err %d\n"

	.comm	_DM355EVM_MSP_INPUT_LOW,4,2     ; @DM355EVM_MSP_INPUT_LOW
l_.str.1:                               ; @.str.1
	.asciz	"input low err %d\n"

	.comm	_KEY_UNKNOWN,4,2                ; @KEY_UNKNOWN
l_.str.2:                               ; @.str.2
	.asciz	"input event 0x%04x--> keycode %d\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_dm355evm_keys_irq
.subsections_via_symbols
