	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_txrx
_spi_txrx:                              ## @spi_txrx
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	leal	-1(%rcx), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_SPI_SR@GOTPCREL(%rip), %r12
	movq	_SR_RFDF@GOTPCREL(%rip), %r13
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	incl	%esi
	movq	_PUSHR_CONT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PUSHR_PCS_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	shll	%cl, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	orl	(%rcx,%r15,4), %edx
	movl	$0, %ecx
	testq	%r15, %r15
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PUSHR_CTCNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%ecx, %edx
	orl	%edx, %eax
	movq	_SPI_FIFO_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	movq	_PUSHR_EOQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, %edx
	cmovel	%ecx, %edx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %r15
	cmovel	%ecx, %edx
	orl	%eax, %edx
	movq	_SPI_PUSHR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpq	%r14, %r15
	movq	_SR_EOQF@GOTPCREL(%rip), %r14
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_FIFO_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_READ4
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_SR_TCF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	(%r14), %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_WRITE4
	xorl	%ecx, %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_READ4
	testl	%eax, (%r13)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_POPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_READ1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15,4)
	incq	%r15
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	movl	%r14d, %esi
	jne	LBB0_2
LBB0_11:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PUSHR_CONT,4,2                 ## @PUSHR_CONT
	.comm	_PUSHR_PCS_S,4,2                ## @PUSHR_PCS_S
	.comm	_PUSHR_CTCNT,4,2                ## @PUSHR_CTCNT
	.comm	_SPI_FIFO_SIZE,4,2              ## @SPI_FIFO_SIZE
	.comm	_PUSHR_EOQ,4,2                  ## @PUSHR_EOQ
	.comm	_SPI_PUSHR,4,2                  ## @SPI_PUSHR
	.comm	_SPI_SR,4,2                     ## @SPI_SR
	.comm	_SR_EOQF,4,2                    ## @SR_EOQF
	.comm	_SR_TCF,4,2                     ## @SR_TCF
	.comm	_SR_RFDF,4,2                    ## @SR_RFDF
	.comm	_SPI_POPR,4,2                   ## @SPI_POPR
	.no_dead_strip	_spi_txrx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_txrx
_spi_txrx:                              ; @spi_txrx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w4, [sp, #12]                   ; 4-byte Folded Spill
	subs	w23, w3, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x24, #0
	mov	w19, #0
	mov	w25, w3
Lloh0:
	adrp	x26, _SPI_SR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SPI_SR@GOTPAGEOFF]
Lloh2:
	adrp	x27, _SR_EOQF@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SR_EOQF@GOTPAGEOFF]
Lloh4:
	adrp	x28, _SR_RFDF@GOTPAGE
Lloh5:
	ldr	x28, [x28, _SR_RFDF@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;     Child Loop BB0_6 Depth 2
	add	w19, w19, #1
	ldr	w8, [x21, x24, lsl #2]
Lloh6:
	adrp	x9, _PUSHR_CONT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PUSHR_CONT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _PUSHR_PCS_S@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PUSHR_PCS_S@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _PUSHR_CTCNT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PUSHR_CTCNT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	x24, #0
	csel	w9, w9, wzr, eq
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _SPI_FIFO_SIZE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SPI_FIFO_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w19, w9
	ccmp	x24, x23, #4, ne
Lloh18:
	adrp	x9, _PUSHR_EOQ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PUSHR_EOQ@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	csel	w9, w9, wzr, eq
	orr	w2, w8, w9
Lloh21:
	adrp	x8, _SPI_PUSHR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SPI_PUSHR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_WRITE4
	cmp	x24, x23
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh24:
	adrp	x8, _SPI_FIFO_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SPI_FIFO_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_6
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x26]
	mov	x0, x22
	bl	_READ4
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	bl	_READ4
Lloh27:
	adrp	x8, _SR_TCF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SR_TCF@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x26]
	mov	x0, x22
	bl	_WRITE4
	mov	w19, #0
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x26]
	mov	x0, x22
	bl	_READ4
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh30:
	adrp	x8, _SPI_POPR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SPI_POPR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_READ1
	str	w0, [x20, x24, lsl #2]
	add	x24, x24, #1
	cmp	x24, x25
	b.ne	LBB0_2
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PUSHR_CONT,4,2                 ; @PUSHR_CONT
	.comm	_PUSHR_PCS_S,4,2                ; @PUSHR_PCS_S
	.comm	_PUSHR_CTCNT,4,2                ; @PUSHR_CTCNT
	.comm	_SPI_FIFO_SIZE,4,2              ; @SPI_FIFO_SIZE
	.comm	_PUSHR_EOQ,4,2                  ; @PUSHR_EOQ
	.comm	_SPI_PUSHR,4,2                  ; @SPI_PUSHR
	.comm	_SPI_SR,4,2                     ; @SPI_SR
	.comm	_SR_EOQF,4,2                    ; @SR_EOQF
	.comm	_SR_TCF,4,2                     ; @SR_TCF
	.comm	_SR_RFDF,4,2                    ; @SR_RFDF
	.comm	_SPI_POPR,4,2                   ; @SPI_POPR
	.no_dead_strip	_spi_txrx
.subsections_via_symbols
