	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_protocol
_do_protocol:                           ## @do_protocol
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	24(%rsi), %edi
	movl	16(%rsi), %edx
	movl	20(%rsi), %esi
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movq	8(%r13), %rax
	movq	%rax, -112(%rbp)
	movl	(%r13), %eax
	movl	%eax, -120(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -128(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -152(%rbp)
	movq	$0, -136(%rbp)
	movq	_lflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	leaq	_do_protocol.slash_w(%rip), %rax
	movq	%rax, -96(%rbp)
	movl	$3, -88(%rbp)
	movl	$1, %r12d
	jmp	LBB0_5
LBB0_1:
	movl	24(%r13), %esi
	movl	16(%r13), %ecx
	movl	20(%r13), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	$-1, %ebx
	jmp	LBB0_38
LBB0_3:
	xorl	%r12d, %r12d
LBB0_5:
	movq	%r15, %rdi
	callq	_strdup
	movq	%r12, %rbx
	shlq	$4, %rbx
	movq	%rax, -96(%rbp,%rbx)
	movq	%r15, %rdi
	callq	_strlen
	movl	%eax, -88(%rbp,%rbx)
	leaq	_do_protocol.neteol(%rip), %rax
	movq	%rax, -80(%rbp,%rbx)
	orq	$2, %r12
	movq	%r12, -160(%rbp)
	movl	$2, -72(%rbp,%rbx)
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	movl	%r14d, %edi
	callq	_connect
	testq	%rax, %rax
	js	LBB0_6
## %bb.8:
	leaq	-160(%rbp), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_sendmsg
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_38
## %bb.11:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_getwc
	movq	_EOF@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	cmpl	(%r12), %eax
	je	LBB0_33
## %bb.12:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movl	$0, -100(%rbp)                  ## 4-byte Folded Spill
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movl	%ebx, %r13d
	movl	%eax, %ebx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$13, %r13d
	movl	$13, %r13d
	jne	LBB0_29
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	%r14, %rdi
	callq	_getwc
	movl	%eax, %ebx
	incl	%r15d
	cmpl	(%r12), %eax
	je	LBB0_33
LBB0_14:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_OUTPUT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$13, %ebx
	je	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	%ebx, %edi
	callq	_iswprint
	testl	%eax, %eax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	%ebx, %edi
	callq	_iswspace
	testl	%eax, %eax
	je	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$13, %r13d
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	$10, %r13d
	cmpl	$10, %ebx
	je	LBB0_18
LBB0_24:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%ebx, %edi
	callq	_putwchar
	movl	$10, %eax
	cmpl	$10, %ebx
	jne	LBB0_25
	jmp	LBB0_31
LBB0_29:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$10, %edi
	callq	_putwchar
	jmp	LBB0_30
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	andl	$63, %ebx
	orl	$64, %ebx
	movl	%ebx, %edi
	callq	_putwchar
LBB0_25:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	__POSIX2_LINE_MAX@GOTPCREL(%rip), %rax
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	cmpl	(%rax), %ecx
	jge	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$10, %eax
	cmpl	$10, %ebx
	je	LBB0_31
## %bb.28:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	-100(%rbp)                      ## 4-byte Folded Spill
	jmp	LBB0_32
LBB0_26:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$92, %edi
	callq	_putchar
	movl	$10, %edi
	callq	_putchar
LBB0_30:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$13, %eax
LBB0_31:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$0, -100(%rbp)                  ## 4-byte Folded Spill
	movl	%eax, %ebx
LBB0_32:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r14, %rdi
	callq	_getwc
	incl	%r15d
	movl	%ebx, %r13d
	cmpl	(%r12), %eax
	jne	LBB0_13
	jmp	LBB0_33
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_warn
	movl	%r14d, %edi
	callq	_close
	movl	$-1, %ebx
	jmp	LBB0_38
LBB0_15:
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	callq	_printf
LBB0_33:
	movq	%r14, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_35:
	cmpl	$10, %r13d
	je	LBB0_37
## %bb.36:
	movl	$10, %edi
	callq	_putchar
LBB0_37:
	movq	%r14, %rdi
	callq	_fclose
	xorl	%ebx, %ebx
LBB0_38:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_40
## %bb.39:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
_do_protocol.slash_w:                   ## @do_protocol.slash_w
	.asciz	"/W "

_do_protocol.neteol:                    ## @do_protocol.neteol
	.asciz	"\r\n"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket(%d, %d, %d)"

	.comm	_lflag,8,3                      ## @lflag
L_.str.1:                               ## @.str.1
	.asciz	"connect"

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

L_.str.3:                               ## @.str.3
	.asciz	"r"

	.comm	_EOF,4,2                        ## @EOF
	.comm	_OUTPUT_MAX,4,2                 ## @OUTPUT_MAX
L_.str.4:                               ## @.str.4
	.asciz	"\n\n Output truncated at %d bytes...\n"

	.comm	__POSIX2_LINE_MAX,4,2           ## @_POSIX2_LINE_MAX
L_.str.5:                               ## @.str.5
	.asciz	"reading from network"

	.no_dead_strip	_do_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_protocol
_do_protocol:                           ; @do_protocol
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldp	w1, w0, [x1, #20]
	ldr	w2, [x20, #16]
	bl	_socket
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #8]
	str	x8, [sp, #80]
	ldr	w8, [x20]
	str	w8, [sp, #72]
	add	x22, sp, #88
	stp	xzr, x22, [sp, #56]
	stp	xzr, xzr, [sp, #40]
Lloh3:
	adrp	x8, _lflag@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lflag@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _do_protocol.slash_w@PAGE
Lloh7:
	add	x8, x8, _do_protocol.slash_w@PAGEOFF
	str	x8, [sp, #88]
	mov	w8, #3
	str	w8, [sp, #96]
	mov	w23, #1
	b	LBB0_5
LBB0_3:
	ldp	w9, w8, [x20, #20]
	ldr	w10, [x20, #16]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	mov	w0, #-1
	b	LBB0_40
LBB0_4:
	mov	x23, #0
LBB0_5:
	mov	x0, x21
	bl	_strdup
	add	x22, x22, x23, lsl #4
	str	x0, [x22]
	mov	x0, x21
	bl	_strlen
	str	w0, [x22, #8]
Lloh10:
	adrp	x8, _do_protocol.neteol@PAGE
Lloh11:
	add	x8, x8, _do_protocol.neteol@PAGEOFF
	str	x8, [x22, #16]
	orr	x8, x23, #0x2
	str	x8, [sp, #32]
	mov	w8, #2
	str	w8, [x22, #24]
	ldr	x1, [x20, #8]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_connect
	tbnz	x0, #63, LBB0_10
; %bb.6:
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #0
	bl	_sendmsg
	tbnz	x0, #63, LBB0_11
; %bb.7:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fdopen
	cbz	x0, LBB0_40
; %bb.8:
	mov	x19, x0
	bl	_getwc
Lloh14:
	adrp	x23, _EOF@GOTPAGE
Lloh15:
	ldr	x23, [x23, _EOF@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.9:
	mov	w22, #0
	b	LBB0_35
LBB0_10:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_warn
	mov	x0, x19
	bl	_close
	mov	w0, #-1
	b	LBB0_40
LBB0_13:
	mov	w21, #0
	mov	w20, #0
	mov	w26, #0
Lloh20:
	adrp	x24, _OUTPUT_MAX@GOTPAGE
Lloh21:
	ldr	x24, [x24, _OUTPUT_MAX@GOTPAGEOFF]
Lloh22:
	adrp	x25, __POSIX2_LINE_MAX@GOTPAGE
Lloh23:
	ldr	x25, [x25, __POSIX2_LINE_MAX@GOTPAGEOFF]
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	mov	x22, x21
	mov	x21, x0
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=2
	cmp	w22, #13
	b.ne	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	mov	x0, x19
	bl	_getwc
	mov	x21, x0
	ldr	w8, [x23]
	add	w20, w20, #1
	cmp	w0, w8
	b.eq	LBB0_35
LBB0_17:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x24]
	cmp	w20, w8
	b.ge	LBB0_34
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	cmp	w21, #13
	b.eq	LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	x0, x21
	bl	_iswprint
	cbnz	w0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	x0, x21
	bl	_iswspace
	cbz	w0, LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_17 Depth=2
	cmp	w22, #13
	b.ne	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=2
	cmp	w21, #10
	b.ne	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	w22, #10
	b	LBB0_16
LBB0_24:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w0, #10
	bl	_putwchar
	b	LBB0_31
LBB0_25:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x21
	bl	_putwchar
	cmp	w21, #10
	b.ne	LBB0_27
	b	LBB0_32
LBB0_26:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w22, #64
	bfxil	w22, w21, #0, #6
	mov	x0, x22
	bl	_putwchar
	mov	x21, x22
LBB0_27:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x25]
	cmp	w26, w8
	b.ge	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_14 Depth=1
	cmp	w21, #10
	b.eq	LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w26, w26, #1
	b	LBB0_33
LBB0_30:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w0, #92
	bl	_putchar
	mov	w0, #10
	bl	_putchar
LBB0_31:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w21, #13
LBB0_32:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w26, #0
LBB0_33:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x19
	bl	_getwc
	ldr	w8, [x23]
	add	w20, w20, #1
	mov	x22, x21
	cmp	w0, w8
	b.ne	LBB0_14
	b	LBB0_35
LBB0_34:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_printf
LBB0_35:
	mov	x0, x19
	bl	_ferror
	cbz	x0, LBB0_37
; %bb.36:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_warn
LBB0_37:
	cmp	w22, #10
	b.eq	LBB0_39
; %bb.38:
	mov	w0, #10
	bl	_putchar
LBB0_39:
	mov	x0, x19
	bl	_fclose
	mov	w0, #0
LBB0_40:
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_42
; %bb.41:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_42:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
_do_protocol.slash_w:                   ; @do_protocol.slash_w
	.asciz	"/W "

_do_protocol.neteol:                    ; @do_protocol.neteol
	.asciz	"\r\n"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket(%d, %d, %d)"

	.comm	_lflag,8,3                      ; @lflag
l_.str.1:                               ; @.str.1
	.asciz	"connect"

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

l_.str.3:                               ; @.str.3
	.asciz	"r"

	.comm	_EOF,4,2                        ; @EOF
	.comm	_OUTPUT_MAX,4,2                 ; @OUTPUT_MAX
l_.str.4:                               ; @.str.4
	.asciz	"\n\n Output truncated at %d bytes...\n"

	.comm	__POSIX2_LINE_MAX,4,2           ; @_POSIX2_LINE_MAX
l_.str.5:                               ; @.str.5
	.asciz	"reading from network"

	.no_dead_strip	_do_protocol
.subsections_via_symbols
