	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applespi_notify
_applespi_notify:                       ## @applespi_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	_ET_RD_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trace_applespi_irq_received
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, 20(%rbx)
	jne	LBB0_4
## %bb.1:
	leaq	16(%rbx), %rsi
	movq	_applespi_async_read_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_applespi_async
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_4
LBB0_3:
	movl	$1, (%rbx)
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ACPI_INTERRUPT_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ET_RD_IRQ,4,2                  ## @ET_RD_IRQ
	.comm	_PT_READ,4,2                    ## @PT_READ
	.comm	_applespi_async_read_complete,4,2 ## @applespi_async_read_complete
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error queueing async read to device: %d\n"

	.comm	_ACPI_INTERRUPT_HANDLED,4,2     ## @ACPI_INTERRUPT_HANDLED
	.no_dead_strip	_applespi_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applespi_notify
_applespi_notify:                       ; @applespi_notify
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
Lloh0:
	adrp	x8, _ET_RD_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ET_RD_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _PT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PT_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_trace_applespi_irq_received
	add	x19, x20, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #20]
	cbnz	w8, LBB0_4
; %bb.1:
	add	x1, x20, #16
Lloh6:
	adrp	x8, _applespi_async_read_complete@GOTPAGE
Lloh7:
	ldr	x8, [x8, _applespi_async_read_complete@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_applespi_async
	cbz	w0, LBB0_3
; %bb.2:
	mov	x2, x0
	ldr	x0, [x20, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_4
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh11:
	adrp	x8, _ACPI_INTERRUPT_HANDLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ACPI_INTERRUPT_HANDLED@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ET_RD_IRQ,4,2                  ; @ET_RD_IRQ
	.comm	_PT_READ,4,2                    ; @PT_READ
	.comm	_applespi_async_read_complete,4,2 ; @applespi_async_read_complete
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error queueing async read to device: %d\n"

	.comm	_ACPI_INTERRUPT_HANDLED,4,2     ; @ACPI_INTERRUPT_HANDLED
	.no_dead_strip	_applespi_notify
.subsections_via_symbols
