	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stf_encapcheck
_stf_encapcheck:                        ## @stf_encapcheck
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.1:
	movq	%rcx, %rbx
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	%rcx, %rdi
	callq	_STF2IFP
	movq	_IFF_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	callq	_STF2IFP
	movq	_IFF_LINK0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_8
## %bb.3:
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_8
## %bb.4:
	leaq	-80(%rbp), %rcx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_m_copydata
	cmpl	$4, -80(%rbp)
	jne	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	callq	_STF2IFP
	leaq	-40(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rax, %rdi
	callq	_stf_getsrcifa6
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	-40(%rbp), %rdi
	callq	_GET_V4
	leaq	-72(%rbp), %rsi
	movl	%eax, %edi
	movl	$4, %edx
	callq	_bcmp
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bzero
	leaq	-40(%rbp), %rdi
	callq	_GET_V4
	movl	%eax, %edi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_bcopy
	leaq	-56(%rbp), %rdi
	callq	_GET_V4
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	movl	$4, %edx
	callq	_bcopy
	movl	-64(%rbp), %eax
	movl	-48(%rbp), %ecx
	andl	%eax, %ecx
	movl	%ecx, -48(%rbp)
	andl	-76(%rbp), %eax
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	sete	%r14b
	shll	$5, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_IFF_LINK0,4,2                  ## @IFF_LINK0
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.no_dead_strip	_stf_encapcheck
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stf_encapcheck
_stf_encapcheck:                        ; @stf_encapcheck
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x3, LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
	mov	x0, x3
	bl	_STF2IFP
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_STF2IFP
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _IFF_LINK0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFF_LINK0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _IPPROTO_IPV6@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w9, w21, #0, eq
	b.ne	LBB0_6
; %bb.3:
	add	x3, sp, #32
	mov	x0, x20
	mov	w1, #0
	mov	w2, #12
	bl	_m_copydata
	mov	w0, #0
	ldr	w8, [sp, #32]
	cmp	w8, #4
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_STF2IFP
	add	x1, sp, #8
	mov	x2, sp
	bl	_stf_getsrcifa6
	cbnz	x0, LBB0_6
; %bb.5:
	add	x0, sp, #8
	bl	_GET_V4
	add	x8, sp, #32
	add	x1, x8, #8
	mov	w2, #4
	bl	_bcmp
	cbz	x0, LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	add	x0, sp, #24
	mov	w1, #4
	bl	_bzero
	add	x0, sp, #8
	bl	_GET_V4
	add	x1, sp, #24
	mov	w2, #4
	bl	_bcopy
	mov	x0, sp
	bl	_GET_V4
	add	x1, sp, #16
	mov	w2, #4
	bl	_bcopy
	ldr	w8, [sp, #16]
	ldr	w9, [sp, #24]
	and	w9, w9, w8
	ldr	w10, [sp, #36]
	and	w8, w10, w8
	cmp	w9, w8
	cset	w8, eq
	str	w9, [sp, #24]
	lsl	w0, w8, #5
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_IFF_LINK0,4,2                  ; @IFF_LINK0
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.no_dead_strip	_stf_encapcheck
.subsections_via_symbols
