	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_keysc_probe
_sh_keysc_probe:                        ## @sh_keysc_probe
	.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	%rdi, %r12
	callq	_dev_get_platdata
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_ENXIO@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_23
## %bb.6:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rbx
	addq	$16, %rbx
	movq	%r12, %rdi
	callq	_dev_get_platdata
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$24, %edx
	callq	_memcpy
	movl	(%r13), %ebx
	movq	%r13, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap_nocache
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r13
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movq	64(%r13), %rcx
	movl	%eax, (%rcx)
	movl	4(%r12), %eax
	movl	%eax, 56(%r13)
	leaq	L_.str.5(%rip), %rax
	movq	%rax, (%r13)
	movq	%r12, 48(%r13)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r13)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 32(%r13)
	movl	$256, 40(%r13)                  ## imm = 0x100
	movq	32(%r14), %rdi
	movq	%rdi, 24(%r13)
	movl	$4, 8(%r13)
	callq	_ARRAY_SIZE
	movl	%eax, 16(%r13)
	movq	_sh_keysc_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_dev_name
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	movq	%r12, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.19:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	jmp	LBB0_20
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	jmp	LBB0_23
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	jmp	LBB0_22
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_13:
	movq	_SH_KEYSC_MAXKEYS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	movl	12(%r13), %esi
	callq	___set_bit
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %esi
	callq	___clear_bit
	movq	%r13, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	callq	_free_irq
LBB0_20:
	movq	%r13, %rdi
	callq	_input_free_device
LBB0_21:
	movq	(%r14), %rdi
	callq	_iounmap
LBB0_22:
	movq	%r14, %rdi
	callq	_kfree
LBB0_23:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%r12, %rdi
	callq	_pm_runtime_enable
	movq	%r12, %rdi
	callq	_pm_runtime_get_sync
	movq	_KYCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sh_keysc_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r14), %rcx
	movl	(%rax,%rcx,4), %edx
	shll	$8, %edx
	orl	24(%r14), %edx
	movq	%r14, %rdi
	callq	_sh_keysc_write
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sh_keysc_level_mode
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no platform data defined\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to get I/O memory\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate driver data\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"failed to remap I/O memory\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate input device\n"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
L_.str.5:                               ## @.str.5
	.asciz	"sh-keysc-keys/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_sh_keysc_isr,4,2               ## @sh_keysc_isr
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.6:                               ## @.str.6
	.asciz	"failed to request IRQ\n"

	.comm	_SH_KEYSC_MAXKEYS,4,2           ## @SH_KEYSC_MAXKEYS
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
L_.str.7:                               ## @.str.7
	.asciz	"failed to register input device\n"

	.comm	_KYCR1,4,2                      ## @KYCR1
	.comm	_sh_keysc_mode,8,3              ## @sh_keysc_mode
	.no_dead_strip	_sh_keysc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_keysc_probe
_sh_keysc_probe:                        ; @sh_keysc_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_dev_get_platdata
	cbz	w0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x24, _ENXIO@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ENXIO@GOTPAGEOFF]
	ldr	w8, [x24]
	neg	w23, w8
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_10
; %bb.2:
	mov	x22, x0
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_22
; %bb.3:
	mov	x21, x0
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	add	x23, x20, #16
	mov	x0, x19
	bl	_dev_get_platdata
	mov	x1, x0
	mov	x0, x23
	mov	w2, #24
	bl	_memcpy
	ldr	w23, [x22]
	mov	x0, x22
	bl	_resource_size
	mov	x1, x0
	mov	x0, x23
	bl	_ioremap_nocache
	str	x0, [x20]
	cbz	x0, LBB0_12
; %bb.5:
	bl	_input_allocate_device
	str	x0, [x20, #8]
	cbz	x0, LBB0_13
; %bb.6:
	mov	x22, x0
Lloh8:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_BIT_MASK
	ldr	x8, [x22, #64]
	str	w0, [x8]
	ldr	w8, [x19, #4]
	str	w8, [x22, #56]
Lloh11:
	adrp	x8, l_.str.5@PAGE
Lloh12:
	add	x8, x8, l_.str.5@PAGEOFF
	str	x8, [x22]
	str	x19, [x22, #48]
Lloh13:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	movi.2s	v0, #1
	str	d0, [x22, #32]
	mov	w9, #256
	stp	w9, w8, [x22, #40]
	ldr	x0, [x20, #32]
	str	x0, [x22, #24]
	mov	w8, #4
	str	w8, [x22, #8]
	bl	_ARRAY_SIZE
	str	w0, [x22, #16]
Lloh16:
	adrp	x8, _sh_keysc_isr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _sh_keysc_isr@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
Lloh19:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh21:
	ldr	w24, [x8]
	mov	x0, x19
	bl	_dev_name
	mov	x4, x0
	mov	x0, x21
	mov	x1, #0
	mov	x2, x23
	mov	x3, x24
	mov	x5, x19
	bl	_request_threaded_irq
	cbz	w0, LBB0_14
; %bb.7:
	mov	x23, x0
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_19
LBB0_8:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_22
LBB0_10:
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_22
LBB0_11:
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x24]
	neg	w23, w8
	b	LBB0_21
LBB0_13:
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_20
LBB0_14:
Lloh41:
	adrp	x23, _SH_KEYSC_MAXKEYS@GOTPAGE
Lloh42:
	ldr	x23, [x23, _SH_KEYSC_MAXKEYS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.15:
	mov	x24, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	ldr	w0, [x8, x24, lsl #2]
	ldr	w1, [x22, #12]
	bl	___set_bit
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_16
LBB0_17:
Lloh43:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh44:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	ldr	w1, [x22, #12]
	bl	___clear_bit
	mov	x0, x22
	bl	_input_register_device
	mov	x23, x0
	cbz	w0, LBB0_23
; %bb.18:
Lloh46:
	adrp	x1, l_.str.7@PAGE
Lloh47:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
	mov	x1, x19
	bl	_free_irq
LBB0_19:
	mov	x0, x22
	bl	_input_free_device
LBB0_20:
	ldr	x0, [x20]
	bl	_iounmap
LBB0_21:
	mov	x0, x20
	bl	_kfree
LBB0_22:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	bl	_pm_runtime_get_sync
Lloh48:
	adrp	x8, _KYCR1@GOTPAGE
Lloh49:
	ldr	x8, [x8, _KYCR1@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	adrp	x8, _sh_keysc_mode@GOTPAGE
Lloh52:
	ldr	x8, [x8, _sh_keysc_mode@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	ldr	w8, [x8, x9, lsl #2]
	ldr	w9, [x20, #24]
	orr	w2, w9, w8, lsl #8
	mov	x0, x20
	bl	_sh_keysc_write
	mov	x0, x20
	mov	w1, #0
	bl	_sh_keysc_level_mode
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no platform data defined\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to get I/O memory\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate driver data\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"failed to remap I/O memory\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate input device\n"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
l_.str.5:                               ; @.str.5
	.asciz	"sh-keysc-keys/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_sh_keysc_isr,4,2               ; @sh_keysc_isr
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.6:                               ; @.str.6
	.asciz	"failed to request IRQ\n"

	.comm	_SH_KEYSC_MAXKEYS,4,2           ; @SH_KEYSC_MAXKEYS
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
l_.str.7:                               ; @.str.7
	.asciz	"failed to register input device\n"

	.comm	_KYCR1,4,2                      ; @KYCR1
	.comm	_sh_keysc_mode,8,3              ; @sh_keysc_mode
	.no_dead_strip	_sh_keysc_probe
.subsections_via_symbols
