	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sa6_embedscope                 ## -- Begin function sa6_embedscope
	.p2align	4, 0x90
_sa6_embedscope:                        ## @sa6_embedscope
	.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	%rdi, %r15
	movl	(%rdi), %ebx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.2:
	leaq	8(%r15), %rdi
	callq	_scope6_addr2default
	movl	%eax, %ebx
LBB0_3:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.4:
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_IN6_IS_SCOPE_LINKLOCAL
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_IN6_IS_ADDR_MC_INTFACELOCAL
	testq	%rax, %rax
	je	LBB0_10
LBB0_6:
	movq	_V_if_index@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jl	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	callq	_ifnet_byindex
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movzwl	%bx, %edi
	callq	_htons
	movq	8(%r15), %rcx
	movl	%eax, 4(%rcx)
	movl	$0, (%r15)
	jmp	LBB0_10
LBB0_8:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_if_index,4,2                 ## @V_if_index
	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sa6_embedscope                 ; -- Begin function sa6_embedscope
	.p2align	2
_sa6_embedscope:                        ; @sa6_embedscope
	.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, x0
	ldr	w20, [x0]
	cbz	w1, LBB0_3
; %bb.1:
	cbnz	w20, LBB0_3
; %bb.2:
	add	x0, x19, #8
	bl	_scope6_addr2default
	mov	x20, x0
LBB0_3:
	cbz	w20, LBB0_9
; %bb.4:
	add	x21, x19, #8
	mov	x0, x21
	bl	_IN6_IS_SCOPE_LINKLOCAL
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_IN6_IS_ADDR_MC_INTFACELOCAL
	cbz	x0, LBB0_11
LBB0_6:
Lloh0:
	adrp	x8, _V_if_index@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_if_index@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.lt	LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_ifnet_byindex
	cbz	x0, LBB0_10
; %bb.8:
	and	w0, w20, #0xffff
	bl	_htons
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19, #8]
	str	w8, [x9, #4]
	str	wzr, [x19]
	b	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh3:
	adrp	x8, _ENXIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_V_if_index,4,2                 ; @V_if_index
	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
