	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rave_sp_pwrbutton_probe
_rave_sp_pwrbutton_probe:               ## @rave_sp_pwrbutton_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_input_set_capability
	movq	%r12, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:
	movq	%r12, 8(%r15)
	movq	_rave_sp_power_button_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	$128, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_rave_sp_register_event_notifier ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	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	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_rave_sp_power_button_event,4,2 ## @rave_sp_power_button_event
	.no_dead_strip	_rave_sp_pwrbutton_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rave_sp_pwrbutton_probe
_rave_sp_pwrbutton_probe:               ; @rave_sp_pwrbutton_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	x22, x0
	add	x19, x0, #4
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w8, [x22]
	str	w8, [x0]
Lloh3:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_input_set_capability
	mov	x0, x21
	bl	_input_register_device
	cbnz	w0, LBB0_5
; %bb.3:
	str	x21, [x20, #8]
Lloh9:
	adrp	x8, _rave_sp_power_button_event@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rave_sp_power_button_event@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #128
	stp	w9, w8, [x20]
	mov	x0, x19
	mov	x1, x20
	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
	b	_devm_rave_sp_register_event_notifier
LBB0_4:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_rave_sp_power_button_event,4,2 ; @rave_sp_power_button_event
	.no_dead_strip	_rave_sp_pwrbutton_probe
.subsections_via_symbols
