	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function conn_server
_conn_server:                           ## @conn_server
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	16(%rdi), %r12
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	movl	%eax, 8(%rbx)
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.1:
	movq	_F_GETFL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.2:
	movl	8(%rbx), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.3:
	movl	8(%rbx), %edi
	leaq	(%r12,%r15,8), %rsi
	addq	$4, %rsi
	movl	$4, %edx
	callq	_connect
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_19
## %bb.5:
	leaq	-60(%rbp), %r14
	movq	%r14, %rdi
	callq	_FD_ZERO
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	callq	_FD_SET
	movl	(%r12,%r15,8), %eax
	movl	%eax, -72(%rbp)
	movq	$0, -80(%rbp)
	movl	8(%rbx), %edi
	incl	%edi
	leaq	-80(%rbp), %r8
	xorl	%esi, %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_select
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.7:
	movl	(%r13), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_generr
LBB0_10:
	movl	8(%rbx), %edi
	callq	_close
	movl	$-1, 8(%rbx)
	jmp	LBB0_12
LBB0_11:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_generr
LBB0_12:
	movl	$-1, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_generr
	jmp	LBB0_10
LBB0_16:
	movl	$4, -48(%rbp)
	movl	8(%rbx), %edi
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_getpeername
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:
	movl	(%r13), %edi
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_21
## %bb.18:
	movl	$4, -52(%rbp)
	movl	8(%rbx), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	leaq	-52(%rbp), %r8
	callq	_getsockopt
	movl	-44(%rbp), %edi
	movl	%edi, (%r13)
LBB0_19:
	callq	_strerror
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_9
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_21:
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot create socket: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.1:                               ## @.str.1
	.asciz	"Cannot set non-blocking mode on socket: %s"

	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
L_.str.2:                               ## @.str.2
	.asciz	"select: %s"

L_.str.3:                               ## @.str.3
	.asciz	"connect: timed out"

	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
L_.str.4:                               ## @.str.4
	.asciz	"getpeername: %s"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ## @SO_ERROR
L_.str.5:                               ## @.str.5
	.asciz	"connect: %s"

	.no_dead_strip	_conn_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function conn_server
_conn_server:                           ; @conn_server
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	x20, [x0, #16]
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _PF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_socket
	str	w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.1:
Lloh9:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
Lloh12:
	adrp	x9, _F_SETFL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _F_SETFL@GOTPAGEOFF]
	ldr	w8, [x19, #8]
Lloh14:
	ldr	w1, [x9]
Lloh15:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w0
	mov	x0, x8
	bl	_fcntl
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.3:
	ldr	w0, [x19, #8]
	add	x8, x20, x22, lsl #3
	add	x1, x8, #4
	mov	w2, #4
	bl	_connect
	cbz	x0, LBB0_11
; %bb.4:
Lloh18:
	adrp	x21, _errno@GOTPAGE
Lloh19:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh20:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.5:
	sub	x0, x29, #36
	bl	_FD_ZERO
	ldr	w0, [x19, #8]
	sub	x1, x29, #36
	bl	_FD_SET
	lsl	x8, x22, #3
	ldr	w8, [x20, x8]
	str	w8, [sp, #48]
	str	xzr, [sp, #40]
	ldr	w8, [x19, #8]
	add	w0, w8, #1
	sub	x2, x29, #36
	add	x4, sp, #40
	mov	x1, #0
	mov	x3, #0
	bl	_select
	cbz	w0, LBB0_12
; %bb.6:
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.7:
	ldr	w0, [x21]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh25:
	adrp	x8, _errno@GOTPAGE
Lloh26:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_generr
	ldr	w0, [x19, #8]
	bl	_close
	mov	w0, #-1
	str	w0, [x19, #8]
	b	LBB0_11
LBB0_10:
Lloh30:
	adrp	x8, _errno@GOTPAGE
Lloh31:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_generr
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_13:
	mov	w8, #4
	str	w8, [sp, #24]
	ldr	w0, [x19, #8]
	add	x1, sp, #32
	add	x2, sp, #24
	bl	_getpeername
	cbz	x0, LBB0_11
; %bb.14:
	ldr	w0, [x21]
Lloh37:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.15:
	mov	w8, #4
	str	w8, [sp, #28]
	ldr	w0, [x19, #8]
Lloh40:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _SO_ERROR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SO_ERROR@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	add	x3, sp, #20
	add	x4, sp, #28
	bl	_getsockopt
	ldr	w0, [sp, #20]
	str	w0, [x21]
LBB0_16:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh46:
	adrp	x1, l_.str.5@PAGE
Lloh47:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_17:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh48:
	adrp	x1, l_.str.4@PAGE
Lloh49:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot create socket: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.1:                               ; @.str.1
	.asciz	"Cannot set non-blocking mode on socket: %s"

	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
l_.str.2:                               ; @.str.2
	.asciz	"select: %s"

l_.str.3:                               ; @.str.3
	.asciz	"connect: timed out"

	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
l_.str.4:                               ; @.str.4
	.asciz	"getpeername: %s"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ; @SO_ERROR
l_.str.5:                               ; @.str.5
	.asciz	"connect: %s"

	.no_dead_strip	_conn_server
.subsections_via_symbols
