	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movl	%esi, -44(%rbp)
	movl	$1, -60(%rbp)
	leaq	-104(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_AI_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	%ebx, -104(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rcx
	xorl	%edi, %edi
	movq	%r14, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	xorl	%edi, %edi
	callq	_mcleanup
LBB0_2:
	movq	-56(%rbp), %rax
	movl	$4, %edi
	testq	%rax, %rax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rax), %rax
	addl	$4, %edi
	testq	%rax, %rax
	jne	LBB0_3
LBB0_5:
	callq	_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	xorl	%edi, %edi
	callq	_mcleanup
LBB0_7:
	movl	$0, (%r13)
	movq	-56(%rbp), %r12
	testq	%r12, %r12
	je	LBB0_27
## %bb.8:
	movq	%r13, %r15
	addq	$4, %r15
	movq	_SOL_SOCKET@GOTPCREL(%rip), %r14
	leaq	-60(%rbp), %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
LBB0_23:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r12), %r12
	testq	%r12, %r12
	je	LBB0_24
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %esi
	movl	(%r12), %edi
	movl	12(%r12), %edx
	callq	_socket
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, -44(%rbp)
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %edi
	movl	(%r14), %esi
	movq	_SO_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	movslq	(%r12), %rax
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %edi
	movq	_IPPROTO_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPV6_V6ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	testq	%rax, %rax
	js	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %edi
	movl	4(%r12), %edx
	movl	8(%r12), %esi
	callq	_bind
	testq	%rax, %rax
	js	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	(%r13)
	addq	$4, %r15
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_13
LBB0_21:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_13
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_syslog
	movl	(%r15), %edi
	callq	_close
	jmp	LBB0_23
LBB0_24:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_freeaddrinfo
LBB0_26:
	cmpl	$0, (%r13)
	jne	LBB0_28
LBB0_27:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_syslog
	movq	%r13, %rdi
	callq	_free
	xorl	%edi, %edi
	callq	_mcleanup
LBB0_28:
	movq	%r13, %rax
	addq	$72, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"printer"

	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't allocate memory for sockets"

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

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

	.comm	_SO_DEBUG,4,2                   ## @SO_DEBUG
L_.str.5:                               ## @.str.5
	.asciz	"setsockopt (SO_DEBUG): %m"

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

L_.str.7:                               ## @.str.7
	.asciz	"bind(): %m"

L_.str.8:                               ## @.str.8
	.asciz	"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, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x0
	str	w1, [sp, #76]
	mov	w8, #1
	str	w8, [sp, #20]
	add	x0, sp, #32
	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, #64]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w19, [sp, #32]
	str	w8, [sp, #48]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #32
	add	x3, sp, #24
	mov	x0, #0
	bl	_getaddrinfo
Lloh8:
	adrp	x25, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x25, [x25, _LOG_ERR@GOTPAGEOFF]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w19, [x25]
	bl	_gai_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_syslog
	mov	w0, #0
	bl	_mcleanup
LBB0_2:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_5
; %bb.3:
	mov	w0, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #24]
	add	w0, w0, #4
	cbnz	x8, LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w0, #4
LBB0_6:
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x25]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_syslog
	mov	w0, #0
	bl	_mcleanup
LBB0_8:
	str	wzr, [x19]
	ldr	x26, [sp, #24]
	cbz	x26, LBB0_28
; %bb.9:
	add	x27, x19, #4
Lloh14:
	adrp	x28, _LOG_DEBUG@GOTPAGE
Lloh15:
	ldr	x28, [x28, _LOG_DEBUG@GOTPAGEOFF]
Lloh16:
	adrp	x20, l_.str.3@PAGE
Lloh17:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh18:
	adrp	x22, _SOL_SOCKET@GOTPAGE
Lloh19:
	ldr	x22, [x22, _SOL_SOCKET@GOTPAGEOFF]
Lloh20:
	adrp	x23, _SO_REUSEADDR@GOTPAGE
Lloh21:
	ldr	x23, [x23, _SO_REUSEADDR@GOTPAGEOFF]
Lloh22:
	adrp	x24, _AF_INET6@GOTPAGE
Lloh23:
	ldr	x24, [x24, _AF_INET6@GOTPAGEOFF]
Lloh24:
	adrp	x21, _SO_DEBUG@GOTPAGE
Lloh25:
	ldr	x21, [x21, _SO_DEBUG@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x28]
	mov	x1, x20
	bl	_syslog
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x26, [x26, #24]
	cbz	x26, LBB0_25
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	ldp	w2, w1, [x26, #12]
	bl	_socket
	str	w0, [x27]
	tbnz	w0, #31, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x22]
	ldr	w2, [x23]
	add	x3, sp, #20
	mov	w4, #4
	bl	_setsockopt
	tbnz	x0, #63, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #76]
	cbz	w8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x27]
	ldr	w1, [x22]
	ldr	w2, [x21]
	add	x3, sp, #76
	mov	w4, #4
	bl	_setsockopt
	tbnz	x0, #63, LBB0_21
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	ldrsw	x8, [x26]
	ldr	x9, [x24]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x27]
Lloh26:
	adrp	x8, _IPPROTO_IPV6@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IPPROTO_IPV6@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _IPV6_V6ONLY@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IPV6_V6ONLY@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	add	x3, sp, #20
	mov	w4, #4
	bl	_setsockopt
	tbnz	x0, #63, LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x27]
	ldp	w2, w1, [x26, #4]
	bl	_bind
	tbnz	x0, #63, LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x27, x27, #4
	b	LBB0_11
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x25]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_24
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x25]
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x28]
Lloh36:
	adrp	x1, l_.str.7@PAGE
Lloh37:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x25]
Lloh38:
	adrp	x1, l_.str.6@PAGE
Lloh39:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_24:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_syslog
	ldr	w0, [x27]
	bl	_close
	b	LBB0_11
LBB0_25:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_27
; %bb.26:
	bl	_freeaddrinfo
LBB0_27:
	ldr	w8, [x19]
	cbnz	w8, LBB0_29
LBB0_28:
	ldr	w0, [x25]
Lloh40:
	adrp	x1, l_.str.8@PAGE
Lloh41:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_syslog
	mov	x0, x19
	bl	_free
	mov	w0, #0
	bl	_mcleanup
LBB0_29:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_AI_PASSIVE,4,2                 ; @AI_PASSIVE
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"printer"

	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't allocate memory for sockets"

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

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

	.comm	_SO_DEBUG,4,2                   ; @SO_DEBUG
l_.str.5:                               ; @.str.5
	.asciz	"setsockopt (SO_DEBUG): %m"

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

l_.str.7:                               ; @.str.7
	.asciz	"bind(): %m"

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

	.no_dead_strip	_socksetup
.subsections_via_symbols
