	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_connect
_try_connect:                           ## @try_connect
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movl	$1, -36(%rbp)
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FIONBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movl	%r15d, %edi
	callq	_fcntl
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_FD_SET
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_7
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	callq	_inet_ntoa
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	movl	%r15d, %edi
	incl	%edi
	xorl	%r14d, %r14d
	leaq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rcx, %rdx
	xorl	%r8d, %r8d
	callq	_select
	testq	%rax, %rax
	js	LBB0_8
## %bb.11:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_12
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_EINTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, %rdx
	sete	%al
	movq	_timer_fired@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	sete	%cl
	cmpq	%rsi, %rdx
	jne	LBB0_10
## %bb.9:
	movl	$-1, %r14d
	andb	%cl, %al
	je	LBB0_12
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movl	$-1, %r14d
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_12:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket(PF_INET, SOCK_STREAM)"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_FIONBIO,4,2                    ## @FIONBIO
L_.str.1:                               ## @.str.1
	.asciz	"fcntl(s, FIOBIO, 1)"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINPROGRESS,8,3                ## @EINPROGRESS
L_.str.2:                               ## @.str.2
	.asciz	"connect(%s)"

	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_timer_fired,4,2                ## @timer_fired
L_.str.3:                               ## @.str.3
	.asciz	"select"

	.no_dead_strip	_try_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_connect
_try_connect:                           ; @try_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, 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]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
	mov	w8, #1
	str	w8, [sp, #20]
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _FIONBIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FIONBIO@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #20
	mov	x0, x19
	bl	_fcntl
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_4:
	add	x0, sp, #24
	bl	_FD_ZERO
	add	x1, sp, #24
	mov	x0, x19
	bl	_FD_SET
	mov	x0, x19
	mov	x1, x20
	mov	w2, #4
	bl	_connect
	tbz	x0, #63, LBB0_7
; %bb.5:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x20]
	bl	_inet_ntoa
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_7:
	add	w0, w19, #1
	add	x1, sp, #24
	add	x2, sp, #24
	add	x3, sp, #24
	mov	x4, #0
	bl	_select
	tbnz	x0, #63, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_close
	mov	w19, #0
	b	LBB0_12
LBB0_9:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _EINTR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
Lloh30:
	adrp	x10, _timer_fired@GOTPAGE
Lloh31:
	ldr	x10, [x10, _timer_fired@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	cmp	w10, #0
	cset	w10, eq
	cmp	x8, x9
	cset	w8, eq
	and	w8, w8, w10
	ccmp	w8, #0, #0, eq
	b.eq	LBB0_11
; %bb.10:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w19, #-1
	mov	w0, #-1
	bl	_err
	b	LBB0_12
LBB0_11:
	mov	w19, #-1
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket(PF_INET, SOCK_STREAM)"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_FIONBIO,4,2                    ; @FIONBIO
l_.str.1:                               ; @.str.1
	.asciz	"fcntl(s, FIOBIO, 1)"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINPROGRESS,8,3                ; @EINPROGRESS
l_.str.2:                               ; @.str.2
	.asciz	"connect(%s)"

	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_timer_fired,4,2                ; @timer_fired
l_.str.3:                               ; @.str.3
	.asciz	"select"

	.no_dead_strip	_try_connect
.subsections_via_symbols
