	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_stream_connect            ## -- Begin function inet_stream_connect
	.p2align	4, 0x90
_inet_stream_connect:                   ## @inet_stream_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_lock_sock
	movq	(%rbx), %rax
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	*(%rax)
	movl	%eax, %ebx
	movl	$128, %eax
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_SS_DISCONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movl	%eax, (%r14)
	jmp	LBB0_22
LBB0_4:
	movl	(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.7:
	cmpl	$130, %eax
	je	LBB0_11
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	movl	(%r12), %eax
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.12:
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	*8(%rax)
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movl	$129, (%r14)
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movq	_EISCONN@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movq	%r12, %rdi
	callq	_release_sock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EALREADY@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%r15d, %esi
	movq	%r12, %rdi
	callq	_sock_sndtimeo
	movq	%rax, %r13
	movl	(%r12), %eax
	movq	_TCPF_SYN_SENT@GOTPCREL(%rip), %rcx
	movq	_TCPF_SYN_RECV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	btl	%eax, %edx
	jae	LBB0_20
## %bb.16:
	testq	%r13, %r13
	je	LBB0_22
## %bb.17:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_inet_wait_for_connect
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:
	movq	%r13, %rdi
	callq	_sock_intr_errno
	movl	%eax, %ebx
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_22
## %bb.19:
	movl	(%r12), %eax
LBB0_20:
	movq	_TCP_CLOSE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_21
## %bb.23:
	movq	%r12, %rdi
	callq	_sock_error
	movq	%rax, %rbx
	movq	_ECONNABORTED@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	testq	%rbx, %rbx
	cmovel	%ecx, %ebx
	movl	$128, (%r14)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_22
## %bb.24:
	movq	_SS_DISCONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_22
LBB0_21:
	movl	$130, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_UNSPEC,8,3                  ## @AF_UNSPEC
	.comm	_SS_DISCONNECTING,4,2           ## @SS_DISCONNECTING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EISCONN,4,2                    ## @EISCONN
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_TCP_CLOSE,4,2                  ## @TCP_CLOSE
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_TCPF_SYN_SENT,4,2              ## @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ## @TCPF_SYN_RECV
	.comm	_current,4,2                    ## @current
	.comm	_ECONNABORTED,4,2               ## @ECONNABORTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_stream_connect            ; -- Begin function inet_stream_connect
	.p2align	2
_inet_stream_connect:                   ; @inet_stream_connect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _AF_UNSPEC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_UNSPEC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	mov	x22, x0
Lloh3:
	adrp	x8, _SS_DISCONNECTING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SS_DISCONNECTING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #128
	cmp	w0, #0
	csel	w8, w9, w8, eq
LBB0_2:
	str	w8, [x20]
	b	LBB0_12
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.5:
	cmp	w8, #130
	b.eq	LBB0_10
; %bb.6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _TCP_CLOSE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TCP_CLOSE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	blr	x8
	tbnz	w0, #31, LBB0_23
; %bb.9:
	mov	w8, #129
	str	w8, [x20]
Lloh11:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
Lloh13:
	adrp	x8, _EISCONN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x19
	bl	_release_sock
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh15:
	adrp	x8, _EALREADY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
LBB0_14:
	ldr	w22, [x8]
Lloh17:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w1, w8, w21
	mov	x0, x19
	bl	_sock_sndtimeo
	ldr	w8, [x19]
Lloh20:
	adrp	x9, _TCPF_SYN_SENT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TCPF_SYN_SENT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _TCPF_SYN_RECV@GOTPAGE
Lloh24:
	ldr	x10, [x10, _TCPF_SYN_RECV@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w9, w10, w9
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_19
; %bb.15:
	mov	x23, x0
	neg	w22, w22
	cbz	x0, LBB0_12
; %bb.16:
	mov	x0, x19
	mov	x1, x23
	bl	_inet_wait_for_connect
	cbz	w0, LBB0_12
; %bb.17:
	mov	x0, x23
	bl	_sock_intr_errno
	mov	x22, x0
Lloh26:
	adrp	x8, _current@GOTPAGE
Lloh27:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_signal_pending
	cbnz	x0, LBB0_12
; %bb.18:
	ldr	w8, [x19]
LBB0_19:
Lloh29:
	adrp	x9, _TCP_CLOSE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TCP_CLOSE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
; %bb.20:
	mov	x0, x19
	bl	_sock_error
Lloh32:
	adrp	x8, _ECONNABORTED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ECONNABORTED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w22, w0, w8, ne
	mov	w8, #128
	str	w8, [x20]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	cbz	w0, LBB0_12
; %bb.21:
Lloh35:
	adrp	x8, _SS_DISCONNECTING@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SS_DISCONNECTING@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	b	LBB0_2
LBB0_22:
	mov	w22, #0
	mov	w8, #130
	b	LBB0_2
LBB0_23:
	mov	x22, x0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_UNSPEC,8,3                  ; @AF_UNSPEC
	.comm	_SS_DISCONNECTING,4,2           ; @SS_DISCONNECTING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EISCONN,4,2                    ; @EISCONN
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_TCP_CLOSE,4,2                  ; @TCP_CLOSE
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_TCPF_SYN_SENT,4,2              ; @TCPF_SYN_SENT
	.comm	_TCPF_SYN_RECV,4,2              ; @TCPF_SYN_RECV
	.comm	_current,4,2                    ; @current
	.comm	_ECONNABORTED,4,2               ; @ECONNABORTED
.subsections_via_symbols
