	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_connect_data
_ng_connect_data:                       ## @ng_connect_data
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_EISCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_2:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_NG_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_ng_package_data
	movq	%rax, %r14
	movl	(%rbx), %edx
	xorl	%edi, %edi
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_ng_address_path
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	(%r14), %r15
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_NG_SOCKET_NODE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_NG_FREE_ITEM
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_NG_NODE_PRIVATE
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_NG_FREE_ITEM
	movq	_EADDRINUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_7:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mtx_lock
	movq	%r12, 16(%r15)
	movq	%r15, 8(%r12)
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	incl	4(%r15)
	movq	%r15, %rdi
	callq	_mtx_unlock
	movq	%r14, %rdi
	callq	_NG_FREE_ITEM
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EISCONN,4,2                    ## @EISCONN
	.comm	_NG_WAITOK,4,2                  ## @NG_WAITOK
	.comm	_NG_SOCKET_NODE_TYPE,4,2        ## @NG_SOCKET_NODE_TYPE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.no_dead_strip	_ng_connect_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_connect_data
_ng_connect_data:                       ; @ng_connect_data
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EISCONN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EISCONN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_2:
	mov	x19, x1
	mov	x21, x0
Lloh3:
	adrp	x8, _NG_WAITOK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_WAITOK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, #0
	bl	_ng_package_data
	mov	x20, x0
	ldr	w2, [x21]
	mov	x0, #0
	mov	x1, x20
	mov	w3, #0
	bl	_ng_address_path
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x21, [x20]
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _NG_SOCKET_NODE_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NG_SOCKET_NODE_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_NG_FREE_ITEM
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_5:
	mov	x0, x21
	bl	_NG_NODE_PRIVATE
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_NG_FREE_ITEM
Lloh12:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	bl	_mtx_lock
	str	x19, [x21, #16]
	str	x21, [x19, #8]
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
	mov	x0, x21
	bl	_mtx_unlock
	mov	x0, x20
	bl	_NG_FREE_ITEM
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EISCONN,4,2                    ; @EISCONN
	.comm	_NG_WAITOK,4,2                  ; @NG_WAITOK
	.comm	_NG_SOCKET_NODE_TYPE,4,2        ; @NG_SOCKET_NODE_TYPE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.no_dead_strip	_ng_connect_data
.subsections_via_symbols
