	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_server_writer              ## -- Begin function tcp_server_writer
	.p2align	4, 0x90
_tcp_server_writer:                     ## @tcp_server_writer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_conn_connecting@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_assert
	cmpq	$0, 32(%r15)
	je	LBB0_3
## %bb.1:
	movq	24(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	cmpq	$0, 32(%r15)
	je	LBB0_3
## %bb.2:
	leaq	44(%r15), %rax
	jmp	LBB0_4
LBB0_3:
	leaq	40(%r15), %rax
LBB0_4:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %ecx
	movq	_C_WANTWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_C_WANTWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	8(%r15), %ecx
	orl	%eax, %ecx
	movl	%ecx, 8(%r15)
LBB0_29:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_C_NOWR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%eax, %edx
	andl	%ecx, %edx
	cmpl	%eax, %edx
	jne	LBB0_31
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %r14d
	movl	12(%r15), %edx
	testl	%ecx, %eax
	je	LBB0_20
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_C_NOWR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	$-1, -48(%rbp)
	leaq	_tcp_server_writer.iov(%rip), %rbx
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	movl	$64, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_tcp_prepare_iovec
	movl	%eax, %r13d
	cmpl	$0, -48(%rbp)
	setg	%al
	testl	%r13d, %r13d
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	16(%r15), %edi
	movl	-48(%rbp), %edx
	movq	%rbx, %rsi
	callq	_writev
	movl	%eax, %r12d
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r15), %edx
	movl	-48(%rbp), %r9d
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	callq	_fprintf
	testl	%r12d, %r12d
	js	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=2
	testl	%r12d, %r12d
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_rwm_fetch_data
	addl	%r12d, -44(%rbp)                ## 4-byte Folded Spill
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=2
	cmpl	%r13d, %r12d
	jge	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	8(%r15), %ecx
	movq	_C_NOWR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%r15)
	jmp	LBB0_18
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=2
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	cmpl	%r13d, %r12d
	jl	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	8(%r15), %ecx
LBB0_18:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	_C_WANTWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=2
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$0, (%rdx)
	jne	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %edx
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, 8(%r15)
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-60(%rbp), %edx                 ## 4-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_30
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edx, %r14d
	jl	LBB0_30
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edx
	cmpl	12(%r15), %edx
	jge	LBB0_30
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r15), %rdx
	movq	8(%rdx), %rdx
	testq	%rdx, %rdx
	je	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	*%rdx
	cmpq	$0, 32(%r15)
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
LBB0_26:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jg	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r15), %ecx
	movq	_C_WANTWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_29
LBB0_31:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	movq	_C_WANTRD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edx, %ecx
LBB0_36:
	movl	%ecx, 8(%r15)
	jmp	LBB0_37
LBB0_33:
	movq	(%r15), %rdx
	movq	_conn_write_close@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_37
## %bb.34:
	movq	_C_FAILED@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_35
LBB0_37:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	movq	_C_WANTRD@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_conn_connecting,8,3            ## @conn_connecting
	.comm	_C_WANTWR,4,2                   ## @C_WANTWR
	.comm	_C_NOWR,4,2                     ## @C_NOWR
.zerofill __DATA,__bss,_tcp_server_writer.iov,256,4 ## @tcp_server_writer.iov
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send/writev() to %d: %d written out of %d in %d chunks\n"

L_.str.1:                               ## @.str.1
	.asciz	"send()"

	.comm	_C_WANTRD,4,2                   ## @C_WANTRD
	.comm	_conn_write_close,8,3           ## @conn_write_close
	.comm	_C_FAILED,4,2                   ## @C_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcp_server_writer              ; -- Begin function tcp_server_writer
	.p2align	2
_tcp_server_writer:                     ; @tcp_server_writer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _conn_connecting@GOTPAGE
Lloh1:
	ldr	x9, [x9, _conn_connecting@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.2:
	add	x20, x19, #44
	b	LBB0_4
LBB0_3:
	add	x20, x19, #40
LBB0_4:
	mov	w22, #0
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x26, _C_WANTWR@GOTPAGE
Lloh4:
	ldr	x26, [x26, _C_WANTWR@GOTPAGEOFF]
Lloh5:
	adrp	x27, _C_NOWR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _C_NOWR@GOTPAGEOFF]
	ldr	w9, [x26]
Lloh7:
	adrp	x21, _tcp_server_writer.iov@PAGE
Lloh8:
	add	x21, x21, _tcp_server_writer.iov@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w22, #0
	ldr	w9, [x26]
	ldr	w8, [x19, #8]
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w10, [x27]
	orr	w10, w10, w9
	and	w10, w10, w8
	cmp	w10, w9
	b.ne	LBB0_29
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w28, [x20]
	ldr	w23, [x19, #12]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	w28, LBB0_20
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x27]
	tst	w10, w8
	b.ne	LBB0_21
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	w8, #-1
	str	w8, [sp, #12]
	add	x1, sp, #12
	mov	x0, x21
	mov	w2, #64
	mov	x3, x20
	bl	_tcp_prepare_iovec
	mov	x24, x0
	ldr	w8, [sp, #12]
	cmp	w8, #0
	ccmp	w0, #0, #4, gt
	cset	w0, gt
	bl	_assert
	ldr	w0, [x19, #16]
	ldr	w2, [sp, #12]
	mov	x1, x21
	bl	_writev
	mov	x25, x0
Lloh9:
	adrp	x8, _verbosity@GOTPAGE
Lloh10:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x19, #16]
	ldr	w5, [sp, #12]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x25
	mov	x4, x24
	bl	_fprintf
	tbnz	w25, #31, LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=2
	cmp	w25, #1
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x20
	mov	w1, #0
	mov	x2, x25
	bl	_rwm_fetch_data
	add	w22, w25, w22
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=2
	cmp	w25, w24
	b.ge	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x27]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=2
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	cmp	w25, w24
	b.lt	LBB0_15
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x19, #8]
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w10, [x20]
	cbnz	w10, LBB0_9
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	bic	w8, w8, w9
	str	w8, [x19, #8]
LBB0_21:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	w22, LBB0_6
; %bb.22:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w28, w23
	b.lt	LBB0_6
; %bb.23:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w10, [x20]
	ldr	w11, [x19, #12]
	cmp	w10, w11
	b.ge	LBB0_6
; %bb.24:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x10, [x19, #24]
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_6
; %bb.25:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	blr	x10
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
LBB0_27:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20]
	cmp	w8, #0
	b.gt	LBB0_5
; %bb.28:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w22, #0
	ldr	w8, [x19, #8]
	ldr	w9, [x26]
	b	LBB0_6
LBB0_29:
	ldr	w0, [x20]
	cbz	w0, LBB0_32
; %bb.30:
Lloh19:
	adrp	x9, _C_WANTRD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _C_WANTRD@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	bic	w8, w8, w9
LBB0_31:
	str	w8, [x19, #8]
	b	LBB0_34
LBB0_32:
	ldr	x9, [x19]
Lloh22:
	adrp	x10, _conn_write_close@GOTPAGE
Lloh23:
	ldr	x10, [x10, _conn_write_close@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_34
; %bb.33:
Lloh25:
	adrp	x9, _C_FAILED@GOTPAGE
Lloh26:
	ldr	x9, [x9, _C_FAILED@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_35
LBB0_34:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_35:
Lloh28:
	adrp	x9, _C_WANTRD@GOTPAGE
Lloh29:
	ldr	x9, [x9, _C_WANTRD@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_conn_connecting,8,3            ; @conn_connecting
	.comm	_C_WANTWR,4,2                   ; @C_WANTWR
	.comm	_C_NOWR,4,2                     ; @C_NOWR
.zerofill __DATA,__bss,_tcp_server_writer.iov,256,2 ; @tcp_server_writer.iov
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send/writev() to %d: %d written out of %d in %d chunks\n"

l_.str.1:                               ; @.str.1
	.asciz	"send()"

	.comm	_C_WANTRD,4,2                   ; @C_WANTRD
	.comm	_conn_write_close,8,3           ; @conn_write_close
	.comm	_C_FAILED,4,2                   ; @C_FAILED
.subsections_via_symbols
