	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_read_write              ## -- Begin function server_read_write
	.p2align	4, 0x90
_server_read_write:                     ## @server_read_write
	.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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movq	%rsi, %rdi
	callq	_assert
	movq	_EPOLLHUP@GOTPCREL(%rip), %rax
	movq	_EPOLLERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_EPOLLRDHUP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ecx, (%r14)
	je	LBB0_5
## %bb.1:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_3:
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_4:
	movq	%rbx, %rdi
	callq	_free_connection_buffers
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	$0, 16(%r14)
	movq	_active_connections@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	_EVA_DESTROY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_5:
	movq	%rbx, %rdi
	callq	_server_writer
	testl	%eax, %eax
	jne	LBB0_24
## %bb.6:
	leaq	16(%rbx), %r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_server_reader
	movl	%eax, %r13d
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %ecx
	movl	8(%r14), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	testl	%r13d, %r13d
	jg	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 8(%rbx)
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_get_ready_bytes
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, (%rbx)
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_server_writer
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_EVT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$-3, (%rbx)
	jne	LBB0_7
LBB0_16:
	leaq	20(%rbx), %rdi
	callq	_free_unused_buffers
	movq	%r12, %rdi
	callq	_free_unused_buffers
	cmpl	$-3, 4(%rbx)
	jne	LBB0_19
## %bb.17:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_19:
	cmpl	$1, (%rbx)
	jne	LBB0_22
## %bb.20:
	cmpq	$0, 8(%rbx)
	je	LBB0_21
LBB0_22:
	movq	_EVT_SPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EVT_READ@GOTPCREL(%rip), %rcx
	jmp	LBB0_23
LBB0_21:
	movq	_EVT_WRITE@GOTPCREL(%rip), %rcx
	movq	_EVT_SPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_23:
	orl	(%rcx), %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_EPOLLRDHUP,4,2                 ## @EPOLLRDHUP
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket %d: disconnected, cleaning\n"

	.comm	_active_connections,4,2         ## @active_connections
	.comm	_EVA_DESTROY,4,2                ## @EVA_DESTROY
L_.str.1:                               ## @.str.1
	.asciz	"server_reader=%d, ready=%02x, state=%02x\n"

	.comm	_EVT_READ,4,2                   ## @EVT_READ
L_.str.2:                               ## @.str.2
	.asciz	"socket %d: closing and cleaning\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_read_write              ; -- Begin function server_read_write
	.p2align	2
_server_read_write:                     ; @server_read_write
	.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, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_assert
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _EPOLLHUP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EPOLLHUP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _EPOLLERR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _EPOLLERR@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _EPOLLRDHUP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _EPOLLRDHUP@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w9, w10
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh9:
	adrp	x8, _verbosity@GOTPAGE
Lloh10:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x2, x21
	bl	_fprintf
LBB0_4:
	mov	x0, x20
	bl	_free_connection_buffers
	mov	x0, x20
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	xzr, [x19, #16]
Lloh17:
	adrp	x8, _active_connections@GOTPAGE
Lloh18:
	ldr	x8, [x8, _active_connections@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh19:
	adrp	x8, _EVA_DESTROY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EVA_DESTROY@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_5:
	mov	x0, x20
	bl	_server_writer
	cbnz	w0, LBB0_24
; %bb.6:
Lloh22:
	adrp	x27, _verbosity@GOTPAGE
Lloh23:
	ldr	x27, [x27, _verbosity@GOTPAGEOFF]
Lloh24:
	adrp	x25, _EVT_READ@GOTPAGE
Lloh25:
	ldr	x25, [x25, _EVT_READ@GOTPAGEOFF]
	add	x22, x20, #16
	mov	w28, #1
Lloh26:
	adrp	x26, _stderr@GOTPAGE
Lloh27:
	ldr	x26, [x26, _stderr@GOTPAGEOFF]
Lloh28:
	adrp	x23, l_.str.1@PAGE
Lloh29:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_server_reader
	mov	x24, x0
	ldr	x8, [x27]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x26]
	ldp	w8, w9, [x19, #4]
	stp	x8, x9, [sp]
	mov	x1, x23
	mov	x2, x24
	bl	_fprintf
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	w24, #0
	b.gt	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_get_ready_bytes
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	str	w28, [x20]
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_server_writer
	cbnz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20]
	cmn	w8, #3
	b.ne	LBB0_7
LBB0_16:
	add	x0, x20, #20
	bl	_free_unused_buffers
	mov	x0, x22
	bl	_free_unused_buffers
	ldr	w8, [x20, #4]
	cmn	w8, #3
	b.ne	LBB0_19
; %bb.17:
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.18:
	ldr	w0, [x26]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_19:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_21
; %bb.20:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_22
LBB0_21:
	ldr	w8, [x25]
	b	LBB0_23
LBB0_22:
Lloh32:
	adrp	x8, _EVT_WRITE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EVT_WRITE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
LBB0_23:
Lloh35:
	adrp	x9, _EVT_SPEC@GOTPAGE
Lloh36:
	ldr	x9, [x9, _EVT_SPEC@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w0, w9, w8
LBB0_24:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_EPOLLRDHUP,4,2                 ; @EPOLLRDHUP
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket %d: disconnected, cleaning\n"

	.comm	_active_connections,4,2         ; @active_connections
	.comm	_EVA_DESTROY,4,2                ; @EVA_DESTROY
l_.str.1:                               ; @.str.1
	.asciz	"server_reader=%d, ready=%02x, state=%02x\n"

	.comm	_EVT_READ,4,2                   ; @EVT_READ
l_.str.2:                               ; @.str.2
	.asciz	"socket %d: closing and cleaning\n"

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