	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfkey_open                     ## -- Begin function pfkey_open
	.p2align	4, 0x90
_pfkey_open:                            ## @pfkey_open
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PF_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PF_KEY_V2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movl	$131072, -36(%rbp)              ## imm = 0x20000
	movl	$4, -44(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SO_SNDBUF@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movl	%eax, %edi
	callq	_getsockopt
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	cmpl	$131071, -40(%rbp)              ## imm = 0x1FFFF
	jg	LBB0_5
LBB0_4:
	movl	(%r15), %esi
	movl	(%r14), %edx
	leaq	-36(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
LBB0_5:
	movl	$2097152, -36(%rbp)             ## imm = 0x200000
	movl	$4, -44(%rbp)
	movl	(%r15), %esi
	movq	_SO_RCVBUF@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movl	%ebx, %edi
	callq	_getsockopt
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jg	LBB0_9
	jmp	LBB0_12
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movl	%eax, %edi
	callq	___ipsec_set_strerror
	movl	$-1, %ebx
	jmp	LBB0_13
LBB0_7:
	movl	$131072, -40(%rbp)              ## imm = 0x20000
	movl	$131072, %eax                   ## imm = 0x20000
	cmpl	%eax, -36(%rbp)
	jle	LBB0_12
LBB0_9:
	leaq	-36(%rbp), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	(%r12), %edx
	movl	%ebx, %edi
	movq	%r14, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-36(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, -36(%rbp)
	cmpl	-40(%rbp), %ecx
	jg	LBB0_10
LBB0_12:
	movq	_EIPSEC_NO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	___ipsec_errcode@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_KEY,4,2                     ## @PF_KEY
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
	.comm	_PF_KEY_V2,4,2                  ## @PF_KEY_V2
	.comm	_errno,4,2                      ## @errno
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_SNDBUF,4,2                  ## @SO_SNDBUF
	.comm	_SO_RCVBUF,4,2                  ## @SO_RCVBUF
	.comm	_EIPSEC_NO_ERROR,4,2            ## @EIPSEC_NO_ERROR
	.comm	___ipsec_errcode,4,2            ## @__ipsec_errcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfkey_open                     ; -- Begin function pfkey_open
	.p2align	2
_pfkey_open:                            ; @pfkey_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _PF_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _PF_KEY_V2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PF_KEY_V2@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_socket
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w9, #131072
	mov	w8, #4
	stp	w8, w9, [sp, #4]
Lloh9:
	adrp	x20, _SOL_SOCKET@GOTPAGE
Lloh10:
	ldr	x20, [x20, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh11:
	adrp	x21, _SO_SNDBUF@GOTPAGE
Lloh12:
	ldr	x21, [x21, _SO_SNDBUF@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #12
	add	x4, sp, #4
	bl	_getsockopt
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w8, [sp, #12]
	cmp	w8, #32, lsl #12                ; =131072
	b.ge	LBB0_4
LBB0_3:
	ldr	w1, [x20]
	ldr	w2, [x21]
	add	x3, sp, #8
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
LBB0_4:
	mov	w9, #2097152
	mov	w8, #4
	stp	w8, w9, [sp, #4]
	ldr	w1, [x20]
Lloh13:
	adrp	x21, _SO_RCVBUF@GOTPAGE
Lloh14:
	ldr	x21, [x21, _SO_RCVBUF@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #12
	add	x4, sp, #4
	mov	x0, x19
	bl	_getsockopt
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_strerror
	bl	___ipsec_set_strerror
	mov	w19, #-1
	b	LBB0_12
LBB0_7:
	mov	w8, #131072
	str	w8, [sp, #12]
LBB0_8:
	ldr	w9, [sp, #8]
	cmp	w9, w8
	b.le	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	ldr	w2, [x21]
	add	x3, sp, #8
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldp	w8, w9, [sp, #8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [sp, #8]
	cmp	w8, w9
	b.gt	LBB0_9
LBB0_11:
Lloh18:
	adrp	x8, _EIPSEC_NO_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIPSEC_NO_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, ___ipsec_errcode@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___ipsec_errcode@GOTPAGEOFF]
Lloh23:
	str	w8, [x9]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_KEY,4,2                     ; @PF_KEY
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
	.comm	_PF_KEY_V2,4,2                  ; @PF_KEY_V2
	.comm	_errno,4,2                      ; @errno
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_SNDBUF,4,2                  ; @SO_SNDBUF
	.comm	_SO_RCVBUF,4,2                  ; @SO_RCVBUF
	.comm	_EIPSEC_NO_ERROR,4,2            ; @EIPSEC_NO_ERROR
	.comm	___ipsec_errcode,4,2            ; @__ipsec_errcode
.subsections_via_symbols
