	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qtnf_pcie_data_tx
_qtnf_pcie_data_tx:                     ## @qtnf_pcie_data_tx
	.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
	movq	%rsi, %r15
	callq	_get_bus_priv
	movq	%rax, %rbx
	leaq	36(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_qtnf_tx_queue_ready
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movslq	28(%rbx), %rcx
	movq	48(%rbx), %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, (%rax,%rcx,8)
	movl	(%r15), %r12d
	movl	16(%r15), %esi
	movl	44(%rbx), %edi
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edx
	callq	_pci_map_single
	movq	%rax, %r13
	movq	%rax, -72(%rbp)
	movl	44(%rbx), %edi
	movq	%rax, %rsi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	L_.str(%rip), %rdi
	leaq	-72(%rbp), %rsi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err_ratelimited
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	incl	(%rax)
LBB0_9:
	movq	%r15, %rdi
	callq	_dev_kfree_skb_any
	jmp	LBB0_10
LBB0_1:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_netif_tx_stop_all_queues
	movl	$1, 24(%rbx)
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r14
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_QTN_HOST_LO32
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %r15
	movq	%rax, 16(%r14,%r15)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_QTN_HOST_HI32
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%rax, 8(%r13,%r15)
	movq	_QTN_PCIE_TX_DESC_LEN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_QTN_PCIE_TX_DESC_LEN_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r13,%r15)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dma_wmb
	addq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_QTN_HOST_LO32
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_PCIE_HDP_HOST_WR_DESC0
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_writel
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	cmpl	32(%rbx), %eax
	cmovll	%eax, %r12d
	movl	%r12d, 28(%rbx)
LBB0_10:
	incl	40(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_qtnf_pearl_data_tx_reclaim
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"skb DMA mapping error: %pad\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QTN_PCIE_TX_DESC_LEN_MASK,4,2  ## @QTN_PCIE_TX_DESC_LEN_MASK
	.comm	_QTN_PCIE_TX_DESC_LEN_SHIFT,4,2 ## @QTN_PCIE_TX_DESC_LEN_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"drop skb\n"

	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_qtnf_pcie_data_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qtnf_pcie_data_tx
_qtnf_pcie_data_tx:                     ; @qtnf_pcie_data_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	bl	_get_bus_priv
	mov	x19, x0
	add	x20, x0, #36
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_qtnf_tx_queue_ready
	cbz	w0, LBB0_6
; %bb.1:
	ldrsw	x24, [x19, #28]
	ldr	x8, [x19, #48]
	str	x21, [x8, x24, lsl #3]
	ldr	w22, [x21]
	ldr	w0, [x19, #44]
	ldr	w1, [x21, #16]
Lloh0:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x2, x22
	bl	_pci_map_single
	mov	x23, x0
	str	x0, [sp, #8]
	ldr	w0, [x19, #44]
	mov	x1, x23
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_9
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #8
	bl	_pr_err
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err_ratelimited
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_5:
	mov	x0, x21
	bl	_dev_kfree_skb_any
	b	LBB0_10
LBB0_6:
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_netif_tx_stop_all_queues
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_8:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh10:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	ldr	x21, [x19, #16]
	mov	x0, x23
	bl	_QTN_HOST_LO32
	bl	_cpu_to_le32
	add	x8, x24, x24, lsl #1
	lsl	x25, x8, #3
	add	x21, x21, x25
	str	x0, [x21, #16]
	mov	x0, x23
	bl	_QTN_HOST_HI32
	bl	_cpu_to_le32
	str	x0, [x21, #8]
Lloh12:
	adrp	x8, _QTN_PCIE_TX_DESC_LEN_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _QTN_PCIE_TX_DESC_LEN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh15:
	adrp	x9, _QTN_PCIE_TX_DESC_LEN_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _QTN_PCIE_TX_DESC_LEN_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le32
	str	x0, [x21]
	bl	_dma_wmb
	ldr	x8, [x19, #8]
	add	x0, x8, x25
	bl	_QTN_HOST_LO32
	mov	x21, x0
	ldr	w0, [x19]
	bl	_PCIE_HDP_HOST_WR_DESC0
	mov	x1, x0
	mov	x0, x21
	bl	_writel
	add	w8, w24, #1
	ldr	w9, [x19, #32]
	cmp	w8, w9
	csinc	w8, wzr, w24, ge
	str	w8, [x19, #28]
LBB0_10:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_qtnf_pearl_data_tx_reclaim
Lloh18:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"skb DMA mapping error: %pad\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QTN_PCIE_TX_DESC_LEN_MASK,4,2  ; @QTN_PCIE_TX_DESC_LEN_MASK
	.comm	_QTN_PCIE_TX_DESC_LEN_SHIFT,4,2 ; @QTN_PCIE_TX_DESC_LEN_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"drop skb\n"

	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_qtnf_pcie_data_tx
.subsections_via_symbols
