	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_unregister_ifnet           ## -- Begin function key_unregister_ifnet
	.p2align	4, 0x90
_key_unregister_ifnet:                  ## @key_unregister_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, %r15
	xorl	%eax, %eax
	callq	_SPTREE_WLOCK
	testq	%r14, %r14
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_IPSEC_DIR_OUTBOUND@GOTPCREL(%rip), %r13
	movq	_IPSEC_SPSTATE_IFNET@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rax
	movq	8(%rax), %rsi
	movq	_IPSEC_DIR_INBOUND@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	sete	%al
	cmpq	(%r13), %rsi
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_IPSEC_ASSERT
	movq	(%r15,%rbx,8), %rsi
	movq	(%rsi), %rax
	cmpq	(%r12), %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_IPSEC_SPSTATE_DEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%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_REMOVE
	movq	_V_spd_size@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	(%r15,%rbx,8), %rdi
	movq	_idhash@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LIST_REMOVE
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	callq	_SPTREE_WUNLOCK
	xorl	%eax, %eax
	callq	_SPDCACHE_ENABLED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_spdcache_clear
LBB0_7:
	testq	%r14, %r14
	je	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	movq	_SADB_X_SPDDELETE@GOTPCREL(%rip), %r12
	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	(%r15,%rbx,8), %rdi
	movl	(%r12), %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_12:
	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	_IPSEC_SPSTATE_IFNET,8,3        ## @IPSEC_SPSTATE_IFNET
	.comm	_IPSEC_SPSTATE_DEAD,8,3         ## @IPSEC_SPSTATE_DEAD
	.comm	_V_sptree_ifnet,8,3             ## @V_sptree_ifnet
	.comm	_chain,4,2                      ## @chain
	.comm	_V_spd_size,4,2                 ## @V_spd_size
	.comm	_idhash,4,2                     ## @idhash
	.comm	_SADB_X_SPDDELETE,4,2           ## @SADB_X_SPDDELETE
	.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_unregister_ifnet           ; -- Begin function key_unregister_ifnet
	.p2align	2
_key_unregister_ifnet:                  ; @key_unregister_ifnet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x1
	mov	x20, x0
	bl	_SPTREE_WLOCK
	cbz	x24, LBB0_5
; %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]
Lloh4:
	adrp	x23, _IPSEC_SPSTATE_IFNET@GOTPAGE
Lloh5:
	ldr	x23, [x23, _IPSEC_SPSTATE_IFNET@GOTPAGEOFF]
Lloh6:
	adrp	x26, _chain@GOTPAGE
Lloh7:
	ldr	x26, [x26, _chain@GOTPAGEOFF]
Lloh8:
	adrp	x27, _V_spd_size@GOTPAGE
Lloh9:
	ldr	x27, [x27, _V_spd_size@GOTPAGEOFF]
	mov	x28, x20
	mov	x19, x24
Lloh10:
	adrp	x25, _idhash@GOTPAGE
Lloh11:
	ldr	x25, [x25, _idhash@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x28, #8
	subs	x19, x19, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x28]
	ldr	x1, [x8, #8]
	ldr	x8, [x21]
	cmp	x1, x8
	ldr	x8, [x22]
	ccmp	x1, x8, #4, ne
	cset	w0, eq
	bl	_IPSEC_ASSERT
	ldr	x1, [x28]
	ldr	x8, [x1]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x8, _IPSEC_SPSTATE_DEAD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPSEC_SPSTATE_DEAD@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x1]
Lloh15:
	adrp	x8, _V_sptree_ifnet@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V_sptree_ifnet@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x1, #8]
	add	x0, x8, x9, lsl #2
	ldr	w2, [x26]
	bl	_TAILQ_REMOVE
	ldr	w8, [x27]
	sub	w8, w8, #1
	str	w8, [x27]
	ldr	x0, [x28]
	ldr	w1, [x25]
	bl	_LIST_REMOVE
	b	LBB0_2
LBB0_5:
	bl	_SPTREE_WUNLOCK
	bl	_SPDCACHE_ENABLED
	cbz	x0, LBB0_7
; %bb.6:
	bl	_spdcache_clear
LBB0_7:
	cbz	x24, LBB0_12
; %bb.8:
Lloh18:
	adrp	x19, _SADB_X_SPDDELETE@GOTPAGE
Lloh19:
	ldr	x19, [x19, _SADB_X_SPDDELETE@GOTPAGEOFF]
Lloh20:
	adrp	x21, _KEY_SENDUP_ALL@GOTPAGE
Lloh21:
	ldr	x21, [x21, _KEY_SENDUP_ALL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #8
	subs	x24, x24, #1
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	w1, [x19]
	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, [x21]
	mov	x0, #0
	bl	_key_sendup_mbuf
	b	LBB0_9
LBB0_12:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IPSEC_DIR_INBOUND,8,3          ; @IPSEC_DIR_INBOUND
	.comm	_IPSEC_DIR_OUTBOUND,8,3         ; @IPSEC_DIR_OUTBOUND
	.comm	_IPSEC_SPSTATE_IFNET,8,3        ; @IPSEC_SPSTATE_IFNET
	.comm	_IPSEC_SPSTATE_DEAD,8,3         ; @IPSEC_SPSTATE_DEAD
	.comm	_V_sptree_ifnet,8,3             ; @V_sptree_ifnet
	.comm	_chain,4,2                      ; @chain
	.comm	_V_spd_size,4,2                 ; @V_spd_size
	.comm	_idhash,4,2                     ; @idhash
	.comm	_SADB_X_SPDDELETE,4,2           ; @SADB_X_SPDDELETE
	.comm	_KEY_SENDUP_ALL,4,2             ; @KEY_SENDUP_ALL
.subsections_via_symbols
