	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvswitch_mangle_tx
_mvswitch_mangle_tx:                    ## @mvswitch_mangle_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	xorl	%edi, %edi
	cmpl	$16, (%rbx)
	setl	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.2:
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	___vlan_get_tag
	testq	%rax, %rax
	jne	LBB0_17
## %bb.3:
	movslq	-36(%rbp), %rax
	movl	$1, %edi
	cmpq	$15, %rax
	jg	LBB0_5
## %bb.4:
	movq	(%r15), %rcx
	xorl	%edi, %edi
	cmpl	$0, (%rcx,%rax,4)
	sete	%dil
LBB0_5:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
LBB0_17:
	movq	%rbx, %rdi
	callq	_dev_kfree_skb_any
	xorl	%ebx, %ebx
LBB0_18:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%rbx), %eax
	cmpl	$64, %eax
	jg	LBB0_9
## %bb.7:
	movq	_MV_TRAILER_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	subl	%eax, %edx
	addl	$64, %edx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pskb_expand_head
	testq	%rax, %rax
	jne	LBB0_15
## %bb.8:
	movq	8(%rbx), %rsi
	leaq	64(%rsi), %r14
	movl	(%r12), %eax
	addl	$64, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_13
LBB0_9:
	movq	%rbx, %rdi
	callq	_skb_cloned
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_skb_tailroom
	xorl	%edi, %edi
	cmpl	$4, %eax
	setl	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_pskb_expand_head
	testq	%rax, %rax
	je	LBB0_12
LBB0_15:
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	jmp	LBB0_17
LBB0_12:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_skb_put
	movq	%rax, %r14
	movq	8(%rbx), %rsi
LBB0_13:
	leaq	4(%rsi), %rdi
	movl	$12, %edx
	callq	_memmove
	addq	$4, 8(%rbx)
	addl	$-4, (%rbx)
	addl	$4, 16(%rbx)
	testq	%r14, %r14
	je	LBB0_17
## %bb.14:
	movq	_MV_TRAILER_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MV_TRAILER_FLAGS_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	(%r15), %rcx
	movslq	-36(%rbp), %rdx
	movq	_MV_TRAILER_PORTS_M@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	andl	(%rcx,%rdx,4), %edi
	movq	_MV_TRAILER_PORTS_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	orl	%eax, %edi
	callq	_cpu_to_be32
	movl	%eax, (%r14)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_TRAILER_SIZE,4,2            ## @MV_TRAILER_SIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_MV_TRAILER_OVERRIDE,4,2        ## @MV_TRAILER_OVERRIDE
	.comm	_MV_TRAILER_FLAGS_S,4,2         ## @MV_TRAILER_FLAGS_S
	.comm	_MV_TRAILER_PORTS_M,4,2         ## @MV_TRAILER_PORTS_M
	.comm	_MV_TRAILER_PORTS_S,4,2         ## @MV_TRAILER_PORTS_S
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: failed to expand/update skb for the switch\n"

	.comm	_MV_HEADER_PORTS_M,4,2          ## @MV_HEADER_PORTS_M
	.comm	_MV_HEADER_PORTS_S,4,2          ## @MV_HEADER_PORTS_S
	.comm	_MV_HEADER_SIZE,8,3             ## @MV_HEADER_SIZE
	.comm	_MV_HEADER_VLAN_M,4,2           ## @MV_HEADER_VLAN_M
	.comm	_MV_HEADER_VLAN_S,4,2           ## @MV_HEADER_VLAN_S
	.no_dead_strip	_mvswitch_mangle_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvswitch_mangle_tx
_mvswitch_mangle_tx:                    ; @mvswitch_mangle_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	ldr	x21, [x0, #8]
	cmp	x21, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #16
	cset	w0, lt
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.2:
	add	x1, sp, #12
	mov	x0, x19
	bl	___vlan_get_tag
	cbnz	x0, LBB0_7
; %bb.3:
	ldrsw	x8, [sp, #12]
	cmp	w8, #15
	b.le	LBB0_5
; %bb.4:
	mov	w0, #1
	b	LBB0_6
LBB0_5:
	ldr	x9, [x21]
	ldr	w8, [x9, x8, lsl #2]
	cmp	w8, #0
	cset	w0, eq
LBB0_6:
	bl	_unlikely
	cbz	x0, LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_dev_kfree_skb_any
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	ldr	w8, [x19]
	cmp	w8, #64
	b.gt	LBB0_12
; %bb.10:
Lloh0:
	adrp	x22, _MV_TRAILER_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MV_TRAILER_SIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	sub	w8, w9, w8
	add	w2, w8, #64
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_pskb_expand_head
	cbnz	x0, LBB0_15
; %bb.11:
	ldr	x1, [x19, #8]
	add	x20, x1, #64
	ldr	w8, [x22]
	add	w8, w8, #64
	str	w8, [x19]
	b	LBB0_18
LBB0_12:
	mov	x0, x19
	bl	_skb_cloned
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_skb_tailroom
	cmp	w0, #4
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_17
LBB0_14:
Lloh5:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	w2, #4
	bl	_pskb_expand_head
	cbz	x0, LBB0_17
LBB0_15:
	bl	_net_ratelimit
	cbz	x0, LBB0_7
; %bb.16:
	ldr	w1, [x20]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	b	LBB0_7
LBB0_17:
	mov	x0, x19
	mov	w1, #4
	bl	_skb_put
	mov	x20, x0
	ldr	x1, [x19, #8]
LBB0_18:
	add	x0, x1, #4
	mov	w2, #12
	bl	_memmove
	ldr	x8, [x19, #8]
	add	x8, x8, #4
	str	x8, [x19, #8]
	ldr	w8, [x19]
	sub	w8, w8, #4
	str	w8, [x19]
	ldr	w8, [x19, #16]
	add	w8, w8, #4
	str	w8, [x19, #16]
	cbz	x20, LBB0_7
; %bb.19:
Lloh10:
	adrp	x8, _MV_TRAILER_OVERRIDE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MV_TRAILER_OVERRIDE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _MV_TRAILER_FLAGS_S@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MV_TRAILER_FLAGS_S@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	x9, [x21]
	ldrsw	x10, [sp, #12]
	ldr	w9, [x9, x10, lsl #2]
Lloh16:
	adrp	x10, _MV_TRAILER_PORTS_M@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MV_TRAILER_PORTS_M@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh19:
	adrp	x10, _MV_TRAILER_PORTS_S@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MV_TRAILER_PORTS_S@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w0, w9, w8
	bl	_cpu_to_be32
	str	w0, [x20]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_TRAILER_SIZE,4,2            ; @MV_TRAILER_SIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_MV_TRAILER_OVERRIDE,4,2        ; @MV_TRAILER_OVERRIDE
	.comm	_MV_TRAILER_FLAGS_S,4,2         ; @MV_TRAILER_FLAGS_S
	.comm	_MV_TRAILER_PORTS_M,4,2         ; @MV_TRAILER_PORTS_M
	.comm	_MV_TRAILER_PORTS_S,4,2         ; @MV_TRAILER_PORTS_S
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to expand/update skb for the switch\n"

	.comm	_MV_HEADER_PORTS_M,4,2          ; @MV_HEADER_PORTS_M
	.comm	_MV_HEADER_PORTS_S,4,2          ; @MV_HEADER_PORTS_S
	.comm	_MV_HEADER_SIZE,8,3             ; @MV_HEADER_SIZE
	.comm	_MV_HEADER_VLAN_M,4,2           ; @MV_HEADER_VLAN_M
	.comm	_MV_HEADER_VLAN_S,4,2           ; @MV_HEADER_VLAN_S
	.no_dead_strip	_mvswitch_mangle_tx
.subsections_via_symbols
