	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sysport_xmit
_bcm_sysport_xmit:                      ## @bcm_sysport_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	24(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_skb_get_queue_mapping
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_netdev_get_tx_queue
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %r14
	leaq	(%rbx,%rbx,4), %r12
	leaq	(%r14,%r12,8), %rdi
	addq	$24, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	xorl	%edi, %edi
	cmpq	$0, (%r14,%r12,8)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_tx_stop_queue
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_netdev_err
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_2:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%r13)
	movq	%r13, %r14
	je	LBB0_3
## %bb.4:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_bcm_sysport_insert_tsb
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_10
LBB0_3:
	movq	%rdi, %r12
LBB0_5:
	movl	(%r12), %r13d
	movl	16(%r12), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_dma_map_single
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	incl	(%r14)
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r12), %r8d
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %r9d
	callq	_netif_err
	jmp	LBB0_10
LBB0_7:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r14                ## 8-byte Reload
	leaq	(%rcx,%r14,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rcx,%r14,8), %rax
	movq	32(%rcx,%r14,8), %rcx
	leaq	(%rcx,%rax,8), %rbx
	movq	%r12, (%rcx,%rax,8)
	movq	_dma_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_dma_unmap_addr_set
	movq	_dma_len@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_dma_unmap_len_set
	movl	%r15d, %edi
	callq	_lower_32_bits
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_upper_32_bits
	movq	_DESC_ADDR_HI_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_DESC_LEN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	movq	_DESC_SOP@GOTPCREL(%rip), %rcx
	movq	_DESC_EOP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_TX_STATUS_APP_CRC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_DESC_STATUS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%r13d, %edx
	movq	8(%r12), %rsi
	movq	_DESC_L4_CSUM@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	shll	%cl, %ebx
	movq	_CHECKSUM_PARTIAL@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rsi
	cmovnel	%edi, %ebx
	orl	%edx, %ebx
	orl	%eax, %ebx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx,%r14,8), %rax
	incq	%rax
	cmpq	16(%rcx,%r14,8), %rax
	cmovneq	%rax, %rdi
	movq	%rdi, 8(%rcx,%r14,8)
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	decq	(%r12)
	movl	28(%rcx,%r14,8), %edi
	movq	%rcx, %r15
	callq	_TDMA_WRITE_PORT_HI
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r12, %rbx
	movl	%eax, %edx
	callq	_tdma_writel
	movl	28(%r15,%r14,8), %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	callq	_TDMA_WRITE_PORT_LO
	movq	%r14, %rdi
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_tdma_writel
	movq	(%r12), %r9
	testq	%r9, %r9
	jne	LBB0_9
## %bb.8:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_tx_stop_queue
	movq	(%rbx), %r9
LBB0_9:
	movq	_tx_queued@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	28(%rbx), %r8d
	movq	8(%rbx), %rax
	movq	%rax, (%rsp)
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_netif_dbg
LBB0_10:
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rax), %ebx
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue %d awake and ring full!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_tx_err,4,2                     ## @tx_err
L_.str.1:                               ## @.str.1
	.asciz	"DMA map failed at %p (len=%d)\n"

	.comm	_dma_addr,4,2                   ## @dma_addr
	.comm	_dma_len,4,2                    ## @dma_len
	.comm	_DESC_ADDR_HI_MASK,4,2          ## @DESC_ADDR_HI_MASK
	.comm	_DESC_LEN_SHIFT,4,2             ## @DESC_LEN_SHIFT
	.comm	_DESC_SOP,4,2                   ## @DESC_SOP
	.comm	_DESC_EOP,4,2                   ## @DESC_EOP
	.comm	_TX_STATUS_APP_CRC,4,2          ## @TX_STATUS_APP_CRC
	.comm	_DESC_STATUS_SHIFT,4,2          ## @DESC_STATUS_SHIFT
	.comm	_CHECKSUM_PARTIAL,8,3           ## @CHECKSUM_PARTIAL
	.comm	_DESC_L4_CSUM,4,2               ## @DESC_L4_CSUM
	.comm	_tx_queued,4,2                  ## @tx_queued
L_.str.2:                               ## @.str.2
	.asciz	"ring=%d desc_count=%d, curr_desc=%d\n"

	.no_dead_strip	_bcm_sysport_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_sysport_xmit
_bcm_sysport_xmit:                      ; @bcm_sysport_xmit
	.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
	mov	x20, x1
	mov	x23, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x21, x0
	ldr	x26, [x0, #24]
	mov	x0, x23
	bl	_skb_get_queue_mapping
	mov	x24, x0
	mov	x0, x20
	mov	x1, x24
	bl	_netdev_get_tx_queue
	mov	x25, x0
	ldr	x22, [x21, #16]
	mov	w8, #40
	madd	x28, x24, x8, x22
	add	x19, x28, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x28]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x25
	bl	_netif_tx_stop_queue
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x24
	bl	_netdev_err
Lloh2:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x23
	mov	x1, x20
	bl	_bcm_sysport_insert_tsb
	mov	x23, x0
	cbz	x0, LBB0_9
LBB0_4:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	ldr	w25, [x23]
	ldr	w1, [x23, #16]
Lloh4:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x26
	mov	x2, x25
	bl	_dma_map_single
	mov	x27, x0
	mov	x0, x26
	mov	x1, x27
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
Lloh7:
	adrp	x8, _tx_err@GOTPAGE
Lloh8:
	ldr	x8, [x8, _tx_err@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w4, [x23, #16]
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x5, x25
	bl	_netif_err
	b	LBB0_9
LBB0_6:
	mov	w8, #40
	madd	x26, x24, x8, x22
	mov	x22, x26
	ldr	x8, [x22, #8]!
	ldr	x9, [x26, #32]
	add	x24, x9, x8, lsl #3
	str	x23, [x24]
Lloh12:
	adrp	x8, _dma_addr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dma_addr@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x24
	mov	x2, x27
	bl	_dma_unmap_addr_set
Lloh15:
	adrp	x8, _dma_len@GOTPAGE
Lloh16:
	ldr	x8, [x8, _dma_len@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x24
	mov	x2, x25
	bl	_dma_unmap_len_set
	mov	x0, x27
	bl	_lower_32_bits
	mov	x24, x0
	mov	x0, x27
	bl	_upper_32_bits
Lloh18:
	adrp	x8, _DESC_ADDR_HI_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DESC_ADDR_HI_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _DESC_LEN_SHIFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DESC_LEN_SHIFT@GOTPAGEOFF]
	and	w8, w8, w0
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w25, w9
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _DESC_SOP@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DESC_SOP@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _DESC_EOP@GOTPAGE
Lloh28:
	ldr	x10, [x10, _DESC_EOP@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
Lloh30:
	adrp	x11, _TX_STATUS_APP_CRC@GOTPAGE
Lloh31:
	ldr	x11, [x11, _TX_STATUS_APP_CRC@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh32:
	ldr	w10, [x11]
	orr	w9, w9, w10
Lloh33:
	adrp	x10, _DESC_STATUS_SHIFT@GOTPAGE
Lloh34:
	ldr	x10, [x10, _DESC_STATUS_SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	ldr	x9, [x23, #8]
Lloh36:
	adrp	x11, _CHECKSUM_PARTIAL@GOTPAGE
Lloh37:
	ldr	x11, [x11, _CHECKSUM_PARTIAL@GOTPAGEOFF]
Lloh38:
	ldr	x11, [x11]
Lloh39:
	adrp	x12, _DESC_L4_CSUM@GOTPAGE
Lloh40:
	ldr	x12, [x12, _DESC_L4_CSUM@GOTPAGEOFF]
Lloh41:
	ldr	w12, [x12]
	lsl	w10, w12, w10
	cmp	x9, x11
	csel	w9, w10, wzr, eq
	orr	w23, w8, w9
	ldr	x8, [x22]
	add	x9, x8, #1
	ldr	w0, [x26, #28]!
	ldur	x10, [x26, #-12]
	cmp	x9, x10
	csinc	x8, xzr, x8, eq
	str	x8, [x22]
	ldr	x8, [x28]
	sub	x8, x8, #1
	str	x8, [x28]
	bl	_TDMA_WRITE_PORT_HI
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_tdma_writel
	ldr	w0, [x26]
	bl	_TDMA_WRITE_PORT_LO
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_tdma_writel
	ldr	x5, [x28]
	cbnz	x5, LBB0_8
; %bb.7:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_netif_tx_stop_queue
	ldr	x5, [x28]
LBB0_8:
Lloh42:
	adrp	x8, _tx_queued@GOTPAGE
Lloh43:
	ldr	x8, [x8, _tx_queued@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	ldr	w4, [x26]
	ldr	x6, [x22]
Lloh45:
	adrp	x3, l_.str.2@PAGE
Lloh46:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_netif_dbg
LBB0_9:
Lloh47:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh48:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
LBB0_10:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue %d awake and ring full!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_tx_err,4,2                     ; @tx_err
l_.str.1:                               ; @.str.1
	.asciz	"DMA map failed at %p (len=%d)\n"

	.comm	_dma_addr,4,2                   ; @dma_addr
	.comm	_dma_len,4,2                    ; @dma_len
	.comm	_DESC_ADDR_HI_MASK,4,2          ; @DESC_ADDR_HI_MASK
	.comm	_DESC_LEN_SHIFT,4,2             ; @DESC_LEN_SHIFT
	.comm	_DESC_SOP,4,2                   ; @DESC_SOP
	.comm	_DESC_EOP,4,2                   ; @DESC_EOP
	.comm	_TX_STATUS_APP_CRC,4,2          ; @TX_STATUS_APP_CRC
	.comm	_DESC_STATUS_SHIFT,4,2          ; @DESC_STATUS_SHIFT
	.comm	_CHECKSUM_PARTIAL,8,3           ; @CHECKSUM_PARTIAL
	.comm	_DESC_L4_CSUM,4,2               ; @DESC_L4_CSUM
	.comm	_tx_queued,4,2                  ; @tx_queued
l_.str.2:                               ; @.str.2
	.asciz	"ring=%d desc_count=%d, curr_desc=%d\n"

	.no_dead_strip	_bcm_sysport_xmit
.subsections_via_symbols
