	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vxlan_setup_socket
_vxlan_setup_socket:                    ## @vxlan_setup_socket
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movq	32(%rdi), %rbx
	leaq	24(%rdi), %r13
	addq	$20, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_vxlan_sockaddr_in_multicast
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_MPASS
	movl	$-1, (%r15)
	leaq	-48(%rbp), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_vxlan_socket_create
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	%eax, %r12d
	movq	%r13, %rdi
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	callq	_vxlan_socket_mc_lookup
	jmp	LBB0_4
LBB0_3:
	callq	_vxlan_socket_lookup
LBB0_4:
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	callq	_vxlan_setup_multicast
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	-48(%rbp), %rdi
	movl	16(%r15), %ecx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movq	%r15, %r8
	callq	_vxlan_socket_mc_add_group
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
LBB0_9:
	movq	-48(%rbp), %rdi
	movq	%rdi, 8(%r15)
	movq	%r15, %rsi
	callq	_vxlan_socket_insert_softc
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r12d
	movq	$0, 8(%r15)
	movl	4(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
LBB0_12:
	callq	_if_printf
LBB0_13:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.14:
	movl	(%r15), %esi
	cmpl	$-1, %esi
	je	LBB0_16
## %bb.15:
	callq	_vxlan_socket_mc_release_group_by_idx
	movl	$-1, (%r15)
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:
	movq	%r15, %rdi
	callq	_vxlan_free_multicast
LBB0_18:
	movq	-48(%rbp), %rdi
	callq	_vxlan_socket_release
	jmp	LBB0_19
LBB0_10:
	xorl	%r12d, %r12d
LBB0_19:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create socket (error: %d), and no existing socket found\n"

L_.str.1:                               ## @.str.1
	.asciz	"network identifier %d already exists in this socket\n"

	.no_dead_strip	_vxlan_setup_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vxlan_setup_socket
_vxlan_setup_socket:                    ; @vxlan_setup_socket
	.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
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x21, [x0, #32]
	add	x23, x0, #24
	add	x24, x0, #20
	mov	x0, x24
	bl	_vxlan_sockaddr_in_multicast
	mov	x20, x0
	cmn	w0, #1
	cset	w0, ne
	bl	_MPASS
	mov	w8, #-1
	str	w8, [x19]
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_vxlan_socket_create
	cbz	w0, LBB0_3
; %bb.1:
	mov	x22, x0
	mov	x0, x23
	cbz	w20, LBB0_8
; %bb.2:
	bl	_vxlan_socket_mc_lookup
	str	x0, [sp, #8]
	cbz	x0, LBB0_9
LBB0_3:
	cbz	w20, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_vxlan_setup_multicast
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	x0, [sp, #8]
	ldr	w3, [x19, #16]
	mov	x1, x24
	mov	x2, x23
	mov	x4, x19
	bl	_vxlan_socket_mc_add_group
	mov	x22, x0
	cbnz	w0, LBB0_11
LBB0_6:
	ldr	x0, [sp, #8]
	str	x0, [x19, #8]
	mov	x1, x19
	bl	_vxlan_socket_insert_softc
	mov	x22, x0
	cbz	w0, LBB0_17
; %bb.7:
	str	xzr, [x19, #8]
	ldr	w2, [x19, #4]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	b	LBB0_10
LBB0_8:
	bl	_vxlan_socket_lookup
	str	x0, [sp, #8]
	cbnz	x0, LBB0_3
LBB0_9:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
LBB0_10:
	bl	_if_printf
LBB0_11:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_17
; %bb.12:
	ldr	w1, [x19]
	cmn	w1, #1
	b.eq	LBB0_14
; %bb.13:
	bl	_vxlan_socket_mc_release_group_by_idx
	mov	w8, #-1
	str	w8, [x19]
LBB0_14:
	cbz	w20, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_vxlan_free_multicast
LBB0_16:
	ldr	x0, [sp, #8]
	bl	_vxlan_socket_release
LBB0_17:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create socket (error: %d), and no existing socket found\n"

l_.str.1:                               ; @.str.1
	.asciz	"network identifier %d already exists in this socket\n"

	.no_dead_strip	_vxlan_setup_socket
.subsections_via_symbols
