	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_start_xmit
_mtk_start_xmit:                        ## @mtk_start_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, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	_MTK_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_test_bit
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
LBB0_7:
	movq	%rbx, %rdi
	callq	_spin_unlock
	incl	(%r14)
	movq	%r15, %rdi
	callq	_dev_kfree_skb_any
LBB0_14:
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	movq	%r15, %rdi
	callq	_mtk_cal_txd_req
	movl	%eax, %r13d
	leaq	12(%rbx), %r12
	movq	%r12, %rdi
	callq	_atomic_read
	xorl	%edi, %edi
	cmpl	%r13d, %eax
	setle	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_mtk_stop_queue
	movq	_tx_queued@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_err
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_skb_is_gso
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_skb_cow_head
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_netif_warn
	jmp	LBB0_7
LBB0_4:
	xorl	%r8d, %r8d
	jmp	LBB0_10
LBB0_8:
	movq	%r15, %rdi
	callq	_skb_shinfo
	movq	_SKB_GSO_TCPV4@GOTPCREL(%rip), %rcx
	movq	_SKB_GSO_TCPV6@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, (%rax)
	movl	$0, %r8d
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_skb_shinfo
	movl	4(%rax), %edi
	callq	_htons
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_tcp_hdr
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movl	$1, %r8d
LBB0_10:
	leaq	8(%rbx), %rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movq	%rax, %r13
	movq	%rax, %rcx
	callq	_mtk_tx_map
	testq	%rax, %rax
	js	LBB0_7
## %bb.11:
	movq	%r12, %rdi
	callq	_atomic_read
	xorl	%edi, %edi
	cmpl	(%r13), %eax
	setle	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_mtk_stop_queue
LBB0_13:
	movq	%rbx, %rdi
	callq	_spin_unlock
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_RESETTING,4,2              ## @MTK_RESETTING
	.comm	_tx_queued,4,2                  ## @tx_queued
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tx Ring full when queue awake!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_tx_err,4,2                     ## @tx_err
L_.str.1:                               ## @.str.1
	.asciz	"GSO expand head fail.\n"

	.comm	_SKB_GSO_TCPV4,4,2              ## @SKB_GSO_TCPV4
	.comm	_SKB_GSO_TCPV6,4,2              ## @SKB_GSO_TCPV6
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_mtk_start_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_start_xmit
_mtk_start_xmit:                        ; @mtk_start_xmit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_netdev_priv
	ldr	x19, [x0]
	mov	x0, x19
	bl	_spin_lock
Lloh0:
	adrp	x8, _MTK_RESETTING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_RESETTING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_bit
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_1:
	mov	x0, x19
	bl	_spin_unlock
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	x0, x21
	bl	_dev_kfree_skb_any
LBB0_2:
Lloh3:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	x0, x21
	bl	_mtk_cal_txd_req
	mov	x23, x0
	add	x22, x19, #12
	mov	x0, x22
	bl	_atomic_read
	cmp	w0, w23
	cset	w0, le
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_mtk_stop_queue
Lloh5:
	adrp	x8, _tx_queued@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tx_queued@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_err
	mov	x0, x19
	bl	_spin_unlock
Lloh10:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x21
	bl	_skb_is_gso
	cbz	x0, LBB0_11
; %bb.7:
	mov	x0, x21
	mov	w1, #0
	bl	_skb_cow_head
	cbz	x0, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _tx_err@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tx_err@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x3, l_.str.1@PAGE
Lloh16:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_warn
	b	LBB0_1
LBB0_9:
	mov	x0, x21
	bl	_skb_shinfo
	ldr	w8, [x0]
Lloh17:
	adrp	x9, _SKB_GSO_TCPV4@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SKB_GSO_TCPV4@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _SKB_GSO_TCPV6@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SKB_GSO_TCPV6@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_skb_shinfo
	ldr	w0, [x0, #4]
	bl	_htons
	mov	x24, x0
	mov	x0, x21
	bl	_tcp_hdr
	str	w24, [x0]
	mov	w4, #1
	b	LBB0_12
LBB0_11:
	mov	w4, #0
LBB0_12:
	add	x24, x19, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	mov	x3, x24
	bl	_mtk_tx_map
	tbnz	x0, #63, LBB0_1
; %bb.13:
	mov	x0, x22
	bl	_atomic_read
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w0, le
	bl	_unlikely
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_mtk_stop_queue
LBB0_15:
	mov	x0, x19
	bl	_spin_unlock
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_RESETTING,4,2              ; @MTK_RESETTING
	.comm	_tx_queued,4,2                  ; @tx_queued
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tx Ring full when queue awake!\n"

	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_tx_err,4,2                     ; @tx_err
l_.str.1:                               ; @.str.1
	.asciz	"GSO expand head fail.\n"

	.comm	_SKB_GSO_TCPV4,4,2              ; @SKB_GSO_TCPV4
	.comm	_SKB_GSO_TCPV6,4,2              ; @SKB_GSO_TCPV6
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_mtk_start_xmit
.subsections_via_symbols
