	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mini_cm_connect
_mini_cm_connect:                       ## @mini_cm_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	movq	%r8, %rdx
	xorl	%ecx, %ecx
	callq	_make_cm_node
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r14
	movl	$1, 40(%rax)
	movq	_NES_CM_DEFAULT_RCV_WND_SCALE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, 48(%r14)
	movq	(%r15), %rax
	cmpq	8(%r15), %rax
	jne	LBB0_8
## %bb.2:
	movl	(%r12), %edi
	callq	_ntohl
	movl	4(%r14), %edx
	movq	_NES_CM_LISTENER_ACTIVE_STATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_find_listener
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movl	24(%r15), %ecx
	movl	%ecx, -76(%rbp)
	movl	20(%r15), %ecx
	movl	%ecx, -72(%rbp)
	movl	(%rax), %ecx
	movl	%ecx, -80(%rbp)
	leaq	-96(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%rax, %rcx
	callq	_make_cm_node
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	_cm_loopbacks@GOTPCREL(%rip), %rdi
	callq	_atomic_inc
	movq	%r14, 88(%r15)
	movq	(%rbx), %rax
	movq	%rax, 48(%r15)
	movq	%r15, 88(%r14)
	movq	32(%r15), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_memcpy
	movq	%rbx, 24(%r15)
	movq	_NES_CM_STATE_TSA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movl	76(%r15), %eax
	movl	%eax, 80(%r14)
	movl	76(%r14), %eax
	movl	%eax, 80(%r15)
	movl	64(%r15), %eax
	movl	%eax, 72(%r14)
	movl	64(%r14), %ecx
	movl	%ecx, 72(%r15)
	movl	%eax, 68(%r14)
	movl	%ecx, 68(%r15)
	movq	48(%r15), %rax
	movq	%rax, 56(%r14)
	movq	48(%r14), %rax
	movq	%rax, 56(%r15)
	movq	_NES_CM_STATE_MPAREQ_RCVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_NES_CM_EVENT_MPA_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_create_event
	jmp	LBB0_11
LBB0_8:
	movq	32(%r14), %rdi
	addq	$16, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 24(%r14)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	_NES_CM_STATE_SYN_SENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_send_syn
	movq	_NES_DBG_CM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%r14), %edx
	movl	(%r14), %r9d
	movl	4(%r14), %ecx
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %r8
	callq	_nes_debug
LBB0_6:
	movl	12(%r14), %edi
	movq	%r14, %rsi
	callq	_rem_ref_cm_node
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_3:
	movq	_NES_CM_EVENT_ABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_create_event
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %r8
	callq	_nes_debug
LBB0_11:
	movq	%r14, %rbx
LBB0_12:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_CM_DEFAULT_RCV_WND_SCALE,8,3 ## @NES_CM_DEFAULT_RCV_WND_SCALE
	.comm	_NES_CM_LISTENER_ACTIVE_STATE,4,2 ## @NES_CM_LISTENER_ACTIVE_STATE
	.comm	_NES_CM_EVENT_ABORTED,4,2       ## @NES_CM_EVENT_ABORTED
	.comm	_cm_loopbacks,4,2               ## @cm_loopbacks
	.comm	_NES_CM_STATE_TSA,4,2           ## @NES_CM_STATE_TSA
	.comm	_NES_CM_STATE_MPAREQ_RCVD,4,2   ## @NES_CM_STATE_MPAREQ_RCVD
	.comm	_NES_CM_EVENT_MPA_REQ,4,2       ## @NES_CM_EVENT_MPA_REQ
	.comm	_NES_CM_STATE_SYN_SENT,4,2      ## @NES_CM_STATE_SYN_SENT
	.comm	_NES_DBG_CM,4,2                 ## @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Api - connect() FAILED: dest addr=0x%08X, port=0x%04x, cm_node=%p, cm_id = %p.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Api - connect(): dest addr=0x%08X,port=0x%04x, cm_node=%p, cm_id = %p.\n"

	.no_dead_strip	_mini_cm_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mini_cm_connect
_mini_cm_connect:                       ; @mini_cm_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	mov	x2, x4
	mov	x3, #0
	bl	_make_cm_node
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	mov	w8, #1
Lloh0:
	adrp	x25, _NES_CM_DEFAULT_RCV_WND_SCALE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _NES_CM_DEFAULT_RCV_WND_SCALE@GOTPAGEOFF]
	str	w8, [x19, #40]
	ldr	x8, [x25]
	str	x8, [x19, #48]
	ldp	x8, x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x22]
	bl	_ntohl
	mov	x1, x0
	ldr	w2, [x19, #4]
Lloh2:
	adrp	x8, _NES_CM_LISTENER_ACTIVE_STATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NES_CM_LISTENER_ACTIVE_STATE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x23
	bl	_find_listener
	cbz	x0, LBB0_8
; %bb.3:
	mov	x3, x0
	ldp	q1, q0, [x24]
	stp	q1, q0, [sp]
	ldur	d0, [x24, #20]
	rev64.2s	v0, v0
	stur	d0, [sp, #20]
	ldr	w8, [x0]
	str	w8, [sp, #16]
	mov	x2, sp
	mov	x0, x23
	mov	x1, x22
	bl	_make_cm_node
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
Lloh5:
	adrp	x0, _cm_loopbacks@GOTPAGE
Lloh6:
	ldr	x0, [x0, _cm_loopbacks@GOTPAGEOFF]
	bl	_atomic_inc
	str	x19, [x22, #88]
	ldr	x8, [x25]
	str	x8, [x22, #48]
	str	x22, [x19, #88]
	ldr	x0, [x22, #32]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
Lloh7:
	adrp	x8, _NES_CM_STATE_TSA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NES_CM_STATE_TSA@GOTPAGEOFF]
	str	x20, [x22, #24]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w8, [x22, #76]
	str	w8, [x19, #80]
	ldr	w8, [x19, #76]
	str	w8, [x22, #80]
	ldr	w8, [x22, #64]
	str	w8, [x19, #72]
	ldr	w9, [x19, #64]
	str	w9, [x22, #72]
	str	w8, [x19, #68]
	str	w9, [x22, #68]
	ldr	x8, [x22, #48]
	str	x8, [x19, #56]
	ldr	x8, [x19, #48]
Lloh10:
	adrp	x9, _NES_CM_STATE_MPAREQ_RCVD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NES_CM_STATE_MPAREQ_RCVD@GOTPAGEOFF]
	str	x8, [x22, #56]
Lloh12:
	ldr	w8, [x9]
	str	w8, [x22, #16]
Lloh13:
	adrp	x8, _NES_CM_EVENT_MPA_REQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NES_CM_EVENT_MPA_REQ@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_create_event
	b	LBB0_10
LBB0_5:
	ldr	x8, [x19, #32]
	add	x0, x8, #16
	str	x20, [x19, #24]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
Lloh16:
	adrp	x8, _NES_CM_STATE_SYN_SENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NES_CM_STATE_SYN_SENT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	mov	x2, #0
	bl	_send_syn
	mov	x8, x0
Lloh19:
	adrp	x9, _NES_DBG_CM@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NES_DBG_CM@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x9]
	ldp	w3, w2, [x19, #4]
	ldr	w5, [x19]
	cbz	w8, LBB0_9
; %bb.6:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x19
	bl	_nes_debug
LBB0_7:
	ldr	w0, [x19, #12]
	mov	x1, x19
	bl	_rem_ref_cm_node
	mov	x19, #0
	b	LBB0_10
LBB0_8:
Lloh24:
	adrp	x8, _NES_CM_EVENT_ABORTED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NES_CM_EVENT_ABORTED@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_create_event
	b	LBB0_10
LBB0_9:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, x19
	bl	_nes_debug
LBB0_10:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_CM_DEFAULT_RCV_WND_SCALE,8,3 ; @NES_CM_DEFAULT_RCV_WND_SCALE
	.comm	_NES_CM_LISTENER_ACTIVE_STATE,4,2 ; @NES_CM_LISTENER_ACTIVE_STATE
	.comm	_NES_CM_EVENT_ABORTED,4,2       ; @NES_CM_EVENT_ABORTED
	.comm	_cm_loopbacks,4,2               ; @cm_loopbacks
	.comm	_NES_CM_STATE_TSA,4,2           ; @NES_CM_STATE_TSA
	.comm	_NES_CM_STATE_MPAREQ_RCVD,4,2   ; @NES_CM_STATE_MPAREQ_RCVD
	.comm	_NES_CM_EVENT_MPA_REQ,4,2       ; @NES_CM_EVENT_MPA_REQ
	.comm	_NES_CM_STATE_SYN_SENT,4,2      ; @NES_CM_STATE_SYN_SENT
	.comm	_NES_DBG_CM,4,2                 ; @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Api - connect() FAILED: dest addr=0x%08X, port=0x%04x, cm_node=%p, cm_id = %p.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Api - connect(): dest addr=0x%08X,port=0x%04x, cm_node=%p, cm_id = %p.\n"

	.no_dead_strip	_mini_cm_connect
.subsections_via_symbols
