	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function event_device_notify
_event_device_notify:                   ## @event_device_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -32(%rbp)
	movq	_EC_ACPI_NOTIFY_EVENT@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_13
## %bb.1:
	movl	4(%rbx), %edi
	movq	_EC_ACPI_GET_EVENT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_13:
	movq	%rsi, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_4:
	movq	-48(%rbp), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.6:
	movq	(%r14), %rax
	movq	_ACPI_TYPE_BUFFER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movl	(%r14), %edx
	cmpl	$3, %edx
	ja	LBB0_10
## %bb.9:
	movl	(%r15), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_5:
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_7:
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_10:
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_enqueue_events
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_EC_ACPI_NOTIFY_EVENT,8,3       ## @EC_ACPI_NOTIFY_EVENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid event: 0x%08x\n"

	.comm	_EC_ACPI_GET_EVENT,4,2          ## @EC_ACPI_GET_EVENT
L_.str.1:                               ## @.str.1
	.asciz	"Error executing ACPI method %s()\n"

L_.str.2:                               ## @.str.2
	.asciz	"Nothing returned from %s()\n"

	.comm	_ACPI_TYPE_BUFFER,8,3           ## @ACPI_TYPE_BUFFER
L_.str.3:                               ## @.str.3
	.asciz	"Invalid object returned from %s()\n"

L_.str.4:                               ## @.str.4
	.asciz	"Invalid buffer length %d from %s()\n"

	.no_dead_strip	_event_device_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function event_device_notify
_event_device_notify:                   ; @event_device_notify
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #8]
	str	wzr, [sp, #24]
Lloh3:
	adrp	x8, _EC_ACPI_NOTIFY_EVENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_ACPI_NOTIFY_EVENT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x21, _EC_ACPI_GET_EVENT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _EC_ACPI_GET_EVENT@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x3, sp, #8
	mov	x2, #0
	bl	_acpi_evaluate_object
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w2, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
LBB0_4:
	mov	x2, x1
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	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
	add	sp, sp, #80
	b	_dev_err
LBB0_5:
	ldr	x20, [sp, #8]
	cbz	x20, LBB0_9
; %bb.6:
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _ACPI_TYPE_BUFFER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ACPI_TYPE_BUFFER@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	w2, [x20]
	cmp	w2, #3
	b.hi	LBB0_12
; %bb.8:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	w2, [x21]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_10:
	ldr	w2, [x21]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_13
LBB0_12:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_enqueue_events
LBB0_13:
	mov	x0, x20
	bl	_kfree
LBB0_14:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_EC_ACPI_NOTIFY_EVENT,8,3       ; @EC_ACPI_NOTIFY_EVENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid event: 0x%08x\n"

	.comm	_EC_ACPI_GET_EVENT,4,2          ; @EC_ACPI_GET_EVENT
l_.str.1:                               ; @.str.1
	.asciz	"Error executing ACPI method %s()\n"

l_.str.2:                               ; @.str.2
	.asciz	"Nothing returned from %s()\n"

	.comm	_ACPI_TYPE_BUFFER,8,3           ; @ACPI_TYPE_BUFFER
l_.str.3:                               ; @.str.3
	.asciz	"Invalid object returned from %s()\n"

l_.str.4:                               ; @.str.4
	.asciz	"Invalid buffer length %d from %s()\n"

	.no_dead_strip	_event_device_notify
.subsections_via_symbols
