	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_tx_buf
_write_tx_buf:                          ## @write_tx_buf
	.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	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_TX_FIFO_SIZE@GOTPCREL(%rip), %r13
	movslq	(%r13), %rax
	addq	$-2, %rax
	cmpq	%rcx, %rax
	jae	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_printdev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movslq	(%r13), %r15
	addq	$-2, %r15
LBB0_2:
	movl	%r12d, %edi
	callq	_MRF24J40_WRITELONG
	movzbl	%ah, %ecx
	movq	(%rbx), %rdx
	movl	%ecx, (%rdx)
	movzbl	%al, %eax
	movl	%eax, 4(%rdx)
	movq	8(%rbx), %rax
	movl	$0, (%rax)
	movl	%r15d, 4(%rax)
	movq	%r14, 32(%rbx)
	movq	%r15, 24(%rbx)
	movl	20(%rbx), %edi
	leaq	16(%rbx), %rsi
	callq	_spi_async
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_printdev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_FIFO_SIZE,4,2               ## @TX_FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write_tx_buf() was passed too large a buffer. Performing short write.\n"

L_.str.1:                               ## @.str.1
	.asciz	"SPI write Failed for TX buf\n"

	.no_dead_strip	_write_tx_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_tx_buf
_write_tx_buf:                          ; @write_tx_buf
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _TX_FIFO_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TX_FIFO_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x23]
	sub	x8, x8, #2
	cmp	x8, x3
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_printdev
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldrsw	x8, [x23]
	sub	x21, x8, #2
LBB0_2:
	mov	x0, x22
	bl	_MRF24J40_WRITELONG
	ubfx	w8, w0, #8, #8
	and	w9, w0, #0xff
	ldp	x10, x11, [x19]
	stp	w8, w9, [x10]
	stp	wzr, w21, [x11]
	stp	x21, x20, [x19, #24]
	ldr	w0, [x19, #20]
	add	x1, x19, #16
	bl	_spi_async
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_printdev
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_FIFO_SIZE,4,2               ; @TX_FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write_tx_buf() was passed too large a buffer. Performing short write.\n"

l_.str.1:                               ; @.str.1
	.asciz	"SPI write Failed for TX buf\n"

	.no_dead_strip	_write_tx_buf
.subsections_via_symbols
