	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcaspi_transmit
_qcaspi_transmit:                       ## @qcaspi_transmit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movq	32(%rdi), %rcx
	xorl	%r14d, %r14d
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	movq	_SPI_REG_WRBUF_SPC_AVA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_qcaspi_read_register
	movq	-48(%rbp), %rdx
	movq	_QCASPI_HW_BUF_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jle	LBB0_2
## %bb.13:
	incl	48(%rbx)
LBB0_14:
	movl	$-1, %r14d
	jmp	LBB0_15
LBB0_2:
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.3:
	movq	_QCASPI_HW_PKT_LEN@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	addq	(%rsi), %r13
	cmpq	%r13, %rdx
	jge	LBB0_4
LBB0_8:
	incl	44(%rbx)
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_qcaspi_tx_frame
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	4(%r15)
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	addl	%eax, (%r15)
	subq	%r13, -48(%rbp)
	movq	(%rbx), %rdi
	callq	_netif_tx_lock_bh
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rdi
	callq	_dev_kfree_skb
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	$0, (%rcx,%rax,8)
	subl	%r13d, 24(%rbx)
	incq	%rax
	cmpq	16(%rbx), %rax
	movl	$0, %ecx
	cmovgeq	%rcx, %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rdi
	callq	_netif_wake_queue
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rdi
	callq	_netif_tx_unlock_bh
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %r13
	addq	(%rsi), %r13
	cmpq	%r13, -48(%rbp)
	jge	LBB0_5
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	jl	LBB0_8
	jmp	LBB0_15
LBB0_6:
	incl	40(%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_REG_WRBUF_SPC_AVA,4,2      ## @SPI_REG_WRBUF_SPC_AVA
	.comm	_QCASPI_HW_BUF_LEN,8,3          ## @QCASPI_HW_BUF_LEN
	.comm	_QCASPI_HW_PKT_LEN,8,3          ## @QCASPI_HW_PKT_LEN
	.no_dead_strip	_qcaspi_transmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcaspi_transmit
_qcaspi_transmit:                       ; @qcaspi_transmit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	ldr	x8, [x0, #32]
	ldp	x20, x9, [x0]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_13
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _SPI_REG_WRBUF_SPC_AVA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_REG_WRBUF_SPC_AVA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_qcaspi_read_register
	ldr	x21, [sp, #8]
Lloh3:
	adrp	x8, _QCASPI_HW_BUF_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QCASPI_HW_BUF_LEN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x21, x8
	b.le	LBB0_3
; %bb.2:
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	str	w8, [x19, #48]
	mov	w0, #-1
	b	LBB0_14
LBB0_3:
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #8]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_13
; %bb.4:
	ldr	x8, [x1]
Lloh6:
	adrp	x22, _QCASPI_HW_PKT_LEN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _QCASPI_HW_PKT_LEN@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x23, x9, x8
	cmp	x21, x23
	b.ge	LBB0_6
LBB0_5:
	mov	w0, #0
	ldr	w8, [x19, #44]
	add	w8, w8, #1
	str	w8, [x19, #44]
	b	LBB0_14
LBB0_6:
	mov	x24, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_qcaspi_tx_frame
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #32]
	ldp	x0, x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	movi.2s	v0, #1
	ld1.s	{ v0 }[0], [x8]
	ldr	d1, [x20]
	add.2s	v0, v1, v0
	str	d0, [x20]
	ldr	x8, [sp, #8]
	sub	x8, x8, x24
	str	x8, [sp, #8]
	bl	_netif_tx_lock_bh
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #8]
	ldr	x0, [x8, x9, lsl #3]
	bl	_dev_kfree_skb
	ldr	x8, [x19, #32]
	ldp	x9, x10, [x19, #8]
	str	xzr, [x8, x9, lsl #3]
	ldr	w8, [x19, #24]
	sub	w8, w8, w24
	str	w8, [x19, #24]
	add	x8, x9, #1
	cmp	x8, x10
	csinc	x8, xzr, x9, ge
	str	x8, [x19, #8]
	ldr	x0, [x19]
	bl	_netif_queue_stopped
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19]
	bl	_netif_wake_queue
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19]
	bl	_netif_tx_unlock_bh
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #8]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x1]
	ldr	x10, [x22]
	add	x24, x10, x9
	cmp	x8, x24
	b.ge	LBB0_7
; %bb.12:
	cmp	x21, x23
	b.lt	LBB0_5
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_REG_WRBUF_SPC_AVA,4,2      ; @SPI_REG_WRBUF_SPC_AVA
	.comm	_QCASPI_HW_BUF_LEN,8,3          ; @QCASPI_HW_BUF_LEN
	.comm	_QCASPI_HW_PKT_LEN,8,3          ; @QCASPI_HW_PKT_LEN
	.no_dead_strip	_qcaspi_transmit
.subsections_via_symbols
