	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test                           ## -- Begin function test
	.p2align	4, 0x90
_test:                                  ## @test
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	cmpl	$128, %esi
	je	LBB0_3
## %bb.1:
                                        ## implicit-def: $r14d
                                        ## implicit-def: $r15d
	cmpl	$129, %eax
	jne	LBB0_5
## %bb.2:
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	_IP_IPSEC_POLICY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	_IPV6_IPSEC_POLICY@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %r15d
LBB0_5:
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_6
LBB0_7:
	movq	%r12, %rdi
	callq	_PFKEY_EXTLEN
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movl	%eax, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_8
LBB0_9:
	movl	$1024, -1076(%rbp)              ## imm = 0x400
	leaq	-1072(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memset
	leaq	-1076(%rbp), %r8
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	callq	_getsockopt
	testq	%rax, %rax
	js	LBB0_10
LBB0_11:
	movl	-1076(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	-1072(%rbp), %rdi
	xorl	%esi, %esi
	callq	_ipsec_dump_policy
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
	callq	_ipsec_strerror
LBB0_14:
	movq	%rbx, %rdi
	callq	_free
	movl	%r13d, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	jmp	LBB0_11
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_IP_IPSEC_POLICY,4,2            ## @IP_IPSEC_POLICY
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.comm	_IPV6_IPSEC_POLICY,4,2          ## @IPV6_IPSEC_POLICY
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket"

L_.str.1:                               ## @.str.1
	.asciz	"setsockopt"

L_.str.2:                               ## @.str.2
	.asciz	"getsockopt"

L_.str.3:                               ## @.str.3
	.asciz	"\tgetlen:%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"\t[%s]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test                           ; -- Begin function test
	.p2align	2
_test:                                  ; @test
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1056
	mov	x8, x1
	mov	x22, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-56]
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
                                        ; implicit-def: $w20
                                        ; implicit-def: $w21
	cmp	w8, #129
	b.ne	LBB0_5
; %bb.2:
Lloh3:
	adrp	x9, _IPPROTO_IP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPPROTO_IP@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x9]
Lloh6:
	adrp	x9, _IP_IPSEC_POLICY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IP_IPSEC_POLICY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x9, _IPPROTO_IPV6@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x9]
Lloh11:
	adrp	x9, _IPV6_IPSEC_POLICY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IPV6_IPSEC_POLICY@GOTPAGEOFF]
LBB0_4:
	ldr	w21, [x9]
LBB0_5:
Lloh13:
	adrp	x9, _SOCK_DGRAM@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SOCK_DGRAM@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x9]
	mov	x0, x8
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbnz	w0, #31, LBB0_13
LBB0_6:
	mov	x0, x22
	bl	_PFKEY_EXTLEN
	mov	x4, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_setsockopt
	tbnz	x0, #63, LBB0_14
LBB0_7:
	mov	w8, #1024
	str	w8, [sp, #20]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #1024
	bl	_memset
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_getsockopt
	tbnz	x0, #63, LBB0_15
LBB0_8:
	ldr	w8, [sp, #20]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	add	x0, sp, #24
	mov	x1, #0
	bl	_ipsec_dump_policy
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.9:
	str	x20, [sp]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	b	LBB0_11
LBB0_10:
	bl	_ipsec_strerror
LBB0_11:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_close
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.12:
	add	sp, sp, #1056
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	b	LBB0_6
LBB0_14:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_7
LBB0_15:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	b	LBB0_8
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_IP_IPSEC_POLICY,4,2            ; @IP_IPSEC_POLICY
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.comm	_IPV6_IPSEC_POLICY,4,2          ; @IPV6_IPSEC_POLICY
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket"

l_.str.1:                               ; @.str.1
	.asciz	"setsockopt"

l_.str.2:                               ; @.str.2
	.asciz	"getsockopt"

l_.str.3:                               ; @.str.3
	.asciz	"\tgetlen:%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"\t[%s]\n"

.subsections_via_symbols
