	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_mpls                       ## -- Begin function gen_mpls
	.p2align	4, 0x90
_gen_mpls:                              ## @gen_mpls
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	cmpq	$0, (%rdi)
	jle	LBB0_2
## %bb.1:
	movq	_OR_PREVMPLSHDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BPF_B@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$2, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_gen_mcmp
	jmp	LBB0_7
LBB0_2:
	movl	8(%r12), %edx
	leal	-129(%rdx), %eax
	cmpl	$4, %eax
	jae	LBB0_4
## %bb.3:
	movq	_ETHERTYPE_MPLS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	cmpl	$128, %edx
	jne	LBB0_10
## %bb.5:
	movq	_PPP_MPLS_UCAST@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_gen_linktype
LBB0_7:
	movq	%rax, %r15
	testl	%r14d, %r14d
	js	LBB0_9
LBB0_8:
	shll	$12, %r14d
	movq	_OR_LINKPL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BPF_W@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	%r14d, %r8d
	movl	$-4096, %r9d                    ## imm = 0xF000
	callq	_gen_mcmp
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_gen_and
	movq	%rbx, %r15
LBB0_9:
	addl	$4, 12(%r12)
	addl	$4, 16(%r12)
	incq	(%r12)
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_bpf_error
                                        ## implicit-def: $r15
	testl	%r14d, %r14d
	jns	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_OR_PREVMPLSHDR,4,2             ## @OR_PREVMPLSHDR
	.comm	_BPF_B,4,2                      ## @BPF_B
	.comm	_ETHERTYPE_MPLS,4,2             ## @ETHERTYPE_MPLS
	.comm	_PPP_MPLS_UCAST,4,2             ## @PPP_MPLS_UCAST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no MPLS support for data link type %d"

	.comm	_OR_LINKPL,4,2                  ## @OR_LINKPL
	.comm	_BPF_W,4,2                      ## @BPF_W
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_mpls                       ; -- Begin function gen_mpls
	.p2align	2
_gen_mpls:                              ; @gen_mpls
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _OR_PREVMPLSHDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OR_PREVMPLSHDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BPF_B@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BPF_B@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #2
	mov	w4, #0
	mov	w5, #1
	bl	_gen_mcmp
	mov	x21, x0
	tbz	w20, #31, LBB0_7
	b	LBB0_8
LBB0_2:
	ldr	w2, [x19, #8]
	sub	w8, w2, #129
	cmp	w8, #4
	b.hs	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _ETHERTYPE_MPLS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETHERTYPE_MPLS@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	cmp	w2, #128
	b.ne	LBB0_9
; %bb.5:
Lloh8:
	adrp	x8, _PPP_MPLS_UCAST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PPP_MPLS_UCAST@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gen_linktype
	mov	x21, x0
	tbnz	w20, #31, LBB0_8
LBB0_7:
	lsl	w4, w20, #12
Lloh10:
	adrp	x8, _OR_LINKPL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OR_LINKPL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _BPF_W@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BPF_W@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w5, #-4096
	bl	_gen_mcmp
	mov	x20, x0
	mov	x0, x21
	mov	x1, x20
	bl	_gen_and
	mov	x21, x20
LBB0_8:
	ldur	d0, [x19, #12]
	movi.2s	v1, #4
	add.2s	v0, v0, v1
	stur	d0, [x19, #12]
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	mov	x0, x21
	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_9:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_bpf_error
                                        ; implicit-def: $x21
	tbz	w20, #31, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_OR_PREVMPLSHDR,4,2             ; @OR_PREVMPLSHDR
	.comm	_BPF_B,4,2                      ; @BPF_B
	.comm	_ETHERTYPE_MPLS,4,2             ; @ETHERTYPE_MPLS
	.comm	_PPP_MPLS_UCAST,4,2             ; @PPP_MPLS_UCAST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no MPLS support for data link type %d"

	.comm	_OR_LINKPL,4,2                  ; @OR_LINKPL
	.comm	_BPF_W,4,2                      ; @BPF_W
.subsections_via_symbols
