	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_power_button_probe
_cpcap_power_button_probe:              ## @cpcap_power_button_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_devm_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_dev_get_regmap
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r14, 8(%r15)
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rdi)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%rdi)
	movq	%r14, 16(%rdi)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_input_set_capability
	movq	_powerbutton_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, (%rsp)
	leaq	L_.str.2(%rip), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	js	LBB0_7
## %bb.9:
	movq	(%r15), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpcap-pwrbutton"

L_.str.1:                               ## @.str.1
	.asciz	"cpcap-pwrbutton/input0"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_powerbutton_irq,4,2            ## @powerbutton_irq
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.2:                               ## @.str.2
	.asciz	"cpcap_pwrbutton"

L_.str.3:                               ## @.str.3
	.asciz	"IRQ request failed: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Input register failed: %d\n"

	.no_dead_strip	_cpcap_power_button_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_power_button_probe
_cpcap_power_button_probe:              ; @cpcap_power_button_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	w1, #0
	bl	_platform_get_irq
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #24
	bl	_devm_kmalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_devm_input_allocate_device
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x19]
	mov	x1, #0
	bl	_dev_get_regmap
	str	w0, [x20, #16]
	cbz	w0, LBB0_9
; %bb.3:
	str	x19, [x20, #8]
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	ldr	x0, [x20]
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
	stp	x8, x9, [x0]
	str	x19, [x0, #16]
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
Lloh13:
	adrp	x8, _powerbutton_irq@GOTPAGE
Lloh14:
	ldr	x8, [x8, _powerbutton_irq@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
Lloh16:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
Lloh19:
	adrp	x5, l_.str.2@PAGE
Lloh20:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	x0, [x20]
	bl	_input_register_device
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.5:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_6:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_10:
	mov	x21, x0
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_8
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpcap-pwrbutton"

l_.str.1:                               ; @.str.1
	.asciz	"cpcap-pwrbutton/input0"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_powerbutton_irq,4,2            ; @powerbutton_irq
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.2:                               ; @.str.2
	.asciz	"cpcap_pwrbutton"

l_.str.3:                               ; @.str.3
	.asciz	"IRQ request failed: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Input register failed: %d\n"

	.no_dead_strip	_cpcap_power_button_probe
.subsections_via_symbols
