	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ether_8021q_frame              ## -- Begin function ether_8021q_frame
	.p2align	4, 0x90
_ether_8021q_frame:                     ## @ether_8021q_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	_V_soft_pad@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movq	(%r15), %rax
	movq	_IFT_ETHER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.2:
	movq	_ETHERMIN@GOTPCREL(%rip), %rax
	movq	_ETHER_HDR_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	addl	(%rax), %r14d
	movq	(%rbx), %r12
	subl	4(%r12), %r14d
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.3:
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_min
	leaq	_ether_8021q_frame.pad(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_m_append
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	leaq	_ether_8021q_frame.pad(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$9, %r14d
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	$-8, %r14d
	movq	(%rbx), %r13
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_min
	movq	%r13, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_m_append
	testl	%eax, %eax
	jne	LBB0_5
LBB0_7:
	movq	(%rbx), %rdi
	callq	_m_freem
	movq	$0, (%rbx)
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_16
LBB0_8:
	movq	_vlan_mtag_pcp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.10:
	movq	(%rbx), %rdi
	movq	_MTAG_8021Q@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTAG_8021Q_PCP_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_m_tag_locate
	testq	%rax, %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_12
## %bb.11:
	movl	4(%rax), %esi
	jmp	LBB0_12
LBB0_9:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_12:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_EVL_MAKETAG
	movq	_IFCAP_VLAN_HWTAGGING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rbx), %rdi
	testl	%ecx, 8(%r15)
	je	LBB0_14
## %bb.13:
	movl	%eax, 8(%rdi)
	movq	_M_VLANTAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rdi)
	movl	$1, %eax
	jmp	LBB0_17
LBB0_14:
	movl	%eax, %esi
	callq	_ether_vlanencap
	movq	%rax, %rcx
	movq	%rax, (%rbx)
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.15:
	leaq	L_.str.1(%rip), %rsi
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_if_printf
	xorl	%eax, %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_ether_8021q_frame.pad:                 ## @ether_8021q_frame.pad
	.space	8

	.comm	_V_soft_pad,8,3                 ## @V_soft_pad
	.comm	_IFT_ETHER,8,3                  ## @IFT_ETHER
	.comm	_ETHERMIN,4,2                   ## @ETHERMIN
	.comm	_ETHER_HDR_LEN,4,2              ## @ETHER_HDR_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot pad short frame"

	.comm	_vlan_mtag_pcp,8,3              ## @vlan_mtag_pcp
	.comm	_MTAG_8021Q,4,2                 ## @MTAG_8021Q
	.comm	_MTAG_8021Q_PCP_OUT,4,2         ## @MTAG_8021Q_PCP_OUT
	.comm	_IFCAP_VLAN_HWTAGGING,4,2       ## @IFCAP_VLAN_HWTAGGING
	.comm	_M_VLANTAG,4,2                  ## @M_VLANTAG
L_.str.1:                               ## @.str.1
	.asciz	"unable to prepend 802.1Q header"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ether_8021q_frame              ; -- Begin function ether_8021q_frame
	.p2align	2
_ether_8021q_frame:                     ; @ether_8021q_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x4
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _V_soft_pad@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_soft_pad@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _IFT_ETHER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFT_ETHER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _ETHERMIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETHERMIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _ETHER_HDR_LEN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ETHER_HDR_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	x25, [x20]
	ldr	w10, [x25, #4]
	add	w8, w9, w8
	sub	w24, w8, w10
	cmp	w24, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x0, x24
	mov	w1, #8
	bl	_min
	mov	x1, x0
Lloh12:
	adrp	x2, _ether_8021q_frame.pad@PAGE
Lloh13:
	add	x2, x2, _ether_8021q_frame.pad@PAGEOFF
	mov	x0, x25
	bl	_m_append
	cbz	w0, LBB0_7
; %bb.4:
Lloh14:
	adrp	x25, _ether_8021q_frame.pad@PAGE
Lloh15:
	add	x25, x25, _ether_8021q_frame.pad@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, #9
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w24, w24, #8
	ldr	x26, [x20]
	mov	x0, x24
	mov	w1, #8
	bl	_min
	mov	x1, x0
	mov	x0, x26
	mov	x2, x25
	bl	_m_append
	cbnz	w0, LBB0_5
LBB0_7:
	ldr	x0, [x20]
	bl	_m_freem
	str	xzr, [x20]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_8:
Lloh18:
	adrp	x8, _vlan_mtag_pcp@GOTPAGE
Lloh19:
	ldr	x8, [x8, _vlan_mtag_pcp@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x0, [x20]
Lloh21:
	adrp	x8, _MTAG_8021Q@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTAG_8021Q@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _MTAG_8021Q_PCP_OUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MTAG_8021Q_PCP_OUT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x3, #0
	bl	_m_tag_locate
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w23, [x0, #4]
LBB0_11:
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_EVL_MAKETAG
	mov	x1, x0
	ldr	w8, [x21, #8]
Lloh27:
	adrp	x9, _IFCAP_VLAN_HWTAGGING@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IFCAP_VLAN_HWTAGGING@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	ldr	x0, [x20]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh30:
	adrp	x8, _M_VLANTAG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _M_VLANTAG@GOTPAGEOFF]
	str	w1, [x0, #8]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	mov	w0, #1
	b	LBB0_17
LBB0_13:
	bl	_ether_vlanencap
	str	x0, [x20]
	cbz	x0, LBB0_15
; %bb.14:
	mov	w0, #1
	b	LBB0_17
LBB0_15:
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_if_printf
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_ether_8021q_frame.pad:                 ; @ether_8021q_frame.pad
	.space	8

	.comm	_V_soft_pad,8,3                 ; @V_soft_pad
	.comm	_IFT_ETHER,8,3                  ; @IFT_ETHER
	.comm	_ETHERMIN,4,2                   ; @ETHERMIN
	.comm	_ETHER_HDR_LEN,4,2              ; @ETHER_HDR_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot pad short frame"

	.comm	_vlan_mtag_pcp,8,3              ; @vlan_mtag_pcp
	.comm	_MTAG_8021Q,4,2                 ; @MTAG_8021Q
	.comm	_MTAG_8021Q_PCP_OUT,4,2         ; @MTAG_8021Q_PCP_OUT
	.comm	_IFCAP_VLAN_HWTAGGING,4,2       ; @IFCAP_VLAN_HWTAGGING
	.comm	_M_VLANTAG,4,2                  ; @M_VLANTAG
l_.str.1:                               ; @.str.1
	.asciz	"unable to prepend 802.1Q header"

.subsections_via_symbols
