	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcaspi_netdev_xmit
_qcaspi_netdev_xmit:                    ## @qcaspi_netdev_xmit
	.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, %r12
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rax, %rbx
	movq	_QCAFRM_MIN_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r14d, %r14d
	subq	(%r12), %rax
	cmovgq	%rax, %r14
	movq	24(%r15), %rax
	movq	40(%r15), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_4
## %bb.1:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
	movl	16(%rbx), %edi
	callq	_netif_stop_queue
	incl	8(%rbx)
LBB0_2:
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r12, %rdi
	callq	_skb_headroom
	movq	_QCAFRM_HEADER_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jge	LBB0_6
## %bb.5:
	movq	_QCAFRM_FOOTER_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r14, %rdx
	jmp	LBB0_8
LBB0_6:
	movq	%r12, %rdi
	callq	_skb_tailroom
	movq	_QCAFRM_FOOTER_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	%r14, %rdx
	cmpq	%rdx, %rax
	jge	LBB0_10
## %bb.7:
	movq	_QCAFRM_HEADER_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_8:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_skb_copy_expand
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_dev_kfree_skb
	movq	%r13, %r12
LBB0_10:
	addq	$24, %r15
	movq	(%r12), %r13
	addq	%r14, %r13
	movq	_QCAFRM_HEADER_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_skb_push
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_qcafrm_create_header
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_skb_put_zero
LBB0_12:
	movq	_QCAFRM_FOOTER_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_skb_put
	movq	%rax, %rdi
	callq	_qcafrm_create_footer
	movl	16(%rbx), %edi
	movq	(%r12), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_dbg
	movq	_QCASPI_HW_PKT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%r12), %eax
	addl	%eax, 48(%rbx)
	movq	24(%rbx), %rax
	leal	1(%rax), %ecx
	xorl	%edx, %edx
	cmpl	32(%rbx), %ecx
	cmovll	%ecx, %edx
	movq	40(%rbx), %rcx
	movq	%r12, (%rcx,%rax,8)
	movslq	%edx, %rax
	movq	%rax, 24(%rbx)
	movq	%r15, %rdi
	callq	_qcaspi_tx_ring_has_space
	testl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_14
## %bb.13:
	movl	16(%rbx), %edi
	callq	_netif_stop_queue
	incl	8(%rbx)
LBB0_14:
	movq	%r14, %rdi
	callq	_netif_trans_update
	movq	(%rbx), %rdi
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rbx
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.15:
	movq	(%rdi), %rax
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.16:
	callq	_wake_up_process
	jmp	LBB0_3
LBB0_17:
	incl	12(%rbx)
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_QCAFRM_MIN_LEN,8,3             ## @QCAFRM_MIN_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue was unexpectedly full!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_QCAFRM_HEADER_LEN,8,3          ## @QCAFRM_HEADER_LEN
	.comm	_QCAFRM_FOOTER_LEN,8,3          ## @QCAFRM_FOOTER_LEN
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"Tx-ing packet: Size: 0x%08x\n"

	.comm	_QCASPI_HW_PKT_LEN,8,3          ## @QCASPI_HW_PKT_LEN
	.comm	_TASK_RUNNING,8,3               ## @TASK_RUNNING
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_qcaspi_netdev_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcaspi_netdev_xmit
_qcaspi_netdev_xmit:                    ; @qcaspi_netdev_xmit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x19, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _QCAFRM_MIN_LEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QCAFRM_MIN_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	subs	x8, x9, x8
	csel	x23, x8, xzr, gt
	mov	x22, x0
	ldr	x8, [x22, #24]!
	ldr	x9, [x0, #40]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
	ldr	w0, [x19, #16]
	bl	_netif_stop_queue
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_2:
Lloh5:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
	b	LBB0_17
LBB0_3:
	mov	x0, x21
	bl	_skb_headroom
Lloh7:
	adrp	x26, _QCAFRM_HEADER_LEN@GOTPAGE
Lloh8:
	ldr	x26, [x26, _QCAFRM_HEADER_LEN@GOTPAGEOFF]
	ldr	x1, [x26]
Lloh9:
	adrp	x25, _QCAFRM_FOOTER_LEN@GOTPAGE
Lloh10:
	ldr	x25, [x25, _QCAFRM_FOOTER_LEN@GOTPAGEOFF]
	cmp	x0, x1
	b.ge	LBB0_5
; %bb.4:
	ldr	x8, [x25]
	add	x2, x8, x23
	b	LBB0_7
LBB0_5:
	mov	x0, x21
	bl	_skb_tailroom
	ldr	x8, [x25]
	add	x2, x8, x23
	cmp	x0, x2
	b.ge	LBB0_9
; %bb.6:
	ldr	x1, [x26]
LBB0_7:
Lloh11:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_skb_copy_expand
	cbz	x0, LBB0_18
; %bb.8:
	mov	x24, x0
	mov	x0, x21
	bl	_dev_kfree_skb
	mov	x21, x24
LBB0_9:
	ldr	x8, [x21]
	add	x24, x8, x23
	ldr	x1, [x26]
	mov	x0, x21
	bl	_skb_push
	mov	x1, x24
	bl	_qcafrm_create_header
	cbz	x23, LBB0_11
; %bb.10:
	mov	x0, x21
	mov	x1, x23
	bl	_skb_put_zero
LBB0_11:
	ldr	x1, [x25]
	mov	x0, x21
	bl	_skb_put
	bl	_qcafrm_create_footer
	ldr	w0, [x19, #16]
	ldr	x2, [x21]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_dbg
	ldr	w8, [x21]
Lloh16:
	adrp	x9, _QCASPI_HW_PKT_LEN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _QCASPI_HW_PKT_LEN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	ldr	w10, [x19, #48]
	add	w8, w9, w8
	add	w8, w10, w8
	str	w8, [x19, #48]
	ldr	x8, [x19, #24]
	add	w9, w8, #1
	ldr	w10, [x19, #32]
	cmp	w9, w10
	csinc	w9, wzr, w8, ge
	ldr	x10, [x19, #40]
	str	x21, [x10, x8, lsl #3]
	sxtw	x8, w9
	str	x8, [x19, #24]
	mov	x0, x22
	bl	_qcaspi_tx_ring_has_space
	cbnz	w0, LBB0_13
; %bb.12:
	ldr	w0, [x19, #16]
	bl	_netif_stop_queue
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_13:
	mov	x0, x20
	bl	_netif_trans_update
	ldr	x0, [x19]
	cbz	x0, LBB0_16
; %bb.14:
	ldr	x8, [x0]
Lloh19:
	adrp	x9, _TASK_RUNNING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TASK_RUNNING@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.15:
	bl	_wake_up_process
LBB0_16:
Lloh22:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_QCAFRM_MIN_LEN,8,3             ; @QCAFRM_MIN_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue was unexpectedly full!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_QCAFRM_HEADER_LEN,8,3          ; @QCAFRM_HEADER_LEN
	.comm	_QCAFRM_FOOTER_LEN,8,3          ; @QCAFRM_FOOTER_LEN
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"Tx-ing packet: Size: 0x%08x\n"

	.comm	_QCASPI_HW_PKT_LEN,8,3          ; @QCASPI_HW_PKT_LEN
	.comm	_TASK_RUNNING,8,3               ; @TASK_RUNNING
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_qcaspi_netdev_xmit
.subsections_via_symbols
