	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_tso_eth_seg
_set_tso_eth_seg:                       ## @set_tso_eth_seg
	.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, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	16(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rax
	movl	(%rax), %edi
	callq	_to_mctx
	movq	(%r15), %rcx
	movq	_MLX5_ETH_L2_MIN_HEADER_SIZE@GOTPCREL(%rip), %rdx
	movl	$1, %edi
	cmpq	(%rdx), %rcx
	jl	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	(%rbx), %rcx
	setg	%dil
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r13
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MLX5_DBG_QP_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX5_ETH_L2_MIN_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_mlx5_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movq	(%r15), %r13
	movq	8(%r15), %rdi
	callq	_htobe16
	movq	%rax, 16(%r12)
	movq	(%r15), %rdi
	callq	_htobe16
	movq	%rax, 8(%r12)
	subq	(%r12), %r14
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_min
	movq	%rax, %r14
	movq	(%r12), %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	leaq	-8(%r14), %rbx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_align
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rcx
	cltq
	addq	%rcx, %rax
	addq	$-16, %rax
	movq	%rax, (%r12)
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_align
                                        ## kill: def $eax killed $eax def $rax
	leal	15(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$4, %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	addl	%ecx, %eax
	decl	%eax
	movl	%eax, (%rbx)
	xorl	%edi, %edi
	subq	%r14, %r13
	setg	%dil
	callq	_unlikely
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_mlx5_get_send_wqe
	movq	%rax, (%r12)
	addq	%r14, %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_align
	cltq
	addq	%rax, (%r12)
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_align
                                        ## kill: def $eax killed $eax def $rax
	leal	15(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$4, %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%ecx, (%rax)
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ETH_L2_MIN_HEADER_SIZE,8,3 ## @MLX5_ETH_L2_MIN_HEADER_SIZE
	.comm	_MLX5_DBG_QP_SEND,4,2           ## @MLX5_DBG_QP_SEND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSO header size should be at least %d and at most %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_set_tso_eth_seg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_tso_eth_seg
_set_tso_eth_seg:                       ; @set_tso_eth_seg
	.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	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	ldr	x26, [x0]
	ldr	x22, [x1, #16]
	ldr	x8, [x3, #8]
	ldr	w0, [x8]
	bl	_to_mctx
	ldr	x8, [x24]
Lloh0:
	adrp	x27, _MLX5_ETH_L2_MIN_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MLX5_ETH_L2_MIN_HEADER_SIZE@GOTPAGEOFF]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	mov	w8, #1
	b	LBB0_3
LBB0_2:
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w8, gt
LBB0_3:
	ldr	x25, [x0]
	mov	x0, x8
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _MLX5_DBG_QP_SEND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX5_DBG_QP_SEND@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x3, [x27]
	ldr	x4, [x21]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x25
	bl	_mlx5_dbg
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_5:
	ldp	x25, x0, [x24]
	bl	_htobe16
	str	x0, [x26, #16]
	ldr	x0, [x24]
	bl	_htobe16
	str	x0, [x26, #8]
	ldr	x8, [x26]
	sub	x0, x23, x8
	mov	x1, x25
	bl	_min
	mov	x23, x0
	ldr	x0, [x26]
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	sub	x24, x23, #8
	mov	x0, x24
	mov	w1, #16
	bl	_align
	sub	w8, w0, #16
	ldr	x9, [x20]
	add	x8, x9, w8, sxtw
	str	x8, [x20]
	mov	x0, x24
	mov	w1, #16
	bl	_align
	add	w8, w0, #15
	cmp	w0, #0
	csel	w8, w8, w0, lt
	ldr	w9, [x19]
	add	w8, w9, w8, asr #4
	sub	w8, w8, #1
	str	w8, [x19]
	subs	x24, x25, x23
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	w1, #0
	bl	_mlx5_get_send_wqe
	str	x0, [x20]
	add	x1, x22, x23
	mov	x2, x24
	bl	_memcpy
	mov	x0, x24
	mov	w1, #16
	bl	_align
	ldr	x8, [x20]
	add	x8, x8, w0, sxtw
	str	x8, [x20]
	mov	x0, x24
	mov	w1, #16
	bl	_align
	mov	x8, x0
	mov	w0, #0
	add	w9, w8, #15
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x19]
	add	w8, w9, w8, asr #4
	str	w8, [x19]
LBB0_7:
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ETH_L2_MIN_HEADER_SIZE,8,3 ; @MLX5_ETH_L2_MIN_HEADER_SIZE
	.comm	_MLX5_DBG_QP_SEND,4,2           ; @MLX5_DBG_QP_SEND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSO header size should be at least %d and at most %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_set_tso_eth_seg
.subsections_via_symbols
