	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk805_pwrkey_probe
_rk805_pwrkey_probe:                    ## @rk805_pwrkey_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, %rbx
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rbx)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_input_set_capability
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%rbx, %r13
	addq	$16, %r13
	movq	_pwrkey_fall_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	L_.str.3(%rip), %r8
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %r9
	callq	_devm_request_any_context_irq
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	_pwrkey_rise_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	L_.str.5(%rip), %r8
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%rbx, %r9
	callq	_devm_request_any_context_irq
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_4:
	movl	%r12d, %r15d
	jmp	LBB0_13
LBB0_6:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_7
LBB0_9:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rsi
LBB0_7:
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't allocate power button\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"rk805 pwrkey"

L_.str.2:                               ## @.str.2
	.asciz	"rk805_pwrkey/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_pwrkey_fall_irq,4,2            ## @pwrkey_fall_irq
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.3:                               ## @.str.3
	.asciz	"rk805_pwrkey_fall"

L_.str.4:                               ## @.str.4
	.asciz	"Can't register fall irq: %d\n"

	.comm	_pwrkey_rise_irq,4,2            ## @pwrkey_rise_irq
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
L_.str.5:                               ## @.str.5
	.asciz	"rk805_pwrkey_rise"

L_.str.6:                               ## @.str.6
	.asciz	"Can't register rise irq: %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Can't register power button: %d\n"

	.no_dead_strip	_rk805_pwrkey_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk805_pwrkey_probe
_rk805_pwrkey_probe:                    ; @rk805_pwrkey_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	_devm_input_allocate_device
	cbz	x0, LBB0_7
; %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	x8, _BUS_HOST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x0, #20]
Lloh7:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_input_set_capability
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_platform_get_irq
	mov	x22, x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
	add	x23, x20, #16
Lloh13:
	adrp	x8, _pwrkey_fall_irq@GOTPAGE
Lloh14:
	ldr	x8, [x8, _pwrkey_fall_irq@GOTPAGEOFF]
Lloh15:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	ldr	w8, [x9]
Lloh19:
	adrp	x24, _IRQF_ONESHOT@GOTPAGE
Lloh20:
	ldr	x24, [x24, _IRQF_ONESHOT@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w3, w9, w8
Lloh21:
	adrp	x4, l_.str.3@PAGE
Lloh22:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x0, x23
	mov	x1, x21
	mov	x5, x20
	bl	_devm_request_any_context_irq
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh23:
	adrp	x8, _pwrkey_rise_irq@GOTPAGE
Lloh24:
	ldr	x8, [x8, _pwrkey_rise_irq@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x8, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x24]
	orr	w3, w9, w8
Lloh29:
	adrp	x4, l_.str.5@PAGE
Lloh30:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x23
	mov	x1, x22
	mov	x5, x20
	bl	_devm_request_any_context_irq
	tbnz	w0, #31, LBB0_10
; %bb.5:
	mov	x0, x20
	bl	_input_register_device
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.6:
	str	x21, [sp]
Lloh31:
	adrp	x1, l_.str.7@PAGE
Lloh32:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_11
LBB0_7:
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_8:
	mov	x21, x22
	b	LBB0_13
LBB0_9:
	mov	x21, x0
	str	x21, [sp]
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_13
LBB0_10:
	mov	x21, x0
	str	x21, [sp]
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate power button\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"rk805 pwrkey"

l_.str.2:                               ; @.str.2
	.asciz	"rk805_pwrkey/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_pwrkey_fall_irq,4,2            ; @pwrkey_fall_irq
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.3:                               ; @.str.3
	.asciz	"rk805_pwrkey_fall"

l_.str.4:                               ; @.str.4
	.asciz	"Can't register fall irq: %d\n"

	.comm	_pwrkey_rise_irq,4,2            ; @pwrkey_rise_irq
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
l_.str.5:                               ; @.str.5
	.asciz	"rk805_pwrkey_rise"

l_.str.6:                               ; @.str.6
	.asciz	"Can't register rise irq: %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Can't register power button: %d\n"

	.no_dead_strip	_rk805_pwrkey_probe
.subsections_via_symbols
