	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5e_txwqe_build_dsegs
_mlx5e_txwqe_build_dsegs:               ## @mlx5e_txwqe_build_dsegs
	.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	%r8, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r13d
	movl	4(%rbx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rdx, %rsi
	movl	%r13d, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	xorl	%esi, %esi
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	movl	%r14d, %edi
	callq	_cpu_to_be64
	movq	%rax, 16(%r12)
	movl	(%rbx), %eax
	movl	%eax, 8(%r12)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, (%r12)
	movq	_MLX5E_DMA_MAP_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_mlx5e_dma_push
	addq	$24, %r12
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_4
LBB0_1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movq	%r15, %r12
	movq	%r15, %rdi
	callq	_skb_shinfo
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.6:
	addq	$16, -56(%rbp)                  ## 8-byte Folded Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_skb_shinfo
	movq	8(%rax), %r15
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	addq	%r14, %r15
	movq	%r15, %rdi
	callq	_skb_frag_size
	movl	%eax, %r13d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	callq	_skb_frag_dma_map
	movl	%eax, %ebx
	movl	4(%r14), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	callq	_cpu_to_be64
	movq	%r12, %r15
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, (%r12)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %eax
	movl	%eax, -8(%r12)
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	%rax, -16(%r12)
	movq	_MLX5E_DMA_MAP_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_mlx5e_dma_push
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	%r15, %rdi
	callq	_skb_shinfo
	movslq	(%rax), %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	addq	$4, %r14
	addq	$24, %r12
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rbx
	movq	%r15, %r12
	jl	LBB0_7
## %bb.9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%ebx, %eax
	jmp	LBB0_12
LBB0_5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_10:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addl	-72(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movq	%rbx, %rdi
	callq	_mlx5e_dma_unmap_wqe_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$40, %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
	.comm	_MLX5E_DMA_MAP_SINGLE,4,2       ## @MLX5E_DMA_MAP_SINGLE
	.comm	_MLX5E_DMA_MAP_PAGE,4,2         ## @MLX5E_DMA_MAP_PAGE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx5e_txwqe_build_dsegs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5e_txwqe_build_dsegs
_mlx5e_txwqe_build_dsegs:               ; @mlx5e_txwqe_build_dsegs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	mov	x21, x3
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	cbz	w3, LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
	ldr	w3, [x24]
	mov	x1, x2
	mov	x2, x21
	bl	_dma_map_single
	mov	x23, x0
	ldr	w0, [x19, #4]
	mov	x1, x23
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
	mov	w1, #0
	b	LBB0_10
LBB0_3:
	mov	x0, x23
	bl	_cpu_to_be64
	str	x0, [x22, #16]
	ldr	w8, [x19]
	str	w8, [x22, #8]
	mov	x0, x21
	bl	_cpu_to_be32
	str	x0, [x22], #24
Lloh2:
	adrp	x8, _MLX5E_DMA_MAP_SINGLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX5E_DMA_MAP_SINGLE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_mlx5e_dma_push
	mov	w21, #1
LBB0_4:
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	mov	x26, #0
	mov	x25, #0
	add	x27, x22, #16
Lloh5:
	adrp	x28, _MLX5E_DMA_MAP_PAGE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _MLX5E_DMA_MAP_PAGE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x23, x8, x26
	mov	x0, x23
	bl	_skb_frag_size
	mov	x22, x0
	ldr	w0, [x19, #4]
	ldr	w4, [x24]
	mov	x1, x23
	mov	w2, #0
	mov	x3, x22
	bl	_skb_frag_dma_map
	mov	x23, x0
	ldr	w0, [x19, #4]
	mov	x1, x23
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_cpu_to_be64
	str	x0, [x27]
	ldr	w8, [x19]
	stur	w8, [x27, #-8]
	mov	x0, x22
	bl	_cpu_to_be32
	stur	x0, [x27, #-16]
	ldr	w3, [x28]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_mlx5e_dma_push
	add	x25, x25, #1
	mov	x0, x20
	bl	_skb_shinfo
	ldrsw	x8, [x0]
	add	x26, x26, #4
	add	x27, x27, #24
	cmp	x25, x8
	b.lt	LBB0_6
; %bb.8:
	add	w21, w21, w25
	b	LBB0_11
LBB0_9:
	add	w1, w21, w25
LBB0_10:
	mov	x0, x19
	bl	_mlx5e_dma_unmap_wqe_err
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MLX5E_DMA_MAP_SINGLE,4,2       ; @MLX5E_DMA_MAP_SINGLE
	.comm	_MLX5E_DMA_MAP_PAGE,4,2         ; @MLX5E_DMA_MAP_PAGE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx5e_txwqe_build_dsegs
.subsections_via_symbols
