	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi65xx_powerkey_probe
_hi65xx_powerkey_probe:                 ## @hi65xx_powerkey_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, %r14
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r15)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 8(%r15)
	movq	_EV_KEY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_input_set_capability
	movl	(%rbx), %esi
	movq	_KEY_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_input_set_capability
	movq	_hi65xx_irq_info@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	callq	_platform_get_irq_byname
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,8), %r8d
	movl	4(%rax,%rbx,8), %edx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %r9
	callq	_devm_request_any_context_irq
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_8:
	movq	%r15, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r13d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r13d
	movq	(%r12), %rax
	movl	(%rax,%rbx,8), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%r13d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %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	"failed to allocate input device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"hisi_on/input0"

L_.str.2:                               ## @.str.2
	.asciz	"HISI 65xx PowerOn Key"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_KEY_RESTART,4,2                ## @KEY_RESTART
	.comm	_hi65xx_irq_info,8,3            ## @hi65xx_irq_info
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.3:                               ## @.str.3
	.asciz	"couldn't request irq %s: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to register input device: %d\n"

	.no_dead_strip	_hi65xx_powerkey_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi65xx_powerkey_probe
_hi65xx_powerkey_probe:                 ; @hi65xx_powerkey_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
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
	stp	x8, x9, [x0]
Lloh4:
	adrp	x21, _EV_KEY@GOTPAGE
Lloh5:
	ldr	x21, [x21, _EV_KEY@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh6:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_input_set_capability
	ldr	w1, [x21]
Lloh9:
	adrp	x8, _KEY_RESTART@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KEY_RESTART@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_input_set_capability
Lloh12:
	adrp	x22, _hi65xx_irq_info@GOTPAGE
Lloh13:
	ldr	x22, [x22, _hi65xx_irq_info@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x23, #0
	mov	x24, #0
Lloh14:
	adrp	x25, _IRQF_ONESHOT@GOTPAGE
Lloh15:
	ldr	x25, [x25, _IRQF_ONESHOT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	w1, [x8, x23]
	mov	x0, x19
	bl	_platform_get_irq_byname
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w3, [x25]
	ldp	w4, w2, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x5, x20
	bl	_devm_request_any_context_irq
	tbnz	w0, #31, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	x23, x23, #8
	cmp	x24, w0, sxtw
	b.lt	LBB0_3
LBB0_6:
	mov	x0, x20
	bl	_input_register_device
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.7:
	str	x21, [sp]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_11
LBB0_8:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_9:
	mov	x21, x0
	ldr	x8, [x22]
	ldr	w8, [x8, x23]
	stp	x8, x21, [sp]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate input device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"hisi_on/input0"

l_.str.2:                               ; @.str.2
	.asciz	"HISI 65xx PowerOn Key"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_KEY_RESTART,4,2                ; @KEY_RESTART
	.comm	_hi65xx_irq_info,8,3            ; @hi65xx_irq_info
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.3:                               ; @.str.3
	.asciz	"couldn't request irq %s: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to register input device: %d\n"

	.no_dead_strip	_hi65xx_powerkey_probe
.subsections_via_symbols
