	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_Create                     ## -- Begin function tcp_Create
	.p2align	4, 0x90
_tcp_Create:                            ## @tcp_Create
	.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, %r14
	movl	(%rdi), %edi
	testl	%edi, %edi
	jns	LBB0_4
## %bb.1:
	movq	16(%r14), %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rbx
	leaq	1(%rax), %r15
	movq	%r15, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_16
LBB0_3:
	movl	(%r14), %edi
	testl	%edi, %edi
	js	LBB0_12
LBB0_4:
	leaq	-48(%rbp), %rsi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.5:
	movq	_S_IFSOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_12
## %bb.6:
	movl	$4, -44(%rbp)
	movl	(%r14), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_getsockopt
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.7:
	cmpl	$4, -44(%rbp)
	jne	LBB0_12
## %bb.8:
	movl	-52(%rbp), %eax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.9:
	movq	16(%r14), %rax
	cmpb	$0, (%rax)
	je	LBB0_29
LBB0_10:
	movq	_tcpdevice@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PHYSICAL_FORCE_ASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_physical_SetupStack
	movq	8(%r14), %rax
	movq	_CD_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_13
LBB0_15:
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_log_Printf
	movl	(%r14), %edi
	callq	_close
	movl	$-1, (%r14)
	jmp	LBB0_13
LBB0_16:
	movb	$0, (%rbx)
	movq	16(%r14), %r13
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movb	$58, (%rbx)
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	decl	(%r14)
	movb	$0, (%r12)
LBB0_20:
	cmpb	$0, (%r13)
	je	LBB0_26
## %bb.21:
	cmpb	$0, (%r15)
	je	LBB0_26
## %bb.22:
	movl	32(%r14), %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_tcp_OpenConnection
	movl	%eax, (%r14)
	movb	$58, (%rbx)
	testq	%r12, %r12
	je	LBB0_24
## %bb.23:
	movb	$47, (%r12)
LBB0_24:
	cmpl	$0, (%r14)
	js	LBB0_12
## %bb.25:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %edx
	movq	16(%r14), %rcx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_3
LBB0_26:
	testq	%r12, %r12
	je	LBB0_28
## %bb.27:
	movb	$47, (%r12)
LBB0_28:
	movb	$58, (%rbx)
	jmp	LBB0_3
LBB0_29:
	movl	$16, -44(%rbp)
	movl	(%r14), %edi
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_getpeername
	testq	%rax, %rax
	jne	LBB0_33
## %bb.30:
	cmpl	$16, -44(%rbp)
	jne	LBB0_33
## %bb.31:
	movq	-72(%rbp), %rax
	movq	_AF_INET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.32:
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	16(%r14), %r15
	movl	-60(%rbp), %edi
	callq	_inet_ntoa
	movq	%rax, %rbx
	movl	-64(%rbp), %edi
	callq	_ntohs
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movl	$8, %esi
	movq	%rbx, %rcx
	movl	%eax, %r8d
	callq	_snprintf
	movq	16(%r14), %rax
	movq	%rax, 24(%r14)
	jmp	LBB0_10
LBB0_33:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/tcp"

	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
L_.str.1:                               ## @.str.1
	.asciz	"%s: Opened tcp socket %s\n"

	.comm	_S_IFSOCK,4,2                   ## @S_IFSOCK
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ## @SO_TYPE
	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.2:                               ## @.str.2
	.asciz	"%s: Link is a closed socket !\n"

	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_AF_INET,8,3                    ## @AF_INET
L_.str.3:                               ## @.str.3
	.asciz	"%s: Link is SOCK_STREAM, but not inet\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s: Link is a tcp socket\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s:%d/tcp"

	.comm	_tcpdevice,4,2                  ## @tcpdevice
	.comm	_PHYSICAL_FORCE_ASYNC,4,2       ## @PHYSICAL_FORCE_ASYNC
	.comm	_CD_DEFAULT,8,3                 ## @CD_DEFAULT
	.comm	_LogWARN,4,2                    ## @LogWARN
L_.str.6:                               ## @.str.6
	.asciz	"Carrier settings ignored\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_Create                     ; -- Begin function tcp_Create
	.p2align	2
_tcp_Create:                            ; @tcp_Create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	ldr	w0, [x0]
	tbz	w0, #31, LBB0_4
; %bb.1:
	ldr	x0, [x19, #16]
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
	add	x21, x0, #1
	mov	x0, x21
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_13
LBB0_3:
	ldr	w0, [x19]
	tbnz	w0, #31, LBB0_31
LBB0_4:
	add	x1, sp, #40
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_31
; %bb.5:
	ldr	w8, [sp, #40]
Lloh0:
	adrp	x9, _S_IFSOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S_IFSOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_31
; %bb.6:
	mov	w8, #4
	str	w8, [sp, #32]
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SO_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #36
	add	x4, sp, #32
	bl	_getsockopt
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.7:
	ldr	w8, [sp, #32]
	cmp	w8, #4
	b.ne	LBB0_31
; %bb.8:
	ldr	w8, [sp, #36]
Lloh9:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.9:
	ldr	x8, [x19, #16]
	ldrb	w8, [x8]
	cbz	w8, LBB0_26
LBB0_10:
Lloh12:
	adrp	x21, _tcpdevice@GOTPAGE
Lloh13:
	ldr	x21, [x21, _tcpdevice@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh14:
	adrp	x8, _PHYSICAL_FORCE_ASYNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PHYSICAL_FORCE_ASYNC@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_physical_SetupStack
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _CD_DEFAULT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CD_DEFAULT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_32
; %bb.11:
Lloh20:
	adrp	x8, _LogWARN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_log_Printf
Lloh25:
	adrp	x21, _tcpdevice@GOTPAGE
Lloh26:
	ldr	x21, [x21, _tcpdevice@GOTPAGEOFF]
	b	LBB0_32
LBB0_12:
Lloh27:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	w8, [x19, #32]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_log_Printf
	ldr	w0, [x19]
	bl	_close
	mov	x21, #0
	mov	w8, #-1
	str	w8, [x19]
	b	LBB0_32
LBB0_13:
	strb	wzr, [x20]
	ldr	x23, [x19, #16]
	mov	x0, x21
	mov	w1, #47
	bl	_strchr
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.14:
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcasecmp
	cbz	x0, LBB0_16
; %bb.15:
	mov	x21, #0
	mov	w8, #58
	strb	w8, [x20]
	b	LBB0_32
LBB0_16:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	strb	wzr, [x22]
LBB0_17:
	ldrb	w8, [x23]
	cbz	w8, LBB0_23
; %bb.18:
	ldrb	w8, [x21]
	cbz	w8, LBB0_23
; %bb.19:
	ldr	w0, [x19, #32]
	mov	x1, x23
	mov	x2, x21
	bl	_tcp_OpenConnection
	str	w0, [x19]
	mov	w8, #58
	strb	w8, [x20]
	cbz	x22, LBB0_21
; %bb.20:
	mov	w8, #47
	strb	w8, [x22]
LBB0_21:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_31
; %bb.22:
Lloh34:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
	ldr	w9, [x19, #32]
	stp	x9, x8, [sp]
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_log_Printf
	b	LBB0_3
LBB0_23:
	cbz	x22, LBB0_25
; %bb.24:
	mov	w8, #47
	strb	w8, [x22]
LBB0_25:
	mov	w8, #58
	strb	w8, [x20]
	b	LBB0_3
LBB0_26:
	mov	w8, #16
	str	w8, [sp, #32]
	ldr	w0, [x19]
	add	x1, sp, #16
	add	x2, sp, #32
	bl	_getpeername
	cbnz	x0, LBB0_30
; %bb.27:
	ldr	w8, [sp, #32]
	cmp	w8, #16
	b.ne	LBB0_30
; %bb.28:
	ldr	x8, [sp, #16]
Lloh39:
	adrp	x9, _AF_INET@GOTPAGE
Lloh40:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
; %bb.29:
Lloh42:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	ldr	w8, [x19, #32]
	str	x8, [sp]
Lloh45:
	adrp	x1, l_.str.4@PAGE
Lloh46:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_log_Printf
	ldr	x20, [x19, #16]
	ldr	w0, [sp, #28]
	bl	_inet_ntoa
	mov	x21, x0
	ldr	w0, [sp, #24]
	bl	_ntohs
	mov	x4, x0
Lloh47:
	adrp	x2, l_.str.5@PAGE
Lloh48:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w1, #8
	mov	x3, x21
	bl	_snprintf
	ldr	x8, [x19, #16]
	str	x8, [x19, #24]
	b	LBB0_10
LBB0_30:
Lloh49:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh50:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	ldr	w8, [x19, #32]
	str	x8, [sp]
Lloh52:
	adrp	x1, l_.str.3@PAGE
Lloh53:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_log_Printf
LBB0_31:
	mov	x21, #0
LBB0_32:
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/tcp"

	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
l_.str.1:                               ; @.str.1
	.asciz	"%s: Opened tcp socket %s\n"

	.comm	_S_IFSOCK,4,2                   ; @S_IFSOCK
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_TYPE,4,2                    ; @SO_TYPE
	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.2:                               ; @.str.2
	.asciz	"%s: Link is a closed socket !\n"

	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_AF_INET,8,3                    ; @AF_INET
l_.str.3:                               ; @.str.3
	.asciz	"%s: Link is SOCK_STREAM, but not inet\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s: Link is a tcp socket\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s:%d/tcp"

	.comm	_tcpdevice,4,2                  ; @tcpdevice
	.comm	_PHYSICAL_FORCE_ASYNC,4,2       ; @PHYSICAL_FORCE_ASYNC
	.comm	_CD_DEFAULT,8,3                 ; @CD_DEFAULT
	.comm	_LogWARN,4,2                    ; @LogWARN
l_.str.6:                               ; @.str.6
	.asciz	"Carrier settings ignored\n"

.subsections_via_symbols
