	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hotkey_notify_wakeup
_hotkey_notify_wakeup:                  ## @hotkey_notify_wakeup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$1, (%rsi)
	movl	$0, (%rdx)
	addl	$-128, %edi
	cmpl	$5, %edi
	ja	LBB0_1
## %bb.2:
	movl	$9, %eax
	btl	%edi, %eax
	jb	LBB0_5
## %bb.3:
	movl	$18, %eax
	btl	%edi, %eax
	jae	LBB0_7
## %bb.4:
	movq	_TP_ACPI_WAKEUP_BAYEJ@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_TP_ACPI_WAKEUP_UNDOCK@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	movq	_hotkey_wakeup_reason@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, (%rdx)
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_alert
	movq	_hotkey_wakeup_reason@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	movq	_TP_ACPI_WAKEUP_NONE@GOTPCREL(%rip), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_info
	xorl	%eax, %eax
	callq	_hotkey_wakeup_reason_notify_change
	jmp	LBB0_10
LBB0_1:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TP_ACPI_WAKEUP_UNDOCK,8,3      ## @TP_ACPI_WAKEUP_UNDOCK
	.comm	_hotkey_wakeup_reason,8,3       ## @hotkey_wakeup_reason
	.comm	_TP_ACPI_WAKEUP_BAYEJ,8,3       ## @TP_ACPI_WAKEUP_BAYEJ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EMERGENCY WAKEUP: battery almost empty\n"

	.comm	_TP_ACPI_WAKEUP_NONE,8,3        ## @TP_ACPI_WAKEUP_NONE
L_.str.1:                               ## @.str.1
	.asciz	"woke up due to a hot-unplug request...\n"

	.no_dead_strip	_hotkey_notify_wakeup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hotkey_notify_wakeup
_hotkey_notify_wakeup:                  ; @hotkey_notify_wakeup
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w9, #1
	str	w9, [x1]
	str	wzr, [x2]
	sub	w8, w0, #128
	cmp	w8, #5
	b.hi	LBB0_9
; %bb.1:
	lsl	w9, w9, w8
	mov	w10, #9
	tst	w9, w10
	b.ne	LBB0_4
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w10, #18
	tst	w8, w10
	b.eq	LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _TP_ACPI_WAKEUP_BAYEJ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TP_ACPI_WAKEUP_BAYEJ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _hotkey_wakeup_reason@GOTPAGE
Lloh4:
	ldr	x10, [x10, _hotkey_wakeup_reason@GOTPAGEOFF]
Lloh5:
	str	x8, [x10]
	str	w9, [x2]
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _TP_ACPI_WAKEUP_UNDOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TP_ACPI_WAKEUP_UNDOCK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _hotkey_wakeup_reason@GOTPAGE
Lloh10:
	ldr	x9, [x9, _hotkey_wakeup_reason@GOTPAGEOFF]
Lloh11:
	str	x8, [x9]
	mov	w9, #1
	str	w9, [x2]
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_alert
Lloh14:
	adrp	x8, _hotkey_wakeup_reason@GOTPAGE
Lloh15:
	ldr	x8, [x8, _hotkey_wakeup_reason@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
LBB0_6:
Lloh17:
	adrp	x9, _TP_ACPI_WAKEUP_NONE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TP_ACPI_WAKEUP_NONE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	bl	_hotkey_wakeup_reason_notify_change
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_TP_ACPI_WAKEUP_UNDOCK,8,3      ; @TP_ACPI_WAKEUP_UNDOCK
	.comm	_hotkey_wakeup_reason,8,3       ; @hotkey_wakeup_reason
	.comm	_TP_ACPI_WAKEUP_BAYEJ,8,3       ; @TP_ACPI_WAKEUP_BAYEJ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EMERGENCY WAKEUP: battery almost empty\n"

	.comm	_TP_ACPI_WAKEUP_NONE,8,3        ; @TP_ACPI_WAKEUP_NONE
l_.str.1:                               ; @.str.1
	.asciz	"woke up due to a hot-unplug request...\n"

	.no_dead_strip	_hotkey_notify_wakeup
.subsections_via_symbols
