	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipsec_control_pcbpolicy
_ipsec_control_pcbpolicy:               ## @ipsec_control_pcbpolicy
	.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
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	(%rsi), %r13
	movq	%r13, -48(%rbp)
	cmpq	$4, %r13
	jb	LBB0_4
## %bb.3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	ja	LBB0_4
## %bb.5:
	movq	%rdi, %r14
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpq	$0, 16(%r12)
	jne	LBB0_6
## %bb.7:
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	movq	_ENOPROTOOPT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_6:
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r13, %rdx
	movq	%r13, %rcx
	callq	_sooptcopyin
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.11:
	movq	8(%r12), %rax
	movq	_SOPT_SET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.12:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	(%rax), %rsi
	jmp	LBB0_15
LBB0_9:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_16:
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ipsec_get_pcbpolicy
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sooptcopyout
	jmp	LBB0_18
LBB0_13:
	xorl	%esi, %esi
LBB0_15:
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_ipsec_set_pcbpolicy
LBB0_18:
	movl	%eax, %ebx
LBB0_19:
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_free
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOPROTOOPT,4,2                ## @ENOPROTOOPT
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_M_TEMP,4,2                     ## @M_TEMP
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_SOPT_SET,8,3                   ## @SOPT_SET
	.no_dead_strip	_ipsec_control_pcbpolicy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipsec_control_pcbpolicy
_ipsec_control_pcbpolicy:               ; @ipsec_control_pcbpolicy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x21, x1
	ldr	x22, [x1]
	str	x22, [sp, #8]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x22, #4
	ccmp	x22, x8, #2, hs
	b.ls	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	b	LBB0_16
LBB0_3:
Lloh6:
	adrp	x8, _ENOPROTOOPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOPROTOOPT@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	b	LBB0_16
LBB0_4:
	mov	x20, x0
Lloh9:
	adrp	x24, _M_TEMP@GOTPAGE
Lloh10:
	ldr	x24, [x24, _M_TEMP@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh11:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
	ldr	x9, [x21, #16]
Lloh13:
	adrp	x10, _M_NOWAIT@GOTPAGE
Lloh14:
	ldr	x10, [x10, _M_NOWAIT@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w2, [x8]
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	mov	x3, x22
	bl	_sooptcopyin
	mov	x23, x0
	cbnz	w0, LBB0_15
; %bb.6:
	ldr	x8, [x21, #8]
Lloh15:
	adrp	x9, _SOPT_SET@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SOPT_SET@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	x1, [x8]
	b	LBB0_13
LBB0_9:
Lloh18:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
	b	LBB0_16
LBB0_10:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_ipsec_get_pcbpolicy
	mov	x23, x0
	cbnz	w0, LBB0_15
; %bb.11:
	ldr	x2, [sp, #8]
	mov	x0, x21
	mov	x1, x19
	bl	_sooptcopyout
	b	LBB0_14
LBB0_12:
	mov	x1, #0
LBB0_13:
	mov	x0, x20
	mov	x2, x19
	mov	x3, x22
	bl	_ipsec_set_pcbpolicy
LBB0_14:
	mov	x23, x0
LBB0_15:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_free
LBB0_16:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOPROTOOPT,4,2                ; @ENOPROTOOPT
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_M_TEMP,4,2                     ; @M_TEMP
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_SOPT_SET,8,3                   ; @SOPT_SET
	.no_dead_strip	_ipsec_control_pcbpolicy
.subsections_via_symbols
