	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_button_notify
_acpi_button_notify:                    ## @acpi_button_notify
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_acpi_driver_data
	movq	%rax, %r12
	movl	%ebx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.1:
	movl	4(%r12), %eax
	movq	_ACPI_BUTTON_TYPE_LID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_acpi_lid_send_state
	jmp	LBB0_6
LBB0_7:
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ACPI_DEBUG_PRINT               ## TAILCALL
LBB0_3:
	movq	8(%r12), %r15
	movq	_KEY_SLEEP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_KEY_POWER@GOTPCREL(%rip), %rbx
LBB0_5:
	movl	(%rbx), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_input_report_key
	movq	%r15, %rdi
	callq	_input_sync
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movq	%r15, %rdi
	callq	_input_sync
LBB0_6:
	movl	(%r12), %edx
	incl	%edx
	movl	%edx, (%r12)
	movq	%r14, %rdi
	movl	$129, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_acpi_bus_generate_proc_event   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_BUTTON_TYPE_LID,4,2       ## @ACPI_BUTTON_TYPE_LID
	.comm	_KEY_SLEEP,4,2                  ## @KEY_SLEEP
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_ACPI_DB_INFO,4,2               ## @ACPI_DB_INFO
	.no_dead_strip	_acpi_button_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_button_notify
_acpi_button_notify:                    ; @acpi_button_notify
	.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	x21, x1
	mov	x19, x0
	bl	_acpi_driver_data
	and	w8, w21, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _ACPI_BUTTON_TYPE_LID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_BUTTON_TYPE_LID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_acpi_lid_send_state
	b	LBB0_5
LBB0_3:
	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
	b	_ACPI_DEBUG_PRINT
LBB0_4:
	ldr	x21, [x20, #8]
Lloh3:
	adrp	x22, _KEY_SLEEP@GOTPAGE
Lloh4:
	ldr	x22, [x22, _KEY_SLEEP@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [x21]
	bl	_test_bit
Lloh5:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x22, eq
	ldr	w22, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #1
	bl	_input_report_key
	mov	x0, x21
	bl	_input_sync
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	bl	_input_report_key
	mov	x0, x21
	bl	_input_sync
LBB0_5:
	ldr	w8, [x20]
	add	w2, w8, #1
	str	w2, [x20]
	mov	x0, x19
	mov	w1, #129
	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	_acpi_bus_generate_proc_event
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_BUTTON_TYPE_LID,4,2       ; @ACPI_BUTTON_TYPE_LID
	.comm	_KEY_SLEEP,4,2                  ; @KEY_SLEEP
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_ACPI_DB_INFO,4,2               ; @ACPI_DB_INFO
	.no_dead_strip	_acpi_button_notify
.subsections_via_symbols
