	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_writer                  ## -- Begin function server_writer
	.p2align	4, 0x90
_server_writer:                         ## @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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_C_WANTWR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.1:
	movq	%rdi, %r13
	leaq	8(%rdi), %r14
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	movq	_C_NOWR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r13)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_C_WANTWR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_get_ready_bytes
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movl	(%r13), %eax
	movq	_C_NOWR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_get_read_ptr
	movq	%rax, %r15
	movl	4(%r13), %edi
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_send
	movl	%eax, %r12d
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	movq	%r15, %r9
	callq	_fprintf
	testl	%r12d, %r12d
	js	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_advance_read_ptr
	addl	%r12d, -44(%rbp)                ## 4-byte Folded Spill
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %r12d
	jl	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	cmpl	%ebx, %r12d
	jl	LBB0_12
	jmp	LBB0_11
LBB0_3:
	movq	_C_WANTWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r13), %eax
	movl	%eax, (%r13)
LBB0_14:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_free_unused_buffers
	movl	(%r13), %eax
LBB0_16:
	movq	_C_WANTWR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_18
## %bb.17:
	movq	_EVT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_C_WANTWR,4,2                   ## @C_WANTWR
	.comm	_C_NOWR,4,2                     ## @C_NOWR
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send() to %d: %d written out of %d at %p\n"

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

	.comm	_EVT_WRITE,4,2                  ## @EVT_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_writer                  ; -- Begin function server_writer
	.p2align	2
_server_writer:                         ; @server_writer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x26, _C_WANTWR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _C_WANTWR@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.1:
	mov	x19, x0
	mov	w27, #0
	add	x20, x0, #8
Lloh2:
	adrp	x28, _C_NOWR@GOTPAGE
Lloh3:
	ldr	x28, [x28, _C_NOWR@GOTPAGEOFF]
Lloh4:
	adrp	x21, _MSG_NOSIGNAL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MSG_NOSIGNAL@GOTPAGEOFF]
Lloh6:
	adrp	x22, _verbosity@GOTPAGE
Lloh7:
	ldr	x22, [x22, _verbosity@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_get_ready_bytes
	cbz	w0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	mov	x0, x20
	bl	_get_read_ptr
	mov	x25, x0
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x8, _MSG_DONTWAIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w3, w9, w8
	mov	x1, x25
	mov	x2, x23
	bl	_send
	mov	x24, x0
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x24
	mov	x4, x23
	mov	x5, x25
	bl	_fprintf
	tbnz	w24, #31, LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_advance_read_ptr
	add	w27, w24, w27
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, w23
	b.lt	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	cmp	w24, w23
	b.lt	LBB0_2
	b	LBB0_11
LBB0_13:
	ldr	w8, [x26]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_14:
	cbz	w27, LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_free_unused_buffers
	ldr	w8, [x19]
LBB0_16:
	ldr	w9, [x26]
Lloh18:
	adrp	x10, _EVT_WRITE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _EVT_WRITE@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w0, wzr, w10, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_C_WANTWR,4,2                   ; @C_WANTWR
	.comm	_C_NOWR,4,2                     ; @C_NOWR
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send() to %d: %d written out of %d at %p\n"

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

	.comm	_EVT_WRITE,4,2                  ; @EVT_WRITE
.subsections_via_symbols
