	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hinic_tx_offload
_hinic_tx_offload:                      ## @hinic_tx_offload
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	movq	%r13, %rdx
	callq	_offload_tso
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	movq	_TX_OFFLOAD_TSO@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r12d
LBB0_6:
	movq	%r13, %rdi
	callq	_skb_vlan_tag_present
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_skb_vlan_tag_get
	movq	_VLAN_PRIO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %ebx
	sarl	%cl, %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_offload_vlan
	movq	_TX_OFFLOAD_VLAN@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_8:
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_skb_network_offset
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_hinic_task_set_l2hdr
LBB0_10:
	movl	(%r14), %edi
	movq	_QUEUE_INFO_PLDOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_HINIC_SQ_CTRL_GET
	movq	_MAX_PAYLOAD_OFFSET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_11
## %bb.12:
	movl	(%r14), %edi
	movq	_QUEUE_INFO_MSS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_HINIC_SQ_CTRL_GET
	movq	_HINIC_MSS_MIN@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	cmpq	(%r12), %rax
	jge	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	movl	(%r15), %esi
	callq	_HINIC_SQ_CTRL_CLEAR
	movl	%eax, (%r14)
	movq	(%r12), %rdi
	movl	(%r15), %esi
	callq	_HINIC_SQ_CTRL_SET
	orl	%eax, (%r14)
	jmp	LBB0_14
LBB0_2:
	je	LBB0_3
LBB0_11:
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_offload_csum
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_TX_OFFLOAD_CSUM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_OFFLOAD_TSO,4,2             ## @TX_OFFLOAD_TSO
	.comm	_TX_OFFLOAD_CSUM,4,2            ## @TX_OFFLOAD_CSUM
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.comm	_VLAN_PRIO_SHIFT,4,2            ## @VLAN_PRIO_SHIFT
	.comm	_TX_OFFLOAD_VLAN,4,2            ## @TX_OFFLOAD_VLAN
	.comm	_QUEUE_INFO_PLDOFF,4,2          ## @QUEUE_INFO_PLDOFF
	.comm	_MAX_PAYLOAD_OFFSET,8,3         ## @MAX_PAYLOAD_OFFSET
	.comm	_QUEUE_INFO_MSS,4,2             ## @QUEUE_INFO_MSS
	.comm	_HINIC_MSS_MIN,8,3              ## @HINIC_MSS_MIN
	.no_dead_strip	_hinic_tx_offload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hinic_tx_offload
_hinic_tx_offload:                      ; @hinic_tx_offload
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	mov	x1, x2
	mov	x2, x21
	bl	_offload_tso
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _TX_OFFLOAD_TSO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TX_OFFLOAD_TSO@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
LBB0_2:
	mov	x0, x21
	bl	_skb_vlan_tag_present
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_skb_vlan_tag_get
	mov	x2, x0
Lloh3:
	adrp	x8, _VLAN_PRIO_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VLAN_PRIO_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w3, w0, w8
	mov	x0, x20
	mov	x1, x19
	bl	_offload_vlan
Lloh6:
	adrp	x8, _TX_OFFLOAD_VLAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TX_OFFLOAD_VLAN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_4:
	cbz	w22, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_skb_network_offset
	mov	x1, x0
	mov	x0, x20
	bl	_hinic_task_set_l2hdr
LBB0_6:
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _QUEUE_INFO_PLDOFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QUEUE_INFO_PLDOFF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_HINIC_SQ_CTRL_GET
Lloh12:
	adrp	x8, _MAX_PAYLOAD_OFFSET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_PAYLOAD_OFFSET@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.gt	LBB0_10
; %bb.7:
	ldr	w0, [x19]
Lloh15:
	adrp	x20, _QUEUE_INFO_MSS@GOTPAGE
Lloh16:
	ldr	x20, [x20, _QUEUE_INFO_MSS@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_HINIC_SQ_CTRL_GET
Lloh17:
	adrp	x21, _HINIC_MSS_MIN@GOTPAGE
Lloh18:
	ldr	x21, [x21, _HINIC_MSS_MIN@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ge	LBB0_11
; %bb.8:
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_HINIC_SQ_CTRL_CLEAR
	str	w0, [x19]
	ldr	x0, [x21]
	ldr	w1, [x20]
	bl	_HINIC_SQ_CTRL_SET
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_12
LBB0_9:
	cbz	w0, LBB0_13
LBB0_10:
Lloh19:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_offload_csum
Lloh22:
	adrp	x8, _TX_OFFLOAD_CSUM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TX_OFFLOAD_CSUM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w22, wzr, w8, eq
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_OFFLOAD_TSO,4,2             ; @TX_OFFLOAD_TSO
	.comm	_TX_OFFLOAD_CSUM,4,2            ; @TX_OFFLOAD_CSUM
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.comm	_VLAN_PRIO_SHIFT,4,2            ; @VLAN_PRIO_SHIFT
	.comm	_TX_OFFLOAD_VLAN,4,2            ; @TX_OFFLOAD_VLAN
	.comm	_QUEUE_INFO_PLDOFF,4,2          ; @QUEUE_INFO_PLDOFF
	.comm	_MAX_PAYLOAD_OFFSET,8,3         ; @MAX_PAYLOAD_OFFSET
	.comm	_QUEUE_INFO_MSS,4,2             ; @QUEUE_INFO_MSS
	.comm	_HINIC_MSS_MIN,8,3              ; @HINIC_MSS_MIN
	.no_dead_strip	_hinic_tx_offload
.subsections_via_symbols
