	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	cmpl	$1, %edi
	jg	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_usage
LBB0_2:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.13:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.22:
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_23
LBB0_3:
	cmpl	$5, %ebx
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_usage
LBB0_5:
	leaq	-56(%rbp), %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -56(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	16(%r14), %rdi
	leaq	-40(%rbp), %rsi
	callq	_inet_aton
	cmpl	$1, %eax
	je	LBB0_7
## %bb.6:
	movq	16(%r14), %rbx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_errx
LBB0_7:
	movq	24(%r14), %rdi
	leaq	-24(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoul
	movq	%rax, %rbx
	addq	$-65536, %rax                   ## imm = 0xFFFF0000
	cmpq	$-65535, %rax                   ## imm = 0xFFFF0001
	jb	LBB0_9
## %bb.8:
	movq	-24(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	callq	_usage
LBB0_10:
	movq	%rbx, %rdi
	callq	_htons
	movq	%rax, -48(%rbp)
	movq	32(%r14), %rdi
	leaq	-24(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoul
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_usage
LBB0_12:
	movups	-56(%rbp), %xmm0
	movups	-40(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	_tcpstream_client
	jmp	LBB0_23
LBB0_14:
	cmpl	$4, %ebx
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	callq	_usage
LBB0_16:
	leaq	-56(%rbp), %rdi
	movl	$32, %esi
	callq	_bzero
	movl	$32, -56(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	16(%r14), %rdi
	leaq	-24(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoul
	movq	%rax, %rbx
	addq	$-65536, %rax                   ## imm = 0xFFFF0000
	cmpq	$-65535, %rax                   ## imm = 0xFFFF0001
	jb	LBB0_18
## %bb.17:
	movq	-24(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_19
LBB0_18:
	xorl	%eax, %eax
	callq	_usage
LBB0_19:
	movq	%rbx, %rdi
	callq	_htons
	movq	%rax, -48(%rbp)
	movq	24(%r14), %rdi
	leaq	-24(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoul
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_21
## %bb.20:
	xorl	%eax, %eax
	callq	_usage
LBB0_21:
	movups	-56(%rbp), %xmm0
	movups	-40(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	_tcpstream_server
LBB0_23:
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"client"

	.comm	_AF_INET,8,3                    ## @AF_INET
L_.str.1:                               ## @.str.1
	.asciz	"%s: %s"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"server"

	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x1
	mov	x20, x0
	cmp	w0, #1
	b.gt	LBB0_2
; %bb.1:
	bl	_usage
LBB0_2:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.4:
	bl	_usage
	b	LBB0_23
LBB0_5:
	cmp	w20, #5
	b.eq	LBB0_7
; %bb.6:
	bl	_usage
LBB0_7:
	add	x20, sp, #48
	mov	w21, #32
	add	x0, sp, #48
	mov	w1, #32
	bl	_bzero
	str	w21, [sp, #48]
Lloh4:
	adrp	x8, _AF_INET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldr	x0, [x19, #16]
	add	x1, x20, #16
	bl	_inet_aton
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.8:
	ldr	x20, [x19, #16]
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	mov	x2, x20
	bl	_errx
LBB0_9:
	ldr	x0, [x19, #24]
	add	x1, sp, #40
	mov	w2, #10
	bl	_strtoul
	mov	x20, x0
	sub	x8, x0, #16, lsl #12            ; =65536
	mov	x9, #-65535
	cmp	x8, x9
	b.lo	LBB0_11
; %bb.10:
	ldr	x8, [sp, #40]
	ldrb	w8, [x8]
	cbz	w8, LBB0_12
LBB0_11:
	bl	_usage
LBB0_12:
	mov	x0, x20
	bl	_htons
	str	x0, [sp, #56]
	ldr	x0, [x19, #32]
	add	x1, sp, #40
	mov	w2, #10
	bl	_strtoul
	mov	x19, x0
	ldr	x8, [sp, #40]
	ldrb	w8, [x8]
	cbz	w8, LBB0_14
; %bb.13:
	bl	_usage
LBB0_14:
	ldp	q0, q1, [sp, #48]
	stp	q0, q1, [sp]
	mov	x0, sp
	mov	x1, x19
	bl	_tcpstream_client
	b	LBB0_23
LBB0_15:
	cmp	w20, #4
	b.eq	LBB0_17
; %bb.16:
	bl	_usage
LBB0_17:
	mov	w20, #32
	add	x0, sp, #48
	mov	w1, #32
	bl	_bzero
Lloh12:
	adrp	x8, _AF_INET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [sp, #72]
Lloh15:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w20, [sp, #48]
	str	w8, [sp, #64]
	ldr	x0, [x19, #16]
	add	x1, sp, #40
	mov	w2, #10
	bl	_strtoul
	mov	x20, x0
	sub	x8, x0, #16, lsl #12            ; =65536
	mov	x9, #-65535
	cmp	x8, x9
	b.lo	LBB0_19
; %bb.18:
	ldr	x8, [sp, #40]
	ldrb	w8, [x8]
	cbz	w8, LBB0_20
LBB0_19:
	bl	_usage
LBB0_20:
	mov	x0, x20
	bl	_htons
	str	x0, [sp, #56]
	ldr	x0, [x19, #24]
	add	x1, sp, #40
	mov	w2, #10
	bl	_strtoul
	mov	x19, x0
	ldr	x8, [sp, #40]
	ldrb	w8, [x8]
	cbz	w8, LBB0_22
; %bb.21:
	bl	_usage
LBB0_22:
	ldp	q0, q1, [sp, #48]
	stp	q0, q1, [sp]
	mov	x0, sp
	mov	x1, x19
	bl	_tcpstream_server
LBB0_23:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"client"

	.comm	_AF_INET,8,3                    ; @AF_INET
l_.str.1:                               ; @.str.1
	.asciz	"%s: %s"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"server"

	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
.subsections_via_symbols
