	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_register_ifnet             ## -- Begin function key_register_ifnet
	.p2align	4, 0x90
_key_register_ifnet:                    ## @key_register_ifnet
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_SPTREE_WLOCK
	testq	%r14, %r14
	je	LBB0_15
## %bb.1:
	movq	_IPSEC_DIR_INBOUND@GOTPCREL(%rip), %r13
	movq	_IPSEC_DIR_OUTBOUND@GOTPCREL(%rip), %rbx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%r15,8), %rax
	movq	8(%rax), %rsi
	cmpq	(%r13), %rsi
	sete	%al
	cmpq	(%rbx), %rsi
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_IPSEC_ASSERT
	xorl	%eax, %eax
	callq	_key_getnewspid
	movq	(%r12,%r15,8), %rcx
	movl	%eax, 4(%rcx)
	testl	%eax, %eax
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	cmpq	%r15, %r14
	jne	LBB0_2
## %bb.4:
	testq	%r14, %r14
	movl	$0, %ebx
	je	LBB0_15
## %bb.5:
	xorl	%ebx, %ebx
	movq	_idhash@GOTPCREL(%rip), %r15
	movq	_IPSEC_SPSTATE_IFNET@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rsi
	movq	8(%rsi), %rdi
	shlq	$2, %rdi
	movq	_V_sptree_ifnet@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movq	_chain@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_TAILQ_INSERT_TAIL
	movq	(%r12,%rbx,8), %rax
	movl	4(%rax), %edi
	callq	_SPHASH_HASH
	movq	(%r12,%rbx,8), %rsi
	movl	(%r15), %edx
	movl	%eax, %edi
	callq	_LIST_INSERT_HEAD
	movl	(%r13), %eax
	movq	(%r12,%rbx,8), %rcx
	movl	%eax, (%rcx)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_6
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_SPTREE_WUNLOCK
	testq	%r14, %r14
	je	LBB0_13
## %bb.8:
	xorl	%ebx, %ebx
	movq	_SADB_X_SPDADD@GOTPCREL(%rip), %r15
	movq	_KEY_SENDUP_ALL@GOTPCREL(%rip), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rdi
	movl	(%r15), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_key_setdumpsp
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %edx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_key_sendup_mbuf
	jmp	LBB0_11
LBB0_15:
	xorl	%eax, %eax
	callq	_SPTREE_WUNLOCK
	jmp	LBB0_13
LBB0_14:
	xorl	%eax, %eax
	callq	_SPTREE_WUNLOCK
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPSEC_DIR_INBOUND,8,3          ## @IPSEC_DIR_INBOUND
	.comm	_IPSEC_DIR_OUTBOUND,8,3         ## @IPSEC_DIR_OUTBOUND
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_V_sptree_ifnet,8,3             ## @V_sptree_ifnet
	.comm	_chain,4,2                      ## @chain
	.comm	_idhash,4,2                     ## @idhash
	.comm	_IPSEC_SPSTATE_IFNET,4,2        ## @IPSEC_SPSTATE_IFNET
	.comm	_SADB_X_SPDADD,4,2              ## @SADB_X_SPDADD
	.comm	_KEY_SENDUP_ALL,4,2             ## @KEY_SENDUP_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_register_ifnet             ; -- Begin function key_register_ifnet
	.p2align	2
_key_register_ifnet:                    ; @key_register_ifnet
	.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	x19, x1
	mov	x20, x0
	bl	_SPTREE_WLOCK
	cbz	x19, LBB0_12
; %bb.1:
Lloh0:
	adrp	x21, _IPSEC_DIR_INBOUND@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IPSEC_DIR_INBOUND@GOTPAGEOFF]
Lloh2:
	adrp	x22, _IPSEC_DIR_OUTBOUND@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IPSEC_DIR_OUTBOUND@GOTPAGEOFF]
	mov	x23, x20
	mov	x24, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x1, [x8, #8]
	ldr	x8, [x21]
	cmp	x1, x8
	ldr	x8, [x22]
	ccmp	x1, x8, #4, ne
	cset	w0, eq
	bl	_IPSEC_ASSERT
	bl	_key_getnewspid
	ldr	x8, [x23]
	str	w0, [x8, #4]
	cbz	w0, LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #8
	subs	x24, x24, #1
	b.ne	LBB0_2
; %bb.4:
	cbz	x19, LBB0_12
; %bb.5:
Lloh4:
	adrp	x21, _V_sptree_ifnet@GOTPAGE
Lloh5:
	ldr	x21, [x21, _V_sptree_ifnet@GOTPAGEOFF]
Lloh6:
	adrp	x22, _chain@GOTPAGE
Lloh7:
	ldr	x22, [x22, _chain@GOTPAGEOFF]
Lloh8:
	adrp	x23, _idhash@GOTPAGE
Lloh9:
	ldr	x23, [x23, _idhash@GOTPAGEOFF]
	mov	x24, x20
	mov	x25, x19
Lloh10:
	adrp	x26, _IPSEC_SPSTATE_IFNET@GOTPAGE
Lloh11:
	ldr	x26, [x26, _IPSEC_SPSTATE_IFNET@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x1, [x24]
	ldr	x9, [x1, #8]
	add	x0, x8, x9, lsl #2
	ldr	w2, [x22]
	bl	_TAILQ_INSERT_TAIL
	ldr	x8, [x24]
	ldr	w0, [x8, #4]
	bl	_SPHASH_HASH
	ldr	x1, [x24]
	ldr	w2, [x23]
	bl	_LIST_INSERT_HEAD
	ldr	w8, [x26]
	ldr	x9, [x24], #8
	str	w8, [x9]
	subs	x25, x25, #1
	b.ne	LBB0_6
; %bb.7:
	bl	_SPTREE_WUNLOCK
	cbz	x19, LBB0_13
; %bb.8:
Lloh12:
	adrp	x21, _SADB_X_SPDADD@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SADB_X_SPDADD@GOTPAGEOFF]
Lloh14:
	adrp	x22, _KEY_SENDUP_ALL@GOTPAGE
Lloh15:
	ldr	x22, [x22, _KEY_SENDUP_ALL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #8
	subs	x19, x19, #1
	b.eq	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w1, [x21]
	mov	w2, #0
	mov	w3, #0
	bl	_key_setdumpsp
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x1, x0
	ldr	w2, [x22]
	mov	x0, #0
	bl	_key_sendup_mbuf
	b	LBB0_9
LBB0_12:
	bl	_SPTREE_WUNLOCK
LBB0_13:
	mov	w0, #0
	b	LBB0_15
LBB0_14:
	bl	_SPTREE_WUNLOCK
Lloh16:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_15:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IPSEC_DIR_INBOUND,8,3          ; @IPSEC_DIR_INBOUND
	.comm	_IPSEC_DIR_OUTBOUND,8,3         ; @IPSEC_DIR_OUTBOUND
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_V_sptree_ifnet,8,3             ; @V_sptree_ifnet
	.comm	_chain,4,2                      ; @chain
	.comm	_idhash,4,2                     ; @idhash
	.comm	_IPSEC_SPSTATE_IFNET,4,2        ; @IPSEC_SPSTATE_IFNET
	.comm	_SADB_X_SPDADD,4,2              ; @SADB_X_SPDADD
	.comm	_KEY_SENDUP_ALL,4,2             ; @KEY_SENDUP_ALL
.subsections_via_symbols
