	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54spi_wakeup
_p54spi_wakeup:                         ## @p54spi_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_SPI_ADRS_ARM_INTERRUPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_SPI_TARGET_INT_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_p54spi_write32
	movq	_SPI_ADRS_HOST_INTERRUPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SPI_HOST_INT_READY@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_p54spi_wait_bit
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_p54spi_int_ack
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_ADRS_ARM_INTERRUPTS,4,2    ## @SPI_ADRS_ARM_INTERRUPTS
	.comm	_SPI_TARGET_INT_WAKEUP,4,2      ## @SPI_TARGET_INT_WAKEUP
	.comm	_SPI_ADRS_HOST_INTERRUPTS,4,2   ## @SPI_ADRS_HOST_INTERRUPTS
	.comm	_SPI_HOST_INT_READY,4,2         ## @SPI_HOST_INT_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"INT_READY timeout\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_p54spi_wakeup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54spi_wakeup
_p54spi_wakeup:                         ; @p54spi_wakeup
	.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	x19, x0
Lloh0:
	adrp	x8, _SPI_ADRS_ARM_INTERRUPTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_ADRS_ARM_INTERRUPTS@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _SPI_TARGET_INT_WAKEUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPI_TARGET_INT_WAKEUP@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_p54spi_write32
Lloh6:
	adrp	x8, _SPI_ADRS_HOST_INTERRUPTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPI_ADRS_HOST_INTERRUPTS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x20, _SPI_HOST_INT_READY@GOTPAGE
Lloh10:
	ldr	x20, [x20, _SPI_HOST_INT_READY@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_p54spi_wait_bit
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_p54spi_int_ack
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_ADRS_ARM_INTERRUPTS,4,2    ; @SPI_ADRS_ARM_INTERRUPTS
	.comm	_SPI_TARGET_INT_WAKEUP,4,2      ; @SPI_TARGET_INT_WAKEUP
	.comm	_SPI_ADRS_HOST_INTERRUPTS,4,2   ; @SPI_ADRS_HOST_INTERRUPTS
	.comm	_SPI_HOST_INT_READY,4,2         ; @SPI_HOST_INT_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"INT_READY timeout\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_p54spi_wakeup
.subsections_via_symbols
