	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54spi_tx_frame
_p54spi_tx_frame:                       ## @p54spi_tx_frame
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rsi), %rbx
	callq	_p54spi_wakeup
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	(%rbx), %esi
	movq	8(%r13), %rdx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_p54spi_spi_write_dma
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movq	_SPI_ADRS_HOST_INTERRUPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SPI_HOST_INT_WR_READY@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_p54spi_wait_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_p54spi_int_ack
	movq	%r13, %rdi
	callq	_FREE_AFTER_TX
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	movq	%r13, %rsi
	callq	_p54_free_skb
	jmp	LBB0_7
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_4:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movq	%r14, %rdi
	callq	_p54spi_sleep
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SPI_ADRS_HOST_INTERRUPTS,4,2   ## @SPI_ADRS_HOST_INTERRUPTS
	.comm	_SPI_HOST_INT_WR_READY,4,2      ## @SPI_HOST_INT_WR_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WR_READY timeout\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_p54spi_tx_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54spi_tx_frame
_p54spi_tx_frame:                       ; @p54spi_tx_frame
	.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
	ldr	x20, [x1, #8]
	bl	_p54spi_wakeup
	tbnz	x0, #63, LBB0_5
; %bb.1:
	ldr	w1, [x20]
	ldr	x2, [x21, #8]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_p54spi_spi_write_dma
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _SPI_ADRS_HOST_INTERRUPTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_ADRS_HOST_INTERRUPTS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x22, _SPI_HOST_INT_WR_READY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SPI_HOST_INT_WR_READY@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_p54spi_wait_bit
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_p54spi_int_ack
	mov	x0, x21
	bl	_FREE_AFTER_TX
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_p54_free_skb
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_6:
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x19
	bl	_p54spi_sleep
LBB0_8:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SPI_ADRS_HOST_INTERRUPTS,4,2   ; @SPI_ADRS_HOST_INTERRUPTS
	.comm	_SPI_HOST_INT_WR_READY,4,2      ; @SPI_HOST_INT_WR_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WR_READY timeout\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_p54spi_tx_frame
.subsections_via_symbols
