	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socksetup
_socksetup:                             ## @socksetup
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %ebx
	movl	$1, -52(%rbp)
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_AI_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	%ebx, -96(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_1
## %bb.6:
	movl	%eax, %ebx
	movq	_LOG_ERR@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	movq	_EAI_SYSTEM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_25
## %bb.7:
	movl	(%r15), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_25
LBB0_1:
	movq	-48(%rbp), %rax
	movl	$4, %edi
	testq	%rax, %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rax), %rax
	addl	$4, %edi
	testq	%rax, %rax
	jne	LBB0_2
LBB0_4:
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	%rax, %r13
	movl	$0, (%rax)
	movq	-48(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.9:
	movq	%r13, %r12
	addq	$4, %r12
	leaq	-52(%rbp), %r15
	movq	_AF_INET6@GOTPCREL(%rip), %r14
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_21
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %esi
	movl	(%rbx), %edi
	movl	12(%rbx), %edx
	callq	_socket
	movl	%eax, (%r12)
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%r15, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movslq	(%rbx), %rax
	cmpq	%rax, (%r14)
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r12), %edi
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPV6_V6ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r12), %edi
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	callq	_bind
	testq	%rax, %rax
	js	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	(%r13)
	addq	$4, %r12
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	movl	(%r12), %edi
	callq	_close
	jmp	LBB0_20
LBB0_5:
	movq	-48(%rbp), %rdi
	callq	_freeaddrinfo
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_25
LBB0_21:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	callq	_freeaddrinfo
LBB0_23:
	cmpl	$0, (%r13)
	jne	LBB0_25
LBB0_24:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	movq	%r13, %rdi
	callq	_free
	xorl	%r13d, %r13d
LBB0_25:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AI_PASSIVE,4,2                 ## @AI_PASSIVE
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_EAI_SYSTEM,4,2                 ## @EAI_SYSTEM
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"couldn't allocate memory for sockets"

	.comm	_LOG_DEBUG,4,2                  ## @LOG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"control socket: %m"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_LOG_WARNING,4,2                ## @LOG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"control setsockopt (SO_REUSEADDR): %m"

	.comm	_AF_INET6,8,3                   ## @AF_INET6
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.comm	_IPV6_V6ONLY,4,2                ## @IPV6_V6ONLY
L_.str.4:                               ## @.str.4
	.asciz	"control setsockopt (IPV6_V6ONLY): %m"

L_.str.5:                               ## @.str.5
	.asciz	"control bind: %m"

L_.str.6:                               ## @.str.6
	.asciz	"control socket: Couldn't bind to any socket"

	.no_dead_strip	_socksetup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socksetup
_socksetup:                             ; @socksetup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w8, #1
	str	w8, [sp, #12]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh0:
	adrp	x8, _AI_PASSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AI_PASSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #56]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w21, [sp, #24]
	str	w8, [sp, #40]
	add	x2, sp, #24
	add	x3, sp, #16
	mov	x0, x20
	mov	x1, x19
	bl	_getaddrinfo
	cbz	w0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x21, _LOG_ERR@GOTPAGE
Lloh7:
	ldr	x21, [x21, _LOG_ERR@GOTPAGEOFF]
	ldr	w20, [x21]
	bl	_gai_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_syslog
Lloh10:
	adrp	x8, _EAI_SYSTEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAI_SYSTEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_26
; %bb.2:
	ldr	w19, [x21]
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_syslog
	b	LBB0_26
LBB0_3:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_6
; %bb.4:
	mov	w0, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #24]
	add	w0, w0, #4
	cbnz	x8, LBB0_5
	b	LBB0_7
LBB0_6:
	mov	w0, #4
LBB0_7:
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_21
; %bb.8:
	str	wzr, [x19]
	ldr	x24, [sp, #16]
	cbz	x24, LBB0_25
; %bb.9:
	add	x25, x19, #4
Lloh18:
	adrp	x26, _LOG_DEBUG@GOTPAGE
Lloh19:
	ldr	x26, [x26, _LOG_DEBUG@GOTPAGEOFF]
Lloh20:
	adrp	x20, l_.str.2@PAGE
Lloh21:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh22:
	adrp	x27, _SOL_SOCKET@GOTPAGE
Lloh23:
	ldr	x27, [x27, _SOL_SOCKET@GOTPAGEOFF]
Lloh24:
	adrp	x28, _SO_REUSEADDR@GOTPAGE
Lloh25:
	ldr	x28, [x28, _SO_REUSEADDR@GOTPAGEOFF]
Lloh26:
	adrp	x22, _LOG_WARNING@GOTPAGE
Lloh27:
	ldr	x22, [x22, _LOG_WARNING@GOTPAGEOFF]
Lloh28:
	adrp	x21, _AF_INET6@GOTPAGE
Lloh29:
	ldr	x21, [x21, _AF_INET6@GOTPAGEOFF]
Lloh30:
	adrp	x23, _IPV6_V6ONLY@GOTPAGE
Lloh31:
	ldr	x23, [x23, _IPV6_V6ONLY@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x26]
	mov	x1, x20
	bl	_syslog
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x24, [x24, #24]
	cbz	x24, LBB0_22
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	ldp	w2, w1, [x24, #12]
	bl	_socket
	str	w0, [x25]
	tbnz	w0, #31, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x28]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_syslog
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	ldrsw	x8, [x24]
	ldr	x9, [x21]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x25]
Lloh34:
	adrp	x8, _IPPROTO_IPV6@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldr	w2, [x23]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	tbz	x0, #63, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_syslog
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x25]
	ldp	w2, w1, [x24, #4]
	bl	_bind
	tbnz	x0, #63, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x25, x25, #4
	b	LBB0_11
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x26]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_syslog
	ldr	w0, [x25]
	bl	_close
	b	LBB0_11
LBB0_21:
	ldr	x0, [sp, #16]
	bl	_freeaddrinfo
Lloh41:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_syslog
	b	LBB0_27
LBB0_22:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_24
; %bb.23:
	bl	_freeaddrinfo
LBB0_24:
	ldr	w8, [x19]
	cbnz	w8, LBB0_27
LBB0_25:
Lloh46:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh47:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
Lloh49:
	adrp	x1, l_.str.6@PAGE
Lloh50:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_syslog
	mov	x0, x19
	bl	_free
LBB0_26:
	mov	x19, #0
LBB0_27:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_AI_PASSIVE,4,2                 ; @AI_PASSIVE
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_EAI_SYSTEM,4,2                 ; @EAI_SYSTEM
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"couldn't allocate memory for sockets"

	.comm	_LOG_DEBUG,4,2                  ; @LOG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"control socket: %m"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_LOG_WARNING,4,2                ; @LOG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"control setsockopt (SO_REUSEADDR): %m"

	.comm	_AF_INET6,8,3                   ; @AF_INET6
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.comm	_IPV6_V6ONLY,4,2                ; @IPV6_V6ONLY
l_.str.4:                               ; @.str.4
	.asciz	"control setsockopt (IPV6_V6ONLY): %m"

l_.str.5:                               ; @.str.5
	.asciz	"control bind: %m"

l_.str.6:                               ; @.str.6
	.asciz	"control socket: Couldn't bind to any socket"

	.no_dead_strip	_socksetup
.subsections_via_symbols
