	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vxlan_socket_init
_vxlan_socket_init:                     ## @vxlan_socket_init
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movl	4(%rdi), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r9), %r8d
	movq	%r15, %rsi
	callq	_socreate
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_if_printf
	jmp	LBB0_7
LBB0_2:
	movl	(%r15), %edi
	movq	_vxlan_rcv_udp_packet@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_udp_set_kernel_tunneling
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_if_printf
	movl	%r12d, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_vxlan_reuse_port@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movl	$1, -36(%rbp)
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_bzero
	movq	_SOPT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_IPPROTO_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_SO_REUSEPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	-36(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$4, -56(%rbp)
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_sosetopt
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_if_printf
	movl	%r15d, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_curthread,8,3                  ## @curthread
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create socket: %d\n"

	.comm	_vxlan_rcv_udp_packet,4,2       ## @vxlan_rcv_udp_packet
L_.str.1:                               ## @.str.1
	.asciz	"cannot set tunneling function: %d\n"

	.comm	_vxlan_reuse_port,8,3           ## @vxlan_reuse_port
	.comm	_SOPT_SET,4,2                   ## @SOPT_SET
	.comm	_IPPROTO_IP,4,2                 ## @IPPROTO_IP
	.comm	_SO_REUSEPORT,4,2               ## @SO_REUSEPORT
L_.str.2:                               ## @.str.2
	.asciz	"cannot set REUSEADDR socket opt: %d\n"

	.no_dead_strip	_vxlan_socket_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vxlan_socket_init
_vxlan_socket_init:                     ; @vxlan_socket_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _curthread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh2:
	ldr	x5, [x8]
Lloh3:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
	ldr	w0, [x0, #4]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	ldr	w4, [x5]
	mov	x1, x20
	bl	_socreate
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w0, [x20]
Lloh11:
	adrp	x8, _vxlan_rcv_udp_packet@GOTPAGE
Lloh12:
	ldr	x8, [x8, _vxlan_rcv_udp_packet@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, #0
	mov	x3, x20
	bl	_udp_set_kernel_tunneling
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	mov	x2, x21
	bl	_if_printf
LBB0_5:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh16:
	adrp	x8, _vxlan_reuse_port@GOTPAGE
Lloh17:
	ldr	x8, [x8, _vxlan_reuse_port@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.7:
	mov	w8, #1
	str	w8, [sp, #4]
	add	x0, sp, #8
	mov	w1, #24
	bl	_bzero
Lloh19:
	adrp	x8, _SOPT_SET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SOPT_SET@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _IPPROTO_IP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IPPROTO_IP@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
Lloh25:
	adrp	x8, _SO_REUSEPORT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SO_REUSEPORT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	add	x9, sp, #4
	str	x9, [sp, #8]
	mov	w9, #4
	stp	w9, w8, [sp, #16]
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_sosetopt
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.8:
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_9:
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_curthread,8,3                  ; @curthread
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create socket: %d\n"

	.comm	_vxlan_rcv_udp_packet,4,2       ; @vxlan_rcv_udp_packet
l_.str.1:                               ; @.str.1
	.asciz	"cannot set tunneling function: %d\n"

	.comm	_vxlan_reuse_port,8,3           ; @vxlan_reuse_port
	.comm	_SOPT_SET,4,2                   ; @SOPT_SET
	.comm	_IPPROTO_IP,4,2                 ; @IPPROTO_IP
	.comm	_SO_REUSEPORT,4,2               ; @SO_REUSEPORT
l_.str.2:                               ; @.str.2
	.asciz	"cannot set REUSEADDR socket opt: %d\n"

	.no_dead_strip	_vxlan_socket_init
.subsections_via_symbols
