	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	cmpq	$0, 8(%rdi)
	jle	LBB0_14
## %bb.1:
	movl	(%rdi), %ebx
	movq	24(%rdi), %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_get_ready_bytes
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	movq	%r12, %r14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r15d, %r13d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_get_ready_bytes
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	movq	_EVT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, 4(%r12)
	je	LBB0_12
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %r12
	movq	%r14, %rdi
	callq	_get_read_ptr
	movq	%rax, %r14
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_send
	movl	%eax, %r13d
	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
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	movq	%r14, %r9
	callq	_fprintf
	testl	%r13d, %r13d
	js	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	movq	%r12, %r14
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_advance_read_ptr
	jmp	LBB0_10
LBB0_11:
	movq	_EVT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	%ecx, 4(%r12)
LBB0_12:
	testl	%r15d, %r15d
	jg	LBB0_14
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, 8(%rax)
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVT_WRITE,4,2                  ## @EVT_WRITE
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.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()"

.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	x8, [x0, #8]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w20, [x0]
	ldr	x27, [x0, #24]
	add	x21, x0, #16
	mov	x0, x21
	bl	_get_ready_bytes
Lloh0:
	adrp	x28, _EVT_WRITE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _EVT_WRITE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _MSG_DONTWAIT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh4:
	adrp	x23, _verbosity@GOTPAGE
Lloh5:
	ldr	x23, [x23, _verbosity@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	w0, #0
	b	LBB0_15
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w25, w22
	b.lt	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_get_ready_bytes
	cbz	w0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	ldr	w8, [x27]
	ldr	w0, [x28]
	tst	w0, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x27, #4]
	tst	w8, w0
	b.eq	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_get_read_ptr
	mov	x26, x0
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x26
	mov	x2, x22
	bl	_send
	mov	x25, x0
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x25
	mov	x4, x22
	mov	x5, x26
	bl	_fprintf
	tbnz	w25, #31, LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w25, #1
	b.lt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x25
	bl	_advance_read_ptr
	b	LBB0_4
LBB0_12:
	ldr	w0, [x28]
	ldr	w8, [x27, #4]
	bic	w8, w8, w0
	str	w8, [x27, #4]
LBB0_13:
	cmp	w22, #0
	b.gt	LBB0_15
LBB0_14:
	mov	w0, #0
	str	xzr, [x19, #8]
LBB0_15:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EVT_WRITE,4,2                  ; @EVT_WRITE
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.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()"

.subsections_via_symbols
