	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ena_com_prepare_tx             ## -- Begin function ena_com_prepare_tx
	.p2align	4, 0x90
_ena_com_prepare_tx:                    ## @ena_com_prepare_tx
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	56(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	48(%rsi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r14d
	movl	4(%rsi), %r12d
	movl	(%rdi), %r13d
	movq	8(%rdi), %rax
	movq	_ENA_COM_IO_QUEUE_DIRECTION_TX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	leal	1(%r12), %esi
	movq	%r15, %rdi
	callq	_ena_com_sq_have_enough_space
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	16(%r15), %r14d
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	16(%r15), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	jmp	LBB0_5
LBB0_4:
	movq	24(%r15), %rax
	movq	_ENA_ADMIN_PLACEMENT_POLICY_DEV@GOTPCREL(%rip), %rcx
	xorq	(%rcx), %rax
	xorl	%edi, %edi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	orq	%rbx, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
LBB0_8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_ena_com_write_header_to_bounce
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.10:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 40(%rbx)
	je	LBB0_15
## %bb.11:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ena_com_meta_desc_changed
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ena_com_create_and_store_tx_meta_desc
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.13:
	movb	$1, %r13b
	jmp	LBB0_16
LBB0_15:
	xorl	%r13d, %r13d
LBB0_16:
	xorl	%edi, %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	orl	%r14d, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	%r15, %rdi
	je	LBB0_19
## %bb.17:
	callq	_ena_com_close_bounce_buffer
	movl	(%r15), %ecx
	subl	%ebx, %ecx
LBB0_18:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	jmp	LBB0_8
LBB0_19:
	callq	_get_sq_desc
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_21
LBB0_20:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_21:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	testb	%r13b, %r13b
	je	LBB0_23
## %bb.22:
	movl	(%r12), %eax
	jmp	LBB0_24
LBB0_23:
	movq	_ENA_ETH_IO_TX_DESC_FIRST_MASK@GOTPCREL(%rip), %rcx
	movl	(%r12), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r12)
LBB0_24:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movq	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	orl	%r14d, 4(%r12)
	movl	32(%r15), %esi
	movq	_ENA_ETH_IO_TX_DESC_PHASE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_ENA_ETH_IO_TX_DESC_PHASE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	orl	%eax, %esi
	movl	%esi, (%r12)
	movq	_ENA_ETH_IO_TX_DESC_COMP_REQ_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%esi, (%r12)
	movq	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movl	8(%r8), %eax
	movl	%eax, %edi
	shll	%cl, %edi
	movq	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edi
	movl	12(%r8), %edx
	orl	8(%r12), %edi
	movq	_ENA_ETH_IO_TX_DESC_DF_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_ENA_ETH_IO_TX_DESC_DF_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%edi, %edx
	movl	%edx, 8(%r12)
	sarl	$10, %eax
	movq	_ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_ENA_ETH_IO_TX_DESC_REQ_ID_HI_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	%esi, %eax
	movl	%eax, (%r12)
	cmpq	$0, 40(%r8)
	je	LBB0_26
## %bb.25:
	movq	_ENA_ETH_IO_TX_DESC_TSO_EN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	16(%r8), %esi
	movl	24(%r8), %edi
	shll	%cl, %esi
	movq	_ENA_ETH_IO_TX_DESC_TSO_EN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movq	_ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edi
	movq	_ENA_ETH_IO_TX_DESC_L3_CSUM_EN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	28(%r8), %ebx
	shll	%cl, %ebx
	orl	%edx, %esi
	movq	_ENA_ETH_IO_TX_DESC_L3_CSUM_EN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movq	_ENA_ETH_IO_TX_DESC_L3_PROTO_IDX_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	20(%r8), %ecx
	orl	%ecx, %edi
	orl	%edi, %ebx
	movl	32(%r8), %edx
	movq	_ENA_ETH_IO_TX_DESC_L4_CSUM_EN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_ENA_ETH_IO_TX_DESC_L4_CSUM_EN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%ebx, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	orl	%esi, %edx
	movl	36(%r8), %esi
	movq	_ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	orl	%edx, %esi
	movl	%esi, 8(%r12)
LBB0_26:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_35
## %bb.27:
	xorl	%r14d, %r14d
	movq	_ENA_ETH_IO_TX_DESC_LENGTH_MASK@GOTPCREL(%rip), %r13
	jmp	LBB0_30
LBB0_28:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	(%r12), %eax
LBB0_29:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	(%r13), %ecx
	andl	(%rbx,%r14,8), %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r12)
	movq	40(%r15), %rdi
	decq	%rdi
	movl	$32, %esi
	callq	_GENMASK_ULL
	movslq	4(%rbx,%r14,8), %rax
	movq	%rax, 16(%r12)
	incq	%r14
	cmpl	%r14d, -64(%rbp)                ## 4-byte Folded Reload
	je	LBB0_34
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	testl	%r14d, %r14d
	setne	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_28
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r15, %rdi
	callq	_ena_com_sq_update_tail
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r15, %rdi
	callq	_get_sq_desc
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_20
## %bb.33:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	32(%r15), %eax
	movq	_ENA_ETH_IO_TX_DESC_PHASE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	movq	_ENA_ETH_IO_TX_DESC_PHASE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	(%r12), %eax
	movl	%eax, (%r12)
	jmp	LBB0_29
LBB0_34:
	movl	(%r12), %eax
LBB0_35:
	movq	_ENA_ETH_IO_TX_DESC_LAST_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_ena_com_sq_update_tail
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.36:
	movq	%r15, %rdi
	callq	_ena_com_close_bounce_buffer
	movl	(%r15), %ecx
	subl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENA_COM_IO_QUEUE_DIRECTION_TX,8,3 ## @ENA_COM_IO_QUEUE_DIRECTION_TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong Q type"

L_.str.1:                               ## @.str.1
	.asciz	"Not enough space in the tx queue\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"header size is too large %d max header: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENA_ADMIN_PLACEMENT_POLICY_DEV,8,3 ## @ENA_ADMIN_PLACEMENT_POLICY_DEV
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ENA_ETH_IO_TX_DESC_FIRST_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_FIRST_MASK
	.comm	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT,4,2 ## @ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK
	.comm	_ENA_ETH_IO_TX_DESC_PHASE_SHIFT,4,2 ## @ENA_ETH_IO_TX_DESC_PHASE_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_PHASE_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_PHASE_MASK
	.comm	_ENA_ETH_IO_TX_DESC_COMP_REQ_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_COMP_REQ_MASK
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT,4,2 ## @ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK
	.comm	_ENA_ETH_IO_TX_DESC_DF_SHIFT,4,2 ## @ENA_ETH_IO_TX_DESC_DF_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_DF_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_DF_MASK
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT,4,2 ## @ENA_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_LENGTH_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_LENGTH_MASK
	.comm	_ENA_ETH_IO_TX_DESC_ADDR_HI_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_ADDR_HI_MASK
	.comm	_ENA_ETH_IO_TX_DESC_LAST_MASK,4,2 ## @ENA_ETH_IO_TX_DESC_LAST_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ena_com_prepare_tx             ; -- Begin function ena_com_prepare_tx
	.p2align	2
_ena_com_prepare_tx:                    ; @ena_com_prepare_tx
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x22, x25, [x1, #48]
	ldp	w23, w26, [x1]
	ldr	w24, [x0]
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _ENA_COM_IO_QUEUE_DIRECTION_TX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENA_COM_IO_QUEUE_DIRECTION_TX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	add	w1, w26, #1
	mov	x0, x20
	bl	_ena_com_sq_have_enough_space
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	ldr	w8, [x20, #16]
	cmp	w23, w8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x20, #16]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_pr_err
	b	LBB0_5
LBB0_4:
	ldr	x8, [x20, #24]
Lloh11:
	adrp	x9, _ENA_ADMIN_PLACEMENT_POLICY_DEV@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ENA_ADMIN_PLACEMENT_POLICY_DEV@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x22, #0, #0, eq
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_9
LBB0_5:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
LBB0_8:
	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
LBB0_9:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_ena_com_write_header_to_bounce
	mov	x22, x0
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.10:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_14
; %bb.11:
	mov	x0, x20
	mov	x1, x21
	bl	_ena_com_meta_desc_changed
	cbz	x0, LBB0_14
; %bb.12:
	mov	x0, x20
	mov	x1, x21
	bl	_ena_com_create_and_store_tx_meta_desc
	mov	x22, x0
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.13:
	mov	w27, #1
	b	LBB0_15
LBB0_14:
	mov	w27, #0
LBB0_15:
	orr	w8, w26, w23
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_17
LBB0_16:
	mov	x0, x20
	bl	_ena_com_close_bounce_buffer
	ldr	w8, [x20]
	sub	w8, w8, w24
	str	w8, [x19]
	b	LBB0_8
LBB0_17:
	mov	x0, x20
	bl	_get_sq_desc
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_19
LBB0_18:
Lloh16:
	adrp	x8, _EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
LBB0_19:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	cbz	w27, LBB0_21
; %bb.20:
	ldr	w8, [x22]
	b	LBB0_22
LBB0_21:
Lloh18:
	adrp	x8, _ENA_ETH_IO_TX_DESC_FIRST_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENA_ETH_IO_TX_DESC_FIRST_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_22:
Lloh21:
	adrp	x9, _ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w23, w9
Lloh24:
	adrp	x10, _ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK@GOTPAGE
Lloh25:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	and	w9, w9, w10
	ldp	w10, w11, [x22, #4]
	orr	w9, w10, w9
Lloh27:
	adrp	x23, _ENA_ETH_IO_TX_DESC_PHASE_SHIFT@GOTPAGE
Lloh28:
	ldr	x23, [x23, _ENA_ETH_IO_TX_DESC_PHASE_SHIFT@GOTPAGEOFF]
	ldr	w10, [x20, #32]
	ldr	w12, [x23]
	lsl	w10, w10, w12
Lloh29:
	adrp	x27, _ENA_ETH_IO_TX_DESC_PHASE_MASK@GOTPAGE
Lloh30:
	ldr	x27, [x27, _ENA_ETH_IO_TX_DESC_PHASE_MASK@GOTPAGEOFF]
	ldr	w12, [x27]
	and	w10, w10, w12
	orr	w8, w8, w10
	stp	w8, w9, [x22]
Lloh31:
	adrp	x9, _ENA_ETH_IO_TX_DESC_COMP_REQ_MASK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _ENA_ETH_IO_TX_DESC_COMP_REQ_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22]
Lloh34:
	adrp	x9, _ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	ldp	w10, w12, [x21, #8]
	lsl	w9, w10, w9
Lloh37:
	adrp	x13, _ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK@GOTPAGE
Lloh38:
	ldr	x13, [x13, _ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w13, [x13]
	and	w9, w9, w13
	orr	w9, w11, w9
Lloh40:
	adrp	x11, _ENA_ETH_IO_TX_DESC_DF_SHIFT@GOTPAGE
Lloh41:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_DF_SHIFT@GOTPAGEOFF]
Lloh42:
	ldr	w11, [x11]
	lsl	w11, w12, w11
Lloh43:
	adrp	x12, _ENA_ETH_IO_TX_DESC_DF_MASK@GOTPAGE
Lloh44:
	ldr	x12, [x12, _ENA_ETH_IO_TX_DESC_DF_MASK@GOTPAGEOFF]
Lloh45:
	ldr	w12, [x12]
	and	w11, w11, w12
	orr	w9, w11, w9
	str	w9, [x22, #8]
	asr	w10, w10, #10
Lloh46:
	adrp	x11, _ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT@GOTPAGE
Lloh47:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT@GOTPAGEOFF]
Lloh48:
	ldr	w11, [x11]
Lloh49:
	adrp	x12, _ENA_ETH_IO_TX_DESC_REQ_ID_HI_MASK@GOTPAGE
Lloh50:
	ldr	x12, [x12, _ENA_ETH_IO_TX_DESC_REQ_ID_HI_MASK@GOTPAGEOFF]
	lsl	w10, w10, w11
Lloh51:
	ldr	w11, [x12]
	and	w10, w10, w11
	orr	w8, w10, w8
	str	w8, [x22]
	ldr	x10, [x21, #40]
	cbz	x10, LBB0_24
; %bb.23:
Lloh52:
	adrp	x10, _ENA_ETH_IO_TX_DESC_TSO_EN_SHIFT@GOTPAGE
Lloh53:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_TSO_EN_SHIFT@GOTPAGEOFF]
Lloh54:
	ldr	w10, [x10]
	ldp	w11, w12, [x21, #16]
	lsl	w10, w11, w10
Lloh55:
	adrp	x11, _ENA_ETH_IO_TX_DESC_TSO_EN_MASK@GOTPAGE
Lloh56:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_TSO_EN_MASK@GOTPAGEOFF]
Lloh57:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
Lloh58:
	adrp	x10, _ENA_ETH_IO_TX_DESC_L3_PROTO_IDX_MASK@GOTPAGE
Lloh59:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_L3_PROTO_IDX_MASK@GOTPAGEOFF]
Lloh60:
	ldr	w10, [x10]
	and	w10, w10, w12
	orr	w9, w10, w9
Lloh61:
	adrp	x10, _ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_SHIFT@GOTPAGE
Lloh62:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_SHIFT@GOTPAGEOFF]
Lloh63:
	ldr	w10, [x10]
	ldp	w11, w12, [x21, #24]
	lsl	w10, w11, w10
Lloh64:
	adrp	x11, _ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_MASK@GOTPAGE
Lloh65:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_L4_PROTO_IDX_MASK@GOTPAGEOFF]
Lloh66:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
Lloh67:
	adrp	x10, _ENA_ETH_IO_TX_DESC_L3_CSUM_EN_SHIFT@GOTPAGE
Lloh68:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_L3_CSUM_EN_SHIFT@GOTPAGEOFF]
Lloh69:
	ldr	w10, [x10]
	lsl	w10, w12, w10
Lloh70:
	adrp	x11, _ENA_ETH_IO_TX_DESC_L3_CSUM_EN_MASK@GOTPAGE
Lloh71:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_L3_CSUM_EN_MASK@GOTPAGEOFF]
Lloh72:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
Lloh73:
	adrp	x10, _ENA_ETH_IO_TX_DESC_L4_CSUM_EN_SHIFT@GOTPAGE
Lloh74:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_L4_CSUM_EN_SHIFT@GOTPAGEOFF]
Lloh75:
	ldr	w10, [x10]
	ldp	w11, w12, [x21, #32]
	lsl	w10, w11, w10
Lloh76:
	adrp	x11, _ENA_ETH_IO_TX_DESC_L4_CSUM_EN_MASK@GOTPAGE
Lloh77:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_L4_CSUM_EN_MASK@GOTPAGEOFF]
Lloh78:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
Lloh79:
	adrp	x10, _ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_SHIFT@GOTPAGE
Lloh80:
	ldr	x10, [x10, _ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_SHIFT@GOTPAGEOFF]
Lloh81:
	ldr	w10, [x10]
	lsl	w10, w12, w10
Lloh82:
	adrp	x11, _ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_MASK@GOTPAGE
Lloh83:
	ldr	x11, [x11, _ENA_ETH_IO_TX_DESC_L4_CSUM_PARTIAL_MASK@GOTPAGEOFF]
Lloh84:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
	str	w9, [x22, #8]
LBB0_24:
	cmp	w26, #1
	b.lt	LBB0_33
; %bb.25:
	mov	w21, #0
Lloh85:
	adrp	x28, _ENA_ETH_IO_TX_DESC_LENGTH_MASK@GOTPAGE
Lloh86:
	ldr	x28, [x28, _ENA_ETH_IO_TX_DESC_LENGTH_MASK@GOTPAGEOFF]
	b	LBB0_28
LBB0_26:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x22]
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w9, [x25]
	ldr	w10, [x28]
	and	w9, w10, w9
	orr	w8, w8, w9
	str	w8, [x22]
	ldr	x8, [x20, #40]
	sub	x0, x8, #1
	mov	w1, #32
	bl	_GENMASK_ULL
	ldrsw	x8, [x25, #4]
	str	x8, [x22, #16]
	add	w21, w21, #1
	add	x25, x25, #8
	cmp	w26, w21
	b.eq	LBB0_32
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	cmp	w21, #0
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_26
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	x0, x20
	bl	_ena_com_sq_update_tail
	mov	x22, x0
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	x0, x20
	bl	_get_sq_desc
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_18
; %bb.31:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	x0, x22
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x20, #32]
	ldr	w9, [x23]
	lsl	w8, w8, w9
	ldr	w9, [x27]
	and	w8, w8, w9
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	b	LBB0_27
LBB0_32:
	ldr	w8, [x22]
LBB0_33:
Lloh87:
	adrp	x9, _ENA_ETH_IO_TX_DESC_LAST_MASK@GOTPAGE
Lloh88:
	ldr	x9, [x9, _ENA_ETH_IO_TX_DESC_LAST_MASK@GOTPAGEOFF]
Lloh89:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x22]
	mov	x0, x20
	bl	_ena_com_sq_update_tail
	mov	x22, x0
	bl	_unlikely
	cbnz	x0, LBB0_7
	b	LBB0_16
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.cfi_endproc
                                        ; -- End function
	.comm	_ENA_COM_IO_QUEUE_DIRECTION_TX,8,3 ; @ENA_COM_IO_QUEUE_DIRECTION_TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong Q type"

l_.str.1:                               ; @.str.1
	.asciz	"Not enough space in the tx queue\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"header size is too large %d max header: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENA_ADMIN_PLACEMENT_POLICY_DEV,8,3 ; @ENA_ADMIN_PLACEMENT_POLICY_DEV
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ENA_ETH_IO_TX_DESC_FIRST_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_FIRST_MASK
	.comm	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT,4,2 ; @ENA_ETH_IO_TX_DESC_HEADER_LENGTH_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_HEADER_LENGTH_MASK
	.comm	_ENA_ETH_IO_TX_DESC_PHASE_SHIFT,4,2 ; @ENA_ETH_IO_TX_DESC_PHASE_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_PHASE_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_PHASE_MASK
	.comm	_ENA_ETH_IO_TX_DESC_COMP_REQ_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_COMP_REQ_MASK
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT,4,2 ; @ENA_ETH_IO_TX_DESC_REQ_ID_LO_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_REQ_ID_LO_MASK
	.comm	_ENA_ETH_IO_TX_DESC_DF_SHIFT,4,2 ; @ENA_ETH_IO_TX_DESC_DF_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_DF_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_DF_MASK
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT,4,2 ; @ENA_ETH_IO_TX_DESC_REQ_ID_HI_SHIFT
	.comm	_ENA_ETH_IO_TX_DESC_REQ_ID_HI_MASK,4,2 ; @ENA_ETH_IO_TX_DESC_REQ_ID_HI_MASK
	.comm	_ENA_ETH_IO_TX_DESC_TSO_EN_SHIFT,4,2 ; @ENA_ETH_IO_T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