	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pfkey_spddelete
_pfkey_spddelete:                       ## @pfkey_spddelete
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	callq	_sock_net
	movq	%rax, %r15
	movq	$0, -56(%rbp)
	movq	_SADB_EXT_ADDRESS_SRC@GOTPCREL(%rip), %r12
	movslq	(%r12), %rax
	movq	-8(%rbx,%rax,8), %rdi
	movq	_SADB_EXT_ADDRESS_DST@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movq	-8(%rbx,%rax,8), %rsi
	callq	_present_and_same_family
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_SADB_X_EXT_POLICY@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-8(%rbx,%rax,8), %r13
	testq	%r13, %r13
	je	LBB0_2
## %bb.4:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	movq	_IPSEC_DIR_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.6:
	leaq	-152(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movslq	(%r12), %rax
	movq	-8(%rbx,%rax,8), %r12
	leaq	-100(%rbp), %rsi
	movq	%r12, %rdi
	callq	_pfkey_sadb_addr2xfrm_addr
	movl	%eax, -96(%rbp)
	movl	4(%r12), %eax
	movl	%eax, -104(%rbp)
	movl	(%r12), %edi
	callq	_pfkey_proto_to_xfrm
	movq	%rax, -136(%rbp)
	movq	8(%r12), %rax
	movq	%rax, -112(%rbp)
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_htons
	movq	%rax, -120(%rbp)
LBB0_8:
	movslq	(%r14), %rax
	movq	-8(%rbx,%rax,8), %r12
	leaq	-124(%rbp), %rsi
	movq	%r12, %rdi
	callq	_pfkey_sadb_addr2xfrm_addr
	movl	4(%r12), %eax
	movl	%eax, -128(%rbp)
	movl	(%r12), %edi
	callq	_pfkey_proto_to_xfrm
	movq	%rax, -136(%rbp)
	movq	8(%r12), %rax
	movq	%rax, -144(%rbp)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_htons
	movq	%rax, -152(%rbp)
LBB0_10:
	movq	_SADB_X_EXT_SEC_CTX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-8(%rbx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.12:
	callq	_pfkey_sadb2xfrm_user_sec_ctx
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %r12
	leaq	-56(%rbp), %rdi
	movq	%rax, %rsi
	callq	_security_xfrm_policy_alloc
	movl	%eax, %ebx
	movl	%eax, -44(%rbp)
	movq	%r12, %rdi
	callq	_kfree
	testl	%ebx, %ebx
	jne	LBB0_21
## %bb.15:
	movq	-56(%rbp), %r9
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r9d, %r9d
LBB0_16:
	movq	_DUMMY_MARK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XFRM_POLICY_TYPE_MAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r13), %rcx
	decq	%rcx
	leaq	-44(%rbp), %rax
	leaq	-152(%rbp), %r8
	movq	%r15, %rdi
	pushq	%rax
	pushq	$1
	callq	_xfrm_policy_bysel_ctx
	addq	$16, %rsp
	movq	%rax, %r15
	movq	-56(%rbp), %rdi
	callq	_security_xfrm_policy_free
	testq	%r15, %r15
	je	LBB0_17
## %bb.18:
	xorl	%ebx, %ebx
	cmpl	$0, -44(%rbp)
	sete	%bl
	movq	_current@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_audit_get_loginuid
	movl	%eax, %r12d
	movl	(%r14), %edi
	callq	_audit_get_sessionid
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_xfrm_audit_policy_delete
	cmpl	$0, -44(%rbp)
	jne	LBB0_20
## %bb.19:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %eax
	movl	%eax, -68(%rbp)
	movl	(%rcx), %eax
	movl	%eax, -72(%rbp)
	movq	$0, -80(%rbp)
	movq	_XFRM_MSG_DELPOLICY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	(%r13), %rsi
	decq	%rsi
	leaq	-88(%rbp), %rdx
	movq	%r15, %rdi
	callq	_km_policy_notify
LBB0_20:
	movq	%r15, %rdi
	callq	_xfrm_pol_put
	movl	-44(%rbp), %ebx
	jmp	LBB0_21
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_17:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_SADB_EXT_ADDRESS_SRC,4,2       ## @SADB_EXT_ADDRESS_SRC
	.comm	_SADB_EXT_ADDRESS_DST,4,2       ## @SADB_EXT_ADDRESS_DST
	.comm	_SADB_X_EXT_POLICY,4,2          ## @SADB_X_EXT_POLICY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPSEC_DIR_MAX,8,3              ## @IPSEC_DIR_MAX
	.comm	_SADB_X_EXT_SEC_CTX,4,2         ## @SADB_X_EXT_SEC_CTX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DUMMY_MARK,4,2                 ## @DUMMY_MARK
	.comm	_XFRM_POLICY_TYPE_MAIN,4,2      ## @XFRM_POLICY_TYPE_MAIN
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_current,4,2                    ## @current
	.comm	_XFRM_MSG_DELPOLICY,4,2         ## @XFRM_MSG_DELPOLICY
	.no_dead_strip	_pfkey_spddelete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pfkey_spddelete
_pfkey_spddelete:                       ; @pfkey_spddelete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x3
	mov	x19, x2
	bl	_sock_net
	mov	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, _SADB_EXT_ADDRESS_SRC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SADB_EXT_ADDRESS_SRC@GOTPAGEOFF]
	ldrsw	x8, [x22]
	add	x8, x21, x8, lsl #3
	ldur	x0, [x8, #-8]
Lloh2:
	adrp	x24, _SADB_EXT_ADDRESS_DST@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SADB_EXT_ADDRESS_DST@GOTPAGEOFF]
	ldrsw	x8, [x24]
	add	x8, x21, x8, lsl #3
	ldur	x1, [x8, #-8]
	bl	_present_and_same_family
	cbz	w0, LBB0_3
; %bb.1:
Lloh4:
	adrp	x8, _SADB_X_EXT_POLICY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SADB_X_EXT_POLICY@GOTPAGEOFF]
Lloh6:
	ldrsw	x8, [x8]
	add	x8, x21, x8, lsl #3
	ldur	x23, [x8, #-8]
	cbz	x23, LBB0_3
; %bb.2:
	ldr	x8, [x23]
Lloh7:
	adrp	x9, _IPSEC_DIR_MAX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IPSEC_DIR_MAX@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #0, ne
	b.lt	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_6:
	add	x25, sp, #40
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldrsw	x8, [x22]
	add	x8, x21, x8, lsl #3
	ldur	x22, [x8, #-8]
	add	x1, x25, #52
	mov	x0, x22
	bl	_pfkey_sadb_addr2xfrm_addr
	str	w0, [sp, #96]
	ldr	w8, [x22, #4]
	str	w8, [sp, #88]
	ldr	w0, [x22]
	bl	_pfkey_proto_to_xfrm
	str	x0, [sp, #56]
	ldr	x8, [x22, #8]
	str	x8, [sp, #80]
	cbz	x8, LBB0_8
; %bb.7:
	mov	w0, #65535
	bl	_htons
	str	x0, [sp, #72]
LBB0_8:
	ldrsw	x8, [x24]
	add	x8, x21, x8, lsl #3
	ldur	x22, [x8, #-8]
	add	x1, x25, #28
	mov	x0, x22
	bl	_pfkey_sadb_addr2xfrm_addr
	ldr	w8, [x22, #4]
	str	w8, [sp, #64]
	ldr	w0, [x22]
	bl	_pfkey_proto_to_xfrm
	str	x0, [sp, #56]
	ldr	x8, [x22, #8]
	str	x8, [sp, #48]
	cbz	x8, LBB0_10
; %bb.9:
	mov	w0, #65535
	bl	_htons
	str	x0, [sp, #40]
LBB0_10:
Lloh12:
	adrp	x8, _SADB_X_EXT_SEC_CTX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SADB_X_EXT_SEC_CTX@GOTPAGEOFF]
Lloh14:
	ldrsw	x8, [x8]
	add	x8, x21, x8, lsl #3
	ldur	x0, [x8, #-8]
	cbz	x0, LBB0_14
; %bb.11:
	bl	_pfkey_sadb2xfrm_user_sec_ctx
	cbz	x0, LBB0_19
; %bb.12:
	mov	x22, x0
	add	x0, sp, #8
	mov	x1, x22
	bl	_security_xfrm_policy_alloc
	mov	x21, x0
	stur	w0, [x29, #-68]
	mov	x0, x22
	bl	_kfree
	cbnz	w21, LBB0_5
; %bb.13:
	ldr	x5, [sp, #8]
	b	LBB0_15
LBB0_14:
	mov	x5, #0
LBB0_15:
Lloh15:
	adrp	x8, _DUMMY_MARK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DUMMY_MARK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _XFRM_POLICY_TYPE_MAIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _XFRM_POLICY_TYPE_MAIN@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	x8, [x23]
	sub	x3, x8, #1
	add	x4, sp, #40
	sub	x7, x29, #68
	mov	x0, x20
	mov	w6, #1
	bl	_xfrm_policy_bysel_ctx
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	_security_xfrm_policy_free
	cbz	x20, LBB0_20
; %bb.16:
	ldur	w8, [x29, #-68]
	cmp	w8, #0
	cset	w21, eq
Lloh21:
	adrp	x24, _current@GOTPAGE
Lloh22:
	ldr	x24, [x24, _current@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_audit_get_loginuid
	mov	x22, x0
	ldr	w0, [x24]
	bl	_audit_get_sessionid
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	w4, #0
	bl	_xfrm_audit_policy_delete
	ldur	w8, [x29, #-68]
	cbnz	w8, LBB0_18
; %bb.17:
	ldr	d0, [x19]
	str	d0, [sp, #32]
	str	xzr, [sp, #24]
Lloh23:
	adrp	x8, _XFRM_MSG_DELPOLICY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XFRM_MSG_DELPOLICY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	x8, [x23]
	sub	x1, x8, #1
	add	x2, sp, #16
	mov	x0, x20
	bl	_km_policy_notify
LBB0_18:
	mov	x0, x20
	bl	_xfrm_pol_put
	ldur	w21, [x29, #-68]
	b	LBB0_5
LBB0_19:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_20:
Lloh28:
	adrp	x8, _ENOENT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SADB_EXT_ADDRESS_SRC,4,2       ; @SADB_EXT_ADDRESS_SRC
	.comm	_SADB_EXT_ADDRESS_DST,4,2       ; @SADB_EXT_ADDRESS_DST
	.comm	_SADB_X_EXT_POLICY,4,2          ; @SADB_X_EXT_POLICY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPSEC_DIR_MAX,8,3              ; @IPSEC_DIR_MAX
	.comm	_SADB_X_EXT_SEC_CTX,4,2         ; @SADB_X_EXT_SEC_CTX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DUMMY_MARK,4,2                 ; @DUMMY_MARK
	.comm	_XFRM_POLICY_TYPE_MAIN,4,2      ; @XFRM_POLICY_TYPE_MAIN
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_current,4,2                    ; @current
	.comm	_XFRM_MSG_DELPOLICY,4,2         ; @XFRM_MSG_DELPOLICY
	.no_dead_strip	_pfkey_spddelete
.subsections_via_symbols
