	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netcp_tx_map_skb
_netcp_tx_map_skb:                      ## @netcp_tx_map_skb
	.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	$88, %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, %r12
	callq	_skb_headlen
	movl	%eax, %r14d
	movq	8(%r15), %rbx
	movl	4(%r12), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_dma_map_single
	movq	%rax, %r13
	movq	%rax, -104(%rbp)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%r12d, %r12d
	jmp	LBB0_24
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %edi
	callq	_knav_pool_desc_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_dma_unmap_single
	xorl	%r12d, %r12d
	jmp	LBB0_24
LBB0_4:
	movq	%r15, %rbx
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_set_pkt_info
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_skb_is_nonlinear
	testq	%rax, %rax
	je	LBB0_22
## %bb.5:
	movq	%r15, %rdi
	callq	_skb_shinfo
	movq	%rax, %rdi
	callq	_prefetchw
	movq	%r15, %rdi
	callq	_skb_shinfo
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.6:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	movq	%r12, %rcx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-112(%rbp), %r13                ## 8-byte Reload
	incq	%r13
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_skb_shinfo
	movslq	(%rax), %rax
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	addq	$4, %rbx
	movq	%r14, %rcx
	cmpq	%rax, %r13
	jge	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_skb_shinfo
	movq	16(%rax), %r15
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	addq	%rbx, %r15
	movq	%r15, %rdi
	callq	_skb_frag_page
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_skb_frag_off
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_skb_frag_size
	movl	%eax, %r15d
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_dma_map_page
	movq	%rax, %r12
	movq	%rax, -104(%rbp)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	4(%r13), %edi
	callq	_knav_pool_desc_get
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r13), %edi
	movq	%r14, %rsi
	callq	_knav_pool_desc_virt_to_dma
	movq	%rax, -96(%rbp)
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_set_pkt_info
	movl	-96(%rbp), %eax
	movl	%eax, -76(%rbp)
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	leaq	8(%rbx), %rdx
	leaq	-76(%rbp), %rdi
	movl	$1, %esi
	callq	_set_words
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%r15d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -48(%rbp)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	cmpq	%r12, %rbx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rsi
	movl	4(%r13), %edi
	movl	$16, %edx
	leaq	-96(%rbp), %rcx
	leaq	-80(%rbp), %r8
	callq	_knav_pool_desc_map
	jmp	LBB0_13
LBB0_22:
	movq	$0, 8(%r12)
	jmp	LBB0_23
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_10:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_dma_unmap_page
	movq	%r13, %rbx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_14:
	cmpq	%r12, %r14
	je	LBB0_15
## %bb.16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rbx
	movl	4(%rax), %edi
	leaq	-104(%rbp), %rcx
	leaq	-80(%rbp), %r8
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_knav_pool_desc_map
	jmp	LBB0_17
LBB0_15:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_17:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_18:
	movq	%r15, %rdi
	callq	_skb_shinfo
	cmpq	$0, 8(%rax)
	je	LBB0_23
## %bb.19:
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err_ratelimited
LBB0_20:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_netcp_free_tx_desc_chain
	xorl	%r12d, %r12d
	jmp	LBB0_24
LBB0_23:
	xorl	%edi, %edi
	cmpl	(%r15), %r14d
	setne	%dil
	callq	_WARN_ON
	movq	_KNAV_DMA_DESC_PKT_LEN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movl	%r14d, -48(%rbp)
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_set_words
LBB0_24:
	movq	%r12, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map skb buffer\n"

L_.str.1:                               ## @.str.1
	.asciz	"out of TX desc\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to map skb page\n"

L_.str.3:                               ## @.str.3
	.asciz	"out of TX desc for frags\n"

L_.str.4:                               ## @.str.4
	.asciz	"NETIF_F_FRAGLIST not supported\n"

	.comm	_KNAV_DMA_DESC_PKT_LEN_MASK,4,2 ## @KNAV_DMA_DESC_PKT_LEN_MASK
	.no_dead_strip	_netcp_tx_map_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netcp_tx_map_skb
_netcp_tx_map_skb:                      ; @netcp_tx_map_skb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x28, x1
	mov	x22, x0
	bl	_skb_headlen
	mov	x27, x0
	ldr	x19, [x28, #8]
	ldr	w1, [x22, #4]
Lloh0:
	adrp	x20, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x2, x27
	bl	_dma_map_single
	mov	x24, x0
	str	x0, [sp, #48]
	mov	x0, x19
	mov	x1, x24
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x28]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x23, #0
	b	LBB0_22
LBB0_2:
	ldr	w0, [x28, #4]
	bl	_knav_pool_desc_get
	mov	x23, x0
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x28]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x27
	bl	_dma_unmap_single
	mov	x23, #0
	b	LBB0_22
LBB0_4:
	mov	x0, x24
	mov	x1, x27
	mov	w2, #0
	mov	x3, x23
	bl	_set_pkt_info
	mov	x0, x22
	bl	_skb_is_nonlinear
	cbz	x0, LBB0_12
; %bb.5:
	mov	x0, x22
	bl	_skb_shinfo
	bl	_prefetchw
	mov	x0, x22
	bl	_skb_shinfo
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.6:
	stp	x28, x19, [sp, #8]              ; 16-byte Folded Spill
	mov	x20, #0
	mov	x21, #0
	mov	x24, x23
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	mov	x0, x22
	bl	_skb_shinfo
	ldrsw	x8, [x0]
	add	x20, x20, #4
	mov	x24, x25
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x19, x27
	mov	x0, x22
	bl	_skb_shinfo
	ldr	x8, [x0, #16]
	add	x25, x8, x20
	mov	x0, x25
	bl	_skb_frag_page
	mov	x27, x0
	mov	x0, x25
	bl	_skb_frag_off
	mov	x28, x0
	mov	x0, x25
	bl	_skb_frag_size
	mov	x26, x0
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x28
	mov	x3, x26
	bl	_dma_map_page
	mov	x27, x0
	str	x0, [sp, #48]
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w0, [x28, #4]
	bl	_knav_pool_desc_get
	mov	x25, x0
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x28, #4]
	mov	x1, x25
	bl	_knav_pool_desc_virt_to_dma
	str	x0, [sp, #32]
	mov	x0, x27
	mov	x1, x26
	mov	w2, #0
	mov	x3, x25
	bl	_set_pkt_info
	ldr	x8, [sp, #32]
	str	w8, [sp, #28]
	add	x2, x24, #8
	add	x0, sp, #28
	mov	w1, #1
	bl	_set_words
	mov	x27, x19
	add	w27, w19, w26
	str	w27, [sp, #60]
	cmp	x24, x23
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x28, #4]
	add	x3, sp, #32
	add	x4, sp, #44
	mov	x1, x24
	mov	w2, #16
	bl	_knav_pool_desc_map
	b	LBB0_7
LBB0_12:
	str	xzr, [x23, #8]
	b	LBB0_21
LBB0_13:
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w0, [x28]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_20
LBB0_14:
	ldr	w0, [x28]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x27
	mov	x2, x26
	bl	_dma_unmap_page
	b	LBB0_20
LBB0_15:
	cmp	x25, x23
	b.eq	LBB0_17
; %bb.16:
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w0, [x28, #4]
	add	x3, sp, #48
	add	x4, sp, #44
	mov	x1, x25
	mov	w2, #16
	bl	_knav_pool_desc_map
	b	LBB0_18
LBB0_17:
	ldr	x28, [sp, #8]                   ; 8-byte Folded Reload
LBB0_18:
	mov	x0, x22
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_21
; %bb.19:
	ldr	w0, [x28]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_20:
	mov	x0, x28
	mov	x1, x23
	mov	w2, #16
	bl	_netcp_free_tx_desc_chain
	mov	x23, #0
	b	LBB0_22
LBB0_21:
	ldr	w8, [x22]
	cmp	w27, w8
	cset	w0, ne
	bl	_WARN_ON
Lloh18:
	adrp	x8, _KNAV_DMA_DESC_PKT_LEN_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _KNAV_DMA_DESC_PKT_LEN_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w8, w27, w8
	str	w8, [sp, #60]
	add	x0, sp, #60
	mov	w1, #1
	mov	x2, x23
	bl	_set_words
LBB0_22:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map skb buffer\n"

l_.str.1:                               ; @.str.1
	.asciz	"out of TX desc\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to map skb page\n"

l_.str.3:                               ; @.str.3
	.asciz	"out of TX desc for frags\n"

l_.str.4:                               ; @.str.4
	.asciz	"NETIF_F_FRAGLIST not supported\n"

	.comm	_KNAV_DMA_DESC_PKT_LEN_MASK,4,2 ; @KNAV_DMA_DESC_PKT_LEN_MASK
	.no_dead_strip	_netcp_tx_map_skb
.subsections_via_symbols
