	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_keysc_isr
_sh_keysc_isr:                          ## @sh_keysc_isr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	$-1, -56(%rbp)                  ## 8-byte Folded Spill
	movq	_KYCR2_OFFS@GOTPCREL(%rip), %r14
	movq	_sh_keysc_mode@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	notq	%r15
	movq	(%r12), %rax
	movq	24(%rbx), %rdx
	movl	(%rax,%rdx,8), %ecx
	imull	4(%rax,%rdx,8), %ecx
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	movslq	%eax, %rdx
	andq	%r15, %rdx
	andq	%rdx, -56(%rbp)                 ## 8-byte Folded Spill
	orq	%rdx, -48(%rbp)                 ## 8-byte Folded Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_ioread16
	testb	$1, %al
	je	LBB0_8
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	_KYCR2_IRQ_DISABLED@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edi
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite16
	movq	(%r12), %rax
	movq	24(%rbx), %rcx
	cmpl	$0, (%rax,%rcx,8)
	jle	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$3, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	notb	%al
	movq	_KYOUTDR_OFFS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movzbl	%al, %edi
	callq	_iowrite16
	movq	48(%rbx), %rdi
	callq	_udelay
	movq	_KYINDR_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	callq	_ioread16
	movzbl	%al, %eax
	movq	(%r12), %rdx
	movq	24(%rbx), %rsi
	movl	4(%rdx,%rsi,8), %ecx
	imull	%r14d, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cltq
	orq	%rax, %r15
	incl	%r14d
	addl	$2, %r13d
	cmpl	(%rdx,%rsi,8), %r14d
	jl	LBB0_4
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r15d, %r15d
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_KYOUTDR_OFFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_iowrite16
	movq	_KYCR2_IRQ_LEVEL@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edi
	movq	_KYCR2_OFFS@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite16
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	callq	_udelay
	jmp	LBB0_7
LBB0_8:
	movq	(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_SH_KEYSC_MAXKEYS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_17
## %bb.9:
	xorl	%r12d, %r12d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r12
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jge	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rax
	movl	(%rax,%r12,4), %r13d
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	movslq	%eax, %r15
	movq	(%rbx), %rax
	xorq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	testq	%r15, %rax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	8(%rbx), %edi
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_input_event
	orq	%r15, (%rbx)
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	testq	%r15, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	8(%rbx), %edi
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_input_event
	notq	%r15
	andq	%r15, (%rbx)
	jmp	LBB0_16
LBB0_17:
	movl	8(%rbx), %edi
	callq	_input_sync
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %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	"isr!\n"

	.comm	_KYCR2_IRQ_DISABLED,1,0         ## @KYCR2_IRQ_DISABLED
	.comm	_KYCR2_OFFS,8,3                 ## @KYCR2_OFFS
	.comm	_sh_keysc_mode,8,3              ## @sh_keysc_mode
	.comm	_KYOUTDR_OFFS,8,3               ## @KYOUTDR_OFFS
	.comm	_KYINDR_OFFS,8,3                ## @KYINDR_OFFS
	.comm	_KYCR2_IRQ_LEVEL,1,0            ## @KYCR2_IRQ_LEVEL
L_.str.1:                               ## @.str.1
	.asciz	"keys 0x%08lx\n"

L_.str.2:                               ## @.str.2
	.asciz	"last_keys 0x%08lx keys0 0x%08lx keys1 0x%08lx\n"

	.comm	_SH_KEYSC_MAXKEYS,4,2           ## @SH_KEYSC_MAXKEYS
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sh_keysc_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_keysc_isr
_sh_keysc_isr:                          ; @sh_keysc_isr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x0, x1
	bl	_platform_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	mov	x0, x20
	bl	_dev_dbg
	mov	x22, #0
	mov	x23, #-1
Lloh2:
	adrp	x20, _KYCR2_OFFS@GOTPAGE
Lloh3:
	ldr	x20, [x20, _KYCR2_OFFS@GOTPAGEOFF]
Lloh4:
	adrp	x26, _sh_keysc_mode@GOTPAGE
Lloh5:
	ldr	x26, [x26, _sh_keysc_mode@GOTPAGEOFF]
	mov	w27, #3
Lloh6:
	adrp	x28, _KYOUTDR_OFFS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _KYOUTDR_OFFS@GOTPAGEOFF]
Lloh8:
	adrp	x24, _KYINDR_OFFS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _KYINDR_OFFS@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x26]
	ldr	x9, [x19, #24]
	add	x8, x8, x9, lsl #3
	ldp	w8, w9, [x8]
	mul	w8, w8, w9
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	sxtw	x8, w8
	bic	x8, x8, x21
	and	x23, x8, x23
	orr	x22, x8, x22
	str	x8, [sp]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread16
	tbz	w0, #0, LBB0_8
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
Lloh12:
	adrp	x8, _KYCR2_IRQ_DISABLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KYCR2_IRQ_DISABLED@GOTPAGEOFF]
	ldrb	w0, [x8]
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_iowrite16
	ldr	x8, [x26]
	ldr	x9, [x19, #24]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w20, #0
	mov	x21, #0
	mov	w25, #0
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w8, w27, w20
	mvn	w8, w8
	ldr	x9, [x19, #16]
	ldr	x10, [x28]
	add	x1, x10, x9
	and	w0, w8, #0xff
	bl	_iowrite16
	ldr	x0, [x19, #48]
	bl	_udelay
	ldr	x8, [x19, #16]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_ioread16
	and	w8, w0, #0xff
	ldr	x9, [x26]
	ldr	x10, [x19, #24]
	add	x9, x9, x10, lsl #3
	ldp	w9, w10, [x9]
	mul	w10, w10, w25
	lsl	w8, w8, w10
	sxtw	x8, w8
	orr	x21, x21, x8
	add	w25, w25, #1
	add	w20, w20, #2
	cmp	w25, w9
	b.lt	LBB0_4
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, #0
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x28]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite16
Lloh14:
	adrp	x8, _KYCR2_IRQ_LEVEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KYCR2_IRQ_LEVEL@GOTPAGEOFF]
	ldrb	w0, [x8]
	ldr	x8, [x19, #16]
Lloh16:
	adrp	x20, _KYCR2_OFFS@GOTPAGE
Lloh17:
	ldr	x20, [x20, _KYCR2_OFFS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_iowrite16
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_udelay
	b	LBB0_1
LBB0_8:
	ldr	x8, [x19]
	stp	x22, x23, [sp, #8]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_dev_dbg
Lloh20:
	adrp	x21, _SH_KEYSC_MAXKEYS@GOTPAGE
Lloh21:
	ldr	x21, [x21, _SH_KEYSC_MAXKEYS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.9:
	mov	x24, #0
	mov	w25, #1
Lloh22:
	adrp	x26, _EV_KEY@GOTPAGE
Lloh23:
	ldr	x26, [x26, _EV_KEY@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x21]
	cmp	x24, x8
	b.ge	LBB0_17
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	w20, [x8, x24, lsl #2]
	cbz	w20, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	lsl	w8, w25, w24
	sxtw	x27, w8
	ldr	x8, [x19]
	eor	x8, x8, x22
	tst	x8, x27
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	tst	x22, x27
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x19, #8]
	ldr	w1, [x26]
	mov	x2, x20
	mov	w3, #1
	bl	_input_event
	ldr	x8, [x19]
	orr	x8, x8, x27
	str	x8, [x19]
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	tst	x23, x27
	b.ne	LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x19, #8]
	ldr	w1, [x26]
	mov	x2, x20
	mov	w3, #0
	bl	_input_event
	ldr	x8, [x19]
	bic	x8, x8, x27
	str	x8, [x19]
	b	LBB0_10
LBB0_17:
	ldr	w0, [x19, #8]
	bl	_input_sync
Lloh24:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"isr!\n"

	.comm	_KYCR2_IRQ_DISABLED,1,0         ; @KYCR2_IRQ_DISABLED
	.comm	_KYCR2_OFFS,8,3                 ; @KYCR2_OFFS
	.comm	_sh_keysc_mode,8,3              ; @sh_keysc_mode
	.comm	_KYOUTDR_OFFS,8,3               ; @KYOUTDR_OFFS
	.comm	_KYINDR_OFFS,8,3                ; @KYINDR_OFFS
	.comm	_KYCR2_IRQ_LEVEL,1,0            ; @KYCR2_IRQ_LEVEL
l_.str.1:                               ; @.str.1
	.asciz	"keys 0x%08lx\n"

l_.str.2:                               ; @.str.2
	.asciz	"last_keys 0x%08lx keys0 0x%08lx keys1 0x%08lx\n"

	.comm	_SH_KEYSC_MAXKEYS,4,2           ; @SH_KEYSC_MAXKEYS
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sh_keysc_isr
.subsections_via_symbols
