	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcpconnect_server
_tcpconnect_server:                     ## @tcpconnect_server
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	cmpl	$1, %edi
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_usage
LBB0_2:
	leaq	-24(%rbp), %rdi
	movl	$16, %esi
	callq	_bzero
	movl	$16, -24(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movl	%eax, -16(%rbp)
	movq	(%rbx), %rdi
	leaq	-32(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoul
	movq	%rax, %rbx
	addq	$-65536, %rax                   ## imm = 0xFFFF0000
	cmpq	$-65535, %rax                   ## imm = 0xFFFF0001
	jb	LBB0_4
## %bb.3:
	movq	-32(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_usage
LBB0_5:
	movq	%rbx, %rdi
	callq	_htons
	movl	%eax, -20(%rbp)
	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, %ebx
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_7:
	leaq	-24(%rbp), %rsi
	movl	%ebx, %edi
	movl	$16, %edx
	callq	_bind
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_9:
	movl	%ebx, %edi
	movl	$-1, %esi
	callq	_listen
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	callq	_err
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept
	movl	%eax, %edi
	callq	_close
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket"

L_.str.1:                               ## @.str.1
	.asciz	"bind"

L_.str.2:                               ## @.str.2
	.asciz	"listen"

	.no_dead_strip	_tcpconnect_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcpconnect_server
_tcpconnect_server:                     ; @tcpconnect_server
	.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	x19, x1
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.1:
	bl	_usage
LBB0_2:
	mov	w20, #16
	add	x0, sp, #16
	mov	w1, #16
	bl	_bzero
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w20, [sp, #16]
	str	w8, [sp, #28]
Lloh3:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_htonl
	str	w0, [sp, #24]
	ldr	x0, [x19]
	add	x1, sp, #8
	mov	w2, #10
	bl	_strtoul
	mov	x19, x0
	sub	x8, x0, #16, lsl #12            ; =65536
	mov	x9, #-65535
	cmp	x8, x9
	b.lo	LBB0_4
; %bb.3:
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cbz	w8, LBB0_5
LBB0_4:
	bl	_usage
LBB0_5:
	mov	x0, x19
	bl	_htons
	str	w0, [sp, #20]
Lloh6:
	adrp	x8, _PF_INET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_7:
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_9:
	mov	x0, x19
	mov	w1, #-1
	bl	_listen
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_accept
	bl	_close
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket"

l_.str.1:                               ; @.str.1
	.asciz	"bind"

l_.str.2:                               ; @.str.2
	.asciz	"listen"

	.no_dead_strip	_tcpconnect_server
.subsections_via_symbols
