	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_handle_vtags
_hns3_handle_vtags:                     ## @hns3_handle_vtags
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	(%rsi), %rbx
	movq	_ETH_P_8021Q@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_htons
	cmpq	%rax, %rbx
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_skb_vlan_tag_present
	testq	%rax, %rax
	je	LBB0_18
LBB0_2:
	movq	%r14, %rdi
	callq	_skb_vlan_tagged_multi
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	(%r12), %rax
	movq	_HNAE3_PORT_BASE_VLAN_ENABLE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	jmp	LBB0_5
LBB0_3:
	xorl	%edi, %edi
LBB0_5:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_7:
	movq	(%r14), %rbx
	movl	(%r15), %edi
	callq	_htons
	cmpq	%rax, %rbx
	jne	LBB0_9
## %bb.8:
	movq	8(%r12), %rax
	movq	_NETIF_F_HW_VLAN_CTAG_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_17
LBB0_9:
	movq	%r14, %rdi
	callq	_skb_vlan_tag_present
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movq	(%r14), %rbx
	movl	(%r15), %edi
	callq	_htons
	cmpq	%rax, %rbx
	jne	LBB0_13
## %bb.11:
	movq	(%r12), %rax
	movq	_HNAE3_PORT_BASE_VLAN_DISABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_HNS3_OUTER_VLAN_TAG@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_HNS3_INNER_VLAN_TAG@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_vlan_get_protocol
	movq	%rax, (%r14)
	jmp	LBB0_19
LBB0_15:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_skb_cow_head
	movl	%eax, %ebx
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_19
## %bb.16:
	movl	8(%r14), %edi
	movq	_VLAN_PRIO_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	movq	16(%r14), %rbx
	movq	_VLAN_PRIO_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_cpu_to_be16
	orl	%eax, (%rbx)
LBB0_17:
	movq	%r14, %rdi
	callq	_vlan_get_protocol
	movq	%rax, (%r14)
LBB0_18:
	xorl	%ebx, %ebx
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_P_8021Q,4,2                ## @ETH_P_8021Q
	.comm	_HNAE3_PORT_BASE_VLAN_ENABLE,8,3 ## @HNAE3_PORT_BASE_VLAN_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NETIF_F_HW_VLAN_CTAG_TX,4,2    ## @NETIF_F_HW_VLAN_CTAG_TX
	.comm	_HNAE3_PORT_BASE_VLAN_DISABLE,8,3 ## @HNAE3_PORT_BASE_VLAN_DISABLE
	.comm	_HNS3_OUTER_VLAN_TAG,4,2        ## @HNS3_OUTER_VLAN_TAG
	.comm	_HNS3_INNER_VLAN_TAG,4,2        ## @HNS3_INNER_VLAN_TAG
	.comm	_VLAN_PRIO_SHIFT,4,2            ## @VLAN_PRIO_SHIFT
	.comm	_VLAN_PRIO_MASK,4,2             ## @VLAN_PRIO_MASK
	.no_dead_strip	_hns3_handle_vtags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_handle_vtags
_hns3_handle_vtags:                     ; @hns3_handle_vtags
	.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, x1
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	x22, [x1]
Lloh0:
	adrp	x21, _ETH_P_8021Q@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ETH_P_8021Q@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_htons
	cmp	x22, x0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_skb_vlan_tag_present
	cbz	x0, LBB0_12
LBB0_2:
	mov	x0, x19
	bl	_skb_vlan_tagged_multi
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _HNAE3_PORT_BASE_VLAN_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HNAE3_PORT_BASE_VLAN_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
LBB0_4:
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_6:
	ldr	x22, [x19]
	ldr	w0, [x21]
	bl	_htons
	cmp	x22, x0
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _NETIF_F_HW_VLAN_CTAG_TX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NETIF_F_HW_VLAN_CTAG_TX@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
LBB0_8:
	mov	x0, x19
	bl	_skb_vlan_tag_present
	cbz	x0, LBB0_15
; %bb.9:
	ldr	x22, [x19]
	ldr	w0, [x21]
	bl	_htons
	cmp	x22, x0
	b.ne	LBB0_13
; %bb.10:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _HNAE3_PORT_BASE_VLAN_DISABLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HNAE3_PORT_BASE_VLAN_DISABLE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
Lloh14:
	adrp	x8, _HNS3_OUTER_VLAN_TAG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HNS3_OUTER_VLAN_TAG@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	mov	w20, #0
	b	LBB0_19
LBB0_13:
Lloh16:
	adrp	x8, _HNS3_INNER_VLAN_TAG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HNS3_INNER_VLAN_TAG@GOTPAGEOFF]
LBB0_14:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_vlan_get_protocol
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	mov	w1, #0
	bl	_skb_cow_head
	mov	x20, x0
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.16:
	ldr	x20, [x19, #16]
	ldr	w8, [x19, #8]
Lloh18:
	adrp	x9, _VLAN_PRIO_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VLAN_PRIO_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh21:
	adrp	x9, _VLAN_PRIO_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VLAN_PRIO_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	and	w0, w8, w9
	bl	_cpu_to_be16
	ldr	w8, [x20]
	orr	w8, w8, w0
	str	w8, [x20]
LBB0_17:
	mov	x0, x19
	bl	_vlan_get_protocol
	mov	w20, #0
LBB0_18:
	str	x0, [x19]
LBB0_19:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_P_8021Q,4,2                ; @ETH_P_8021Q
	.comm	_HNAE3_PORT_BASE_VLAN_ENABLE,8,3 ; @HNAE3_PORT_BASE_VLAN_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NETIF_F_HW_VLAN_CTAG_TX,4,2    ; @NETIF_F_HW_VLAN_CTAG_TX
	.comm	_HNAE3_PORT_BASE_VLAN_DISABLE,8,3 ; @HNAE3_PORT_BASE_VLAN_DISABLE
	.comm	_HNS3_OUTER_VLAN_TAG,4,2        ; @HNS3_OUTER_VLAN_TAG
	.comm	_HNS3_INNER_VLAN_TAG,4,2        ; @HNS3_INNER_VLAN_TAG
	.comm	_VLAN_PRIO_SHIFT,4,2            ; @VLAN_PRIO_SHIFT
	.comm	_VLAN_PRIO_MASK,4,2             ; @VLAN_PRIO_MASK
	.no_dead_strip	_hns3_handle_vtags
.subsections_via_symbols
